From 629a32ec28ebcb88fa7330ad4bffcad5d70c2b80 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Thu, 13 Feb 2014 14:16:17 +0100 Subject: [PATCH] don't depend on xinetd anymore (#1059641) --- tftp.service | 3 +++ tftp.spec | 28 +++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/tftp.service b/tftp.service index cc5fdb8..43d961c 100644 --- a/tftp.service +++ b/tftp.service @@ -4,3 +4,6 @@ Description=Tftp Server [Service] ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot StandardInput=socket + +[Install] +Also=tftp.socket diff --git a/tftp.spec b/tftp.spec index 930cbd5..f98f6e8 100644 --- a/tftp.spec +++ b/tftp.spec @@ -4,7 +4,7 @@ Summary: The client for the Trivial File Transfer Protocol (TFTP) Name: tftp Version: 5.2 -Release: 10%{?dist} +Release: 11%{?dist} License: BSD Group: Applications/Internet URL: http://www.kernel.org/pub/software/network/tftp/ @@ -34,20 +34,20 @@ and should not be enabled unless it is expressly needed. %package server Group: System Environment/Daemons Summary: The server for the Trivial File Transfer Protocol (TFTP) -Requires: xinetd systemd-units -Requires(post): /sbin/service, systemd-units -Requires(postun): /sbin/service, systemd-units +Requires: systemd-units +Requires(post): systemd-units +Requires(postun): systemd-units %description server The Trivial File Transfer Protocol (TFTP) is normally used only for booting diskless workstations. The tftp-server package provides the server for TFTP, which allows users to transfer files to and from a remote machine. TFTP provides very little security, and should not be -enabled unless it is expressly needed. The TFTP server is run from -%{_sysconfdir}/xinetd.d/tftp, and is disabled by default. +enabled unless it is expressly needed. The TFTP server is run by using +systemd socket activation, and is disabled by default. %prep -%setup -q -n tftp-hpa-%{version} +%setup -q -n tftp-hpa-%{version} %patch0 -p1 -b .zero %patch2 -p1 -b .tzfix %patch3 -p1 -b .tftpboot @@ -72,22 +72,18 @@ mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tftpboot mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} make INSTALLROOT=${RPM_BUILD_ROOT} SBINDIR=%{_sbindir} MANDIR=%{_mandir} INSTALL='install -p' install -install -m755 -d -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/ ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tftpboot -sed -e 's:/var:%{_localstatedir}:' -e 's:/usr/sbin:%{_sbindir}:' \ - tftp-xinetd > ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/tftp -touch -r tftp-xinetd ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/tftp install -p -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_unitdir} install -p -m 644 %SOURCE2 ${RPM_BUILD_ROOT}%{_unitdir} %post server -%systemd_post tftp.service +%systemd_post tftp.socket %preun server -%systemd_preun tftp.service +%systemd_preun tftp.socket %postun server -%systemd_postun_with_restart tftp.service +%systemd_postun_with_restart tftp.socket %clean @@ -100,13 +96,15 @@ rm -rf ${RPM_BUILD_ROOT} %files server %doc README README.security CHANGES -%config(noreplace) %{_sysconfdir}/xinetd.d/tftp %dir %{_localstatedir}/lib/tftpboot %{_sbindir}/in.tftpd %{_mandir}/man8/* %{_unitdir}/* %changelog +* Thu Feb 13 2014 Jan Synáček - 5.2-11 +- don't depend on xinetd anymore (#1059641) + * Sun Aug 04 2013 Fedora Release Engineering - 5.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild