From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/588#note_544031220 @prarit Does this work better? ``` diff --git a/redhat/Makefile.common b/redhat/Makefile.common index 64aaa40e5adaf..2fa7a5c8e13f8 100644 --- a/redhat/Makefile.common +++ b/redhat/Makefile.common @@ -48,7 +48,12 @@ else endif ifeq ($(VERSION_ON_UPSTREAM),1) # master is expected to track mainline. - MERGE_BASE:=$(shell $(GIT) merge-base $(HEAD) master) + MASTER:=$(shell $(GIT) rev-parse -q --verify master || \ + $(GIT) rev-parse -q --verify upstream/master) + ifeq ($(MASTER),) + $(error "Missing 'master' or 'upstream/master' branch") + endif + 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') ``` _______________________________________________ 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