tftp-vl.spec 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. %bcond_with readline
  2. Name: tftp
  3. Version: 5.2
  4. Release: 1%{?_dist_release}
  5. Summary: The client for the Trivial File Transfer Protocol (TFTP).
  6. Summary(ja): TFTP (Trivial File Transfer Protocol) クライアント
  7. License: BSD
  8. Group: Applications/Internet
  9. URL: http://www.kernel.org/pub/software/network/tftp/
  10. Source: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2
  11. Patch0: tftp-0.40-remap.patch
  12. Patch2: tftp-hpa-0.39-tzfix.patch
  13. Patch3: tftp-0.42-tftpboot.patch
  14. Patch4: tftp-0.49-chk_retcodes.patch
  15. Patch5: tftp-hpa-0.49-fortify-strcpy-crash.patch
  16. Patch6: tftp-0.49-cmd_arg.patch
  17. Patch7: tftp-hpa-0.49-stats.patch
  18. Patch8: tftp-hpa-5.2-pktinfo.patch
  19. Patch9: tftp-doc.patch
  20. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  21. BuildRequires: autoconf
  22. %if %{with readline}
  23. BuildRequires: readline-devel
  24. %endif
  25. BuildRequires: sed
  26. BuildRequires: tcp_wrappers
  27. %description
  28. The Trivial File Transfer Protocol (TFTP) is normally used only for
  29. booting diskless workstations. The tftp package provides the user
  30. interface for TFTP, which allows users to transfer files to and from a
  31. remote machine. This program and TFTP provide very little security,
  32. and should not be enabled unless it is expressly needed.
  33. %description -l ja
  34. TFTP (Trivial File Transfer Protocol) は通常
  35. ディスクレスワークステーションの起動時にのみ使われます。
  36. tftp パッケージはこの TFTP のインタフェースを提供し、リモート機から
  37. ファイルを転送することが出来ます。このプログラムと TFTP は
  38. セキュリティ面に於いて非常に弱いので、どうしても必要な場合以外は
  39. 使わない方が良いでしょう。
  40. %package server
  41. Group: System Environment/Daemons
  42. Summary: The server for the Trivial File Transfer Protocol (TFTP).
  43. Summary(ja): TFTP (Trivial File Transfer Protocol) サーバ
  44. Requires: xinetd
  45. %description server
  46. The Trivial File Transfer Protocol (TFTP) is normally used only for
  47. booting diskless workstations. The tftp-server package provides the
  48. server for TFTP, which allows users to transfer files to and from a
  49. remote machine. TFTP provides very little security, and should not be
  50. enabled unless it is expressly needed. The TFTP server is run from
  51. %{_sysconfdir}/xinetd.d/tftp, and is disabled by default.
  52. %description server -l ja
  53. TFTP (Trivial File Transfer Protocol) は通常
  54. ディスクレスワークステーションの起動時にのみ使われます。
  55. tftp-server パッケージには TFTP のサーバプログラムが収められており、
  56. リモート機間とのファイル転送を可能にします。このプログラムと TFTP は
  57. セキュリティ面に於いて非常に弱いので、どうしても必要な場合以外は
  58. 使わない方が良いでしょう。TFTP サーバは /etc/xinetd.d/tftp から起動され、
  59. デフォルトでは オフにされています。
  60. %prep
  61. %setup -q -n tftp-hpa-%{version}
  62. %patch0 -p1 -b .zero
  63. %patch2 -p1 -b .tzfix
  64. %patch3 -p1 -b .tftpboot
  65. %patch4 -p1 -b .chk_retcodes
  66. %patch5 -p1 -b .fortify-strcpy-crash
  67. %patch6 -p1 -b .cmd_arg
  68. %patch7 -p1 -b .stats
  69. %patch8 -p1 -b .pktinfo
  70. %patch9 -p1 -b .doc
  71. %build
  72. autoreconf
  73. %configure \
  74. %if %{without readline}
  75. --without-readline \
  76. %endif
  77. ;
  78. make %{?_smp_mflags}
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
  82. mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,8}
  83. mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
  84. mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tftpboot
  85. make INSTALLROOT=${RPM_BUILD_ROOT} SBINDIR=%{_sbindir} MANDIR=%{_mandir} INSTALL='install -p' install
  86. install -m755 -d -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/ ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tftpboot
  87. sed -e 's:/var:%{_localstatedir}:' -e 's:/usr/sbin:%{_sbindir}:' \
  88. tftp-xinetd > ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/tftp
  89. touch -r tftp-xinetd ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/tftp
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT
  92. %post server
  93. /sbin/service xinetd reload > /dev/null 2>&1 || :
  94. %postun server
  95. if [ $1 = 0 ]; then
  96. /sbin/service xinetd reload > /dev/null 2>&1 || :
  97. fi
  98. %files
  99. %defattr(-,root,root,-)
  100. %doc README README.security CHANGES
  101. %{_bindir}/tftp
  102. %{_mandir}/man1/*
  103. %files server
  104. %defattr(-,root,root,-)
  105. %doc README README.security CHANGES
  106. %config(noreplace) %{_sysconfdir}/xinetd.d/tftp
  107. %dir %{_localstatedir}/lib/tftpboot
  108. %{_sbindir}/in.tftpd
  109. %{_mandir}/man8/*
  110. %changelog
  111. * Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.2-1
  112. - updated to 5.2
  113. - built without readline to avoid GPL infection
  114. - added Patch8 and 9 from Fedora
  115. * Fri Apr 19 2013 Jan Synáček <jsynacek@redhat.com> - 5.2-8
  116. - documentation fixes
  117. * Wed Jan 04 2012 Jiri Skala <jskala@redhat.com> - 5.2-2
  118. - fixes #739534 - TFTP to an IP alias of FC15 tftp server failed
  119. * Sat Mar 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.49-2
  120. - Fixed Requires on server subpackage (s/inetd/xinetd)
  121. * Sat Mar 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.49-1
  122. - updated to 0.49; patches added and revised based on Fedora 0.49-8
  123. - restored the config file for xinetd
  124. - s/BuildPreReq/BuildRequires/
  125. * Sun Oct 12 2008 Shu KONNO <owa@bg.wakwak.com> 0.42-4vl5
  126. - applied new versioning policy, spec in utf-8
  127. * Sat Apr 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.42-3vl1
  128. - rebuilt with readline 5.1
  129. - new upstream release
  130. - added patches from Fedora
  131. * Mon Apr 10 2006 Radek Vok叩l <rvokal@redhat.com> 0.42-3
  132. - show localtime instead of GMT (#172274)
  133. * Wed Mar 22 2006 Radek Vok叩l <rvokal@redhat.com> 0.42-2
  134. - fix double free error when hitting ^C (#186201)
  135. * Sat May 28 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.40-6vl1
  136. - updated to 0.40 based on Fedora
  137. * Tue Apr 19 2005 Radek Vokal <rvokal@redhat.com> 0.40-6
  138. - fix remap rules convert error <pjones@redhat.com>
  139. - changed tftp Group
  140. * Thu Jul 24 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.33-2vl1
  141. - updated to 0.33
  142. - rebuild with new toolchains
  143. - s/Copyright/License/
  144. - add BuildPreReq on tcp_wrappers (based on Rawhide)
  145. * Wed Jan 10 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  146. - 0.16-5vl1
  147. - use better macros (%%{_bindir},%%{_sbindir},%%{_mandir})
  148. - added Japanese summary and description
  149. * Fri Feb 11 2000 Bill Nottingham <notting@redhat.com>
  150. - fix description
  151. * Wed Feb 9 2000 Jeff Johnson <jbj@redhat.com>
  152. - compress man pages (again).
  153. * Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
  154. - man pages are compressed
  155. - fix description and summary
  156. * Tue Jan 4 2000 Bill Nottingham <notting@redhat.com>
  157. - split client and server
  158. * Tue Dec 21 1999 Jeff Johnson <jbj@redhat.com>
  159. - update to 0.16.
  160. * Sat Aug 28 1999 Jeff Johnson <jbj@redhat.com>
  161. - update to 0.15.
  162. * Wed Apr 7 1999 Jeff Johnson <jbj@redhat.com>
  163. - tftpd should truncate file when overwriting (#412)
  164. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  165. - auto rebuild in the new build environment (release 22)
  166. * Mon Mar 15 1999 Jeff Johnson <jbj@redhat.com>
  167. - compile for 6.0.
  168. * Fri Aug 7 1998 Jeff Johnson <jbj@redhat.com>
  169. - build root
  170. * Mon Apr 27 1998 Prospector System <bugs@redhat.com>
  171. - translations modified for de, fr, tr
  172. * Mon Sep 22 1997 Erik Troan <ewt@redhat.com>
  173. - added check for getpwnam() failure
  174. * Tue Jul 15 1997 Erik Troan <ewt@redhat.com>
  175. - initial build