From af776a837b6e94ccf1e728c459fc0f80efe36bc6 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Jun 25 2009 14:44:33 +0000 Subject: - Fixed pre scriptle failure during upgrades (bz 475783) - Corrected the usage info to match what the rpcbind man page says. (bz 466332) - Correct package issues (bz 503508) --- diff --git a/rpcbind-0.2.0-usage-fix.patch b/rpcbind-0.2.0-usage-fix.patch new file mode 100644 index 0000000..f476686 --- /dev/null +++ b/rpcbind-0.2.0-usage-fix.patch @@ -0,0 +1,31 @@ +commit c5e04d3ef1b4d9a24741dc865aaa55b07fe3c89f +Author: Steve Dickson +Date: Thu Jun 25 08:41:29 2009 -0400 + + Corrected the usage info to match what the rpcbind man + page says. + + Signed-off-by: Steve Dickson + +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 525ffba..ddf2cfc 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -731,7 +731,7 @@ parseargs(int argc, char *argv[]) + { + int c; + oldstyle_local = 1; +- while ((c = getopt(argc, argv, "dwah:ils")) != -1) { ++ while ((c = getopt(argc, argv, "adh:ilsw")) != -1) { + switch (c) { + case 'a': + doabort = 1; /* when debugging, do an abort on */ +@@ -764,7 +764,7 @@ parseargs(int argc, char *argv[]) + break; + #endif + default: /* error */ +- fprintf(stderr, "usage: rpcbind [-Idwils]\n"); ++ fprintf(stderr, "usage: rpcbind [-adhilsw]\n"); + exit (1); + } + } diff --git a/rpcbind.spec b/rpcbind.spec index 8b0853e..892a9ee 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,8 +1,8 @@ -%{!?_initdir:%define _initdir /etc/rc.d/init.d} +%{!?_initddir:%define _initddir /etc/rc.d/init.d} Name: rpcbind Version: 0.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: GPL @@ -12,8 +12,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 Source1: rpcbind.init -Requires: glibc-common >= 2.5.90-20 -Requires: setup >= 2.6.4-1 +Patch100: rpcbind-0.2.0-usage-fix.patch + +Requires: glibc-common setup Conflicts: man-pages < 2.43-12 BuildRequires: automake, autoconf, libtool BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel @@ -32,6 +33,7 @@ RPC calls on a server on that machine. %prep %setup -q +%patch100 -p1 %build %ifarch s390 s390x @@ -68,22 +70,28 @@ install -m 755 src/rpcbind ${RPM_BUILD_ROOT}/sbin install -m 755 src/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir} install -m 644 man/rpcbind.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 install -m 644 man/rpcinfo.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 -install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initdir}/rpcbind +install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initddir}/rpcbind %clean rm -rf %{buildroot} %pre -# if the rpc uid and gid is left over from the portmapper -# remove both of them. -/usr/sbin/userdel rpc 2> /dev/null || : -/usr/sbin/groupdel rpc 2> /dev/null || : - -# Now re-add the rpc uid/gid -/usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1 -/usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \ - -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1 +# Check the validity of the rpc uid and gid. +# If they don't exist, create them +# If they exist but are the wrong value, remove them +# and recreate them with the correct value +# If they exist and are the correct value do nothing +rpcid=`getent passwd rpc | cut -d: -f 3` +if [ -n "$rpcid" -a "$rpcid" != "32" ]; then + /usr/sbin/userdel rpc 2> /dev/null || : + /usr/sbin/groupdel rpc 2> /dev/null || : +fi +if [ -z "$rpcid" -o "$rpcid" != "32" ]; then + /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1 + /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \ + -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1 +fi %post /sbin/chkconfig --add %{name} @@ -106,15 +114,21 @@ fi /sbin/rpcbind %{_sbindir}/rpcinfo %{_mandir}/man8/* -%config %{_initdir}/rpcbind +%config %{_initddir}/rpcbind %dir %attr(700,rpc,rpc) /var/lib/rpcbind %changelog -* Fri May 29 2009 Steve Dickson 0.2.0-1 +* Thu Jun 25 2009 Steve Dickson 0.2.0-2 +- Fixed pre scriptle failure during upgrades (bz 475783) +- Corrected the usage info to match what the rpcbind man + page says. (bz 466332) +- Correct package issues (bz 503508) + +* Fri May 29 2009 Steve Dickson 0.2.0-1 - Updated to latest upstream release: 0.2.0 -* Tue May 19 2009 Tom "spot" Callaway - 0.1.7-3 +* Tue May 19 2009 Tom "spot" Callaway 0.1.7-3 - Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems * Wed Feb 25 2009 Fedora Release Engineering - 0.1.7-2