From: "Justin M. Forbes" <jforbes@xxxxxxxxxxxxxxxxx> When building during the merge window, we need to bump PATCHLEVEL in the Makefile because Linus doesn't bump it until rc1. Something similar has been in the Fedora spec forever. Using 5.8 as an example, without this change we build a kernel rpm version kernel-5.8.0-0.rc0.20200608gitaf7b4801030c.1.fc33 but with a uname of kernel-5.7.0-0.rc0.20200608gitaf7b4801030c.1.fc33 which places the modules in the rpm versioned directory where the kernel does not know to look for them. With this change, both the rpm and the uname would be the kernel-5.8 version. While it might be cleaner to only run this replacement if we are in the merge window, this is much simpler than making changes across 2 additional Makefiles, and the end result should always be the same. Signed-off-by: Justin M. Forbes <jforbes@xxxxxxxxxxxxxxxxx> --- redhat/kernel.spec.template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index 9f63ea14ddd1..c9eb8f1fca2e 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -71,6 +71,9 @@ Summary: The Linux kernel %define rpmversion %%KVERSION%%.%%KPATCHLEVEL%%.%%KSUBLEVEL%% %define pkgrelease %%PKGRELEASE%% +# This is needed to do merge window version magic +%define patchlevel %%KPATCHLEVEL%% + # allow pkg_release to have configurable %%{?dist} tag %define specrelease %%SPECRELEASE%% @@ -1359,6 +1362,10 @@ BuildKernel() { ShortRel=$(perl -e "print \"%{release}\" =~ s/\.pr\.[0-9A-Fa-f]{32}//r") perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -${ShortRel}.%{_target_cpu}${Flav}/" Makefile + # if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme + # if we are post rc1 this should match anyway so this won't matter + perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{patchlevel}/' Makefile + # and now to start the build process %{make} %{?_smp_mflags} mrproper -- 2.27.0 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx