michael@0: %{!?_initddir:%define _initddir /etc/rc.d/init.d} michael@0: michael@0: Name: rpcbind michael@0: Version: 0.2.0 michael@1: Release: 20101201 michael@0: Summary: Universal Addresses to RPC Program Number Mapper michael@1: Vendor: Europalab Software michael@1: Packager: Michael Schloh von Bennewitz michael@1: Distribution: MeeGo Thirdparty michael@0: Group: System Environment/Daemons michael@0: License: BSD michael@0: URL: http://nfsv4.bullopensource.org michael@0: michael@0: BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) michael@0: Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 michael@0: Source1: rpcbind.init michael@1: Patch0: rpcbind.patch michael@0: michael@0: Requires: glibc-common setup michael@0: Conflicts: man-pages < 2.43-12 michael@0: BuildRequires: automake, autoconf, libtool michael@0: BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel michael@0: Requires(pre): /usr/sbin/groupadd /usr/sbin/groupdel michael@0: Requires(pre): /usr/sbin/useradd /usr/sbin/userdel michael@1: Requires(pre): coreutils fastinit michael@0: Requires(post): /sbin/chkconfig michael@0: Requires(post): /sbin/chkconfig michael@0: michael@0: Provides: portmap = %{version}-%{release} michael@0: Obsoletes: portmap <= 4.0-65.3 michael@0: michael@0: %description michael@0: The rpcbind utility is a server that converts RPC program numbers into michael@0: universal addresses. It must be running on the host to be able to make michael@0: RPC calls on a server on that machine. michael@0: michael@0: %prep michael@0: %setup -q michael@1: %patch0 -p1 michael@0: michael@0: %build michael@0: %ifarch s390 s390x michael@0: PIE="-fPIE" michael@0: %else michael@0: PIE="-fpie" michael@0: %endif michael@0: export PIE michael@0: michael@0: RPCBUSR=rpc michael@0: RPCBDIR=/var/lib/rpcbind michael@0: CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`" michael@0: michael@0: autoreconf -fisv michael@0: %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \ michael@0: --enable-warmstarts \ michael@0: --with-statedir="$RPCBDIR" \ michael@0: --with-rpcuser="$RPCBUSR" \ michael@0: --enable-libwrap \ michael@0: --enable-debug michael@0: michael@0: make all michael@0: michael@0: michael@0: %install michael@0: rm -rf %{buildroot} michael@0: mkdir -p %{buildroot}/sbin michael@0: mkdir -p %{buildroot}/usr/sbin michael@0: mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d michael@0: mkdir -p %{buildroot}%{_mandir}/man8 michael@0: mkdir -p %{buildroot}/var/lib/rpcbind michael@0: make DESTDIR=$RPM_BUILD_ROOT install michael@0: michael@0: mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin michael@0: mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir} michael@0: install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initddir}/rpcbind michael@0: michael@0: %clean michael@0: rm -rf %{buildroot} michael@0: michael@0: %pre michael@0: michael@0: # Check the validity of the rpc uid and gid. michael@0: # If they don't exist, create them michael@0: # If they exist but are the wrong value, remove them michael@0: # and recreate them with the correct value michael@0: # If they exist and are the correct value do nothing michael@0: rpcid=`getent passwd rpc | cut -d: -f 3` michael@0: if [ -n "$rpcid" -a "$rpcid" != "32" ]; then michael@0: /usr/sbin/userdel rpc 2> /dev/null || : michael@0: /usr/sbin/groupdel rpc 2> /dev/null || : michael@0: fi michael@0: if [ -z "$rpcid" -o "$rpcid" != "32" ]; then michael@0: /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1 michael@0: /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \ michael@0: -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1 michael@0: fi michael@0: %post michael@0: /sbin/chkconfig --add %{name} michael@0: michael@0: %preun michael@0: if [ $1 -eq 0 ]; then michael@0: service rpcbind stop > /dev/null 2>&1 michael@0: /sbin/chkconfig --del %{name} michael@0: /usr/sbin/userdel rpc 2>/dev/null || : michael@0: /usr/sbin/groupdel rpc 2>/dev/null || : michael@0: rm -rf /var/lib/rpcbind michael@0: fi michael@0: %postun michael@0: if [ "$1" -ge "1" ]; then michael@0: service rpcbind condrestart > /dev/null 2>&1 michael@0: fi michael@0: michael@0: %files michael@0: %defattr(-,root,root) michael@0: %doc AUTHORS ChangeLog README michael@0: /sbin/rpcbind michael@0: %{_sbindir}/rpcinfo michael@0: %{_mandir}/man8/* michael@0: %config %{_initddir}/rpcbind michael@0: michael@0: %dir %attr(700,rpc,rpc) /var/lib/rpcbind michael@0: michael@0: %changelog michael@1: * Wed Dec 1 2010 Michael Schloh von Bennewitz - 0.2.0-20101201 michael@1: - Repackage for MeeGo 1.1 michael@1: michael@0: * Tue Nov 30 2010 Steve Dickson - 0.2.0-8 michael@0: - Updated to the latest upstream release: rpcbind-0.2.1-rc2 michael@0: michael@0: * Fri Jul 16 2010 Tom "spot" Callaway - 0.2.0-7 michael@0: - correct license tag to BSD michael@0: michael@0: * Tue Jul 13 2010 Steve Dickson - 0.2.0-6 michael@0: - Made initscript LSB compliant (bz 614193) michael@0: - Added no fork patch michael@0: michael@0: * Tue Jul 6 2010 Steve Dickson - 0.2.0-5 michael@0: - Set SO_REUSEADDR on listening sockets (bz 597356) michael@0: michael@0: * Sun Jul 26 2009 Fedora Release Engineering - 0.2.0-4 michael@0: - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild michael@0: michael@0: * Mon Jul 06 2009 Adam Jackson 0.2.0-3 michael@0: - Requires(pre): coreutils for cut(1). michael@0: michael@0: * Thu Jun 25 2009 Steve Dickson - 0.2.0-2 michael@0: - Fixed pre scriptle failure during upgrades (bz 507364) michael@0: - Corrected the usage info to match what the rpcbind man michael@0: page says. (bz 466332) michael@0: - Correct package issues (bz 503508) michael@0: michael@0: * Fri May 29 2009 Steve Dickson - 0.2.0-1 michael@0: - Updated to latest upstream release: 0.2.0 michael@0: michael@0: * Tue May 19 2009 Tom "spot" Callaway - 0.1.7-3 michael@0: - Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems michael@0: michael@0: * Wed Feb 25 2009 Fedora Release Engineering - 0.1.7-2 michael@0: - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild michael@0: michael@0: * Wed Nov 19 2008 Steve Dickson 0.1.7-1 michael@0: - Update to latest upstream release: 0.1.7 michael@0: michael@0: * Tue Sep 30 2008 Steve Dickson 0.1.6-3 michael@0: - Fixed a typo in the rpcbind.init script that stop warm starts michael@0: from happening with conrestarts michael@0: - Fixed scriptlet failure (bz 462533) michael@0: michael@0: * Tue Sep 16 2008 Steve Dickson 0.1.6-2 michael@0: - Added usptream patches 01 thru 03 that do: michael@0: * Introduce helpers for ipprot/netid mapping michael@0: * Change how we decide on the netids to use for portmap michael@0: * Simplify port live check in pmap_svc.c michael@0: michael@0: * Wed Jul 9 2008 Steve Dickson 0.1.6-1 michael@0: - Updated to latest upstream release 0.1.6 michael@0: michael@0: * Wed Jul 2 2008 Steve Dickson 0.1.5-5 michael@0: - Fixed SYNOPSIS section in the rpcinfo man page (bz 453729) michael@0: michael@0: * Fri Jun 27 2008 Steve Dickson 0.1.5-4 michael@0: - Removed the documentation about the non-existent michael@0: '-L' flag (bz 446915) michael@0: michael@0: * Fri Jun 27 2008 Steve Dickson 0.1.5-3 michael@0: - Set password and service lookups to be local (bz 447092) michael@0: michael@0: * Mon Jun 23 2008 Steve Dickson 0.1.5-2 michael@0: - rpcbind needs to downgrade to non-priviledgied group. michael@0: michael@0: * Mon Jun 23 2008 Steve Dickson 0.1.5-1 michael@0: - Updated to latest upstream release 0.1.5 michael@0: michael@0: * Mon Feb 11 2008 Steve Dickson 0.1.4-14 michael@0: - Fixed a warning in pmap_svc.c michael@0: - Cleaned up warmstarts so uid are longer needed, also michael@0: changed condrestarts to use warmstarts. (bz 428496) michael@0: michael@0: * Thu Jan 24 2008 Steve Dickson 0.1.4-13 michael@0: - Fixed connectivity with Mac OS clients by making sure handle_reply() michael@0: sets the correct fromlen in its recvfrom() call (bz 244492) michael@0: michael@0: * Mon Dec 17 2007 Steve Dickson 0.1.4-12 michael@0: - Changed is_loopback() and check_access() see if the calling michael@0: address is an address on a local interface, just not a loopback michael@0: address (bz 358621). michael@0: michael@0: * Wed Oct 17 2007 Steve Dickson 0.1.4-11 michael@0: - Reworked logic in initscript so the correct exit is michael@0: used when networking does not exist or is set up michael@0: incorrectly. michael@0: michael@0: * Tue Oct 16 2007 Steve Dickson 0.1.4-10 michael@0: - Corrected a typo in the initscript from previous michael@0: commit. michael@0: michael@0: * Mon Oct 15 2007 Steve Dickson 0.1.4-9 michael@0: - Fixed typo in Summary (bz 331811) michael@0: - Corrected init script (bz 247046) michael@0: michael@0: * Sat Sep 15 2007 Steve Dickson 0.1.4-8 michael@0: - Fixed typo in init script (bz 248285) michael@0: - Added autoconf rules to turn on secure host checking michael@0: via libwrap. Also turned on host check by default (bz 248284) michael@0: - Changed init script to start service in runlevel 2 (bz 251568) michael@0: - Added a couple missing Requires(pre) (bz 247134) michael@0: michael@0: * Fri May 25 2007 Steve Dickson 0.1.4-7 michael@0: - Fixed condrestarts (bz 241332) michael@0: michael@0: * Tue May 22 2007 Steve Dickson 0.1.4-6 michael@0: - Fixed an ipv6 related segfault on startup (bz 240873) michael@0: michael@0: * Wed Apr 18 2007 Steve Dickson 0.1.4-5 michael@0: - Added dependency on setup which contains the correct michael@0: rpcbind /etc/service entry which in turns stops michael@0: rpcbind from haning when NIS is enabled. (bz 236865) michael@0: michael@0: * Wed Apr 11 2007 Jeremy Katz - 0.1.4-4 michael@0: - change man-pages requires into a conflicts as we don't have to have michael@0: man-pages installed, but if we do, we need the newer version michael@0: michael@0: * Fri Apr 6 2007 Steve Dickson 0.1.4-3 michael@0: - Fixed the Provides and Obsoletes statments to correctly michael@0: obsolete the portmap package. michael@0: * Tue Apr 3 2007 Steve Dickson 0.1.4-2 michael@0: - Added dependency on glibc-common which allows the michael@0: rpcinfo command to be installed in the correct place. michael@0: - Added dependency on man-pages so the rpcinfo man michael@0: pages don't conflict. michael@0: - Added the creation of /var/lib/rpcbind which will be michael@0: used to store state files. michael@0: - Make rpcbind run with the 'rpc' uid/gid when it exists. michael@0: michael@0: * Wed Feb 21 2007 Steve Dickson 0.1.4-1 michael@0: - Initial commit michael@0: - Spec reviewed (bz 228894) michael@0: - Added the Provides/Obsoletes which should michael@0: cause rpcbind to replace portmapper