DKMS: Fix RHEL kernel version checks on 9.99 / 5.17 #380
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_MAJOR
in the kernel version check.Changes
Since at least kernel 5.16 the underlying kernel patches (e.g. the renaming of
nf_reset
tonf_reset_ct
etc.) 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 reasonand 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 fails becauseRHEL_MAJOR
is 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