From 8d9bb441dbc9af0dd404c5266f01f81338dd313da947f315667f971b2670c299 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 9 Jun 2018 00:17:06 +0000 Subject: [PATCH 1/3] Accepting request 615319 from home:win32asm:branches:openSUSE:Factory allow 'modprobe -c' print the status of "allow_unsupported_modules" option. Sorry for many 'commits'. OBS-URL: https://build.opensuse.org/request/show/615319 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=144 --- 0012-modprobe-print-unsupported-status.patch | 75 ++++++++++++++++++++ kmod.spec | 3 +- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 0012-modprobe-print-unsupported-status.patch diff --git a/0012-modprobe-print-unsupported-status.patch b/0012-modprobe-print-unsupported-status.patch new file mode 100644 index 0000000..a854fba --- /dev/null +++ b/0012-modprobe-print-unsupported-status.patch @@ -0,0 +1,75 @@ +From 7e04a4a70e514aec5ed2328cb0a2d48bf6408197 Mon Sep 17 00:00:00 2001 +From: Vlad Bespalov +Date: Fri, 8 Jun 2018 21:13:00 +0000 +Subject: [PATCH] modprobe: print status of "allow_unsupported_modules" + variable + +In SLES11 modprobe printed everything referenced in /etc/modprobe.d +in SLES12 config parsing changed to explicitly find and print +specific groups of modprobe options, which did not print +the status of "allow_unsupported_modules" option when running +modprobe -c +The proposed patch fixes this deficiency + +Patch-mainline: never +--- + libkmod/libkmod-config.c | 13 +++++++++++++ + libkmod/libkmod.h | 1 + + tools/modprobe.c | 5 +++++ + 3 files changed, 19 insertions(+) + +diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c +index 550a612..0fc2250 100644 +--- a/libkmod/libkmod-config.c ++++ b/libkmod/libkmod-config.c +@@ -1008,6 +1008,19 @@ static struct kmod_config_iter *kmod_config_iter_new(const struct kmod_ctx* ctx, + * @short_description: retrieve current libkmod configuration + */ + ++/* ++ * kmod_config_unsupported_allowed: ++ * @ctx: kmod library context ++ * ++ * Retrieve status of unsupported modules ++ */ ++KMOD_EXPORT bool kmod_config_unsupported_allowed(const struct kmod_ctx *ctx) ++{ ++ struct kmod_config *config = (struct kmod_config *)kmod_get_config(ctx); ++ ++ return !config->block_unsupported; ++} ++ + /** + * kmod_config_get_blacklists: + * @ctx: kmod library context +diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h +index f9e33c6..0ae8ab3 100644 +--- a/libkmod/libkmod.h ++++ b/libkmod/libkmod.h +@@ -115,6 +115,7 @@ const char *kmod_config_iter_get_key(const struct kmod_config_iter *iter); + const char *kmod_config_iter_get_value(const struct kmod_config_iter *iter); + bool kmod_config_iter_next(struct kmod_config_iter *iter); + void kmod_config_iter_free_iter(struct kmod_config_iter *iter); ++bool kmod_config_unsupported_allowed(const struct kmod_ctx *ctx); + + /* + * kmod_module +diff --git a/tools/modprobe.c b/tools/modprobe.c +index 1f6f286..8064e37 100644 +--- a/tools/modprobe.c ++++ b/tools/modprobe.c +@@ -199,6 +199,11 @@ static int show_config(struct kmod_ctx *ctx) + kmod_config_iter_free_iter(iter); + } + ++ // SUSE specific option: ++ if (!kmod_config_unsupported_allowed(ctx)) { ++ puts("allow_unsupported_modules 0\n"); ++ } ++ + puts("\n# End of configuration files. Dumping indexes now:\n"); + fflush(stdout); + +-- +2.12.3 + diff --git a/kmod.spec b/kmod.spec index 4849505..70db632 100644 --- a/kmod.spec +++ b/kmod.spec @@ -37,6 +37,7 @@ Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: libkmod-signature-Fix-crash-when-module-signature-is.patch Patch7: libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch +Patch8: 0012-modprobe-print-unsupported-status.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asn1c BuildRequires: autoconf @@ -109,7 +110,7 @@ in %lname. %prep %setup -q -n kmod-%version -%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -p1 +%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8 -p1 %build autoreconf -fi From 8deff237eb48f261782784d16054f592f5786447b733ef71bfdadd009232ca89 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 10 Jun 2018 12:22:43 +0000 Subject: [PATCH 2/3] Accepting request 615285 from home:michals Merge SLE12 changelog. OBS-URL: https://build.opensuse.org/request/show/615285 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=145 --- kmod.changes | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/kmod.changes b/kmod.changes index ef7f3b5..8267280 100644 --- a/kmod.changes +++ b/kmod.changes @@ -85,6 +85,12 @@ Thu Jul 21 09:56:02 UTC 2016 - jengelh@inai.de - Drop depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch (merged), 0001-libkmod-Handle-long-lines-in-proc-modules.patch (merged) +------------------------------------------------------------------- +Thu Jul 21 09:37:54 UTC 2016 - mmarek@suse.com + +- Regenerate initrd on kmod update (bsc#989788) +- Sync specfile with openSUSE:Factory + ------------------------------------------------------------------- Fri Jun 17 15:18:29 UTC 2016 - mmarek@suse.cz @@ -123,7 +129,7 @@ Tue Apr 21 14:38:55 UTC 2015 - mmarek@suse.cz * Testsuite moved to a separate package, since it is now building the test modules from sources, which requires the kernel package. * dropped kmod-blacklist-fixtest.patch (merged upstream) - +* includes 0001-Fix-race-while-loading-modules.patch (bsc#998906) ------------------------------------------------------------------- Thu Apr 2 18:24:23 UTC 2015 - crrodriguez@opensuse.org @@ -193,6 +199,14 @@ Sat Apr 12 12:33:16 UTC 2014 - matwey.kornilov@gmail.com - Add 0001-Fix-recursion-loop-in-mod_count_all_dependencies-whe.patch * Fix segfault at cycled deps (bnc#872715) +------------------------------------------------------------------- +Fri Apr 11 07:27:16 UTC 2014 - mmarek@suse.cz + +- testsutie: Uncompress most modules (updated test-files.tar.xz) +- testsuite: Do not run tests with *.ko.gz if zlib is not enabled +- Disable compression support, as other tools do not support it + (e.g. module signing) + ------------------------------------------------------------------- Tue Apr 8 08:36:22 UTC 2014 - mmarek@suse.cz @@ -213,6 +227,18 @@ Mon Apr 7 19:07:17 UTC 2014 - mmarek@suse.com 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch 0010-modprobe-Implement-allow-unsupported-modules.patch +------------------------------------------------------------------- +Tue Apr 1 13:01:28 UTC 2014 - mmarek@suse.cz + +- libkmod: Ignore errors from softdeps (bnc#831227) +- config: also parse softdeps from modules (bnc#831227) + +------------------------------------------------------------------- +Mon Mar 31 16:14:58 UTC 2014 - mmarek@suse.cz + +- libkmod-config,depmod: Accept special files as configuration + files, too +- libkmod-config: Only match dot before '=' in /proc/cmdline ------------------------------------------------------------------- Tue Mar 11 13:38:23 UTC 2014 - mmarek@suse.cz From 33e9862bedafa2e22fd66beb2c871bb9d95a0a64a0c50dc828494e5bf0e33117 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 12 Jun 2018 06:08:42 +0000 Subject: [PATCH 3/3] Accepting request 616063 from home:michals - allow 'modprobe -c' print the status of "allow_unsupported_modules" option. + 0012-modprobe-print-unsupported-status.patch Please don't accept requests without changelog. They are rejected by Factory. OBS-URL: https://build.opensuse.org/request/show/616063 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=146 --- kmod.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmod.changes b/kmod.changes index 8267280..6466270 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 8 21:37:14 UTC 2018 - vlad.botanic@gmail.com + +- allow 'modprobe -c' print the status of "allow_unsupported_modules" option. + + 0012-modprobe-print-unsupported-status.patch + ------------------------------------------------------------------- Fri Apr 6 10:43:42 UTC 2018 - msuchanek@suse.com