Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_546859655 Only if you set up a mirror is that true. And only select projects are allowed to be mirrored. Public project and a Silver tier, I think are the minimum requirements. Which kernel-ark may have due to the cki- project being registered as an open-source group. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_546096447 I'm ok keeping the upstream remote for now (short term solution). We can think more and do further changes if we find a better way to handle it. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Justin Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_546051611 When you create a fork on gitlab, it should automatically keep it in sync with the project that you sync from, which means origin/master doesn't really go out of date any more than os-build would, and a git pull of origin/master should be the same as a pull on upstream/master if you configured kernel-ark as upstream. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_545998171 @hertonrk-rh - see my above answer to @jmflinuxtx. I have pondered on/off the last few months about how to eliminate the whole 'merge-base' selection as I don't like it and requires git history to run CI (which increases time and uses network bandwidth which isn't always free). I don't have a good answer yet as each attempted solution uncovers more ugly 'master' dependencies and more hacks. :-( And yes, using the 'marker' file was going to be my hard-coded 'merge-base' answer. So I am stuck with moving forward today. My main motivation is to update the docs in !772 but that requires handling the 'upstream' fallout. If I thought I could remove 'merge-base' in a reasonable way, I would go that way instead. But I am struggling to implement something that works. Again I am stuck: short term fix or long term fix. Thoughts? Help? ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_545205029 I think adding origin/master would help. But it always exists, so may be it's not the behavior you want here, to show an error/force the developer to setup an upstream remote or master branch. If I understood, the problem is a stale origin/master in a developer's fork could cause issues. The same problem though happens if someone forgets to fetch upstream remote too (or update the local master branch). The logic on the Makefiles is also hard to follow regarding the upstream merges, may be it would be easier if for each upstream merge done an variable could be passed on the command line that should point to the updated MARKER instead of using merge-base and a complex logic as is today, but that's not something for this MR, could be looked later. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Justin Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_545178822 @dzickusrh Our documentation has been wrong for a year. Cloning the project to your own namespace should grab all branches, so origin/master should still just work. origin/ should point to their sync of master. upstream/master should point to the kernel-ark/master branch directly. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_545176162 @jmflinuxtx @hertonrk-rh - here is the problem as described in issue #35 and #32 and Prarit's MR !588, users are 'forking' the kernel-ark into the personal space and cloning that. That is their 'origin'. The reason is, they do not have permission to push directly to 'origin' (unlike us). They then add an 'upstream' tree that points to cki- project/kernel-ark. Because 'master' requires that branch to be checked out and constantly sync'd, it was suggested it was easier to look at the 'upstream/master' branch instead. Of course this conflicts with how some of use origin/master for the same affect. But according to the documentation, https://cki- project.gitlab.io/kernel-ark/, we tell people to use 'upstream'. So my goal is to sync all this up: documentation, 'make dist-*' and development workflow so everything works as communicated. I can add 'origin/master' to the list of things to check to if that helps? Thoughts? ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_544919319 @dzickusrh in line with Justin said, why we care about upstream or "master" branch here, why not use origin/master since that exists already for kernel-ark checkout? There is another thing in line with the "downstream" or stable branches, there master doesn't exist. Couldn't we fallback to the content of redhat/marker for those may be? ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Justin Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_544834861 Yes, for the stable branches, we don't care about master. I use $UPSTREAM as a variable for the git --log, upstream is passed as an argument for genspec and defined in Makefile.common, though that should be broken out into an included file just for variables likely to change by branch. I might argue that most people don't care about upstream/master because if you are working off of this tree directly, or if you cloned it through gitlab to your own account, origin/master would be preferred. upstream/master was a relic from when we asked people to actually add a separate remote, which hasn't really been the case in a year. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995#note_544042283 @jmflinuxtx - this might conflict with a similar change you are making in the stable branches? ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv2] Use upstream/master for merge-base with fallback to master
From: Don Zickus Use upstream/master for merge-base with fallback to master In Makefile.common there is logic that determines what the merge-base is and is used to generate changelogs correctly. The logic assumes a 'master' branch exists and is up to date. However, the documentation recommends using 'upstream/master' to keep everything up to date. Let's sync the documentation and code and use upstream/master if it exists otherwise, use 'master' as the fallback. If neither exists error out. Update redhat/genspec.sh to handle a different master too. The 'error' out solves another problem when a master branch is not defined not is 'upstream' used as recommended. Signed-off-by: Don Zickus diff a/redhat/Makefile.common b/redhat/Makefile.common --- 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 upstream/master || \ + $(GIT) rev-parse -q --verify master) + ifeq ($(MASTER),) + $(error "Missing an 'upstream/master' or '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') diff a/redhat/genspec.sh b/redhat/genspec.sh --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -47,8 +47,12 @@ if [[ -z $lasttag ]]; then fi fi echo "Gathering new log entries since $lasttag" +# master is expected to track mainline. +MASTER="$(git rev-parse -q --verify upstream/master || \ + git rev-parse -q --verify master)" + git log --topo-order --reverse --no-merges -z --format="- %s (%an)%n%b" \ - ^master "$lasttag".. -- ':!/redhat/rhdocs' | ${0%/*}/genlog.py >> "$clogf" + ^${MASTER} "$lasttag".. -- ':!/redhat/rhdocs' | ${0%/*}/genlog.py >> "$clogf" grep -v "tagging $RPM_VERSION" "$clogf" > "$clogf.stripped" cp "$clogf.stripped" "$clogf" @@ -167,7 +171,7 @@ ARK_COMMIT_URL="https://gitlab.com/cki-project/kernel-ark/-/commit; # # May need to preserve word splitting in EXCLUDE_FILES # shellcheck disable=SC2086 -git log --no-merges --pretty=oneline --no-decorate master.. $EXCLUDE_FILES | \ +git log --no-merges --pretty=oneline --no-decorate ${MASTER}.. $EXCLUDE_FILES | \ sed "s!^\([^ ]*\)!$ARK_COMMIT_URL/\1\n &!; s!\$!\n!" \ > "$SOURCES"/Patchlist.changelog -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/995 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure