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

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