summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel.spec4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel.spec b/kernel.spec
index 375f026f5..7a91501b5 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1235,7 +1235,9 @@ BuildKernel() {
%endif
# 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 !0%{?rcrev}