forked from rpms/rpcbind
		
	- Fixed pre scriptle failure during upgrades (bz 507364)
- Corrected the usage info to match what the rpcbind man page says. (bz
    466332)
- Correct package issues (bz 503508)
			
			
This commit is contained in:
		
							parent
							
								
									a093c9598b
								
							
						
					
					
						commit
						42c9f952ef
					
				
							
								
								
									
										31
									
								
								rpcbind-0.2.0-usage-fix.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								rpcbind-0.2.0-usage-fix.patch
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,31 @@
 | 
			
		||||
commit c5e04d3ef1b4d9a24741dc865aaa55b07fe3c89f
 | 
			
		||||
Author: Steve Dickson <steved@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@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);
 | 
			
		||||
 		}
 | 
			
		||||
 	}
 | 
			
		||||
							
								
								
									
										36
									
								
								rpcbind.spec
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								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.
 | 
			
		||||
 | 
			
		||||
# 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 || : 
 | 
			
		||||
 | 
			
		||||
# Now re-add the rpc uid/gid
 | 
			
		||||
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,11 +114,17 @@ fi
 | 
			
		||||
/sbin/rpcbind
 | 
			
		||||
%{_sbindir}/rpcinfo
 | 
			
		||||
%{_mandir}/man8/*
 | 
			
		||||
%config %{_initdir}/rpcbind
 | 
			
		||||
%config %{_initddir}/rpcbind
 | 
			
		||||
 | 
			
		||||
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
 | 
			
		||||
 | 
			
		||||
%changelog
 | 
			
		||||
* Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2
 | 
			
		||||
- Fixed pre scriptle failure during upgrades (bz 507364)
 | 
			
		||||
- 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@redhat.com> - 0.2.0-1
 | 
			
		||||
- Updated to latest upstream release: 0.2.0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user