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

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