Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package dkms for openSUSE:Factory checked in 
at 2023-11-07 21:26:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dkms (Old)
 and      /work/SRC/openSUSE:Factory/.dkms.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dkms"

Tue Nov  7 21:26:09 2023 rev:8 rq:1123681 version:3.0.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/dkms/dkms.changes        2023-10-08 
12:21:04.572106600 +0200
+++ /work/SRC/openSUSE:Factory/.dkms.new.17445/dkms.changes     2023-11-07 
21:26:46.920449353 +0100
@@ -1,0 +2,11 @@
+Fri Oct 27 07:43:34 UTC 2023 - Alexandru Gabriel Bradatan 
<alex.bradata...@yahoo.it>
+
+- Update to 3.0.12
+  * Fix CC detection
+  * Makefile: fix extension of kernel-install plugin
+  * Fix grammatical error
+  * Remove embedded DESTDIR in make variables, honour them
+- Drop patch `fix-kernel-postinst_d.patch` (fixed by upstream)
+- Remove leftover dkms.default
+
+-------------------------------------------------------------------

Old:
----
  dkms-3.0.11.tar.gz
  dkms.default
  fix-kernel-postinst_d.patch

New:
----
  dkms-3.0.12.tar.gz

BETA DEBUG BEGIN:
  Old:  * Remove embedded DESTDIR in make variables, honour them
- Drop patch `fix-kernel-postinst_d.patch` (fixed by upstream)
- Remove leftover dkms.default
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dkms.spec ++++++
--- /var/tmp/diff_new_pack.jlGvuf/_old  2023-11-07 21:26:47.448468797 +0100
+++ /var/tmp/diff_new_pack.jlGvuf/_new  2023-11-07 21:26:47.448468797 +0100
@@ -17,19 +17,16 @@
 
 
 Name:           dkms
-Version:        3.0.11
+Version:        3.0.12
 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/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-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
+Patch1:         fix-weak-modules_dkms_in.patch
 BuildRequires:  make
 BuildRequires:  pkgconfig(systemd)
 Requires:       bash > 1.99
@@ -57,30 +54,28 @@
 
 %prep
 %setup -q
-%autopatch -p1 1 2
+%autopatch -p1 1
 
 %build
 
 %install
+# Note: the makefile changed and has the following gotchas:
+# 1. Defined variables should not contain buildroot, the given
+#    paths are concatenated with DESTDIR (which has buildroot) by
+#    the makefile
+# 2. BASHDIR, ETC and VAR are not settable
 %make_install \
-  SBIN=%{buildroot}%{_sbindir} \
-  VAR=%{buildroot}%{_localstatedir}/lib/%{name} \
-  MAN=%{buildroot}%{_mandir}/man8 \
-  ETC=%{buildroot}%{_sysconfdir}/%{name} \
-  BASHDIR=%{buildroot}%{_datadir}/bash-completion/completions \
-  LIBDIR=%{buildroot}%{_libexecdir}/%{name}
+  SBIN=%{_sbindir} \
+  MAN=%{_mandir}/man8 \
+  LIBDIR=%{_libexecdir}/%{name} \
+  KCONF=%{_sysconfdir}/kernel
 
 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
 install -p -m 644 -D dkms.service %{buildroot}%{_unitdir}/dkms.service
 
-install -m 644 -D %{SOURCE3} %{buildroot}%{_sysconfdir}/default/dkms
 ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcdkms
 
 sed -i \
@@ -132,7 +127,6 @@
 %{_sysconfdir}/kernel/install.d/40-%{name}.install
 %{_datadir}/bash-completion/completions/%{name}
 %{_unitdir}/dkms.service
-%config %{_sysconfdir}/default/dkms
 # these dirs are for plugins - owned by other packages
 %dir %{_sysconfdir}/kernel
 %dir %{_sysconfdir}/kernel/postinst.d

++++++ dkms-3.0.11.tar.gz -> dkms-3.0.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/.github/dependabot.yml 
new/dkms-3.0.12/.github/dependabot.yml
--- old/dkms-3.0.11/.github/dependabot.yml      1970-01-01 01:00:00.000000000 
+0100
+++ new/dkms-3.0.12/.github/dependabot.yml      2023-10-24 16:36:12.000000000 
+0200
@@ -0,0 +1,6 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/.github/workflows/tests.yml 
new/dkms-3.0.12/.github/workflows/tests.yml
--- old/dkms-3.0.11/.github/workflows/tests.yml 2023-04-27 17:06:25.000000000 
+0200
+++ new/dkms-3.0.12/.github/workflows/tests.yml 2023-10-24 16:36:12.000000000 
+0200
@@ -13,6 +13,8 @@
     strategy:
       matrix:
         distro:
+          - {name: "almalinux", tag: "9"}
+          - {name: "almalinux", tag: "8"}
           - {name: "alpine", tag: "3.17", variant: "-lts"}
           - {name: "alpine", tag: "3.17", variant: "-virt"}
           - {name: "alpine", tag: "3.16", variant: "-lts"}
@@ -22,21 +24,28 @@
           - {name: "archlinux", tag: "latest"}
           - {name: "archlinux", tag: "latest", variant: "-lts"}
           - {name: "archlinux", tag: "latest", variant: "-zen"}
+          - {name: "centos/centos", tag: "stream9", url: "quay.io/"}
+          - {name: "centos/centos", tag: "stream8", url: "quay.io/"}
           - {name: "centos", tag: "7"}
-          - {name: "almalinux", tag: "9"}
-          - {name: "almalinux", tag: "8"}
+          - {name: "debian", tag: "12"}
           - {name: "debian", tag: "11"}
           - {name: "debian", tag: "10"}
+          - {name: "gentoo/stage3", tag: "latest"}
           - {name: "ubuntu", tag: "22.04"}
           - {name: "ubuntu", tag: "20.04"}
           - {name: "ubuntu", tag: "18.04"}
     runs-on: ubuntu-20.04
     container:
-      image: docker://docker.io/library/${{ matrix.distro.name }}:${{ 
matrix.distro.tag }}
+      image: ${{ matrix.distro.url }}${{ matrix.distro.name }}:${{ 
matrix.distro.tag }}
 
     steps:
     - uses: actions/checkout@v3
 
+    - name: Install AlmaLinux dependencies
+      if: matrix.distro.name == 'almalinux'
+      run: |
+        yum install -y diffutils elfutils-libelf gcc kernel kernel-devel make 
openssl
+
     - name: Install Alpine dependencies
       if: matrix.distro.name == 'alpine'
       run: |
@@ -48,20 +57,22 @@
         pacman -Syu --noconfirm diffutils gcc make linux${{ 
matrix.distro.variant }}-headers openssl
 
     - name: Install CentOS dependencies
-      if: matrix.distro.name == 'centos'
-      run: |
-        yum install -y diffutils elfutils-libelf-devel gcc kernel kernel-devel 
make openssl
-
-    - name: Install AlmaLinux dependencies
-      if: matrix.distro.name == 'almalinux'
+      if: contains(matrix.distro.name, 'centos')
       run: |
-        yum install -y diffutils elfutils-libelf-devel gcc kernel kernel-devel 
make openssl
+        yum install -y diffutils elfutils-libelf gcc kernel kernel-devel make 
openssl
 
     - name: Install Debian dependencies
       if: matrix.distro.name == 'debian'
       run: |
         apt-get update -q
-        apt-get install -qy gcc make linux-headers-amd64 linux-image-amd64 
openssl
+        apt-get install -qy make linux-headers-amd64 linux-image-amd64 openssl
+
+    - name: Install Gentoo Linux dependencies
+      if: matrix.distro.name == 'gentoo/stage3'
+      run: |
+        echo -e "sys-kernel/gentoo-kernel-bin\nvirtual/dist-kernel" >> 
/etc/portage/package.accept_keywords/latest-kernel
+        emerge --sync
+        emerge --noreplace -j$(nproc) -l$(nproc) gentoo-kernel-bin
 
     - name: Install Ubuntu dependencies
       if: matrix.distro.name == 'ubuntu'
@@ -69,33 +80,37 @@
         apt-get update -q
         apt-get install -qy gcc make linux-headers-generic linux-image-generic 
openssl shim-signed
 
-    - name: Compute packaged kernel version
-      id: versions
+    - name: Install dkms
+      run: make install
+
+    - name: Run tests
       run: |
-        KERNEL_VER=''
-        if [ "${{ matrix.distro.name }}" = alpine ] ; then
-            KERNEL_VER="$(apk info --contents "linux${{ matrix.distro.variant 
}}-dev" | sed -n 's:^lib/modules/\([^/][^/]*\)/.*:\1:p' | head -n 1)"
-        elif [ "${{ matrix.distro.name }}" = archlinux ] ; then
-            KERNEL_VER="$(pacman -Qql "linux${{ matrix.distro.variant 
}}-headers" | sed -n 's:^/usr/lib/modules/\([^/]\+\)/.*:\1:p' | head -n 1)"
-        elif [ "${{ matrix.distro.name }}" = centos ] || [ "${{ 
matrix.distro.name }}" = almalinux ] ; then
-            KERNEL_VER="$(LANG=C rpm -qi kernel-devel | sed -n 's/^Source RPM 
*: kernel-\(.*\).src.rpm$/\1.x86_64/p' | tail -n 1)"
-        elif [ "${{ matrix.distro.name }}" = debian ] ; then
-            KERNEL_VER="$(LANG=C dpkg --status linux-headers-amd64 | sed -n 
's/^Depends: linux-headers-\(\S\+\)\( .*\)\?/\1/p' | head -n 1)"
-        elif [ "${{ matrix.distro.name }}" = ubuntu ] ; then
-            KERNEL_VER="$(LANG=C dpkg --status linux-headers-generic | sed -n 
's/^Depends: linux-headers-\(\S\+\)\( .*\)\?/\1/p' | head -n 1)"
+        for moddir in /usr/lib/modules/ /lib/modules/; do
+            if [ -e "$moddir" ]; then
+                kernels=$(find "$moddir" -maxdepth 1 -type d -exec basename {} 
\;)
+                break
+            fi
+        done
+
+        # There should be two entries - "modules" and the kernel we installed
+        if [ $(echo "${kernels}" | wc -l) -ne 2 ]; then
+            echo >&2 "Error: invalid number of kernels installed"
         fi
+
+        KERNEL_VER=$(echo "${kernels}" | tail -n1)
         if [ -z "${KERNEL_VER}" ] ; then
             echo >&2 "Error: no kernel package found"
             exit 1
         fi
-        echo "Found packaged kernel ${KERNEL_VER}"
-        echo "KERNEL_VER=${KERNEL_VER}" >> "$GITHUB_ENV"
 
-    - name: Install dkms
-      run: make install
+        echo "Found kernel ${KERNEL_VER}"
+        export KERNEL_VER
+
+        echo "Module search paths"
+        for depmod in /etc/depmod.d/ /usr/lib/depmod.d/ /lib/depmod.d/; do
+            [ -e "$depmod" ] && grep -r ^search "$depmod" || true
+        done
 
-    - name: Run tests
-      run: |
         if [ "${{ matrix.distro.name }}" = alpine ] && [ "${{ 
matrix.distro.variant }}" = "-lts" ]; then
             ./run_test.sh --no-signing-tool
         else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/Makefile new/dkms-3.0.12/Makefile
--- old/dkms-3.0.11/Makefile    2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/Makefile    2023-10-24 16:36:12.000000000 +0200
@@ -1,37 +1,30 @@
-RELEASE_DATE := "27 April 2023"
+RELEASE_DATE := "24 September 2023"
 RELEASE_MAJOR := 3
 RELEASE_MINOR := 0
-RELEASE_MICRO := 11
+RELEASE_MICRO := 12
 RELEASE_NAME := dkms
 RELEASE_VERSION := $(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_MICRO)
 RELEASE_STRING := $(RELEASE_NAME)-$(RELEASE_VERSION)
-DIST := unstable
 SHELL=bash
 
-SBIN = $(DESTDIR)/usr/sbin
-ETC = $(DESTDIR)/etc/dkms
-VAR = $(DESTDIR)/var/lib/dkms
-MAN = $(DESTDIR)/usr/share/man/man8
-INITD = $(DESTDIR)/etc/rc.d/init.d
-LIBDIR = $(DESTDIR)/usr/lib/dkms
-BASHDIR = $(DESTDIR)/usr/share/bash-completion/completions
-KCONF = $(DESTDIR)/etc/kernel
-SHAREDIR = $(DESTDIR)/usr/share
-DOCDIR = $(SHAREDIR)/doc/dkms
-SYSTEMD = $(DESTDIR)/usr/lib/systemd/system
+SBIN = /usr/sbin
+LIBDIR = /usr/lib/dkms
+KCONF = /etc/kernel
+SYSTEMD = /usr/lib/systemd/system
 
 #Define the top-level build directory
 BUILDDIR := $(shell pwd)
-TOPDIR := $(shell pwd)
 
-.PHONY = tarball
-
-all: clean tarball
+all: dkms dkms.8 dkms_autoinstaller dkms.service kernel_install.d_dkms 
kernel_postinst.d_dkms
 
 clean:
        -rm -rf dist/
        -rm -rf dkms
        -rm -rf dkms.8
+       -rm -rf dkms_autoinstaller
+       -rm -rf dkms.service
+       -rm -rf kernel_install.d_dkms
+       -rm -rf kernel_postinst.d_dkms
 
 dkms: dkms.in
        sed -e 's/#RELEASE_STRING#/$(RELEASE_STRING)/' $^ > $@
@@ -39,36 +32,60 @@
 dkms.8: dkms.8.in
        sed -e 's/#RELEASE_STRING#/$(RELEASE_STRING)/' -e 
's/#RELEASE_DATE#/$(RELEASE_DATE)/' $^ > $@
 
-install: dkms dkms.8
-       mkdir -p $(VAR)
-       install -D -m 0755 dkms_common.postinst $(LIBDIR)/common.postinst
-       install -D -m 0755 dkms $(SBIN)/dkms
-       install -D -m 0755 dkms_autoinstaller $(LIBDIR)/dkms_autoinstaller
-       install -D -m 0644 dkms_framework.conf $(ETC)/framework.conf
-       mkdir -p $(ETC)/framework.conf.d
-       install -D -m 0644 dkms.bash-completion $(BASHDIR)/dkms
-       install -D -m 0644 dkms.8 $(MAN)/dkms.8
-       install -D -m 0755 kernel_install.d_dkms $(KCONF)/install.d/dkms
-       install -D -m 0755 kernel_postinst.d_dkms $(KCONF)/postinst.d/dkms
-       install -D -m 0755 kernel_prerm.d_dkms $(KCONF)/prerm.d/dkms
-       gzip -n -9 $(MAN)/dkms.8
+dkms_autoinstaller: dkms_autoinstaller.in
+       sed -e 's,@SBINDIR@,$(SBIN),g' $^ > $@
+
+dkms.service: dkms.service.in
+       sed -e 's,@SBINDIR@,$(SBIN),g' $^ > $@
+
+kernel_install.d_dkms: kernel_install.d_dkms.in
+       sed -e 's,@KCONFDIR@,$(KCONF),g' $^ > $@
+
+kernel_postinst.d_dkms: kernel_postinst.d_dkms.in
+       sed -e 's,@LIBDIR@,$(LIBDIR),g' $^ > $@
+
+install: all
+       $(if $(strip $(VAR)),$(error Setting VAR is not supported))
+       install -d -m 0755 $(DESTDIR)/var/lib/dkms
+ifneq (,$(DESTDIR))
+       $(if $(filter $(DESTDIR)%,$(SBIN)),$(error Using a DESTDIR as prefix 
for SBIN is no longer supported))
+       $(if $(filter $(DESTDIR)%,$(LIBDIR)),$(error Using a DESTDIR as prefix 
for LIBDIR is no longer supported))
+       $(if $(filter $(DESTDIR)%,$(KCONF)),$(error Using a DESTDIR as prefix 
for KCONF is no longer supported))
+endif
+       install -D -m 0755 dkms $(DESTDIR)$(SBIN)/dkms
+       install -D -m 0755 dkms_common.postinst 
$(DESTDIR)$(LIBDIR)/common.postinst
+       install -D -m 0755 dkms_autoinstaller 
$(DESTDIR)$(LIBDIR)/dkms_autoinstaller
+       $(if $(strip $(ETC)),$(error Setting ETC is not supported))
+       install -D -m 0644 dkms_framework.conf 
$(DESTDIR)/etc/dkms/framework.conf
+       install -d -m 0755 $(DESTDIR)/etc/dkms/framework.conf.d
+       $(if $(strip $(BASHDIR)),$(error Setting BASHDIR is not supported))
+       install -D -m 0644 dkms.bash-completion 
$(DESTDIR)/usr/share/bash-completion/completions/dkms
+       install -D -m 0644 dkms.8 $(DESTDIR)/usr/share/man/man8/dkms.8
+       install -D -m 0755 kernel_install.d_dkms 
$(DESTDIR)$(KCONF)/install.d/40-dkms.install
+       install -D -m 0755 kernel_postinst.d_dkms 
$(DESTDIR)$(KCONF)/postinst.d/dkms
+       install -D -m 0755 kernel_prerm.d_dkms $(DESTDIR)$(KCONF)/prerm.d/dkms
 
 install-redhat: install
-       install -D -m 0755 dkms_find-provides $(LIBDIR)/find-provides
-       install -D -m 0755 lsb_release $(LIBDIR)/lsb_release
-       install -D -m 0644 dkms.service $(SYSTEMD)/dkms.service
+ifneq (,$(DESTDIR))
+       $(if $(filter $(DESTDIR)%,$(SYSTEMD)),$(error Using a DESTDIR as prefix 
for SYSTEMD is no longer supported))
+endif
+       install -D -m 0644 dkms.service $(DESTDIR)$(SYSTEMD)/dkms.service
 
 install-debian: install
-       install -D -m 0755 dkms_apport.py 
$(SHAREDIR)/apport/package-hooks/dkms_packages.py
-       install -D -m 0755 kernel_postinst.d_dkms 
$(KCONF)/header_postinst.d/dkms
+       $(if $(strip $(SHAREDIR)),$(error Setting SHAREDIR is not supported))
+       install -D -m 0755 dkms_apport.py 
$(DESTDIR)/usr/share/apport/package-hooks/dkms_packages.py
+       install -D -m 0755 kernel_postinst.d_dkms 
$(DESTDIR)$(KCONF)/header_postinst.d/dkms
 
 install-doc:
-       install -d -m 0644 COPYING $(DOCDIR)
-       install -d -m 0644 README.md $(DOCDIR)
+       $(if $(strip $(DOC)),$(error Setting DOCDIR is not supported))
+       install -d -m 0755 $(DESTDIR)/usr/share/doc/dkms
+       install -m 0644 COPYING README.md $(DESTDIR)/usr/share/doc/dkms
+
+.PHONY = tarball
 
 TARBALL=$(BUILDDIR)/dist/$(RELEASE_STRING).tar.gz
 tarball: $(TARBALL)
 
-$(TARBALL): dkms dkms.8
+$(TARBALL): all
        mkdir -p $(@D)
        git archive --prefix=$(RELEASE_STRING)/ --add-file=dkms 
--add-file=dkms.8 -o $@ HEAD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms.8.in new/dkms-3.0.12/dkms.8.in
--- old/dkms-3.0.11/dkms.8.in   2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/dkms.8.in   2023-10-24 16:36:12.000000000 +0200
@@ -595,17 +595,6 @@
 package, as the value of
 .B OBSOLETE_BY
 is meaningful only in the context of a single distribution/version.
-
-If you feel you must use it, please use as such in dkms.conf:
-
- ubuntu_804="Ubuntu
- 8.04"
- if [ \-x /usr/bin/lsb_release ]; then
-   if [ "$(/usr/bin/lsb_release \-sir)" == "${ubuntu_804}" ]; then
-     OBSOLETE_BY="2.6.25"
-   fi
- fi
-
 .TP
 .B PATCH[#]=
 Use the PATCH directive array to specify patches which should be applied to 
your source before a build occurs.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms.in new/dkms-3.0.12/dkms.in
--- old/dkms-3.0.11/dkms.in     2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/dkms.in     2023-10-24 16:36:12.000000000 +0200
@@ -287,6 +287,9 @@
                 fi
             fi
         fi
+        if [[ ! $arch ]]; then
+            die 12 $"Could not determine architecture."
+        fi
     fi
 
     # If only one arch is specified, make it so for all the kernels
@@ -324,10 +327,10 @@
 }
 
 # Grab distro information from os-release.
-# Falls back to LSB for compliant distros.
 distro_version()
 {
-    if [[ -r /etc/os-release ]]; then
+    [[ -r /etc/os-release ]] || die 4 $"System is missing /etc/os-release 
file."
+    (
         . /etc/os-release
         if [[ "$ID" = "ubuntu" ]]; then
             # ID_LIKE=debian in ubuntu
@@ -337,36 +340,7 @@
         else
             echo $ID
         fi
-        return
-    fi
-
-    local DISTRIB_ID
-
-    # Try the LSB-provided strings first
-    if [ -r /etc/lsb-release ]; then
-        . /etc/lsb-release
-    elif type lsb_release >/dev/null 2>&1; then
-        DISTRIB_ID=$(lsb_release -i -s)
-    fi
-
-    case ${DISTRIB_ID} in
-        Fedora)
-            echo fedora
-            ;;
-        RedHatEnterprise*|CentOS|ScientificSL)
-            echo rhel
-            ;;
-        SUSE*)
-            echo sles
-            ;;
-        *)
-            if [[ ${DISTRIB_ID} ]]; then
-                echo "${DISTRIB_ID}"
-            else
-                echo unknown
-            fi
-            ;;
-    esac
+    )
 }
 
 override_dest_module_location()
@@ -923,7 +897,7 @@
     fi
 
     if ! grep -q "^CONFIG_MODULE_SIG_HASH=" "${kernel_config}"; then
-        echo "The kernel is be built without module signing facility, modules 
won't be signed"
+        echo "The kernel is built without module signing facility, modules 
won't be signed"
         return
     fi
 
@@ -1061,7 +1035,19 @@
             $"Check $build_dir for more information."
     done
 
+    if [ -f "$kernel_source_dir/.kernelvariables" ]; then
+        export CC=$(echo -e "show-%:\n\t@echo \$(\$*)\ninclude 
$kernel_source_dir/.kernelvariables" | make -f - show-CC)
+    else
+        unset CC
+    fi
+
     if [[ -e "${kernel_config}" ]]; then
+        local cc=$(sed -n 's|^CONFIG_CC_VERSION_TEXT="\([^ ]*\) .*"|\1|p' 
"${kernel_config}")
+        if command -v "$cc" >/dev/null; then
+            export CC="$cc"
+            export KERNEL_CC="$cc"
+        fi
+
         if grep -q 'CONFIG_CC_IS_CLANG=y' "${kernel_config}"; then
             local cc=clang
             if command -v "$cc" >/dev/null; then
@@ -1094,12 +1080,6 @@
     echo $""
     echo $"Building module:"
 
-    if [ -f "$kernel_source_dir/.kernelvariables" ]; then
-        export CC=$(echo -e "show-%:\n\t@echo \$(\$*)\ninclude 
$kernel_source_dir/.kernelvariables" | make -f - show-CC)
-    else
-        unset CC
-    fi
-
     invoke_command "$clean" "Cleaning build area" background
     echo $"DKMS make.log for $module-$module_version for kernel $kernelver 
($arch)" >> "$build_log"
     date >> "$build_log"
@@ -1751,7 +1731,7 @@
 # interested in, but that the DKMS internals do not usually care about.
 module_status_built_extra() (
     set_module_suffix "$3"
-    read_conf "$3" "$4" "$dkms_tree/$1/$2/source/dkms.conf" 2>/dev/null
+    read_conf_or_die "$3" "$4" "$dkms_tree/$1/$2/source/dkms.conf" 2>/dev/null
     [[ -d $dkms_tree/$1/original_module/$3/$4 ]] && echo -n " (original_module 
exists)"
     for ((count=0; count < ${#dest_module_name[@]}; count++)); do
         tree_mod=$(compressed_or_uncompressed "$dkms_tree/$1/$2/$3/$4/module" 
"${dest_module_name[$count]}")
@@ -2330,9 +2310,6 @@
 ####                     ####
 #############################
 
-# Set a standard path
-PATH="$PATH:/usr/lib/dkms"
-
 # Ensure files and directories we create are readable to anyone,
 # since we aim to build as a non-root user
 umask 022
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms.service new/dkms-3.0.12/dkms.service
--- old/dkms-3.0.11/dkms.service        2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/dkms.service        1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-[Unit]
-Description=Builds and install new kernel modules through DKMS
-Documentation=man:dkms(8)
-Before=network-pre.target graphical.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=true
-ExecStart=/usr/sbin/dkms autoinstall --verbose --kernelver %v
-
-[Install]
-WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms.service.in 
new/dkms-3.0.12/dkms.service.in
--- old/dkms-3.0.11/dkms.service.in     1970-01-01 01:00:00.000000000 +0100
+++ new/dkms-3.0.12/dkms.service.in     2023-10-24 16:36:12.000000000 +0200
@@ -0,0 +1,12 @@
+[Unit]
+Description=Builds and install new kernel modules through DKMS
+Documentation=man:dkms(8)
+Before=network-pre.target graphical.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=@SBINDIR@/dkms autoinstall --verbose --kernelver %v
+
+[Install]
+WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms_autoinstaller 
new/dkms-3.0.12/dkms_autoinstaller
--- old/dkms-3.0.11/dkms_autoinstaller  2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/dkms_autoinstaller  1970-01-01 01:00:00.000000000 +0100
@@ -1,87 +0,0 @@
-#!/bin/sh
-#
-# dkms_autoinstaller - A service to automatically install DKMS modules for new 
kernels.
-#
-# chkconfig: 345 04 04
-# description: Compiles and install kernel modules automatically for new \
-#              kernels at boot.
-
-### BEGIN INIT INFO
-# Provides: dkms_autoinstaller dkms
-# Default-Start: 3 4 5
-# Default-Stop: 0 1 2 6
-# Required-Start: $local_fs
-# Required-Stop: $local_fs
-# Short-Description: DKMS kernel modules installer service
-# Description: A service to automatically install DKMS modules for new kernels.
-### END INIT INFO
-
-
-if [ -f /lib/lsb/init-functions ]; then
-    . /lib/lsb/init-functions
-elif [ -f /etc/rc.d/init.d/functions ]; then
-    . /etc/rc.d/init.d/functions
-fi
-
-# We only have these functions on Debian/Ubuntu
-# so on other distros just stub them out
-if [ ! -f /etc/debian_version ]; then
-    alias log_daemon_msg='/bin/echo -n'
-    log_end_msg() { if [ "$1" = "0" ]; then echo " Done. "; else echo " 
Failed. "; fi; }
-    alias log_action_msg=/bin/echo
-fi
-
-exec="/usr/sbin/dkms"
-prog=${exec##*/}
-
-test -f $exec || exit 0
-
-[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
-
-uname_s=$(uname -s)
-
-_get_kernel_dir() {
-    KVER=$1
-    case ${uname_s} in
-       Linux)          DIR="/lib/modules/$KVER/build" ;;
-       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
-    esac
-    echo $DIR
-}
-
-_check_kernel_dir() {
-    DIR=$(_get_kernel_dir $1)
-    case ${uname_s} in
-       Linux)          test -e $DIR/include ;;
-       GNU/kFreeBSD)   test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
-       *)              return 1 ;;
-    esac
-    return $?
-}
-
-case "$1" in
-    start)
-               if [ -n "$2" ]; then
-                       kernel="$2"
-               else
-                       kernel=$(uname -r)
-               fi
-               if [ -f /etc/dkms/no-autoinstall ]; then
-                       log_action_msg "$prog: autoinstall for dkms modules has 
been disabled"
-               elif ! _check_kernel_dir $kernel; then
-                       log_action_msg "$prog: autoinstall for kernel $kernel 
was skipped since the kernel headers for this kernel do not seem to be 
installed"
-               else
-                       log_daemon_msg "$prog: running auto installation 
service for kernel $kernel"
-                       dkms autoinstall --kernelver $kernel
-                       log_end_msg $?
-               fi
-               ;;
-       stop|restart|force-reload|status|reload)
-               # There is no stop action, this and the 04 priority during stop 
is
-               # added to make RHEL chkconfig happy.
-               # Ignore others on debian/ubuntu too
-        ;;
-    *)
-        echo "Usage: $0 {start}"
-        exit 2
-esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms_autoinstaller.in 
new/dkms-3.0.12/dkms_autoinstaller.in
--- old/dkms-3.0.11/dkms_autoinstaller.in       1970-01-01 01:00:00.000000000 
+0100
+++ new/dkms-3.0.12/dkms_autoinstaller.in       2023-10-24 16:36:12.000000000 
+0200
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# dkms_autoinstaller - A service to automatically install DKMS modules for new 
kernels.
+#
+# chkconfig: 345 04 04
+# description: Compiles and install kernel modules automatically for new \
+#              kernels at boot.
+
+### BEGIN INIT INFO
+# Provides: dkms_autoinstaller dkms
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Required-Start: $local_fs
+# Required-Stop: $local_fs
+# Short-Description: DKMS kernel modules installer service
+# Description: A service to automatically install DKMS modules for new kernels.
+### END INIT INFO
+
+
+if [ -f /lib/lsb/init-functions ]; then
+    . /lib/lsb/init-functions
+elif [ -f /etc/rc.d/init.d/functions ]; then
+    . /etc/rc.d/init.d/functions
+fi
+
+# We only have these functions on Debian/Ubuntu
+# so on other distros just stub them out
+if [ ! -f /etc/debian_version ]; then
+    alias log_daemon_msg='/bin/echo -n'
+    log_end_msg() { if [ "$1" = "0" ]; then echo " Done. "; else echo " 
Failed. "; fi; }
+    alias log_action_msg=/bin/echo
+fi
+
+exec="@SBINDIR@/dkms"
+prog=${exec##*/}
+
+test -f $exec || exit 0
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+uname_s=$(uname -s)
+
+_get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+       Linux)          DIR="/lib/modules/$KVER/build" ;;
+       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo $DIR
+}
+
+_check_kernel_dir() {
+    DIR=$(_get_kernel_dir $1)
+    case ${uname_s} in
+       Linux)          test -e $DIR/include ;;
+       GNU/kFreeBSD)   test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
+       *)              return 1 ;;
+    esac
+    return $?
+}
+
+case "$1" in
+    start)
+               if [ -n "$2" ]; then
+                       kernel="$2"
+               else
+                       kernel=$(uname -r)
+               fi
+               if [ -f /etc/dkms/no-autoinstall ]; then
+                       log_action_msg "$prog: autoinstall for dkms modules has 
been disabled"
+               elif ! _check_kernel_dir $kernel; then
+                       log_action_msg "$prog: autoinstall for kernel $kernel 
was skipped since the kernel headers for this kernel do not seem to be 
installed"
+               else
+                       log_daemon_msg "$prog: running auto installation 
service for kernel $kernel"
+                       dkms autoinstall --kernelver $kernel
+                       log_end_msg $?
+               fi
+               ;;
+       stop|restart|force-reload|status|reload)
+               # There is no stop action, this and the 04 priority during stop 
is
+               # added to make RHEL chkconfig happy.
+               # Ignore others on debian/ubuntu too
+        ;;
+    *)
+        echo "Usage: $0 {start}"
+        exit 2
+esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms_common.postinst 
new/dkms-3.0.12/dkms_common.postinst
--- old/dkms-3.0.11/dkms_common.postinst        2023-04-27 17:06:25.000000000 
+0200
+++ new/dkms-3.0.12/dkms_common.postinst        2023-10-24 16:36:12.000000000 
+0200
@@ -201,16 +201,6 @@
     | sed -e 's/,/, /g; s/, $/\n/; s/, \([^,]\+\)$/ and \1/'
 
 if [ -n "$ARCH" ]; then
-    if which lsb_release >/dev/null && [ $(lsb_release -s -i) = "Ubuntu" ]; 
then
-        case $ARCH in
-            amd64)
-                ARCH="x86_64"
-                ;;
-            lpia|i?86)
-                ARCH="i686"
-                ;;
-        esac
-    fi
     echo "Building for architecture $ARCH"
     ARCH="-a $ARCH"
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/dkms_find-provides 
new/dkms-3.0.12/dkms_find-provides
--- old/dkms-3.0.11/dkms_find-provides  2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/dkms_find-provides  1970-01-01 01:00:00.000000000 +0100
@@ -1,93 +0,0 @@
-#!/bin/bash
-
-# heavily based upon find-suggests.ksyms by Andreas Gruenbacher 
<agr...@suse.de>.
-# with modifications by Michael Brown <michael_e_br...@dell.com>
-#
-# -- added module versioning info to modalias() symbols
-# -- removed code which inspects spec files.
-
-IFS=$'\n'
-
-print_modaliases() {
-    declare class=$1 variants=$2 pos=$3
-    if [ -n "$variants" ]; then
-       echo "${class:0:pos}[$variants]${class:pos+1}"
-    else
-       [ -z "$class" ] || echo "$class"
-    fi
-}
-
-combine_modaliases() {
-    declare tag class variants pos n
-    read class
-    while read tag; do
-       for ((n=0; n<${#class}; n++)); do
-           if [ "*" != "${class:n:1}" -a \
-                "${class:0:n}" = "${tag:0:n}" -a \
-                "${class:n+1}" = "${tag:n+1}" ] &&
-              ( [ -z "$pos" ] || [ $n = $pos ] ); then
-               variants="${variants:-${class:n:1}}${tag:n:1}"
-               pos=$n
-               break
-           fi
-       done
-       if [ $n -eq ${#class} ]; then
-           print_modaliases "$class" "$variants" "$pos"
-           variants=
-           pos=
-           class=$tag
-       fi
-    done
-    print_modaliases "$class" "$variants" "$pos"
-}
-
-get_modinfo() {
-    module=$1
-
-    # | head -n1 because some modules have *two* version tags. 
*cough*b44*cough*
-    modver=$(/sbin/modinfo -F version "$module"| head -n1)
-    modver=${modver// /_}
-
-    # only add version tag if it has a version
-    if [ -n "$modver" ]; then
-        /sbin/modinfo -F alias "$module" \
-        | sed -nre "s,(.+),modalias(\\1) = $modver,p"
-    else
-        /sbin/modinfo -F alias "$module" \
-        | sed -nre "s,(.+),modalias(\\1),p"
-    fi
-}
-
-
-tmp=${TMPDIR:-/tmp}
-TMPDIR=$(mktemp -d ${tmp}/dkms-findprovides-$$-$RANDOM-XXXXXX)
-trap "rm -rf $TMPDIR >/dev/null 2>&1"  QUIT EXIT HUP INT TERM
-
-modlist=
-for cand in $(grep -E '(/lib/modules/.+\.ko$|tgz$|tbz$|tar\.(gz|bz2|xz)$)') 
$*; do
-    if echo $cand | grep -q -E '/lib/modules/.+\.ko$' > /dev/null 2>&1; then
-        modlist="$modlist $cand"
-    fi
-
-    [ -f $cand ] || continue
-
-    opts=x
-    if gzip -t $cand >/dev/null 2>&1; then
-        opts=${opts}z
-    elif bzip2 -t $cand >/dev/null 2>&1; then
-        opts=${opts}j
-    elif xz -t $cand >/dev/null 2>&1; then
-       opts=${opts}J
-    fi
-    tar ${opts}f $cand -C $TMPDIR > /dev/null 2>&1
-done
-
-for module in $(find $TMPDIR -name \*.ko) $modlist; do
-    if echo $module | grep -q -E '.ko$' >/dev/null 2>&1; then
-        # it is a straight module
-        get_modinfo $module
-        continue
-    fi
-done \
-| sort -u \
-| combine_modaliases
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/kernel_install.d_dkms 
new/dkms-3.0.12/kernel_install.d_dkms
--- old/dkms-3.0.11/kernel_install.d_dkms       2023-04-27 17:06:25.000000000 
+0200
+++ new/dkms-3.0.12/kernel_install.d_dkms       1970-01-01 01:00:00.000000000 
+0100
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "add" ]; then
-       /etc/kernel/postinst.d/dkms "$2"
-fi
-
-if [ "$1" = "remove" ]; then
-       /etc/kernel/prerm.d/dkms "$2"
-fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/kernel_install.d_dkms.in 
new/dkms-3.0.12/kernel_install.d_dkms.in
--- old/dkms-3.0.11/kernel_install.d_dkms.in    1970-01-01 01:00:00.000000000 
+0100
+++ new/dkms-3.0.12/kernel_install.d_dkms.in    2023-10-24 16:36:12.000000000 
+0200
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = "add" ]; then
+       @KCONFDIR@/postinst.d/dkms "$2"
+fi
+
+if [ "$1" = "remove" ]; then
+       @KCONFDIR@/prerm.d/dkms "$2"
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/kernel_postinst.d_dkms 
new/dkms-3.0.12/kernel_postinst.d_dkms
--- old/dkms-3.0.11/kernel_postinst.d_dkms      2023-04-27 17:06:25.000000000 
+0200
+++ new/dkms-3.0.12/kernel_postinst.d_dkms      1970-01-01 01:00:00.000000000 
+0100
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-# We're passed the version of the kernel being installed
-inst_kern=$1
-
-uname_s=$(uname -s)
-
-_get_kernel_dir() {
-    KVER=$1
-    case ${uname_s} in
-       Linux)          DIR="/lib/modules/$KVER/build" ;;
-       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
-    esac
-    echo "$DIR"
-}
-
-_check_kernel_dir() {
-    DIR=$(_get_kernel_dir "$1")
-    case ${uname_s} in
-       Linux)          test -e "$DIR/include" ;;
-       GNU/kFreeBSD)   test -e "$DIR/kern" && test -e "$DIR/conf/kmod.mk" ;;
-       *)              false ;;
-    esac
-}
-
-case "${uname_s}" in
-    Linux)
-        header_pkg="linux-headers-$inst_kern"
-        kernel="Linux"
-    ;;
-    GNU/kFreeBSD)
-        header_pkg="kfreebsd-headers-$inst_kern"
-        kernel="kFreeBSD"
-    ;;
-esac
-
-if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then
-    exec /usr/lib/dkms/dkms_autoinstaller start "$inst_kern"
-fi
-
-if ! _check_kernel_dir "$inst_kern" ; then
-    echo "dkms: WARNING: $kernel headers are missing, which may explain the 
above failures." >&2
-    echo "      please install the $header_pkg package to fix this." >&2
-fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/kernel_postinst.d_dkms.in 
new/dkms-3.0.12/kernel_postinst.d_dkms.in
--- old/dkms-3.0.11/kernel_postinst.d_dkms.in   1970-01-01 01:00:00.000000000 
+0100
+++ new/dkms-3.0.12/kernel_postinst.d_dkms.in   2023-10-24 16:36:12.000000000 
+0200
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# We're passed the version of the kernel being installed
+inst_kern=$1
+
+uname_s=$(uname -s)
+
+_get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+       Linux)          DIR="/lib/modules/$KVER/build" ;;
+       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo "$DIR"
+}
+
+_check_kernel_dir() {
+    DIR=$(_get_kernel_dir "$1")
+    case ${uname_s} in
+       Linux)          test -e "$DIR/include" ;;
+       GNU/kFreeBSD)   test -e "$DIR/kern" && test -e "$DIR/conf/kmod.mk" ;;
+       *)              false ;;
+    esac
+}
+
+case "${uname_s}" in
+    Linux)
+        header_pkg="linux-headers-$inst_kern"
+        kernel="Linux"
+    ;;
+    GNU/kFreeBSD)
+        header_pkg="kfreebsd-headers-$inst_kern"
+        kernel="kFreeBSD"
+    ;;
+esac
+
+if [ -x @LIBDIR@/dkms_autoinstaller ]; then
+    exec @LIBDIR@/dkms_autoinstaller start "$inst_kern"
+fi
+
+if ! _check_kernel_dir "$inst_kern" ; then
+    echo "dkms: WARNING: $kernel headers are missing, which may explain the 
above failures." >&2
+    echo "      please install the $header_pkg package to fix this." >&2
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/kernel_prerm.d_dkms 
new/dkms-3.0.12/kernel_prerm.d_dkms
--- old/dkms-3.0.11/kernel_prerm.d_dkms 2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/kernel_prerm.d_dkms 2023-10-24 16:36:12.000000000 +0200
@@ -1,13 +1,22 @@
 #!/bin/sh
 
-# We're passed the version of the kernel being removed
+# This script is triggered when the kernel (linux-image) package is being
+# removed.  We're passed the version of the kernel being removed.
 inst_kern=$1
 
 if command -v dkms > /dev/null; then
        dkms status -k "$inst_kern" 2>/dev/null | while IFS=",:/ " read -r name 
vers _ arch status; do
                [ "$status" = "installed" ] || continue
                echo "dkms: removing: $name $vers ($inst_kern) ($arch)" >&2
-               dkms remove -m "$name" -v "$vers" -k "$inst_kern" -a "$arch"
+               # Compromise on using 'unbuild' to remove the module when a
+               # kernel is being removed.  The 'remove' command is too
+               # destructive.  The 'uninstall' command leaves built files
+               # around that have no other trigger to 'unbuild' them.
+               # (Triggering 'unbuild' on kernel header removal would not be
+               # a good idea because that would also cause the module to be
+               # uninstalled for the kernel, even though only the headers are
+               # being removed.)
+               dkms unbuild -m "$name" -v "$vers" -k "$inst_kern" -a "$arch"
        done
 fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/lsb_release new/dkms-3.0.12/lsb_release
--- old/dkms-3.0.11/lsb_release 2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/lsb_release 1970-01-01 01:00:00.000000000 +0100
@@ -1,415 +0,0 @@
-#!/bin/sh
-#
-# lsb_release - collect LSB conformance status about a system
-#
-# Copyright (C) 2000, 2002, 2004 Free Standards Group, Inc.
-# Originally by Dominique MASSONIE <md...@users.sourceforge.net>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# * Changes in 2.0
-# - Support LSB 2.0 module layout (Mats Wichmann)
-#   The LSB_VERSION is now a colon-separated field of supported module versions
-#   An /etc/lsb-release.d is searched for modules beyond the core.
-#   Only the filenames in this directory is looked at, those names are added
-#   to LSB_VERSION.  This allows module support to be handled easily by
-#   package install/removal without a need to edit lsb-release on the fly.
-# - Correct license: FSG == Free Standards Group, Inc.
-#
-# * Changes in 1.4
-# - "awk" not needed anymore (Loic Lefort)
-# - fixed bug #121879 reported by Chris D. Faulhaber,
-#   some shells doesn't support local variables
-# - fixed a bug when single parameter sets many args including -s
-# - function DisplayProgramVersion (undocumented) now exits script like Usage
-# - cosmetic changes in comments/outputs
-#
-# * Changes in 1.3
-# - No changes in script, only in build infrastructure
-#
-# * Changes in 1.2
-# - Fixed more bash'isms
-# - LSB_VERSION is no longer required in /etc/lsb-release file
-#
-# * Changes in 1.1
-# - removed some bash-ism and typos
-#   Notice: script remains broken with ash because of awk issues
-# - changed licence to FSG - "Free Software Group, Inc"
-# - fixed problem with --short single arg call
-# - changed Debian specifics, codename anticipates release num
-#
-# Description:
-# Collect information from sourceable /etc/lsb-release file (present on
-# LSB-compliant systems) : LSB_VERSION, DISTRIB_ID, DISTRIB_RELEASE,
-# DISTRIB_CODENAME, DISTRIB_DESCRIPTION (all optional)
-# Then (if needed) find and add names from /etc/lsb-release.d
-# Then (if needed) find and parse the /etc/[distro]-release file
-
-
-###############################################################################
-#     DECLARATIONS
-###############################################################################
-
-# This script version
-SCRIPTVERSION="2.0"
-
-# Defines the data files
-INFO_ROOT="/etc"                              # directory of config files
-INFO_LSB_FILE="lsb-release"                   # where to get LSB version
-INFO_LSB_DIR="lsb-release.d"                  # where to get LSB addon modules
-INFO_DISTRIB_SUFFIX="release"                 # <distrib>-<suffix>
-ALTERNATE_DISTRIB_FILE="/etc/debian_version"  # for Debian [based distrib]
-ALTERNATE_DISTRIB_NAME="Debian"               #     "
-CHECKFIRST="/etc/redhat-release"              # check it before file search
-
-# Defines our exit codes
-EXIT_STATUS="0"                           # default = Ok :)
-ERROR_UNKNOWN="10"                        # unknown error
-ERROR_USER="1"                            # program misuse
-ERROR_PROGRAM="2"                         # internal error
-ERROR_NOANSWER="3"                        # all required info not available
-                                          # typically non LSB compliant distro!
-
-# Defines our messages
-MSG_LSBVER="LSB Version:\t"
-MSG_DISTID="Distributor ID:\t"
-MSG_DISTDESC="Description:\t"
-MSG_DISTREL="Release:\t"
-MSG_DISTCODE="Codename:\t"
-MSG_NA="n/a"
-MSG_NONE="(none)"
-MSG_RESULT="" # contains the result in case short output selected
-
-# Description string delimiter
-DESCSTR_DELI="release"
-
-
-###############################################################################
-#     FUNCTIONS
-###############################################################################
-
-# Display Program Version for internal use (needed by help2man)
-DisplayProgramVersion() {
-    echo "FSG $(basename $0) v$SCRIPTVERSION"
-    echo
-    echo "Copyright (C) 2000, 2002, 2004 Free Standards Group, Inc."
-    echo "This is free software; see the source for copying conditions.  There\
- is NO"
-    echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR\
- PURPOSE."
-    echo
-    echo "Originally written by Dominique MASSONIE."
-
-    exit $EXIT_STATUS
-}
-
-# defines the Usage for lsb_release
-Usage() {
-    echo "FSG $(basename $0) v$SCRIPTVERSION prints certain LSB (Linux\
- Standard Base) and"
-    echo "Distribution information."
-    echo
-    echo "Usage: $(basename $0) [OPTION]..."
-    echo "With no OPTION specified defaults to -v."
-    echo
-    echo "Options:"
-    echo "  -v, --version"
-    echo "    Display the version of the LSB specification against which the 
distribution is compliant."
-    echo "  -i, --id"
-    echo "    Display the string id of the distributor."
-    echo "  -d, --description"
-    echo "    Display the single line text description of the distribution."
-    echo "  -r, --release"
-    echo "    Display the release number of the distribution."
-    echo "  -c, --codename"
-    echo "    Display the codename according to the distribution release."
-    echo "  -a, --all"
-    echo "    Display all of the above information."
-    echo "  -s, --short"
-    echo "    Use short output format for information requested by other 
options (or version if none)."
-    echo "  -h, --help"
-    echo "    Display this message."
-
-    exit $EXIT_STATUS
-}
-
-# Handles the enhanced args (i.e. --something)
-EnhancedGetopt() {
-    getopt -T >/dev/null 2>&1             # is getopt the enhanced one ?
-    if [ $? = 4 ]
-    then                                  # Yes, advanced args ALLOWED
-        OPT=$(getopt -o acdhirsvp                                             \
---long all,codename,description,help,id,release,short,version,program_version \
-              -n 'lsb_release'                                                \
-              -- "$@")
-    else                                  # No, advanced args NOT allowed
-        # convert (if needed) the enhanced options into basic ones
-        MYARGS=$(echo "$@" | sed -e "/--/s/-\(-[[:alnum:]]\)[[:alnum:]]*/\1/g")
-        OPT=$(getopt -o acdhirsvp                                             \
-                     -n 'lsb_release'                                         \
-                     -- "$MYARGS")
-    fi
-    if [ $? != 0 ]
-    then
-        exit $ERROR_PROGRAM
-    fi
-
-    NB_ARG=""       # enabled if many args set in one parameter (i.e. -dris)
-    eval set -- "$OPT"
-    while true ; do
-        case "$1" in
-        -a|--all) ARG_A="y"; NB_ARG="y"; shift;;
-        -c|--codename) ARG_C="y"; NB_ARG="y"; shift;;
-        -d|--description) ARG_D="y"; NB_ARG="y"; shift;;
-        -i|--id) ARG_I="y"; NB_ARG="y"; shift;;
-        -r|--release) ARG_R="y"; NB_ARG="y"; shift;;
-        -s|--short) ARG_S="y"; shift;;
-        -v|--version) ARG_V="y"; NB_ARG="y"; shift;;
-        -p|--program_version) DisplayProgramVersion;;
-       -h|--help) Usage;;
-        --) shift; break;;
-        *)  EXIT_STATUS=$ERROR_USER
-            Usage;;
-        esac
-    done
-}
-
-# Get/Init LSB infos (maybe Distrib infos too)
-GetLSBInfo() {
-       # if we found LSB_VERSION, continue to look in directory
-       if [ -d "$INFO_ROOT/$INFO_LSB_DIR" ]
-       then
-           for tag in "$INFO_ROOT/$INFO_LSB_DIR/"*
-           do
-               LSB_VERSION=$LSB_VERSION:$(basename $tag)
-           done
-       fi
-}
-
-# Get the whole distrib information string (from ARG $1 file)
-InitDistribInfo() {
-## Notice: Debian has a debian_version file
-##         (at least) Mandrake has two files, a mandrake and a redhat one
-    FILENAME=$1   # CHECKFIRST or finds' result in GetDistribInfo() or ""
-
-    if [ -z "$FILENAME" ]
-    then
-        if [ -f "$ALTERNATE_DISTRIB_FILE" ]
-        then # For Debian only
-            [ -z "$DISTRIB_ID" ] && DISTRIB_ID="$ALTERNATE_DISTRIB_NAME"
-            [ -z "$DISTRIB_RELEASE" ]                                         \
-                && DISTRIB_RELEASE=$(cat $ALTERNATE_DISTRIB_FILE)
-            [ -z "$DISTRIB_CODENAME" ] && [ "$DISTRIB_RELEASE" = "2.1" ]      \
-                && DISTRIB_CODENAME="Slink"
-            [ -z "$DISTRIB_CODENAME" ] && [ "$DISTRIB_RELEASE" = "2.2" ]      \
-                && DISTRIB_CODENAME="Potato"
-#           [ -z "$DISTRIB_CODENAME" ] && [ "$DISTRIB_RELEASE" = "2.3" ]      \
-#               && DISTRIB_CODENAME="Woody"
-            [ -z "$DISTRIB_CODENAME" ] && DISTRIB_CODENAME=$DISTRIB_RELEASE
-            # build the DISTRIB_DESCRIPTION string (never need to be parsed)
-            [ -z "$DISTRIB_DESCRIPTION" ]                                     \
-                && DISTRIB_DESCRIPTION="$DISTRIB_ID $DESCSTR_DELI $DISTRIB_REL\
-EASE ($DISTRIB_CODENAME)"
-        else # Only for nothing known compliant distrib :(
-            [ -z "$DISTRIB_ID" ] && DISTRIB_ID=$MSG_NA
-            [ -z "$DISTRIB_RELEASE" ] && DISTRIB_RELEASE=$MSG_NA
-            [ -z "$DISTRIB_CODENAME" ] && DISTRIB_CODENAME=$MSG_NA
-            [ -z "$DISTRIB_DESCRIPTION" ] && DISTRIB_DESCRIPTION=$MSG_NONE
-
-            EXIT_STATUS=$ERROR_NOANSWER
-        fi
-    else
-        NO=""                    # is Description string syntax correct ?
-        if [ -z "$DISTRIB_DESCRIPTION" ]                                      \
-            || [ -n "$(echo $DISTRIB_DESCRIPTION |                            \
-                       sed -e "s/.*$DESCSTR_DELI.*//")" ]
-        then
-            TMP_DISTRIB_DESC=$(head -n 1 $FILENAME 2>/dev/null)
-            [ -z "$DISTRIB_DESCRIPTION" ]                                     \
-                && DISTRIB_DESCRIPTION=$TMP_DISTRIB_DESC
-        else
-            TMP_DISTRIB_DESC=$DISTRIB_DESCRIPTION
-        fi
-
-        if [ -z "$TMP_DISTRIB_DESC" ]  # head or lsb-release init
-        then                           # file contains no data
-            DISTRIB_DESCRIPTION=$MSG_NONE
-            NO="y"
-        else                           # Do simple check
-            [ -n "$(echo $TMP_DISTRIB_DESC |                                  \
-                    sed -e "s/.*$DESCSTR_DELI.*//")" ]                        \
-                && NO="y"
-        fi
-
-        if [ -n "$NO" ]
-        then                           # does not contain "release" delimiter
-            [ -z "$DISTRIB_ID" ] && DISTRIB_ID=$MSG_NA
-            [ -z "$DISTRIB_RELEASE" ] && DISTRIB_RELEASE=$MSG_NA
-            [ -z "$DISTRIB_CODENAME" ] && DISTRIB_CODENAME=$MSG_NA
-        fi
-    fi
-}
-
-# Check missing and requested infos, then find the file and get infos
-GetDistribInfo() {
-    NO=""  # /etc/lsb-release data are enough to reply what is requested?
-    [ -n "$ARG_D" ] && [ -z "$DISTRIB_DESCRIPTION" ] && NO="y"
-    [ -z "$NO" ] && [ -n "$ARG_I" ] && [ -z "$DISTRIB_ID" ] && NO="y"
-    [ -z "$NO" ] && [ -n "$ARG_R" ] && [ -z "$DISTRIB_RELEASE" ] && NO="y"
-    [ -z "$NO" ] && [ -n "$ARG_C" ] && [ -z "$DISTRIB_CODENAME" ] && NO="y"
-
-    if [ -n "$NO" ]
-    then
-        if [ ! -f "$CHECKFIRST" ]
-        then
-            CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1                         \
-                   -name \*$INFO_DISTRIB_SUFFIX                               \
-                   -and ! -name $INFO_LSB_FILE                                \
-                   -and -type f                                               \
-                   2>/dev/null                                                \
-                   | head -n 1 ) # keep one of the files found (if many)
-        fi
-        InitDistribInfo $CHECKFIRST
-    fi
-}
-
-# Display version of LSB against which distribution is compliant
-DisplayVersion() {
-    if [ -z "$ARG_S" ]
-    then
-        echo -e "$MSG_LSBVER$LSB_VERSION"          # at least "n/a"
-    else
-        MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$LSB_VERSION"
-    fi
-}
-
-# Display string id of distributor ( i.e. a single word! )
-DisplayID() {
-    if [ -z "$DISTRIB_ID" ]
-    then
-## Linux could be part of the distro name (i.e. Turbolinux) or a separate word
-## set before, after...
-## also expect a delimiter ( i.e. "release" )
-        if [ -n "$(echo $TMP_DISTRIB_DESC | sed "s/.*$DESCSTR_DELI.*//")" ]
-        then
-            DISTRIB_ID=$MSG_NA
-        else
-            DISTRIB_ID=$(echo " $TMP_DISTRIB_DESC"                            \
-            | sed -e "s/[[:blank:]][Ll][Ii][Nn][Uu][Xx][[:blank:]]/ /g"       \
-            -e "s/\(.*\)[[:blank:]]$DESCSTR_DELI.*/\1/" -e "s/[[:blank:]]//g")
-        fi
-    fi
-    if [ -z "$ARG_S" ]
-    then
-        echo -e "$MSG_DISTID$DISTRIB_ID"
-    else
-        MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$DISTRIB_ID"
-    fi
-}
-
-# Diplay single line text description of distribution
-DisplayDescription() {
-    if [ -z "$DISTRIB_DESCRIPTION" ]
-    then
-        # should not be empty since GetDistribInfo called on Initialization !
-        EXIT_STATUS=$ERROR_PROGRAM
-    fi
-    if [ -z "$ARG_S" ]
-    then
-        echo -e "$MSG_DISTDESC$DISTRIB_DESCRIPTION"
-    else
-        MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }\"$DISTRIB_DESCRIPTION\""
-    fi
-}
-
-# Display release number of distribution.
-DisplayRelease() {
-    if [ -z "$DISTRIB_RELEASE" ]
-    then                       # parse the "$DISTRIB_DESCRIPTION" string
-        DISTRIB_RELEASE=$(echo "$TMP_DISTRIB_DESC" |                          \
-      sed -e "s/.*$DESCSTR_DELI[[:blank:]]*\([[:digit:]][[:graph:]]*\).*/\1/" )
-        [ "$DISTRIB_RELEASE" = "$TMP_DISTRIB_DESC" ]                          \
-            || [ -z "$DISTRIB_RELEASE" ]                                      \
-            && DISTRIB_RELEASE=$MSG_NA
-    fi
-    if [ -z "$ARG_S" ]
-    then
-        echo -e "$MSG_DISTREL$DISTRIB_RELEASE"
-    else
-        MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$DISTRIB_RELEASE"
-    fi
-}
-
-# Display codename according to distribution version.
-DisplayCodename() {
-    if [ -z "$DISTRIB_CODENAME" ]
-    then                       # parse the "$DISTRIB_DESCRIPTION" string
-        DISTRIB_CODENAME=$(echo "$TMP_DISTRIB_DESC" |                         \
-                           sed -e "s/.*$DESCSTR_DELI.*(\(.*\)).*/\1/")
-        [ "$DISTRIB_CODENAME" = "$TMP_DISTRIB_DESC" ]                         \
-            || [ -z "$DISTRIB_CODENAME" ]                                     \
-            && DISTRIB_CODENAME=$MSG_NA
-    fi
-    if [ -z "$ARG_S" ]
-    then
-        echo -e "$MSG_DISTCODE$(echo "$DISTRIB_CODENAME" |                    \
-                                tr -d "[:blank:]")" # Remove blanks
-    else
-        MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$(echo "$DISTRIB_CODENAME" |   \
-                                                 tr -d "[:blank:]")"
-    fi
-}
-
-
-###############################################################################
-#     MAIN
-###############################################################################
-
-# Check if any prog argument
-if [ -z "$1" ]
-then
-    ARG_V="y"           # default set to Display LSB Version (not Usage)
-else
-    EnhancedGetopt "$@" # Parse program args
-    if [ -n "$ARG_S" ] && [ -z "$NB_ARG" ]
-    then
-        ARG_V="y"       # set also default for --short when single arg
-    fi
-fi
-
-# Update args to All if requested
-if [ -n "$ARG_A" ]
-then
-    [ -z "$ARG_C" ] && ARG_C="y"
-    [ -z "$ARG_D" ] && ARG_D="y"
-    [ -z "$ARG_I" ] && ARG_I="y"
-    [ -z "$ARG_R" ] && ARG_R="y"
-    [ -z "$ARG_V" ] && ARG_V="y"
-fi
-
-# Initialization
-GetLSBInfo
-GetDistribInfo
-
-# Display requested infos (order as follow)
-[ -n "$ARG_V" ] && DisplayVersion
-[ -n "$ARG_I" ] && DisplayID
-[ -n "$ARG_D" ] && DisplayDescription
-[ -n "$ARG_R" ] && DisplayRelease
-[ -n "$ARG_C" ] && DisplayCodename
-
-[ -n "$ARG_S" ] && echo "$MSG_RESULT"
-
-exit $EXIT_STATUS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dkms-3.0.11/run_test.sh new/dkms-3.0.12/run_test.sh
--- old/dkms-3.0.11/run_test.sh 2023-04-27 17:06:25.000000000 +0200
+++ new/dkms-3.0.12/run_test.sh 2023-10-24 16:36:12.000000000 +0200
@@ -182,7 +182,7 @@
         sed -i '/^Certificate or key are missing, generating them using 
update-secureboot-policy...$/d' ${output_log}
         sed -i '/^Certificate or key are missing, generating self signed 
certificate for MOK...$/d' ${output_log}
     else
-        sed -i "/^The kernel is be built without module signing facility, 
modules won't be signed$/d" ${output_log}
+        sed -i "/^The kernel is built without module signing facility, modules 
won't be signed$/d" ${output_log}
         sed -i "/^Binary .* not found, modules won't be signed$/d" 
${output_log}
         # Uncomment the following line to run this script with 
--no-signing-tool on platforms where the sign-file tool exists
         # sed -i '/^Signing module 
\/var\/lib\/dkms\/dkms_test\/1.0\/build\/dkms_test.ko$/d' ${output_log}
@@ -242,13 +242,16 @@
     sles | suse | opensuse)
         expected_dest_loc=updates
         ;;
-    arch | debian | ubuntu)
+    arch | debian | ubuntu | linuxmint)
         expected_dest_loc=updates/dkms
         ;;
     alpine)
         expected_dest_loc=kernel/extra
         mod_compression_ext=.gz
         ;;
+    gentoo)
+        expected_dest_loc=kernel/extra
+        ;;
     *)
         echo >&2 "Error: unknown Linux distribution ID ${os_id}"
         exit 1
@@ -678,7 +681,7 @@
 run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}-noheaders" << EOF
 Error! Your kernel headers for kernel ${KERNEL_VER}-noheaders cannot be found 
at /lib/modules/${KERNEL_VER}-noheaders/build or 
/lib/modules/${KERNEL_VER}-noheaders/source.
 Please install the linux-headers-${KERNEL_VER}-noheaders package or use the 
--kernelsourcedir option to tell DKMS where it's located.
-dkms autoinstall on ${KERNEL_VER}-noheaders/x86_64 failed for dkms_test(1)
+dkms autoinstall on ${KERNEL_VER}-noheaders/${KERNEL_ARCH} failed for 
dkms_test(1)
 Error! One or more modules failed to install during autoinstall.
 Refer to previous errors for more information.
 EOF

++++++ fix-weak-modules_dkms_in.patch ++++++
--- /var/tmp/diff_new_pack.jlGvuf/_old  2023-11-07 21:26:47.556472774 +0100
+++ /var/tmp/diff_new_pack.jlGvuf/_new  2023-11-07 21:26:47.560472921 +0100
@@ -1,5 +1,5 @@
---- 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
+--- dkms-3.0.12/dkms.in.orig   2023-05-13 12:42:02.523798339 +0200
++++ dkms-3.0.12/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

Reply via email to