Hello community, here is the log from the commit of package autofs checked in at Sat Sep 2 19:06:46 CEST 2006. -------- --- autofs/autofs.changes 2006-05-26 19:23:53.000000000 +0200 +++ autofs/autofs.changes 2006-09-01 16:56:08.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Aug 23 20:20:45 CEST 2006 - jeffm@suse.com + +- Added configurable locking patch (178308) + +------------------------------------------------------------------- New: ---- autofs-4.1.4-configurable-locking.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autofs.spec ++++++ --- /var/tmp/diff_new_pack.O3RDZk/_old 2006-09-02 19:06:38.000000000 +0200 +++ /var/tmp/diff_new_pack.O3RDZk/_new 2006-09-02 19:06:38.000000000 +0200 @@ -19,7 +19,7 @@ Autoreqprov: on Requires: sed grep Version: 4.1.4 -Release: 25 +Release: 28 Summary: A Kernel-Based Automounter BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-%{version}.tar.bz2 @@ -36,6 +36,7 @@ Patch6: autofs-4.1.3-uninit-vars.patch Patch7: autofs-4.1.3-optflags.patch Patch8: autofs-4.1.4-strip.patch +Patch9: autofs-4.1.4-configurable-locking.patch PreReq: %fillup_prereq %insserv_prereq PreReq: /usr/bin/sed /usr/bin/grep /bin/mv @@ -66,10 +67,12 @@ %patch6 %patch7 %patch8 +%patch9 -p1 %build autoconf -./configure --libdir=%{_libdir} --mandir=%{_mandir} %{_target_cpu}-suse-linux +./configure --libdir=%{_libdir} --mandir=%{_mandir} %{_target_cpu}-suse-linux \ + --disable-mount-locking make all OPTFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED" STRIP=: %install @@ -126,6 +129,8 @@ /usr/sbin/automount %changelog -n autofs +* Wed Aug 23 2006 - jeffm@suse.com +- Added configurable locking patch (178308) * Fri May 26 2006 - schwab@suse.de - Fix broken makefile. * Sat May 20 2006 - schwab@suse.de ++++++ autofs-4.1.4-configurable-locking.patch ++++++ This patch provides a configure option to disable the use of a lock file when calling mount from autofs. It also adds a patch to the "patches" directory that needs to be used for mount to (hopefuully) prevent /etc/mtab corruption when rapidly mounting filesystems when autofs does not use locking. To disable the locking add the configure option --disable-mount-locking. diff -Nurp autofs-4.1.4.orig/configure autofs-4.1.4/configure --- autofs-4.1.4.orig/configure 2005-04-06 23:24:37.000000000 +0800 +++ autofs-4.1.4/configure 2005-10-23 11:33:44.000000000 +0800 @@ -842,6 +842,7 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-ext-env disable search in environment for substitution variable +--disable-mount-locking disable use of locking when spawning mount command Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -4308,6 +4309,23 @@ _ACEOF fi # +# Disable use of locking when spawning mount command +# +# Check whether --enable-mount-locking or --disable-mount-locking was given. +if test "${enable_mount_locking+set}" = set; then + enableval="$enable_mount_locking" + +else + enableval=yes +fi; +if test x$enable_mount_locking = xyes -o x$enableval = xyes; then + cat >>confdefs.h <<\_ACEOF +#define ENABLE_MOUNT_LOCKING 1 +_ACEOF + +fi + +# # Write Makefile.conf and include/config.h # ac_config_headers="$ac_config_headers include/config.h" diff -Nurp autofs-4.1.4.orig/configure.in autofs-4.1.4/configure.in --- autofs-4.1.4.orig/configure.in 2005-04-06 23:24:37.000000000 +0800 +++ autofs-4.1.4/configure.in 2005-10-23 11:33:35.000000000 +0800 @@ -167,6 +167,16 @@ if test x$enable_ext_env = xyes; then fi # +# Disable use of locking when spawning mount command +# +AC_ARG_ENABLE(mount-locking, +--disable-mount-locking disable use of locking when spawning mount command,, + enableval=yes) +if test x$enable_mount_locking = xyes -o x$enableval = xyes; then + AC_DEFINE(ENABLE_MOUNT_LOCKING, 1) +fi + +# # Write Makefile.conf and include/config.h # AC_CONFIG_HEADER(include/config.h) diff -Nurp autofs-4.1.4.orig/daemon/spawn.c autofs-4.1.4/daemon/spawn.c --- autofs-4.1.4.orig/daemon/spawn.c 2005-02-10 20:56:53.000000000 +0800 +++ autofs-4.1.4/daemon/spawn.c 2005-10-23 10:51:10.000000000 +0800 @@ -322,6 +322,7 @@ int spawnl(int logpri, const char *prog, return do_spawn(logpri, 0, prog, (const char **) argv); } +#ifdef ENABLE_MOUNT_LOCKING int spawnll(int logpri, const char *prog, ...) { va_list arg; @@ -342,3 +343,4 @@ int spawnll(int logpri, const char *prog return do_spawn(logpri, 1, prog, (const char **) argv); } +#endif diff -Nurp autofs-4.1.4.orig/include/automount.h autofs-4.1.4/include/automount.h --- autofs-4.1.4.orig/include/automount.h 2005-01-26 21:03:02.000000000 +0800 +++ autofs-4.1.4/include/automount.h 2005-10-23 10:51:10.000000000 +0800 @@ -121,9 +121,13 @@ extern struct autofs_point ap; int aquire_lock(void); void release_lock(void); -int spawnll(int logpri, const char *prog, ...); int spawnl(int logpri, const char *prog, ...); -int spawnv(int logpri, const char *prog, const char *const *argv); +#ifdef ENABLE_MOUNT_LOCKING +int spawnll(int logpri, const char *prog, ...); +#else +#define spawnll spawnl +#endif +int spawnv(int ogpri, const char *prog, const char *const *argv); void reset_signals(void); void ignore_signals(void); void discard_pending(int sig); diff -Nurp autofs-4.1.4.orig/include/config.h.in autofs-4.1.4/include/config.h.in --- autofs-4.1.4.orig/include/config.h.in 2004-02-03 23:23:21.000000000 +0800 +++ autofs-4.1.4/include/config.h.in 2005-10-23 10:51:10.000000000 +0800 @@ -25,3 +25,5 @@ #undef HAVE_SLOPPY_MOUNT #undef ENABLE_EXT_ENV + +#undef ENABLE_MOUNT_LOCKING diff -Nurp autofs-4.1.4.orig/patches/util-linux-2.12a-flock.patch autofs-4.1.4/patches/util-linux-2.12a-flock.patch --- autofs-4.1.4.orig/patches/util-linux-2.12a-flock.patch 1970-01-01 08:00:00.000000000 +0800 +++ autofs-4.1.4/patches/util-linux-2.12a-flock.patch 2005-10-23 10:51:10.000000000 +0800 @@ -0,0 +1,30 @@ +--- util-linux-2.12a/mount/fstab.c.flock 2005-09-17 01:36:03.000000000 +0800 ++++ util-linux-2.12a/mount/fstab.c 2005-09-17 01:41:12.000000000 +0800 +@@ -488,7 +488,7 @@ lock_mtab (void) { + } + /* proceed anyway */ + } +- we_created_lockfile = 1; ++ we_created_lockfile = fd; + } else { + static int tries = 0; + +@@ -510,9 +510,8 @@ lock_mtab (void) { + MOUNTED_LOCK); + sleep(1); + } ++ close(fd); + } +- +- close(fd); + } + } + +@@ -520,6 +519,7 @@ lock_mtab (void) { + void + unlock_mtab (void) { + if (we_created_lockfile) { ++ close(we_created_lockfile); + unlink (MOUNTED_LOCK); + we_created_lockfile = 0; + } diff -Nurp autofs-4.1.4.orig/patches/util-linux-2.12q-flock.patch autofs-4.1.4/patches/util-linux-2.12q-flock.patch --- autofs-4.1.4.orig/patches/util-linux-2.12q-flock.patch 1970-01-01 08:00:00.000000000 +0800 +++ autofs-4.1.4/patches/util-linux-2.12q-flock.patch 2005-10-23 10:51:10.000000000 +0800 @@ -0,0 +1,29 @@ +--- util-linux-2.12q/mount/fstab.c.flock 2005-09-17 01:10:37.000000000 +0800 ++++ util-linux-2.12q/mount/fstab.c 2005-09-17 01:16:51.000000000 +0800 +@@ -417,6 +417,7 @@ + unlock_mtab (void) { + if (we_created_lockfile) { + unlink (MOUNTED_LOCK); ++ close(we_created_lock_file); + we_created_lockfile = 0; + } + } +@@ -528,6 +529,7 @@ + } + /* proceed anyway */ + } ++ we_created_lock_file = fd; + } else { + static int tries = 0; + +@@ -549,9 +551,8 @@ + MOUNTED_LOCK); + sleep(1); + } ++ close(fd); + } +- +- close(fd); + } + } + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org