Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#73194 - [dkms] pacman hook should handle hyphens in module versions

Attached to Project: Arch Linux
Opened by StuMcp (StuMcp) - Wednesday, 29 December 2021, 23:07 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 11 February 2022, 19:31 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To S├ębastien Luttringer (seblu)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


DKMS modules with hyphens in the version string get improperly renamed when the hook is run (e.g. kernel upgrade).

The issue is caused by the hook not parsing the source directory name in the same manner that it was created (module name followed by hyphen then version string).

Attached patch makes the module name regex match non-greedy so it will only match on the first hyphen.

Additional info:
* package version(s) DMKS 3.0.3-1
* config and/or log files etc. Issue is in /usr/share/libalpm/scripts/dkms
* link to upstream bug report, if any N/A

Steps to reproduce:
Install a DKMS module with a hyphen in the version string, upgrade the kernel (or run the hook) then observe the new name of the DKMS module (which will be the module name and the version string up to the last hyphen).
This task depends upon

Comment by StuMcp (StuMcp) - Thursday, 30 December 2021, 12:01 GMT
Please consider this updated patch instead, it sources the module name and version from dkms.conf (so that hyphens in module names will not be an issue). Tested with a kernel upgrade from 5.15.11 to 5.15.12 and modules with hyphens in the version were correctly rebuilt without being renamed.