parent
083423c33b
commit
15a26fcde8
6
tftp.service
Normal file
6
tftp.service
Normal file
@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Tftp Server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot
|
||||
StandardInput=socket
|
||||
8
tftp.socket
Normal file
8
tftp.socket
Normal file
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Tftp Server Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenDatagram=69
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
23
tftp.spec
23
tftp.spec
@ -1,11 +1,13 @@
|
||||
Summary: The client for the Trivial File Transfer Protocol (TFTP)
|
||||
Name: tftp
|
||||
Version: 5.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/Internet
|
||||
Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2
|
||||
URL: http://www.kernel.org/pub/software/network/tftp/
|
||||
Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2
|
||||
Source1: tftp.socket
|
||||
Source2: tftp.service
|
||||
|
||||
Patch0: tftp-0.40-remap.patch
|
||||
Patch2: tftp-hpa-0.39-tzfix.patch
|
||||
@ -16,7 +18,7 @@ Patch6: tftp-0.49-cmd_arg.patch
|
||||
Patch7: tftp-hpa-0.49-stats.patch
|
||||
Patch8: tftp-hpa-5.2-pktinfo.patch
|
||||
|
||||
BuildRequires: tcp_wrappers-devel readline-devel autoconf
|
||||
BuildRequires: tcp_wrappers-devel readline-devel autoconf systemd-units
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
@ -29,9 +31,9 @@ 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
|
||||
Requires(post): /sbin/service
|
||||
Requires(postun): /sbin/service
|
||||
Requires: xinetd systemd-units
|
||||
Requires(post): /sbin/service, systemd-units
|
||||
Requires(postun): /sbin/service, systemd-units
|
||||
|
||||
%description server
|
||||
The Trivial File Transfer Protocol (TFTP) is normally used only for
|
||||
@ -63,6 +65,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,8}
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
|
||||
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
|
||||
@ -70,6 +73,9 @@ 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
|
||||
/sbin/service xinetd reload > /dev/null 2>&1 || :
|
||||
|
||||
@ -94,8 +100,13 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%dir %{_localstatedir}/lib/tftpboot
|
||||
%{_sbindir}/in.tftpd
|
||||
%{_mandir}/man8/*
|
||||
%{_unitdir}/*
|
||||
|
||||
%changelog
|
||||
* Tue May 22 2012 Jan Synáček <jsynacek@redhat.com> - 5.2-3
|
||||
- provide native systemd service files
|
||||
- Resolves: #737212
|
||||
|
||||
* Wed Jan 04 2012 Jiri Skala <jskala@redhat.com> - 5.2-2
|
||||
- fixes #739534 - TFTP to an IP alias of FC15 tftp server failed
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user