rpcbind-vl.spec 8.4 KB

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