[autofs/f18] - add fixes for bug 961312, add configure option to control sloppy mount option and fix submount shu

Ian Kent iankent at fedoraproject.org
Mon May 13 06:05:59 UTC 2013


commit 6224a741e4645f894348f62c4f1c7d4f6862c638
Author: Ian Kent <raven at themaw.net>
Date:   Mon May 13 14:04:50 2013 +0800

    - add fixes for bug 961312, add configure option to control sloppy mount option and fix submount shutdown syncronization.

 ...d-enable-sloppy-mount-option-to-configure.patch |  691 ++++++++++++++++++++
 ...cument-allowed-map-sources-in-auto_master.patch |   48 ++
 ...-5.0.7-fix-submount-tree-not-all-expiring.patch |   70 ++
 ...-maps-check-for-duplicate-indirect-mounts.patch |   64 ++
 ...s-5.0.7-syncronize-handle_mounts-shutdown.patch |   73 ++
 autofs.spec                                        |   19 +-
 6 files changed, 964 insertions(+), 1 deletions(-)
---
diff --git a/autofs-5.0.7-add-enable-sloppy-mount-option-to-configure.patch b/autofs-5.0.7-add-enable-sloppy-mount-option-to-configure.patch
new file mode 100644
index 0000000..c6dd8d5
--- /dev/null
+++ b/autofs-5.0.7-add-enable-sloppy-mount-option-to-configure.patch
@@ -0,0 +1,691 @@
+autofs-5.0.7 - add enable sloppy mount option to configure
+
+From: Ian Kent <ikent at redhat.com>
+
+Add an option --enable-sloppy-mount or --disable-sloppy-mount to force
+or prevent the use of the -s option to mount, thus avoiding the
+autodetection. This can be useful in setups where executing mount
+might be undesirable, particularly in packaging environments.
+
+2013-04-04 Martin von Gagern
+
+References:
+ * https://bugs.gentoo.org/453778
+---
+ CHANGELOG    |    1 
+ aclocal.m4   |    2 
+ configure    |  252 +++++++++++++++++++++++++++++++---------------------------
+ configure.in |   10 ++
+ 4 files changed, 146 insertions(+), 119 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 61edddf..66c11de 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -42,6 +42,7 @@
+ - fix submount tree not all expiring.
+ - make dump maps check for duplicate indirect mounts.
+ - document allowed map sources in auto.master.
++- add enable sloppy mount option to configure.
+ 
+ 25/07/2012 autofs-5.0.7
+ =======================
+diff --git a/aclocal.m4 b/aclocal.m4
+index 47bca0c..c5de159 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -66,7 +66,7 @@ AC_DEFUN(AF_SLOPPY_MOUNT,
+ [if test -n "$MOUNT" ; then
+   AC_MSG_CHECKING([if mount accepts the -s option])
+   if "$MOUNT" -s > /dev/null 2>&1 ; then
+-    AC_DEFINE(HAVE_SLOPPY_MOUNT, 1, [define if the mount command supports the -s option])
++    enable_sloppy_mount=yes
+     AC_MSG_RESULT(yes)
+   else
+     AC_MSG_RESULT(no)
+diff --git a/configure b/configure
+index c1423d8..08b7ccc 100755
+--- a/configure
++++ b/configure
+@@ -1,11 +1,9 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.68.
++# Generated by GNU Autoconf 2.69.
+ #
+ #
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+-# Foundation, Inc.
++# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+ #
+ #
+ # This configure script is free software; the Free Software Foundation
+@@ -134,6 +132,31 @@ export LANGUAGE
+ # CDPATH.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ 
++# Use a proper internal environment variable to ensure we don't fall
++  # into an infinite loop, continuously re-executing ourselves.
++  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
++    _as_can_reexec=no; export _as_can_reexec;
++    # We cannot yet assume a decent shell, so we have to provide a
++# neutralization value for shells without unset; and this also
++# works around shells that cannot unset nonexistent variables.
++# Preserve -v and -x to the replacement shell.
++BASH_ENV=/dev/null
++ENV=/dev/null
++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++case $- in # ((((
++  *v*x* | *x*v* ) as_opts=-vx ;;
++  *v* ) as_opts=-v ;;
++  *x* ) as_opts=-x ;;
++  * ) as_opts= ;;
++esac
++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
++# Admittedly, this is quite paranoid, since all the known shells bail
++# out after a failed `exec'.
++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
++as_fn_exit 255
++  fi
++  # We don't want this to propagate to other subprocesses.
++          { _as_can_reexec=; unset _as_can_reexec;}
+ if test "x$CONFIG_SHELL" = x; then
+   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+   emulate sh
+@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+ else
+   exitcode=1; echo positional parameters were not saved.
+ fi
+-test x\$exitcode = x0 || exit 1"
++test x\$exitcode = x0 || exit 1
++test -x / || exit 1"
+   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+@@ -212,21 +236,25 @@ IFS=$as_save_IFS
+ 
+ 
+       if test "x$CONFIG_SHELL" != x; then :
+-  # We cannot yet assume a decent shell, so we have to provide a
+-	# neutralization value for shells without unset; and this also
+-	# works around shells that cannot unset nonexistent variables.
+-	# Preserve -v and -x to the replacement shell.
+-	BASH_ENV=/dev/null
+-	ENV=/dev/null
+-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+-	export CONFIG_SHELL
+-	case $- in # ((((
+-	  *v*x* | *x*v* ) as_opts=-vx ;;
+-	  *v* ) as_opts=-v ;;
+-	  *x* ) as_opts=-x ;;
+-	  * ) as_opts= ;;
+-	esac
+-	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
++  export CONFIG_SHELL
++             # We cannot yet assume a decent shell, so we have to provide a
++# neutralization value for shells without unset; and this also
++# works around shells that cannot unset nonexistent variables.
++# Preserve -v and -x to the replacement shell.
++BASH_ENV=/dev/null
++ENV=/dev/null
++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++case $- in # ((((
++  *v*x* | *x*v* ) as_opts=-vx ;;
++  *v* ) as_opts=-v ;;
++  *x* ) as_opts=-x ;;
++  * ) as_opts= ;;
++esac
++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
++# Admittedly, this is quite paranoid, since all the known shells bail
++# out after a failed `exec'.
++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
++exit 255
+ fi
+ 
+     if test x$as_have_required = xno; then :
+@@ -328,6 +356,14 @@ $as_echo X"$as_dir" |
+ 
+ 
+ } # as_fn_mkdir_p
++
++# as_fn_executable_p FILE
++# -----------------------
++# Test if FILE is an executable regular file.
++as_fn_executable_p ()
++{
++  test -f "$1" && test -x "$1"
++} # as_fn_executable_p
+ # as_fn_append VAR VALUE
+ # ----------------------
+ # Append the text in VALUE to the end of the definition contained in VAR. Take
+@@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
+   chmod +x "$as_me.lineno" ||
+     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ 
++  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
++  # already done that, so ensure we don't try to do so again and fall
++  # in an infinite loop.  This has already happened in practice.
++  _as_can_reexec=no; export _as_can_reexec
+   # Don't try to exec as it changes $[0], causing all sort of problems
+   # (the dirname of $[0] is not the place where we might find the
+   # original and so on.  Autoconf is especially sensitive to this).
+@@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
+     # ... but there are two gotchas:
+     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+-    # In both cases, we have to default to `cp -p'.
++    # In both cases, we have to default to `cp -pR'.
+     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+-      as_ln_s='cp -p'
++      as_ln_s='cp -pR'
+   elif ln conf$$.file conf$$ 2>/dev/null; then
+     as_ln_s=ln
+   else
+-    as_ln_s='cp -p'
++    as_ln_s='cp -pR'
+   fi
+ else
+-  as_ln_s='cp -p'
++  as_ln_s='cp -pR'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+@@ -504,28 +544,8 @@ else
+   as_mkdir_p=false
+ fi
+ 
+-if test -x / >/dev/null 2>&1; then
+-  as_test_x='test -x'
+-else
+-  if ls -dL / >/dev/null 2>&1; then
+-    as_ls_L_option=L
+-  else
+-    as_ls_L_option=
+-  fi
+-  as_test_x='
+-    eval sh -c '\''
+-      if test -d "$1"; then
+-	test -d "$1/.";
+-      else
+-	case $1 in #(
+-	-*)set "./$1";;
+-	esac;
+-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+-	???[sx]*):;;*)false;;esac;fi
+-    '\'' sh
+-  '
+-fi
+-as_executable_p=$as_test_x
++as_test_x='test -x'
++as_executable_p=as_fn_executable_p
+ 
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -715,6 +735,7 @@ with_fifodir
+ with_flagdir
+ with_libtirpc
+ with_dmalloc
++enable_sloppy_mount
+ with_hesiod
+ with_openldap
+ with_sasl
+@@ -1187,8 +1208,6 @@ target=$target_alias
+ if test "x$host_alias" != x; then
+   if test "x$build_alias" = x; then
+     cross_compiling=maybe
+-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+-    If a cross compiler is detected then cross compile mode will be used" >&2
+   elif test "x$build_alias" != "x$host_alias"; then
+     cross_compiling=yes
+   fi
+@@ -1341,6 +1360,7 @@ Optional Features:
+   --disable-option-checking  ignore unrecognized --enable/--with options
+   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
++  --enable-sloppy-mount   enable the use of the -s option to mount
+   --disable-ext-env	  disable search in environment for substitution variable
+   --disable-mount-locking disable use of locking when spawning mount command
+   --enable-force-shutdown enable USR1 signal to force unlink umount of any
+@@ -1442,9 +1462,9 @@ test -n "$ac_init_help" && exit $ac_status
+ if $ac_init_version; then
+   cat <<\_ACEOF
+ configure
+-generated by GNU Autoconf 2.68
++generated by GNU Autoconf 2.69
+ 
+-Copyright (C) 2010 Free Software Foundation, Inc.
++Copyright (C) 2012 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+@@ -1520,7 +1540,7 @@ $as_echo "$ac_try_echo"; } >&5
+ 	 test ! -s conftest.err
+        } && test -s conftest$ac_exeext && {
+ 	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
++	 test -x conftest$ac_exeext
+        }; then :
+   ac_retval=0
+ else
+@@ -1740,7 +1760,7 @@ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+ 
+ It was created by $as_me, which was
+-generated by GNU Autoconf 2.68.  Invocation command line was
++generated by GNU Autoconf 2.69.  Invocation command line was
+ 
+   $ $0 $@
+ 
+@@ -2324,7 +2344,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_CC="${ac_tool_prefix}gcc"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2364,7 +2384,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_ac_ct_CC="gcc"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2417,7 +2437,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_CC="${ac_tool_prefix}cc"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2458,7 +2478,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+        continue
+@@ -2516,7 +2536,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2560,7 +2580,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_ac_ct_CC="$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3006,8 +3026,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdarg.h>
+ #include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
++struct stat;
+ /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+ struct buf { int x; };
+ FILE * (*rcsopen) (struct buf *, struct stat *, int);
+@@ -3209,7 +3228,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_MOUNT="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3269,7 +3288,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_MOUNT_NFS="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3329,7 +3348,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_UMOUNT="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3389,7 +3408,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_E2FSCK="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3448,7 +3467,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_E3FSCK="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3507,7 +3526,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_E4FSCK="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3566,7 +3585,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_MODPROBE="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3626,7 +3645,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_LEX="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3682,7 +3701,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_YACC="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3738,7 +3757,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_RANLIB="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3794,7 +3813,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_RPCGEN="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3858,13 +3877,19 @@ fi
+ # Newer mounts have the -s (sloppy) option to ignore unknown options,
+ # good for portability
+ #
+-if test -n "$MOUNT" ; then
++# Check whether --enable-sloppy-mount was given.
++if test "${enable_sloppy_mount+set}" = set; then :
++  enableval=$enable_sloppy_mount;
++else
++  enable_sloppy_mount=auto
++fi
++
++if test x$enable_sloppy_mount = xauto; then
++	if test -n "$MOUNT" ; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if mount accepts the -s option" >&5
+ $as_echo_n "checking if mount accepts the -s option... " >&6; }
+   if "$MOUNT" -s > /dev/null 2>&1 ; then
+-
+-$as_echo "#define HAVE_SLOPPY_MOUNT 1" >>confdefs.h
+-
++    enable_sloppy_mount=yes
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+   else
+@@ -3872,6 +3897,12 @@ $as_echo "yes" >&6; }
+ $as_echo "no" >&6; }
+   fi
+ fi
++fi
++if test x$enable_sloppy_mount = xyes; then
++
++$as_echo "#define HAVE_SLOPPY_MOUNT 1" >>confdefs.h
++
++fi
+ 
+ # LDAP SASL auth needs libxml and Kerberos
+ for ac_prog in xml2-config
+@@ -3894,7 +3925,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_XML_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3969,7 +4000,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -4387,7 +4418,7 @@ do
+     for ac_prog in grep ggrep; do
+     for ac_exec_ext in '' $ac_executable_extensions; do
+       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
++      as_fn_executable_p "$ac_path_GREP" || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+   # Check for GNU $ac_path_GREP
+ case `"$ac_path_GREP" --version 2>&1` in
+@@ -4453,7 +4484,7 @@ do
+     for ac_prog in egrep; do
+     for ac_exec_ext in '' $ac_executable_extensions; do
+       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++      as_fn_executable_p "$ac_path_EGREP" || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+   # Check for GNU $ac_path_EGREP
+ case `"$ac_path_EGREP" --version 2>&1` in
+@@ -4928,7 +4959,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_CC="${ac_tool_prefix}gcc"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -4968,7 +4999,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_ac_ct_CC="gcc"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -5021,7 +5052,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_CC="${ac_tool_prefix}cc"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -5062,7 +5093,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+        continue
+@@ -5120,7 +5151,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -5164,7 +5195,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_prog_ac_ct_CC="$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -5360,8 +5391,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdarg.h>
+ #include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
++struct stat;
+ /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+ struct buf { int x; };
+ FILE * (*rcsopen) (struct buf *, struct stat *, int);
+@@ -5882,16 +5912,16 @@ if (echo >conf$$.file) 2>/dev/null; then
+     # ... but there are two gotchas:
+     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+-    # In both cases, we have to default to `cp -p'.
++    # In both cases, we have to default to `cp -pR'.
+     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+-      as_ln_s='cp -p'
++      as_ln_s='cp -pR'
+   elif ln conf$$.file conf$$ 2>/dev/null; then
+     as_ln_s=ln
+   else
+-    as_ln_s='cp -p'
++    as_ln_s='cp -pR'
+   fi
+ else
+-  as_ln_s='cp -p'
++  as_ln_s='cp -pR'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+@@ -5951,28 +5981,16 @@ else
+   as_mkdir_p=false
+ fi
+ 
+-if test -x / >/dev/null 2>&1; then
+-  as_test_x='test -x'
+-else
+-  if ls -dL / >/dev/null 2>&1; then
+-    as_ls_L_option=L
+-  else
+-    as_ls_L_option=
+-  fi
+-  as_test_x='
+-    eval sh -c '\''
+-      if test -d "$1"; then
+-	test -d "$1/.";
+-      else
+-	case $1 in #(
+-	-*)set "./$1";;
+-	esac;
+-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+-	???[sx]*):;;*)false;;esac;fi
+-    '\'' sh
+-  '
+-fi
+-as_executable_p=$as_test_x
++
++# as_fn_executable_p FILE
++# -----------------------
++# Test if FILE is an executable regular file.
++as_fn_executable_p ()
++{
++  test -f "$1" && test -x "$1"
++} # as_fn_executable_p
++as_test_x='test -x'
++as_executable_p=as_fn_executable_p
+ 
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -5994,7 +6012,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ # values after options handling.
+ ac_log="
+ This file was extended by $as_me, which was
+-generated by GNU Autoconf 2.68.  Invocation command line was
++generated by GNU Autoconf 2.69.  Invocation command line was
+ 
+   CONFIG_FILES    = $CONFIG_FILES
+   CONFIG_HEADERS  = $CONFIG_HEADERS
+@@ -6056,10 +6074,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ config.status
+-configured by $0, generated by GNU Autoconf 2.68,
++configured by $0, generated by GNU Autoconf 2.69,
+   with options \\"\$ac_cs_config\\"
+ 
+-Copyright (C) 2010 Free Software Foundation, Inc.
++Copyright (C) 2012 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+ 
+@@ -6147,7 +6165,7 @@ fi
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ if \$ac_cs_recheck; then
+-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+   shift
+   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+   CONFIG_SHELL='$SHELL'
+diff --git a/configure.in b/configure.in
+index 4029375..559045a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -157,7 +157,15 @@ AC_SUBST(sssldir)
+ # Newer mounts have the -s (sloppy) option to ignore unknown options,
+ # good for portability
+ #
+-AF_SLOPPY_MOUNT()
++AC_ARG_ENABLE(sloppy-mount,
++[  --enable-sloppy-mount   enable the use of the -s option to mount],,
++	enable_sloppy_mount=auto)
++if test x$enable_sloppy_mount = xauto; then
++	AF_SLOPPY_MOUNT()
++fi
++if test x$enable_sloppy_mount = xyes; then
++	AC_DEFINE(HAVE_SLOPPY_MOUNT, 1, [define if the mount command supports the -s option])
++fi
+ 
+ # LDAP SASL auth needs libxml and Kerberos
+ AF_CHECK_LIBXML()
diff --git a/autofs-5.0.7-document-allowed-map-sources-in-auto_master.patch b/autofs-5.0.7-document-allowed-map-sources-in-auto_master.patch
new file mode 100644
index 0000000..737b5d1
--- /dev/null
+++ b/autofs-5.0.7-document-allowed-map-sources-in-auto_master.patch
@@ -0,0 +1,48 @@
+autofs-5.0.7 - document allowed map sources in auto.master
+
+From: Ian Kent <raven at themaw.net>
+
+Direct map may have multiple map sources but indirect maps may have
+only one map source.
+---
+ CHANGELOG            |    1 +
+ man/auto.master.5.in |    7 +++++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 4576d47..61edddf 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -41,6 +41,7 @@
+ - syncronize handle_mounts() shutdown.
+ - fix submount tree not all expiring.
+ - make dump maps check for duplicate indirect mounts.
++- document allowed map sources in auto.master.
+ 
+ 25/07/2012 autofs-5.0.7
+ =======================
+diff --git a/man/auto.master.5.in b/man/auto.master.5.in
+index c552e56..7907ffa 100644
+--- a/man/auto.master.5.in
++++ b/man/auto.master.5.in
+@@ -40,7 +40,8 @@ For direct maps the mount point is always specified as:
+ .P
+ /-
+ .P
+-and the key used within the direct map is the full path to the mount point.
++and the key used within the direct map is the full path to the mount point. The direct map
++may have multiple entries in the master map.
+ .P
+ For indirect maps access is by using the path scheme:
+ .P
+@@ -60,7 +61,9 @@ present in the master map by including a line of the form:
+ and 
+ .BR automount (8)
+ will process the map according to the specification described below for
+-map entries.
++map entries. Indirect map entries must be unique in the master map so
++second and subsequent entries for an indirect mount point are ignored by
++.BR automount (8).
+ .SH "FORMAT"
+ Master map entries have three fields separated by an arbitrary number
+ of spaces or tabs. Lines beginning with # are comments. The first field
diff --git a/autofs-5.0.7-fix-submount-tree-not-all-expiring.patch b/autofs-5.0.7-fix-submount-tree-not-all-expiring.patch
new file mode 100644
index 0000000..09ed383
--- /dev/null
+++ b/autofs-5.0.7-fix-submount-tree-not-all-expiring.patch
@@ -0,0 +1,70 @@
+autofs-5.0.7 - fix submount tree not all expiring
+
+From: Ian Kent <ikent at redhat.com>
+
+Due to the change in the expire-specific-submount-only patch, sub-mounts
+within an indirect mount that follow a submount (in the check order) won't
+be expired if that submount is busy.
+---
+ CHANGELOG    |    1 +
+ lib/master.c |   24 +++++++++++++++---------
+ 2 files changed, 16 insertions(+), 9 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index f1ec1e5..4106e7f 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -39,6 +39,7 @@
+ - document browse option in man page.
+ - fix some automount(8) typos.
+ - syncronize handle_mounts() shutdown.
++- fix submount tree not all expiring.
+ 
+ 25/07/2012 autofs-5.0.7
+ =======================
+diff --git a/lib/master.c b/lib/master.c
+index a0e62f2..64dbcb1 100644
+--- a/lib/master.c
++++ b/lib/master.c
+@@ -905,15 +905,24 @@ int master_notify_submount(struct autofs_point *ap, const char *path, enum state
+ 		this = list_entry(p, struct autofs_point, mounts);
+ 		p = p->prev;
+ 
+-		if (!master_submount_list_empty(this)) {
+-			mounts_mutex_unlock(ap);
+-			return master_notify_submount(this, path, state);
+-		}
+-
+ 		/* path not the same */
+ 		if (strcmp(this->path, path))
+ 			continue;
+ 
++		if (!master_submount_list_empty(this)) {
++			char *this_path = strdup(this->path);
++			if (this_path) {
++				mounts_mutex_unlock(ap);
++				master_notify_submount(this, path, state);
++				mounts_mutex_lock(ap);
++				if (!__master_find_submount(ap, this_path)) {
++					free(this_path);
++					continue;
++				}
++				free(this_path);
++			}
++		}
++
+ 		/* Now we have found the submount we want to expire */
+ 
+ 		st_mutex_lock();
+@@ -959,10 +968,7 @@ int master_notify_submount(struct autofs_point *ap, const char *path, enum state
+ 			st_mutex_lock();
+ 		}
+ 		st_mutex_unlock();
+-		mounts_mutex_unlock(ap);
+-
+-		return ret;
+-
++		break;
+ 	}
+ 
+ 	mounts_mutex_unlock(ap);
diff --git a/autofs-5.0.7-make-dump-maps-check-for-duplicate-indirect-mounts.patch b/autofs-5.0.7-make-dump-maps-check-for-duplicate-indirect-mounts.patch
new file mode 100644
index 0000000..abadcb5
--- /dev/null
+++ b/autofs-5.0.7-make-dump-maps-check-for-duplicate-indirect-mounts.patch
@@ -0,0 +1,64 @@
+autofs-5.0.7 - make dump maps check for duplicate indirect mounts
+
+From: Ian Kent <raven at themaw.net>
+
+The dumpmaps function was intended for users to find out how the configured
+mounts would be seen by automount. It does a limited amount of checking and
+in particular doesn't report that duplicate indirect map sources will be
+ignored at runtime.
+---
+ CHANGELOG    |    1 +
+ lib/master.c |    7 +++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 4106e7f..4576d47 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -40,6 +40,7 @@
+ - fix some automount(8) typos.
+ - syncronize handle_mounts() shutdown.
+ - fix submount tree not all expiring.
++- make dump maps check for duplicate indirect mounts.
+ 
+ 25/07/2012 autofs-5.0.7
+ =======================
+diff --git a/lib/master.c b/lib/master.c
+index 64dbcb1..eca3523 100644
+--- a/lib/master.c
++++ b/lib/master.c
+@@ -1310,6 +1310,7 @@ int master_show_mounts(struct master *master)
+ 		struct master_mapent *this;
+ 		struct autofs_point *ap;
+ 		time_t now = time(NULL);
++		unsigned int count = 0;
+ 		int i;
+ 
+ 		this = list_entry(p, struct master_mapent, list);
+@@ -1318,6 +1319,7 @@ int master_show_mounts(struct master *master)
+ 		ap = this->ap;
+ 
+ 		printf("\nMount point: %s\n", ap->path);
++
+ 		printf("\nsource(s):\n");
+ 
+ 		/*
+@@ -1360,6 +1362,9 @@ int master_show_mounts(struct master *master)
+ 					printf("  map: %s\n", source->argv[0]);
+ 					i = 1;
+ 				}
++				if (count && ap->type == LKP_INDIRECT)
++					printf("  duplicate indirect map entry"
++					       " will be ignored at run time\n");
+ 				if (source->argc > 1) {
+ 					printf("  arguments: ");
+ 					for (; i < source->argc; i++)
+@@ -1379,6 +1384,8 @@ int master_show_mounts(struct master *master)
+ 				} while ((me = cache_lookup_next(source->mc, me)));
+ 			}
+ 
++			count++;
++
+ 			source = source->next;
+ 		}
+ 
diff --git a/autofs-5.0.7-syncronize-handle_mounts-shutdown.patch b/autofs-5.0.7-syncronize-handle_mounts-shutdown.patch
new file mode 100644
index 0000000..25b40aa
--- /dev/null
+++ b/autofs-5.0.7-syncronize-handle_mounts-shutdown.patch
@@ -0,0 +1,73 @@
+autofs-5.0.7 - syncronize handle_mounts() shutdown
+
+From: Ian Kent <ikent at redhat.com>
+
+When re-reading the master map the signal handler thread receives
+a SIGTERM signal from handle_mounts_cleanup() for map entries that
+have been removed. This is done to allow joining with handle_mounts()
+threads before shutting down to ensure clean up has been completed
+before the thread terminates.
+
+But, if more than one map entry is removed, multiple threads may be
+cleaned up during the handling of a single signal so there can be no
+work to do when a subsequent signal is received. In this case the
+signal handler thread interprets the additional SIGTERM signal as a
+request to shutdown and exits.
+---
+ CHANGELOG          |    1 +
+ daemon/automount.c |    9 +++++++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 488ad1e..f1ec1e5 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -38,6 +38,7 @@
+ - fix systemd unidir in spec file.
+ - document browse option in man page.
+ - fix some automount(8) typos.
++- syncronize handle_mounts() shutdown.
+ 
+ 25/07/2012 autofs-5.0.7
+ =======================
+diff --git a/daemon/automount.c b/daemon/automount.c
+index 4c651cf..3f9337f 100644
+--- a/daemon/automount.c
++++ b/daemon/automount.c
+@@ -1285,7 +1285,8 @@ static int do_hup_signal(struct master *master, time_t age)
+ 	nfs_mount_uses_string_options = check_nfs_mount_version(&vers, &check);
+ 
+ 	master_mutex_lock();
+-	if (master->reading) {
++	/* Already doing a map read or shutdown or no mounts */
++	if (master->reading || list_empty(&master->mounts)) {
+ 		status = pthread_mutex_unlock(&mrc.mutex);
+ 		if (status)
+ 			fatal(status);
+@@ -1449,6 +1450,7 @@ static void handle_mounts_cleanup(void *arg)
+ 	char path[PATH_MAX + 1];
+ 	char buf[MAX_ERR_BUF];
+ 	unsigned int clean = 0, submount, logopt;
++	unsigned int pending = 0;
+ 
+ 	ap = (struct autofs_point *) arg;
+ 
+@@ -1466,6 +1468,9 @@ static void handle_mounts_cleanup(void *arg)
+ 		list_del_init(&ap->mounts);
+ 	}
+ 
++	/* Don't signal the handler if we have already done so */
++	if (!list_empty(&master_list->completed))
++		pending = 1;
+ 	master_remove_mapent(ap->entry);
+ 	master_source_unlock(ap->entry);
+ 
+@@ -1498,7 +1503,7 @@ static void handle_mounts_cleanup(void *arg)
+ 	 * so it can join with any completed handle_mounts() threads and
+ 	 * perform final cleanup.
+ 	 */
+-	if (!submount)
++	if (!submount && !pending)
+ 		pthread_kill(state_mach_thid, SIGTERM);
+ 
+ 	master_mutex_unlock();
diff --git a/autofs.spec b/autofs.spec
index a35eea5..eb71b3f 100644
--- a/autofs.spec
+++ b/autofs.spec
@@ -8,7 +8,7 @@
 Summary: A tool for automatically mounting and unmounting filesystems
 Name: autofs
 Version: 5.0.7
-Release: 13%{?dist}
+Release: 16%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: System Environment/Daemons
@@ -55,6 +55,11 @@ Patch39: autofs-5.0.7-fix-systemd-unidir-in-spec-file.patch
 Patch40: autofs-5.0.7-document-browse-option-in-man-page.patch
 Patch41: autofs-5.0.7-fix-automounter-support-on-parisc.patch
 Patch42: autofs-5.0.7-fix-some-automount_8-typos.patch
+Patch43: autofs-5.0.7-syncronize-handle_mounts-shutdown.patch
+Patch44: autofs-5.0.7-fix-submount-tree-not-all-expiring.patch
+Patch45: autofs-5.0.7-make-dump-maps-check-for-duplicate-indirect-mounts.patch
+Patch46: autofs-5.0.7-document-allowed-map-sources-in-auto_master.patch
+Patch47: autofs-5.0.7-add-enable-sloppy-mount-option-to-configure.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %if %{with_systemd}
 BuildRequires: systemd-units
@@ -153,6 +158,11 @@ echo %{version}-%{release} > .version
 %patch40 -p1
 %patch41 -p1
 %patch42 -p1
+%patch43 -p1
+%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
 
 %build
 #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -244,6 +254,13 @@ fi
 %dir /etc/auto.master.d
 
 %changelog
+* Mon May 13 2013 Ian Kent <ikent at redhat.com> - 1:5.0.7-16
+- make dump maps check for duplicate indirect mounts (bz961312).
+- document allowed map sources in auto.master(5) (bz961312).
+- add enable sloppy mount option to configure.
+- fix syncronize of handle_mounts() shutdown.
+- fix submount tree not all expiring.
+
 * Tue Mar 26 2013 Ian Kent <ikent at redhat.com> - 1:5.0.7-13
 - fix some automount(8) typos (bz664178).
 


More information about the scm-commits mailing list