Blame SOURCES/autofs-5.1.4-remove-autofs4-module-load-code.patch

135b98
autofs-5.1.4 - remove autofs4 module load code
135b98
135b98
From: Ian Kent <raven@themaw.net>
135b98
135b98
The autofs kernel module has finally been renamed from autofs4 to
135b98
autofs so autoloading works so there is no need for manual loading.
135b98
135b98
The module load function has been commented out in the source for
135b98
a long time so there should not be any adverse affects from removing
135b98
it.
135b98
135b98
Signed-off-by: Ian Kent <raven@themaw.net>
135b98
---
135b98
 CHANGELOG           |    1 
135b98
 configure           |   61 ----------------------------------------------------
135b98
 configure.in        |    1 
135b98
 daemon/automount.c  |    8 ------
135b98
 daemon/module.c     |   35 -----------------------------
135b98
 include/automount.h |    7 -----
135b98
 include/config.h.in |    6 -----
135b98
 7 files changed, 1 insertion(+), 118 deletions(-)
135b98
135b98
--- autofs-5.1.4.orig/CHANGELOG
135b98
+++ autofs-5.1.4/CHANGELOG
135b98
@@ -38,6 +38,7 @@ xx/xx/2018 autofs-5.1.5
135b98
 - fix amd parser opts option handling.
135b98
 - better handle hesiod support not built in.
135b98
 - fix hesiod string check in master_parse().
135b98
+- remove autofs4 module load code.
135b98
 
135b98
 19/12/2017 autofs-5.1.4
135b98
 - fix spec file url.
135b98
--- autofs-5.1.4.orig/configure
135b98
+++ autofs-5.1.4/configure
135b98
@@ -659,8 +659,6 @@ PATH_YACC
135b98
 YACC
135b98
 PATH_LEX
135b98
 LEX
135b98
-HAVE_MODPROBE
135b98
-MODPROBE
135b98
 HAVE_E4FSCK
135b98
 E4FSCK
135b98
 HAVE_E3FSCK
135b98
@@ -4155,65 +4153,6 @@ else
135b98
   HAVE_E4FSCK=0
135b98
 fi
135b98
 
135b98
-for ac_prog in modprobe
135b98
-do
135b98
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
135b98
-set dummy $ac_prog; ac_word=$2
135b98
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
135b98
-$as_echo_n "checking for $ac_word... " >&6; }
135b98
-if ${ac_cv_path_MODPROBE+:} false; then :
135b98
-  $as_echo_n "(cached) " >&6
135b98
-else
135b98
-  case $MODPROBE in
135b98
-  [\\/]* | ?:[\\/]*)
135b98
-  ac_cv_path_MODPROBE="$MODPROBE" # Let the user override the test with a path.
135b98
-  ;;
135b98
-  *)
135b98
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135b98
-for as_dir in $searchpath
135b98
-do
135b98
-  IFS=$as_save_IFS
135b98
-  test -z "$as_dir" && as_dir=.
135b98
-    for ac_exec_ext in '' $ac_executable_extensions; do
135b98
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
135b98
-    ac_cv_path_MODPROBE="$as_dir/$ac_word$ac_exec_ext"
135b98
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
135b98
-    break 2
135b98
-  fi
135b98
-done
135b98
-  done
135b98
-IFS=$as_save_IFS
135b98
-
135b98
-  ;;
135b98
-esac
135b98
-fi
135b98
-MODPROBE=$ac_cv_path_MODPROBE
135b98
-if test -n "$MODPROBE"; then
135b98
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MODPROBE" >&5
135b98
-$as_echo "$MODPROBE" >&6; }
135b98
-else
135b98
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
135b98
-$as_echo "no" >&6; }
135b98
-fi
135b98
-
135b98
-
135b98
-  test -n "$MODPROBE" && break
135b98
-done
135b98
-
135b98
-if test -n "$MODPROBE"; then
135b98
-
135b98
-$as_echo "#define HAVE_MODPROBE 1" >>confdefs.h
135b98
-
135b98
-
135b98
-cat >>confdefs.h <<_ACEOF
135b98
-#define PATH_MODPROBE "$MODPROBE"
135b98
-_ACEOF
135b98
-
135b98
-  HAVE_MODPROBE=1
135b98
-else
135b98
-  HAVE_MODPROBE=0
135b98
-fi
135b98
-
135b98
 
135b98
 for ac_prog in flex lex
135b98
 do
135b98
--- autofs-5.1.4.orig/configure.in
135b98
+++ autofs-5.1.4/configure.in
135b98
@@ -161,7 +161,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umo
135b98
 AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath)
135b98
 AF_PATH_INCLUDE(E3FSCK, fsck.ext3 e3fsck, , $searchpath)
135b98
 AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck, , $searchpath)
135b98
-AF_PATH_INCLUDE(MODPROBE, modprobe, , $searchpath)
135b98
 
135b98
 AF_CHECK_PROG(LEX, flex lex, , $searchpath)
135b98
 AF_CHECK_PROG(YACC, bison, , $searchpath)
135b98
--- autofs-5.1.4.orig/daemon/automount.c
135b98
+++ autofs-5.1.4/daemon/automount.c
135b98
@@ -2336,14 +2336,6 @@ int main(int argc, char *argv[])
135b98
 		exit(exit_code);
135b98
 	}
135b98
 
135b98
-#if 0
135b98
-	if (!load_autofs4_module()) {
135b98
-		fprintf(stderr, "%s: can't load %s filesystem module.\n",
135b98
-			program, FS_MODULE_NAME);
135b98
-		exit(1);
135b98
-	}
135b98
-#endif
135b98
-
135b98
 	/* Don't need the kernel module just to look at the configured maps */
135b98
 	if (!dumpmaps && (!query_kproto_ver() || get_kver_major() < 5)) {
135b98
 		fprintf(stderr,
135b98
--- autofs-5.1.4.orig/daemon/module.c
135b98
+++ autofs-5.1.4/daemon/module.c
135b98
@@ -19,41 +19,6 @@
135b98
 #include "automount.h"
135b98
 #include "nsswitch.h"
135b98
 
135b98
-int load_autofs4_module(void)
135b98
-{
135b98
-	FILE *fp;
135b98
-	char buf[PATH_MAX];
135b98
-	int ret;
135b98
-
135b98
-	/*
135b98
-	 * Check if module already loaded or compiled in.
135b98
-	 * If both autofs v3 and v4 are coplied in and
135b98
-	 * the v3 module registers first or the v4 module
135b98
-	 * is an older version we will catch it at mount
135b98
-	 * time.
135b98
-	 */
135b98
-	fp = open_fopen_r("/proc/filesystems");
135b98
-	if (!fp) {
135b98
-		logerr("cannot open /proc/filesystems");
135b98
-		return 0;
135b98
-	}
135b98
-
135b98
-	while (fgets(buf, sizeof(buf), fp)) {
135b98
-		if (strstr(buf, "autofs")) {
135b98
-			fclose(fp);
135b98
-			return 1;
135b98
-		}
135b98
-	}
135b98
-	fclose(fp);
135b98
-
135b98
-	ret = spawnl(LOGOPT_NONE, PATH_MODPROBE, PATH_MODPROBE,
135b98
-				"-q", FS_MODULE_NAME, NULL);
135b98
-	if (ret)
135b98
-		return 0;
135b98
-
135b98
-	return 1;
135b98
-}
135b98
-
135b98
 int open_lookup(const char *name, const char *err_prefix, const char *mapfmt,
135b98
 		int argc, const char *const *argv, struct lookup_mod **lookup)
135b98
 {
135b98
--- autofs-5.1.4.orig/include/automount.h
135b98
+++ autofs-5.1.4/include/automount.h
135b98
@@ -52,17 +52,10 @@
135b98
 #error Failed to locate umount(8)!
135b98
 #endif
135b98
 
135b98
-#ifndef HAVE_MODPROBE
135b98
-#error Failed to locate modprobe(8)!
135b98
-#endif
135b98
-
135b98
 #ifndef HAVE_LINUX_PROCFS
135b98
 #error Failed to verify existence of procfs filesystem!
135b98
 #endif
135b98
 
135b98
-#define FS_MODULE_NAME  "autofs4"
135b98
-int load_autofs4_module(void);
135b98
-
135b98
 /* The -s (sloppy) option to mount is good, if we have it... */
135b98
 
135b98
 #ifdef HAVE_SLOPPY_MOUNT
135b98
--- autofs-5.1.4.orig/include/config.h.in
135b98
+++ autofs-5.1.4/include/config.h.in
135b98
@@ -48,9 +48,6 @@
135b98
 /* Define to 1 if you have the <memory.h> header file. */
135b98
 #undef HAVE_MEMORY_H
135b98
 
135b98
-/* define if you have MODPROBE */
135b98
-#undef HAVE_MODPROBE
135b98
-
135b98
 /* define if you have MOUNT */
135b98
 #undef HAVE_MOUNT
135b98
 
135b98
@@ -129,9 +126,6 @@
135b98
 /* define if you have LEX */
135b98
 #undef PATH_LEX
135b98
 
135b98
-/* define if you have MODPROBE */
135b98
-#undef PATH_MODPROBE
135b98
-
135b98
 /* define if you have MOUNT */
135b98
 #undef PATH_MOUNT
135b98