rpms/rpcbind/F-11 rpcbind-0.2.0-usage-fix.patch, NONE, 1.1 rpcbind.spec, 1.40, 1.41
Steve Dickson
steved at fedoraproject.org
Thu Jun 25 14:45:04 UTC 2009
Author: steved
Update of /cvs/pkgs/rpms/rpcbind/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31408
Modified Files:
rpcbind.spec
Added Files:
rpcbind-0.2.0-usage-fix.patch
Log Message:
- 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)
rpcbind-0.2.0-usage-fix.patch:
--- NEW FILE rpcbind-0.2.0-usage-fix.patch ---
commit c5e04d3ef1b4d9a24741dc865aaa55b07fe3c89f
Author: Steve Dickson <steved at redhat.com>
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 <steved at redhat.com>
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);
}
}
Index: rpcbind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpcbind/F-11/rpcbind.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -p -r1.40 -r1.41
--- rpcbind.spec 29 May 2009 17:16:46 -0000 1.40
+++ rpcbind.spec 25 Jun 2009 14:44:33 -0000 1.41
@@ -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}-%{ve
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_R
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 <steved at redhat.com> 0.2.0-1
+* Thu Jun 25 2009 Steve Dickson <steved at redhat.com> 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 <steved at redhat.com> 0.2.0-1
- Updated to latest upstream release: 0.2.0
-* Tue May 19 2009 Tom "spot" Callaway <tcallawa at redhat.com> - 0.1.7-3
+* Tue May 19 2009 Tom "spot" Callaway <tcallawa at redhat.com> 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 <rel-eng at lists.fedoraproject.org> - 0.1.7-2
More information about the fedora-extras-commits
mailing list