From: Prarit Bhargava <prarit(a)redhat.com>
redhat/Makefile: Move HEAD to Makefile.variables.
Move HEAD to Makefile.variables.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -9,7 +9,6 @@ RPMBUILD := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo
rpmbuild; \
else echo rpm; fi)
MACH := $(shell uname -m)
-HEAD ?= HEAD
RPMKVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^VERSION\ =\
/{s///;p;q}')
RPMKPATCHLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^PATCHLEVEL\ =\
/{s///;p;q}')
RPMKSUBLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^SUBLEVEL\ =\
/{s///;p;q}')
diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables
index blahblah..blahblah 100644
--- a/redhat/Makefile.variables
+++ b/redhat/Makefile.variables
@@ -60,3 +60,8 @@ PACKAGE_NAME ?= kernel
# This is the executable for 'git' commands. It is used by the redhat/self-test
# tests to provide testing information on git hashes (see redhat/self-test/egit.sh)
GIT ?= git
+
+# This is the referenced HEAD commit for git commands and can be used to change
+# the "top of tree" commit ID. This is useful in cases where users want to
+# build against an older commit but do not want to check out the tree.
+HEAD ?= HEAD
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1641