From 0768a38931ddf402f0127fbba26dc1b63393e41ed76e1d7331e6ba49a1b81c1b Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Fri, 26 Oct 2018 17:17:37 +0000 Subject: [PATCH] Accepting request 644922 from home:mwilck:branches:Base:System - Update to version 15.0+git20181026.9b7bf86: * spec file: merge OBS bot changes - Update to version 15.0+git20181026.4f4ddf9: * unsupported modules: new logic for Code 15 and newer (bsc#1111183) - SLES: allow unsupported modules only if SLE WE is installed (new package suse-module-tools-we overrides policy) - change update policy for 10-unsupported-modules.conf to "replace" - Always allow unsupported modules on Leap 15 and Factory - No change for releases below 15 - Update to version 15.0+git20181026.3380c9b: * spec file: update SPDX license to new format * spec file: fix rpmlint warning about macro in comment * spec file: use %license * spec file: fix Requires: tags OBS-URL: https://build.opensuse.org/request/show/644922 OBS-URL: https://build.opensuse.org/package/show/Base:System/suse-module-tools?expand=0&rev=42 --- _servicedata | 2 +- ...dule-tools-15.0+git20181026.9b7bf86.tar.xz | 3 + ...dule-tools-15.0+git20181026.e511cd8.tar.xz | 3 - suse-module-tools.changes | 28 +++++++ suse-module-tools.spec | 83 +++++++++++++++---- 5 files changed, 99 insertions(+), 20 deletions(-) create mode 100644 suse-module-tools-15.0+git20181026.9b7bf86.tar.xz delete mode 100644 suse-module-tools-15.0+git20181026.e511cd8.tar.xz diff --git a/_servicedata b/_servicedata index 97d23a6..0167487 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/openSUSE/suse-module-tools.git - e511cd8b41f0246a32d06972b2ccd39786deb392 \ No newline at end of file + 9b7bf86003dd076b170de97e977a6c00e889fe81 \ No newline at end of file diff --git a/suse-module-tools-15.0+git20181026.9b7bf86.tar.xz b/suse-module-tools-15.0+git20181026.9b7bf86.tar.xz new file mode 100644 index 0000000..62cfd91 --- /dev/null +++ b/suse-module-tools-15.0+git20181026.9b7bf86.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1a6f4240c84fca613b3c9951f874720b8dc936654b25bfb1104adc4485b8edf +size 26916 diff --git a/suse-module-tools-15.0+git20181026.e511cd8.tar.xz b/suse-module-tools-15.0+git20181026.e511cd8.tar.xz deleted file mode 100644 index 496ca52..0000000 --- a/suse-module-tools-15.0+git20181026.e511cd8.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:608d4af88c3d210b83d62b546f463cba95e76620f29c38a4b6cd4ce87dbefaae -size 26416 diff --git a/suse-module-tools.changes b/suse-module-tools.changes index 9043add..9d973e8 100644 --- a/suse-module-tools.changes +++ b/suse-module-tools.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Fri Oct 26 16:10:51 UTC 2018 - mwilck@suse.com + +- Update to version 15.0+git20181026.9b7bf86: + * spec file: merge OBS bot changes + +------------------------------------------------------------------- +Fri Oct 26 15:45:07 UTC 2018 - mwilck@suse.com + +- Update to version 15.0+git20181026.4f4ddf9: + * unsupported modules: new logic for Code 15 and newer + (bsc#1111183) + - SLES: allow unsupported modules only if SLE WE is installed + (new package suse-module-tools-we overrides policy) + - change update policy for 10-unsupported-modules.conf to + "replace" + - Always allow unsupported modules on Leap 15 and Factory + - No change for releases below 15 + +------------------------------------------------------------------- +Fri Oct 26 15:12:09 UTC 2018 - mwilck@suse.com + +- Update to version 15.0+git20181026.3380c9b: + * spec file: update SPDX license to new format + * spec file: fix rpmlint warning about macro in comment + * spec file: use %license + * spec file: fix Requires: tags + ------------------------------------------------------------------- Fri Oct 26 14:34:25 UTC 2018 - mwilck@suse.com diff --git a/suse-module-tools.spec b/suse-module-tools.spec index dd905e9..c4944fa 100644 --- a/suse-module-tools.spec +++ b/suse-module-tools.spec @@ -17,7 +17,7 @@ Name: suse-module-tools -Version: 15.0+git20181026.e511cd8 +Version: 15.0+git20181026.9b7bf86 Release: 0 Summary: Configuration for module loading and SUSE-specific utilities for KMPs License: GPL-2.0-or-later @@ -25,18 +25,14 @@ Group: System/Base Url: https://github.com/openSUSE/suse-module-tools Source0: %{name}-%{version}.tar.xz Requires: /sbin/mkinitrd +Requires: binutils +Requires: coreutils Requires: findutils +Requires: grep Requires: gzip Requires: kmod-compat -# could use eu-nm from elfutils too but it is higher in dep-chanin -Requires(post): binutils -# nm and rpmsort (rpm) are required by the weak-modules script which is invoked -# in post, it also requires getopt (coreutils) and sed -Requires(post): coreutils -# for grepping /etc/os-release -Requires(post): grep -Requires(post): rpm -Requires(post): sed +Requires: rpm +Requires: sed %description This package contains helper scripts for KMP installation and @@ -44,6 +40,23 @@ uninstallation, as well as default configuration files for depmod and modprobe. These utilities are provided by kmod-compat or module-init-tools, whichever implementation you choose to install. +%if 0%{?sle_version} >= 150000 +%if 0%{?is_opensuse} == 0 +%package we +Summary: Configuration module for Workstation Extension +Group: System/Base +Requires: %{name} >= %{version} +Supplements: kernel-default-extra + +%description we +This package contains a configuration file that allows loading +unsupported kernel modules. This is necessary to load modules +from the kernel-default-extra package from the SUSE Linux Enterprise +Workstation Extension module. + +%endif +%endif + %prep %setup -q @@ -59,6 +72,15 @@ fi install -d -m 755 "%{buildroot}%{_sysconfdir}/modprobe.d" install -pm644 "10-unsupported-modules.conf" \ "%{buildroot}%{_sysconfdir}/modprobe.d/" +%if 0%{?sle_version} >= 150000 +%if 0%{?is_opensuse} == 0 +cat >"%{buildroot}%{_sysconfdir}/modprobe.d/20-unsupported-modules-we.conf" <= 150000 +# Delete obsolete unsupported-modules file from SLE11 +rm -f %{_sysconfdir}/modprobe.d/unsupported-modules +%if 0%{?is_opensuse} == 1 +# Disallowing unsupported modules on openSUSE is pointless. +allow=1 +%else +# On SLE15, unsupported modules are disallowed unless the WE +# module is installed. We deliberately reset this on update. +allow=0 +%endif +%else +# Logic for releases below CODE 15 test_allow_on_install() { # configure handling of unsupported modules @@ -118,7 +153,7 @@ test_allow_on_install() return fi # or if the installer already loaded some unsupported modules - # (see TAINT_NO_SUPPORT in %{_prefix}/src/linux/include/linux/kernel.h) + # (see TAINT_NO_SUPPORT in /etc/src/linux/include/linux/kernel.h) tainted=$(cat /proc/sys/kernel/tainted 2>/dev/null || echo 0) if test $((tainted & (1<<30))) != 0; then allow=1 @@ -130,22 +165,30 @@ if test -e %{_sysconfdir}/modprobe.d/unsupported-modules; then mv -f %{_sysconfdir}/modprobe.d/unsupported-modules \ %{_sysconfdir}/modprobe.d/10-unsupported-modules.conf fi -if test -e %{_sysconfdir}/modprobe.conf.local; then - mv -f %{_sysconfdir}/modprobe.conf.local \ - %{_sysconfdir}/modprobe.d/99-local.conf -fi test_allow_on_install "$@" +%endif if test "$allow" = "0"; then sed -ri 's/^( *allow_unsupported_modules *) 1/\1 0/' \ %{_sysconfdir}/modprobe.d/10-unsupported-modules.conf fi +# upgrade from old locations +if test -e %{_sysconfdir}/modprobe.conf.local; then + mv -f %{_sysconfdir}/modprobe.conf.local \ + %{_sysconfdir}/modprobe.d/99-local.conf +fi + %files %defattr(-,root,root) -%doc LICENSE README.SUSE +%license LICENSE +%doc README.SUSE %dir %{_sysconfdir}/modprobe.d %config %{_sysconfdir}/modprobe.d/00-system.conf +%if 0%{?sle_version} >= 150000 +%config %{_sysconfdir}/modprobe.d/10-unsupported-modules.conf +%else %config(noreplace) %{_sysconfdir}/modprobe.d/10-unsupported-modules.conf +%endif %config(noreplace) %{_sysconfdir}/modprobe.d/99-local.conf %dir %{_sysconfdir}/depmod.d %config %{_sysconfdir}/depmod.d/00-system.conf @@ -156,4 +199,12 @@ fi %{_libexecdir}/module-init-tools %{_libexecdir}/systemd/system/systemd-sysctl.service.d +%if 0%{?sle_version} >= 150000 +%if 0%{?is_opensuse} == 0 +%files we +%defattr(-,root,root) +%config /etc/modprobe.d/20-unsupported-modules-we.conf +%endif +%endif + %changelog