[OS-BUILD PATCHv3 16/19] redhat/Makefile.variables: Add ADD_COMMITID_TO_VERSION

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

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/Makefile.variables: Add ADD_COMMITID_TO_VERSION

As noted in ARK commit 40aae9752b8b ("Fix versioning on stable Fedora"),
adding the commit ID to all versions must be optional.  Currently, the
centos-stream-9 repository does not have this feature and adding it would
cause a significant behavioral change in the dist-*-rpm and other targets.

Add ADD_COMMITID_TO_VERSION which makes adding the commit ID to the
version field optional.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -197,7 +197,7 @@ ifeq ($(VERSION_ON_UPSTREAM),1)
   endif
 else
   SNAPSHOT:=0
-  ifneq ("$(DISTRO)", "fedora")
+  ifneq ($(ADD_COMMITID_TO_VERSION),)
     _EXACT_TAG:=$(shell $(GIT) describe --exact-match 2>/dev/null)
     ifeq ($(_EXACT_TAG),)
       _TAG:=$(shell $(GIT) describe 2>/dev/null)
diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables
index blahblah..blahblah 100644
--- a/redhat/Makefile.variables
+++ b/redhat/Makefile.variables
@@ -137,3 +137,7 @@ KABI_CROSS_COMPILE_PREFIX ?= /usr/bin/
 
 # This variable is the suffix of the KABI cross compilers
 KABI_CROSS_COMPILE_SUFFIX ?= -linux-gnu-
+
+# This appends 5 characters of the top-of-tree commit ID to the BUILD variable,
+# which is then reflected in the package NVR.
+ADD_COMMITID_TO_VERSION ?=
diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-2585cf9dfaad.el7
+++ b/redhat/self-test/data/centos-2585cf9dfaad.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.6.test 
diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-2585cf9dfaad.fc25
+++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.6.test 
diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7 b/redhat/self-test/data/centos-78e36f3b0dae.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-78e36f3b0dae.el7
+++ b/redhat/self-test/data/centos-78e36f3b0dae.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.17.0-0.rc0.78e36f3b0dae.6.test 
diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25 b/redhat/self-test/data/centos-78e36f3b0dae.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-78e36f3b0dae.fc25
+++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.17.0-0.rc0.78e36f3b0dae.6.test 
diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7 b/redhat/self-test/data/centos-df0cc57e057f.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-df0cc57e057f.el7
+++ b/redhat/self-test/data/centos-df0cc57e057f.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-6.test 
diff --git a/redhat/self-test/data/centos-df0cc57e057f.fc25 b/redhat/self-test/data/centos-df0cc57e057f.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-df0cc57e057f.fc25
+++ b/redhat/self-test/data/centos-df0cc57e057f.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-6.test 
diff --git a/redhat/self-test/data/centos-fce15c45d3fb.el7 b/redhat/self-test/data/centos-fce15c45d3fb.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-fce15c45d3fb.el7
+++ b/redhat/self-test/data/centos-fce15c45d3fb.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.fce15c45d3fb.6.test 
diff --git a/redhat/self-test/data/centos-fce15c45d3fb.fc25 b/redhat/self-test/data/centos-fce15c45d3fb.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/centos-fce15c45d3fb.fc25
+++ b/redhat/self-test/data/centos-fce15c45d3fb.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.fce15c45d3fb.6.test 
diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.el7 b/redhat/self-test/data/fedora-2585cf9dfaad.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-2585cf9dfaad.el7
+++ b/redhat/self-test/data/fedora-2585cf9dfaad.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.6.test 
diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.fc25 b/redhat/self-test/data/fedora-2585cf9dfaad.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-2585cf9dfaad.fc25
+++ b/redhat/self-test/data/fedora-2585cf9dfaad.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.6.test 
diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.el7 b/redhat/self-test/data/fedora-78e36f3b0dae.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-78e36f3b0dae.el7
+++ b/redhat/self-test/data/fedora-78e36f3b0dae.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.17.0-0.rc0.78e36f3b0dae.6.test 
diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.fc25 b/redhat/self-test/data/fedora-78e36f3b0dae.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-78e36f3b0dae.fc25
+++ b/redhat/self-test/data/fedora-78e36f3b0dae.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.17.0-0.rc0.78e36f3b0dae.6.test 
diff --git a/redhat/self-test/data/fedora-df0cc57e057f.el7 b/redhat/self-test/data/fedora-df0cc57e057f.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-df0cc57e057f.el7
+++ b/redhat/self-test/data/fedora-df0cc57e057f.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-6.test 
diff --git a/redhat/self-test/data/fedora-df0cc57e057f.fc25 b/redhat/self-test/data/fedora-df0cc57e057f.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-df0cc57e057f.fc25
+++ b/redhat/self-test/data/fedora-df0cc57e057f.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-6.test 
diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.el7 b/redhat/self-test/data/fedora-fce15c45d3fb.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-fce15c45d3fb.el7
+++ b/redhat/self-test/data/fedora-fce15c45d3fb.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.fce15c45d3fb.6.test 
diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.fc25 b/redhat/self-test/data/fedora-fce15c45d3fb.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/fedora-fce15c45d3fb.fc25
+++ b/redhat/self-test/data/fedora-fce15c45d3fb.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.fce15c45d3fb.6.test 
diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.el7 b/redhat/self-test/data/rhel-2585cf9dfaad.el7
index blahblah..blahblah 100644
--- a/redhat/self-test/data/rhel-2585cf9dfaad.el7
+++ b/redhat/self-test/data/rhel-2585cf9dfaad.el7
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.6.test 
diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.fc25 b/redhat/self-test/data/rhel-2585cf9dfaad.fc25
index blahblah..blahblah 100644
--- a/redhat/self-test/data/rhel-2585cf9dfaad.fc25
+++ b/redhat/self-test/data/rhel-2585cf9dfaad.fc25
@@ -1,5 +1,6 @@
 .DEFAULT_GOAL=dist-cross-download 
 .SHELLSTATUS=0 
+ADD_COMMITID_TO_VERSION= 
 ARCHCONFIG=X86_64 
 ARCH_LIST=aarch64 ppc64le s390x x86_64 
 BASEVERSION=5.16.0-0.rc5.6.test 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2021
_______________________________________________
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, report it: https://pagure.io/fedora-infrastructure/new_issue




[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