* Debian diff remaining in autofs 4.1.3
@ 2004-09-04 20:06 Arthur Korn
2004-09-05 2:35 ` raven
0 siblings, 1 reply; 3+ messages in thread
From: Arthur Korn @ 2004-09-04 20:06 UTC (permalink / raw)
To: autofs
[-- Attachment #1.1: Type: text/plain, Size: 6034 bytes --]
Hi
I'm the new Debian autofs Maintainer. As such, I had the
privilege to merge 1092 lines of many small patches when
updating to 4.1.3 ...
Here the updated patches that address issues that I couldn't see
fixed otherwise.
Mount is called like this "mount -t fstype -o what fullpath"
because options is allocated but empty.
--- autofs-4.1.3/modules/mount_changer.c.orig 2004-05-10 14:44:30.000000000 +0200
+++ autofs-4.1.3/modules/mount_changer.c 2004-09-03 23:49:18.000000000 +0200
@@ -94,7 +94,7 @@
}
wait_for_lock();
- if (options) {
+ if (options && options[0]) {
debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
fstype, options, what, fullpath);
--- autofs-4.1.3/modules/mount_ext2.c.orig 2004-05-10 14:44:30.000000000 +0200
+++ autofs-4.1.3/modules/mount_ext2.c 2004-09-03 23:49:47.000000000 +0200
@@ -73,7 +73,7 @@
return 0;
}
- if (options) {
+ if (options && options[0]) {
for (p = options; (p1 = strchr(p, ',')); p = p1)
if (!strncmp(p, "ro", p1 - p) && ++p1 - p == sizeof("ro"))
ro = 1;
--- autofs-4.1.3/modules/mount_generic.c.orig 2004-05-10 14:44:30.000000000 +0200
+++ autofs-4.1.3/modules/mount_generic.c 2004-09-03 23:50:19.000000000 +0200
@@ -72,7 +72,7 @@
}
wait_for_lock();
- if (options) {
+ if (options && options[0]) {
debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
fstype, options, what, fullpath);
For program-maps, last character read from STDIN was being
doubled (pretty strange experience).
diff -ruN autofs-4.1.3.orig/modules/lookup_program.c autofs-4.1.3/modules/lookup_program.c
--- autofs-4.1.3.orig/modules/lookup_program.c 2004-01-29 17:01:22.000000000 +0100
+++ autofs-4.1.3/modules/lookup_program.c 2004-09-03 23:58:42.000000000 +0200
@@ -159,6 +159,7 @@
if (read(pipefd[0], &ch, 1) < 1) {
FD_CLR(pipefd[0], &ourfds);
files_left--;
+ state = st_done;
}
if (!quoted && ch == '\\') {
Add crude support for hesiod priorities.
--- autofs-4.1.3/modules/lookup_hesiod.c.orig 2004-09-03 23:18:31.000000000 +0200
+++ autofs-4.1.3/modules/lookup_hesiod.c 2004-09-03 23:18:35.000000000 +0200
@@ -9,6 +9,7 @@
#include <sys/types.h>
#include <ctype.h>
+#include <limits.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
@@ -70,6 +71,8 @@ int lookup_mount(const char *root, const
char **hes_result;
struct lookup_context *ctxt = (struct lookup_context *) context;
int rv;
+ char **record, *best_record = NULL, *p;
+ int priority, lowest_priority = INT_MAX;
debug(MODPREFIX "looking up root=\"%s\", name=\"%s\"", root, name);
@@ -78,14 +81,30 @@ int lookup_mount(const char *root, const
hes_result = hes_resolve(name, "filsys");
- if (!hes_result) {
+ if (!hes_result || !hes_result[0]) {
warn(MODPREFIX "entry \"%s\" not found in map\n", name);
return 1;
}
- debug(MODPREFIX "lookup for \"%s\" gave \"%s\"", name, hes_result[0]);
+ /* autofs doesn't support falling back to alternate records, so just
+ find the record with the lowest priority and hope it works.
+ -- Aaron Ucko <amu@alum.mit.edu> 2002-03-11 */
+ for (record = hes_result; *record; ++record) {
+ p = strrchr(*record, ' ');
+ if ( p && isdigit(p[1]) ) {
+ priority = atoi(p+1);
+ } else {
+ priority = INT_MAX - 1;
+ }
+ if (priority < lowest_priority) {
+ lowest_priority = priority;
+ best_record = *record;
+ }
+ }
- rv = ctxt->parser->parse_mount(root, name, name_len, hes_result[0],
+ debug(MODPREFIX "lookup for \"%s\" gave \"%s\"", name, best_record);
+
+ rv = ctxt->parser->parse_mount(root, name, name_len, best_record,
ctxt->parser->context);
free(hes_result);
return rv;
The comment says it.
--- bak/modules/mount_afs.c.orig 2004-01-29 17:01:22.000000000 +0100
+++ bak/modules/mount_afs.c 2004-09-03 23:03:04.000000000 +0200
@@ -39,6 +39,10 @@
strncat(dest, "/", sizeof(dest));
strncat(dest, name, sizeof(dest));
+ /* remove trailing slash (http://bugs.debian.org/141775) */
+ if (dest[strlen(dest)-1] == '/')
+ dest[strlen(dest)-1] = '\0';
+
debug(MODPREFIX "mounting AFS %s -> %s", dest, what);
return symlink(what, dest); /* Try it. If it fails, return the error. */
Rather cosmetic: When there are errors in subdirectories on
build, make will continue. I need this so build-daemons can't
upload incomplete binary packages:
diff -ruN autofs-4.1.3.orig/Makefile autofs-4.1.3/Makefile
--- autofs-4.1.3.orig/Makefile 2003-09-29 10:22:35.000000000 +0200
+++ autofs-4.1.3/Makefile 2004-09-04 20:23:42.000000000 +0200
@@ -13,26 +13,26 @@
all: daemon samples
daemon:
- for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
+ set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
kernel:
- if [ -d kernel ]; then $(MAKE) -C kernel all; fi
+ set -e; if [ -d kernel ]; then $(MAKE) -C kernel all; fi
samples:
- if [ -d samples ]; then $(MAKE) -C samples all; fi
+ set -e; if [ -d samples ]; then $(MAKE) -C samples all; fi
clean:
for i in $(SUBDIRS) samples kernel; do \
if [ -d $$i ]; then $(MAKE) -C $$i clean; fi; done
install:
- for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
+ set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
install_kernel:
- if [ -d kernel ]; then $(MAKE) -C kernel install; fi
+ set -e; if [ -d kernel ]; then $(MAKE) -C kernel install; fi
install_samples:
- if [ -d samples ]; then $(MAKE) -C samples install; fi
+ set -e; if [ -d samples ]; then $(MAKE) -C samples install; fi
mrproper distclean: clean
find . -noleaf \( -name '*~' -o -name '#*' -o -name '*.orig' -o -name '*.rej' -o -name '*.old' \) -print0 | xargs -0 rm -f
HTH, 2ri
--
Help securing email, spread GPG, clearsign all mail. http://www.gnupg.org
.
/\ .__|_|_ ._ |/ _ ._._
/--\| |_| ||_|| |\(_)| | |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Debian diff remaining in autofs 4.1.3
2004-09-04 20:06 Debian diff remaining in autofs 4.1.3 Arthur Korn
@ 2004-09-05 2:35 ` raven
2004-09-05 11:40 ` Arthur Korn
0 siblings, 1 reply; 3+ messages in thread
From: raven @ 2004-09-05 2:35 UTC (permalink / raw)
To: Arthur Korn; +Cc: autofs
On Sat, 4 Sep 2004, Arthur Korn wrote:
> Hi
>
> I'm the new Debian autofs Maintainer. As such, I had the
> privilege to merge 1092 lines of many small patches when
> updating to 4.1.3 ...
Ouch. I've worked on merging various Debian patches over time but
haven't been very successful I'm afraid. So it`s great to have your help.
I've been considering changing from Gentoo to Debian on my Ultra 1 but
have been dreading the packaging effort I'd have to do. While I like
Gentoo the compiles I have to do to update just take to long.
Is there any way I can get hold of the soure package?
Are there any plans to add a kernel patch for 2.4 and possibly for early
2.6 kernels? Perhaps I could help with that.
>
> Here the updated patches that address issues that I couldn't see
> fixed otherwise.
They look straight forward. I'll put them into 4.1.4.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Debian diff remaining in autofs 4.1.3
2004-09-05 2:35 ` raven
@ 2004-09-05 11:40 ` Arthur Korn
0 siblings, 0 replies; 3+ messages in thread
From: Arthur Korn @ 2004-09-05 11:40 UTC (permalink / raw)
To: raven; +Cc: autofs
[-- Attachment #1.1: Type: text/plain, Size: 1479 bytes --]
Hi
raven@themaw.net schrieb:
> Is there any way I can get hold of the soure package?
I've just uploaded it to experimental.
It is indeed experimental, since I didn't merge any init-script
changes yet (I want to try to stick with your scripts as much as
possible).
There are a couple of doc patches left too.
> Are there any plans to add a kernel patch for 2.4 and possibly for early
> 2.6 kernels? Perhaps I could help with that.
Debian will ship recent 2.6 kernels in sarge (we can't change
woody anymore).
Maybe the autofs4 patches have already been applied to our stock
2.4 kernels. If not, you could try to convince the
kernel-image-2.4.27-i386 maintainers to integrate the patch in
stock kernels, build a kernel-patch-autofs4 package
(impractical, requires rebuild of entier kernel for this single
module) or build your own autofs4-module(-source) kernel module
package (which would be overkill IMHO).
HTH, 2ri
--
Help securing email, spread GPG, clearsign all mail. http://www.gnupg.org
.
The game was soon followed up by a round of "Alphabet Implementation" where
each employee took turns suggesting a different language, tool, methodology, or
approach to a new business requirement, vehemently disapproving of all other
ideas. This game awards double points for using an acronymn unknown by the rest
of the group, but imposes heavy penalties on making one up.
-- Bryan Douglas <bryantdouglas@yahoo.com> on segfault.org
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-09-05 11:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-04 20:06 Debian diff remaining in autofs 4.1.3 Arthur Korn
2004-09-05 2:35 ` raven
2004-09-05 11:40 ` Arthur Korn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.