From: Herton R. Krzesinski <herton@xxxxxxxxxx> redhat: use new genlog.sh script to detect changes for dist-release The current dist-release process has a flaw, where both its subtargets (dist-release-changed and dist-release-finish) depends on setup-source target to run (so genspec.sh is run twice). To avoid having to do the work twice and do and revert changes before dist-release-finish is called, we now detect changes by creating the changelog using genlog.sh first to detect if there are really changes, and do the marker check using an if condition instead of relying on git to see if there are changes. Signed-off-by: Herton R. Krzesinski <herton@xxxxxxxxxx> diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -575,15 +575,15 @@ dist-release-finish: setup-source @$(GIT) add $(REDHAT)/$(SPECCHANGELOG) @$(GIT) add $(REDHAT)/marker @$(GIT) commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(SPECCHANGELOG) $(SPECFILE).template -m "[redhat] $(RELEASETAG)" -dist-release-changed: setup-source - @cp $(SOURCES)/$(SPECCHANGELOG) $(REDHAT)/$(SPECCHANGELOG) - @echo $(MARKER) > $(REDHAT)/marker - @# if neither changelog nor marker was updated, skip bumping a release - @$(GIT) update-index -q --really-refresh - @if $(GIT) diff-index --quiet HEAD; then \ +dist-release-changed: + @CLOGF="$$(mktemp)"; \ + echo $$CLOGF; \ + trap 'rm -f "$$CLOGF"' SIGHUP SIGINT SIGTERM EXIT; \ + $(REDHAT)/genlog.sh "$$CLOGF"; \ + if [ "$(MARKER)" == "$$(cat $(REDHAT)/marker)" ] && \ + [ "$$(wc -l $$CLOGF | cut -d ' ' -f 1)" -le 3 ]; then \ echo "Nothing changed, skipping updates"; \ else \ - $(GIT) checkout -- $(REDHAT)/$(SPECCHANGELOG); \ $(REDHAT)/scripts/new_release.sh; \ $(MAKE) dist-release-finish; \ fi -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 _______________________________________________ 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, report it: https://pagure.io/fedora-infrastructure/new_issue