[lunar:linux][lunar:linux-unstable][PATCH v2 0/3] UBUNTU: [Packaging] Support skipped dkms modules

Dimitri John Ledkov dimitri.ledkov at canonical.com
Mon Feb 27 14:49:50 UTC 2023


In recent releases we have fixed up most dkms modules to correctly
detect, and skip building dkms modules when compiling against
incompatible kernels. For example, trying to build a WiFi driver
against a kernel without 80221 config enabled, results in dkms
returning error code 9 skipped build, due to incompatibility. Our DKMS
autopkgtests already honor such cases, and mark test results as
passing for skipped {kernel, dkms-module} combinations.

Improve kernel's dkms-build script to distinguish failed versus
skipped builds, by propagating exact status code. For standalone
skipped dkms modules, skip generating an empty deb packages.

Also do not fail over missing make.log for the skipped dkms builds,
which do not have one.

This change will enable us to use a static list of dkms-versions
across all kernels, without need to do anything special for cases were
a vendored dkms module is declared incompatible in dkms.conf for a
given kernel.

For example, v4l2loopback incompatible with cloud kernels that do not
enable CONFIG_VIDEO, or backports-iwlwifi incompatible with kvm
kernel.

This patch is tested against working, skipepd, and FTBFS dkms modules,
which correctly built the full kernel, skipped some dkms modules, or
failed the overall build.

Changes since v1:

 * Address a bug that resulted in missbuilt LRM (empty SHA256SUMS, and
   no-op BUILD CLEAN scripts)

 * Ensure that failures during LRM build, actually cause the LRM
   package to FTBFS instead of finish the build with a false success
   status and producing broken .debs

 * Retested with a deep introspection of the LRM builds

Previous review comments at:
https://lists.ubuntu.com/archives/kernel-team/2022-December/135532.html

Dimitri John Ledkov (3):
  UBUNTU: [Packaging] Support skipped dkms modules
  UBUNTU: [Packaging] Preserve the correct log file variable value
  UBUNTU: [Packaging] actually enforce set -e in dkms-build--nvidia-N

 debian/rules.d/2-binary-arch.mk     | 3 ++-
 debian/scripts/dkms-build           | 8 +++++---
 debian/scripts/dkms-build--nvidia-N | 4 ++--
 3 files changed, 9 insertions(+), 6 deletions(-)

-- 
2.34.1




More information about the kernel-team mailing list