From: Prarit Bhargava <prarit(a)redhat.com>
redhat/Makefile: Fix dist-git
dist-git is failing to construct an SRPM on ark-latest with
error: Bad file:
/data/src/redhat/kernel-ark/redhat/rpm/SOURCES/kernel-kabi-dw-5.18.0-0.rc0.20220322git519129040766.4.tar.bz2:
No such file or directory
error: Bad file:
/data/src/redhat/kernel-ark/redhat/rpm/SOURCES/kernel-abi-stablelists-5.18.0-0.rc0.20220322git519129040766.4.tar.bz2:
No such file or directory
This occurs because dist-git increments the value of RPMKPATCHLEVEL by
one, which affects KVERSION.
Move the calclulation of KVERSION after the increment of RPMKPATCHLEVEL,
and fix the dist-git target.
Tested-by: Justin M. Forbes <jforbes(a)fedoraproject.org>
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -33,7 +33,6 @@ RPMKVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne
'/^VERSION\ =\ /{s//
RPMKPATCHLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^PATCHLEVEL\ =\
/{s///;p;q}')
RPMKSUBLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^SUBLEVEL\ =\
/{s///;p;q}')
RPMKEXTRAVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^EXTRAVERSION\ =\
/{s///;p;q}')
-KVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)
GITID:= $(shell $(GIT) log --max-count=1 --pretty=format:%H $(HEAD))
ifndef BUILD
BUILD:=$(RHEL_RELEASE)
@@ -182,6 +181,7 @@ ifeq ($(VERSION_ON_UPSTREAM),1)
endif
endif
+KVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)
DISTRO_BUILD:=$(PREBUILD)$(shell echo $(BUILD) | sed -e
's|\(^[0-9]\{1,4\}\)\..*|\1|')
KABI_TARBALL:=$(SOURCES)/kernel-abi-stablelists-$(KVERSION)-$(DISTRO_BUILD).tar.bz2
KABIDW := $(REDHAT)/kabi-dwarf
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1672