[OS-BUILD PATCH] 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-4.18.0-374.el8.tar.xz
  kernel-4.18.0-374.el8.src.rpm

If HEAD has additional commits, with this change, you should see:
  linux-4.18.0-374.p1.g797fdad2a6e5.el8.tar.xz
  kernel-4.18.0-374.p1.g797fdad2a6e5.el8.src.rpm

The .pX field is "X patches since tag" and the .gSHA field is 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
@@ -189,6 +189,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),)
+      RHEL_EXTRAVERSION:=$(shell echo $(_TAG) | awk -F- '{ printf(".p%d.%s", $$(NF-1),$$(NF)) }')
+      BUILD:=$(BUILD)$(RHEL_EXTRAVERSION)
+    endif
+  endif
 endif
 
 KVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)

--
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