DKMS: Fix RHEL kernel version checks on 9.99 / 5.17#380
Merged
Conversation
Since at least kernel 5.16 these changes are also present in the Fedora 35 & 36 kernels. However the 5.16 series did not have RHEL_RELEASE_CODE and other RHEL_ veriables defined for whatever reason and the LINUX_VERSION_AT_LEAST/LINUX_VERSION_LOWER_THAN conditional helpers handled them as "stock" kernels. This made DKMS compilation still work. The 5.17 kernels however do have RHEL_RELEASE_CODE defined again, thus the build failed. Now the version checks are updated to AT_LEAST / LOWER_THAN (a, b, c, 9, 99). This has only been tested with Fedora 35 5.16 and 5.17 kernels. I assume that the RHEL and CENTOS distros have the same set of backports/patches when marked as 9.99+. x.99 seems to be the version code of the development tree before a stable RHEL x+1 drops, so I assume that 9.0-98 did not have these patches yet.
Contributor
Author
|
I've backported this to my COPR package for Jool and tested it on another server (also F35 Linux 5.17) and it works there as well. (Had to specify the kernel because it's currently booted with the 5.16 kernel to have a working Jool) |
Member
|
Sorry this took so long. Everything looks OK; none of the supported kernels was negatively affected. Thank you for your work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
See #379, I encountered a bunch of kernel module build failures on Fedora 35 with 5.17 kernels.
They are all in places where there was a placeholder 9999 specified for the
RHEL_MAJORin the kernel version check.Changes
Since at least kernel 5.16 the underlying kernel patches (e.g. the renaming of
nf_resettonf_reset_ctetc.) are also present in the Fedora 35 & 36 kernels.However the 5.16 series did not have
RHEL_RELEASE_CODEand other RHEL_ veriables defined for whatever reasonand the
LINUX_VERSION_AT_LEAST/LINUX_VERSION_LOWER_THANconditional helpers handled them as "stock" kernels.This made DKMS compilation still work.
The 5.17 kernels however do have
RHEL_RELEASE_CODEdefined again, thus the build fails becauseRHEL_MAJORis 9, far from 9999.Now the version checks are updated to AT_LEAST / LOWER_THAN (a, b, c, 9, 99).
This has only been tested with Fedora 35 5.16 and 5.17 kernels. I assume that the RHEL and CENTOS distros
have the same set of backports/patches when marked as 9.99+.
x.99 seems to be the version code of the development tree before a stable RHEL x+1 drops,
so I assume that 9.0-98 did not have these patches yet.
But I find the Red Hat kernel versioning system really confusing, if someone knows more and I'm wrong please let me know.
Fixes #379