From 42e0a272383a1117804c2087658808d0897e3fe48b02f94f694b8211863115a3 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Fri, 2 Nov 2018 20:35:11 +0000 Subject: [PATCH] Accepting request 646125 from home:mwilck:branches:Base:System - version 15.0 - modsign-verify: support for parsing PKCS#7 signatures (bsc#1111300, bsc#1105495) - Fix logic for unsupported modules (bsc#1111183) * SLES15: allow unsupported modules only if SLE WE is installed * Always allow unsupported modules on Leap 15 and Factory * No change for SLE12 / Leap 42.x and below * 10-unsupported-modules.conf: improved comments * fix %config(noreplace) logic for 10-unsupported-modules.conf - added udev rule 81-sg.rules to make sure the sg module is always loaded (bsc#1036463) - spec file cleanup and build fixes for older OS releases - Changelog cleanup (only user-visible changes) - reverted recent %config(noreplace)->%config change (bsc#1111183) OBS-URL: https://build.opensuse.org/request/show/646125 OBS-URL: https://build.opensuse.org/package/show/Base:System/suse-module-tools?expand=0&rev=43 --- _service | 4 +- _servicedata | 2 +- ...dule-tools-15.0+git20181026.9b7bf86.tar.xz | 3 - suse-module-tools-15.0.tar.xz | 3 + suse-module-tools.changes | 45 ++++---------- suse-module-tools.spec | 61 +++++++++++++------ 6 files changed, 62 insertions(+), 56 deletions(-) delete mode 100644 suse-module-tools-15.0+git20181026.9b7bf86.tar.xz create mode 100644 suse-module-tools-15.0.tar.xz diff --git a/_service b/_service index ce34c62..5839ba2 100644 --- a/_service +++ b/_service @@ -4,11 +4,11 @@ git enable suse-module-tools - 15.0+git%cd.%h + 15.0 + 15.0 *.tar xz - diff --git a/_servicedata b/_servicedata index 0167487..611e429 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/openSUSE/suse-module-tools.git - 9b7bf86003dd076b170de97e977a6c00e889fe81 \ No newline at end of file + 21fae5ccce7f12a75e82ff5de7b2bd82791f13b6 \ 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 deleted file mode 100644 index 62cfd91..0000000 --- a/suse-module-tools-15.0+git20181026.9b7bf86.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1a6f4240c84fca613b3c9951f874720b8dc936654b25bfb1104adc4485b8edf -size 26916 diff --git a/suse-module-tools-15.0.tar.xz b/suse-module-tools-15.0.tar.xz new file mode 100644 index 0000000..7798361 --- /dev/null +++ b/suse-module-tools-15.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:797b60b2765f1124e5c4f9fcdaaa3c8e2d87b8e441df1df3c8336f5b636cf87a +size 30016 diff --git a/suse-module-tools.changes b/suse-module-tools.changes index 9d973e8..b0619c5 100644 --- a/suse-module-tools.changes +++ b/suse-module-tools.changes @@ -1,39 +1,18 @@ ------------------------------------------------------------------- -Fri Oct 26 16:10:51 UTC 2018 - mwilck@suse.com +Fri Nov 02 20:01:01 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 +- version 15.0 +- modsign-verify: support for parsing PKCS#7 signatures + (bsc#1111300, bsc#1105495) +- Fix logic for unsupported modules (bsc#1111183) + * SLES15: 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 - -- Update to version 15.0+git20181026.e511cd8: - No change, except that the spec file and rpmlintrc are now - also in git and thus in the tarball. - * update spec file to Base:System version - * suse-module-tools: Added spec file and rpmlintrc + * Always allow unsupported modules on Leap 15 and Factory + * No change for SLE12 / Leap 42.x and below + * 10-unsupported-modules.conf: improved comments + * fix %config(noreplace) logic for 10-unsupported-modules.conf +- added udev rule 81-sg.rules to make sure the sg module is + always loaded (bsc#1036463) ------------------------------------------------------------------- Wed Jul 26 08:07:29 UTC 2017 - tchvatal@suse.com diff --git a/suse-module-tools.spec b/suse-module-tools.spec index c4944fa..0a08ff3 100644 --- a/suse-module-tools.spec +++ b/suse-module-tools.spec @@ -17,7 +17,7 @@ Name: suse-module-tools -Version: 15.0+git20181026.9b7bf86 +Version: 15.0 Release: 0 Summary: Configuration for module loading and SUSE-specific utilities for KMPs License: GPL-2.0-or-later @@ -33,6 +33,11 @@ Requires: gzip Requires: kmod-compat Requires: rpm Requires: sed +# For SLE11-SP4 +%if 0%{suse_version} < 1200 +BuildRequires: xz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif %description This package contains helper scripts for KMP installation and @@ -61,7 +66,10 @@ Workstation Extension module. %setup -q %build -: +%if 0%{?is_opensuse} == 0 +sed -ri 's/^( *allow_unsupported_modules *) 1/\1 0/' \ + 10-unsupported-modules.conf +%endif %install # now assemble the parts for modprobe.conf @@ -104,24 +112,31 @@ install -pm 755 kmp-install "%{buildroot}%{_bindir}/" # modhash for calculating hash of signed kernel module install -pm 755 modhash "%{buildroot}%{_bindir}/" +%if 0%{suse_version} >= 1200 # systemd service to load /boot/sysctl.conf-`uname -r` install -d -m 755 "%{buildroot}%{_libexecdir}/systemd/system/systemd-sysctl.service.d" install -pm 644 50-kernel-uname_r.conf "%{buildroot}%{_libexecdir}/systemd/system/systemd-sysctl.service.d" +%endif + +# udev rule to load sg if necessary, and after type-specific driver +install -d -m 755 "%{buildroot}%{_libexecdir}/udev/rules.d" +install -pm 644 81-sg.rules "%{buildroot}%{_libexecdir}/udev/rules.d" + +%if 0%{suse_version} >= 1200 +mkdir -p %{buildroot}%{_defaultlicensedir} +%endif %post %if 0%{?sle_version} >= 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 +%if 0%{?is_opensuse} == 1 +allowed=1 +%else +allowed=0 +%endif test_allow_on_install() { # configure handling of unsupported modules @@ -139,6 +154,7 @@ test_allow_on_install() fi # don't change the setting during upgrade if test "$1" != 1; then + allow= return fi # on SLES, the default is not to allow unsupported modules @@ -166,11 +182,11 @@ if test -e %{_sysconfdir}/modprobe.d/unsupported-modules; then %{_sysconfdir}/modprobe.d/10-unsupported-modules.conf fi test_allow_on_install "$@" -%endif -if test "$allow" = "0"; then - sed -ri 's/^( *allow_unsupported_modules *) 1/\1 0/' \ +if test -n "$allow" -a "$allow" != "$allowed"; then + sed -ri 's/^( *allow_unsupported_modules *) [01]/\1 '"$allow"'/' \ %{_sysconfdir}/modprobe.d/10-unsupported-modules.conf fi +%endif # upgrade from old locations if test -e %{_sysconfdir}/modprobe.conf.local; then @@ -180,15 +196,19 @@ fi %files %defattr(-,root,root) + +%if 0%{suse_version} >= 1200 +%if 0%{?sle_version:%{sle_version}}%{!?sle_version:150000} <= 120200 +%dir %{_defaultlicensedir} +%endif %license LICENSE +%else +%doc LICENSE +%endif %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 @@ -197,7 +217,14 @@ fi %{_bindir}/kmp-install %{_bindir}/modsign-verify %{_libexecdir}/module-init-tools +%if 0%{?suse_version} >= 1200 %{_libexecdir}/systemd/system/systemd-sysctl.service.d +%endif +%if 0%{?sle_version} <= 120200 +%dir %{_libexecdir}/udev +%endif +%dir %{_libexecdir}/udev/rules.d +%{_libexecdir}/udev/rules.d/81-sg.rules %if 0%{?sle_version} >= 150000 %if 0%{?is_opensuse} == 0