[RFC] dkms: Fix dkms-autopkgtest for packages without -dkms in the name

Thadeu Lima de Souza Cascardo cascardo at canonical.com
Tue Feb 2 13:52:58 UTC 2021


On Tue, Feb 02, 2021 at 10:40:42AM -0300, Marcelo Henrique Cerri wrote:
> Hey, folks!
> 
> This week we had an issue with bcmwl-kernel-source
> (6.30.223.271+bdcom-0ubuntu5) failing to build and to install in Focal
> with the 5.8 HWE kernel and autopkgtest failed to catch the problem.
> 
> Investigating this issue yesterday with Cascardo's help, we found that
> dkms-autopkgtest (which is shipped by dkms) skips any binary packages
> which their names don't end with "-dkms". Since "bcmwl-kernel-source"
> doesn't end with "-dkms", the DKMS test is never run for this package,
> even with autodep8 correctly detecting that the DKMS test should be
> run.
> 
> The solution we are proposing is to use basically the same mechanism
> in dkms-autopkgtest that autodep8 uses in
> "/usr/share/autodep8/support/dkms/detect" to detect the DKMS test is
> needed.
> 
> I patched the DKMS package and tested it against the problematic
> bcmwl-kernel-source version using Focal and the 5.8 kernel and it was
> able to correctly detect the issue during the autopkgtest test.
> 
> I'm adding bellow a debdiff to dkms in Hirsute, but the change is
> basically the same for Focal as well.
> 
> Please let me know your thoughts on this. Thank you.
> 
> https://paste.ubuntu.com/p/j68THG2rZw/
> 
> Or:
> 
> -->8--
> diff -Nru dkms-2.8.4/debian/control dkms-2.8.4/debian/control
> --- dkms-2.8.4/debian/control	2020-12-22 03:30:16.000000000 -0300
> +++ dkms-2.8.4/debian/control	2020-12-22 03:32:22.000000000 -0300
> @@ -24,6 +24,7 @@
>   make | build-essential,
>   coreutils (>= 7.4),
>   patch,
> + dctrl-tools,
>  Recommends: fakeroot,
>   sudo,
>   linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers,
> diff -Nru dkms-2.8.4/debian/scripts/dkms-autopkgtest dkms-2.8.4/debian/scripts/dkms-autopkgtest
> --- dkms-2.8.4/debian/scripts/dkms-autopkgtest	2020-12-22 03:30:16.000000000 -0300
> +++ dkms-2.8.4/debian/scripts/dkms-autopkgtest	2020-12-22 03:32:22.000000000 -0300
> @@ -107,7 +107,8 @@
>  # (This only works if the *-dkms package is not yet installed.)
>  touch /etc/dkms/no-autoinstall
> 
> -for pkg in $(awk '/^Package:/ { print $2 }' debian/control | grep "\-dkms$"); do
> +for pkg in $(grep-dctrl -FBuild-Depends,Build-Depends-Indep,Depends -e '(^| )dkms' \

As we are only querying binary packages, Build-Depends and Build-Depends-Indep
can be removed here.

Otherwise, this looks fine for me.

Cascardo.

> +			-o -FPackage -e '\-dkms' debian/control -sPackage -n); do
>      # package might be arch: restriction or udeb etc.
>      if ! apt-cache show $pkg >/dev/null 2>&1; then
>          echo "I: Skipping unavailable package $pkg"
> -->8--
> 
> --
> Regards,
> Marcelo
> 



> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team




More information about the kernel-team mailing list