[OS-BUILD PATCHv6] redhat: indicate HEAD state in tarball/rpm name

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

 



From: Jarod Wilson <jarod@xxxxxxxxxx>

redhat: indicate HEAD state in tarball/rpm name

For the non-Fedora (RHEL) case, we are looking to move to a setup where we
include Merge Requests as soon as they are ready, and thus the head of
main may not always be a tagged build. This gives some indication to
someone basing a build on main that they're basing their work on the tree
at a state between tagged builds.

If HEAD is a tagged build, as usual, you should see:
  linux-5.18.0-0.rc3.30.test.tar.xz
  kernel-5.18.0-0.rc3.30.test.src.rpm

If HEAD has additional commits, with this change, you should see:
  linux-5.18.0-0.rc3.30.g0f62.test.tar.xz
  kernel-5.18.0-0.rc3.30.g0f62.test.src.rpm

The .gSHA field is the first four chars of the HEAD sha of the branch after
adding your local changes.

This is directly related to:
  https://gitlab.com/redhat/rhel/src/kernel/rhel-8/-/merge_requests/2405

Signed-off-by: Jarod Wilson <jarod@xxxxxxxxxx>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -217,6 +217,14 @@ ifeq ($(VERSION_ON_UPSTREAM),1)
   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)
+    endif
+  endif
 endif
 
 SPECVERSION:=$(SPECKVERSION).$(SPECKPATCHLEVEL).$(SPECKSUBLEVEL)

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1735
_______________________________________________
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