rpcbind/rpcbind.spec

changeset 0
4f133201e207
child 1
4667f24fe848
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/rpcbind/rpcbind.spec	Fri Mar 11 21:30:26 2011 +0100
     1.3 @@ -0,0 +1,258 @@
     1.4 +%{!?_initddir:%define _initddir /etc/rc.d/init.d}
     1.5 +
     1.6 +Name:           rpcbind
     1.7 +Version:        0.2.0
     1.8 +Release:	8%{?dist}
     1.9 +Summary:        Universal Addresses to RPC Program Number Mapper
    1.10 +Group:          System Environment/Daemons
    1.11 +License:        BSD
    1.12 +URL:            http://nfsv4.bullopensource.org
    1.13 +
    1.14 +BuildRoot:      %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
    1.15 +Source0:        http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
    1.16 +Source1: rpcbind.init
    1.17 +
    1.18 +Patch001: rpcbind-0.2.1-rc2.patch
    1.19 +
    1.20 +#Patch100: rpcbind-0.2.0-usage-fix.patch
    1.21 +#Patch101: rpcbind-0.2.0-soreuseaddr-listner.patch
    1.22 +#Patch102: rpcbind-0.2.0-nofork.patch
    1.23 +
    1.24 +Requires: glibc-common setup
    1.25 +Conflicts: man-pages < 2.43-12
    1.26 +BuildRequires: automake, autoconf, libtool
    1.27 +BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel
    1.28 +Requires(pre): /usr/sbin/groupadd  /usr/sbin/groupdel
    1.29 +Requires(pre): /usr/sbin/useradd  /usr/sbin/userdel
    1.30 +Requires(pre): coreutils
    1.31 +Requires(post): /sbin/chkconfig
    1.32 +Requires(post): /sbin/chkconfig
    1.33 +
    1.34 +Provides: portmap = %{version}-%{release}
    1.35 +Obsoletes: portmap <= 4.0-65.3
    1.36 +
    1.37 +%description
    1.38 +The rpcbind utility is a server that converts RPC program numbers into
    1.39 +universal addresses.  It must be running on the host to be able to make
    1.40 +RPC calls on a server on that machine.
    1.41 +
    1.42 +%prep
    1.43 +%setup -q
    1.44 +%patch001 -p1
    1.45 +
    1.46 +%build
    1.47 +%ifarch s390 s390x
    1.48 +PIE="-fPIE"
    1.49 +%else
    1.50 +PIE="-fpie"
    1.51 +%endif
    1.52 +export PIE
    1.53 +
    1.54 +RPCBUSR=rpc
    1.55 +RPCBDIR=/var/lib/rpcbind
    1.56 +CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
    1.57 +
    1.58 +autoreconf -fisv
    1.59 +%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
    1.60 +    --enable-warmstarts \
    1.61 +    --with-statedir="$RPCBDIR" \
    1.62 +    --with-rpcuser="$RPCBUSR" \
    1.63 +    --enable-libwrap \
    1.64 +    --enable-debug
    1.65 +
    1.66 +make all
    1.67 +
    1.68 +
    1.69 +%install
    1.70 +rm -rf %{buildroot}
    1.71 +mkdir -p %{buildroot}/sbin
    1.72 +mkdir -p %{buildroot}/usr/sbin
    1.73 +mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
    1.74 +mkdir -p %{buildroot}%{_mandir}/man8
    1.75 +mkdir -p %{buildroot}/var/lib/rpcbind
    1.76 +make DESTDIR=$RPM_BUILD_ROOT install
    1.77 +
    1.78 +mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin
    1.79 +mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
    1.80 +install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initddir}/rpcbind
    1.81 +
    1.82 +%clean
    1.83 +rm -rf %{buildroot}
    1.84 +
    1.85 +%pre
    1.86 +
    1.87 +# Check the validity of the rpc uid and gid.
    1.88 +# If they don't exist, create them
    1.89 +# If they exist but are the wrong value, remove them 
    1.90 +#   and recreate them with the correct value
    1.91 +# If they exist and are the correct value do nothing
    1.92 +rpcid=`getent passwd rpc | cut -d: -f 3`
    1.93 +if [ -n "$rpcid" -a "$rpcid" != "32" ]; then
    1.94 +	/usr/sbin/userdel  rpc 2> /dev/null || :
    1.95 +	/usr/sbin/groupdel rpc 2> /dev/null || : 
    1.96 +fi
    1.97 +if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
    1.98 +	/usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1
    1.99 +	/usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
   1.100 +    	-M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
   1.101 +fi
   1.102 +%post 
   1.103 +/sbin/chkconfig --add %{name}
   1.104 +
   1.105 +%preun
   1.106 +if [ $1 -eq 0 ]; then
   1.107 +    service rpcbind stop > /dev/null 2>&1
   1.108 +    /sbin/chkconfig --del %{name}
   1.109 +	/usr/sbin/userdel  rpc 2>/dev/null || :
   1.110 +	/usr/sbin/groupdel rpc 2>/dev/null || :
   1.111 +	rm -rf /var/lib/rpcbind
   1.112 +fi
   1.113 +%postun
   1.114 +if [ "$1" -ge "1" ]; then
   1.115 +    service rpcbind condrestart > /dev/null 2>&1
   1.116 +fi
   1.117 +
   1.118 +%files
   1.119 +%defattr(-,root,root)
   1.120 +%doc AUTHORS ChangeLog README
   1.121 +/sbin/rpcbind
   1.122 +%{_sbindir}/rpcinfo
   1.123 +%{_mandir}/man8/*
   1.124 +%config %{_initddir}/rpcbind
   1.125 +
   1.126 +%dir %attr(700,rpc,rpc) /var/lib/rpcbind
   1.127 +
   1.128 +%changelog
   1.129 +* Tue Nov 30 2010 Steve Dickson <steved@redhat.com> - 0.2.0-8
   1.130 +- Updated to the latest upstream release: rpcbind-0.2.1-rc2
   1.131 +
   1.132 +* Fri Jul 16 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.2.0-7
   1.133 +- correct license tag to BSD
   1.134 +
   1.135 +* Tue Jul 13 2010 Steve Dickson <steved@redhat.com> - 0.2.0-6
   1.136 +- Made initscript LSB compliant (bz 614193)
   1.137 +- Added no fork patch
   1.138 +
   1.139 +* Tue Jul  6 2010 Steve Dickson <steved@redhat.com> - 0.2.0-5
   1.140 +- Set SO_REUSEADDR on listening sockets (bz 597356)
   1.141 +
   1.142 +* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
   1.143 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
   1.144 +
   1.145 +* Mon Jul 06 2009 Adam Jackson <ajax@redhat.com> 0.2.0-3
   1.146 +- Requires(pre): coreutils for cut(1).
   1.147 +
   1.148 +* Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2
   1.149 +- Fixed pre scriptle failure during upgrades (bz 507364)
   1.150 +- Corrected the usage info to match what the rpcbind man
   1.151 +    page says. (bz 466332)
   1.152 +- Correct package issues (bz 503508)
   1.153 +
   1.154 +* Fri May 29 2009 Steve Dickson <steved@redhat.com> - 0.2.0-1
   1.155 +- Updated to latest upstream release: 0.2.0
   1.156 +
   1.157 +* Tue May 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.7-3
   1.158 +- Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems
   1.159 +
   1.160 +* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2
   1.161 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
   1.162 +
   1.163 +* Wed Nov 19 2008 Steve Dickson <steved@redhat.com>  0.1.7-1
   1.164 +- Update to latest upstream release: 0.1.7
   1.165 +
   1.166 +* Tue Sep 30 2008 Steve Dickson <steved@redhat.com>  0.1.6-3
   1.167 +- Fixed a typo in the rpcbind.init script that stop warm starts
   1.168 +  from happening with conrestarts
   1.169 +- Fixed scriptlet failure (bz 462533)
   1.170 +
   1.171 +* Tue Sep 16 2008 Steve Dickson <steved@redhat.com> 0.1.6-2
   1.172 +- Added usptream patches 01 thru 03 that do:
   1.173 +    * Introduce helpers for ipprot/netid mapping
   1.174 +    * Change how we decide on the netids to use for portmap
   1.175 +    * Simplify port live check in pmap_svc.c
   1.176 +
   1.177 +* Wed Jul  9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1
   1.178 +- Updated to latest upstream release 0.1.6
   1.179 +
   1.180 +* Wed Jul  2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5
   1.181 +- Fixed SYNOPSIS section in the rpcinfo man page (bz 453729)
   1.182 +
   1.183 +* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4
   1.184 +- Removed the documentation about the non-existent 
   1.185 +  '-L' flag (bz 446915)
   1.186 +
   1.187 +* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3
   1.188 +- Set password and service lookups to be local (bz 447092)
   1.189 +
   1.190 +* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2
   1.191 +- rpcbind needs to downgrade to non-priviledgied group.
   1.192 +
   1.193 +* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
   1.194 +- Updated to latest upstream release 0.1.5
   1.195 +
   1.196 +* Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
   1.197 +- Fixed a warning in pmap_svc.c
   1.198 +- Cleaned up warmstarts so uid are longer needed, also
   1.199 +  changed condrestarts to use warmstarts. (bz 428496)
   1.200 +
   1.201 +* Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13
   1.202 +- Fixed connectivity with Mac OS clients by making sure handle_reply()
   1.203 +  sets the correct fromlen in its recvfrom() call (bz 244492)
   1.204 +
   1.205 +* Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12
   1.206 +- Changed is_loopback() and check_access() see if the calling
   1.207 +  address is an address on a local interface, just not a loopback
   1.208 +  address (bz 358621).
   1.209 +
   1.210 +* Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11
   1.211 +- Reworked logic in initscript so the correct exit is 
   1.212 +  used when networking does not exist or is set up
   1.213 +  incorrectly.
   1.214 +
   1.215 +* Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10
   1.216 +- Corrected a typo in the initscript from previous 
   1.217 +  commit.
   1.218 +
   1.219 +* Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9
   1.220 +- Fixed typo in Summary (bz 331811)
   1.221 +- Corrected init script (bz 247046)
   1.222 +
   1.223 +* Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
   1.224 +- Fixed typo in init script (bz 248285)
   1.225 +- Added autoconf rules to turn on secure host checking
   1.226 +  via libwrap. Also turned on host check by default (bz 248284)
   1.227 +- Changed init script to start service in runlevel 2 (bz 251568)
   1.228 +- Added a couple missing Requires(pre) (bz 247134)
   1.229 +
   1.230 +* Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7
   1.231 +- Fixed condrestarts (bz 241332)
   1.232 +
   1.233 +* Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6
   1.234 +- Fixed an ipv6 related segfault on startup (bz 240873)
   1.235 +
   1.236 +* Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5
   1.237 +- Added dependency on setup which contains the correct
   1.238 +  rpcbind /etc/service entry which in turns stops 
   1.239 +  rpcbind from haning when NIS is enabled. (bz 236865)
   1.240 +
   1.241 +* Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
   1.242 +- change man-pages requires into a conflicts as we don't have to have 
   1.243 +  man-pages installed, but if we do, we need the newer version
   1.244 +
   1.245 +* Fri Apr  6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3
   1.246 +- Fixed the Provides and Obsoletes statments to correctly
   1.247 +  obsolete the portmap package.
   1.248 +* Tue Apr  3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
   1.249 +- Added dependency on glibc-common which allows the
   1.250 +  rpcinfo command to be installed in the correct place.
   1.251 +- Added dependency on man-pages so the rpcinfo man 
   1.252 +  pages don't conflict.
   1.253 +- Added the creation of /var/lib/rpcbind which will be
   1.254 +  used to store state files.
   1.255 +- Make rpcbind run with the 'rpc' uid/gid when it exists.
   1.256 +
   1.257 +* Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
   1.258 +- Initial commit
   1.259 +- Spec reviewed (bz 228894)
   1.260 +- Added the Provides/Obsoletes which should
   1.261 +  cause rpcbind to replace portmapper

mercurial