rpms/nfs-utils/devel nfs-utils-1.2.2-rc8.patch, NONE, 1.1 nfs-utils.spec, 1.263, 1.264 nfs-utils-1.2.2-rc7.patch, 1.1, NONE

Steve Dickson steved at fedoraproject.org
Sun Jan 17 22:05:22 UTC 2010


Author: steved

Update of /cvs/pkgs/rpms/nfs-utils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13992

Modified Files:
	nfs-utils.spec 
Added Files:
	nfs-utils-1.2.2-rc8.patch 
Removed Files:
	nfs-utils-1.2.2-rc7.patch 
Log Message:
- Updated to latest upstream RC release: nfs-utils-1-2-2-rc7
  which includes Ipv6 support for tcpwrapper (disabled by default).


nfs-utils-1.2.2-rc8.patch:
 b/.gitignore                           |   13 
 b/Makefile.am                          |    2 
 b/aclocal/ipv6.m4                      |    4 
 b/aclocal/libcap.m4                    |   15 
 b/configure.ac                         |   10 
 b/support/Makefile.am                  |    2 
 b/support/export/client.c              |    2 
 b/support/export/export.c              |   40 -
 b/support/export/xtab.c                |    6 
 b/support/include/Makefile.am          |    2 
 b/support/include/exportfs.h           |    9 
 b/support/include/ha-callout.h         |    4 
 b/support/include/nfs/export.h         |   13 
 b/support/include/nfsrpc.h             |   24 
 b/support/include/nsm.h                |   93 ++
 b/support/include/rpcmisc.h            |    7 
 b/support/include/sockaddr.h           |  237 +++++++
 b/support/include/tcpwrapper.h         |   12 
 b/support/include/v4root.h             |   15 
 b/support/misc/from_local.c            |  121 +++
 b/support/misc/tcpwrapper.c            |  203 +++---
 b/support/nfs/Makefile.am              |    3 
 b/support/nfs/exports.c                |  162 ++---
 b/support/nfs/getport.c                |  113 ++-
 b/support/nfs/rpc_socket.c             |   55 -
 b/support/nfs/svc_create.c             |  246 +++++++
 b/support/nsm/Makefile.am              |   45 +
 b/support/nsm/file.c                   | 1067 +++++++++++++++++++++++++++++++++
 b/support/nsm/rpc.c                    |  534 ++++++++++++++++
 b/support/nsm/sm_inter.x               |  131 ++++
 b/tests/Makefile.am                    |   13 
 b/tests/nsm_client/Makefile.am         |   45 +
 b/tests/nsm_client/README              |   12 
 b/tests/nsm_client/nlm_sm_inter.x      |   43 +
 b/tests/nsm_client/nsm_client.c        |  465 ++++++++++++++
 b/tests/statdb_dump.c                  |   99 +++
 b/tests/t0001-statd-basic-mon-unmon.sh |   58 +
 b/tests/test-lib.sh                    |   60 +
 b/utils/gssd/gssd.c                    |    6 
 b/utils/gssd/gssd.h                    |   12 
 b/utils/gssd/gssd_main_loop.c          |  102 ++-
 b/utils/gssd/gssd_proc.c               |  424 ++++++++++---
 b/utils/gssd/krb5_util.c               |   57 +
 b/utils/gssd/krb5_util.h               |    3 
 b/utils/gssd/svcgssd_proc.c            |   94 ++
 b/utils/mount/mount.c                  |    3 
 b/utils/mount/network.c                |  141 ++--
 b/utils/mount/network.h                |    5 
 b/utils/mount/nfs.man                  |  104 ++-
 b/utils/mount/nfs4mount.c              |   25 
 b/utils/mount/nfsmount.c               |    7 
 b/utils/mount/nfsumount.c              |   15 
 b/utils/mount/stropts.c                |  126 ++-
 b/utils/mountd/Makefile.am             |    2 
 b/utils/mountd/auth.c                  |  115 ++-
 b/utils/mountd/cache.c                 |  129 ++-
 b/utils/mountd/mount_dispatch.c        |    6 
 b/utils/mountd/mountd.c                |  156 ++--
 b/utils/mountd/rmtab.c                 |   30 
 b/utils/mountd/v4root.c                |  196 ++++++
 b/utils/nfsd/nfssvc.c                  |    2 
 b/utils/showmount/showmount.c          |   37 -
 b/utils/statd/Makefile.am              |   22 
 b/utils/statd/callback.c               |   78 ++
 b/utils/statd/hostname.c               |  284 ++++++++
 b/utils/statd/misc.c                   |   30 
 b/utils/statd/monitor.c                |  235 ++-----
 b/utils/statd/notlist.c                |    5 
 b/utils/statd/notlist.h                |    6 
 b/utils/statd/rmtcall.c                |  215 +-----
 b/utils/statd/simu.c                   |   37 -
 b/utils/statd/simulate.c               |   52 -
 b/utils/statd/sm-notify.c              |  885 +++++++++++----------------
 b/utils/statd/sm-notify.man            |  411 ++++++++----
 b/utils/statd/stat.c                   |   19 
 b/utils/statd/statd.c                  |  200 +-----
 b/utils/statd/statd.h                  |   39 -
 b/utils/statd/statd.man                |  505 +++++++++++----
 b/utils/statd/svc_run.c                |    7 
 utils/statd/log.c                      |   95 --
 utils/statd/log.h                      |   42 -
 utils/statd/sm_inter.x                 |  131 ----
 utils/statd/version.h                  |    7 
 83 files changed, 6675 insertions(+), 2412 deletions(-)

--- NEW FILE nfs-utils-1.2.2-rc8.patch ---
diff --git a/.gitignore b/.gitignore
index 632609e..4bff9e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,10 +55,15 @@ support/export/mount.h
 support/export/mount_clnt.c
 support/export/mount_xdr.c
 support/include/mount.h
-utils/statd/sm_inter.h
-utils/statd/sm_inter_clnt.c
-utils/statd/sm_inter_svc.c
-utils/statd/sm_inter_xdr.c
+support/nsm/sm_inter.h
+support/nsm/sm_inter_clnt.c
+support/nsm/sm_inter_svc.c
+support/nsm/sm_inter_xdr.c
+support/include/sm_inter.h
+tests/nsm_client/nlm_sm_inter.h
+tests/nsm_client/nlm_sm_inter_clnt.c
+tests/nsm_client/nlm_sm_inter_svc.c
+tests/nsm_client/nlm_sm_inter_xdr.c
 # cscope database files
 cscope.*
 # generic editor backup et al
diff --git a/Makefile.am b/Makefile.am
index b3a6e91..ae7cd16 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = tools support utils linux-nfs
+SUBDIRS = tools support utils linux-nfs tests
 
 MAINTAINERCLEANFILES = Makefile.in
 
diff --git a/aclocal/ipv6.m4 b/aclocal/ipv6.m4
index 2490f3d..5ee8fb6 100644
--- a/aclocal/ipv6.m4
+++ b/aclocal/ipv6.m4
@@ -15,8 +15,8 @@ AC_DEFUN([AC_IPV6], [
     fi
 
     dnl IPv6-enabled networking functions required for IPv6
-    AC_CHECK_FUNCS([getnameinfo bindresvport_sa], ,
-                   [AC_MSG_ERROR([Missing functions needed for IPv6.])])
+    AC_CHECK_FUNCS([getifaddrs getnameinfo bindresvport_sa], ,
+                   [AC_MSG_ERROR([Missing library functions needed for IPv6.])])
 
     dnl Need to detect presence of IPv6 networking at run time via
     dnl getaddrinfo(3); old versions of glibc do not support ADDRCONFIG
diff --git a/aclocal/libcap.m4 b/aclocal/libcap.m4
new file mode 100644
index 0000000..eabe507
--- /dev/null
+++ b/aclocal/libcap.m4
@@ -0,0 +1,15 @@
+dnl Checks for libcap.so
+dnl
+AC_DEFUN([AC_LIBCAP], [
+
+  dnl look for prctl
+  AC_CHECK_FUNC([prctl], , )
+
+  dnl look for the library; do not add to LIBS if found
+  AC_CHECK_LIB([cap], [cap_get_proc], [LIBCAP=-lcap], ,)
+  AC_SUBST(LIBCAP)
+
+  AC_CHECK_HEADERS([sys/capability.h], ,
+                   [AC_MSG_ERROR([libcap headers not found.])])
+
+])dnl
diff --git a/configure.ac b/configure.ac
index 3ad415c..1dc4249 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,6 +166,9 @@ fi
 dnl Check for TI-RPC library and headers
 AC_LIBTIRPC
 
+dnl Check for -lcap
+AC_LIBCAP
+
 # Check whether user wants TCP wrappers support
 AC_TCP_WRAPPERS
 
@@ -327,7 +330,7 @@ AC_FUNC_STAT
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
                gethostbyaddr gethostbyname gethostname getmntent \
-               getnameinfo getrpcbyname \
+               getnameinfo getrpcbyname getifaddrs \
                gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
                realpath rmdir select socket strcasecmp strchr strdup \
                strerror strrchr strtol strtoul sigprocmask])
@@ -402,6 +405,7 @@ AC_CONFIG_FILES([
 	support/include/Makefile
 	support/misc/Makefile
 	support/nfs/Makefile
+	support/nsm/Makefile
 	tools/Makefile
 	tools/locktest/Makefile
 	tools/nlmtest/Makefile
@@ -416,6 +420,8 @@ AC_CONFIG_FILES([
 	utils/nfsd/Makefile
 	utils/nfsstat/Makefile
 	utils/showmount/Makefile
-	utils/statd/Makefile])
+	utils/statd/Makefile
+	tests/Makefile
+	tests/nsm_client/Makefile])
 AC_OUTPUT
 
diff --git a/support/Makefile.am b/support/Makefile.am
index aa4d692..cb37733 100644
--- a/support/Makefile.am
+++ b/support/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = export include misc nfs
+SUBDIRS = export include misc nfs nsm
 
 MAINTAINERCLEANFILES = Makefile.in
 
diff --git a/support/export/client.c b/support/export/client.c
index 5fcf355..6236561 100644
--- a/support/export/client.c
+++ b/support/export/client.c
@@ -297,7 +297,7 @@ name_cmp(char *a, char *b)
 	/* compare strings a and b, but only upto ',' in a */
 	while (*a && *b && *a != ',' && *a == *b)
 		a++, b++;
-	if (!*b && (!*a || !a == ',') )
+	if (!*b && (!*a || *a == ','))
 		return 0;
 	if (!*b) return 1;
 	if (!*a || *a == ',') return -1;
diff --git a/support/export/export.c b/support/export/export.c
index e5e6cb0..2943466 100644
--- a/support/export/export.c
+++ b/support/export/export.c
@@ -28,6 +28,22 @@ static int	export_check(nfs_export *, struct hostent *, char *);
 static nfs_export *
 		export_allowed_internal(struct hostent *hp, char *path);
 
+static void warn_duplicated_exports(nfs_export *exp, struct exportent *eep)
+{
+	if (exp->m_export.e_flags != eep->e_flags) {
+		xlog(L_ERROR, "incompatible duplicated export entries:");
+		xlog(L_ERROR, "\t%s:%s (0x%x) [IGNORED]", eep->e_hostname,
+				eep->e_path, eep->e_flags);
+		xlog(L_ERROR, "\t%s:%s (0x%x)", exp->m_export.e_hostname,
+				exp->m_export.e_path, exp->m_export.e_flags);
+	} else {
+		xlog(L_ERROR, "duplicated export entries:");
+		xlog(L_ERROR, "\t%s:%s", eep->e_hostname, eep->e_path);
+		xlog(L_ERROR, "\t%s:%s", exp->m_export.e_hostname,
+				exp->m_export.e_path);
+	}
+}
+
 int
 export_read(char *fname)
 {
@@ -36,27 +52,13 @@ export_read(char *fname)
 
 	setexportent(fname, "r");
 	while ((eep = getexportent(0,1)) != NULL) {
-	  exp = export_lookup(eep->e_hostname, eep->e_path, 0);
-	  if (!exp)
-	    export_create(eep,0);
-	  else {
-	    if (exp->m_export.e_flags != eep->e_flags) {
-	      xlog(L_ERROR, "incompatible duplicated export entries:");
-	      xlog(L_ERROR, "\t%s:%s (0x%x) [IGNORED]", eep->e_hostname,
-		   eep->e_path, eep->e_flags);
-	      xlog(L_ERROR, "\t%s:%s (0x%x)", exp->m_export.e_hostname,
-		   exp->m_export.e_path, exp->m_export.e_flags);
-	    }
-	    else {
-	      xlog(L_ERROR, "duplicated export entries:");
-	      xlog(L_ERROR, "\t%s:%s", eep->e_hostname, eep->e_path);
-	      xlog(L_ERROR, "\t%s:%s", exp->m_export.e_hostname,
-		   exp->m_export.e_path);
-	    }
-	  }
+		exp = export_lookup(eep->e_hostname, eep->e_path, 0);
+		if (!exp)
+			export_create(eep, 0);
+		else
+			warn_duplicated_exports(exp, eep);
 	}
 	endexportent();
-
 	return 0;
 }
 
[...11763 lines suppressed...]
 .B tcp_wrapper
-library. You have to give the clients access to
-.B rpc.statd
-if they should be allowed to use it. To allow connects from clients of
-the .bar.com domain you could use the following line in /etc/hosts.allow:
-
-statd: .bar.com
-
-You have to use the daemon name 
+library, add the hostnames of peers that should be allowed access to
+.IR /etc/hosts.allow .
+Use the daemon name
 .B statd
-for the daemon name (even if the binary has a different name).
-
-For further information please have a look at the
+even if the
+.B rpc.statd
+binary has a different filename.
+.P
+For further information see the
 .BR tcpd (8)
 and
 .BR hosts_access (5)
-manual pages.
-
-.SH SIGNALS
-.BR SIGUSR1
-causes
-.B rpc.statd
-to re-read the notify list from disk
-and send notifications to clients. This can be used in High Availability NFS
-(HA-NFS) environments to notify clients to reacquire file locks upon takeover
-of an NFS export from another server.
-
+man pages.
+.SH ADDITIONAL NOTES
+Lock recovery after a reboot is critical to maintaining data integrity
+and preventing unnecessary application hangs.
+.PP
+To help
+.B rpc.statd
+match SM_NOTIFY requests to NLM requests, a number of best practices
+should be observed, including:
+.IP
+The UTS nodename of your systems should match the DNS names that NFS
+peers use to contact them
+.IP
+The UTS nodenames of your systems should always be fully qualified domain names
+.IP
+The forward and reverse DNS mapping of the UTS nodenames should be
+consistent
+.IP
+The hostname the client uses to mount the server should match the server's
+.I mon_name
+in SM_NOTIFY requests it sends
+.IP
+The use of network addresses as a
+.I mon_name
+or a
+.I my_name
+string should be avoided when
+interoperating with non-Linux NFS implementations.
+.PP
+Unmounting an NFS file system does not necessarily stop
+either the NFS client or server from monitoring each other.
+Both may continue monitoring each other for a time in case subsequent
+NFS traffic between the two results in fresh mounts and additional
+file locking.
+.PP
+On Linux, if the
+.B lockd
+kernel module is unloaded during normal operation,
+all remote NFS peers are unmonitored.
+This can happen on an NFS client, for example,
+if an automounter removes all NFS mount
+points due to inactivity.
+.SS High-availability callouts
+.B rpc.statd
+can exec a special callout program during processing of
+successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests.
+Such a program may be used in High Availability NFS (HA-NFS)
+environments to track lock state that may need to be migrated after
+a system reboot.
+.PP
+The name of the callout program is specified with the
+.B -H
+option.
+The program is run with 3 arguments:
+The first is either
+.B add-client
+or
+.B del-client
+depending on the reason for the callout.
+The second is the
+.I mon_name
+of the monitored peer.
+The third is the
+.I caller_name
+of the requesting lock manager.
+.SS IPv6 and TI-RPC support
+TI-RPC is a pre-requisite for supporting NFS on IPv6.
+If TI-RPC support is built into
+.BR rpc.statd ,
+it attempts to start listeners on network transports marked
+'visible' in
+.IR /etc/netconfig .
+As long as at least one network transport listener starts successfully,
+.B rpc.statd
+will operate.
 .SH FILES
-.BR /var/lib/nfs/state
+.TP 2.5i
+.I /var/lib/nfs/sm
+directory containing monitor list
+.TP 2.5i
+.I /var/lib/nfs/sm.bak
+directory containing notify list
+.TP 2.5i
+.I /var/lib/nfs/state
+NSM state number for this host
+.TP 2.5i
+.I /var/run/run.statd.pid
+pid file
+.TP 2.5i
+.I /etc/netconfig
+network transport capability database
+.SH SEE ALSO
+.BR sm-notify (8),
+.BR nfs (5),
+.BR rpc.nfsd (8),
+.BR rpcbind (8),
+.BR tcpd (8),
+.BR hosts_access (5),
+.BR iptables (8),
+.BR netconfig (5)
+.sp
+RFC 1094 - "NFS: Network File System Protocol Specification"
 .br
-.BR /var/lib/nfs/sm/*
+RFC 1813 - "NFS Version 3 Protocol Specification"
 .br
-.BR /var/lib/nfs/sm.bak/*
-.SH SEE ALSO
-.BR rpc.nfsd(8),
-.BR portmap(8)
+OpenGroup Protocols for Interworking: XNFS, Version 3W - Chapter 11
 .SH AUTHORS
-.br
 Jeff Uphoff <juphoff at users.sourceforge.net>
 .br
 Olaf Kirch <okir at monad.swb.de>
@@ -195,3 +404,5 @@ H.J. Lu <hjl at gnu.org>
 Lon Hohberger <hohberger at missioncriticallinux.com>
 .br
 Paul Clements <paul.clements at steeleye.com>
+.br
+Chuck Lever <chuck.lever at oracle.com>
diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c
index 14ee663..d98ecee 100644
--- a/utils/statd/svc_run.c
+++ b/utils/statd/svc_run.c
@@ -101,12 +101,12 @@ my_svc_run(void)
 
 			tv.tv_sec  = NL_WHEN(notify) - now;
 			tv.tv_usec = 0;
-			dprintf(N_DEBUG, "Waiting for reply... (timeo %d)",
+			xlog(D_GENERAL, "Waiting for reply... (timeo %d)",
 							tv.tv_sec);
 			selret = select(FD_SETSIZE, &readfds,
 				(void *) 0, (void *) 0, &tv);
 		} else {
-			dprintf(N_DEBUG, "Waiting for client connections.");
+			xlog(D_GENERAL, "Waiting for client connections");
 			selret = select(FD_SETSIZE, &readfds,
 				(void *) 0, (void *) 0, (struct timeval *) 0);
 		}
@@ -116,8 +116,7 @@ my_svc_run(void)
 			if (errno == EINTR || errno == ECONNREFUSED
 			 || errno == ENETUNREACH || errno == EHOSTUNREACH)
 				continue;
-			note(N_ERROR, "my_svc_run() - select: %s",
-				strerror (errno));
+			xlog(L_ERROR, "my_svc_run() - select: %m");
 			return;
 
 		case 0:
diff --git a/utils/statd/version.h b/utils/statd/version.h
deleted file mode 100644
index 12f16bd..0000000
--- a/utils/statd/version.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Copyright (C) 1997-1999 Jeffrey A. Uphoff
- *
- * NSM for Linux.
- */
-
-#define STATD_RELEASE "1.1.1"


Index: nfs-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nfs-utils/devel/nfs-utils.spec,v
retrieving revision 1.263
retrieving revision 1.264
diff -u -p -r1.263 -r1.264
--- nfs-utils.spec	16 Jan 2010 12:32:42 -0000	1.263
+++ nfs-utils.spec	17 Jan 2010 22:05:22 -0000	1.264
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting cl
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.2.1
-Release: 11%{?dist}
+Release: 12%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -18,7 +18,7 @@ Source13: rpcgssd.init
 Source14: rpcsvcgssd.init
 Source15: nfs.sysconfig
 
-Patch000: nfs-utils-1.2.2-rc7.patch
+Patch000: nfs-utils-1.2.2-rc8.patch
 Patch001: nfs-utils-1.2.1-compile.patch
 Patch002: nfs-utils-1.2.1-statdpath.patch
 
@@ -51,7 +51,7 @@ BuildRequires: libgssglue-devel libevent
 BuildRequires: nfs-utils-lib-devel >= 1.1.0-3 libtirpc-devel libblkid-devel
 BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
 BuildRequires: automake, libtool, glibc-headers
-BuildRequires: e2fsprogs-devel, krb5-devel, tcp_wrappers-devel
+BuildRequires: krb5-devel, tcp_wrappers-devel
 Requires(pre): shadow-utils >= 4.0.3-25
 Requires(pre): /sbin/chkconfig /sbin/nologin
 Requires: nfs-utils-lib >= 1.1.0-3 libgssglue libevent
@@ -250,6 +250,10 @@ fi
 %attr(4755,root,root)   /sbin/umount.nfs4
 
 %changelog
+* Sun Jan 17 2010 Steve Dickson <steved at redhat.com> 1.2.1-12
+- Updated to latest upstream RC release: nfs-utils-1-2-2-rc7
+  which includes Ipv6 support for tcpwrapper (disabled by default).
+
 * Sat Jan 16 2010 Steve Dickson <steved at redhat.com> 1.2.1-11
 - Updated to latest upstream RC release: nfs-utils-1-2-2-rc7
   which includes Ipv6 support for statd (disabled by default).


--- nfs-utils-1.2.2-rc7.patch DELETED ---



More information about the scm-commits mailing list