From: Justin M. Forbes <[email protected]>

Fix versioning on stable Fedora

MR 1735 indicate HEAD state in tarball/rpm name added a git tag to
builds when VERSION_ON_UPSTREAM=0.  While this will never impact Fedora
rawhide because the os-build tree here always has VERSION_ON_UPSTREAM=1,
it does impact stable Fedora branches where this is set to 0.  Until I
can think of a more clever way to handle this, let's just restrict it to
ifneq ("$(DISTRO)", "fedora").  Tested in the fedora-5.18 branch.

Signed-off-by: Justin M. Forbes <[email protected]>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -219,13 +219,15 @@ ifeq ($(VERSION_ON_UPSTREAM),1)
     UPSTREAM_TARBALL_NAME:=$(patsubst v%,%,$(_TAG))
   endif
 else
-  SNAPSHOT:=0
-  _EXACT_TAG:=$(shell $(GIT) describe --exact-match 2>/dev/null)
-  ifeq ($(_EXACT_TAG),)
-    _TAG:=$(shell $(GIT) describe 2>/dev/null)
-    ifneq ($(_TAG),)
-      _BUILDCOMMIT:=$(shell echo $(_TAG) | awk -F- '{ printf(".%s", $$(NF)) }' 
| cut -c 1-6)
-      BUILD:=$(BUILD)$(_BUILDCOMMIT)
+  ifneq ("$(DISTRO)", "fedora")
+    SNAPSHOT:=0
+    _EXACT_TAG:=$(shell $(GIT) describe --exact-match 2>/dev/null)
+    ifeq ($(_EXACT_TAG),)
+      _TAG:=$(shell $(GIT) describe 2>/dev/null)
+      ifneq ($(_TAG),)
+        _BUILDCOMMIT:=$(shell echo $(_TAG) | awk -F- '{ printf(".%s", $$(NF)) 
}' | cut -c 1-6)
+        BUILD:=$(BUILD)$(_BUILDCOMMIT)
+      endif
     endif
   endif
 endif

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1823
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to