clausklein / rpms / tftp

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