rpcbind-vl.spec 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. %{!?_initddir:%define _initddir /etc/rc.d/init.d}
  2. Name: rpcbind
  3. Version: 0.2.1
  4. Release: 1%{?_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. Requires: glibc-common setup
  13. Conflicts: man-pages < 2.43-12
  14. BuildRequires: automake, autoconf, libtool
  15. BuildRequires: libtirpc-devel
  16. BuildRequires: quota
  17. BuildRequires: tcp_wrappers
  18. #BuildRequires: quota-devel
  19. #BuildRequires: tcp_wrappers-devel
  20. Requires(pre): /usr/sbin/groupadd /usr/sbin/groupdel
  21. Requires(pre): /usr/sbin/useradd /usr/sbin/userdel
  22. Requires(pre): coreutils
  23. Requires(post): /sbin/chkconfig
  24. Requires(post): /sbin/chkconfig
  25. #Provides: portmap = %{version}-%{release}
  26. Provides: portmap = 4.0-66%{_dist_release}
  27. Obsoletes: portmap <= 4.0-65.3
  28. Vendor: Project Vine
  29. Distribution: Vine Linux
  30. %description
  31. The rpcbind utility is a server that converts RPC program numbers into
  32. universal addresses. It must be running on the host to be able to make
  33. RPC calls on a server on that machine.
  34. %prep
  35. %setup -q
  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 rpcbind ${RPM_BUILD_ROOT}/sbin
  62. install -m 755 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. * Mon Nov 23 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.2.1-1
  108. - update to 0.2.1
  109. - remove Patch100
  110. * Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.2.0-6
  111. - rebuild with VineSeed environment
  112. * Sun Feb 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.2.0-5
  113. - Initial build for Vine Linux
  114. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
  115. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  116. * Mon Jul 06 2009 Adam Jackson <ajax@redhat.com> 0.2.0-3
  117. - Requires(pre): coreutils for cut(1).
  118. * Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2
  119. - Fixed pre scriptle failure during upgrades (bz 507364)
  120. - Corrected the usage info to match what the rpcbind man
  121. page says. (bz 466332)
  122. - Correct package issues (bz 503508)
  123. * Fri May 29 2009 Steve Dickson <steved@redhat.com> - 0.2.0-1
  124. - Updated to latest upstream release: 0.2.0
  125. * Tue May 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.7-3
  126. - Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems
  127. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2
  128. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  129. * Wed Nov 19 2008 Steve Dickson <steved@redhat.com> 0.1.7-1
  130. - Update to latest upstream release: 0.1.7
  131. * Tue Sep 30 2008 Steve Dickson <steved@redhat.com> 0.1.6-3
  132. - Fixed a typo in the rpcbind.init script that stop warm starts
  133. from happening with conrestarts
  134. - Fixed scriptlet failure (bz 462533)
  135. * Tue Sep 16 2008 Steve Dickson <steved@redhat.com> 0.1.6-2
  136. - Added usptream patches 01 thru 03 that do:
  137. * Introduce helpers for ipprot/netid mapping
  138. * Change how we decide on the netids to use for portmap
  139. * Simplify port live check in pmap_svc.c
  140. * Wed Jul 9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1
  141. - Updated to latest upstream release 0.1.6
  142. * Wed Jul 2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5
  143. - Fixed SYNOPSIS section in the rpcinfo man page (bz 453729)
  144. * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4
  145. - Removed the documentation about the non-existent
  146. '-L' flag (bz 446915)
  147. * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3
  148. - Set password and service lookups to be local (bz 447092)
  149. * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2
  150. - rpcbind needs to downgrade to non-priviledgied group.
  151. * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
  152. - Updated to latest upstream release 0.1.5
  153. * Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
  154. - Fixed a warning in pmap_svc.c
  155. - Cleaned up warmstarts so uid are longer needed, also
  156. changed condrestarts to use warmstarts. (bz 428496)
  157. * Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13
  158. - Fixed connectivity with Mac OS clients by making sure handle_reply()
  159. sets the correct fromlen in its recvfrom() call (bz 244492)
  160. * Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12
  161. - Changed is_loopback() and check_access() see if the calling
  162. address is an address on a local interface, just not a loopback
  163. address (bz 358621).
  164. * Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11
  165. - Reworked logic in initscript so the correct exit is
  166. used when networking does not exist or is set up
  167. incorrectly.
  168. * Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10
  169. - Corrected a typo in the initscript from previous
  170. commit.
  171. * Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9
  172. - Fixed typo in Summary (bz 331811)
  173. - Corrected init script (bz 247046)
  174. * Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
  175. - Fixed typo in init script (bz 248285)
  176. - Added autoconf rules to turn on secure host checking
  177. via libwrap. Also turned on host check by default (bz 248284)
  178. - Changed init script to start service in runlevel 2 (bz 251568)
  179. - Added a couple missing Requires(pre) (bz 247134)
  180. * Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7
  181. - Fixed condrestarts (bz 241332)
  182. * Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6
  183. - Fixed an ipv6 related segfault on startup (bz 240873)
  184. * Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5
  185. - Added dependency on setup which contains the correct
  186. rpcbind /etc/service entry which in turns stops
  187. rpcbind from haning when NIS is enabled. (bz 236865)
  188. * Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
  189. - change man-pages requires into a conflicts as we don't have to have
  190. man-pages installed, but if we do, we need the newer version
  191. * Fri Apr 6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3
  192. - Fixed the Provides and Obsoletes statments to correctly
  193. obsolete the portmap package.
  194. * Tue Apr 3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
  195. - Added dependency on glibc-common which allows the
  196. rpcinfo command to be installed in the correct place.
  197. - Added dependency on man-pages so the rpcinfo man
  198. pages don't conflict.
  199. - Added the creation of /var/lib/rpcbind which will be
  200. used to store state files.
  201. - Make rpcbind run with the 'rpc' uid/gid when it exists.
  202. * Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
  203. - Initial commit
  204. - Spec reviewed (bz 228894)
  205. - Added the Provides/Obsoletes which should
  206. cause rpcbind to replace portmapper