xinet -> systemd migration [release 5.1-2mamba;Mon Jan 19 2015]

This commit is contained in:
Silvan Calarco 2024-01-05 18:28:21 +01:00
parent 516d223c81
commit 8ac015428f
4 changed files with 28 additions and 25 deletions

View File

@ -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
}

View File

@ -2,15 +2,16 @@
%define nobodyuserid 65013 %define nobodyuserid 65013
Name: tftp Name: tftp
Version: 5.1 Version: 5.1
Release: 1mamba Release: 2mamba
Summary: The client and server for the Trivial File Transfer Protocol (TFTP). Summary: The client and server for the Trivial File Transfer Protocol (TFTP)
Group: System/Servers Group: System/Servers
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.kernel.org/pub/software/network/tftp/ URL: http://www.kernel.org/pub/software/network/tftp/
Source: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2 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 License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -26,7 +27,6 @@ This program, and TFTP, provide very little security, and should not be enabled
%package server %package server
Group: System/Servers Group: System/Servers
Summary: The server for the Trivial File Transfer Protocol (TFTP). Summary: The server for the Trivial File Transfer Protocol (TFTP).
Requires: xinetd >= 2.3.11
%description server %description server
The Trivial File Transfer Protocol (TFTP) is normally used only for booting diskless workstations. 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 %install
make INSTALLROOT=%{buildroot} install make INSTALLROOT=%{buildroot} install
mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/tftpd.service
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/xinetd.d/tftpd install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/tftpd.socket
mkdir -p %{buildroot}/var/lib/tftpboot mkdir -p %{buildroot}/var/lib/tftpboot
%clean %clean
@ -57,6 +57,10 @@ groupadd nobody -g %{nobodygroupid} 2>/dev/null || true
useradd -c nobody -u %{nobodyuserid} -d /dev/null \ useradd -c nobody -u %{nobodyuserid} -d /dev/null \
-g nobody -s /bin/false nobody 2>/dev/null || true -g nobody -s /bin/false nobody 2>/dev/null || true
%post
systemctl -q daemon-reload
:
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/tftp %{_bindir}/tftp
@ -64,12 +68,16 @@ useradd -c nobody -u %{nobodyuserid} -d /dev/null \
%files server %files server
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/xinetd.d/tftpd %{_unitdir}/tftpd.service
%{_unitdir}/tftpd.socket
%{_sbindir}/in.tftpd %{_sbindir}/in.tftpd
%{_mandir}/man8/* %{_mandir}/man8/*
%dir %attr(0750,nobody,nobody) %{_localstatedir}/lib/tftpboot %dir %attr(0750,nobody,nobody) %{_localstatedir}/lib/tftpboot
%changelog %changelog
* Mon Jan 19 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1-2mamba
- xinet -> systemd migration
* Fri Jun 24 2011 Automatic Build System <autodist@mambasoft.it> 5.1-1mamba * Fri Jun 24 2011 Automatic Build System <autodist@mambasoft.it> 5.1-1mamba
- automatic update by autodist - automatic update by autodist

8
tftpd-hpa.service Normal file
View File

@ -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

5
tftpd-hpa.socket Normal file
View File

@ -0,0 +1,5 @@
[Socket]
ListenDatagram=69
[Install]
WantedBy=sockets.target