portmap-vl.spec 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. %define initdir /etc/rc.d/init.d
  2. Summary: A program which manages RPC connections.
  3. Name: portmap
  4. Version: 4.0
  5. Release: 63%{?_dist_release}
  6. Group: System Environment/Daemons
  7. License: BSD
  8. Source0: ftp://coast.cs.purdue.edu/pub/tools/unix/portmap/portmap_4.tar.gz
  9. Source1: portmap.init
  10. Source2: pmap_set.8
  11. Source3: pmap_dump.8
  12. Source4: portmap.8
  13. Patch0: portmap-4.0-linux.patch
  14. Patch1: portmap-malloc.patch
  15. Patch2: portmap-4.0-cleanup.patch
  16. Patch3: portmap-4.0-rpc_user.patch
  17. Patch4: portmap-4.0-sigpipe.patch
  18. Patch5: portmap-4.0-errno.patch
  19. Patch6: portmap-4.0-pie.patch
  20. Patch7: portmap-4.0-loopback.patch
  21. Source101: portmap.init.vine
  22. #Prereq: /sbin/chkconfig /etc/init.d
  23. Prereq: /sbin/chkconfig
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  25. #Requires: initscripts >= 5.54
  26. BuildRequires: tcp_wrappers
  27. %description
  28. The portmapper program is a security tool which prevents theft of NIS
  29. (YP), NFS and other sensitive information via the portmapper. A
  30. portmapper manages RPC connections, which are used by protocols like
  31. NFS and NIS.
  32. The portmap package should be installed on any machine which acts as a
  33. server for protocols using RPC.
  34. %prep
  35. %setup -q -n portmap_4
  36. %patch0 -p1
  37. %patch1 -p1
  38. %patch2 -p1
  39. %patch3 -p1 -b .rpcuser
  40. %patch4 -p1 -b .sigpipe
  41. %patch5 -p1 -b .errno
  42. %patch6 -p1 -b .pie
  43. %patch7 -p1 -b .lo
  44. %build
  45. make FACILITY=LOG_AUTH ZOMBIES='-DIGNORE_SIGCHLD -Dlint' LIBS="-Wl,-Bstatic -lwrap -Wl,-Bdynamic -lnsl" RPM_OPT_FLAGS="$RPM_OPT_FLAGS" AUX=""
  46. %install
  47. rm -rf $RPM_BUILD_ROOT
  48. mkdir -p ${RPM_BUILD_ROOT}/sbin
  49. install -m 755 -s portmap ${RPM_BUILD_ROOT}/sbin
  50. mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
  51. install -m 755 -s pmap_set ${RPM_BUILD_ROOT}%{_sbindir}
  52. install -m 755 -s pmap_dump ${RPM_BUILD_ROOT}%{_sbindir}
  53. mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
  54. install -m 644 $RPM_SOURCE_DIR/pmap_set.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
  55. install -m 644 $RPM_SOURCE_DIR/pmap_dump.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
  56. install -m 644 $RPM_SOURCE_DIR/portmap.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
  57. mkdir -p $RPM_BUILD_ROOT%{initdir}
  58. #install -m 755 $RPM_SOURCE_DIR/portmap.init ${RPM_BUILD_ROOT}%{initdir}/portmap
  59. install -m 755 $RPM_SOURCE_DIR/portmap.init.vine ${RPM_BUILD_ROOT}%{initdir}/portmap
  60. %clean
  61. rm -rf $RPM_BUILD_ROOT
  62. %post
  63. /sbin/chkconfig --add portmap
  64. /usr/sbin/groupadd -g 32 rpc > /dev/null 2>&1
  65. /usr/sbin/useradd -c "Portmapper RPC user" -d / -g 32 -M -s /bin/false -u 32 rpc > /dev/null 2>&1
  66. exit 0
  67. %triggerpostun -- portmap <= portmap-4.0-22
  68. /sbin/chkconfig --add portmap
  69. %preun
  70. if [ $1 = 0 ] ; then
  71. service portmap stop > /dev/null 2>&1
  72. /sbin/chkconfig --del portmap
  73. fi
  74. %postun
  75. if [ "$1" -ge "1" ]; then
  76. service portmap condrestart > /dev/null 2>&1
  77. fi
  78. %files
  79. %defattr(-,root,root)
  80. %doc README CHANGES BLURB
  81. /sbin/portmap
  82. %{_sbindir}/pmap_dump
  83. %{_sbindir}/pmap_set
  84. %{_mandir}/man8/*
  85. %config %{initdir}/portmap
  86. %changelog
  87. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 4.0-63vl5
  88. - applied new versioning policy, spec in utf-8
  89. * Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-63vl2
  90. - rebuilt
  91. * Thu Nov 18 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.0-63vl1
  92. - added Patches from Fedora development
  93. * Thu Aug 12 2004 Steve Dickson <SteveD@RedHat.com>
  94. - Added the -l argument that allows only loopback bindings.
  95. * Thu Feb 12 2004 Thomas Woerner <twoerner@redhat.com> 4.0-58
  96. - added PIE patch from Ulrich Drepper
  97. - added BuildRequires: tcp_wrappers
  98. * Fri Sep 19 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.0-56vl1
  99. - rebuild with new toolchains
  100. - s/Copyright/License/
  101. - added Patch from Rawhide 4.0-56.1
  102. * Fri Dec 13 2002 Daniel J Walsh <dwalsh@redhat.com> 4.0-51
  103. - Replace extern int errno with include <errno.h>
  104. * Thu Dec 12 2002 Daniel J Walsh <dwalsh@redhat.com> 4.0-50
  105. - Change spec file to stop building auxilliary files
  106. - Fix Makefile to build correctly on x86-64
  107. - Fix strerror.c to build correctly on x86-64
  108. * Thu Aug 16 2001 <sagami@vinelinux.org>
  109. - 4.0-38vl1: install portmap.init w/o i18n support for Vine
  110. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  111. - Bump release + rebuild.
  112. * Sun Apr 29 2001 Bill Nottingham <notting@redhat.com>
  113. - fix condrestart
  114. * Fri Apr 20 2001 Trond Eivind Glomsr藷?<teg@redhat.com>
  115. - Remove "¥n" from echo statement (#36721)
  116. * Wed Feb 28 2001 Trond Eivind Glomsr藷?<teg@redhat.com>
  117. - clear group memberships (#23195)
  118. * Sun Feb 11 2001 Trond Eivind Glomsr藷?<teg@redhat.com>
  119. - don't die on SIGPIPE (#21748)
  120. - Fix condrestart so it maintains portmap state
  121. * Wed Feb 7 2001 Trond Eivind Glomsr藷?<teg@redhat.com>
  122. - improve i18n
  123. * Wed Jan 24 2001 Matt Wilson <msw@redhat.com>
  124. - new style i18n init script
  125. * Fri Jan 19 2001 Trond Eivind Glomsr藷?<teg@redhat.com>
  126. - fix manpage (#13218)
  127. - gettextize
  128. - exit if /etc/sysconfig/network doesn't exist
  129. and make sure it works when networking is off (#23757)
  130. * Tue Jan 2 2001 Bill Nottingham <notting@redhat.com>
  131. - setgid too, not just setuid (#23195)
  132. * Thu Aug 10 2000 Jeff Johnson <jbj@redhat.com>
  133. - add restart shell function (#15914).
  134. * Sun Aug 6 2000 Philipp Knirsch <pknirsch@redhat.com>
  135. - Changed the uid/gid of the rpc user to be 32/32
  136. * Fri Aug 4 2000 Philipp Knirsch <pknirsch@redhat.com>
  137. - Fixed a build warning for daemon.c (missing <stdlib.h> include)
  138. - Portmap now running under user rpc if possible (#12427)
  139. * Wed Aug 2 2000 Bill Nottingham <notting@redhat.com>
  140. - start a little later (after syslog)
  141. - do dump/reload on restart (#14612)
  142. * Thu Jul 20 2000 Bill Nottingham <notting@redhat.com>
  143. - move initscript back
  144. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  145. - automatic rebuild
  146. * Sat Jul 8 2000 Bill Nottingham <notting@redhat.com>
  147. - make trigger work on a few later versions
  148. * Tue Jun 27 2000 Than Ngo <than@redhat.de>
  149. - /etc/rc.d/init.d -> /etc/init.d
  150. - condrestart in %postun
  151. - fix initscript
  152. - add requires initscript
  153. - remove links from packaging
  154. * Tue Jun 6 2000 Jeff Johnson <jbj@redhat.com>
  155. - FHS packaging.
  156. * Wed May 10 2000 Jeff Johnson <jbj@redhat.com>
  157. - apply cleanup patch (H.J. Lu)
  158. * Mon Feb 7 2000 Jeff Johnson <jbj@redhat.com>
  159. - compress man pages.
  160. * Wed Dec 1 1999 Bill Nottingham <notting@redhat.com>
  161. - add patch to fix some malloc issues from HP
  162. * Fri Sep 10 1999 Bill Nottingham <notting@redhat.com>
  163. - chkconfig --del in %preun, not %postun
  164. * Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
  165. - initscript munging
  166. * Tue Mar 23 1999 Preston Brown <pbrown@redhat.com>
  167. - added man pages.
  168. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  169. - auto rebuild in the new build environment (release 14)
  170. * Fri Dec 18 1998 Cristian Gafton <gafton@redhat.com>
  171. - build for glibc 2.1
  172. * Tue Jul 7 1998 Jeff Johnson <jbj@redhat.com>
  173. - start/stop portmap at levels 11/89
  174. * Mon May 04 1998 Cristian Gafton <gafton@redhat.com>
  175. - fixed the trigger script
  176. * Fri May 01 1998 Jeff Johnson <jbj@redhat.com>
  177. - added triggerpostun
  178. * Fri May 01 1998 Cristian Gafton <gafton@redhat.com>
  179. - added %trigger to fix a previously broken package
  180. * Thu Apr 23 1998 Michael K. Johnson <johnsonm@redhat.com>
  181. - enhanced initscripts
  182. * Thu Jan 08 1998 Erik Troan <ewt@redhat.com>
  183. - rebuilt against glibc 2.0.6
  184. * Tue Oct 28 1997 Erik Troan <ewt@redhat.com>
  185. - fixed service name in stop section of init script
  186. * Tue Oct 21 1997 Donnie Barnes <djb@redhat.com>
  187. - fixed chkconfig support
  188. * Sun Oct 19 1997 Erik Troan <ewt@redhat.com>
  189. - added restart, status commands to init script
  190. - added chkconfig support
  191. - uses a buildroot and %attr tags
  192. * Fri Jul 18 1997 Erik Troan <ewt@redhat.com>
  193. - built against glibc