dkms module is built against host kernel, when asking to build against a chroot kernel

Bug #1970635 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rtl8812au (Ubuntu)
Fix Released
High
Unassigned
Jammy
New
Undecided
Unassigned
Lunar
New
Undecided
Unassigned
Mantic
New
Undecided
Unassigned
Noble
Fix Released
High
Unassigned

Bug Description

I was validating https://bugs.launchpad.net/ubuntu/+source/rtl8812au/+bug/1960169 in a focal chroot on an impish host.

despite only having v5.15 kernel in a chroot, the dkms module was attempted to be built against the host kernel, which failed.

dkms modules should respect the kernel version dkms is asking the module to built against.

Setting up rtl8812au-dkms (4.3.8.12175.20140902+dfsg-0ubuntu13~20.04.4) ...
Loading new rtl8812au-4.3.8.12175.20140902+dfsg DKMS files...
It is likely that 5.13.0-40-generic belongs to a chroot's host
Building for 5.15.0-25-generic
Building initial module for 5.15.0-25-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/rtl8812au-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.15.0-25-generic (x86_64)
Consult /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/make.log for more informati
on.
dpkg: error processing package rtl8812au-dkms (--configure):
 installed rtl8812au-dkms package post-installation script subprocess returned error exit s
tatus 10
dmesg: read kernel buffer failed: Operation not permitted
                                                         Errors were encountered while proc
essing:
 rtl8812au-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@normal-snake:~# cat /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/make.log
DKMS make.log for rtl8812au-4.3.8.12175.20140902+dfsg for kernel 5.15.0-25-generic (x86_64)
Wed Apr 27 15:22:31 UTC 2022
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.13.0-40-generic/build M=/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build modules
make[1]: *** /lib/modules/5.13.0-40-generic/build: No such file or directory. Stop.
make: *** [Makefile:1457: modules] Error 2

Note how make file is inconsistent with the dkms output.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in rtl8812au (Ubuntu):
status: New → Confirmed
Changed in rtl8812au (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rtl8812au - 4.3.8.12175.20140902+dfsg-0ubuntu21

---------------
rtl8812au (4.3.8.12175.20140902+dfsg-0ubuntu21) noble; urgency=medium

  * Fix dkms.conf to build against the requested kernel, rather than the
    host kernel. LP: #1970635

 -- Dimitri John Ledkov <email address hidden> Tue, 12 Dec 2023 13:56:39 +0000

Changed in rtl8812au (Ubuntu Noble):
status: Confirmed → 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.