Description of problem: When compiling out of tree kernel modules one can run into a situation where there is a version miss-match from any kernel and the related kernel-devel. Version-Release number of selected component (if applicable): long standing issue on fedora (so all version up to now). How reproducible: all version on fedora kernel (where a strict ABI is enforced based on exact uname -r). Steps to Reproduce: 1. Install systemtap-devel (akmods, dkms, or any OOT modules). 2. Install the needed kernel-devel 3. Fetch "only" an updated kernel using updates-testing or fedora-rawhide-kernel-nodebug Actual results: The kernel is missing the needed kernel-devel at the right version. Expected results: The kernel-devel should be installed along the kernel to satisfy the condition: "kernel-devel-uname-r == $(uname -r)" Where uname -r is the last kernel installed. Additional info: This was initially tough to have a yum/dnf plugin to handle this: https://bugzilla.rpmfusion.org/show_bug.cgi?id=3386 But with the rpm boolean dependencies I expect it should be possible to fix this issue in two steps: First step is to have dkms/akmods to install the appropriate kernel-devel variant based on kernel package name. Second step is to have the kernel package enable a boolean dependency to enforce the right version when a given kernel-devel variant is installed: Suggests: (kernel-devel-uname-r == %{KVERREL}%{?variant}%{?1:+%{1}} if kernel-devel-uname-r)
Created attachment 1278409 [details] Current WIP suggested patch This patch is yet un-tested, but should implement the suggested idea.
FYI, using boolean deps for installing the appropriate kernel-devel variant was initially suggested here: https://bugzilla.redhat.com/show_bug.cgi?id=1420754#c0 I'm currently working on this solution for akmods (untested yet). For arched packages (systemtap), it's probably possible to %ifarch as appropriate ---- Requires: kernel-devel-uname-r %if 0{?fedora: Suggests: (kernel-devel if kernel) Suggests: (kernel-debug-devel if kernel-debug) Suggests: (kernel-PAE-devel if kernel-PAE) Suggests: (kernel-PAEdebug-devel if kernel-PAEdebug) Suggests: (kernel-lpae-devel if kernel-lpae) Suggests: (kernel-rt-devel if kernel-rt) } ---- But I wonder if kernel-rt implements kernel-devel-uname-r
Updated patch in the kernel mailing list: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org/thread/6KCGSOP77VEGRC5UNC2FMRFEPEY2WSQ5/ This patch does not handle: - The installation of the appropriate variant. This can be handled elsewhere by using Requires: (kernel-devel if kernel) , etc. - The case where the installed kernel-devel-uname-r is already higher than the kernel package been installed. The reason is that I need to use >= instead of = for the dependency to avoid having the 3 kernel (last + 2 failbacks) to emit each one a dependency on a kernel-devel-uname when only the last one is installed. (the older ones are likely not available anymore from the repos).
*** Bug 1298126 has been marked as a duplicate of this bug. ***
FYI, I'm dropping this RFE, despite the current patch works fine in most common cases, it's way too much a problem in few corner cases (IIRC, like downgrading kernel, switching to kernel-rt or else...)
Indeed, this request doesn't seem relevant any more due to VirtualBox (see bug #1294173, now EOL) made its dependency to DKMS as optional.