]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
build-sys: Remove --with-rootprefix option
authorDave Reisner <dreisner@archlinux.org>
Thu, 27 Sep 2012 15:00:42 +0000 (11:00 -0400)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 2 Oct 2012 03:27:31 +0000 (00:27 -0300)
This is a broken option that only leads to misery and incompatabilities
with other systems. Kbuild doesn't come close to supporting directories
other than /lib/modules with several targets simply failing without
hacky fixes. Simply remove the option and all traces of it, as it
doesn't make sense in today's world.

Makefile.am
configure.ac
libkmod/libkmod.c
tools/depmod.c
tools/modinfo.c
tools/modprobe.c

index 8e8bcc0350204f738886aad2075961b8e3c23c1a..56f00c2fb88c70c0c778688d859e169dd929987d 100644 (file)
@@ -13,7 +13,6 @@ AM_MAKEFLAGS = --no-print-directory
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
        -I$(top_srcdir)/libkmod \
-       -DROOTPREFIX=\""$(rootprefix)"\" \
        -DSYSCONFDIR=\""$(sysconfdir)"\" \
        -DLIBEXECDIR=\""$(libexecdir)"\" \
        ${zlib_CFLAGS}
index 901780b3f65029286dfe2da4677a26e58a28ccbb..2e9124c0b0f9183dd4fe953ae3c0dcb42b29df61 100644 (file)
@@ -49,11 +49,6 @@ AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])
 # --with-
 #####################################################################
 
-AC_ARG_WITH([rootprefix],
-        AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
-        [], [with_rootprefix=""])
-AC_SUBST([rootprefix], [$with_rootprefix])
-
 AC_ARG_WITH([rootlibdir],
         AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
         [], [with_rootlibdir=$libdir])
@@ -190,7 +185,6 @@ AC_MSG_RESULT([
        ======
 
        prefix:                 ${prefix}
-       rootprefix:             ${rootprefix}
        sysconfdir:             ${sysconfdir}
        libdir:                 ${libdir}
        rootlibdir:             ${rootlibdir}
index 14a8f1f0d3f65863e1e8434a8606be719aec9f6f..f8984382e97701cfde11f12c0e2a5a73e17e306d 100644 (file)
@@ -61,7 +61,7 @@ static struct _index_files {
 static const char *default_config_paths[] = {
        SYSCONFDIR "/modprobe.d",
        "/run/modprobe.d",
-       ROOTPREFIX "/lib/modprobe.d",
+       "/lib/modprobe.d",
        NULL
 };
 
@@ -195,7 +195,7 @@ static int log_priority(const char *priority)
        return 0;
 }
 
-static const char *dirname_default_prefix = ROOTPREFIX "/lib/modules";
+static const char *dirname_default_prefix = "/lib/modules";
 
 static char *get_kernel_release(const char *dirname)
 {
@@ -217,16 +217,15 @@ static char *get_kernel_release(const char *dirname)
 /**
  * kmod_new:
  * @dirname: what to consider as linux module's directory, if NULL
- *           defaults to $rootprefix/lib/modules/`uname -r`. If it's relative,
+ *           defaults to /lib/modules/`uname -r`. If it's relative,
  *           it's treated as relative to current the current working
  *           directory. Otherwise, give an absolute dirname.
  * @config_paths: ordered array of paths (directories or files) where
  *                to load from user-defined configuration parameters such as
  *                alias, blacklists, commands (install, remove). If
  *                NULL defaults to /run/modprobe.d, /etc/modprobe.d and
- *                $rootprefix/lib/modprobe.d. Give an empty vector if
- *                configuration should not be read. This array must be null
- *                terminated.
+ *                /lib/modprobe.d. Give an empty vector if configuration should
+ *                not be read. This array must be null terminated.
  *
  * Create kmod library context. This reads the kmod configuration
  * and fills in the default values.
index 834bb059cfc39fafa749d1cf34dc72925b542699..0bf2deaf3156716eaf82ccd170fc7b45be104851 100644 (file)
@@ -57,7 +57,7 @@ static const char CFG_BUILTIN_KEY[] = "built-in";
 static const char *default_cfg_paths[] = {
        "/run/depmod.d",
        SYSCONFDIR "/depmod.d",
-       ROOTPREFIX "/lib/depmod.d",
+       "/lib/depmod.d",
        NULL
 };
 
@@ -2649,7 +2649,7 @@ static int do_depmod(int argc, char *argv[])
        }
 
        cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX,
-                                 "%s" ROOTPREFIX "/lib/modules/%s",
+                                 "%s/lib/modules/%s",
                                  root == NULL ? "" : root, cfg.kversion);
 
        if (optind == argc)
index b506f10e79a8bd53700006bcf04739d18a02f628..dc41997262cba7ef7b9ed8e6b95421a6e24c1792 100644 (file)
@@ -339,7 +339,7 @@ static void help(const char *progname)
                "\t-0, --null                  Use \\0 instead of \\n\n"
                "\t-F, --field=FIELD           Print only provided FIELD\n"
                "\t-k, --set-version=VERSION   Use VERSION instead of `uname -r`\n"
-               "\t-b, --basedir=DIR           Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n"
+               "\t-b, --basedir=DIR           Use DIR as filesystem root for /lib/modules\n"
                "\t-V, --version               Show version\n"
                "\t-h, --help                  Show this help\n",
                progname);
@@ -439,7 +439,7 @@ static int do_modinfo(int argc, char *argv[])
                        }
                        kversion = u.release;
                }
-               snprintf(dirname_buf, sizeof(dirname_buf), "%s" ROOTPREFIX "/lib/modules/%s",
+               snprintf(dirname_buf, sizeof(dirname_buf), "%s/lib/modules/%s",
                         root, kversion);
                dirname = dirname_buf;
        }
index b108112ff8c92a522e0242a6f0768efbfd9d9a6a..b8a64153916ce1ed2d9ac8238168551f38c72bd4 100644 (file)
@@ -128,7 +128,7 @@ static void help(const char *progname)
                "\t-n, --show                  Same as --dry-run\n"
 
                "\t-C, --config=FILE           Use FILE instead of default search paths\n"
-               "\t-d, --dirname=DIR           Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n"
+               "\t-d, --dirname=DIR           Use DIR as filesystem root for /lib/modules\n"
                "\t-S, --set-version=VERSION   Use VERSION instead of `uname -r`\n"
 
                "\t-s, --syslog                print to syslog, not stderr\n"
@@ -979,7 +979,7 @@ static int do_modprobe(int argc, char **orig_argv)
                        kversion = u.release;
                }
                snprintf(dirname_buf, sizeof(dirname_buf),
-                               "%s" ROOTPREFIX "/lib/modules/%s", root,
+                               "%s/lib/modules/%s", root,
                                kversion);
                dirname = dirname_buf;
        }