From: Prarit Bhargava <pra...@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 <jfor...@fedoraproject.org>
Signed-off-by: Prarit Bhargava <pra...@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
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to