From: Prarit Bhargava <prarit(a)redhat.com>
redhat/koji/Makefile: Decouple koji Makefile from Makefile.common
The koji Makefile uses the GIT and PACKAGE_NAME variables which are
currently defined in Makefile.common. Since these are configurable by a
user they should actually be defined in Makefile.variables.
Move GIT and PACKAGE_NAME to Makefile.variables, and decouple
Makefile.common from the koji Makefile.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index blahblah..blahblah 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -1,8 +1,7 @@
-GIT ?= git
+include Makefile.variables
TOPDIR:=$(shell $(GIT) rev-parse --show-toplevel)
REDHAT:=$(TOPDIR)/redhat
include $(TOPDIR)/Makefile.rhelver
-include $(REDHAT)/Makefile.variables
RPMBUILD := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
else echo rpm; fi)
@@ -100,7 +99,6 @@ KVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)
RPMVERSION:=$(KVERSION)
BUILD:=$(RHEL_RELEASE)
-PACKAGE_NAME:=kernel
SPECFILE:=$(PACKAGE_NAME).spec
RPM:=$(REDHAT)/rpm
SRPMS:=$(RPM)/SRPMS
diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables
index blahblah..blahblah 100644
--- a/redhat/Makefile.variables
+++ b/redhat/Makefile.variables
@@ -51,3 +51,12 @@ INCLUDE_RHEL_FILES:=1
# value of PATCHLIST_URL in this case should point to the git repository where
# the commits are located, and will be added as a prefix to the shas listed.
PATCHLIST_URL ?= "https://gitlab.com/cki-project/kernel-ark/-/commit"
+
+# This can be used to change the filename of the specfile. For example, it can
+# be set to "kernel" for kernel.spec or "kernel-rt" for
kernel-rt.spec. This
+# is useful for other projects with different specfile names.
+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
diff --git a/redhat/koji/Makefile b/redhat/koji/Makefile
index blahblah..blahblah 100644
--- a/redhat/koji/Makefile
+++ b/redhat/koji/Makefile
@@ -17,7 +17,7 @@
# set it with - git notes --ref buildid -m ".buildid" HEAD
######################################################################
-include ../Makefile.common
+include ../Makefile.variables
notes:
$(GIT) fetch --force origin refs/notes/*:refs/notes/*
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1641