From e72df02d5318592cec199273b6c0b921b6712ac1 Mon Sep 17 00:00:00 2001
From: "Steinar H. Gunderson" <sesse@debian.org>
Date: Mon, 3 Mar 2008 17:16:33 +0100
Subject: [PATCH] Imported Debian patch 1.1.1-14

---
 debian/changelog                              | 20 +++++++++++++++++++
 debian/copyright                              |  9 +--------
 ...che.diff => 10-no-flush-blkid-cache.patch} |  0
 .../11-honor-credential-cache-dir.patch       | 13 ++++++++++++
 debian/patches/12-fix-nfsmount-segfault.patch | 13 ++++++++++++
 debian/patches/series                         |  4 +++-
 6 files changed, 50 insertions(+), 9 deletions(-)
 rename debian/patches/{10-no-flush-blkid-cache.diff => 10-no-flush-blkid-cache.patch} (100%)
 create mode 100644 debian/patches/11-honor-credential-cache-dir.patch
 create mode 100644 debian/patches/12-fix-nfsmount-segfault.patch

diff --git a/debian/changelog b/debian/changelog
index 582c5dc..af0ab38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+nfs-utils (1:1.1.1-14) unstable; urgency=low
+
+  * Another init dependency patch from Petter Reinholdtsen, this time for
+    nfs-common. (Closes: #468663)
+    * Stop before portmap stops.
+    * Start after local filesystems and network (normally $portmap should take
+      care of this, but it might not be installed for some reason).
+  * 10-no-flush-blkid-cache.patch: Rename from 10-no-flush-blkid-cache.diff,
+    for consistency.
+  * 11-honor-credential-cache-dir.patch: New patch from Vince Busam, honor -d
+    flag to rpc.gssd instead of always using /tmp for the credentials cache.
+    (Closes: #465796)
+  * 12-fix-nfsmount-segfault.patch: New patch from Jindrich Makovicka, fix so
+    the two tests for mount version are in sync, fixing a segfault in nfsmount.
+    (Closes: #466019)
+  * Remove outdated information about git snapshots from debian/copyright.
+    (Closes: #468773)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Mon, 03 Mar 2008 17:16:33 +0100
+
 nfs-utils (1:1.1.1-13) unstable; urgency=low
 
   * Adjust nfs-kernel-server.init dependencies; patch from Petter
diff --git a/debian/copyright b/debian/copyright
index 5a85bf9..c16b554 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,13 +1,6 @@
 This package was debianized by Chip Salzenberg <chip@debian.org> on Fri,  3 Dec 1999 20:00:00 -0800
 
-This is a git snapshot, downloaded August 6th, 2007 using
-the following commands:
-
-  git clone git://git.linux-nfs.org/pub/linux/nfs-utils/ nfs-utils-1.1.1\~git-20070709
-  ( cd nfs-utils-1.1.1\~git-20070709/ && sh ./autogen.sh )
-  tar --exclude=.git -zcf nfs-utils_1.1.1\~git-20070709.orig.tar.gz nfs-utils-1.1.1\~git-20070709
-
-Regular releases are avilable from http://sourceforge.net/projects/nfs/.
+The source pakage was downloaded from http://sourceforge.net/projects/nfs/.
 
 View individual source files for respective authors.
 
diff --git a/debian/patches/10-no-flush-blkid-cache.diff b/debian/patches/10-no-flush-blkid-cache.patch
similarity index 100%
rename from debian/patches/10-no-flush-blkid-cache.diff
rename to debian/patches/10-no-flush-blkid-cache.patch
diff --git a/debian/patches/11-honor-credential-cache-dir.patch b/debian/patches/11-honor-credential-cache-dir.patch
new file mode 100644
index 0000000..88966ac
--- /dev/null
+++ b/debian/patches/11-honor-credential-cache-dir.patch
@@ -0,0 +1,13 @@
+Index: nfs-utils-1.1.1/utils/gssd/krb5_util.c
+===================================================================
+--- nfs-utils-1.1.1.orig/utils/gssd/krb5_util.c
++++ nfs-utils-1.1.1/utils/gssd/krb5_util.c
+@@ -404,7 +404,7 @@ gssd_get_single_krb5_cred(krb5_context c
+ 	    cache_type = "FILE";
+ 	snprintf(cc_name, sizeof(cc_name), "%s:%s/%s%s_%s",
+ 		cache_type,
+-		GSSD_DEFAULT_CRED_DIR, GSSD_DEFAULT_CRED_PREFIX,
++		ccachedir, GSSD_DEFAULT_CRED_PREFIX,
+ 		GSSD_DEFAULT_MACHINE_CRED_SUFFIX, ple->realm);
+ 	ple->endtime = my_creds.times.endtime;
+ 	if (ple->ccname != NULL)
diff --git a/debian/patches/12-fix-nfsmount-segfault.patch b/debian/patches/12-fix-nfsmount-segfault.patch
new file mode 100644
index 0000000..2dc73b2
--- /dev/null
+++ b/debian/patches/12-fix-nfsmount-segfault.patch
@@ -0,0 +1,13 @@
+Index: nfs-utils-1.1.1/utils/mount/nfsmount.c
+===================================================================
+--- nfs-utils-1.1.1.orig/utils/mount/nfsmount.c
++++ nfs-utils-1.1.1/utils/mount/nfsmount.c
+@@ -714,7 +714,7 @@ nfsmount(const char *spec, const char *n
+ 			rpc_mount_errors(*nfs_server.hostname, 1, bg);
+ 	}
+ 
+-	if (nfs_pmap->pm_vers == 2) {
++	if (mnt_pmap->pm_vers <= 2) {
+ 		if (mntres.nfsv2.fhs_status != 0) {
+ 			nfs_error(_("%s: %s:%s failed, reason given by server: %s"),
+ 					progname, hostname, dirname,
diff --git a/debian/patches/series b/debian/patches/series
index e98b01f..017d8be 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+12-fix-nfsmount-segfault.patch
 02-document-debian-init-scripts.patch
 03-sm-notify-in-sbin.patch
 05-ignore-quota-option.patch
@@ -5,4 +6,5 @@
 07-amd64-logging-segfault.patch
 08-clarify-unexport.patch
 09-fix-nfsstat-option.patch
-10-no-flush-blkid-cache.diff
+10-no-flush-blkid-cache.patch
+11-honor-credential-cache-dir.patch
-- 
2.39.5