Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > 7c808c758664392d6cce1632fbc5a6ab > files > 22

xinetd-2.3.13-2mdk.src.rpm

#rh-2.3.4-0.2
%define name 		xinetd
%define version 	2.3.13
%define release		%mkrel 2
%define url		http://www.xinetd.org

Summary: 	Xinetd is a powerful replacement for inetd.
Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
Group: 		System/Base
License: 	BSD
URL: 		%{url}
Source: 	%{url}/%{name}-%{version}.tar.bz2
Source1:	xinetd.init.bz2
Source2:	xinetd.default.config
Source3:	convert.pl
Source4:	xinetd-ttime
Source5:	xinetd-utime
Source6:	xinetd-tdtime
Source7:	xinetd-udtime
Source8:	xinetd-echo
Source9:	xinetd-uecho
Source10:	xinetd-chargen
Source11:	xinetd-uchargen
Source12:	xinetd.sysconf
Source13:	xinetd-servers
Source14:	xinetd-services
Source15:	xinetd-xadmin
Source50:	faq.html.bz2
# (fc) 2.3.4-3mdk fix zombie process when no active server is running
# (for example, when only fam is running, exits and xinetd doesn't restart it)
Patch0:         xinetd-2.3.9-zombie.patch.bz2 
Patch1:		xinetd-2.3.11-man.patch.bz2
Patch5:		xinetd-2.3.12-stream_wait.patch.bz2
Patch6:		xinetd-2.3.12.diff.bz2
# (neoclust) 2.3.13-2mdk     Fix Build with gcc4 : Patch From Fedora
Patch7:         xinetd-2.3.13-gcc4.patch 
Requires:	/sbin/chkconfig /sbin/service
BuildRequires:	tcp_wrappers
BuildRoot: 	%{_tmppath}/%{name}-%{version}-buildroot
PreReq:		rpm-helper
Obsoletes: xinetd-devel, netkit-base
Provides: xinetd-devel, netkit-base

%description
xinetd is a powerful replacement for inetd.
xinetd has access control machanisms, extensive logging capabilities,
the ability to make services available based on time, and can place
limits on the number of servers that can be started, among other things.

xinetd has the ability to redirect TCP streams to a remote host and
port. This is useful for those of that use ip masquerading, or NAT,
and want to be able to reach your internal hosts.

xinetd also has the ability to bind specific services to specific
interfaces. This is useful when you want to make services available
for your internal network, but not the rest of the world.  Or to have
a different service running on the same port, but different interfaces.

%package ipv6
Summary: 	Xinetd is a powerful replacement for inetd.
Group: System/Base
License: BSD
Requires: xinetd
PreReq: rpm-helper

%description ipv6
xinetd is a powerful replacement for inetd.
xinetd has access control machanisms, extensive logging capabilities,
the ability to make services available based on time, and can place
limits on the number of servers that can be started, among other things.

xinetd has the ability to redirect TCP streams to a remote host and
port. This is useful for those of that use ip masquerading, or NAT,
and want to be able to reach your internal hosts.

xinetd also has the ability to bind specific services to specific
interfaces. This is useful when you want to make services available
for your internal network, but not the rest of the world.  Or to have
a different service running on the same port, but different interfaces.

This version is compiled for IPV6.

%package simple-services
Summary: Internal xinetd simple services
Group: System/Base
License: BSD
Requires: xinetd

%description simple-services
Internal xinetd simple services (not very useful one):

- chargen

Chargen is short for Character Generator and is a service that generates
random characters either in one UDP packet containing a random number (between
0 and 512) of characters, or a TCP session. The UDP Chargen server looks for a
UDP packet on port 19 and responds with the random character packet.

With TCP Chargen, the server sends as a continuous stream of TCP packets once
a connection is made, and until the session closes. The data is thrown away.
Chargen is used to find the cause for dropped packets. It uses TCP/UDP port
19. An infiltrator can create a DoS attack by spoofing an IP address and
causing two devices to send random traffic to each other.

RFC 864 describes the Chargen service.

- daytime

The Daytime protocol is another testing tool and uses port 13 for both UDP and
TCP versions. On receipt of a datagram to port 13, the server in the UDP
version, sends the current date and time in ASCII format in a datagram. The
TCP version, on receipt of a datagram to port 13, and once the connection is
established, sends the date and time in ASCII format and closes the
connection.

RFC 867 describes the Daytime service.

- echo

Echo uses UDP and TCP port 7 and is used as a debgging tool to send any
datagrams received from a source, back to that source. The risk with this is
that someone who has access to the network can overload devices via the Echo
service amounting to a DoS attack.

RFC 862 describes the Echo service.

- time

- servers

Show servers running

- services

Show available services

- xadmin

Show servers running and available services

%prep
%setup -q

# 20040126 warly should not be needed anymore 
# %patch0 -p1 -b .zombie

# warly integrated upstream 
# %patch1 -p1 -b .man

# The stream wait patch is only needed because Red Hat did not put
# flags = NOLIBWRAP in their sgi_fam setup. The patch is harmless,
# but properly configuring sgi_fam is the preferred method.
# 20040129 no longer needed, sgi_fam is fixed
#%patch5 -p1
%patch7 -p1 -b .gcc4

%build
%configure2_5x  --with-libwrap --with-inet6
%__make
mv -f xinetd/xinetd xinetd-ipv6

%__make clean
rm -f config.cache
%configure  --with-libwrap
%__make

cp -p libs/src/sio/README README-libsio
cp -p libs/src/str/README README-libstr
cp -p libs/src/misc/README README-libmisc

bzcat %SOURCE50 > FAQ.html

%install
[ -d $RPM_BUILD_ROOT ] && rm -r $RPM_BUILD_ROOT;
install -d %buildroot%{_initrddir}/
%makeinstall DAEMONDIR=$RPM_BUILD_ROOT%{_sbindir} MANDIR=$RPM_BUILD_ROOT/%{_mandir} FMODE="-m 644"

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/
bzcat %SOURCE1 > %buildroot%{_initrddir}/xinetd
chmod 755 %buildroot%{_initrddir}/xinetd

mv %buildroot/%{_sbindir}/xinetd %buildroot/%{_sbindir}/xinetd-%version
install -m755 xinetd-ipv6 %buildroot/%{_sbindir}/xinetd-ipv6

install -m 644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.conf
install -m 755 %SOURCE3 $RPM_BUILD_ROOT%{_sbindir}/inetdconvert
install -m 644 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/time
install -m 644 %SOURCE5 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/time-udp
install -m 644 %SOURCE6 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/daytime
install -m 644 %SOURCE7 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/daytime-udp
install -m 644 %SOURCE8 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/echo
install -m 644 %SOURCE9 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/echo-udp
install -m 644 %SOURCE10 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/chargen
install -m 644 %SOURCE11 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/chargen-udp
#install -m 644 %SOURCE13 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/servers
install -m 644 %SOURCE14 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/services
#install -m 644 %SOURCE15 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/xadmin

install -D -m 644 %SOURCE12 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/xinetd

mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
make LIBDIR=$RPM_BUILD_ROOT%{_libdir}/xinetd \
        INCLUDEDIR=$RPM_BUILD_ROOT%{_includedir}/xinetd \
        MANDIR=$RPM_BUILD_ROOT%{_mandir}/man3 FMODE="-m 644"  makelibs

# no need to ship this one since we provide inetdconvert
rm -f $RPM_BUILD_ROOT%{_sbindir}/itox
rm -f $RPM_BUILD_ROOT%{_sbindir}/xconv.pl
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/itox*

#workaround for rpm weirdness
ln -s /etc/alternatives/%{name} %buildroot/%{_sbindir}/%{name}

chmod a+r INSTALL README FAQ.html CHANGELOG COPYRIGHT xinetd/sample.conf

export DONT_GPRINTIFY=1

# Remove unpackaged symlink
rm -rf ${RPM_BUILD_ROOT}%{_sbindir}/xinetd

%clean
rm -rf $RPM_BUILD_ROOT

%post
update-alternatives --install %{_sbindir}/xinetd xinetd %{_sbindir}/xinetd-%version 10
%_post_service %{name}

%post ipv6
update-alternatives --install %{_sbindir}/xinetd xinetd %{_sbindir}/xinetd-ipv6 20
%_post_service %{name}

%preun
%_preun_service  %{name}

%postun
if [ "$1" -ge "1" ]; then
  /sbin/service xinetd condrestart >/dev/null 2>&1
fi

%postun ipv6
if [ "$1" -ge "1" ]; then
  /sbin/service xinetd condrestart >/dev/null 2>&1
fi

%files
%defattr(-,root,root)
%doc INSTALL README FAQ.html CHANGELOG COPYRIGHT xinetd/sample.conf
%config(noreplace) /etc/sysconfig/xinetd
%config(noreplace) %attr(755,root,root) %{_initrddir}/xinetd
%config(noreplace) %{_sysconfdir}/xinetd.conf
%dir %{_sysconfdir}/xinetd.d
%{_sbindir}/xinetd-%version
%{_sbindir}/inetdconvert
%{_mandir}/*/*

%files ipv6
%defattr(-,root,root)
%doc README COPYRIGHT
%{_sbindir}/xinetd-ipv6

%files simple-services
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/xinetd.d/*

%changelog
* Sat Jul 30 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.3.13-2mdk
- Fix Build with gcc4 ( Fedora )

* Thu Feb 19 2004 Warly <warly@mandrakesoft.com> 2.3.13-1mdk
- new version
- fix a segfault on service reload

* Thu Jan 29 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.3.12-5mdk
- Disable patch5, no longer needed since fam is correctly configured now

* Mon Jan 26 2004 Warly <warly@mandrakesoft.com> 2.3.12-4mdk
- Include Steve Grubb suggestions
- zombie patch is deprecated
- new fixes which will be included into 2.3.13
- remove deprecated servers and xadmin

* Thu Jan  8 2004 Pixel <pixel@mandrakesoft.com> 2.3.12-3mdk
- move dumb unused simple xinetd-internal services to package xinetd-simple-services
 (chargen, daytime, echo, time, servers, services, xadmin) 

* Tue Jan  6 2004 Stefan van de rEijk <stefan@eijk.nu> 2.3.12-2mdk
- remove unpackaged symlink
- remove redundant BuildRequires (rpm-helper is Required by rpm-build)

* Mon Dec 01 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.3.12-1mdk
- new release
- remove patch 2 (version properly reported), 3 and 4 (merged upstream)
- rediff patch 5

* Tue Jul 15 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 2.3.11-4mdk
- fix %{_sysconfdir}/xinetd.d ownership

* Thu Jul 03 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.3.11-3mdk
- patch 5: fix bug reported by Mark Pierce

* Wed May 21 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.3.11-2mdk
- typo fix in init script spotted by Alice Lafox in .po

* Tue May 13 2003 Vincent Danen <vdanen@mandrakesoft.com> 2.3.11-1mdk
- 2.3.11 (security fix)
- merge patches from RH

* Fri Feb 14 2003 Warly <warly@mandrakesoft.com> 2.3.10-1mdk
- new version (main changes from changelog):
- Close the service descriptors on fork. This will help reduce the file
discriptors used by the daemon when using some internal services
- Fix a numbering bug with xinetd's internal flag representation that
was manifesting its self as all services being disabled upon recieving
a SIGUSR2 (hard reconfig)
- Don't pass a hostname to dns registration calls, it'll pick a
hostname automagically.
- Make sure tcp internal non-forking services close their
filedescriptors.
- Up the default CPS value to 50 from 10 (Document the default CPS
values in the xinetd.conf man page).
- Fix a closing of the connection when there's an error handling the
service.
- Fixed a bug in the consistency check mechanism where it would report
the signal pipe as a problem.
- Remove access control calls for special services.  The access
control functions must always allow these services anyway.
- Fixed a bug with reconfiguring services using the interface
attribute.
- Fixed a bug with deallocating dns registrations.
- Fixed a bug where tcp_wrappers would not identify an internal
service since the internal service has no executable.
- Fix a potential memory leak with bind_addr and service reconfig.
- Fix a reconfig timing issue.
  
* Thu Jan 30 2003 Frederic Lepied <flepied@mandrakesoft.com> 2.3.9-4mdk
- gprintified init script by hand

* Fri Oct 25 2002 Warly <warly@mandrakesoft.com> 2.3.9-3mdk
- new version

* Thu Aug 22 2002 Warly <warly@mandrakesoft.com> 2.3.7-3mdk
- fix typo in xadmin

* Wed Aug 21 2002 Warly <warly@mandrakesoft.com> 2.3.7-2mdk
- add a xadmin entry

* Tue Aug 13 2002 Warly <warly@mandrakesoft.com> 2.3.7-1mdk
- new version

* Sat Aug 10 2002 Pixel <pixel@mandrakesoft.com> 2.3.6-2mdk
- xinetd-services, xinetd-servers: fix description (thanks to allen <aef@prismnet.com>)
- add "PreReq: rpm-helper"

* Fri Aug  9 2002 Warly <warly@mandrakesoft.com> 2.3.6-1mdk
- new version

* Fri May 31 2002 Warly <warly@mandrakesoft.com> 2.3.5-1mdk
- new version

* Mon Mar  4 2002 Frederic Crozat <fcrozat@mandrakesoft.com> 2.3.4-4mdk
- Update patch0 to use official fix from xinetd author (Thanks to Rob Braun)

* Thu Feb 28 2002 Frederic Crozat <fcrozat@mandrakesoft.com> 2.3.4-3mdk
- Patch0: fix zombie server process when no active process is running 

* Wed Dec 12 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.4-2mdk
- Fix more rpmlint.
- DONT_GPRINTIFY he broke initscripts.

* Tue Dec 11 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.4-1mdk
- Upgrade to cvs version to fix some bugs (rh).
- Add configuration files for the xinetd internal services listing 
  current servers and services. It's off by default, and restricted
  to localhost when enabled (rh)

* Fri Sep 28 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.3-5mdk
- Fix rpmlint errors.

* Fri Sep 14 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.3-4mdk
- Rebuild.

* Mon Sep  3 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.3-3mdk
- If we don't find any /usr/sbin/xinetd then relaunch
  update-alternatives.

* Sun Sep  2 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.3-2mdk
- Fix syntax error that doen't show up by black magick on my test box
  in 1mdk.

* Sat Sep  1 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.3-1mdk
- 2.3.3 which contains numbered fixes.

* Wed Aug 22 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.0-5mdk
- Merge RH patches.

* Thu Aug  9 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.0-4mdk
- Fix alternatives initscripts (pixel).

* Tue Aug  7 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.0-3mdk
- Disable logfile patch (broken).

* Thu Aug  2 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.3.0-2mdk
- Rework initscripts.
- Merge logfile patch from RedHat.

* Fri Jun 29 2001 Vincent Danen <vdanen@mandrakesoft.com> 2.3.0-1mdk
- 2.3.0 final

* Wed Jun 27 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre17-1mdk
- pre17.

* Thu Jun 21 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre16-1mdk
- pre16.

* Wed Jun 20 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre15-3mdk
- Remove the %ghost/usr/sbin/xinetd (pixel).

* Mon Jun 18 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre15-2mdk
- set TMPDIR to /tmp/ before launching daemon.

* Mon May 28 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre15-1mdk
- 2.1.8.9pre15 with patch from Steve G <linux_4ever@yahoo.com> for
  IPV6 compilation.

* Fri May 18 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre14-6mdk
- Add /etc/sysconfig/xinetd so users can add extra options (rh).
- Add tcp wait=yes patch.

* Wed Apr  4 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre14-5mdk
- Add rh patches :
		Because realloc() doesn't initialize newly-allocated memory,
		the NULL pointer on the end can't be assumed to be there.
- User server build macros.

* Tue Apr  3 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre14-3mdk
- Remove /etc/init.d/ requires (rpm bugs ?)

* Wed Feb 21 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre14-2mdk
- Obsoletes: now netkit-base.

* Mon Feb  5 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre14-1mdk
- 2.1.8.9pre14.

* Mon Nov 20 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre13-4mdk
- Requires: xinetd even for xinetd-ipv6.
- Workaround for alternatvies and upgrade.

* Thu Nov 16 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre13-3mdk
- Don't put alternatives only in upgrade mode.

* Wed Nov 15 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre13-2mdk
- add xinetd-ipv6 package with enabled ipv6 and alternatives high for
  this package.

* Tue Nov 14 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.1.8.9pre13-1mdk
- be pedantic and use even more macros.
- new and shiny source bumped into cooker.
- enable ipv6.

* Fri Nov 10 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre12-3mdk
- rewrote inetdconvert as perl.

* Fri Oct 20 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre12-2mdk
- Obsoletes xinetd-devel.
- Add default inetd services like redhat does.

* Thu Oct 19 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre12-1mdk
- 2.1.8.9pre12.

* Fri Oct 13 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre11-1mdk
- 2.1.8.9pre11.

* Tue Oct 10 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre10-6mdk
- InitS at 56 to start after bind.

* Mon Oct  2 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre10-5mdk
- Preferred to do the Alexander way to check if NETWORKING is up.

* Mon Oct  2 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre10-4mdk
- Install includes as 644.

* Wed Sep 27 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre10-3mdk
- Add probe dummy target in init script for linuxconf.

* Mon Sep 25 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre10-2mdk
- Fix initscripts for network.

* Sun Sep 24 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre10-1mdk
- 2.18.9pre10.

* Sat Sep 23 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre9-3mdk
- Add some noreplace
- Do a condrestart only when DURING_INSTALL is NULL.

* Sat Sep 23 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre9-2mdk
- Fix initscripts.
- Add pidfile writing to file patch (rh).
- Add patch to skip junk file (.rpmsave/.rpmnew/~) (rh).

* Thu Aug  3 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre9-1mdk
- 2.1.8.9pre9.

* Sun Jul 23 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre8-7mdk
- Correct postscripts.
- Add condrestart to the init.d/ script to restart xinetd only when
  his launched.
- Upgrade faq.

* Wed Jul 19 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre8-6mdk
- Make rpmlint happy with %{_initrddir}/ files.
- BM.

* Fri Jul 14 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.8.9pre8-5mdk
- Move to main/.
- Clean up of %post %pre %preun.
- Add malloc patches.

* Thu Jul 13 2000 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.1.8.9pre8-4mdk
- fixed permission problem

* Wed Jul 12 2000 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.1.8.9pre8-3mdk
- removed %group
- removed _sysconfdir 

* Mon Jul 10 2000 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.1.8.9pre8-2mdk
- macroszifications
- specfile cleanup

* Mon Jul 10 2000 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.1.8.9pre8-1mdk
- new beta version

* Mon Jun 26 2000 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.1.8.8p3-2mdk
- fix chkconfig problem

* Wed Jun 21 2000 Christian Zoffoli <czoffoli@littlepenguin.org> 2.1.8.8p3-1mdk
- built first spec.
- Mandrakized version
- Enabled IPv6 Support
- Added FAQ