rpms/nfs-utils/F-12 nfs-utils-1.2.1-mount-kernel-33.patch, NONE, 1.1 nfs-utils.spec, 1.253, 1.254

Steve Dickson steved at fedoraproject.org
Thu Feb 4 15:49:04 UTC 2010


Author: steved

Update of /cvs/pkgs/rpms/nfs-utils/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv356

Modified Files:
	nfs-utils.spec 
Added Files:
	nfs-utils-1.2.1-mount-kernel-33.patch 
Log Message:
Updated mount.nfs and mountd to work with 2.6.33 kernels.


nfs-utils-1.2.1-mount-kernel-33.patch:
 mount/stropts.c |    7 ++++++-
 mountd/v4root.c |   29 +++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)

--- NEW FILE nfs-utils-1.2.1-mount-kernel-33.patch ---
diff -up nfs-utils-1.2.1/utils/mountd/v4root.c.orig nfs-utils-1.2.1/utils/mountd/v4root.c
--- nfs-utils-1.2.1/utils/mountd/v4root.c.orig	2010-02-04 10:38:01.766414000 -0500
+++ nfs-utils-1.2.1/utils/mountd/v4root.c	2010-02-04 10:39:16.373599000 -0500
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
+#include <string.h>
 
 #include <unistd.h>
 #include <errno.h>
@@ -28,6 +29,29 @@
 #include "pseudoflavors.h"
 #include "v4root.h"
 
+
+#include <sys/utsname.h>
+
+static inline unsigned int MAKE_VERSION(unsigned int p, unsigned int q,
+					unsigned int r)
+{
+	return (65536 * p) + (256 * q) + r;
+}
+
+static inline unsigned int linux_version_code(void)
+{
+	struct utsname my_utsname;
+	unsigned int p, q, r;
+
+	if (uname(&my_utsname))
+		return 0;
+
+	p = atoi(strtok(my_utsname.release, "."));
+	q = atoi(strtok(NULL, "."));
+	r = atoi(strtok(NULL, "."));
+	return MAKE_VERSION(p, q, r);
+}
+
 #ifndef _PATH_PSEUDO_ROOT
 #define _PATH_PSEUDO_ROOT		"/"
 #endif
@@ -109,6 +133,11 @@ v4root_support()
 	if (kernel_support != -1)
 		return kernel_support;
 
+	if (linux_version_code() >= MAKE_VERSION(2, 6, 33)) {
+		kernel_support = 1;
+		return kernel_support;
+	}
+
 	kernel_support = 0;
 	fp = fopen("/proc/fs/nfsd/exports", "r");
 	if (fp == NULL)
diff -up nfs-utils-1.2.1/utils/mount/stropts.c.orig nfs-utils-1.2.1/utils/mount/stropts.c
--- nfs-utils-1.2.1/utils/mount/stropts.c.orig	2010-02-04 10:38:01.774412000 -0500
+++ nfs-utils-1.2.1/utils/mount/stropts.c	2010-02-04 10:40:37.139334000 -0500
@@ -47,6 +47,10 @@
 #include "parse_dev.h"
 #include "conffile.h"
 
+#ifndef ESERVERFAULT
+#define ESERVERFAULT    526
+#endif
+
 #ifndef NFS_PROGRAM
 #define NFS_PROGRAM	(100003)
 #endif
@@ -658,8 +662,9 @@ static int nfs_try_mount(struct nfsmount
 				 * automatically export a pseudo root, retry
 				 * ENOENT errors using version 3. And for
 				 * Linux servers prior to 2.6.25, retry EPERM
+				 * Linux server after 2.6.33, retry ESERVERFAULT
 				 */
-				if (errno != ENOENT && errno != EPERM)
+				if (errno != ENOENT && errno != EPERM && errno != ESERVERFAULT)
 					break;
 			}
 		}


Index: nfs-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nfs-utils/F-12/nfs-utils.spec,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -p -r1.253 -r1.254
--- nfs-utils.spec	10 Dec 2009 19:52:27 -0000	1.253
+++ nfs-utils.spec	4 Feb 2010 15:49:04 -0000	1.254
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting cl
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.2.1
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -27,6 +27,7 @@ Patch201: nfs-utils-1.2.1-nfsd-bootfail.
 
 Patch300: nfs-utils-1.2.0-v4root-rel9.patch
 Patch301: nfs-utils-1.2.1-mount-eperm.patch
+Patch302: nfs-utils-1.2.1-mount-kernel-33.patch
 
 Group: System Environment/Daemons
 Provides: exportfs    = %{epoch}:%{version}-%{release}
@@ -82,6 +83,8 @@ This package also contains the mount.nfs
 %patch201 -p1
 
 %patch300 -p1
+%patch301 -p1
+%patch302 -p1
 
 # Remove .orig files
 find . -name "*.orig" | xargs rm -f
@@ -253,6 +256,9 @@ fi
 %attr(4755,root,root)   /sbin/umount.nfs4
 
 %changelog
+* Thu Feb  4 2010 Steve Dickson <steved at redhat.com> 1.2.1-5
+- Updated mount.nfs and mountd to work with 2.6.33 kernels.
+
 * Thu Dec 10 2009 Steve Dickson <steved at redhat.com> 1.2.1-4
 - Update the  pseudo root to handle security flavors better.
 



More information about the scm-commits mailing list