rpms/autofs/FC-3 autofs-4.1.3-auto.net-414b2.patch, NONE, 1.1 autofs-4.1.3-multi-over-redhat.patch, 1.1, 1.2 autofs.spec, 1.55, 1.56

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Apr 4 22:20:48 UTC 2005


Update of /cvs/dist/rpms/autofs/FC-3
In directory cvs.devel.redhat.com:/tmp/cvs-serv29531

Modified Files:
	autofs-4.1.3-multi-over-redhat.patch autofs.spec 
Added Files:
	autofs-4.1.3-auto.net-414b2.patch 
Log Message:
- Add in an error case that was omitted in the multi-over patch.
- Update our auto.net to reflect the changes that went into 4.1.4_beta2.
  This fixes a problem seen by at least one customer where a malformed entry
  appeared first in the multimount list, thus causing the entire multimount
  to be ignored.  This new auto.net places that entry at the end, purely by
  luck, but it fixes the problem in this one case.



autofs-4.1.3-auto.net-414b2.patch:
 auto.net |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

--- NEW FILE autofs-4.1.3-auto.net-414b2.patch ---
--- autofs-4.1.3/samples/auto.net.orig	2005-04-04 16:23:56.287622928 -0400
+++ autofs-4.1.3/samples/auto.net	2005-04-04 16:24:19.855040136 -0400
@@ -1,6 +1,8 @@
 #!/bin/sh
 
-# $Id: auto.net,v 1.5 2003/09/29 08:22:35 raven Exp $
+# $Id: auto.net,v 1.6 2005/01/04 14:36:54 raven Exp $
+
+# This file must be executable to work! chmod 755!
 
 # Look at what a host is exporting to determine what we can mount.
 # This is very simple, but it appears to work surprisingly well
@@ -16,14 +18,27 @@
 # but ignores it.  "kshowmount" is the newer version installed with knfsd,
 # which both accepts and acts on the '--no-headers' flag.
 #SHOWMOUNT="kshowmount --no-headers -e $key"
-#SHOWMOUNT="showmount -e $key | tail +2"
+#SHOWMOUNT="showmount -e $key | tail -n +2"
+
+# I've wanted to do this for ages.
+# Taken from a script contributed by Elmar Pruesse for
+# mounting smb mounts.
+for SMNT in /{,usr/}{,s}bin/{,k}showmount
+do
+	if [ -x $SMNT ]
+	then
+		break
+	fi
+done
+
+[ -x $SMNT ] || exit 1
 
 # Newer distributions get this right
-SHOWMOUNT="/usr/sbin/showmount --no-headers -e $key"
+SHOWMOUNT="$SMNT --no-headers -e $key"
 
-$SHOWMOUNT | sort +0 | \
+$SHOWMOUNT | LC_ALL=C sort +0 | \
 	awk -v key="$key" -v opts="$opts" -- '
-	BEGIN		{ ORS=""; first=1 }
-			{ if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 }
-	END		{ if (!first) print "\n"; else exit 1 }
+	BEGIN	{ ORS=""; first=1 }
+		{ if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 }
+	END	{ if (!first) print "\n"; else exit 1 }
 	'

autofs-4.1.3-multi-over-redhat.patch:
 parse_sun.c |  119 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 107 insertions(+), 12 deletions(-)

Index: autofs-4.1.3-multi-over-redhat.patch
===================================================================
RCS file: /cvs/dist/rpms/autofs/FC-3/autofs-4.1.3-multi-over-redhat.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- autofs-4.1.3-multi-over-redhat.patch	31 Mar 2005 21:45:31 -0000	1.1
+++ autofs-4.1.3-multi-over-redhat.patch	4 Apr 2005 22:20:45 -0000	1.2
@@ -1,5 +1,5 @@
---- autofs-4.1.3/modules/parse_sun.c-multi-over	2005-03-30 16:52:35.338986656 -0500
-+++ autofs-4.1.3/modules/parse_sun.c	2005-03-30 16:53:19.102333616 -0500
+--- autofs-4.1.3/modules/parse_sun.c.multi-over	2005-04-01 15:14:42.018274144 -0500
++++ autofs-4.1.3/modules/parse_sun.c	2005-04-01 15:17:41.870932384 -0500
 @@ -55,6 +55,13 @@ struct parse_context {
  	int slashify_colons;	/* Change colons to slashes? */
  };
@@ -95,7 +95,7 @@
  
  		multi_root = alloca(strlen(root) + name_len + 2);
  		if (!multi_root) {
-@@ -737,16 +808,15 @@ int parse_mount(const char *root, const 
+@@ -737,16 +808,22 @@ int parse_mount(const char *root, const 
  		do {
  			char *myoptions = strdup(options);
  			char *path, *loc;
@@ -110,10 +110,17 @@
  
  			path = dequote(p, l = chunklen(p, 0));
 -			pathlen = strlen(path);
++			if (!path) {
++				error(MODPREFIX "out of memory");
++				free(myoptions);
++				free(options);
++				multi_free_list(head);
++				return 1;
++			}
  
  			p += l;
  			p = skipspace(p);
-@@ -764,6 +834,7 @@ int parse_mount(const char *root, const 
+@@ -764,6 +841,7 @@ int parse_mount(const char *root, const 
  						    "multi concat_options: %m");
  						free(options);
  						free(path);
@@ -121,7 +128,7 @@
  						return 1;
  					}
  					p = skipspace(p);
-@@ -779,28 +850,42 @@ int parse_mount(const char *root, const 
+@@ -779,28 +857,42 @@ int parse_mount(const char *root, const 
  			l = q - p;
  
  			loc = dequote(p, l);
@@ -172,7 +179,7 @@
  
  			/* Convert non-strict failure into success */
  			if (rv < 0) {
-@@ -809,7 +894,10 @@ int parse_mount(const char *root, const 
+@@ -809,7 +901,10 @@ int parse_mount(const char *root, const 
  			} else if (rv > 0)
  				break;
  


Index: autofs.spec
===================================================================
RCS file: /cvs/dist/rpms/autofs/FC-3/autofs.spec,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- autofs.spec	31 Mar 2005 21:45:31 -0000	1.55
+++ autofs.spec	4 Apr 2005 22:20:45 -0000	1.56
@@ -4,7 +4,7 @@
 Summary: A tool for automatically mounting and unmounting filesystems.
 Name: autofs
 %define version 4.1.3
-%define release 118
+%define release 122
 Version: %{version}
 Release: %{release}
 Epoch: 1
@@ -62,6 +62,7 @@
 Patch58: autofs-4.1.3-local-mount.patch
 Patch59: autofs-4.1.3-indirect-wildcard.patch
 Patch60: autofs-4.1.3-multi-over-redhat.patch
+Patch61: autofs-4.1.3-auto.net-414b2.patch
 
 Buildroot: /var/tmp/autofs-tmp
 BuildPrereq: autoconf, hesiod-devel, openldap-devel, perl
@@ -151,6 +152,7 @@
 %patch58 -p1 -b .local-mount
 %patch59 -p1 -b .indirect-wildcard
 %patch60 -p1 -b .multi-over
+%patch61 -p1 -b .auto.net
 
 cp $RPM_SOURCE_DIR/autofs.sysconfig .
 
@@ -205,6 +207,14 @@
 %{_libdir}/autofs/*
 
 %changelog
+* Mon Apr  4 2005 Jeff Moyer <jmoyer at redhat.com> - 1:4.1.3-122
+- Add in an error case that was omitted in the multi-over patch.
+- Update our auto.net to reflect the changes that went into 4.1.4_beta2.
+  This fixes a problem seen by at least one customer where a malformed entry
+  appeared first in the multimount list, thus causing the entire multimount
+  to be ignored.  This new auto.net places that entry at the end, purely by
+  luck, but it fixes the problem in this one case.
+
 * Thu Mar 31 2005 Jeff Moyer <jmoyer at redhat.com> - 1:4.1.3-118
 - Merge in the multi-over patch.  This resolves an issue whereby multimounts
   (such as those used for /net) could be processed in the wrong order,




More information about the fedora-cvs-commits mailing list