Header check ignore --kernelsourcedir

Bug #1838045 reported by Stefan Bader
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Stefan Bader

Bug Description

In Ubuntu 16.04/Xenial the dkms command (2.2.0.3-2ubuntu11.7) ignores the provided kernel source directory and then fails by not finding the headers.

This was fixed upstream in 2.2.0.3-5 and landed in 18.04/Bionic. Proposing to backport the additional line of code into Xenial.

+ [ ! -z "$ksourcedir_fromcli" ] && DIR=$kernel_source_dir

Testcase:
Trying to compile any DKMS module with kernel source (headers) in a non-standard location (/usr/src) will fail with an error reporting missing headers without the change, even using --kernelsourcedir. With the patch applied, this works.

Revision history for this message
Stefan Bader (smb) wrote :
Changed in dkms (Ubuntu Xenial):
assignee: nobody → Stefan Bader (smb)
importance: Undecided → Medium
status: New → In Progress
Changed in dkms (Ubuntu):
assignee: Stefan Bader (smb) → nobody
status: In Progress → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Stefan, or anyone else affected,

Accepted dkms into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dkms/2.2.0.3-2ubuntu11.8 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 and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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 Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Stefan Bader (smb)
description: updated
Revision history for this message
Stefan Bader (smb) wrote :

ii dkms 2.2.0.3-2ubuntu11.7

# dkms build -m xtables-addons -v 2.12 -k 4.15.0-56-generic --kernelsourcedir="/root/unpack/usr/src/linux-headers-4.15.0-56-generic"
Error! Your kernel headers for kernel 4.15.0-56-generic cannot be found.
Please install the linux-headers-4.15.0-56-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located

ii dkms 2.2.0.3-2ubuntu11.8

# dkms build -m xtables-addons -v 2.12 -k 4.15.0-56-generic --kernelsourcedir="/root/unpack/usr/src/linux-headers-4.15.0-56-generic"

Preparing kernel 4.15.0-56-generic for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
...
DKMS: build completed.

# dkms status
xtables-addons, 2.12, 4.15.0-56-generic, x86_64: built
xtables-addons, 2.12, 4.4.0-157-generic, x86_64: installed

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms - 2.2.0.3-2ubuntu11.8

---------------
dkms (2.2.0.3-2ubuntu11.8) xenial; urgency=medium

  * d/p/fix-kernelsource-check.patch: Take --kernelsourcedir into account
    when checking for headers (from 2.2.0.3-5 "Do not ignore
    --kernelsourcedir") (LP: #1838045).

 -- Stefan Bader <email address hidden> Fri, 26 Jul 2019 10:16:28 +0200

Changed in dkms (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for dkms has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.