diff --git a/xinetd-initscript b/xinetd-initscript deleted file mode 100644 index 4880a50..0000000 --- a/xinetd-initscript +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# xinetd This starts and stops xinetd. -# -# Begin $rc_base/init.d/xinetd -# Based on sysklogd script from LFS-3.1 and earlier. -# -# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org -# Modified by Silvan Calarco - silvan.calarco@qilinux.it -# -# chkconfig: 345 40 30 -# 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. -# -# processname: /usr/sbin/xinetd -# config: /etc/xinetd.conf -# pidfile: /run/xinetd.pid - -source /etc/sysconfig/rc -source $rc_functions - -case "$1" in - start) - echo -n "Starting xinetd: " - loadproc /usr/sbin/xinetd -pidfile /run/xinetd.pid - echo - ;; - stop) - echo -n "Stopping xinetd: " - killproc /usr/sbin/xinetd - echo - ;; - reload) - echo -n "Reloading xinetd: " - reloadproc xinetd - echo - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - status) - statusproc /usr/sbin/xinetd - ;; - *) - echo "Usage: $0 {start|stop|reload|restart|status}" - exit 1 - ;; -esac - -# End $rc_base/init.d/xinetd diff --git a/xinetd.service b/xinetd.service new file mode 100644 index 0000000..c6f6271 --- /dev/null +++ b/xinetd.service @@ -0,0 +1,10 @@ +[Unit] +Description=A secure replacement for inetd +After=network.target + +[Service] +ExecStart=/usr/sbin/xinetd -dontfork +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/xinetd.spec b/xinetd.spec index cffcbfe..be9b0f8 100644 --- a/xinetd.spec +++ b/xinetd.spec @@ -1,21 +1,26 @@ Name: xinetd -Version: 2.3.15 +Version: 2.3.15.4 Summary: A better and secure replacement for inetd Group: System/Servers -Release: 3mamba +Release: 1mamba License: BSD Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://www.xinetd.org/ -Source0: http://www.xinetd.org/xinetd-%{version}.tar.gz -Source1: xinetd-initscript +URL: https://github.com/openSUSE/xinetd +Source0: https://github.com/openSUSE/xinetd.git/%{version}/xinetd-%{version}.tar.bz2 +#Source0: http://www.xinetd.org/xinetd-%{version}.tar.gz +Source1: xinetd.service Source2: xinetd-etc.tar.bz2 Source3: xinetd-conf Provides: inetd -Prereq: /sbin/chkconfig ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel +BuildRequires: ldconfig +BuildRequires: libe2fs-devel +BuildRequires: libkrb5-devel +BuildRequires: libnsl-devel +BuildRequires: libselinux-devel BuildRequires: libtirpc-devel BuildRequires: libwrap-devel ## AUTOBUILDREQ-END @@ -27,8 +32,11 @@ Requires: tcp_wrappers >= 7.6 %description Xinetd is a powerful inetd replacement. Xinetd has access control mechanisms, extensive logging capabilities, the ability to make services available based on time, can place limits on the number of servers that can be started, and has a configurable defence mechanism to protect against port scanners, among other things. +%debug_package + %prep -%setup -q -a 2 +%setup -q -a2 +./autogen.sh %build export LDFLAGS=-ltirpc @@ -39,16 +47,16 @@ export LDFLAGS=-ltirpc %make %install -test x"$RPM_BUILD_ROOT" != x/ && rm -rf "$RPM_BUILD_ROOT" -mkdir -p $RPM_BUILD_ROOT%{_initrddir} +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%make_install + +#make install \ +# prefix=$RPM_BUILD_ROOT%{_prefix} \ +# DAEMONDIR=$RPM_BUILD_ROOT%{_sbindir} \ +# MANDIR=$RPM_BUILD_ROOT%{_mandir} + +install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/xinetd.service mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d - -make install \ - prefix=$RPM_BUILD_ROOT%{_prefix} \ - DAEMONDIR=$RPM_BUILD_ROOT%{_sbindir} \ - MANDIR=$RPM_BUILD_ROOT%{_mandir} - -install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/xinetd install -m 600 etc/xinetd.d/* $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d install -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.conf @@ -56,22 +64,15 @@ install -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.conf test x"$RPM_BUILD_ROOT" != x/ && rm -rf "$RPM_BUILD_ROOT" %post -if [ $1 -eq 1 ]; then -# new install - chkconfig --add xinetd -fi -if [ $1 -gt 1 ]; then -# upgrade - service xinetd restart -fi +%systemd_post xinetd : %preun -if [ $1 -eq 0 ]; then -#erase - service xinetd stop - chkconfig --del xinetd -fi +%systemd_preun xinetd +: + +%postun +%systemd_postun_with_restart xinetd : %files @@ -79,15 +80,21 @@ fi %dir %{_sysconfdir}/xinetd.d %config(noreplace) %{_sysconfdir}/xinetd.d/* %config(noreplace) %{_sysconfdir}/xinetd.conf -%config %{_initrddir}/xinetd +%{_bindir}/itox +%{_bindir}/xconv.pl %{_sbindir}/xinetd -%{_sbindir}/itox -%{_sbindir}/xconv.pl -%{_mandir}/*/* -%doc COPYRIGHT xinetd/sample.conf -%doc CHANGELOG README +%{_unitdir}/xinetd.service +%{_mandir}/man5/xinetd.conf.5* +%{_mandir}/man5/xinetd.log.5* +%{_mandir}/man8/itox.8* +%{_mandir}/man8/xconv.pl.8* +%{_mandir}/man8/xinetd.8* +%doc COPYRIGHT %changelog +* Thu Nov 19 2020 Silvan Calarco 2.3.15.4-1mamba +- update to 2.3.15.4 + * Sat Apr 13 2013 Silvan Calarco 2.3.15-3mamba - initscript: start with -pidfile for systemd to detect it is running @@ -118,8 +125,8 @@ fi - new version rebuild - fixed initscript reload -* Fri May 24 2003 Silvan Calarco +* Sat May 24 2003 Silvan Calarco - fixed configuration and initscripts to make it work correctly -* Tue Apr 17 2003 Luca Tinelli +* Thu Apr 17 2003 Luca Tinelli - first build