From: Jeremy Cline <jcline@xxxxxxxxxx> ARK's master branch tracks Linus's master branch, so drop the check for a remote named "linus" (which might be wrong anyway) and use the local master branch to calculate the snapshot. While this does assume that the local master branch is up-to-date, that's better than trying to guess the correct remote name and can be easily scripted. Cc: Frantisek Hrbata <fhrbata@xxxxxxxxxx> Cc: Rado Vrbovsky <rvrbovsk@xxxxxxxxxx> Cc: Jeremy Cline <jcline@xxxxxxxxxx> Cc: Luis Claudio Goncalves <lgoncalv@xxxxxxxxxx> Cc: Denys Vlasenko <dvlasenk@xxxxxxxxxx> Cc: "Herton R. Krzesinski" <herton@xxxxxxxxxx> Cc: Juri Lelli <jlelli@xxxxxxxxxx> Cc: Jan Stancek <jstancek@xxxxxxxxxx> Cc: Clark Williams <williams@xxxxxxxxxx> Signed-off-by: Jeremy Cline <jcline@xxxxxxxxxx> --- redhat/Makefile.common | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/redhat/Makefile.common b/redhat/Makefile.common index a3b16c8a50f2..d980847aacc7 100644 --- a/redhat/Makefile.common +++ b/redhat/Makefile.common @@ -41,17 +41,11 @@ else VERSION_ON_UPSTREAM:=0 endif ifeq ($(VERSION_ON_UPSTREAM),1) - # In order to do a snapshot properly, we need to have a remote set up - # to track upstream. - _HAVE_UPSTREAM_REMOTE:=$(shell git remote | grep -wc linus) - ifeq ($(_HAVE_UPSTREAM_REMOTE),1) - MERGE_BASE:=$(shell git merge-base HEAD linus/master) - TAG:=$(shell git describe $(MERGE_BASE)) - # a snapshot off of a tagged git is of the form [tag]-[cnt]-g[hash] - SNAPSHOT:=$(shell echo $(TAG) | grep -c '\-g') - else - SNAPSHOT:=0 - endif + # master is expected to track mainline. + MERGE_BASE:=$(shell git merge-base HEAD master) + TAG:=$(shell git describe $(MERGE_BASE)) + # a snapshot off of a tagged git is of the form [tag]-[cnt]-g[hash] + SNAPSHOT:=$(shell echo $(TAG) | grep -c '\-g') else SNAPSHOT:=0 endif -- 2.26.2 _______________________________________________ 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