diff --git a/tftp-xinetd b/tftp-xinetd deleted file mode 100644 index d04b48a..0000000 --- a/tftp-xinetd +++ /dev/null @@ -1,18 +0,0 @@ -# default: off -# description: The tftp server serves files using the trivial file transfer \ -# protocol. The tftp protocol is often used to boot diskless \ -# workstations, download configuration files to network-aware printers, \ -# and to start the installation process for some operating systems. -service tftp -{ - socket_type = dgram - protocol = udp - wait = yes - user = root - server = /usr/sbin/in.tftpd - server_args = -s /var/lib/tftpboot - disable = yes - per_source = 11 - cps = 100 2 - flags = IPv4 -} diff --git a/tftp.spec b/tftp.spec index 40944ed..cac94d5 100644 --- a/tftp.spec +++ b/tftp.spec @@ -2,15 +2,16 @@ %define nobodyuserid 65013 Name: tftp Version: 5.1 -Release: 1mamba -Summary: The client and server for the Trivial File Transfer Protocol (TFTP). +Release: 2mamba +Summary: The client and server for the Trivial File Transfer Protocol (TFTP) Group: System/Servers Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.kernel.org/pub/software/network/tftp/ Source: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2 -Source1: tftp-xinetd +Source1: tftpd-hpa.service +Source2: tftpd-hpa.socket License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -26,7 +27,6 @@ This program, and TFTP, provide very little security, and should not be enabled %package server Group: System/Servers Summary: The server for the Trivial File Transfer Protocol (TFTP). -Requires: xinetd >= 2.3.11 %description server The Trivial File Transfer Protocol (TFTP) is normally used only for booting diskless workstations. @@ -45,8 +45,8 @@ The TFTP server is run from %{_sysconfdir}/xinetd.d/tftp.%{_sysconfdir}/xinetd.d %install make INSTALLROOT=%{buildroot} install -mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d -cp %{SOURCE1} %{buildroot}%{_sysconfdir}/xinetd.d/tftpd +install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/tftpd.service +install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/tftpd.socket mkdir -p %{buildroot}/var/lib/tftpboot %clean @@ -57,6 +57,10 @@ groupadd nobody -g %{nobodygroupid} 2>/dev/null || true useradd -c nobody -u %{nobodyuserid} -d /dev/null \ -g nobody -s /bin/false nobody 2>/dev/null || true +%post +systemctl -q daemon-reload +: + %files %defattr(-,root,root) %{_bindir}/tftp @@ -64,12 +68,16 @@ useradd -c nobody -u %{nobodyuserid} -d /dev/null \ %files server %defattr(-,root,root) -%config(noreplace) %{_sysconfdir}/xinetd.d/tftpd +%{_unitdir}/tftpd.service +%{_unitdir}/tftpd.socket %{_sbindir}/in.tftpd %{_mandir}/man8/* %dir %attr(0750,nobody,nobody) %{_localstatedir}/lib/tftpboot %changelog +* Mon Jan 19 2015 Silvan Calarco 5.1-2mamba +- xinet -> systemd migration + * Fri Jun 24 2011 Automatic Build System 5.1-1mamba - automatic update by autodist diff --git a/tftpd-hpa.service b/tftpd-hpa.service new file mode 100644 index 0000000..ea39787 --- /dev/null +++ b/tftpd-hpa.service @@ -0,0 +1,8 @@ +[Unit] +Description=hpa's original TFTP daemon + +[Service] +ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot +StandardInput=socket +StandardOutput=inherit +StandardError=journal diff --git a/tftpd-hpa.socket b/tftpd-hpa.socket new file mode 100644 index 0000000..0315ed6 --- /dev/null +++ b/tftpd-hpa.socket @@ -0,0 +1,5 @@ +[Socket] +ListenDatagram=69 + +[Install] +WantedBy=sockets.target