[OS-BUILD PATCH] Fix versioning on stable Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Justin M. Forbes <jforbes@xxxxxxxxxxxxxxxxx>

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 <jforbes@xxxxxxxxxxxxxxxxx>

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 -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux