# HEADER Current: dkms_3.0.10-8ubuntu1.dsc # HEADER Previous: dkms_3.0.10-8.dsc diff -Nru dkms-3.0.10/debian/changelog dkms-3.0.10/debian/changelog --- dkms-3.0.10/debian/changelog 2023-03-31 14:01:26.000000000 +0200 +++ dkms-3.0.10/debian/changelog 2023-05-02 16:41:37.000000000 +0200 @@ -1,3 +1,10 @@ +dkms (3.0.10-8ubuntu1) mantic; urgency=medium + + * Fix a regression that prevents a kernel installation if a BUILD_EXCLUSIVE + skips a DKMS build. LP: #2018226 + + -- Juerg Haefliger Tue, 02 May 2023 16:41:37 +0200 + dkms (3.0.10-8) unstable; urgency=medium * Disable tests broken by fix-builtin-archive-dkms-coinstallation.patch. diff -Nru dkms-3.0.10/debian/patches/0001-autoinstall-be-more-verbose-on-failure.patch dkms-3.0.10/debian/patches/0001-autoinstall-be-more-verbose-on-failure.patch --- dkms-3.0.10/debian/patches/0001-autoinstall-be-more-verbose-on-failure.patch 1970-01-01 01:00:00.000000000 +0100 +++ dkms-3.0.10/debian/patches/0001-autoinstall-be-more-verbose-on-failure.patch 2023-05-02 16:40:10.000000000 +0200 @@ -0,0 +1,37 @@ +From 49f6578628e28859d93a8869ed4119983da55111 Mon Sep 17 00:00:00 2001 +From: Andreas Beckmann +Date: Fri, 17 Mar 2023 10:24:42 +0100 +Subject: [PATCH 1/3] autoinstall: be more verbose on failure + +--- + dkms.in | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dkms.in b/dkms.in +index 0fcf6129e6e3..0818ea92dd08 100644 +--- a/dkms.in ++++ b/dkms.in +@@ -2265,7 +2265,7 @@ autoinstall() { + installed_modules[${#installed_modules[@]}]="$m" + install_count=$(($install_count +1)) + else +- failed_modules=[${#failed_modules[@]}]="$m" ++ failed_modules[${#failed_modules[@]}]="$m($?)" + fi + else + next_install[${#next_install[@]}]="$mv" +@@ -2283,6 +2283,11 @@ autoinstall() { + [[ "$install_count" -gt 0 ]] || break; + + done ++ ++ if [[ "${#failed_modules[@]}" > 0 ]]; then ++ echo "dkms autoinstall on $kernelver/$arch failed for ${failed_modules[@]}" ++ fi ++ + for mv in "${to_install[@]}"; do + IFS=/ read m v <<< "$mv" + echo "$m/$v autoinstall failed due to missing dependencies: ${build_depends[$m]}" +-- +2.37.2 + diff -Nru dkms-3.0.10/debian/patches/0002-autoinstall-be-more-verbose-on-success.patch dkms-3.0.10/debian/patches/0002-autoinstall-be-more-verbose-on-success.patch --- dkms-3.0.10/debian/patches/0002-autoinstall-be-more-verbose-on-success.patch 1970-01-01 01:00:00.000000000 +0100 +++ dkms-3.0.10/debian/patches/0002-autoinstall-be-more-verbose-on-success.patch 2023-05-02 16:40:10.000000000 +0200 @@ -0,0 +1,27 @@ +From 5f456906243deda71695d92c6859e7ea390d2b17 Mon Sep 17 00:00:00 2001 +From: Andreas Beckmann +Date: Fri, 17 Mar 2023 10:45:56 +0100 +Subject: [PATCH 2/3] autoinstall: be more verbose on success + +--- + dkms.in | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dkms.in b/dkms.in +index 0818ea92dd08..fca0e1fe6a1b 100644 +--- a/dkms.in ++++ b/dkms.in +@@ -2284,6 +2284,10 @@ autoinstall() { + + done + ++ if [[ "${#installed_modules[@]}" > 0 ]]; then ++ echo "dkms autoinstall on $kernelver/$arch succeeded for ${installed_modules[@]}" ++ fi ++ + if [[ "${#failed_modules[@]}" > 0 ]]; then + echo "dkms autoinstall on $kernelver/$arch failed for ${failed_modules[@]}" + fi +-- +2.37.2 + diff -Nru dkms-3.0.10/debian/patches/0003-autoinstall-do-not-fail-on-modules-skipped-due-to-BU.patch dkms-3.0.10/debian/patches/0003-autoinstall-do-not-fail-on-modules-skipped-due-to-BU.patch --- dkms-3.0.10/debian/patches/0003-autoinstall-do-not-fail-on-modules-skipped-due-to-BU.patch 1970-01-01 01:00:00.000000000 +0100 +++ dkms-3.0.10/debian/patches/0003-autoinstall-do-not-fail-on-modules-skipped-due-to-BU.patch 2023-05-02 16:40:10.000000000 +0200 @@ -0,0 +1,69 @@ +From b2737224acc67dcff6c940160fc18b6cc65db581 Mon Sep 17 00:00:00 2001 +From: Andreas Beckmann +Date: Fri, 17 Mar 2023 11:00:33 +0100 +Subject: [PATCH 3/3] autoinstall: do not fail on modules skipped due to + BUILD_EXCLUSIVE_* + +Closes #302 +--- + dkms.8.in | 2 ++ + dkms.in | 13 +++++++++++-- + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/dkms.8.in b/dkms.8.in +index e4bfaad06b9d..d1d5e4bbae5f 100644 +--- a/dkms.8.in ++++ b/dkms.8.in +@@ -648,6 +648,8 @@ If the kernel being built for does not match against this regular expression (or + does not the satisfy the constraints of any other + .B BUILD_EXCLUSIVE_* + directive), the dkms build will error out with exit code 77. ++Note that dkms autoinstall will ignore this type of error condition and simply ++skip the respective modules. + For example, if you set it as ="^2\.4.*", your module would not be built for 2.6 + or later kernels. + .TP +diff --git a/dkms.in b/dkms.in +index fca0e1fe6a1b..5a6351afb9e8 100644 +--- a/dkms.in ++++ b/dkms.in +@@ -2192,6 +2192,7 @@ autoinstall() { + local -a to_install=() + local -a next_install=() + local -a installed_modules=() ++ local -a skipped_modules=() + local -a failed_modules=() + local -A build_depends=() + +@@ -2261,11 +2262,15 @@ autoinstall() { + for mv in "${to_install[@]}"; do + IFS=/ read m v <<< "$mv" + if [[ -z "${build_depends[$m]}" ]]; then +- if (module="$m" module_version="$v" kernelver="$kernelver" arch="$arch" install_module); then ++ (module="$m" module_version="$v" kernelver="$kernelver" arch="$arch" install_module) ++ status=$? ++ if [ "$status" = 0 ]; then + installed_modules[${#installed_modules[@]}]="$m" + install_count=$(($install_count +1)) ++ elif [ "$status" = 77 ]; then ++ skipped_modules[${#skipped_modules[@]}]="$m" + else +- failed_modules[${#failed_modules[@]}]="$m($?)" ++ failed_modules[${#failed_modules[@]}]="$m($status)" + fi + else + next_install[${#next_install[@]}]="$mv" +@@ -2288,6 +2293,10 @@ autoinstall() { + echo "dkms autoinstall on $kernelver/$arch succeeded for ${installed_modules[@]}" + fi + ++ if [[ "${#skipped_modules[@]}" > 0 ]]; then ++ echo "dkms autoinstall on $kernelver/$arch was skipped for ${skipped_modules[@]}" ++ fi ++ + if [[ "${#failed_modules[@]}" > 0 ]]; then + echo "dkms autoinstall on $kernelver/$arch failed for ${failed_modules[@]}" + fi +-- +2.37.2 + diff -Nru dkms-3.0.10/debian/patches/series dkms-3.0.10/debian/patches/series --- dkms-3.0.10/debian/patches/series 2023-03-31 14:01:26.000000000 +0200 +++ dkms-3.0.10/debian/patches/series 2023-05-02 16:40:44.000000000 +0200 @@ -12,3 +12,7 @@ spelling.patch reinstate-enroll.patch fix-builtin-archive-dkms-coinstallation.patch + +0001-autoinstall-be-more-verbose-on-failure.patch +0002-autoinstall-be-more-verbose-on-success.patch +0003-autoinstall-do-not-fail-on-modules-skipped-due-to-BU.patch