]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
UBUNTU: [Packaging] Support skipped dkms modules
authorDimitri John Ledkov <dimitri.ledkov@canonical.com>
Mon, 27 Feb 2023 14:49:51 +0000 (14:49 +0000)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:46:05 +0000 (16:46 +0100)
commitdad99dc0f0383f7985ed76ed21151cc75403ca7c
treecd22ca33973d5ea274551ea767932c84f3145e01
parentf0017872a7111c299fcfb968d2d0d616842e67f8
UBUNTU: [Packaging] Support skipped dkms modules

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.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
debian/rules.d/2-binary-arch.mk
debian/scripts/dkms-build