Trim EXTRAVERSION in the Makefile on CI builds
The CI build currently adds the full git commit hash to the release of the RPM it builds. This breaks the kernel build as the EXTRAVERSION cannot exceed 64 characters. This sets the EXTRAVERSION to whatever the release was minus ".pr.<hash>". Signed-off-by: Jeremy Cline <jcline@redhat.com>
This commit is contained in:
parent
64591e70e6
commit
89c7d2ae30
@ -1235,7 +1235,9 @@ BuildKernel() {
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# make sure EXTRAVERSION says what we want it to say
|
# make sure EXTRAVERSION says what we want it to say
|
||||||
perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}${Flav}/" Makefile
|
# Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters
|
||||||
|
ShortRel=$(python3 -c "import re; print(re.sub(r'\.pr\.[0-9A-Fa-f]{32}', '', '%{release}'))")
|
||||||
|
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 pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme
|
||||||
%if !0%{?rcrev}
|
%if !0%{?rcrev}
|
||||||
|
Loading…
Reference in New Issue
Block a user