rpcbind-vl.spec 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. %{!?_initddir:%define _initddir /etc/rc.d/init.d}
  2. Name: rpcbind
  3. Version: 0.2.0
  4. Release: 5%{?_dist_release}
  5. Summary: Universal Addresses to RPC Program Number Mapper
  6. Group: System Environment/Daemons
  7. License: GPL
  8. URL: http://nfsv4.bullopensource.org
  9. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  10. Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
  11. Source1: rpcbind.init
  12. Patch100: rpcbind-0.2.0-usage-fix.patch
  13. Requires: glibc-common setup
  14. Conflicts: man-pages < 2.43-12
  15. BuildRequires: automake, autoconf, libtool
  16. BuildRequires: libtirpc-devel
  17. BuildRequires: quota
  18. BuildRequires: tcp_wrappers
  19. #BuildRequires: quota-devel
  20. #BuildRequires: tcp_wrappers-devel
  21. Requires(pre): /usr/sbin/groupadd /usr/sbin/groupdel
  22. Requires(pre): /usr/sbin/useradd /usr/sbin/userdel
  23. Requires(pre): coreutils
  24. Requires(post): /sbin/chkconfig
  25. Requires(post): /sbin/chkconfig
  26. #Provides: portmap = %{version}-%{release}
  27. Provides: portmap = 4.0-66%{_dist_release}
  28. Obsoletes: portmap <= 4.0-65.3
  29. %description
  30. The rpcbind utility is a server that converts RPC program numbers into
  31. universal addresses. It must be running on the host to be able to make
  32. RPC calls on a server on that machine.
  33. %prep
  34. %setup -q
  35. %patch100 -p1
  36. %build
  37. %ifarch s390 s390x
  38. PIE="-fPIE"
  39. %else
  40. PIE="-fpie"
  41. %endif
  42. export PIE
  43. RPCBUSR=rpc
  44. RPCBDIR=/var/lib/rpcbind
  45. CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
  46. autoreconf -fisv
  47. %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
  48. --enable-warmstarts \
  49. --with-statedir="$RPCBDIR" \
  50. --with-rpcuser="$RPCBUSR" \
  51. --enable-libwrap \
  52. --enable-debug
  53. make all
  54. %install
  55. rm -rf %{buildroot}
  56. mkdir -p %{buildroot}/sbin
  57. mkdir -p %{buildroot}/usr/sbin
  58. mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
  59. mkdir -p %{buildroot}%{_mandir}/man8
  60. mkdir -p %{buildroot}/var/lib/rpcbind
  61. install -m 755 src/rpcbind ${RPM_BUILD_ROOT}/sbin
  62. install -m 755 src/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
  63. install -m 644 man/rpcbind.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
  64. install -m 644 man/rpcinfo.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
  65. install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initddir}/rpcbind
  66. %clean
  67. rm -rf %{buildroot}
  68. %pre
  69. # Check the validity of the rpc uid and gid.
  70. # If they don't exist, create them
  71. # If they exist but are the wrong value, remove them
  72. # and recreate them with the correct value
  73. # If they exist and are the correct value do nothing
  74. rpcid=`getent passwd rpc | cut -d: -f 3`
  75. if [ -n "$rpcid" -a "$rpcid" != "32" ]; then
  76. /usr/sbin/userdel rpc 2> /dev/null || :
  77. /usr/sbin/groupdel rpc 2> /dev/null || :
  78. fi
  79. if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
  80. /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1
  81. /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
  82. -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
  83. fi
  84. %post
  85. /sbin/chkconfig --add %{name}
  86. %preun
  87. if [ $1 -eq 0 ]; then
  88. service rpcbind stop > /dev/null 2>&1
  89. /sbin/chkconfig --del %{name}
  90. /usr/sbin/userdel rpc 2>/dev/null || :
  91. /usr/sbin/groupdel rpc 2>/dev/null || :
  92. rm -rf /var/lib/rpcbind
  93. fi
  94. %postun
  95. if [ "$1" -ge "1" ]; then
  96. service rpcbind condrestart > /dev/null 2>&1
  97. fi
  98. %files
  99. %defattr(-,root,root)
  100. %doc AUTHORS ChangeLog README
  101. /sbin/rpcbind
  102. %{_sbindir}/rpcinfo
  103. %{_mandir}/man8/*
  104. %config %{_initddir}/rpcbind
  105. %dir %attr(700,rpc,rpc) /var/lib/rpcbind
  106. %changelog
  107. * Sun Feb 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.2.0-5
  108. - Initial build for Vine Linux
  109. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
  110. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  111. * Mon Jul 06 2009 Adam Jackson <ajax@redhat.com> 0.2.0-3
  112. - Requires(pre): coreutils for cut(1).
  113. * Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2
  114. - Fixed pre scriptle failure during upgrades (bz 507364)
  115. - Corrected the usage info to match what the rpcbind man
  116. page says. (bz 466332)
  117. - Correct package issues (bz 503508)
  118. * Fri May 29 2009 Steve Dickson <steved@redhat.com> - 0.2.0-1
  119. - Updated to latest upstream release: 0.2.0
  120. * Tue May 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.7-3
  121. - Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems
  122. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2
  123. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  124. * Wed Nov 19 2008 Steve Dickson <steved@redhat.com> 0.1.7-1
  125. - Update to latest upstream release: 0.1.7
  126. * Tue Sep 30 2008 Steve Dickson <steved@redhat.com> 0.1.6-3
  127. - Fixed a typo in the rpcbind.init script that stop warm starts
  128. from happening with conrestarts
  129. - Fixed scriptlet failure (bz 462533)
  130. * Tue Sep 16 2008 Steve Dickson <steved@redhat.com> 0.1.6-2
  131. - Added usptream patches 01 thru 03 that do:
  132. * Introduce helpers for ipprot/netid mapping
  133. * Change how we decide on the netids to use for portmap
  134. * Simplify port live check in pmap_svc.c
  135. * Wed Jul 9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1
  136. - Updated to latest upstream release 0.1.6
  137. * Wed Jul 2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5
  138. - Fixed SYNOPSIS section in the rpcinfo man page (bz 453729)
  139. * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4
  140. - Removed the documentation about the non-existent
  141. '-L' flag (bz 446915)
  142. * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3
  143. - Set password and service lookups to be local (bz 447092)
  144. * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2
  145. - rpcbind needs to downgrade to non-priviledgied group.
  146. * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
  147. - Updated to latest upstream release 0.1.5
  148. * Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
  149. - Fixed a warning in pmap_svc.c
  150. - Cleaned up warmstarts so uid are longer needed, also
  151. changed condrestarts to use warmstarts. (bz 428496)
  152. * Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13
  153. - Fixed connectivity with Mac OS clients by making sure handle_reply()
  154. sets the correct fromlen in its recvfrom() call (bz 244492)
  155. * Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12
  156. - Changed is_loopback() and check_access() see if the calling
  157. address is an address on a local interface, just not a loopback
  158. address (bz 358621).
  159. * Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11
  160. - Reworked logic in initscript so the correct exit is
  161. used when networking does not exist or is set up
  162. incorrectly.
  163. * Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10
  164. - Corrected a typo in the initscript from previous
  165. commit.
  166. * Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9
  167. - Fixed typo in Summary (bz 331811)
  168. - Corrected init script (bz 247046)
  169. * Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
  170. - Fixed typo in init script (bz 248285)
  171. - Added autoconf rules to turn on secure host checking
  172. via libwrap. Also turned on host check by default (bz 248284)
  173. - Changed init script to start service in runlevel 2 (bz 251568)
  174. - Added a couple missing Requires(pre) (bz 247134)
  175. * Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7
  176. - Fixed condrestarts (bz 241332)
  177. * Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6
  178. - Fixed an ipv6 related segfault on startup (bz 240873)
  179. * Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5
  180. - Added dependency on setup which contains the correct
  181. rpcbind /etc/service entry which in turns stops
  182. rpcbind from haning when NIS is enabled. (bz 236865)
  183. * Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
  184. - change man-pages requires into a conflicts as we don't have to have
  185. man-pages installed, but if we do, we need the newer version
  186. * Fri Apr 6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3
  187. - Fixed the Provides and Obsoletes statments to correctly
  188. obsolete the portmap package.
  189. * Tue Apr 3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
  190. - Added dependency on glibc-common which allows the
  191. rpcinfo command to be installed in the correct place.
  192. - Added dependency on man-pages so the rpcinfo man
  193. pages don't conflict.
  194. - Added the creation of /var/lib/rpcbind which will be
  195. used to store state files.
  196. - Make rpcbind run with the 'rpc' uid/gid when it exists.
  197. * Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
  198. - Initial commit
  199. - Spec reviewed (bz 228894)
  200. - Added the Provides/Obsoletes which should
  201. cause rpcbind to replace portmapper