Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2018-10-25 22:35:11 +0200
committerMartin Wilck <mwilck@suse.com>2018-11-06 15:29:26 +0100
commit0d585a8c2d17de86869cc695fc7a5d10c6b96abb (patch)
tree9031374217d48593a5b6b4ad2e4a6ecc25a33551
parent09d14c80935854f0bcc8f1aff5ad60503defcaaa (diff)
rpm/kernel-binary.spec.in: allow unsupported modules for -extra
(bsc#1111183). SLE-15 and later only.
-rw-r--r--rpm/kernel-binary.spec.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index 2424867542..9430c5793f 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -876,6 +876,30 @@ done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
} > %my_builddir/kernel-main.files
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
+
+%if 0%{?sle_version} >= 150000
+ # By default, loading unsupported modules is disabled on SLE through
+ # /etc/modprobe.d/10-unsupported-modules.conf from the suse-module-tools
+ # package.
+ # modules in kernel-$flavor-extra don't have the supported flag set,
+ # yet loading them should be possible if the package is installed.
+ # CAUTION PACKAGERS: The file content below must not change between
+ # kernel versions, otherwise file conflicts might arise with
+ # multiversion(kernel).
+
+ mkdir -p %buildroot/etc/modprobe.d
+ cat >%buildroot/etc/modprobe.d/20-kernel-%{build_flavor}-extra.conf <<EOF
+# This file overrides the default from 10-unsupported-modules.conf.
+# This is necessary to load kernel modules from the
+# kernel-%{build_flavor}-extra package.
+#
+# WARNING: loading unsupported modules may compromise SLE support.
+# Please read the comments in 10-unsupported-modules.conf.
+allow_unsupported_modules 1
+EOF
+ echo "%%dir /etc/modprobe.d" >> %my_builddir/kernel-extra.files
+ echo '%%config(noreplace) /etc/modprobe.d/20-kernel-%{build_flavor}-extra.conf' >> %my_builddir/kernel-extra.files
+%endif
%endif
for f in %my_builddir/*-kmp-modules; do
f2=${f%%-modules}.files