From 58587a1382cc460669851afa025aa2bee9ed044bd416804e610ce2b4a7bd4a73 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 30 Sep 2023 00:22:25 +0000 Subject: [PATCH] - Update to release 31 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=231 --- ...-repair-read-of-uninitialized-memory.patch | 33 -- ...t-filtering-of-unsupported-modules-o.patch | 57 ++-- configure-Detect-openssl-sm3-support.patch | 19 +- depmod-Introduce-outdir-option.patch | 288 ---------------- kmod-30.tar.sign | 16 - kmod-30.tar.xz | 3 - kmod-31.tar.sign | 16 + kmod-31.tar.xz | 3 + ...ig-file-with-kmod-compile-time-confi.patch | 60 ++-- kmod-testsuite.spec | 7 +- kmod.changes | 16 + kmod.spec | 7 +- testsuite-Handle-different-sysconfdir.patch | 178 ---------- ...etup-rootfs-logic-from-Makefile-to-s.patch | 91 ------ ...-use-defines-for-the-rootfs-lib_modu.patch | 193 ----------- usr-lib-modules.patch | 308 +++++++++--------- 16 files changed, 254 insertions(+), 1041 deletions(-) delete mode 100644 0001-testsuite-repair-read-of-uninitialized-memory.patch delete mode 100644 depmod-Introduce-outdir-option.patch delete mode 100644 kmod-30.tar.sign delete mode 100644 kmod-30.tar.xz create mode 100644 kmod-31.tar.sign create mode 100644 kmod-31.tar.xz delete mode 100644 testsuite-Handle-different-sysconfdir.patch delete mode 100644 testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch delete mode 100644 testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch diff --git a/0001-testsuite-repair-read-of-uninitialized-memory.patch b/0001-testsuite-repair-read-of-uninitialized-memory.patch deleted file mode 100644 index e5781e9..0000000 --- a/0001-testsuite-repair-read-of-uninitialized-memory.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 16c086f48c2270ad6412ad7226df53079f825270 Mon Sep 17 00:00:00 2001 -From: Jan Engelhardt -Date: Thu, 30 Jun 2022 18:47:25 +0200 -Subject: [PATCH] testsuite: repair read of uninitialized memory -References: https://github.com/kmod-project/kmod/pull/15 -References: https://github.com/kmod-project/kmod/issues/14 - -Function ``test_backoff_time`` does not initialize ``delta``, and -``get_backoff_delta_msec`` then performs a read from uninitialized -memory with the ``!*delta`` expression. - -Signed-off-by: Jan Engelhardt -Signed-off-by: Lucas De Marchi ---- - testsuite/test-util.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testsuite/test-util.c b/testsuite/test-util.c -index fb8c9ef..5766584 100644 ---- a/testsuite/test-util.c -+++ b/testsuite/test-util.c -@@ -231,7 +231,7 @@ DEFINE_TEST(test_addu64_overflow, - - static int test_backoff_time(const struct test *t) - { -- unsigned long long delta; -+ unsigned long long delta = 0; - - /* Check exponential increments */ - get_backoff_delta_msec(now_msec(), now_msec() + 10, &delta); --- -2.36.1 - diff --git a/0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch b/0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch index 7d73b32..ef7c583 100644 --- a/0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch +++ b/0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch @@ -7,16 +7,16 @@ Subject: [PATCH 3/6] libkmod: Implement filtering of unsupported modules (off References: fate#316971 Patch-mainline: never --- - libkmod/libkmod-config.c | 12 ++++++++++-- - libkmod/libkmod-internal.h | 1 + - libkmod/libkmod-module.c | 31 +++++++++++++++++++++++++++++++ + libkmod/libkmod-config.c | 12 ++++++++++-- + libkmod/libkmod-internal.h | 1 + + libkmod/libkmod-module.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) -diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c -index 1b24536..07d6a9e 100644 ---- a/libkmod/libkmod-config.c -+++ b/libkmod/libkmod-config.c -@@ -651,8 +651,16 @@ static int kmod_config_parse(struct kmod_config *config, int fd, +Index: kmod-31/libkmod/libkmod-config.c +=================================================================== +--- kmod-31.orig/libkmod/libkmod-config.c ++++ kmod-31/libkmod/libkmod-config.c +@@ -708,8 +708,16 @@ static int kmod_config_parse(struct kmod ERR(ctx, "%s: command %s is deprecated and not parsed anymore\n", filename, cmd); } else if (streq(cmd, "allow_unsupported_modules")) { @@ -35,11 +35,11 @@ index 1b24536..07d6a9e 100644 } else { syntax_error: ERR(ctx, "%s line %u: ignoring bad line starting with '%s'\n", -diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h -index a65ddd1..2ad74c7 100644 ---- a/libkmod/libkmod-internal.h -+++ b/libkmod/libkmod-internal.h -@@ -119,6 +119,7 @@ struct kmod_config { +Index: kmod-31/libkmod/libkmod-internal.h +=================================================================== +--- kmod-31.orig/libkmod/libkmod-internal.h ++++ kmod-31/libkmod/libkmod-internal.h +@@ -130,6 +130,7 @@ struct kmod_config { struct kmod_list *softdeps; struct kmod_list *paths; @@ -47,13 +47,13 @@ index a65ddd1..2ad74c7 100644 }; int kmod_config_new(struct kmod_ctx *ctx, struct kmod_config **config, const char * const *config_paths) __attribute__((nonnull(1, 2,3))); -diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c -index bffe715..9a3a35a 100644 ---- a/libkmod/libkmod-module.c -+++ b/libkmod/libkmod-module.c -@@ -798,6 +798,24 @@ KMOD_EXPORT int kmod_module_remove_module(struct kmod_module *mod, - - extern long init_module(const void *mem, unsigned long len, const char *args); +Index: kmod-31/libkmod/libkmod-module.c +=================================================================== +--- kmod-31.orig/libkmod/libkmod-module.c ++++ kmod-31/libkmod/libkmod-module.c +@@ -781,6 +781,24 @@ KMOD_EXPORT const char *kmod_module_get_ + return mod->name; + } +static int check_module_supported(struct kmod_module *mod) +{ @@ -74,17 +74,17 @@ index bffe715..9a3a35a 100644 +} + /** - * kmod_module_insert_module: + * kmod_module_get_path: * @mod: kmod module -@@ -823,6 +841,7 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod, - struct kmod_elf *elf; +@@ -959,6 +977,7 @@ KMOD_EXPORT int kmod_module_insert_modul + int err; const char *path; const char *args = options ? options : ""; + const struct kmod_config *config = kmod_get_config(mod->ctx); if (mod == NULL) return -ENOENT; -@@ -841,6 +860,18 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod, +@@ -977,6 +996,18 @@ KMOD_EXPORT int kmod_module_insert_modul } } @@ -100,9 +100,6 @@ index bffe715..9a3a35a 100644 + } + } + - if (kmod_file_get_direct(mod->file)) { - unsigned int kernel_flags = 0; - --- -2.20.1 - + err = do_finit_module(mod, flags, args); + if (err == -ENOSYS) + err = do_init_module(mod, flags, args); diff --git a/configure-Detect-openssl-sm3-support.patch b/configure-Detect-openssl-sm3-support.patch index 837db56..eff7781 100644 --- a/configure-Detect-openssl-sm3-support.patch +++ b/configure-Detect-openssl-sm3-support.patch @@ -9,15 +9,15 @@ automatically. Signed-off-by: Michal Suchanek --- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) + configure.ac | 7 +++++++ + 1 file changed, 7 insertions(+) -diff --git a/configure.ac b/configure.ac -index a1e64e190d2f..5a582cb5a2af 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -148,6 +148,13 @@ AS_IF([test "x$with_openssl" != "xno"], [ - PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0]) +Index: kmod-31/configure.ac +=================================================================== +--- kmod-31.orig/configure.ac ++++ kmod-31/configure.ac +@@ -140,6 +140,13 @@ AS_IF([test "x$with_openssl" != "xno"], + PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"]) AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.]) module_signatures="PKCS7 $module_signatures" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include @@ -30,6 +30,3 @@ index a1e64e190d2f..5a582cb5a2af 100644 ], [ AC_MSG_NOTICE([openssl support not requested]) ]) --- -2.41.0 - diff --git a/depmod-Introduce-outdir-option.patch b/depmod-Introduce-outdir-option.patch deleted file mode 100644 index 736d4bd..0000000 --- a/depmod-Introduce-outdir-option.patch +++ /dev/null @@ -1,288 +0,0 @@ -From 7e145ef8bd7a45fef6ee4cf56d7fab9f21d23e72 Mon Sep 17 00:00:00 2001 -From: Emil Velikov -Date: Mon, 6 Feb 2023 13:18:34 +0000 -Subject: [PATCH 5/9] depmod: Introduce outdir option - -This option is equivalent to basedir, with the small difference being -that's where the meta-data files are generated. In other words, this -allows us to have read-only input modules and modules.dep, while still -being able to generate the meta-data files. - -Signed-off-by: Emil Velikov -[ Move files to a different dir so input files (produced by kernel build - system is separate from the files generated by depmod (output) ] -Signed-off-by: Lucas De Marchi ---- - man/depmod.xml | 20 ++++++++++ - .../modules-outdir/correct-modules.alias | 37 +++++++++++++++++++ - .../modules-outdir/correct-modules.dep | 3 ++ - .../lib/modules/4.4.4/modules.builtin | 0 - .../lib/modules/4.4.4/modules.order | 7 ++++ - testsuite/setup-rootfs.sh | 3 ++ - testsuite/test-depmod.c | 36 ++++++++++++++++++ - tools/depmod.c | 25 +++++++++++-- - 8 files changed, 128 insertions(+), 3 deletions(-) - create mode 100644 testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.alias - create mode 100644 testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.dep - create mode 100644 testsuite/rootfs-pristine/test-depmod/modules-outdir/lib/modules/4.4.4/modules.builtin - create mode 100644 testsuite/rootfs-pristine/test-depmod/modules-outdir/lib/modules/4.4.4/modules.order - -diff --git a/man/depmod.xml b/man/depmod.xml -index ea0be27280b2..3b0097184fd7 100644 ---- a/man/depmod.xml -+++ b/man/depmod.xml -@@ -45,6 +45,7 @@ - - depmod - -+ - - - -@@ -151,6 +152,25 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Set the output directory where depmod will store any generated file. -+ outdir serves as a root to that location, -+ similar to how basedir is used. Also this -+ setting takes precedence and if used together with -+ basedir it will result in the input being -+ that directory, but the output being the one set by -+ outdir. -+ -+ -+ - - - -diff --git a/testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.alias b/testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.alias -new file mode 100644 -index 000000000000..56753291c47e ---- /dev/null -+++ b/testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.alias -@@ -0,0 +1,37 @@ -+# Aliases extracted from modules themselves. -+alias pci:v0000103Cd00003230sv0000103Csd0000323Dbc*sc*i* cciss -+alias pci:v0000103Cd00003230sv0000103Csd00003237bc*sc*i* cciss -+alias pci:v0000103Cd00003238sv0000103Csd00003215bc*sc*i* cciss -+alias pci:v0000103Cd00003238sv0000103Csd00003214bc*sc*i* cciss -+alias pci:v0000103Cd00003238sv0000103Csd00003213bc*sc*i* cciss -+alias pci:v0000103Cd00003238sv0000103Csd00003212bc*sc*i* cciss -+alias pci:v0000103Cd00003238sv0000103Csd00003211bc*sc*i* cciss -+alias pci:v0000103Cd00003230sv0000103Csd00003235bc*sc*i* cciss -+alias pci:v0000103Cd00003230sv0000103Csd00003234bc*sc*i* cciss -+alias pci:v0000103Cd00003230sv0000103Csd00003223bc*sc*i* cciss -+alias pci:v0000103Cd00003220sv0000103Csd00003225bc*sc*i* cciss -+alias pci:v00000E11d00000046sv00000E11sd0000409Dbc*sc*i* cciss -+alias pci:v00000E11d00000046sv00000E11sd0000409Cbc*sc*i* cciss -+alias pci:v00000E11d00000046sv00000E11sd0000409Bbc*sc*i* cciss -+alias pci:v00000E11d00000046sv00000E11sd0000409Abc*sc*i* cciss -+alias pci:v00000E11d00000046sv00000E11sd00004091bc*sc*i* cciss -+alias pci:v00000E11d0000B178sv00000E11sd00004083bc*sc*i* cciss -+alias pci:v00000E11d0000B178sv00000E11sd00004082bc*sc*i* cciss -+alias pci:v00000E11d0000B178sv00000E11sd00004080bc*sc*i* cciss -+alias pci:v00000E11d0000B060sv00000E11sd00004070bc*sc*i* cciss -+alias pci:v0000103Cd*sv*sd*bc01sc04i* hpsa -+alias pci:v0000103Cd0000323Bsv0000103Csd00003356bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Bsv0000103Csd00003355bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Bsv0000103Csd00003354bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Bsv0000103Csd00003353bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Bsv0000103Csd00003352bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Bsv0000103Csd00003351bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Bsv0000103Csd00003350bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd00003233bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd0000324Bbc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd0000324Abc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd00003249bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd00003247bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd00003245bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd00003243bc*sc*i* hpsa -+alias pci:v0000103Cd0000323Asv0000103Csd00003241bc*sc*i* hpsa -diff --git a/testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.dep b/testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.dep -new file mode 100644 -index 000000000000..ec50ac32426a ---- /dev/null -+++ b/testsuite/rootfs-pristine/test-depmod/modules-outdir/correct-modules.dep -@@ -0,0 +1,3 @@ -+kernel/drivers/block/cciss.ko: -+kernel/drivers/scsi/scsi_mod.ko: -+kernel/drivers/scsi/hpsa.ko: kernel/drivers/scsi/scsi_mod.ko -diff --git a/testsuite/rootfs-pristine/test-depmod/modules-outdir/lib/modules/4.4.4/modules.builtin b/testsuite/rootfs-pristine/test-depmod/modules-outdir/lib/modules/4.4.4/modules.builtin -new file mode 100644 -index 000000000000..e69de29bb2d1 -diff --git a/testsuite/rootfs-pristine/test-depmod/modules-outdir/lib/modules/4.4.4/modules.order b/testsuite/rootfs-pristine/test-depmod/modules-outdir/lib/modules/4.4.4/modules.order -new file mode 100644 -index 000000000000..4b643099f661 ---- /dev/null -+++ b/testsuite/rootfs-pristine/test-depmod/modules-outdir/lib/modules/4.4.4/modules.order -@@ -0,0 +1,7 @@ -+#336 -+kernel/drivers/block/cciss.ko -+#2094 -+kernel/drivers/scsi/scsi_mod.ko -+#2137 -+kernel/drivers/scsi/hpsa.ko -+ -diff --git a/testsuite/setup-rootfs.sh b/testsuite/setup-rootfs.sh -index d9cc627f7224..3e814d22d813 100755 ---- a/testsuite/setup-rootfs.sh -+++ b/testsuite/setup-rootfs.sh -@@ -70,6 +70,9 @@ map=( - ["test-depmod/modules-order-compressed/lib/modules/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" - ["test-depmod/modules-order-compressed/lib/modules/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" - ["test-depmod/modules-order-compressed/lib/modules/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" -+ ["test-depmod/modules-outdir/lib/modules/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" -+ ["test-depmod/modules-outdir/lib/modules/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" -+ ["test-depmod/modules-outdir/lib/modules/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" - ["test-modinfo/mod-simple-i386.ko"]="mod-simple-i386.ko" - ["test-modinfo/mod-simple-x86_64.ko"]="mod-simple-x86_64.ko" - ["test-modinfo/mod-simple-sparc64.ko"]="mod-simple-sparc64.ko" -diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c -index d7802d7b2e0b..6e3ae562d766 100644 ---- a/testsuite/test-depmod.c -+++ b/testsuite/test-depmod.c -@@ -57,6 +57,42 @@ DEFINE_TEST(depmod_modules_order_for_compressed, - }, - }); - -+#define MODULES_OUTDIR_UNAME "4.4.4" -+#define MODULES_OUTDIR_ROOTFS TESTSUITE_ROOTFS "test-depmod/modules-outdir" -+#define MODULES_OUTDIR_LIB_MODULES_OUTPUT MODULES_OUTDIR_ROOTFS "/outdir/lib/modules/" MODULES_OUTDIR_UNAME -+#define MODULES_OUTDIR_LIB_MODULES_INPUT MODULES_OUTDIR_ROOTFS "/lib/modules/" MODULES_OUTDIR_UNAME -+static noreturn int depmod_modules_outdir(const struct test *t) -+{ -+ const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -+ const char *const args[] = { -+ progname, -+ "--outdir", MODULES_OUTDIR_ROOTFS "/outdir/", -+ NULL, -+ }; -+ -+ test_spawn_prog(progname, args); -+ exit(EXIT_FAILURE); -+} -+ -+DEFINE_TEST(depmod_modules_outdir, -+#if defined(KMOD_SYSCONFDIR_NOT_ETC) -+ .skip = true, -+#endif -+ .description = "check if depmod honours the outdir option", -+ .config = { -+ [TC_UNAME_R] = MODULES_OUTDIR_UNAME, -+ [TC_ROOTFS] = MODULES_OUTDIR_ROOTFS, -+ }, -+ .output = { -+ .files = (const struct keyval[]) { -+ { MODULES_OUTDIR_LIB_MODULES_OUTPUT "/modules.dep", -+ MODULES_OUTDIR_ROOTFS "/correct-modules.dep" }, -+ { MODULES_OUTDIR_LIB_MODULES_OUTPUT "/modules.alias", -+ MODULES_OUTDIR_ROOTFS "/correct-modules.alias" }, -+ { } -+ }, -+ }); -+ - #define SEARCH_ORDER_SIMPLE_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-simple" - static noreturn int depmod_search_order_simple(const struct test *t) - { -diff --git a/tools/depmod.c b/tools/depmod.c -index a9349b20ee9c..2d4cf75fdfee 100644 ---- a/tools/depmod.c -+++ b/tools/depmod.c -@@ -59,11 +59,12 @@ static const char *default_cfg_paths[] = { - NULL - }; - --static const char cmdopts_s[] = "aAb:C:E:F:euqrvnP:wmVh"; -+static const char cmdopts_s[] = "aAb:o:C:E:F:euqrvnP:wmVh"; - static const struct option cmdopts[] = { - { "all", no_argument, 0, 'a' }, - { "quick", no_argument, 0, 'A' }, - { "basedir", required_argument, 0, 'b' }, -+ { "outdir", required_argument, 0, 'o' }, - { "config", required_argument, 0, 'C' }, - { "symvers", required_argument, 0, 'E' }, - { "filesyms", required_argument, 0, 'F' }, -@@ -105,6 +106,7 @@ static void help(void) - "\n" - "The following options are useful for people managing distributions:\n" - "\t-b, --basedir=DIR Use an image of a module tree.\n" -+ "\t-o, --outdir=DIR Output directory for generated files.\n" - "\t-F, --filesyms=FILE Use the file instead of the\n" - "\t current kernel symbols.\n" - "\t-E, --symvers=FILE Use Module.symvers file to check\n" -@@ -468,6 +470,8 @@ struct cfg { - const char *kversion; - char dirname[PATH_MAX]; - size_t dirnamelen; -+ char outdirname[PATH_MAX]; -+ size_t outdirnamelen; - char sym_prefix; - uint8_t check_symvers; - uint8_t print_unknown; -@@ -2577,7 +2581,7 @@ static int depmod_output(struct depmod *depmod, FILE *out) - { "modules.devname", output_devname }, - { } - }; -- const char *dname = depmod->cfg->dirname; -+ const char *dname = depmod->cfg->outdirname; - int dfd, err = 0; - struct timeval tv; - -@@ -2586,6 +2590,11 @@ static int depmod_output(struct depmod *depmod, FILE *out) - if (out != NULL) - dfd = -1; - else { -+ err = mkdir_p(dname, strlen(dname), 0755); -+ if (err < 0) { -+ CRIT("could not create directory %s: %m\n", dname); -+ return err; -+ } - dfd = open(dname, O_RDONLY); - if (dfd < 0) { - err = -errno; -@@ -2899,6 +2908,7 @@ static int do_depmod(int argc, char *argv[]) - FILE *out = NULL; - int err = 0, all = 0, maybe_all = 0, n_config_paths = 0; - _cleanup_free_ char *root = NULL; -+ _cleanup_free_ char *out_root = NULL; - _cleanup_free_ const char **config_paths = NULL; - const char *system_map = NULL; - const char *module_symvers = NULL; -@@ -2928,6 +2938,11 @@ static int do_depmod(int argc, char *argv[]) - free(root); - root = path_make_absolute_cwd(optarg); - break; -+ case 'o': -+ if (out_root) -+ free(out_root); -+ out_root = path_make_absolute_cwd(optarg); -+ break; - case 'C': { - size_t bytes = sizeof(char *) * (n_config_paths + 2); - void *tmp = realloc(config_paths, bytes); -@@ -3010,7 +3025,11 @@ static int do_depmod(int argc, char *argv[]) - - cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX, - "%s/lib/modules/%s", -- root == NULL ? "" : root, cfg.kversion); -+ root ?: "", cfg.kversion); -+ -+ cfg.outdirnamelen = snprintf(cfg.outdirname, PATH_MAX, -+ "%s/lib/modules/%s", -+ out_root ?: (root ?: ""), cfg.kversion); - - if (optind == argc) - all = 1; --- -2.41.0 - diff --git a/kmod-30.tar.sign b/kmod-30.tar.sign deleted file mode 100644 index ca05a66..0000000 --- a/kmod-30.tar.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEE6rM8lpABPHM5FqyDm6KlpjDL6lMFAmK9v0IACgkQm6KlpjDL -6lNxuRAAhPg6EYA3Y+fYefTDN7sEc4LA64Y8uu7GIHqZzTwislxN+15pU5gSUjDF -igk84+lYEnmgO5uMVdQrilelxzhq4lhxxjwTjSK/nFUzZoCAQDGirWk34FnMcXCi -mHtbqtFy9ZZdZ+ktisI1uGKYkTNIhhQp6iuLdgYugSVgEjXTKIhjZsRu96OzY82a -1qh7i4CZNCqaS2qPjs8FukBwvgG1xEp3mlnZMkjA9j28WJVsJ9dxxkdXB03wfnvf -E1lFX4HDqwLH//vXQvDo4nD6JhXNGn7bSCKWb88doW6KkMCBhPVKql/lo2It2+sj -VbmzCrtn8GR42FmVhJZKMPMLxYsUgRVn08W2y6ThZOBWtK5tFCOHHHhGjh3D16WI -9jVmmvmn9bNNNhrJJncRWUfmYlf4v9CX8yBfzq5a4z7XYloo/XR77WDuB+G0o4jN -vukauZhsVg8LxPIv+q6xfE0WRzOqAjl2qQRdewYJJBDXLFTa8/9QlYy/LMEPZ6u9 -hMnrUNHjUQBVojKLxHlArjZXflSp5DY46+IyhRrFWnPd1wArTvF0IStJn2rm2UuO -F0MfRXwMJwqll7TR9lai+X+7deh+F9YY5XyhXKXTseJYnaO28rzVMk+tBHmZFm5l -1R9gq+TsJZBVLKeb/QpeCdfdkoyDAmnd0PB8aA6IHdwzgx9nBB0= -=SXtI ------END PGP SIGNATURE----- diff --git a/kmod-30.tar.xz b/kmod-30.tar.xz deleted file mode 100644 index 76ff870..0000000 --- a/kmod-30.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f -size 567484 diff --git a/kmod-31.tar.sign b/kmod-31.tar.sign new file mode 100644 index 0000000..34a9e73 --- /dev/null +++ b/kmod-31.tar.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEE6rM8lpABPHM5FqyDm6KlpjDL6lMFAmUW3PIACgkQm6KlpjDL +6lPmUw/9EoddTKB7wVaTHPHqx4uu00jz8BKUFJsAppmdbAco+2++n8GWzqi6TgIV ++kwCweS7Ac6xivQQKhKlXrzHw4cXD8uwpWEmzW+o2gP9dSKHcr60ozfPMQ0QNEUF +6wOMGZffkbGmGYKBs6F2QriLznEVvbCYTyTE1khtSH9YIPR7EB2QDI4QCGCWGIdQ +VgmzPRnfoXr/Iiyw86w9AKB4WiqVxor97Gcz7Jyy5qM/9Y9OXi10y75mDKwFgHPJ +JN+Zt3IJXpUpc7rasIlvXfuK2W0q1SLkFWLwNUQ1sXX2QeriJYaMbi+eaJ4fvwjs +YN53duGyvajGkOEXvg487Em411ZPdbWmfbtrHQqhMBOMy/6cSx0CuSoztNBPqc9S +vALwusaoGxoh3PNfUZoHUPHvtRhT3s/J27p7EKK5uX63hvJuKj0/+XD6+mHKCgxG +0lFMglRa6AsVvxiudFEwIafLMaTPLOjcLxnu2zQOeDholZZES3wNkY4AQ5KHjvwH +owF102atzMq+2jyDTsBLdazZhfOwmUG+OwDP9tfWUMaCR6uK8KkJQLFQHZvij3T2 +ynO9axS9KhLB48jKBSGffR2dUnvshkfdEcjiIsTOxOk3nOnyIvqJLA4VL4rJnPVu +ZHZgTN21QNZCLAaMT9NND7klBmZ4qvPBPEpa+ugwXMnyWj6kZf4= +=e1C2 +-----END PGP SIGNATURE----- diff --git a/kmod-31.tar.xz b/kmod-31.tar.xz new file mode 100644 index 0000000..5634028 --- /dev/null +++ b/kmod-31.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5a6949043cc72c001b728d8c218609c5a15f3c33d75614b78c79418fcf00d80 +size 570936 diff --git a/kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch b/kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch index ed2f336..ef125d4 100644 --- a/kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch +++ b/kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch @@ -14,33 +14,31 @@ v2: mention module signature in commit message v3: add sysconfdir v5: add distconfdir, switch to pkgconfig --- - Makefile.am | 6 +++--- - configure.ac | 11 +++++++++++ - tools/kmod.pc.in | 9 +++++++++ - 3 files changed, 23 insertions(+), 3 deletions(-) + Makefile.am | 4 +++- + configure.ac | 11 +++++++++++ + tools/kmod.pc.in | 9 +++++++++ + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 tools/kmod.pc.in -diff --git a/Makefile.am b/Makefile.am -index a03846d02b9c..18818c811634 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -118,9 +118,9 @@ libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES) +Index: kmod-31/Makefile.am +=================================================================== +--- kmod-31.orig/Makefile.am ++++ kmod-31/Makefile.am +@@ -98,7 +98,9 @@ libkmod_libkmod_internal_la_DEPENDENCIES libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD) pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libkmod/libkmod.pc --EXTRA_DIST += libkmod/libkmod.pc.in --CLEANFILES += libkmod/libkmod.pc +pkgconfig_DATA = libkmod/libkmod.pc tools/kmod.pc +EXTRA_DIST += libkmod/libkmod.pc.in tools/kmod.pc.in +CLEANFILES += libkmod/libkmod.pc tools/kmod.pc bashcompletiondir=@bashcompletiondir@ dist_bashcompletion_DATA = \ -diff --git a/configure.ac b/configure.ac -index 18206ccdb607..a6ed8a36ca70 100644 ---- a/configure.ac -+++ b/configure.ac +Index: kmod-31/configure.ac +=================================================================== +--- kmod-31.orig/configure.ac ++++ kmod-31/configure.ac @@ -21,6 +21,9 @@ LT_INIT([disable-static pic-only]) AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])]) AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by kmod])]) @@ -51,39 +49,39 @@ index 18206ccdb607..a6ed8a36ca70 100644 ##################################################################### # Program checks and configurations ##################################################################### -@@ -93,6 +96,7 @@ AC_ARG_WITH([zstd], +@@ -94,6 +97,7 @@ AC_ARG_WITH([zstd], AS_IF([test "x$with_zstd" != "xno"], [ - PKG_CHECK_MODULES([libzstd], [libzstd >= 1.4.4]) + PKG_CHECK_MODULES([libzstd], [libzstd >= 1.4.4], [LIBS="$LIBS $libzstd_LIBS"]) AC_DEFINE([ENABLE_ZSTD], [1], [Enable Zstandard for modules.]) + module_compressions="zstd $module_compressions" ], [ AC_MSG_NOTICE([Zstandard support not requested]) ]) -@@ -104,6 +108,7 @@ AC_ARG_WITH([xz], +@@ -105,6 +109,7 @@ AC_ARG_WITH([xz], AS_IF([test "x$with_xz" != "xno"], [ - PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99]) + PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99], [LIBS="$LIBS $liblzma_LIBS"]) AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.]) + module_compressions="xz $module_compressions" ], [ AC_MSG_NOTICE([Xz support not requested]) ]) -@@ -115,6 +120,7 @@ AC_ARG_WITH([zlib], +@@ -116,6 +121,7 @@ AC_ARG_WITH([zlib], AS_IF([test "x$with_zlib" != "xno"], [ - PKG_CHECK_MODULES([zlib], [zlib]) + PKG_CHECK_MODULES([zlib], [zlib], [LIBS="$LIBS $zlib_LIBS"]) AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.]) + module_compressions="gzip $module_compressions" ], [ AC_MSG_NOTICE([zlib support not requested]) ]) -@@ -126,6 +132,7 @@ AC_ARG_WITH([openssl], +@@ -127,6 +133,7 @@ AC_ARG_WITH([openssl], AS_IF([test "x$with_openssl" != "xno"], [ - PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0]) + PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"]) AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.]) + module_signatures="PKCS7 $module_signatures" ], [ AC_MSG_NOTICE([openssl support not requested]) ]) -@@ -290,11 +297,15 @@ AC_DEFINE_UNQUOTED(KMOD_FEATURES, ["$with_features"], [Features in this build]) +@@ -291,6 +298,9 @@ AC_DEFINE_UNQUOTED(KMOD_FEATURES, ["$wit # Generate files from *.in ##################################################################### @@ -93,17 +91,18 @@ index 18206ccdb607..a6ed8a36ca70 100644 AC_CONFIG_FILES([ Makefile man/Makefile - libkmod/docs/Makefile +@@ -298,6 +308,7 @@ AC_CONFIG_FILES([ libkmod/docs/version.xml + libkmod/libkmod.pc + libkmod/python/kmod/version.py + tools/kmod.pc ]) -diff --git a/tools/kmod.pc.in b/tools/kmod.pc.in -new file mode 100644 -index 000000000000..2595980a6b35 +Index: kmod-31/tools/kmod.pc.in +=================================================================== --- /dev/null -+++ b/tools/kmod.pc.in ++++ kmod-31/tools/kmod.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +sysconfdir=@sysconfdir@ @@ -114,6 +113,3 @@ index 000000000000..2595980a6b35 +Name: kmod +Description: Tools to deal with kernel modules +Version: @VERSION@ --- -2.41.0 - diff --git a/kmod-testsuite.spec b/kmod-testsuite.spec index c123cb8..8ee2523 100644 --- a/kmod-testsuite.spec +++ b/kmod-testsuite.spec @@ -22,7 +22,7 @@ Name: kmod-testsuite %define lname libkmod2 -Version: 30 +Version: 31 Release: 0 Summary: Testsuite of the kmod package License: GPL-2.0-or-later AND LGPL-2.1-or-later @@ -40,13 +40,8 @@ Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: 0012-modprobe-print-unsupported-status.patch -Patch7: 0001-testsuite-repair-read-of-uninitialized-memory.patch Patch8: man-depmod.d-Fix-incorrect-usr-lib-search-path.patch Patch9: usr-lib-modprobe.patch -Patch10: testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch -Patch11: depmod-Introduce-outdir-option.patch -Patch12: testsuite-Handle-different-sysconfdir.patch -Patch13: testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch Patch14: kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch Patch15: usr-lib-modules.patch Patch16: no-stylesheet-download.patch diff --git a/kmod.changes b/kmod.changes index 71898c8..187e12d 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Fri Sep 29 16:38:01 UTC 2023 - Jan Engelhardt + +- Update to release 31 + * Allow passing a path to modprobe so the module is loaded from + anywhere from the filesystem. + * Use in-kernel decompression if available. + * depmod learned a `-o ` option to allow using a separate + output directory. +- Delete depmod-Introduce-outdir-option.patch, + testsuite-Handle-different-sysconfdir.patch, + testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch, + 0001-testsuite-repair-read-of-uninitialized-memory.patch, + testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch + + ------------------------------------------------------------------- Mon Jul 24 12:50:23 UTC 2023 - Michal Suchanek diff --git a/kmod.spec b/kmod.spec index 98923a9..d87b3bd 100644 --- a/kmod.spec +++ b/kmod.spec @@ -22,7 +22,7 @@ Name: kmod %define lname libkmod2 -Version: 30 +Version: 31 Release: 0 Summary: Utilities to load modules into the kernel License: GPL-2.0-or-later AND LGPL-2.1-or-later @@ -41,13 +41,8 @@ Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: 0012-modprobe-print-unsupported-status.patch -Patch7: 0001-testsuite-repair-read-of-uninitialized-memory.patch Patch8: man-depmod.d-Fix-incorrect-usr-lib-search-path.patch Patch9: usr-lib-modprobe.patch -Patch10: testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch -Patch11: depmod-Introduce-outdir-option.patch -Patch12: testsuite-Handle-different-sysconfdir.patch -Patch13: testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch Patch14: kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch Patch15: usr-lib-modules.patch Patch16: no-stylesheet-download.patch diff --git a/testsuite-Handle-different-sysconfdir.patch b/testsuite-Handle-different-sysconfdir.patch deleted file mode 100644 index 478169b..0000000 --- a/testsuite-Handle-different-sysconfdir.patch +++ /dev/null @@ -1,178 +0,0 @@ -From 94fe372a5f6163f5bc8b620e6068ea2f1d99f858 Mon Sep 17 00:00:00 2001 -From: Lucas De Marchi -Date: Thu, 9 Feb 2023 11:19:46 -0800 -Subject: [PATCH 6/9] testsuite: Handle different sysconfdir - -Instead of skipping tests if sysconfdir isn't /etc, just handle it -during the rootfs setup logic. - -Signed-off-by: Lucas De Marchi -Reviewed-by: Emil Velikov ---- - Makefile.am | 6 +----- - configure.ac | 3 --- - testsuite/setup-rootfs.sh | 8 ++++++++ - testsuite/test-blacklist.c | 3 --- - testsuite/test-depmod.c | 15 --------------- - testsuite/test-modprobe.c | 6 ------ - 6 files changed, 9 insertions(+), 32 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 32f4b80e9870..246d4f5b138f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -245,7 +245,7 @@ EXTRA_DIST += testsuite/setup-rootfs.sh - MODULE_PLAYGROUND = testsuite/module-playground - ROOTFS = testsuite/rootfs - ROOTFS_PRISTINE = $(top_srcdir)/testsuite/rootfs-pristine --CREATE_ROOTFS = $(AM_V_GEN) $(top_srcdir)/testsuite/setup-rootfs.sh $(ROOTFS_PRISTINE) $(ROOTFS) $(MODULE_PLAYGROUND) $(top_builddir)/config.h -+CREATE_ROOTFS = $(AM_V_GEN) $(top_srcdir)/testsuite/setup-rootfs.sh $(ROOTFS_PRISTINE) $(ROOTFS) $(MODULE_PLAYGROUND) $(top_builddir)/config.h $(sysconfdir) - - build-module-playground: - $(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \ -@@ -330,10 +330,6 @@ TESTSUITE_LDADD = \ - testsuite/libtestsuite.la libkmod/libkmod-internal.la \ - shared/libshared.la - --if KMOD_SYSCONFDIR_NOT_ETC --TESTSUITE_CPPFLAGS += -DKMOD_SYSCONFDIR_NOT_ETC --endif -- - check_LTLIBRARIES += testsuite/libtestsuite.la - testsuite_libtestsuite_la_SOURCES = \ - testsuite/testsuite.c testsuite/testsuite.h -diff --git a/configure.ac b/configure.ac -index 6989e9360da2..a74d3baf0a42 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -224,9 +224,6 @@ GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) - ], [ - AM_CONDITIONAL([ENABLE_GTK_DOC], false)]) - --# Some tests are skipped when sysconfdir != /etc. --AM_CONDITIONAL([KMOD_SYSCONFDIR_NOT_ETC], [test "x$sysconfdir" != "x/etc"]) -- - ##################################################################### - # Default CFLAGS and LDFLAGS - ##################################################################### -diff --git a/testsuite/setup-rootfs.sh b/testsuite/setup-rootfs.sh -index 3e814d22d813..8b13a40f2cae 100755 ---- a/testsuite/setup-rootfs.sh -+++ b/testsuite/setup-rootfs.sh -@@ -6,6 +6,7 @@ ROOTFS_PRISTINE=$1 - ROOTFS=$2 - MODULE_PLAYGROUND=$3 - CONFIG_H=$4 -+SYSCONFDIR=$5 - - # create rootfs from rootfs-pristine - -@@ -15,6 +16,13 @@ create_rootfs() { - cp -r "$ROOTFS_PRISTINE" "$ROOTFS" - find "$ROOTFS" -type d -exec chmod +w {} \; - find "$ROOTFS" -type f -name .gitignore -exec rm -f {} \; -+ -+ if [ "$SYSCONFDIR" != "/etc" ]; then -+ find "$ROOTFS" -type d -name etc -printf "%h\n" | while read -r e; do -+ mkdir -p "$(dirname $e/$SYSCONFDIR)" -+ mv $e/{etc,$SYSCONFDIR} -+ done -+ fi - } - - feature_enabled() { -diff --git a/testsuite/test-blacklist.c b/testsuite/test-blacklist.c -index d03eedb60106..969567ddc817 100644 ---- a/testsuite/test-blacklist.c -+++ b/testsuite/test-blacklist.c -@@ -95,9 +95,6 @@ fail_lookup: - } - - DEFINE_TEST(blacklist_1, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if modules are correctly blacklisted", - .config = { - [TC_ROOTFS] = TESTSUITE_ROOTFS "test-blacklist/", -diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c -index 6e3ae562d766..42878cb4eb22 100644 ---- a/testsuite/test-depmod.c -+++ b/testsuite/test-depmod.c -@@ -41,9 +41,6 @@ static noreturn int depmod_modules_order_for_compressed(const struct test *t) - } - - DEFINE_TEST(depmod_modules_order_for_compressed, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if depmod let aliases in right order when using compressed modules", - .config = { - [TC_UNAME_R] = MODULES_ORDER_UNAME, -@@ -75,9 +72,6 @@ static noreturn int depmod_modules_outdir(const struct test *t) - } - - DEFINE_TEST(depmod_modules_outdir, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if depmod honours the outdir option", - .config = { - [TC_UNAME_R] = MODULES_OUTDIR_UNAME, -@@ -158,9 +152,6 @@ static noreturn int depmod_detect_loop(const struct test *t) - exit(EXIT_FAILURE); - } - DEFINE_TEST(depmod_detect_loop, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if depmod detects module loops correctly", - .config = { - [TC_UNAME_R] = "4.4.4", -@@ -184,9 +175,6 @@ static noreturn int depmod_search_order_external_first(const struct test *t) - exit(EXIT_FAILURE); - } - DEFINE_TEST(depmod_search_order_external_first, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if depmod honor external keyword with higher priority", - .config = { - [TC_UNAME_R] = "4.4.4", -@@ -239,9 +227,6 @@ static noreturn int depmod_search_order_override(const struct test *t) - exit(EXIT_FAILURE); - } - DEFINE_TEST(depmod_search_order_override, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if depmod honor override keyword", - .config = { - [TC_UNAME_R] = "4.4.4", -diff --git a/testsuite/test-modprobe.c b/testsuite/test-modprobe.c -index 0255f1aaccb5..bbdf11443d47 100644 ---- a/testsuite/test-modprobe.c -+++ b/testsuite/test-modprobe.c -@@ -83,9 +83,6 @@ static noreturn int modprobe_show_alias_to_none(const struct test *t) - exit(EXIT_FAILURE); - } - DEFINE_TEST(modprobe_show_alias_to_none, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if modprobe --show-depends doesn't explode with an alias to nothing", - .config = { - [TC_UNAME_R] = "4.4.4", -@@ -175,9 +172,6 @@ static noreturn int modprobe_softdep_loop(const struct test *t) - exit(EXIT_FAILURE); - } - DEFINE_TEST(modprobe_softdep_loop, --#if defined(KMOD_SYSCONFDIR_NOT_ETC) -- .skip = true, --#endif - .description = "check if modprobe breaks softdep loop", - .config = { - [TC_UNAME_R] = "4.4.4", --- -2.41.0 - diff --git a/testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch b/testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch deleted file mode 100644 index 5154bad..0000000 --- a/testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 00c15bc0710c399749421335c2c9372c9afee080 Mon Sep 17 00:00:00 2001 -From: Lucas De Marchi -Date: Thu, 9 Feb 2023 11:19:45 -0800 -Subject: [PATCH 4/9] testsuite: Move setup-rootfs logic from Makefile to - script - -It's easier to implement the logic outside of the Makefile, so rename -the populate-modules.sh script to setup-rootfs.sh and move the -additional logic from the makefile to the script. - -Signed-off-by: Lucas De Marchi -Reviewed-by: Emil Velikov ---- - Makefile.am | 10 ++-------- - .../{populate-modules.sh => setup-rootfs.sh} | 19 +++++++++++++++++-- - 2 files changed, 19 insertions(+), 10 deletions(-) - rename testsuite/{populate-modules.sh => setup-rootfs.sh} (94%) - -diff --git a/Makefile.am b/Makefile.am -index e7313fa8a33e..32f4b80e9870 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -240,18 +240,12 @@ endif - # TESTSUITE - # ------------------------------------------------------------------------------ - --EXTRA_DIST += testsuite/populate-modules.sh -+EXTRA_DIST += testsuite/setup-rootfs.sh - - MODULE_PLAYGROUND = testsuite/module-playground - ROOTFS = testsuite/rootfs - ROOTFS_PRISTINE = $(top_srcdir)/testsuite/rootfs-pristine --CREATE_ROOTFS = $(AM_V_GEN) ( $(RM) -rf $(ROOTFS) && mkdir -p $(dir $(ROOTFS)) && \ -- cp -r $(ROOTFS_PRISTINE) $(ROOTFS) && \ -- find $(ROOTFS) -type d -exec chmod +w {} \; && \ -- find $(ROOTFS) -type f -name .gitignore -exec rm -f {} \; && \ -- $(top_srcdir)/testsuite/populate-modules.sh \ -- $(MODULE_PLAYGROUND) $(ROOTFS) $(top_builddir)/config.h ) && \ -- touch testsuite/stamp-rootfs -+CREATE_ROOTFS = $(AM_V_GEN) $(top_srcdir)/testsuite/setup-rootfs.sh $(ROOTFS_PRISTINE) $(ROOTFS) $(MODULE_PLAYGROUND) $(top_builddir)/config.h - - build-module-playground: - $(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \ -diff --git a/testsuite/populate-modules.sh b/testsuite/setup-rootfs.sh -similarity index 94% -rename from testsuite/populate-modules.sh -rename to testsuite/setup-rootfs.sh -index 099f02669156..d9cc627f7224 100755 ---- a/testsuite/populate-modules.sh -+++ b/testsuite/setup-rootfs.sh -@@ -2,9 +2,20 @@ - - set -e - --MODULE_PLAYGROUND=$1 -+ROOTFS_PRISTINE=$1 - ROOTFS=$2 --CONFIG_H=$3 -+MODULE_PLAYGROUND=$3 -+CONFIG_H=$4 -+ -+# create rootfs from rootfs-pristine -+ -+create_rootfs() { -+ rm -rf "$ROOTFS" -+ mkdir -p $(dirname "$ROOTFS") -+ cp -r "$ROOTFS_PRISTINE" "$ROOTFS" -+ find "$ROOTFS" -type d -exec chmod +w {} \; -+ find "$ROOTFS" -type f -name .gitignore -exec rm -f {} \; -+} - - feature_enabled() { - local feature=$1 -@@ -94,6 +105,8 @@ attach_pkcs7_array=( - "test-modinfo/mod-simple-pkcs7.ko" - ) - -+create_rootfs -+ - for k in "${!map[@]}"; do - dst=${ROOTFS}/$k - src=${MODULE_PLAYGROUND}/${map[$k]} -@@ -138,3 +151,5 @@ done - for m in "${attach_pkcs7_array[@]}"; do - cat "${MODULE_PLAYGROUND}/dummy.pkcs7" >>"${ROOTFS}/$m" - done -+ -+touch testsuite/stamp-rootfs --- -2.41.0 - diff --git a/testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch b/testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch deleted file mode 100644 index 0edaa62..0000000 --- a/testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch +++ /dev/null @@ -1,193 +0,0 @@ -From 892c2c451397a4f424196bc57e2536651b0549c3 Mon Sep 17 00:00:00 2001 -From: Emil Velikov -Date: Mon, 6 Feb 2023 14:04:49 +0000 -Subject: [PATCH 7/9] testsuite/depmod: use defines for the rootfs/lib_modules - -The uname used across the tests is same, so drop "_ORDER" from the macro -name and use it throughout. Similarly - add respective LIB_MODULES -defines and use them in the tests. - -Signed-off-by: Emil Velikov -Signed-off-by: Lucas De Marchi ---- - testsuite/test-depmod.c | 50 ++++++++++++++++++++++------------------- - 1 file changed, 27 insertions(+), 23 deletions(-) - -diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c -index 42878cb4eb22..93606947f18a 100644 ---- a/testsuite/test-depmod.c -+++ b/testsuite/test-depmod.c -@@ -25,9 +25,9 @@ - - #include "testsuite.h" - --#define MODULES_ORDER_UNAME "4.4.4" -+#define MODULES_UNAME "4.4.4" - #define MODULES_ORDER_ROOTFS TESTSUITE_ROOTFS "test-depmod/modules-order-compressed" --#define MODULES_ORDER_LIB_MODULES MODULES_ORDER_ROOTFS "/lib/modules/" MODULES_ORDER_UNAME -+#define MODULES_ORDER_LIB_MODULES MODULES_ORDER_ROOTFS "/lib/modules/" MODULES_UNAME - static noreturn int depmod_modules_order_for_compressed(const struct test *t) - { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -43,7 +43,7 @@ static noreturn int depmod_modules_order_for_compressed(const struct test *t) - DEFINE_TEST(depmod_modules_order_for_compressed, - .description = "check if depmod let aliases in right order when using compressed modules", - .config = { -- [TC_UNAME_R] = MODULES_ORDER_UNAME, -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = MODULES_ORDER_ROOTFS, - }, - .output = { -@@ -54,10 +54,9 @@ DEFINE_TEST(depmod_modules_order_for_compressed, - }, - }); - --#define MODULES_OUTDIR_UNAME "4.4.4" - #define MODULES_OUTDIR_ROOTFS TESTSUITE_ROOTFS "test-depmod/modules-outdir" --#define MODULES_OUTDIR_LIB_MODULES_OUTPUT MODULES_OUTDIR_ROOTFS "/outdir/lib/modules/" MODULES_OUTDIR_UNAME --#define MODULES_OUTDIR_LIB_MODULES_INPUT MODULES_OUTDIR_ROOTFS "/lib/modules/" MODULES_OUTDIR_UNAME -+#define MODULES_OUTDIR_LIB_MODULES_OUTPUT MODULES_OUTDIR_ROOTFS "/outdir/lib/modules/" MODULES_UNAME -+#define MODULES_OUTDIR_LIB_MODULES_INPUT MODULES_OUTDIR_ROOTFS "/lib/modules/" MODULES_UNAME - static noreturn int depmod_modules_outdir(const struct test *t) - { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -74,7 +73,7 @@ static noreturn int depmod_modules_outdir(const struct test *t) - DEFINE_TEST(depmod_modules_outdir, - .description = "check if depmod honours the outdir option", - .config = { -- [TC_UNAME_R] = MODULES_OUTDIR_UNAME, -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = MODULES_OUTDIR_ROOTFS, - }, - .output = { -@@ -88,6 +87,7 @@ DEFINE_TEST(depmod_modules_outdir, - }); - - #define SEARCH_ORDER_SIMPLE_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-simple" -+#define SEARCH_ORDER_SIMPLE_LIB_MODULES SEARCH_ORDER_SIMPLE_ROOTFS "/lib/modules/" MODULES_UNAME - static noreturn int depmod_search_order_simple(const struct test *t) - { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -102,18 +102,19 @@ static noreturn int depmod_search_order_simple(const struct test *t) - DEFINE_TEST(depmod_search_order_simple, - .description = "check if depmod honor search order in config", - .config = { -- [TC_UNAME_R] = "4.4.4", -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = SEARCH_ORDER_SIMPLE_ROOTFS, - }, - .output = { - .files = (const struct keyval[]) { -- { SEARCH_ORDER_SIMPLE_ROOTFS "/lib/modules/4.4.4/correct-modules.dep", -- SEARCH_ORDER_SIMPLE_ROOTFS "/lib/modules/4.4.4/modules.dep" }, -+ { SEARCH_ORDER_SIMPLE_LIB_MODULES "/correct-modules.dep", -+ SEARCH_ORDER_SIMPLE_LIB_MODULES "/modules.dep" }, - { } - }, - }); - - #define SEARCH_ORDER_SAME_PREFIX_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-same-prefix" -+#define SEARCH_ORDER_SAME_PREFIX_LIB_MODULES SEARCH_ORDER_SAME_PREFIX_ROOTFS "/lib/modules/" MODULES_UNAME - static noreturn int depmod_search_order_same_prefix(const struct test *t) - { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -128,13 +129,13 @@ static noreturn int depmod_search_order_same_prefix(const struct test *t) - DEFINE_TEST(depmod_search_order_same_prefix, - .description = "check if depmod honor search order in config with same prefix", - .config = { -- [TC_UNAME_R] = "4.4.4", -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = SEARCH_ORDER_SAME_PREFIX_ROOTFS, - }, - .output = { - .files = (const struct keyval[]) { -- { SEARCH_ORDER_SAME_PREFIX_ROOTFS "/lib/modules/4.4.4/correct-modules.dep", -- SEARCH_ORDER_SAME_PREFIX_ROOTFS "/lib/modules/4.4.4/modules.dep" }, -+ { SEARCH_ORDER_SAME_PREFIX_LIB_MODULES "/correct-modules.dep", -+ SEARCH_ORDER_SAME_PREFIX_LIB_MODULES "/modules.dep" }, - { } - }, - }); -@@ -154,7 +155,7 @@ static noreturn int depmod_detect_loop(const struct test *t) - DEFINE_TEST(depmod_detect_loop, - .description = "check if depmod detects module loops correctly", - .config = { -- [TC_UNAME_R] = "4.4.4", -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = DETECT_LOOP_ROOTFS, - }, - .expected_fail = true, -@@ -163,6 +164,7 @@ DEFINE_TEST(depmod_detect_loop, - }); - - #define SEARCH_ORDER_EXTERNAL_FIRST_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-external-first" -+#define SEARCH_ORDER_EXTERNAL_FIRST_LIB_MODULES SEARCH_ORDER_EXTERNAL_FIRST_ROOTFS "/lib/modules/" MODULES_UNAME - static noreturn int depmod_search_order_external_first(const struct test *t) - { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -177,18 +179,19 @@ static noreturn int depmod_search_order_external_first(const struct test *t) - DEFINE_TEST(depmod_search_order_external_first, - .description = "check if depmod honor external keyword with higher priority", - .config = { -- [TC_UNAME_R] = "4.4.4", -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = SEARCH_ORDER_EXTERNAL_FIRST_ROOTFS, - }, - .output = { - .files = (const struct keyval[]) { -- { SEARCH_ORDER_EXTERNAL_FIRST_ROOTFS "/lib/modules/4.4.4/correct-modules.dep", -- SEARCH_ORDER_EXTERNAL_FIRST_ROOTFS "/lib/modules/4.4.4/modules.dep" }, -+ { SEARCH_ORDER_EXTERNAL_FIRST_LIB_MODULES "/correct-modules.dep", -+ SEARCH_ORDER_EXTERNAL_FIRST_LIB_MODULES "/modules.dep" }, - { } - }, - }); - - #define SEARCH_ORDER_EXTERNAL_LAST_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-external-last" -+#define SEARCH_ORDER_EXTERNAL_LAST_LIB_MODULES SEARCH_ORDER_EXTERNAL_LAST_ROOTFS "/lib/modules/" MODULES_UNAME - static noreturn int depmod_search_order_external_last(const struct test *t) - { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -203,18 +206,19 @@ static noreturn int depmod_search_order_external_last(const struct test *t) - DEFINE_TEST(depmod_search_order_external_last, - .description = "check if depmod honor external keyword with lower priority", - .config = { -- [TC_UNAME_R] = "4.4.4", -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = SEARCH_ORDER_EXTERNAL_LAST_ROOTFS, - }, - .output = { - .files = (const struct keyval[]) { -- { SEARCH_ORDER_EXTERNAL_LAST_ROOTFS "/lib/modules/4.4.4/correct-modules.dep", -- SEARCH_ORDER_EXTERNAL_LAST_ROOTFS "/lib/modules/4.4.4/modules.dep" }, -+ { SEARCH_ORDER_EXTERNAL_LAST_LIB_MODULES "/correct-modules.dep", -+ SEARCH_ORDER_EXTERNAL_LAST_LIB_MODULES "/modules.dep" }, - { } - }, - }); - - #define SEARCH_ORDER_OVERRIDE_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-override" -+#define SEARCH_ORDER_OVERRIDE_LIB_MODULES SEARCH_ORDER_OVERRIDE_ROOTFS "/lib/modules/" MODULES_UNAME - static noreturn int depmod_search_order_override(const struct test *t) - { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -229,13 +233,13 @@ static noreturn int depmod_search_order_override(const struct test *t) - DEFINE_TEST(depmod_search_order_override, - .description = "check if depmod honor override keyword", - .config = { -- [TC_UNAME_R] = "4.4.4", -+ [TC_UNAME_R] = MODULES_UNAME, - [TC_ROOTFS] = SEARCH_ORDER_OVERRIDE_ROOTFS, - }, - .output = { - .files = (const struct keyval[]) { -- { SEARCH_ORDER_OVERRIDE_ROOTFS "/lib/modules/4.4.4/correct-modules.dep", -- SEARCH_ORDER_OVERRIDE_ROOTFS "/lib/modules/4.4.4/modules.dep" }, -+ { SEARCH_ORDER_OVERRIDE_LIB_MODULES "/correct-modules.dep", -+ SEARCH_ORDER_OVERRIDE_LIB_MODULES "/modules.dep" }, - { } - }, - }); --- -2.41.0 - diff --git a/usr-lib-modules.patch b/usr-lib-modules.patch index d1f798e..4289b2c 100644 --- a/usr-lib-modules.patch +++ b/usr-lib-modules.patch @@ -14,30 +14,30 @@ Signed-off-by: Michal Suchanek --- v4: Make the whole path configurable --- - Makefile.am | 3 +- - configure.ac | 7 ++ - libkmod/libkmod.c | 4 +- - man/Makefile.am | 1 + - man/depmod.d.xml | 6 +- - man/depmod.xml | 4 +- - man/modinfo.xml | 2 +- - man/modprobe.xml | 2 +- - man/modules.dep.xml | 6 +- - testsuite/module-playground/Makefile | 2 +- - testsuite/setup-rootfs.sh | 109 +++++++++++++++------------ - testsuite/test-depmod.c | 16 ++-- - testsuite/test-testsuite.c | 8 +- - tools/depmod.c | 6 +- - tools/kmod.pc.in | 1 + - tools/modinfo.c | 4 +- - tools/modprobe.c | 4 +- - tools/static-nodes.c | 6 +- - 18 files changed, 107 insertions(+), 84 deletions(-) + Makefile.am | 3 + configure.ac | 7 ++ + libkmod/libkmod.c | 4 - + man/Makefile.am | 1 + man/depmod.d.xml | 6 - + man/depmod.xml | 4 - + man/modinfo.xml | 2 + man/modprobe.xml | 2 + man/modules.dep.xml | 6 - + testsuite/module-playground/Makefile | 2 + testsuite/setup-rootfs.sh | 110 +++++++++++++++++++---------------- + testsuite/test-depmod.c | 16 ++--- + testsuite/test-testsuite.c | 8 +- + tools/depmod.c | 6 - + tools/kmod.pc.in | 1 + tools/modinfo.c | 4 - + tools/modprobe.c | 4 - + tools/static-nodes.c | 6 - + 18 files changed, 108 insertions(+), 84 deletions(-) -diff --git a/Makefile.am b/Makefile.am -index fd4c7a04ec51..1d51a43d68ba 100644 ---- a/Makefile.am -+++ b/Makefile.am +Index: kmod-31/Makefile.am +=================================================================== +--- kmod-31.orig/Makefile.am ++++ kmod-31/Makefile.am @@ -20,6 +20,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ @@ -46,7 +46,7 @@ index fd4c7a04ec51..1d51a43d68ba 100644 ${zlib_CFLAGS} AM_CFLAGS = $(OUR_CFLAGS) -@@ -247,7 +248,7 @@ EXTRA_DIST += testsuite/setup-rootfs.sh +@@ -224,7 +225,7 @@ EXTRA_DIST += testsuite/setup-rootfs.sh MODULE_PLAYGROUND = testsuite/module-playground ROOTFS = testsuite/rootfs ROOTFS_PRISTINE = $(top_srcdir)/testsuite/rootfs-pristine @@ -55,11 +55,11 @@ index fd4c7a04ec51..1d51a43d68ba 100644 build-module-playground: $(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \ -diff --git a/configure.ac b/configure.ac -index a6ed8a36ca70..602d3d3dbdf1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -90,6 +90,12 @@ AC_ARG_WITH([rootlibdir], +Index: kmod-31/configure.ac +=================================================================== +--- kmod-31.orig/configure.ac ++++ kmod-31/configure.ac +@@ -91,6 +91,12 @@ AC_ARG_WITH([rootlibdir], [], [with_rootlibdir=$libdir]) AC_SUBST([rootlibdir], [$with_rootlibdir]) @@ -72,7 +72,7 @@ index a6ed8a36ca70..602d3d3dbdf1 100644 AC_ARG_WITH([zstd], AS_HELP_STRING([--with-zstd], [handle Zstandard-compressed modules @<:@default=disabled@:>@]), [], [with_zstd=no]) -@@ -316,6 +322,7 @@ AC_MSG_RESULT([ +@@ -319,6 +325,7 @@ AC_MSG_RESULT([ $PACKAGE $VERSION ======= @@ -80,11 +80,11 @@ index a6ed8a36ca70..602d3d3dbdf1 100644 prefix: ${prefix} sysconfdir: ${sysconfdir} distconfdir: ${distconfdir} -diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c -index bc05a1873edf..876458f7449a 100644 ---- a/libkmod/libkmod.c -+++ b/libkmod/libkmod.c -@@ -209,7 +209,7 @@ static int log_priority(const char *priority) +Index: kmod-31/libkmod/libkmod.c +=================================================================== +--- kmod-31.orig/libkmod/libkmod.c ++++ kmod-31/libkmod/libkmod.c +@@ -210,7 +210,7 @@ static int log_priority(const char *prio return 0; } @@ -93,7 +93,7 @@ index bc05a1873edf..876458f7449a 100644 static char *get_kernel_release(const char *dirname) { -@@ -231,7 +231,7 @@ static char *get_kernel_release(const char *dirname) +@@ -266,7 +266,7 @@ static enum kmod_file_compression_type g /** * kmod_new: * @dirname: what to consider as linux module's directory, if NULL @@ -102,10 +102,10 @@ index bc05a1873edf..876458f7449a 100644 * it's treated as relative to the current working directory. * Otherwise, give an absolute dirname. * @config_paths: ordered array of paths (directories or files) where -diff --git a/man/Makefile.am b/man/Makefile.am -index 2fea8e46bf2f..f550091a216a 100644 ---- a/man/Makefile.am -+++ b/man/Makefile.am +Index: kmod-31/man/Makefile.am +=================================================================== +--- kmod-31.orig/man/Makefile.am ++++ kmod-31/man/Makefile.am @@ -22,6 +22,7 @@ CLEANFILES = $(dist_man_MANS) else \ sed -e '/@DISTCONFDIR@/d' $< ; \ @@ -114,10 +114,10 @@ index 2fea8e46bf2f..f550091a216a 100644 $(XSLT) \ -o $@ \ --nonet \ -diff --git a/man/depmod.d.xml b/man/depmod.d.xml -index f282a39cc840..b07e6a2bd4fe 100644 ---- a/man/depmod.d.xml -+++ b/man/depmod.d.xml +Index: kmod-31/man/depmod.d.xml +=================================================================== +--- kmod-31.orig/man/depmod.d.xml ++++ kmod-31/man/depmod.d.xml @@ -70,7 +70,7 @@ @@ -145,10 +145,10 @@ index f282a39cc840..b07e6a2bd4fe 100644 over any likenamed module already provided by the kernel. -diff --git a/man/depmod.xml b/man/depmod.xml -index 3b0097184fd7..fce2a4a67a89 100644 ---- a/man/depmod.xml -+++ b/man/depmod.xml +Index: kmod-31/man/depmod.xml +=================================================================== +--- kmod-31.orig/man/depmod.xml ++++ kmod-31/man/depmod.xml @@ -80,7 +80,7 @@ depmod creates a list of module dependencies by @@ -167,10 +167,10 @@ index 3b0097184fd7..fce2a4a67a89 100644 but in a staging area, you can specify a basedir which is prepended to the directory name. This basedir is -diff --git a/man/modinfo.xml b/man/modinfo.xml -index 9fe0324a2527..b6c4d6045829 100644 ---- a/man/modinfo.xml -+++ b/man/modinfo.xml +Index: kmod-31/man/modinfo.xml +=================================================================== +--- kmod-31.orig/man/modinfo.xml ++++ kmod-31/man/modinfo.xml @@ -54,7 +54,7 @@ modinfo extracts information from the Linux Kernel modules given on the command line. If the module name is not a filename, @@ -180,10 +180,10 @@ index 9fe0324a2527..b6c4d6045829 100644 directory is searched, as is also done by modprobe8 when loading kernel modules. -diff --git a/man/modprobe.xml b/man/modprobe.xml -index db39c7a18bb7..7374f37a0f7b 100644 ---- a/man/modprobe.xml -+++ b/man/modprobe.xml +Index: kmod-31/man/modprobe.xml +=================================================================== +--- kmod-31.orig/man/modprobe.xml ++++ kmod-31/man/modprobe.xml @@ -78,7 +78,7 @@ is no difference between _ and - in module names (automatic underscore conversion is performed). @@ -193,10 +193,10 @@ index db39c7a18bb7..7374f37a0f7b 100644 the modules and other files, except for the optional configuration files in the /etc/modprobe.d directory -diff --git a/man/modules.dep.xml b/man/modules.dep.xml -index ed633694ec9e..8ef6d8b3536e 100644 ---- a/man/modules.dep.xml -+++ b/man/modules.dep.xml +Index: kmod-31/man/modules.dep.xml +=================================================================== +--- kmod-31.orig/man/modules.dep.xml ++++ kmod-31/man/modules.dep.xml @@ -34,8 +34,8 @@ @@ -217,10 +217,10 @@ index ed633694ec9e..8ef6d8b3536e 100644 It is used by kmod tools such as modprobe and libkmod. -diff --git a/testsuite/module-playground/Makefile b/testsuite/module-playground/Makefile -index e6045b0dd932..a7ab09bea2bf 100644 ---- a/testsuite/module-playground/Makefile -+++ b/testsuite/module-playground/Makefile +Index: kmod-31/testsuite/module-playground/Makefile +=================================================================== +--- kmod-31.orig/testsuite/module-playground/Makefile ++++ kmod-31/testsuite/module-playground/Makefile @@ -47,7 +47,7 @@ endif else @@ -230,10 +230,10 @@ index e6045b0dd932..a7ab09bea2bf 100644 KVER ?= `uname -r` ifeq ($(FAKE_BUILD),) FAKE_BUILD=0 -diff --git a/testsuite/setup-rootfs.sh b/testsuite/setup-rootfs.sh -index 8b13a40f2cae..2fc7e592d1b5 100755 ---- a/testsuite/setup-rootfs.sh -+++ b/testsuite/setup-rootfs.sh +Index: kmod-31/testsuite/setup-rootfs.sh +=================================================================== +--- kmod-31.orig/testsuite/setup-rootfs.sh ++++ kmod-31/testsuite/setup-rootfs.sh @@ -16,6 +16,19 @@ create_rootfs() { cp -r "$ROOTFS_PRISTINE" "$ROOTFS" find "$ROOTFS" -type d -exec chmod +w {} \; @@ -254,7 +254,7 @@ index 8b13a40f2cae..2fc7e592d1b5 100755 if [ "$SYSCONFDIR" != "/etc" ]; then find "$ROOTFS" -type d -name etc -printf "%h\n" | while read -r e; do -@@ -32,55 +45,55 @@ feature_enabled() { +@@ -32,57 +45,58 @@ feature_enabled() { declare -A map map=( @@ -275,28 +275,28 @@ index 8b13a40f2cae..2fc7e592d1b5 100755 - ["test-depmod/detect-loop/lib/modules/4.4.4/kernel/mod-loop-k.ko"]="mod-loop-k.ko" - ["test-depmod/search-order-external-first/lib/modules/4.4.4/foo/"]="mod-simple.ko" - ["test-depmod/search-order-external-first/lib/modules/4.4.4/foobar/"]="mod-simple.ko" -+ ["test-depmod/search-order-simple$MODULE_DIRECTORY/4.4.4/kernel/crypto/"]="mod-simple.ko" -+ ["test-depmod/search-order-simple$MODULE_DIRECTORY/4.4.4/updates/"]="mod-simple.ko" -+ ["test-depmod/search-order-same-prefix$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" -+ ["test-depmod/search-order-same-prefix$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-c.ko"]="mod-loop-c.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-d.ko"]="mod-loop-d.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-e.ko"]="mod-loop-e.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-f.ko"]="mod-loop-f.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-g.ko"]="mod-loop-g.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-h.ko"]="mod-loop-h.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-i.ko"]="mod-loop-i.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-j.ko"]="mod-loop-j.ko" -+ ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-k.ko"]="mod-loop-k.ko" -+ ["test-depmod/search-order-external-first$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" -+ ["test-depmod/search-order-external-first$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" ++ ["test-depmod/search-order-simple/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/crypto/"]="mod-simple.ko" ++ ["test-depmod/search-order-simple/lib/modules$MODULE_DIRECTORY/4.4.4/updates/"]="mod-simple.ko" ++ ["test-depmod/search-order-same-prefix/lib/modules$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" ++ ["test-depmod/search-order-same-prefix/lib/modules$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-c.ko"]="mod-loop-c.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-d.ko"]="mod-loop-d.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-e.ko"]="mod-loop-e.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-f.ko"]="mod-loop-f.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-g.ko"]="mod-loop-g.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-h.ko"]="mod-loop-h.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-i.ko"]="mod-loop-i.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-j.ko"]="mod-loop-j.ko" ++ ["test-depmod/detect-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-k.ko"]="mod-loop-k.ko" ++ ["test-depmod/search-order-external-first/lib/modules$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" ++ ["test-depmod/search-order-external-first/lib/modules$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" ["test-depmod/search-order-external-first/lib/modules/external/"]="mod-simple.ko" - ["test-depmod/search-order-external-last/lib/modules/4.4.4/foo/"]="mod-simple.ko" - ["test-depmod/search-order-external-last/lib/modules/4.4.4/foobar/"]="mod-simple.ko" -+ ["test-depmod/search-order-external-last$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" -+ ["test-depmod/search-order-external-last$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" ++ ["test-depmod/search-order-external-last/lib/modules$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" ++ ["test-depmod/search-order-external-last/lib/modules$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" ["test-depmod/search-order-external-last/lib/modules/external/"]="mod-simple.ko" - ["test-depmod/search-order-override/lib/modules/4.4.4/foo/"]="mod-simple.ko" - ["test-depmod/search-order-override/lib/modules/4.4.4/override/"]="mod-simple.ko" @@ -304,20 +304,20 @@ index 8b13a40f2cae..2fc7e592d1b5 100755 - ["test-dependencies/lib/modules/4.0.20-kmod/kernel/"]="mod-foo-c.ko" - ["test-dependencies/lib/modules/4.0.20-kmod/kernel/lib/"]="mod-foo-a.ko" - ["test-dependencies/lib/modules/4.0.20-kmod/kernel/fs/"]="mod-foo.ko" -+ ["test-depmod/search-order-override$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" -+ ["test-depmod/search-order-override$MODULE_DIRECTORY/4.4.4/override/"]="mod-simple.ko" -+ ["test-dependencies$MODULE_DIRECTORY/4.0.20-kmod/kernel/fs/foo/"]="mod-foo-b.ko" -+ ["test-dependencies$MODULE_DIRECTORY/4.0.20-kmod/kernel/"]="mod-foo-c.ko" -+ ["test-dependencies$MODULE_DIRECTORY/4.0.20-kmod/kernel/lib/"]="mod-foo-a.ko" -+ ["test-dependencies$MODULE_DIRECTORY/4.0.20-kmod/kernel/fs/"]="mod-foo.ko" ++ ["test-depmod/search-order-override/lib/modules$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" ++ ["test-depmod/search-order-override/lib/modules$MODULE_DIRECTORY/4.4.4/override/"]="mod-simple.ko" ++ ["test-dependencies/lib/modules$MODULE_DIRECTORY/4.0.20-kmod/kernel/fs/foo/"]="mod-foo-b.ko" ++ ["test-dependencies/lib/modules$MODULE_DIRECTORY/4.0.20-kmod/kernel/"]="mod-foo-c.ko" ++ ["test-dependencies/lib/modules$MODULE_DIRECTORY/4.0.20-kmod/kernel/lib/"]="mod-foo-a.ko" ++ ["test-dependencies/lib/modules$MODULE_DIRECTORY/4.0.20-kmod/kernel/fs/"]="mod-foo.ko" ["test-init/"]="mod-simple.ko" ["test-remove/"]="mod-simple.ko" - ["test-modprobe/show-depends/lib/modules/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" - ["test-modprobe/show-depends/lib/modules/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" - ["test-modprobe/show-depends/lib/modules/4.4.4/kernel/mod-simple.ko"]="mod-simple.ko" -+ ["test-modprobe/show-depends$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" -+ ["test-modprobe/show-depends$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" -+ ["test-modprobe/show-depends$MODULE_DIRECTORY/4.4.4/kernel/mod-simple.ko"]="mod-simple.ko" ++ ["test-modprobe/show-depends/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" ++ ["test-modprobe/show-depends/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" ++ ["test-modprobe/show-depends/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-simple.ko"]="mod-simple.ko" ["test-modprobe/show-exports/mod-loop-a.ko"]="mod-loop-a.ko" - ["test-modprobe/softdep-loop/lib/modules/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" - ["test-modprobe/softdep-loop/lib/modules/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" @@ -328,32 +328,35 @@ index 8b13a40f2cae..2fc7e592d1b5 100755 - ["test-modprobe/oldkernel-force/lib/modules/3.3.3/kernel/"]="mod-simple.ko" - ["test-modprobe/alias-to-none/lib/modules/4.4.4/kernel/"]="mod-simple.ko" - ["test-modprobe/module-param-kcmdline/lib/modules/4.4.4/kernel/"]="mod-simple.ko" -+ ["test-modprobe/softdep-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" -+ ["test-modprobe/softdep-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" -+ ["test-modprobe/install-cmd-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" -+ ["test-modprobe/install-cmd-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" -+ ["test-modprobe/force$MODULE_DIRECTORY/4.4.4/kernel/"]="mod-simple.ko" -+ ["test-modprobe/oldkernel$MODULE_DIRECTORY/3.3.3/kernel/"]="mod-simple.ko" -+ ["test-modprobe/oldkernel-force$MODULE_DIRECTORY/3.3.3/kernel/"]="mod-simple.ko" -+ ["test-modprobe/alias-to-none$MODULE_DIRECTORY/4.4.4/kernel/"]="mod-simple.ko" -+ ["test-modprobe/module-param-kcmdline$MODULE_DIRECTORY/4.4.4/kernel/"]="mod-simple.ko" ++ ["test-modprobe/softdep-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" ++ ["test-modprobe/softdep-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" ++ ["test-modprobe/install-cmd-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko" ++ ["test-modprobe/install-cmd-loop/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko" ++ ["test-modprobe/force/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/"]="mod-simple.ko" ++ ["test-modprobe/oldkernel/lib/modules$MODULE_DIRECTORY/3.3.3/kernel/"]="mod-simple.ko" ++ ["test-modprobe/oldkernel-force/lib/modules$MODULE_DIRECTORY/3 ++ .3.3/kernel/"]="mod-simple.ko" ++ ["test-modprobe/alias-to-none/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/"]="mod-simple.ko" ++ ["test-modprobe/module-param-kcmdline/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/"]="mod-simple.ko" ["test-modprobe/external/lib/modules/external/"]="mod-simple.ko" + ["test-modprobe/module-from-abspath/home/foo/"]="mod-simple.ko" + ["test-modprobe/module-from-relpath/home/foo/"]="mod-simple.ko" - ["test-depmod/modules-order-compressed/lib/modules/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" - ["test-depmod/modules-order-compressed/lib/modules/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" - ["test-depmod/modules-order-compressed/lib/modules/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" - ["test-depmod/modules-outdir/lib/modules/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" - ["test-depmod/modules-outdir/lib/modules/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" - ["test-depmod/modules-outdir/lib/modules/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" -+ ["test-depmod/modules-order-compressed$MODULE_DIRECTORY/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" -+ ["test-depmod/modules-order-compressed$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" -+ ["test-depmod/modules-order-compressed$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" -+ ["test-depmod/modules-outdir$MODULE_DIRECTORY/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" -+ ["test-depmod/modules-outdir$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" -+ ["test-depmod/modules-outdir$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" ++ ["test-depmod/modules-order-compressed/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" ++ ["test-depmod/modules-order-compressed/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" ++ ["test-depmod/modules-order-compressed/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" ++ ["test-depmod/modules-outdir/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" ++ ["test-depmod/modules-outdir/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" ++ ["test-depmod/modules-outdir/lib/modules$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" ["test-modinfo/mod-simple-i386.ko"]="mod-simple-i386.ko" ["test-modinfo/mod-simple-x86_64.ko"]="mod-simple-x86_64.ko" ["test-modinfo/mod-simple-sparc64.ko"]="mod-simple-sparc64.ko" -@@ -88,20 +101,20 @@ map=( +@@ -90,20 +104,20 @@ map=( ["test-modinfo/mod-simple-sha256.ko"]="mod-simple.ko" ["test-modinfo/mod-simple-pkcs7.ko"]="mod-simple.ko" ["test-modinfo/external/lib/modules/external/mod-simple.ko"]="mod-simple.ko" @@ -379,10 +382,10 @@ index 8b13a40f2cae..2fc7e592d1b5 100755 ) attach_sha256_array=( -diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c -index 93606947f18a..c96dbf0a62be 100644 ---- a/testsuite/test-depmod.c -+++ b/testsuite/test-depmod.c +Index: kmod-31/testsuite/test-depmod.c +=================================================================== +--- kmod-31.orig/testsuite/test-depmod.c ++++ kmod-31/testsuite/test-depmod.c @@ -27,7 +27,7 @@ #define MODULES_UNAME "4.4.4" @@ -392,7 +395,7 @@ index 93606947f18a..c96dbf0a62be 100644 static noreturn int depmod_modules_order_for_compressed(const struct test *t) { const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -55,8 +55,8 @@ DEFINE_TEST(depmod_modules_order_for_compressed, +@@ -55,8 +55,8 @@ DEFINE_TEST(depmod_modules_order_for_com }); #define MODULES_OUTDIR_ROOTFS TESTSUITE_ROOTFS "test-depmod/modules-outdir" @@ -430,7 +433,7 @@ index 93606947f18a..c96dbf0a62be 100644 static noreturn int depmod_search_order_external_first(const struct test *t) { const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -191,7 +191,7 @@ DEFINE_TEST(depmod_search_order_external_first, +@@ -191,7 +191,7 @@ DEFINE_TEST(depmod_search_order_external }); #define SEARCH_ORDER_EXTERNAL_LAST_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-external-last" @@ -439,7 +442,7 @@ index 93606947f18a..c96dbf0a62be 100644 static noreturn int depmod_search_order_external_last(const struct test *t) { const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -@@ -218,7 +218,7 @@ DEFINE_TEST(depmod_search_order_external_last, +@@ -218,7 +218,7 @@ DEFINE_TEST(depmod_search_order_external }); #define SEARCH_ORDER_OVERRIDE_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-override" @@ -448,11 +451,11 @@ index 93606947f18a..c96dbf0a62be 100644 static noreturn int depmod_search_order_override(const struct test *t) { const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; -diff --git a/testsuite/test-testsuite.c b/testsuite/test-testsuite.c -index 56e73609f204..c77c4bbc04eb 100644 ---- a/testsuite/test-testsuite.c -+++ b/testsuite/test-testsuite.c -@@ -64,7 +64,7 @@ static int testsuite_rootfs_fopen(const struct test *t) +Index: kmod-31/testsuite/test-testsuite.c +=================================================================== +--- kmod-31.orig/testsuite/test-testsuite.c ++++ kmod-31/testsuite/test-testsuite.c +@@ -64,7 +64,7 @@ static int testsuite_rootfs_fopen(const char s[100]; int n; @@ -461,7 +464,7 @@ index 56e73609f204..c77c4bbc04eb 100644 if (fp == NULL) return EXIT_FAILURE;; -@@ -89,7 +89,7 @@ static int testsuite_rootfs_open(const struct test *t) +@@ -89,7 +89,7 @@ static int testsuite_rootfs_open(const s char buf[100]; int fd, done; @@ -470,7 +473,7 @@ index 56e73609f204..c77c4bbc04eb 100644 if (fd < 0) return EXIT_FAILURE; -@@ -121,12 +121,12 @@ static int testsuite_rootfs_stat_access(const struct test *t) +@@ -121,12 +121,12 @@ static int testsuite_rootfs_stat_access( { struct stat st; @@ -485,10 +488,10 @@ index 56e73609f204..c77c4bbc04eb 100644 ERR("stat failed: %m\n"); return EXIT_FAILURE; } -diff --git a/tools/depmod.c b/tools/depmod.c -index aada5ac57902..5ef490473186 100644 ---- a/tools/depmod.c -+++ b/tools/depmod.c +Index: kmod-31/tools/depmod.c +=================================================================== +--- kmod-31.orig/tools/depmod.c ++++ kmod-31/tools/depmod.c @@ -911,7 +911,7 @@ struct vertex; struct mod { struct kmod_module *kmod; @@ -498,7 +501,7 @@ index aada5ac57902..5ef490473186 100644 char *uncrelpath; /* same as relpath but ending in .ko */ struct kmod_list *info_list; struct kmod_list *dep_sym_list; -@@ -3024,11 +3024,11 @@ static int do_depmod(int argc, char *argv[]) +@@ -3024,11 +3024,11 @@ static int do_depmod(int argc, char *arg } cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX, @@ -512,10 +515,10 @@ index aada5ac57902..5ef490473186 100644 out_root ?: (root ?: ""), cfg.kversion); if (optind == argc) -diff --git a/tools/kmod.pc.in b/tools/kmod.pc.in -index 2595980a6b35..97215c8ed48f 100644 ---- a/tools/kmod.pc.in -+++ b/tools/kmod.pc.in +Index: kmod-31/tools/kmod.pc.in +=================================================================== +--- kmod-31.orig/tools/kmod.pc.in ++++ kmod-31/tools/kmod.pc.in @@ -1,6 +1,7 @@ prefix=@prefix@ sysconfdir=@sysconfdir@ @@ -524,10 +527,10 @@ index 2595980a6b35..97215c8ed48f 100644 module_compressions=@module_compressions@ module_signatures=@module_signatures@ -diff --git a/tools/modinfo.c b/tools/modinfo.c -index d0aab200af4e..cacc32dc4c40 100644 ---- a/tools/modinfo.c -+++ b/tools/modinfo.c +Index: kmod-31/tools/modinfo.c +=================================================================== +--- kmod-31.orig/tools/modinfo.c ++++ kmod-31/tools/modinfo.c @@ -367,7 +367,7 @@ static void help(void) "\t-m, --modname Handle argument as module name instead of alias or filename\n" "\t-F, --field=FIELD Print only provided FIELD\n" @@ -537,7 +540,7 @@ index d0aab200af4e..cacc32dc4c40 100644 "\t-V, --version Show version\n" "\t-h, --help Show this help\n", program_invocation_short_name); -@@ -462,7 +462,7 @@ static int do_modinfo(int argc, char *argv[]) +@@ -462,7 +462,7 @@ static int do_modinfo(int argc, char *ar } kversion = u.release; } @@ -546,10 +549,10 @@ index d0aab200af4e..cacc32dc4c40 100644 root, kversion); dirname = dirname_buf; } -diff --git a/tools/modprobe.c b/tools/modprobe.c -index 322d5d199372..c7016a58e43f 100644 ---- a/tools/modprobe.c -+++ b/tools/modprobe.c +Index: kmod-31/tools/modprobe.c +=================================================================== +--- kmod-31.orig/tools/modprobe.c ++++ kmod-31/tools/modprobe.c @@ -146,7 +146,7 @@ static void help(void) "\t-n, --show Same as --dry-run\n" @@ -559,7 +562,7 @@ index 322d5d199372..c7016a58e43f 100644 "\t-S, --set-version=VERSION Use VERSION instead of `uname -r`\n" "\t-s, --syslog print to syslog, not stderr\n" -@@ -983,7 +983,7 @@ static int do_modprobe(int argc, char **orig_argv) +@@ -1012,7 +1012,7 @@ static int do_modprobe(int argc, char ** kversion = u.release; } snprintf(dirname_buf, sizeof(dirname_buf), @@ -568,11 +571,11 @@ index 322d5d199372..c7016a58e43f 100644 kversion); dirname = dirname_buf; } -diff --git a/tools/static-nodes.c b/tools/static-nodes.c -index 8d2356da73f3..5ef3743e967b 100644 ---- a/tools/static-nodes.c -+++ b/tools/static-nodes.c -@@ -212,15 +212,15 @@ static int do_static_nodes(int argc, char *argv[]) +Index: kmod-31/tools/static-nodes.c +=================================================================== +--- kmod-31.orig/tools/static-nodes.c ++++ kmod-31/tools/static-nodes.c +@@ -212,15 +212,15 @@ static int do_static_nodes(int argc, cha goto finish; } @@ -591,6 +594,3 @@ index 8d2356da73f3..5ef3743e967b 100644 kernel.release); ret = EXIT_FAILURE; } --- -2.41.0 -