From e5eda160d74825593f5d72c66c00eb93aa3709af2d6353f06dff3290f8c11e29 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 5 Jun 2023 12:56:55 +0000 Subject: [PATCH] Accepting request 1089989 from home:breadyx_:branches:X11:Bumblebee * Fix path to dkms_autoinstaller (boo#1194723) * Fix various bugs in dkms.systemd (boo#1194723) * Rename /etc/kernel/install.d/dkms to 40-dkms.install (boo#1194723) * Remove '--no-initrams' from weak_modules_no_initrd (boo#1194723) * Add `40-dkms.install` into /usr/lib/kernel/install.d * Update to 3.0.11 OBS-URL: https://build.opensuse.org/request/show/1089989 OBS-URL: https://build.opensuse.org/package/show/X11:Bumblebee/dkms?expand=0&rev=30 --- dkms-2.8.8.tar.gz | 3 -- dkms-3.0.11.tar.gz | 3 ++ dkms.changes | 64 +++++++++++++++++++++++++++++++++- dkms.spec | 21 +++++++++-- dkms.systemd | 7 ++-- fix-kernel-postinst_d.patch | 13 +++++++ fix-weak-modules_dkms_in.patch | 13 +++++++ 7 files changed, 114 insertions(+), 10 deletions(-) delete mode 100644 dkms-2.8.8.tar.gz create mode 100644 dkms-3.0.11.tar.gz create mode 100644 fix-kernel-postinst_d.patch create mode 100644 fix-weak-modules_dkms_in.patch diff --git a/dkms-2.8.8.tar.gz b/dkms-2.8.8.tar.gz deleted file mode 100644 index 96fb2b4..0000000 --- a/dkms-2.8.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2ac05f0d2364bc9e525c56435cfcd388628d46dbd05900ab51e1b8d62008e1e9 -size 52905 diff --git a/dkms-3.0.11.tar.gz b/dkms-3.0.11.tar.gz new file mode 100644 index 0000000..07dbf9b --- /dev/null +++ b/dkms-3.0.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5582aa7ab1815d23c63adc09fdf96f04842381a76471d205f3b183e90b3d4d1 +size 93521 diff --git a/dkms.changes b/dkms.changes index b026df1..9c183c6 100644 --- a/dkms.changes +++ b/dkms.changes @@ -1,3 +1,65 @@ +------------------------------------------------------------------- +Sat May 13 10:43:48 UTC 2023 - Alexandru Gabriel Bradatan + +- Fix path to dkms_autoinstaller (boo#1194723) +- Fix various bugs in dkms.systemd (boo#1194723) +- Rename /etc/kernel/install.d/dkms to 40-dkms.install (boo#1194723) +- Remove '--no-initrams' from weak_modules_no_initrd (boo#1194723) +- Add `40-dkms.install` into /usr/lib/kernel/install.d +- Update to 3.0.11 + * Fix updating modules with no version + * Reinstate NO_WEAK_MODULES section in man + * Skip module signing when hash is unknown + * Reinstate --enroll-key + * Add BUILD_EXCLUSIVE_CONFIG + * Misc fixes +- Update to 3.0.10 + * Fix warnings for modules with no version + * Fix modprobe_on_install not being honored in the config file +- Update to 3.0.9 + * Support variable expansion in framework files + * Fix --config option + * Verify the key of module signature in tests + * Handle error cases in autoinstall + * Follow the target kernel's module hash algorithm + * Fix incomplete deletion of install directory + * Correct searching for rpm in PATH + * Ensure the kconfig file location is set during building + * Fix the search for the path of installed modules + * Use exact compiler for dkms as used to build the kernel +- Update to 3.0.8 + * Fix using PKCS#11 engine as private key +- Update to 3.0.7 + * Bad substitution bugfix + * Update dkms.in to passthrough URI to sign-file + * Fix commands detecting +- Update to 3.0.6 + * Fix typo in dkms_framework.conf + * Look for sign-file regardless +- Update to 3.0.5 + * Put version comparison before info comparison + * Fix typo in commented defaults +- Update to 3.0.4 + * Respect PATH + * Fallback to uncompressed module when compress fails + * Rework signing + * Add /etc/dkms/framework.conf.d directory +- Update to 3.0.3 + * Fix source only tarballs unpacked with ldtarball +- Update to 3.0.2 + * Enable using add, build and install with a directory again + * Fix Linux distribution identification through /etc/os-release +- Update to 3.0.1 + * Silently consume the old --no-initrd option + * Fix creation of temp build dir +- Update to 3.0.0 + * Clarify --all switch in the man page + * Fix root permissions checking for the various possible actions + * The following variables have been deprecated: + - REMAKE_INITRD, MODULES_CONF, MODULES_CONF_OBSOLETES, + MODULES_CONF_ALIAS_TYPE, and MODULES_CONF_OBSOLETE_ONLY + * Misc fixes + ------------------------------------------------------------------- Thu Jan 19 10:12:58 UTC 2023 - Ferdinand Thiessen @@ -60,7 +122,7 @@ Sun Jan 15 05:30:21 UTC 2017 - i@marguerite.su * added support for forcing modules installation with configuration files * fixed mkinitrd call when using dracut * fixed have_one_kernel for non-zero return code - * added --no-depmod action to prevent running depmod + * added --no-depmod action to prevent running depmod * fixed removal of module build directory * fixed check of obsolete modules * added option to symlink modules diff --git a/dkms.spec b/dkms.spec index 8c7b9b1..5843b0d 100644 --- a/dkms.spec +++ b/dkms.spec @@ -17,17 +17,21 @@ Name: dkms -Version: 2.8.8 +Version: 3.0.11 Release: 0 Summary: Dynamic Kernel Module Support Framework License: GPL-2.0-only Group: System/Kernel URL: https://github.com/dell/dkms -Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: dkms.service Source2: dkms.systemd Source3: dkms.default Source100: %{name}.rpmlintrc +# PATCH-FIX-OPENSUSE fix-kernel-postinst_d.patch boo#1194723 +Patch1: fix-kernel-postinst_d.patch +# PATCH-FIX-OPENSUSE fix-weak-modules_dkms_in.patch boo#1194723 +Patch2: fix-weak-modules_dkms_in.patch BuildRequires: pkgconfig(systemd) Requires: bash > 1.99 Requires: cpio @@ -53,6 +57,7 @@ module RPMS as originally developed by Dell. %prep %setup -q +%autopatch -p1 1 2 %build @@ -65,6 +70,13 @@ module RPMS as originally developed by Dell. BASHDIR=%{buildroot}%{_datadir}/bash-completion/completions \ LIBDIR=%{buildroot}%{_libexecdir}/%{name} +install -p -m 755 -D kernel_install.d_dkms \ + %{buildroot}%{_prefix}/lib/kernel/install.d/40-%{name}.install + +# Required due to changes in kernel-install +mv %{buildroot}%{_sysconfdir}/kernel/install.d/%{name} \ + %{buildroot}%{_sysconfdir}/kernel/install.d/40-%{name}.install + # systemd mkdir -p %{buildroot}%{_unitdir} install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir} @@ -109,6 +121,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/%{name} %{_sbindir}/%{name} %{_sbindir}/rcdkms +%{_prefix}/lib/kernel/install.d/40-%{name}.install %{_localstatedir}/lib/%{name} %{_libexecdir}/%{name} %{_tmpfilesdir}/dkms.conf @@ -116,7 +129,7 @@ exit 0 # these dirs are for plugins - owned by other packages %{_sysconfdir}/kernel/postinst.d/%{name} %{_sysconfdir}/kernel/prerm.d/%{name} -%{_sysconfdir}/kernel/install.d/%{name} +%{_sysconfdir}/kernel/install.d/40-%{name}.install %{_datadir}/bash-completion/completions/%{name} %{_unitdir}/dkms.service %{_unitdir}/dkms.systemd @@ -125,5 +138,7 @@ exit 0 %dir %{_sysconfdir}/kernel/postinst.d %dir %{_sysconfdir}/kernel/install.d %dir %{_sysconfdir}/kernel/prerm.d +%dir %{_prefix}/lib/kernel/ +%dir %{_prefix}/lib/kernel/install.d %changelog diff --git a/dkms.systemd b/dkms.systemd index 0a4a514..4d82ded 100644 --- a/dkms.systemd +++ b/dkms.systemd @@ -5,13 +5,14 @@ # list dkms modules for the current running kernel list_dkms_modules() { shopt -s nullglob - declare -a DKMS_MOULES + declare -ag DKMS_MODULES # dkms status needs uname -r to list correctly intalled version for current kernel - local modules_path=($(dkms status -k "$(uname -r)"|sed -rn 's#(.*), (.*), (.*), (.*): installed#\1/\2/\3/\4#p')) + local modules_path=($(dkms status -k "$(uname -r)"|sed -rn 's#(.*), (.*), (.*): installed#\1/\2/\3#p')) for p in "${modules_path[@]}"; do - for m in /var/lib/dkms/"$p"/module/*.ko{,gz}; do + for m in /var/lib/dkms/"$p"/module/*.ko{,.gz,.zst}; do m=${m##*/} m=${m%.gz} + m=${m%.zst} m=${m%.ko} DKMS_MODULES+=("$m") done diff --git a/fix-kernel-postinst_d.patch b/fix-kernel-postinst_d.patch new file mode 100644 index 0000000..32bf6a9 --- /dev/null +++ b/fix-kernel-postinst_d.patch @@ -0,0 +1,13 @@ +--- dkms-3.0.11/kernel_postinst.d_dkms.orig 2023-05-13 12:40:20.897356596 +0200 ++++ dkms-3.0.11/kernel_postinst.d_dkms 2023-05-13 12:40:33.365656164 +0200 +@@ -34,8 +34,8 @@ case "${uname_s}" in + ;; + esac + +-if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then +- exec /usr/lib/dkms/dkms_autoinstaller start "$inst_kern" ++if [ -x /usr/libexec/dkms/dkms_autoinstaller ]; then ++ exec /usr/libexec/dkms/dkms_autoinstaller start "$inst_kern" + fi + + if ! _check_kernel_dir "$inst_kern" ; then diff --git a/fix-weak-modules_dkms_in.patch b/fix-weak-modules_dkms_in.patch new file mode 100644 index 0000000..7afd095 --- /dev/null +++ b/fix-weak-modules_dkms_in.patch @@ -0,0 +1,13 @@ +--- dkms-3.0.11/dkms.in.orig 2023-05-13 12:42:02.523798339 +0200 ++++ dkms-3.0.11/dkms.in 2023-05-13 12:42:31.580496476 +0200 +@@ -2564,7 +2564,9 @@ fi + + # Since initramfs/initrd rebuild is not requested, skip it with Redhat's weak-modules + if [[ $weak_modules ]]; then +- weak_modules_no_initrd="--no-initramfs" ++ # Not required for SUSE/openSUSE ++ #weak_modules_no_initrd="--no-initramfs" ++ weak_modules_no_initrd="" + fi + + # Default to -j