|
@@ -1,13 +1,21 @@
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
%define _use_internal_dependency_generator 0
|
|
%define _use_internal_dependency_generator 0
|
|
%define __find_requires %{SOURCE99}
|
|
%define __find_requires %{SOURCE99}
|
|
|
|
|
|
Summary: A secure replacement for inetd.
|
|
Summary: A secure replacement for inetd.
|
|
Name: xinetd
|
|
Name: xinetd
|
|
Version: 2.3.15
|
|
Version: 2.3.15
|
|
-Release: 1%{?_dist_release}
|
|
|
|
-License: Distributable (BSD-like)
|
|
|
|
-Group: System Environment/Daemons
|
|
|
|
|
|
+Release: 2%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
|
+Group: servers
|
|
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+
|
|
|
|
+License: xinetd
|
|
|
|
+URL: https://github.com/xinetd-org/xinetd
|
|
|
|
+# https://github.com/xinetd-org/xinetd/archive/xinetd-2-3-15.tar.gz
|
|
Source: http://www.xinetd.org/xinetd-%{version}.tar.gz
|
|
Source: http://www.xinetd.org/xinetd-%{version}.tar.gz
|
|
|
|
+
|
|
Source1: xinetd.init
|
|
Source1: xinetd.init
|
|
Source2: xinetd.conf
|
|
Source2: xinetd.conf
|
|
Source3: xinetd-inetdconvert
|
|
Source3: xinetd-inetdconvert
|
|
@@ -21,15 +29,69 @@ Source10: xinetd-chargen
|
|
Source11: xinetd-uchargen
|
|
Source11: xinetd-uchargen
|
|
Source12: xinetd.sysconf
|
|
Source12: xinetd.sysconf
|
|
Source13: xinetd-services
|
|
Source13: xinetd-services
|
|
|
|
+Source50: xinetd.service
|
|
Source99: filter-requires-xinetd.sh
|
|
Source99: filter-requires-xinetd.sh
|
|
-Patch0: xinetd-2.3.11-pie.patch
|
|
|
|
-Patch1: xinetd-2.3.13-libwrap.patch
|
|
|
|
|
|
+Patch0: xinetd-2.3.15-pie.patch
|
|
|
|
+Patch4: xinetd-2.3.14-bind-ipv6.patch
|
|
|
|
+Patch6: xinetd-2.3.14-man-section.patch
|
|
|
|
+Patch8: xinetd-2.3.14-ident-bind.patch
|
|
|
|
+Patch9: xinetd-2.3.14-readable-debuginfo.patch
|
|
|
|
+# Patch for clean reconfiguration using newer versions of autotools
|
|
|
|
+Patch10: xinetd-2.3.14-autoconf.patch
|
|
|
|
+# Completely rewritten socket handling code (it uses poll() instead
|
|
|
|
+# of select() function)
|
|
|
|
+Patch11: xinetd-2.3.14-poll.patch
|
|
|
|
+# New configuration option (limit for files opened by child process)
|
|
|
|
+Patch12: xinetd-2.3.14-file-limit.patch
|
|
|
|
+# When using tcpmux, xinetd ended up with sigsegv
|
|
|
|
+# (detection of NULL pointer in pollfd structure was missing)
|
|
|
|
+Patch13: xinetd-2.3.14-tcpmux.patch
|
|
|
|
+# When service is destroyed, destroy also its
|
|
|
|
+# file descriptor in array given to poll function
|
|
|
|
+Patch14: xinetd-2.3.14-clean-pfd.patch
|
|
|
|
+# xinetd confuses ipv6 and ipv4 port parsing
|
|
|
|
+# - furtunately, they have the same format, so everything
|
|
|
|
+# works even without this patch
|
|
|
|
+Patch15: xinetd-2.3.14-ipv6confusion.patch
|
|
|
|
+# This fixes bug #593904 - online reconfiguration caused log message
|
|
|
|
+# flood when turning off UDP service
|
|
|
|
+Patch16: xinetd-2.3.14-udp-reconfig.patch
|
|
|
|
+Patch18: xinetd-2.3.14-rpc-specific-port.patch
|
|
|
|
+Patch19: xinetd-2.3.14-signal-log-hang.patch
|
|
|
|
+Patch20: xinetd-2.3.14-fix-type-punned-ptr.patch
|
|
|
|
+# Fix leaking file descriptors and pfd_array wasting
|
|
|
|
+# This fixes #702670
|
|
|
|
+Patch21: xinetd-2.3.14-leaking-fds.patch
|
|
|
|
+# Fix memory corruption when loading a large number of services
|
|
|
|
+# This fixes #720390
|
|
|
|
+Patch22: xinetd-2.3.14-many-services.patch
|
|
|
|
+# Remove realloc of fds that was causing memory corruption
|
|
|
|
+Patch23: xinetd-2.3.14-realloc-remove.patch
|
|
|
|
+# Fix leaking descriptor when starting a service fails
|
|
|
|
+Patch24: xinetd-2.3.14-leaking-fds-2a.patch
|
|
|
|
+# Fix #770858 - Instances limit in xinetd can be easily bypassed
|
|
|
|
+Patch25: xinetd-2.3.14-instances.patch
|
|
|
|
+# Fix #809272 - Service disabled due to bind failure
|
|
|
|
+Patch26: xinetd-2.3.14-retry-svc-activate-in-cps-restart.patch
|
|
|
|
+Patch27: xinetd-2.3.15-bad-port-check.patch
|
|
|
|
+# Fix #977873 - Use full path to server when checking selinux context
|
|
|
|
+Patch28: xinetd-2.3.15-context-exepath.patch
|
|
|
|
+Patch29: xinetd-2.3.15-creds.patch
|
|
|
|
+# Fix #1033528 - xinetd segfaults when connecting to tcpmux service
|
|
|
|
+Patch30: xinetd-2.3.15-tcpmux-nameinargs-disable-service.patch
|
|
|
|
+Patch31: xinetd-2.3.15-udp-wait.patch
|
|
|
|
+Patch32: xinetd-2.3.15-remove-deprecated-flask.h.patch
|
|
|
|
|
|
-Requires(pre): chkconfig initscripts
|
|
|
|
-Requires: initscripts setup fileutils
|
|
|
|
-BuildRequires: tcp_wrappers
|
|
|
|
-URL: http://www.xinetd.org/
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
+
|
|
|
|
+#BuildRequires: tcp_wrappers
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{?systemd_requires}
|
|
|
|
+%else
|
|
|
|
+Requires: initscripts setup fileutils
|
|
|
|
+Requires(pre): chkconfig initscripts
|
|
|
|
+%endif
|
|
|
|
+
|
|
Provides: inetd
|
|
Provides: inetd
|
|
|
|
|
|
%description
|
|
%description
|
|
@@ -42,24 +104,27 @@ services to specific IP addresses on your host machine. Each service
|
|
has its own specific configuration file for Xinetd; the files are
|
|
has its own specific configuration file for Xinetd; the files are
|
|
located in the /etc/xinetd.d directory.
|
|
located in the /etc/xinetd.d directory.
|
|
|
|
|
|
|
|
+
|
|
|
|
+%debug_package
|
|
|
|
+
|
|
|
|
+
|
|
%prep
|
|
%prep
|
|
-%setup -q
|
|
|
|
-#%patch0 -p0 -b .pie
|
|
|
|
-#%patch1 -p1 -b .libwrap
|
|
|
|
-#%patch2 -p1 -b .tcp_rpc
|
|
|
|
|
|
+%setup -q
|
|
|
|
+%autopatch -p1
|
|
|
|
+aclocal
|
|
|
|
+autoconf
|
|
|
|
+
|
|
|
|
|
|
%build
|
|
%build
|
|
-libtoolize --copy --force
|
|
|
|
-%configure --with-loadavg --with-inet6 --with-libwrap
|
|
|
|
-make
|
|
|
|
|
|
+%configure --with-loadavg --with-inet6
|
|
|
|
+# --with-libwrap
|
|
|
|
+make CFLAGS="$CFLAGS -fpie $(pkg-config --cflags libtirpc)" LDFLAGS="$LDFLAGS $(pkg-config --libs libtirpc) -Wl,-z,relro,-z,now"
|
|
|
|
+
|
|
|
|
|
|
%install
|
|
%install
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
|
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_mandir}
|
|
mkdir -p $RPM_BUILD_ROOT/%{_mandir}
|
|
%makeinstall DAEMONDIR=$RPM_BUILD_ROOT/usr/sbin MANDIR=$RPM_BUILD_ROOT/%{_mandir}
|
|
%makeinstall DAEMONDIR=$RPM_BUILD_ROOT/usr/sbin MANDIR=$RPM_BUILD_ROOT/%{_mandir}
|
|
mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d/
|
|
mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d/
|
|
-install -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/xinetd
|
|
|
|
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/xinetd.conf
|
|
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/xinetd.conf
|
|
install -m 755 %SOURCE3 $RPM_BUILD_ROOT/usr/sbin/inetdconvert
|
|
install -m 755 %SOURCE3 $RPM_BUILD_ROOT/usr/sbin/inetdconvert
|
|
install -m 644 %SOURCE4 $RPM_BUILD_ROOT/etc/xinetd.d/time
|
|
install -m 644 %SOURCE4 $RPM_BUILD_ROOT/etc/xinetd.d/time
|
|
@@ -79,41 +144,69 @@ rm -f $RPM_BUILD_ROOT/usr/sbin/xconv.pl
|
|
rm -f $RPM_BUILD_ROOT/%{_mandir}/*.3
|
|
rm -f $RPM_BUILD_ROOT/%{_mandir}/*.3
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
|
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
|
|
|
+
|
|
|
|
+%if %{with systemd}
|
|
|
|
+install -Dpm644 %{SOURCE50} $RPM_BUILD_ROOT%{_unitdir}/xinetd.service
|
|
|
|
+%else
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
|
|
+install -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/xinetd
|
|
install -m 644 %SOURCE12 $RPM_BUILD_ROOT/etc/sysconfig/xinetd
|
|
install -m 644 %SOURCE12 $RPM_BUILD_ROOT/etc/sysconfig/xinetd
|
|
|
|
+%endif
|
|
|
|
|
|
-%clean
|
|
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
%post
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_post xinetd.service
|
|
|
|
+%else
|
|
if [ $1 = 1 ]; then
|
|
if [ $1 = 1 ]; then
|
|
/sbin/chkconfig --add xinetd
|
|
/sbin/chkconfig --add xinetd
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%preun
|
|
%preun
|
|
-if [ $1 = 0 ]; then
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun xinetd.service
|
|
|
|
+%else
|
|
|
|
+if [ $1 = 0 -o -x /bin/systemctl]; then
|
|
/sbin/service xinetd stop > /dev/null 2>&1
|
|
/sbin/service xinetd stop > /dev/null 2>&1
|
|
/sbin/chkconfig --del xinetd
|
|
/sbin/chkconfig --del xinetd
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%postun
|
|
%postun
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_postun_with_restart xinetd.service
|
|
|
|
+%else
|
|
if [ $1 -ge 1 ]; then
|
|
if [ $1 -ge 1 ]; then
|
|
/sbin/service xinetd condrestart >/dev/null 2>&1
|
|
/sbin/service xinetd condrestart >/dev/null 2>&1
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%doc INSTALL CHANGELOG COPYRIGHT README xinetd/sample.conf
|
|
|
|
-
|
|
|
|
|
|
+%license COPYRIGHT
|
|
|
|
+%doc CHANGELOG README xinetd/sample.conf
|
|
%config(noreplace) /etc/xinetd.conf
|
|
%config(noreplace) /etc/xinetd.conf
|
|
-%config(noreplace) /etc/sysconfig/xinetd
|
|
|
|
%{_sbindir}/xinetd
|
|
%{_sbindir}/xinetd
|
|
%{_sbindir}/inetdconvert
|
|
%{_sbindir}/inetdconvert
|
|
%{_mandir}/*/*
|
|
%{_mandir}/*/*
|
|
-%config /etc/rc.d/init.d/xinetd
|
|
|
|
%config(noreplace) /etc/xinetd.d/*
|
|
%config(noreplace) /etc/xinetd.d/*
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_unitdir}/xinetd.service
|
|
|
|
+%else
|
|
|
|
+%config(noreplace) /etc/sysconfig/xinetd
|
|
|
|
+%config /etc/rc.d/init.d/xinetd
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Mon Mar 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.15-2
|
|
|
|
+- updated Patch0.
|
|
|
|
+- imported Patch4-32 from rawhide.
|
|
|
|
+- added systemd support (disabled as default).
|
|
|
|
+- dropped dependence on libwrap.
|
|
|
|
+
|
|
* Sat Apr 06 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.3.15-1
|
|
* Sat Apr 06 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.3.15-1
|
|
- new upstream release
|
|
- new upstream release
|
|
- deleted Patch2 (upstream merged)
|
|
- deleted Patch2 (upstream merged)
|