autoinstall fails despite BUILD_EXCLUSIVE

Bug #2018226 reported by Juerg Haefliger
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Fix Released
High
Juerg Haefliger
Lunar
Fix Released
High
Juerg Haefliger
Mantic
Fix Released
High
Juerg Haefliger

Bug Description

[Impact]

Kernel upgrades fail if DKMS packages are currently installed that include BUILD_EXCLUSIVE directives which skip the DKMS build. In this case, the dkms tool incorrectly returns a non-zero exit status.

$ sudo /etc/kernel/postinst.d/dkms 6.2.0-20-generic
 * dkms: running auto installation service for kernel 6.2.0-20-generic Deprecated feature: REMAKE_INITRD (/var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/etc/dkms/framework.conf)
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/source/dkms.conf)
Error! The /var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/6.2.0-20-generic/x86_64/dkms.conf for module oem-ethernet-r8169-aspm-support-bionic includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information. [fail]

[Test Plan]

Install such a DKMS (like [1]), and run:
$ sudo /etc/kernel/postinst.d/dkms $(uname -r)

This command should return with exit status '0'.

[1] http://oem.archive.canonical.com/updates/pool/public/o/oem-ethernet-r8169-aspm-support-bionic-dkms/

[Where problems could occur]

This fix changes how DKMS status/results are handled during autoinstall. So problems would only show up if DKMS modules are installed and are being processed (for example during a kernel upgrade or installation). Or if the dkms tool is invoked manually.

[Other info]

The bug was introduced in upstream dkms version 3.0.9 and fixed in 3.0.11.

Revision history for this message
Juerg Haefliger (juergh) wrote :

Should this really be treated as a failure?

Revision history for this message
Juerg Haefliger (juergh) wrote :

With Kinetic 3.0.6-2ubuntu2:

$ sudo dkms autoinstall --kernelver 6.2.0-20-generic
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/source/dkms.conf)
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/source/dkms.conf)
Error! The /var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/6.2.0-20-generic/x86_64/dkms.conf for module oem-ethernet-r8169-aspm-support-bionic includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
ubuntu@ubuntu-lunar:~$ echo $?
0

With Lunar 3.0.10-7:
$ sudo dkms autoinstall --kernelver 6.2.0-20-generic
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/etc/dkms/framework.conf)
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/source/dkms.conf)
Error! The /var/lib/dkms/oem-ethernet-r8169-aspm-support-bionic/4/6.2.0-20-generic/x86_64/dkms.conf for module oem-ethernet-r8169-aspm-support-bionic includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
ubuntu@ubuntu-lunar:~$ echo $?
11

Notice the different exit status.

Revision history for this message
Juerg Haefliger (juergh) wrote :
Revision history for this message
Juerg Haefliger (juergh) wrote :
Juerg Haefliger (juergh)
summary: - Deprecated features result in failures
+ autoinstall fails despite BUILD_EXCLUSIVE
Revision history for this message
Juerg Haefliger (juergh) wrote :
Changed in dkms (Ubuntu):
importance: Undecided → High
tags: added: patch
Revision history for this message
Juerg Haefliger (juergh) wrote :
Revision history for this message
Juerg Haefliger (juergh) wrote :
Juerg Haefliger (juergh)
description: updated
description: updated
description: updated
description: updated
Juerg Haefliger (juergh)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dkms (Ubuntu):
status: New → Confirmed
Changed in dkms (Ubuntu):
assignee: nobody → Juerg Haefliger (juergh)
Changed in dkms (Ubuntu Lunar):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Juerg Haefliger (juergh)
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Juerg, or anyone else affected,

Accepted dkms into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dkms/3.0.10-7ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in dkms (Ubuntu Lunar):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (dkms/3.0.10-7ubuntu1)

All autopkgtests for the newly accepted dkms (3.0.10-7ubuntu1) for lunar have finished running.
The following regressions have been reported in tests triggered by the package:

acpi-call/1.2.2-2.1 (armhf, ppc64el, s390x)
backport-iwlwifi-dkms/9904-0ubuntu5 (s390x)
dahdi-linux/1:2.11.1.0.20170917~dfsg-8.4ubuntu1 (s390x)
ddcci-driver-linux/0.4.2-4 (s390x)
librem-ec-acpi/0.9.1-4ubuntu1 (armhf, ppc64el, s390x)
openrazer/3.4.0+dfsg-1ubuntu1 (s390x)
rtl8812au/4.3.8.12175.20140902+dfsg-0ubuntu19 (s390x)
v4l2loopback/0.12.7-2ubuntu3 (s390x)
xilinx-runtime/2.8.743-0ubuntu9 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/lunar/update_excuses.html#dkms

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Juerg Haefliger (juergh) wrote :
Revision history for this message
Juerg Haefliger (juergh) wrote :

Err, skipped tests now return 77 instead of 9. The dkms-autopkgtest script needs to know that as well. See debdiff in the previous comment #11.

Revision history for this message
Alberto Milone (albertomilone) wrote :

Ok, 3.0.10-7ubuntu2 includes the fix now.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Juerg, or anyone else affected,

Accepted dkms into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dkms/3.0.10-7ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (dkms/3.0.10-7ubuntu1)

All autopkgtests for the newly accepted dkms (3.0.10-7ubuntu1) for lunar have finished running.
The following regressions have been reported in tests triggered by the package:

acpi-call/1.2.2-2.1 (armhf, ppc64el, s390x)
backport-iwlwifi-dkms/9904-0ubuntu5 (s390x)
dahdi-linux/1:2.11.1.0.20170917~dfsg-8.4ubuntu1 (s390x)
ddcci-driver-linux/0.4.2-4 (s390x)
librem-ec-acpi/0.9.1-4ubuntu1 (armhf, ppc64el, s390x)
openrazer/3.4.0+dfsg-1ubuntu1 (s390x)
rtl8812au/4.3.8.12175.20140902+dfsg-0ubuntu19 (s390x)
v4l2loopback/0.12.7-2ubuntu3 (s390x)
xilinx-runtime/2.8.743-0ubuntu9 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/lunar/update_excuses.html#dkms

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Juerg Haefliger (juergh) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.9 KiB)

This bug was fixed in the package dkms - 3.0.11-1ubuntu7

---------------
dkms (3.0.11-1ubuntu7) mantic; urgency=medium

  * Reset test messages correctly.

dkms (3.0.11-1ubuntu6) mantic; urgency=medium

  * Fix hardcoded arch in test result expectations.

dkms (3.0.11-1ubuntu5) mantic; urgency=medium

  * Attempt #5 to fix autopkgtest on all arches.

dkms (3.0.11-1ubuntu4) mantic; urgency=medium

  * Testsuite forces a fake mok key, on arches that do not have
    update-secureboot-policy. Thus it should be possible to run the tests
    on all arches without specifying no-signing-tool flag. Try this now,
    again.

dkms (3.0.11-1ubuntu3) mantic; urgency=medium

  * Support running tests on systems with module signing, but without
    update-secureboot-policy.
  * Limit dkms-test-dkms to prevent badpkg on i386 for dkms-autopkgtest

dkms (3.0.11-1ubuntu2) mantic; urgency=medium

  * Fix autopkgtest for ubuntu delta.

dkms (3.0.11-1ubuntu1) mantic; urgency=medium

  * Deliberate Ubuntu delta:
    - Even if there is no delta with Debian, do not force-sync this
    package. This package will be updated by the kernel team as part of
    landing new kernels. Neither upstream, nor Debian, use dkms to the
    same extend as Ubuntu Kernel Team build processes do, plus Ubuntu has
    more dkms packages than Debian. Testing in Debian is insufficient for
    successful upload to Ubuntu. Over the previous two cycles, there were
    multiple regressions introduced in upstream and Debian revisions that
    have significantly impacted Ubuntu development. Introducing more
    strict upload process for the DKMS package should hopefully mitigate
    this. Previous request from the Kernel to do this, was ignored close
    to Lunar release, which caused Lunar to be shipped with a regressed
    dkms.

  * Fixup autopkgtest:
    - Support systems with secure boot off
    - Support systems without update-secureboot-policy

dkms (3.0.11-1) experimental; urgency=medium

  * New upstream release.
    - Adds BUILD_EXCLUSIVE_{CONFIG,_KERNEL_{MIN,MAX}}. (Closes: #911665)
    - Fixes BUILD_EXCLUSIVE matches propagating as error. (Closes: #1031561)
  * Drop patches that were applied upstream.
  * Avoid unnecessary rpm comands on Debian based systems. (Closes: #741399)

dkms (3.0.10-9) experimental; urgency=medium

  * Add dkms-test-dkms package with trivial kernel module for dkms tests.
  * New autopkgtest: Install some-dkms after linux-headers.
  * New autopkgtest: Install linux-headers after some-dkms.
  * New autopkgtest: Install some-dkms after linux-image w/o linux-headers.
  * New autopkgtest: Install linux-image after some-dkms w/o linux-headers.
  * Upload to experimental.

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

dkms (3.0.10-8) unstable; urgency=medium

  * Disable tests broken by fix-builtin-archive-dkms-coinstallation.patch.
    (Closes: #1033396)
  * Run autopkgtest for all architectures using the headers from the
    linux-headers-generic (virtual) meta-package.
  * Generate dh_dkms.1 at build time.
  * Clean up /boot/*.old-dkms on upgr...

Read more...

Changed in dkms (Ubuntu Mantic):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms - 3.0.10-7ubuntu2

---------------
dkms (3.0.10-7ubuntu2) lunar; urgency=medium

  * Fix test failures due to new skipped test exit code 77. LP: #2018226

 -- Juerg Haefliger <email address hidden> Mon, 08 May 2023 15:04:36 +0200

Changed in dkms (Ubuntu Lunar):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.