10665a
%global systemctl_bin /usr/bin/systemctl
10665a
%global _hardened_build 1
10665a
10665a
Summary: The client for the Trivial File Transfer Protocol (TFTP)
10665a
Name: tftp
10665a
Version: 5.2
10665a
Release: 22%{?dist}
10665a
License: BSD
10665a
Group: Applications/Internet
10665a
URL: http://www.kernel.org/pub/software/network/tftp/
10665a
Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-%{version}.tar.bz2
10665a
Source1: tftp.socket
10665a
Source2: tftp.service
10665a
10665a
Patch0: tftp-0.40-remap.patch
10665a
Patch2: tftp-hpa-0.39-tzfix.patch
10665a
Patch3: tftp-0.42-tftpboot.patch
10665a
Patch4: tftp-0.49-chk_retcodes.patch
10665a
Patch5: tftp-hpa-0.49-fortify-strcpy-crash.patch
10665a
Patch6: tftp-0.49-cmd_arg.patch
10665a
Patch7: tftp-hpa-0.49-stats.patch
10665a
Patch8: tftp-hpa-5.2-pktinfo.patch
10665a
Patch9: tftp-doc.patch
10665a
Patch10: tftp-enhanced-logging.patch
10665a
Patch11: tftp-rfc7440-windowsize.patch
10665a
Patch12: tftp-rewrite-macro.patch
10665a
10665a
BuildRequires: tcp_wrappers-devel readline-devel autoconf systemd-units
10665a
10665a
%description
10665a
The Trivial File Transfer Protocol (TFTP) is normally used only for
10665a
booting diskless workstations.  The tftp package provides the user
10665a
interface for TFTP, which allows users to transfer files to and from a
10665a
remote machine.  This program and TFTP provide very little security,
10665a
and should not be enabled unless it is expressly needed.
10665a
10665a
%package server
10665a
Group: System Environment/Daemons
10665a
Summary: The server for the Trivial File Transfer Protocol (TFTP)
10665a
Requires: systemd-units
10665a
Requires(post): systemd-units
10665a
Requires(postun): systemd-units
10665a
10665a
%description server
10665a
The Trivial File Transfer Protocol (TFTP) is normally used only for
10665a
booting diskless workstations.  The tftp-server package provides the
10665a
server for TFTP, which allows users to transfer files to and from a
10665a
remote machine. TFTP provides very little security, and should not be
10665a
enabled unless it is expressly needed.
10665a
10665a
%prep
10665a
%setup -q -n tftp-hpa-%{version} 
10665a
%patch0 -p1 -b .zero
10665a
%patch2 -p1 -b .tzfix
10665a
%patch3 -p1 -b .tftpboot
10665a
%patch4 -p1 -b .chk_retcodes
10665a
%patch5 -p1 -b .fortify-strcpy-crash
10665a
%patch6 -p1 -b .cmd_arg
10665a
%patch7 -p1 -b .stats
10665a
%patch8 -p1 -b .pktinfo
10665a
%patch9 -p1 -b .doc
10665a
%patch10 -p1 -b .logging
10665a
%patch11 -p1 -b .windowsize
10665a
%patch12 -p1 -b .rewrite-macro
10665a
10665a
%build
10665a
autoreconf
10665a
%configure
10665a
make %{?_smp_mflags}
10665a
10665a
%install
10665a
rm -rf ${RPM_BUILD_ROOT}
10665a
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
10665a
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,8}
10665a
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
10665a
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tftpboot
10665a
mkdir -p ${RPM_BUILD_ROOT}%{_unitdir}
10665a
10665a
make INSTALLROOT=${RPM_BUILD_ROOT} SBINDIR=%{_sbindir} MANDIR=%{_mandir} INSTALL='install -p' install
10665a
install -m755 -d -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/ ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tftpboot
10665a
sed -e 's:/var:%{_localstatedir}:' -e 's:/usr/sbin:%{_sbindir}:' \
10665a
 tftp-xinetd > ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/tftp
10665a
touch -r tftp-xinetd ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/tftp
10665a
10665a
install -p -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_unitdir}
10665a
install -p -m 644 %SOURCE2 ${RPM_BUILD_ROOT}%{_unitdir}
10665a
10665a
%post server
10665a
%systemd_post tftp.socket
10665a
10665a
%preun server
10665a
%systemd_preun tftp.socket
10665a
10665a
%postun server
10665a
%systemd_postun_with_restart tftp.socket
10665a
10665a
10665a
%clean
10665a
rm -rf ${RPM_BUILD_ROOT}
10665a
10665a
%files
10665a
%doc README README.security CHANGES
10665a
%{_bindir}/tftp
10665a
%{_mandir}/man1/*
10665a
10665a
%files server
10665a
%doc README README.security CHANGES
10665a
%config(noreplace) %{_sysconfdir}/xinetd.d/tftp
10665a
%dir %{_localstatedir}/lib/tftpboot
10665a
%{_sbindir}/in.tftpd
10665a
%{_mandir}/man8/*
10665a
%{_unitdir}/*
10665a
10665a
%changelog
10665a
* Wed Feb  7 2018 Jan Synáček <jsynacek@redhat.com> - 5.2-22
10665a
- re: implement RFC7440 TFTP Windowsize Option (#1328827)
10665a
10665a
* Wed Feb  7 2018 Jan Synáček <jsynacek@redhat.com> - 5.2-21
10665a
- re: implement RFC7440 TFTP Windowsize Option (#1328827)
10665a
10665a
* Tue Jan 23 2018 Jan Synáček <jsynacek@redhat.com> - 5.2-20
10665a
- re: implement RFC7440 TFTP Windowsize Option (#1328827)
10665a
10665a
* Tue Jan  9 2018 Jan Synáček <jsynacek@redhat.com> - 5.2-19
10665a
- re: implement RFC7440 TFTP Windowsize Option (#1328827)
10665a
10665a
* Tue Nov 28 2017 Jan Synáček <jsynacek@redhat.com> - 5.2-18
10665a
- re: implement RFC7440 TFTP Windowsize Option (#1328827)
10665a
10665a
* Thu Nov 16 2017 Jan Synáček <jsynacek@redhat.com> - 5.2.17
10665a
- re: implement RFC7440 TFTP Windowsize Option (#1328827)
10665a
10665a
* Mon Sep 11 2017 Jan Synáček <jsynacek@redhat.com> - 5.2-16
10665a
- inconsistent --mapfile / --map-file option spelling in manual (#1490139)
10665a
10665a
* Tue Sep  5 2017 Jan Synáček <jsynacek@redhat.com> - 5.2-15
10665a
- memory corruption in tftpd when using filename remapping (#1485943)
10665a
10665a
* Mon Aug 14 2017 Jan Synáček <jsynacek@redhat.com> - 5.2-14
10665a
- implement RFC7440 TFTP Windowsize Option (#1328827)
10665a
10665a
* Wed Mar  2 2016 Jan Synáček <jsynacek@redhat.com> - 5.2-13
10665a
- enhance in.tftpd logging capabilities (#1311092)
10665a
10665a
* Tue Apr 28 2015 Jan Synáček <jsynacek@redhat.com> - 5.2-12
10665a
- remove unnecessary installation dependency on xinetd(#1136866)
10665a
- improve systemd unit files(#1167777)
10665a
10665a
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 5.2-11
10665a
- Mass rebuild 2014-01-24
10665a
10665a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 5.2-10
10665a
- Mass rebuild 2013-12-27
10665a
10665a
* Tue Apr 23 2013 Jan Synáček <jsynacek@redhat.com> - 5.2-9
10665a
- harden the package (#955197)
10665a
10665a
* Fri Apr 19 2013 Jan Synáček <jsynacek@redhat.com> - 5.2-8
10665a
- documentation fixes
10665a
10665a
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2-7
10665a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
10665a
10665a
* Wed Aug 22 2012 Jan Synáček <jsynacek@redhat.com> - 5.2-6
10665a
- add systemd-rpm macros
10665a
- Resolves: #850338
10665a
10665a
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2-5
10665a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
10665a
10665a
* Thu Jul 19 2012 Jan Synáček <jsynacek@redhat.com> - 5.2.4
10665a
- make fedora-review-friendly
10665a
10665a
* Wed Jul 18 2012 Jan Synáček <jsynacek@redhat.com> - 5.2-4
10665a
- update spec: fix Source0
10665a
10665a
* Wed May 30 2012 Jan Synáček <jsynacek@redhat.com> - 5.2-4
10665a
- use systemd instead of xinetd as a default
10665a
10665a
* Tue May 22 2012 Jan Synáček <jsynacek@redhat.com> - 5.2-3
10665a
- provide native systemd service files
10665a
- Resolves: #737212
10665a
10665a
* Wed Jan 04 2012 Jiri Skala <jskala@redhat.com> - 5.2-2
10665a
- fixes #739534 - TFTP to an IP alias of FC15 tftp server failed
10665a
10665a
* Wed Dec 14 2011 Jiri Skala <jskala@redhat.com> - 5.2-1
10665a
- updated to latest upstream - 5.2
10665a
10665a
* Thu Oct 06 2011 Jiri Skala <jskala@redhat.com> - 5.1-1
10665a
- updated to latest upstream - 5.1
10665a
10665a
* Mon Jun 20 2011 Jiri Skala <jskala@redhat.com> - 0.49-9
10665a
- fixes #714261 - CVE-2011-2199: buffer overflow when setting utimeout option
10665a
10665a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.49-8
10665a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
10665a
10665a
* Mon Jan 03 2011 Jiri Skala <jskala@redhat.com> - 0.49-7
10665a
- fixes #666746 - Packaging mistake: confusing %doc files patched+unpatched
10665a
- fixes printing statistics using -v option
10665a
10665a
* Fri May 28 2010 Jiri Skala <jskala@redhat.com> - 0.49-6
10665a
- patched handling arguments of commands (put)
10665a
10665a
* Wed Aug 05 2009 Warren Togami <wtogami@redhat.com> - 0.49-5
10665a
- Bug #515361 tftp FORTIFY_SOURCE strcpy crash 
10665a
10665a
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.49-4
10665a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
10665a
10665a
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.49-3
10665a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
10665a
10665a
* Thu Jan 15 2009 Jiri Skala <jskala@redhat.com> - 0.49-2
10665a
- #473487 - unchecked return values
10665a
10665a
* Tue Nov 25 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.49-1
10665a
- update to 0.49
10665a
10665a
* Wed May 21 2008 Warren Togami 
10665a
- undo symlink stuff completely because they are problematic
10665a
  See Bug #447135 for details.
10665a
10665a
* Wed May 21 2008 Martin Nagy <mnagy@redhat.com> - 0.48-5
10665a
- fix troubles caused by added symlink
10665a
10665a
* Tue May 20 2008 Martin Nagy <mnagy@redhat.com> - 0.48-4
10665a
- add symlink to /var/lib/tftpboot
10665a
10665a
* Mon Mar 03 2008 Martin Nagy <mnagy@redhat.com> - 0.48-3
10665a
- changed description (#234099)
10665a
10665a
* Mon Feb 11 2008 Martin Nagy <mnagy@redhat.com> - 0.48-2
10665a
- rebuild for gcc-4.3
10665a
10665a
* Tue Jan 22 2008 Martin Nagy <mnagy@redhat.com> - 0.48-1
10665a
- upgrade to 0.48
10665a
- remove the old sigjmp patch (fixed in upstream)
10665a
- make some changes in spec file (#226489)
10665a
10665a
* Tue Jan 22 2008 Martin Nagy <mnagy@redhat.com> - 0.42-6
10665a
- changed the location of tftpboot directory to /var/lib/
10665a
10665a
* Fri Aug 31 2007 Maros Barabas <mbarabas@redhat.com> - 0.42-5
10665a
- rebuild
10665a
10665a
* Mon Feb 19 2007 Maros Barabas <mbarabas@redhat.com> - 0.42-4
10665a
- make some changes in spec file (review)
10665a
- Resolves #226489
10665a
10665a
* Mon Dec 04 2006 Maros Barabas <mbarabas@redhat.com> - 0.42-3.2
10665a
- change BuildRequires from tcp_wrappers to tcp_wrappers-devel
10665a
10665a
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.42-3.1
10665a
- rebuild
10665a
10665a
* Mon Apr 10 2006 Radek Vokál <rvokal@redhat.com> 0.42-3
10665a
- show localtime instead of GMT (#172274)
10665a
10665a
* Wed Mar 22 2006 Radek Vokál <rvokal@redhat.com> 0.42-2
10665a
- fix double free error when hitting ^C (#186201)
10665a
10665a
* Wed Feb 22 2006 Radek Vokál <rvokal@redhat.com> 0.42-1
10665a
- upgrade to 0.42
10665a
10665a
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.41-1.2.1
10665a
- bump again for double-long bug on ppc(64)
10665a
10665a
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.41-1.2
10665a
- rebuilt for new gcc4.1 snapshot and glibc changes
10665a
10665a
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
10665a
- rebuilt
10665a
10665a
* Thu Nov 03 2005 Radek Vokal <rvokal@redhat.com> 0.41-1
10665a
- upstream update (patterns fixes)
10665a
10665a
* Tue Apr 19 2005 Radek Vokal <rvokal@redhat.com> 0.40-6
10665a
- fix remap rules convert error <pjones@redhat.com>
10665a
10665a
* Wed Mar 23 2005 Radek Vokal <rvokal@redhat.com> 0.40-5
10665a
- use tftp-xinetd from tarball (#143589)
10665a
10665a
* Fri Mar 04 2005 Radek Vokal <rvokal@redhat.com> 0.40-4
10665a
- gcc4 rebuilt
10665a
10665a
* Sun Feb 27 2005 Florian La Roche <laroche@redhat.com>
10665a
- Copyright: -> License
10665a
10665a
* Wed Jan 12 2005 Tim Waugh <twaugh@redhat.com> 0.40-2
10665a
- Rebuilt for new readline.
10665a
10665a
* Mon Nov 15 2004 Radek Vokal <rvokal@redhat.com> 0.40-1
10665a
- Update to new upstream version, fixes #139328
10665a
10665a
* Mon Sep 13 2004 Elliot Lee <sopwith@redhat.com> 0.39-1
10665a
- Update to new version makes tftp work, says upstream.
10665a
- Remove malta patch
10665a
10665a
* Mon Sep 13 2004 Elliot Lee <sopwith@redhat.com> 0.38-1
10665a
- Update to new version fixes #131736
10665a
10665a
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
10665a
- rebuilt
10665a
10665a
* Thu Jun 03 2004 Elliot Lee <sopwith@redhat.com> 0.36-1
10665a
- Update version
10665a
10665a
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
10665a
- rebuilt
10665a
10665a
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
10665a
- rebuilt
10665a
10665a
* Fri Apr 11 2003 Elliot Lee <sopwith@redhat.com>
10665a
- 0.33
10665a
- Add /tftpboot directory (#88204)
10665a
10665a
* Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com>
10665a
- rebuilt
10665a
10665a
* Sun Feb 23 2003 Tim Powers <timp@redhat.com>
10665a
- add BuildPreReq on tcp_wrappers
10665a
10665a
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
10665a
- rebuilt
10665a
10665a
* Mon Nov 11 2002 Elliot Lee <sopwith@redhat.com> 0.32-1
10665a
- Update to 0.32
10665a
10665a
* Wed Oct 23 2002 Elliot Lee <sopwith@redhat.com> 0.30-1
10665a
- Fix #55789
10665a
- Update to 0.30
10665a
10665a
* Thu Jun 27 2002 Elliot Lee <sopwith@redhat.com>
10665a
- Try applying HJ's patch from #65476
10665a
10665a
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
10665a
- automated rebuild
10665a
10665a
* Mon Jun 17 2002 Elliot Lee <sopwith@redhat.com>
10665a
- Update to 0.29
10665a
10665a
* Thu May 23 2002 Tim Powers <timp@redhat.com>
10665a
- automated rebuild
10665a
10665a
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
10665a
- automated rebuild
10665a
10665a
* Tue Dec 18 2001 Elliot Lee <sopwith@redhat.com> 0.17-15
10665a
- Add patch4: netkit-tftp-0.17-defaultport.patch for bug #57562
10665a
- Update to tftp-hpa-0.28 (bug #56131)
10665a
- Remove include/arpa/tftp.h to fix #57259
10665a
- Add resource limits in tftp-xinetd (#56722)
10665a
10665a
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
10665a
- Bump release + rebuild.
10665a
10665a
* Tue Jun 12 2001 Helge Deller <hdeller@redhat.de> (0.17-13)
10665a
- updated tftp-hpa source to tftp-hpa-0.17
10665a
- tweaked specfile with different defines for tftp-netkit and tftp-hpa version
10665a
- use hpa's tftpd.8 man page instead of the netkits one
10665a
10665a
* Mon May 07 2001 Helge Deller <hdeller@redhat.de>
10665a
- rebuilt in 7.1.x
10665a
10665a
* Wed Apr 18 2001 Helge Deller <hdeller@redhat.de>
10665a
- fix tftp client's put problems (#29529)
10665a
- update to tftp-hpa-0.16
10665a
10665a
* Wed Apr  4 2001 Jakub Jelinek <jakub@redhat.com>
10665a
- don't let configure to guess compiler, it can pick up egcs
10665a
10665a
* Thu Feb 08 2001 Helge Deller <hdeller@redhat.de>
10665a
- changed "wait" in xinetd file to "yes" (hpa-tftpd forks and exits) (#26467)
10665a
- fixed hpa-tftpd to handle files greater than 32MB (#23725)
10665a
- added "-l" flag to hpa-tftpd for file-logging (#26467)
10665a
- added description for "-l" to the man-page 
10665a
10665a
* Thu Feb 08 2001 Helge Deller <hdeller@redhat.de>
10665a
- updated tftp client to 0.17 stable (#19640),
10665a
- drop dependency on xinetd for tftp client (#25051),
10665a
10665a
* Wed Jan 17 2001 Jeff Johnson <jbj@redhat.com>
10665a
- xinetd shouldn't wait on tftp (which forks) (#23923).
10665a
10665a
* Sat Jan  6 2001 Jeff Johnson <jbj@redhat.com>
10665a
- fix to permit tftp put's (#18128).
10665a
- startup as root with chroot to /tftpboot with early reversion to nobody
10665a
  is preferable to starting as nobody w/o ability to chroot.
10665a
- %%post is needed by server, not client. Add %%postun for erasure as well.
10665a
10665a
* Wed Aug 23 2000 Nalin Dahyabhai <nalin@redhat.com>
10665a
- default to being disabled
10665a
10665a
* Thu Aug 17 2000 Jeff Johnson <jbj@redhat.com>
10665a
- correct group.
10665a
10665a
* Tue Jul 25 2000 Nalin Dahyabhai <nalin@redhat.com>
10665a
- change user from root to nobody
10665a
10665a
* Sat Jul 22 2000 Jeff Johnson <jbj@redhat.com>
10665a
- update to tftp-hpa-0.14 (#14003).
10665a
- add server_args (#14003).
10665a
- remove -D_BSD_SOURCE (#14003).
10665a
10665a
* Fri Jul 21 2000 Nalin Dahyabhai <nalin@redhat.com>
10665a
- cook up an xinetd config file for tftpd
10665a
10665a
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
10665a
- automatic rebuild
10665a
10665a
* Sun Jun 18 2000 Jeff Johnson <jbj@redhat.com>
10665a
- FHS packaging.
10665a
- update to 0.17.
10665a
10665a
* Fri May  5 2000 Matt Wilson <msw@redhat.com>
10665a
- use _BSD_SOURCE for hpa's tftpd so we get BSD signal semantics.
10665a
10665a
* Fri Feb 11 2000 Bill Nottingham <notting@redhat.com>
10665a
- fix description
10665a
10665a
* Wed Feb  9 2000 Jeff Johnson <jbj@redhat.com>
10665a
- compress man pages (again).
10665a
10665a
* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
10665a
- man pages are compressed
10665a
- fix description and summary
10665a
10665a
* Tue Jan  4 2000 Bill Nottingham <notting@redhat.com>
10665a
- split client and server
10665a
10665a
* Tue Dec 21 1999 Jeff Johnson <jbj@redhat.com>
10665a
- update to 0.16.
10665a
10665a
* Sat Aug 28 1999 Jeff Johnson <jbj@redhat.com>
10665a
- update to 0.15.
10665a
10665a
* Wed Apr  7 1999 Jeff Johnson <jbj@redhat.com>
10665a
- tftpd should truncate file when overwriting (#412)
10665a
10665a
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
10665a
- auto rebuild in the new build environment (release 22)
10665a
10665a
* Mon Mar 15 1999 Jeff Johnson <jbj@redhat.com>
10665a
- compile for 6.0.
10665a
10665a
* Fri Aug  7 1998 Jeff Johnson <jbj@redhat.com>
10665a
- build root
10665a
10665a
* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
10665a
- translations modified for de, fr, tr
10665a
10665a
* Mon Sep 22 1997 Erik Troan <ewt@redhat.com>
10665a
- added check for getpwnam() failure
10665a
10665a
* Tue Jul 15 1997 Erik Troan <ewt@redhat.com>
10665a
- initial build