Re: [OS-BUILD PATCHv3 0/5] Add libperf packages and build kernel tools for Fedora
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2907#note_1755476971 Sure I approved it. I think we want to resolve this thread as well. I'll leave that to any of you to resolve 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4] redhat: do not compress the full kernel changelog in the src.rpm
From: Herton R. Krzesinski redhat: do not compress the full kernel changelog in the src.rpm Bugzilla: INTERNAL Upstream Status: RHEL only By default redhat/scripts/expand_srpm.sh adds a .gitignore entry excluding any *.xz file in dist-git, since those are usually tarballs which can get very large. The problem is that kernel.changelog.xz file recently added gets excluded and can't be commited to dist-git due that. To avoid it, since src.rpm and git can compress contents and the updates are incremental, just use the uncompressed contents when adding it to the src.rpm, and only compress the file when providing it to the kernel-doc package. This fixes commit "redhat: ship all the changelog from source git into kernel-doc" recently merged into kernel-ark. Reported-by: Justin Forbes Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -700,7 +700,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check dracut-virt.conf \ $(SOURCES)/ @cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) \ - | xz > $(SOURCES)/kernel.changelog.xz + > $(SOURCES)/kernel.changelog @if [ "$(RELEASED_KERNEL)" -ne 0 ]; then \ cp keys/redhatsecureboot{301,501,ca5,ca1}.cer $(SOURCES)/; \ cp keys/secureboot_{ppc,s390}.cer $(SOURCES)/; \ diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -799,7 +799,7 @@ BuildRequires: tpm2-tools Source0: linux-%{tarfile_release}.tar.xz Source1: Makefile.rhelver -Source2: kernel.changelog.xz +Source2: kernel.changelog # Name of the packaged file containing signing key %ifarch ppc64le @@ -2918,7 +2918,8 @@ docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease} # copy the source over mkdir -p $docdir tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir -install -m644 %{SOURCE2} $docdir/ +cat %{SOURCE2} | xz > $docdir/kernel.changelog.xz +chmod 0644 $docdir/kernel.changelog.xz # with_doc %endif -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2841 -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3] redhat: do not compress the full kernel changelog in the src.rpm
From: Herton R. Krzesinski redhat: do not compress the full kernel changelog in the src.rpm Bugzilla: INTERNAL Upstream Status: RHEL only By default redhat/scripts/expand_srpm.sh adds a .gitignore entry excluding any *.xz file in dist-git, since those are usually tarballs which can get very large. The problem is that kernel.changelog.xz file recently added gets excluded and can't be commited to dist-git due that. To avoid it, since src.rpm and git can compress contents and the updates are incremental, just use the uncompressed contents when adding it to the src.rpm, and only compress the file when providing it to the kernel-doc package. This fixes commit "redhat: ship all the changelog from source git into kernel-doc" recently merged into kernel-ark. Reported-by: Justin Forbes Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -700,7 +700,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check dracut-virt.conf \ $(SOURCES)/ @cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) \ - | xz > $(SOURCES)/kernel.changelog.xz + > $(SOURCES)/kernel.changelog @if [ "$(RELEASED_KERNEL)" -ne 0 ]; then \ cp keys/redhatsecureboot{301,501,ca5,ca1}.cer $(SOURCES)/; \ cp keys/secureboot_{ppc,s390}.cer $(SOURCES)/; \ diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -799,7 +799,7 @@ BuildRequires: tpm2-tools Source0: linux-%{tarfile_release}.tar.xz Source1: Makefile.rhelver -Source2: kernel.changelog.xz +Source2: kernel.changelog # Name of the packaged file containing signing key %ifarch ppc64le @@ -2918,7 +2918,8 @@ docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease} # copy the source over mkdir -p $docdir tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir -install -m644 %{SOURCE2} $docdir/ +cat %{SOURCE2} | xz > $docdir/%{SOURCE2}.xz +chmod 0644 $docdir/%{SOURCE2}.xz # with_doc %endif -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2841 -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] redhat: fix dist-git/upload for the kernel.changelog.xz file
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2841#note_1704941100 Yes I can change it that way, let me try. -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2] redhat: fix dist-git/upload for the kernel.changelog.xz file
From: Herton R. Krzesinski redhat: fix dist-git/upload for the kernel.changelog.xz file Bugzilla: INTERNAL Upstream Status: RHEL only By default redhat/scripts/expand_srpm.sh adds a .gitignore entry excluding any *.xz file in dist-git, since those are usually tarballs which can get very large. The problem is that kernel.changelog.xz file recently added gets excluded and can't be commited to dist-git due that. However, since this changelog file can get large, lets treat it as it was a tarball as well and upload it instead of directly commiting to dist-git. This fixes commit "redhat: ship all the changelog from source git into kernel-doc" recently merged into kernel-ark. Reported-by: Justin Forbes Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -328,6 +328,8 @@ else RHPKG_BIN:=rhpkg endif +CLOGFILE:=$(SOURCES)/kernel.changelog.xz + TARFILE:=linux-$(SPECTARFILE_RELEASE).tar.xz TARBALL:=$(REDHAT)/$(TARFILE) @@ -700,7 +702,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check dracut-virt.conf \ $(SOURCES)/ @cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) \ - | xz > $(SOURCES)/kernel.changelog.xz + | xz > $(CLOGFILE) @if [ "$(RELEASED_KERNEL)" -ne 0 ]; then \ cp keys/redhatsecureboot{301,501,ca5,ca1}.cer $(SOURCES)/; \ cp keys/secureboot_{ppc,s390}.cer $(SOURCES)/; \ diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh index blahblah..blahblah 100755 --- a/redhat/scripts/rh-dist-git.sh +++ b/redhat/scripts/rh-dist-git.sh @@ -43,7 +43,7 @@ echo "Unpacking from SRPM" sed -i "/linux-.*.tar.xz/d" "$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore}; sed -i "/kernel-abi-stablelists.*.tar.xz/d" "$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore}; sed -i "/kernel-kabi-dw-.*.tar.xz/d" "$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore}; -upload_list="$TARBALL $KABI_TARBALL $KABIDW_TARBALL" +upload_list="$CLOGFILE $TARBALL $KABI_TARBALL $KABIDW_TARBALL" echo "Uploading new tarballs: $upload_list" # We depend on word splitting here: diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7 +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7 @@ -12,6 +12,7 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 +CLOGFILE=../redhat/rpm/SOURCES/kernel.changelog.xz CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .el7" diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25 @@ -12,6 +12,7 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 +CLOGFILE=../redhat/rpm/SOURCES/kernel.changelog.xz CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .fc25" diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7 b/redhat/self-test/data/centos-78e36f3b0dae.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-78e36f3b0dae.el7 +++ b/redhat/self-test/data/centos-78e36f3b0dae.el7 @@ -12,6 +12,7 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 +CLOGFILE=../redhat/rpm/SOURCES/kernel.changelog.xz CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu b
[OS-BUILD PATCH] redhat: fix dist-git/upload for the kernel.changelog.xz file
From: Herton R. Krzesinski redhat: fix dist-git/upload for the kernel.changelog.xz file Bugzilla: INTERNAL Upstream Status: RHEL only By default redhat/scripts/expand_srpm.sh adds a .gitignore entry excluding any *.xz file in dist-git, since those are usually tarballs which can get very large. The problem is that kernel.changelog.xz file recently added gets excluded and can't be commited to dist-git due that. However, since this changelog file can get large, lets treat it as it was a tarball as well and upload it instead of directly commiting to dist-git. This fixes commit "redhat: ship all the changelog from source git into kernel-doc" recently merged into kernel-ark. Reported-by: Justin Forbes Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -328,6 +328,8 @@ else RHPKG_BIN:=rhpkg endif +CLOGFILE:=$(SOURCES)/kernel.changelog.xz + TARFILE:=linux-$(SPECTARFILE_RELEASE).tar.xz TARBALL:=$(REDHAT)/$(TARFILE) @@ -700,7 +702,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check dracut-virt.conf \ $(SOURCES)/ @cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) \ - | xz > $(SOURCES)/kernel.changelog.xz + | xz > $(CLOGFILE) @if [ "$(RELEASED_KERNEL)" -ne 0 ]; then \ cp keys/redhatsecureboot{301,501,ca5,ca1}.cer $(SOURCES)/; \ cp keys/secureboot_{ppc,s390}.cer $(SOURCES)/; \ diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh index blahblah..blahblah 100755 --- a/redhat/scripts/rh-dist-git.sh +++ b/redhat/scripts/rh-dist-git.sh @@ -43,7 +43,7 @@ echo "Unpacking from SRPM" sed -i "/linux-.*.tar.xz/d" "$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore}; sed -i "/kernel-abi-stablelists.*.tar.xz/d" "$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore}; sed -i "/kernel-kabi-dw-.*.tar.xz/d" "$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore}; -upload_list="$TARBALL $KABI_TARBALL $KABIDW_TARBALL" +upload_list="$CLOGFILE $TARBALL $KABI_TARBALL $KABIDW_TARBALL" echo "Uploading new tarballs: $upload_list" # We depend on word splitting here: -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2841 -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv3 0/2] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2838#note_1704887686 Actually I have another fix instead of changing expand_srpm.sh, can you check https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2841 ? -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv3 0/2] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2838#note_1704863969 Ok I see, I'll fix expand_srpm.sh. -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv3 0/2] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2838#note_1704808386 If a large kernel.changelog file in dist-git is not a problem, I can compress it only when adding the file to kernel-doc package, is that ok? Otherwise we need to change the dist-git .gitignore file. -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 1/2] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski redhat: create an empty changelog file when changing its name Bugzilla: INTERNAL Upstream Status: RHEL only Up until now, if we rename the spec package name or bump the rhel major or minor versions, we used to copy the previous changelog file if it exists into the new one. However, this makes the changelog grow indefinitely since a stream start, and it starts to get very big. We do not need to keep the entire history at each new changelog file, because eg. in a stream life, we always keep the older changelog files in the git tree. Thus, instead of copying the old changelog, just create a new empty file. This also makes sure we trim the rpm changelog at each new minor release, since it's used as the source of the rpm package changelog content. And that's another intention with this change: to avoid having the rpm changelog contents to grow too big, as reported by Brian Masney. There was also a case where if we are starting a stream or changing the package name, and there is no old changelog file available, we copied a kernel.changelog* if it existed. But looks like this case we should also do the same and trim it to start fresh, the old changelog file can be kept if wanted in the tree for reference and we don't necessarily need to copy all entries from the old changelog. With this there is some simplification as well and we can remove the CHANGELOG_PREV_EXT variable. Reported-by: Brian Masney Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -72,7 +72,6 @@ SOURCES:=$(RPM)/SOURCES TESTPATCH:=$(REDHAT)/linux-kernel-test.patch CHANGELOG_EXT:=changelog-$(RHEL_MAJOR).$(RHEL_MINOR) SPECCHANGELOG:=$(SPECPACKAGE_NAME).$(CHANGELOG_EXT) -CHANGELOG_PREV_EXT:=changelog-$(RHEL_MAJOR).$(shell expr $(RHEL_MINOR) - 1) ARCH_LIST=aarch64 ppc64le s390x x86_64 # save some user selectable values to know later if we can override them @@ -644,13 +643,8 @@ _setup-source: dist-git-version-check fi @cp $(REDHAT)/$(SPECFILE).template $(SOURCES)/$(SPECFILE) @if [ ! -e $(REDHAT)/$(SPECCHANGELOG) ]; then \ - if [ -e $(SPECPACKAGE_NAME).$(CHANGELOG_PREV_EXT) ]; then \ - echo "Creating $(SPECCHANGELOG) as copy of $(CHANGELOG_PREV_EXT)"; \ - cp $(REDHAT)/$(SPECPACKAGE_NAME).$(CHANGELOG_PREV_EXT) $(REDHAT)/$(SPECCHANGELOG); \ - else \ - echo "Creating $(SPECCHANGELOG) as copy of $(REDHAT)/kernel.$(CHANGELOG_EXT)"; \ - cp $(REDHAT)/kernel.$(CHANGELOG_EXT) $(SPECCHANGELOG); \ - fi; \ + echo "Creating an empty $(SPECCHANGELOG) since it does not exist yet"; \ + touch $(REDHAT)/$(SPECCHANGELOG); \ fi @if [ -z "$(RHSELFTESTDATA)" ]; then \ cp $(REDHAT)/$(SPECCHANGELOG) $(SOURCES)/$(SPECCHANGELOG); \ diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7 +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7 @@ -12,7 +12,6 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 -CHANGELOG_PREV_EXT=changelog-9.98 CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .el7" diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25 @@ -12,7 +12,6 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 -CHANGELOG_PREV_EXT=changelog-9.98 CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .fc25" diff --git a/redhat/self-test/
[OS-BUILD PATCHv3 2/2] redhat: ship all the changelog from source git into kernel-doc
From: Herton R. Krzesinski redhat: ship all the changelog from source git into kernel-doc Bugzilla: INTERNAL Upstream Status: RHEL only In the previous change, the rpm changelog will be trimmed due size for each rpm binary on each minor release bump. However, someone may still want to see the full changelog since the start of a given stream, thus provide it in the src.rpm and through kernel-doc. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -699,6 +699,8 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check kernel-local \ dracut-virt.conf \ $(SOURCES)/ + @cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) \ + | xz > $(SOURCES)/kernel.changelog.xz @if [ "$(RELEASED_KERNEL)" -ne 0 ]; then \ cp keys/redhatsecureboot{301,501,ca5,ca1}.cer $(SOURCES)/; \ cp keys/secureboot_{ppc,s390}.cer $(SOURCES)/; \ diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -799,7 +799,7 @@ BuildRequires: tpm2-tools Source0: linux-%{tarfile_release}.tar.xz Source1: Makefile.rhelver - +Source2: kernel.changelog.xz # Name of the packaged file containing signing key %ifarch ppc64le @@ -2918,6 +2918,7 @@ docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease} # copy the source over mkdir -p $docdir tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir +install -m644 %{SOURCE2} $docdir/ # with_doc %endif @@ -3455,6 +3456,7 @@ fi\ %{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease}/Documentation/* %dir %{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease}/Documentation %dir %{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease} +%{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease}/kernel.changelog.xz %endif %if %{with_perf} -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2838 -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 0/2] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2838 Bugzilla: INTERNAL Upstream Status: RHEL only Up until now, if we rename the spec package name or bump the rhel major or minor versions, we used to copy the previous changelog file if it exists into the new one. However, this makes the changelog grow indefinitely since a stream start, and it starts to get very big. We do not need to keep the entire history at each new changelog file, because eg. in a stream life, we always keep the older changelog files in the git tree. Thus, instead of copying the old changelog, just create a new empty file. This also makes sure we trim the rpm changelog at each new minor release, since it's used as the source of the rpm package changelog content. And that's another intention with this change: to avoid having the rpm changelog contents to grow too big, as reported by Brian Masney. There was also a case where if we are starting a stream or changing the package name, and there is no old changelog file available, we copied a kernel.changelog* if it existed. But looks like this case we should also do the same and trim it to start fresh, the old changelog file can be kept if wanted in the tree for reference and we don't necessarily need to copy all entries from the old changelog. With this there is some simplification as well and we can remove the CHANGELOG_PREV_EXT variable. Reported-by: Brian Masney Signed-off-by: Herton R. Krzesinski --- redhat/self-test/data/centos-2585cf9dfaad.el7 | 1 - redhat/self-test/data/centos-2585cf9dfaad.fc25 | 1 - redhat/self-test/data/centos-78e36f3b0dae.el7 | 1 - redhat/self-test/data/centos-78e36f3b0dae.fc25 | 1 - redhat/self-test/data/centos-df0cc57e057f.el7 | 1 - redhat/self-test/data/centos-df0cc57e057f.fc25 | 1 - redhat/self-test/data/centos-fce15c45d3fb.el7 | 1 - redhat/self-test/data/centos-fce15c45d3fb.fc25 | 1 - redhat/self-test/data/fedora-2585cf9dfaad.el7 | 1 - redhat/self-test/data/fedora-2585cf9dfaad.fc25 | 1 - redhat/self-test/data/fedora-78e36f3b0dae.el7 | 1 - redhat/self-test/data/fedora-78e36f3b0dae.fc25 | 1 - redhat/self-test/data/fedora-df0cc57e057f.el7 | 1 - redhat/self-test/data/fedora-df0cc57e057f.fc25 | 1 - redhat/self-test/data/fedora-fce15c45d3fb.el7 | 1 - redhat/self-test/data/fedora-fce15c45d3fb.fc25 | 1 - redhat/self-test/data/rhel-2585cf9dfaad.el7| 1 - redhat/self-test/data/rhel-2585cf9dfaad.fc25 | 1 - redhat/self-test/data/rhel-78e36f3b0dae.el7| 1 - redhat/self-test/data/rhel-78e36f3b0dae.fc25 | 1 - redhat/self-test/data/rhel-df0cc57e057f.el7| 1 - redhat/self-test/data/rhel-df0cc57e057f.fc25 | 1 - redhat/self-test/data/rhel-fce15c45d3fb.el7| 1 - redhat/self-test/data/rhel-fce15c45d3fb.fc25 | 1 - redhat/Makefile| 12 redhat/kernel.spec.template| 4 +++- 26 files changed, 7 insertions(+), 33 deletions(-) -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 1/2] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski redhat: create an empty changelog file when changing its name Bugzilla: INTERNAL Upstream Status: RHEL only Up until now, if we rename the spec package name or bump the rhel major or minor versions, we used to copy the previous changelog file if it exists into the new one. However, this makes the changelog grow indefinitely since a stream start, and it starts to get very big. We do not need to keep the entire history at each new changelog file, because eg. in a stream life, we always keep the older changelog files in the git tree. Thus, instead of copying the old changelog, just create a new empty file. This also makes sure we trim the rpm changelog at each new minor release, since it's used as the source of the rpm package changelog content. And that's another intention with this change: to avoid having the rpm changelog contents to grow too big, as reported by Brian Masney. There was also a case where if we are starting a stream or changing the package name, and there is no old changelog file available, we copied a kernel.changelog* if it existed. But looks like this case we should also do the same and trim it to start fresh, the old changelog file can be kept if wanted in the tree for reference and we don't necessarily need to copy all entries from the old changelog. With this there is some simplification as well and we can remove the CHANGELOG_PREV_EXT variable. Reported-by: Brian Masney Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -72,7 +72,6 @@ SOURCES:=$(RPM)/SOURCES TESTPATCH:=$(REDHAT)/linux-kernel-test.patch CHANGELOG_EXT:=changelog-$(RHEL_MAJOR).$(RHEL_MINOR) SPECCHANGELOG:=$(SPECPACKAGE_NAME).$(CHANGELOG_EXT) -CHANGELOG_PREV_EXT:=changelog-$(RHEL_MAJOR).$(shell expr $(RHEL_MINOR) - 1) ARCH_LIST=aarch64 ppc64le s390x x86_64 # save some user selectable values to know later if we can override them @@ -644,13 +643,8 @@ _setup-source: dist-git-version-check fi @cp $(REDHAT)/$(SPECFILE).template $(SOURCES)/$(SPECFILE) @if [ ! -e $(REDHAT)/$(SPECCHANGELOG) ]; then \ - if [ -e $(SPECPACKAGE_NAME).$(CHANGELOG_PREV_EXT) ]; then \ - echo "Creating $(SPECCHANGELOG) as copy of $(CHANGELOG_PREV_EXT)"; \ - cp $(REDHAT)/$(SPECPACKAGE_NAME).$(CHANGELOG_PREV_EXT) $(REDHAT)/$(SPECCHANGELOG); \ - else \ - echo "Creating $(SPECCHANGELOG) as copy of $(REDHAT)/kernel.$(CHANGELOG_EXT)"; \ - cp $(REDHAT)/kernel.$(CHANGELOG_EXT) $(SPECCHANGELOG); \ - fi; \ + echo "Creating an empty $(SPECCHANGELOG) since it does not exist yet"; \ + touch $(REDHAT)/$(SPECCHANGELOG); \ fi @if [ -z "$(RHSELFTESTDATA)" ]; then \ cp $(REDHAT)/$(SPECCHANGELOG) $(SOURCES)/$(SPECCHANGELOG); \ diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7 +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7 @@ -12,7 +12,6 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 -CHANGELOG_PREV_EXT=changelog-9.98 CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .el7" diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25 @@ -12,7 +12,6 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 -CHANGELOG_PREV_EXT=changelog-9.98 CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .fc25" diff --git a/redhat/self-test/
[OS-BUILD PATCHv2 0/2] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2838 Bugzilla: INTERNAL Upstream Status: RHEL only Up until now, if we rename the spec package name or bump the rhel major or minor versions, we used to copy the previous changelog file if it exists into the new one. However, this makes the changelog grow indefinitely since a stream start, and it starts to get very big. We do not need to keep the entire history at each new changelog file, because eg. in a stream life, we always keep the older changelog files in the git tree. Thus, instead of copying the old changelog, just create a new empty file. This also makes sure we trim the rpm changelog at each new minor release, since it's used as the source of the rpm package changelog content. And that's another intention with this change: to avoid having the rpm changelog contents to grow too big, as reported by Brian Masney. There was also a case where if we are starting a stream or changing the package name, and there is no old changelog file available, we copied a kernel.changelog* if it existed. But looks like this case we should also do the same and trim it to start fresh, the old changelog file can be kept if wanted in the tree for reference and we don't necessarily need to copy all entries from the old changelog. With this there is some simplification as well and we can remove the CHANGELOG_PREV_EXT variable. Reported-by: Brian Masney Signed-off-by: Herton R. Krzesinski --- redhat/self-test/data/centos-2585cf9dfaad.el7 | 1 - redhat/self-test/data/centos-2585cf9dfaad.fc25 | 1 - redhat/self-test/data/centos-78e36f3b0dae.el7 | 1 - redhat/self-test/data/centos-78e36f3b0dae.fc25 | 1 - redhat/self-test/data/centos-df0cc57e057f.el7 | 1 - redhat/self-test/data/centos-df0cc57e057f.fc25 | 1 - redhat/self-test/data/centos-fce15c45d3fb.el7 | 1 - redhat/self-test/data/centos-fce15c45d3fb.fc25 | 1 - redhat/self-test/data/fedora-2585cf9dfaad.el7 | 1 - redhat/self-test/data/fedora-2585cf9dfaad.fc25 | 1 - redhat/self-test/data/fedora-78e36f3b0dae.el7 | 1 - redhat/self-test/data/fedora-78e36f3b0dae.fc25 | 1 - redhat/self-test/data/fedora-df0cc57e057f.el7 | 1 - redhat/self-test/data/fedora-df0cc57e057f.fc25 | 1 - redhat/self-test/data/fedora-fce15c45d3fb.el7 | 1 - redhat/self-test/data/fedora-fce15c45d3fb.fc25 | 1 - redhat/self-test/data/rhel-2585cf9dfaad.el7| 1 - redhat/self-test/data/rhel-2585cf9dfaad.fc25 | 1 - redhat/self-test/data/rhel-78e36f3b0dae.el7| 1 - redhat/self-test/data/rhel-78e36f3b0dae.fc25 | 1 - redhat/self-test/data/rhel-df0cc57e057f.el7| 1 - redhat/self-test/data/rhel-df0cc57e057f.fc25 | 1 - redhat/self-test/data/rhel-fce15c45d3fb.el7| 1 - redhat/self-test/data/rhel-fce15c45d3fb.fc25 | 1 - redhat/Makefile| 12 redhat/kernel.spec.template| 3 ++- 26 files changed, 6 insertions(+), 33 deletions(-) -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 2/2] redhat: ship all the changelog from source git into kernel-doc
From: Herton R. Krzesinski redhat: ship all the changelog from source git into kernel-doc Bugzilla: INTERNAL Upstream Status: RHEL only In the previous change, the rpm changelog will be trimmed due size for each rpm binary on each minor release bump. However, someone may still want to see the full changelog since the start of a given stream, thus provide it in the src.rpm and through kernel-doc. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -699,6 +699,8 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check kernel-local \ dracut-virt.conf \ $(SOURCES)/ + @cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) \ + | xz > $(SOURCES)/kernel.changelog.xz @if [ "$(RELEASED_KERNEL)" -ne 0 ]; then \ cp keys/redhatsecureboot{301,501,ca5,ca1}.cer $(SOURCES)/; \ cp keys/secureboot_{ppc,s390}.cer $(SOURCES)/; \ diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -799,7 +799,7 @@ BuildRequires: tpm2-tools Source0: linux-%{tarfile_release}.tar.xz Source1: Makefile.rhelver - +Source2: kernel.changelog.xz # Name of the packaged file containing signing key %ifarch ppc64le @@ -2918,6 +2918,7 @@ docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease} # copy the source over mkdir -p $docdir tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir +cp %{SOURCE2} $docdir/ # with_doc %endif -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2838 -- ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH] redhat: create an empty changelog file when changing its name
From: Herton R. Krzesinski redhat: create an empty changelog file when changing its name Bugzilla: INTERNAL Upstream Status: RHEL only Up until now, if we rename the spec package name or bump the rhel major or minor versions, we used to copy the previous changelog file if it exists into the new one. However, this makes the changelog grow indefinitely since a stream start, and it starts to get very big. We do not need to keep the entire history at each new changelog file, because eg. in a stream life, we always keep the older changelog files in the git tree. Thus, instead of copying the old changelog, just create a new empty file. This also makes sure we trim the rpm changelog at each new minor release, since it's used as the source of the rpm package changelog content. And that's another intention with this change: to avoid having the rpm changelog contents to grow too big, as reported by Brian Masney. There was also a case where if we are starting a stream or changing the package name, and there is no old changelog file available, we copied a kernel.changelog* if it existed. But looks like this case we should also do the same and trim it to start fresh, the old changelog file can be kept if wanted in the tree for reference and we don't necessarily need to copy all entries from the old changelog. With this there is some simplification as well and we can remove the CHANGELOG_PREV_EXT variable. Reported-by: Brian Masney Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -72,7 +72,6 @@ SOURCES:=$(RPM)/SOURCES TESTPATCH:=$(REDHAT)/linux-kernel-test.patch CHANGELOG_EXT:=changelog-$(RHEL_MAJOR).$(RHEL_MINOR) SPECCHANGELOG:=$(SPECPACKAGE_NAME).$(CHANGELOG_EXT) -CHANGELOG_PREV_EXT:=changelog-$(RHEL_MAJOR).$(shell expr $(RHEL_MINOR) - 1) ARCH_LIST=aarch64 ppc64le s390x x86_64 # save some user selectable values to know later if we can override them @@ -644,13 +643,8 @@ _setup-source: dist-git-version-check fi @cp $(REDHAT)/$(SPECFILE).template $(SOURCES)/$(SPECFILE) @if [ ! -e $(REDHAT)/$(SPECCHANGELOG) ]; then \ - if [ -e $(SPECPACKAGE_NAME).$(CHANGELOG_PREV_EXT) ]; then \ - echo "Creating $(SPECCHANGELOG) as copy of $(CHANGELOG_PREV_EXT)"; \ - cp $(REDHAT)/$(SPECPACKAGE_NAME).$(CHANGELOG_PREV_EXT) $(REDHAT)/$(SPECCHANGELOG); \ - else \ - echo "Creating $(SPECCHANGELOG) as copy of $(REDHAT)/kernel.$(CHANGELOG_EXT)"; \ - cp $(REDHAT)/kernel.$(CHANGELOG_EXT) $(SPECCHANGELOG); \ - fi; \ + echo "Creating an empty $(SPECCHANGELOG) since it does not exist yet"; \ + touch $(REDHAT)/$(SPECCHANGELOG); \ fi @if [ -z "$(RHSELFTESTDATA)" ]; then \ cp $(REDHAT)/$(SPECCHANGELOG) $(SOURCES)/$(SPECCHANGELOG); \ diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7 +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7 @@ -12,7 +12,6 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 -CHANGELOG_PREV_EXT=changelog-9.98 CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .el7" diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25 @@ -12,7 +12,6 @@ BUILD_TARGET=c9s-candidate BUILD_TARGET_USERDEF= BUMP_RELEASE=yes CHANGELOG_EXT=changelog-9.99 -CHANGELOG_PREV_EXT=changelog-9.98 CROSS_DISABLED_SUBPACKAGES=--without bpftool --without perf --without tools CROSS_PACKAGE_LIST=cross-binutils-common cross-gcc-common diffstat glibc-static ncurses-devel numactl-devel rng-tools binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu binutils-s390x-linux-gnu gcc-s390x-linux-gnu CROSS_RPMFLAGS=rpmbuild --define "_sourcedir ../redhat/rpm/SOURCES" --define "_builddir ../redhat/rpm/BUILD" --define "_srcrpmdir ../redhat/rpm/SRPMS" --define "_rpmdir ../redhat/rpm/RPMS" --define "_specdir ../redhat/rpm/SPECS" --define "dist .fc25" diff --git a/redhat/self-test/
Re: [OS-BUILD PATCHv6 0/3] redhat: Switch KABI file compression to xz
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2760#note_1626469984 yes, I was reading tar docs, and found it tries to auto-detect the format automatically, first by signature, if it fails then by name suffix (.xz) of the file. So ok, should be fine. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv6 0/3] redhat: Switch KABI file compression to xz
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2760#note_1626455222 Hmm that's strange, unless I missed something, shouldn't this be '-xJvf'? ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] Fix binutils breakage
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2749#note_1609004744 The way to do it in this case should be: ```TPROGS_CFLAGS="%{?build_hostcflags}" %{make} %{?_smp_mflags} ARCH=$Arch V=1 M=samples/bpf/ VMLINUX_H="${RPM_VMLINUX_H}" || true``` Pass the variable before the make invocation. So make does not override it and will append. However, that may still Makefile modification if it doesn't use override or doesn't append with ```+=```. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] redhat/kernel.spec.template: simplify __modsign_install_post
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2734#note_1599021686 I think mod-sign.sh will not like it. It does use ```xargs -r``` but may exit with an error if no signing is done. You may want check and adjust if needed mod-sign.sh and then I think we can remove the special case for zfcpdump, plus it can then allow other variants to not have any modules. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH 1/3] redhat: Use kspdx-tool output for the License: field
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2648#note_1527728838 Well there are still firmware being included in the linux sources, one example: ```drivers/net/appletalk/cops_ffdrv.h``` But probably cases like this should be handled upstream (moving or removing them..., or adding a proper SPDX identifier). From the License tag I think we need to remove the Redistributable... info since it's not a valid identifier. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv5 0/8] redhat: Add realtime build and packaging logic
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2403#note_1418892403 thanks this looks solved now, thus resolving this thread. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 0/3] redhat: add support for Jira issues in changelog
From: Herton R. Krzesinski on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2496 This MR syncs genlog.py changes done in centos stream aiming at Jira support. Signed-off-by: Herton R. Krzesinski --- redhat/scripts/genspec/genlog.py | 93 +++ 1 files changed, 63 insertions(+), 30 deletions(-) ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 3/3] redhat/genlog.py: add support to list/process zstream Jira tickets
From: Herton R. Krzesinski redhat/genlog.py: add support to list/process zstream Jira tickets Bugzilla: INTERNAL Upstream Status: RHEL only Even if we don't have the zstream process finalized yet for Jira, our maintainer tooling already has some support for it and it can look for Z-JIRA tags already. Also, we already have at least one case where we have a Z-Stream bug with a Y-Stream Jira issue, and we need to make sure the resolves line don't list the Y-Stream Jira issue. This change adds support to list Z-Stream Jira issues in the changelog while at the same time it also makes sure to avoid adding Y-Stream tickets when we are doing Z-Stream work to the Resolves line. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/scripts/genspec/genlog.py b/redhat/scripts/genspec/genlog.py index blahblah..blahblah 100755 --- a/redhat/scripts/genspec/genlog.py +++ b/redhat/scripts/genspec/genlog.py @@ -63,11 +63,13 @@ def parse_commit(commit): bug_set = set() zbug_set = set() jira_set = set() +zjira_set = set() for line in lines[1:]: # Metadata in git notes has priority over commit log -# If we found any BZ/ZBZ/CVE in git notes, we ignore commit log +# If we found any BZ/ZBZ/JIRA/ZJIRA/CVE in git notes, +# we ignore the commit log if line == "^^^NOTES-END^^^": -if bug_set or zbug_set or cve_set: +if bug_set or zbug_set or jira_set or zjira_set or cve_set: break # Process Bugzilla and ZStream Bugzilla entries @@ -79,21 +81,23 @@ def parse_commit(commit): # Process Jira issues jira_set.update(find_ji_in_line(line, 'JIRA')) +zjira_set.update(find_ji_in_line(line, 'Z-JIRA')) -return (log_entry, cve_set, bug_set, zbug_set, jira_set) +return (log_entry, cve_set, bug_set, zbug_set, jira_set, zjira_set) if __name__ == "__main__": all_bzs = set() all_zbzs = set() all_jiras = set() +all_zjiras = set() commits = sys.stdin.read().split('\0') for c in commits: if not c: continue -log_item, cves, bugs, zbugs, jiras = parse_commit(c) +log_item, cves, bugs, zbugs, jiras, zjiras = parse_commit(c) entry = f"{log_item}" -if bugs or zbugs or jiras: +if bugs or zbugs or jiras or zjiras: entry += " [" if zbugs: entry += " ".join(sorted(zbugs)) @@ -106,18 +110,32 @@ if __name__ == "__main__": entry += " " if bugs or zbugs else "" entry += " ".join(sorted(jiras)) all_jiras.update(jiras) +if zjiras: +entry += " " if bugs or zbugs or jiras else "" +entry += " ".join(sorted(zjiras)) +all_zjiras.update(zjiras) entry += "]" if cves: entry += " {" + " ".join(sorted(cves)) + "}" print(entry) -resolved_bzs = all_zbzs if all_zbzs else all_bzs +# If we are doing Z-Stream work, we are addressing Z-Stream tickets +# and not Y-Stream tickets, so we must make sure to list on Resolves +# line only the Z-Stream tickets +resolved_bzs = set() +resolved_jiras = set() +if all_zbzs or all_zjiras: +resolved_bzs = all_zbzs +resolved_jiras = all_zjiras +else: +resolved_bzs = all_bzs +resolved_jiras = all_jiras print("Resolves: ", end="") for i, bzid in enumerate(sorted(resolved_bzs)): if i: print(", ", end="") print(f"rhbz#{bzid}", end="") -for j, jid in enumerate(sorted(all_jiras)): +for j, jid in enumerate(sorted(resolved_jiras)): if j or resolved_bzs: print(", ", end="") print(f"{jid}", end="") -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2496 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 1/3] redhat: add support for Jira issues in changelog
From: Herton R. Krzesinski redhat: add support for Jira issues in changelog Bugzilla: INTERNAL Upstream Status: RHEL only RHEL will switch from Bugzilla to Jira for tickets. This adds support for parsing and listing Jira issues in the changelog. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/scripts/genspec/genlog.py b/redhat/scripts/genspec/genlog.py index blahblah..blahblah 100755 --- a/redhat/scripts/genspec/genlog.py +++ b/redhat/scripts/genspec/genlog.py @@ -15,20 +15,26 @@ import re import sys -def find_bz_in_line(line, prefix): -"""Return bug number from properly formated Bugzilla: line.""" -# BZs must begin with '{prefix}: ' and contain a complete BZ URL or id -_bugs = set() +def find_ticket_in_line(line, prefix, tkt_re, tkt_groups): +"""Return ticket referenced in the given line""" +_tkts = set() if not line.startswith(f"{prefix}: "): -return _bugs +return _tkts +for match in tkt_re.finditer(line[len(f"{prefix}:"):]): +for group in tkt_groups: +if match.group(group): +tid = match.group(group).strip() +_tkts.add(tid) +return _tkts + +def find_bz_in_line(line, prefix): bznum_re = re.compile(r'(?P \d{4,8})|' r'( http(s)?://bugzilla\.redhat\.com/(show_bug\.cgi\?id=)?(?P\d{4,8}))') -for match in bznum_re.finditer(line[len(f"{prefix}:"):]): -for group in [ 'bug_ids', 'url_bugs' ]: -if match.group(group): -bid = match.group(group).strip() -_bugs.add(bid) -return _bugs +return find_ticket_in_line(line, prefix, bznum_re, [ 'bug_ids', 'url_bugs' ]) + +def find_ji_in_line(line, prefix): +ji_re = re.compile(r' https://issues\.redhat\.com/(?:browse|projects/RHEL/issues)/(?PRHEL-\d{1,8})\s*$') +return find_ticket_in_line(line, prefix, ji_re, [ 'jira_id' ]) def find_cve_in_line(line): """Return cve number from properly formated CVE: line.""" @@ -56,6 +62,7 @@ def parse_commit(commit): cve_set = set() bug_set = set() zbug_set = set() +jira_set = set() for line in lines[1:]: # Metadata in git notes has priority over commit log # If we found any BZ/ZBZ/CVE in git notes, we ignore commit log @@ -70,28 +77,35 @@ def parse_commit(commit): # Grab CVE tags if they are present cve_set.update(find_cve_in_line(line)) -return (log_entry, sorted(cve_set), sorted(bug_set), sorted(zbug_set)) +# Process Jira issues +jira_set.update(find_ji_in_line(line, 'JIRA')) + +return (log_entry, sorted(cve_set), sorted(bug_set), sorted(zbug_set), sorted(jira_set)) if __name__ == "__main__": all_bzs = [] all_zbzs = [] +all_jiras = [] commits = sys.stdin.read().split('\0') for c in commits: if not c: continue -log_item, cves, bugs, zbugs = parse_commit(c) +log_item, cves, bugs, zbugs, jiras = parse_commit(c) entry = f"{log_item}" -if bugs or zbugs: +if bugs or zbugs or jiras: entry += " [" if zbugs: entry += " ".join(zbugs) all_zbzs.extend(zbugs) -if bugs and zbugs: -entry += " " if bugs: +entry += " " if zbugs else "" entry += " ".join(bugs) all_bzs.extend(bugs) +if jiras: +entry += " " if bugs or zbugs else "" +entry += " ".join(jiras) +all_jiras.extend(jiras) entry += "]" if cves: entry += " {" + " ".join(cves) + "}" @@ -106,5 +120,9 @@ if __name__ == "__main__": if i: print(", ", end="") print(f"rhbz#{bzid}", end="") +for j, jid in enumerate(all_jiras): +if j or len(resolved_bzs) > 0: + print(", ", end="") +print(f"{jid}", end="") print("\n") -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2496 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 2/3] redhat: fix duplicate jira issues in the resolves line
From: Herton R. Krzesinski redhat: fix duplicate jira issues in the resolves line Bugzilla: INTERNAL Upstream Status: RHEL only The current genlog.py code does not check for duplicated jira issues added to the resolves line. For bugzilla numbers, that check was present when creating the resolved_bzs list. To resolve it, convert everything to sets (which can't have duplicated items), as such we don't need to do additional checks when printing the resolves line. Also, make sure we sort not only the per changelog item numbers, but also the items in the resolves line. Fixes: 552fe563b55b ("redhat: add support for Jira issues in changelog") Signed-off-by: Herton R. Krzesinski diff --git a/redhat/scripts/genspec/genlog.py b/redhat/scripts/genspec/genlog.py index blahblah..blahblah 100755 --- a/redhat/scripts/genspec/genlog.py +++ b/redhat/scripts/genspec/genlog.py @@ -80,13 +80,13 @@ def parse_commit(commit): # Process Jira issues jira_set.update(find_ji_in_line(line, 'JIRA')) -return (log_entry, sorted(cve_set), sorted(bug_set), sorted(zbug_set), sorted(jira_set)) +return (log_entry, cve_set, bug_set, zbug_set, jira_set) if __name__ == "__main__": -all_bzs = [] -all_zbzs = [] -all_jiras = [] +all_bzs = set() +all_zbzs = set() +all_jiras = set() commits = sys.stdin.read().split('\0') for c in commits: if not c: @@ -96,32 +96,29 @@ if __name__ == "__main__": if bugs or zbugs or jiras: entry += " [" if zbugs: -entry += " ".join(zbugs) -all_zbzs.extend(zbugs) +entry += " ".join(sorted(zbugs)) +all_zbzs.update(zbugs) if bugs: entry += " " if zbugs else "" -entry += " ".join(bugs) -all_bzs.extend(bugs) +entry += " ".join(sorted(bugs)) +all_bzs.update(bugs) if jiras: entry += " " if bugs or zbugs else "" -entry += " ".join(jiras) -all_jiras.extend(jiras) +entry += " ".join(sorted(jiras)) +all_jiras.update(jiras) entry += "]" if cves: -entry += " {" + " ".join(cves) + "}" +entry += " {" + " ".join(sorted(cves)) + "}" print(entry) -resolved_bzs = [] -for bzid in (all_zbzs if all_zbzs else all_bzs): -if not bzid in resolved_bzs: -resolved_bzs.append(bzid) +resolved_bzs = all_zbzs if all_zbzs else all_bzs print("Resolves: ", end="") -for i, bzid in enumerate(resolved_bzs): +for i, bzid in enumerate(sorted(resolved_bzs)): if i: print(", ", end="") print(f"rhbz#{bzid}", end="") -for j, jid in enumerate(all_jiras): -if j or len(resolved_bzs) > 0: +for j, jid in enumerate(sorted(all_jiras)): +if j or resolved_bzs: print(", ", end="") print(f"{jid}", end="") print("\n") -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2496 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv4 0/6] redhat: Add realtime build and packaging logic
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2403#note_1411398674 Hi Clark, this is different from what we have on centos9/9.3: the name of the package is rt-debug. Using kernel-rt_debug instead of kernel-rt-debug breaks the upgrade path from the previously separate kernel-rt and from 9.3 Can you sync your patch with the centos9 version? You also may need to bring the 64k arm support to ark, not sure. On centos/9.3, it was a dependency because of the order it was merged. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv9 0/3] redhat/kernel.spec.template: Add global compression variables
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2173#note_1369001617 I would go further on that, I see little value in using variables. It's very rare to switch compression algorithms over time. The only way I see it's useful is if we want to support users switching compressors, but then you're right here we may want to cover it fully like wrapping the compression level argument into another variable. I'm acking the MR anyway as is though, as I'm fine with either approach. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] redhat/Makefile: fix default values for dist-brew's DISTRO and DIST
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2339#note_1298900961 ah, I think you need to run ```make dist-self-test-data```, and add/push the changes to redhat/self-test/data/*, can you try that? ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] redhat/Makefile: fix default values for dist-brew's DISTRO and DIST
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2339#note_1298757389 This last version looks good to me, thank you. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat/Makefile: fix default values for dist-brew's DISTRO and DIST
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2339#note_1297506964 About changing the DISTRO, may be it's be useful, although we default for RHEL as usually a RHEL developer wants to test the build on brew (rhel) instead of centos even if we are building/integrating it first on centos. So that's why I think no one complained so far, the maintainer (eg. me) is usually the one which uses the DISTRO value (only at the dist-git sync step), but that has been working on the centos side so far passing through the command line, so I didn't noticed it was broken too since I don't use Makefile.variables. To determine the where the value comes, we could use origin like ```ifeq ("$(origin BUILD_TARGET)", "command line")```, but I didn't think what the logic should be. I think we should keep DIST as is on Makefile.variables and logic is done in Makefile? I think could be possible? I'm not sure if there is a problem. Right now we change the DIST in Makefile.variables when kernel-ark is forked to RHEL, for example, centos9 kernel src.git sets it to DIST ?= .el9 in Makefile.variables. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat/kernel.spec.template: Fix RHEL systemd-boot-unsigned dependency for
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2341#note_1295896026 As Aquini pointed out: https://bugzilla.redhat.com/show_bug.cgi?id=2157663 - they changed it on rhel9 now, surprisingly now breaking any kernel build on rhel9 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat/Makefile: fix default values for dist-brew's DISTRO and DIST
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2339#note_1295688724 This doesn't work, because it'll override anything you set inside redhat/Makefile.variables. For example if I do this: ``` diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables index c20fef88a468..1381ffbb7c1d 100644 --- a/redhat/Makefile.variables +++ b/redhat/Makefile.variables @@ -30,7 +30,7 @@ BUILD_PROFILE ?= # default values can be found in redhat/Makefile and are dependent on the # target OS. The target OS can be changed by setting the DIST or DISTRO # variables. -BUILD_TARGET ?= +BUILD_TARGET ?= rawhide # BUMP_RELEASE determines whether the pkgrelease is bumped when you call # 'make dist-release'. It should be set to "yes" if you expect to do ``` Your patch will override it, even if I want to change the value in Makefile.variables. Probably what we want to do is to change the ifdefs. For example: ``` ifndef BUILD_TARGET ``` to ``` ifeq ("$(BUILD_TARGET)", "") ``` It looks like we should be using ifeq instead. I remember something about ifdef not being ideal with make and exported variables. So switch to ifeq, and see if the remaining changes are really needed or not here. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv3 0/4] redhat: update merge.py to handle merge.pl corner cases
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2262#note_1259584001 Yes I agree we could do improvements/changes to the script or cleanup the comments in another MR, since it's out of scope for this one, so approving this. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv3 0/4] redhat: update merge.py to handle merge.pl corner cases
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2262#note_1259579704 Yes indeed. I think we can keep the logic the same as .pl right now, and may be we can improve the .py script later. Since original concern is solved, resolving this thread. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv3] kernel.spec: add llvm-devel build requirement
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2264#note_1259440012 You should specify here only llvm-devel: when you install llvm-devel it already requires llvm so it's redundant to list both. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/3] redhat: update merge.py to handle merge.pl corner cases
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2262#note_1258074197 Looks like this part doesn't translate exactly what the perl part implemented: ``` if (defined($configname) && !exists($configvalues{$configname})) { $configvalues{$configname} = $str; $configoptions[$configcounter] = $configname; $configcounter ++; } ``` If the overrides file has the same config option listed twice, the perl seemed to ignore it. Eg. CONFIG_FOO = y CONFIG_FOO = n configvalues gets CONFIG_FOO = y next iteration configvalues is not assigned because CONFIG_FOO is already assigned previously The python script is not checking this, always assign what it reads (```overrides[c] = line```) Not sure if this is a real problem or not, but just pointing out. We can resolve this thread if it's not an issue. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH] redhat: ignore rpminspect runpath report on urandom_read selftest binaries
From: Herton R. Krzesinski redhat: ignore rpminspect runpath report on urandom_read selftest binaries Upstream Status: RHEL only Since a recent bpf update on the kernel, rpminspect started to report the following issue in the urandom_read selftest binaries: /usr/libexec/kselftests/bpf/(...)urandom_read has an invalid-looking DT_RPATH on : . This is expected since upstream commit: 00a0fa2d7d49 ("selftests/bpf: Add urandom_read shared lib and USDTs") As the selftest binary uses shared library linked from the current directory. Thus add the reported binaries to the ignore list in rpminspect configuration so this doesn't get reported every rpminspect CI run. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/scripts/gating/rpminspect.yaml b/redhat/scripts/gating/rpminspect.yaml index blahblah..blahblah 100644 --- a/redhat/scripts/gating/rpminspect.yaml +++ b/redhat/scripts/gating/rpminspect.yaml @@ -24,3 +24,8 @@ patches: ignore_list: - linux-kernel-test.patch - patch-%%SPECKVERSION%%.%%SPECKPATCHLEVEL%%-redhat.patch + +runpath: +ignore: +- /usr/libexec/kselftests/bpf/urandom_read +- /usr/libexec/kselftests/bpf/no_alu32/urandom_read -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2270 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] Revert "redhat: fix elf got hardening for vm tools"
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2236#note_1252361900 @dzickusrh gitlab considers your block rule as invalid here since you're blocking your own MR, anyway, I think you still need to unblock this, can you "/unblock" this MR? ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv6] redhat/kernel.spec.template: Parallelize compression
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2254#note_1249574743 @prarit didn't see changes compared to latest version, didn't you want it to be ```-n 16```? ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] Revert "redhat: fix elf got hardening for vm tools"
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2236#note_1249510524 We agreed in the last ark meeting we need this patch and the CFLAGS underlying issue will be fixed once upstream patch https://www.spinics.net/lists/kernel/msg4653901.html lands. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv5] redhat/kernel.spec.template: Parallelize compression
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2254#note_1249483495 I don't think we need to overengineer this. I agree fork costs can be something to avoid, but we don't need a separate script. If there is a heuristic for it we should calculate it and and give to ```-n``` option. But I'm ok the way it is right now. If you want to determine an heuristic and measure the difference feel free to. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat/kernel.spec.template: Parallelize compression
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2254#note_1248025244 Do you really need an external script here? I think you can use -n argument of xargs, eg: ```find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 1 -P${RPM_BUILD_NCPUS} -r xz; \``` ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv7 2/4] redhat/Makefile.variables: Remove mention of Makefile.rhpkg
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2240#note_1241321402 I just noticed this, you mention removing Makefile.rhpkg from the comment, but you kept it and instead removed the ../Makefile.rhelver file from the comment. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv6 0/4] makefile: Add -Werror support for RHEL
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2240#note_1241308951 Well, but your code in change in redhat/configs/build_configs.sh sets CONFIG_WERROR when you set ENABLE_WERROR, are you aiming a use case where build_configs.sh doesn't run? ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv6 0/4] makefile: Add -Werror support for RHEL
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2240#note_1241302470 @prarit looks even better without need the -Wno-error flag, however do you really need to add Werror again here? Since if you already have ENABLE_WERROR set, it will flip CONFIG_WERROR=y in which case the kernel Makefile already takes care of adding the flag. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] Revert "redhat: fix elf got hardening for vm tools"
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2236#note_1219437543 And yes, building kernel tools with proper cflags/ldflags have been a nightmare, since each Makefile implements its own way of using flags, it's not standard, not everyone uses EXTRA_CFLAGS etc. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] Revert "redhat: fix elf got hardening for vm tools"
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2236#note_1219436857 I'm not familiar with the original problem, but familiar with rpminspect in general. The problem is that the build of the tool does not respect the CFLAGS/LDFLAGS given by rpm with hardening options etc., so later rpminspect fails since the binaries were not built with proper cflags/ldflags. In this case looking quickly here, there are two problems: the makefile (tools/vm/Makefile) does not accept user specified CFLAGS, and for the tools/lib/api that the slabinfo/page_owner_sort uses, that uses tools/lib/api/Makefile which has EXTRA_CFLAGS usage... So I think you need two options here to really fix this, something like this patch: ``` $ git diff diff --git a/tools/vm/Makefile b/tools/vm/Makefile index 9860622cbb15..6c1da51f4177 100644 --- a/tools/vm/Makefile +++ b/tools/vm/Makefile @@ -8,8 +8,8 @@ TARGETS=page-types slabinfo page_owner_sort LIB_DIR = ../lib/api LIBS = $(LIB_DIR)/libapi.a -CFLAGS = -Wall -Wextra -I../lib/ -LDFLAGS = $(LIBS) +CFLAGS += -Wall -Wextra -I../lib/ +LDFLAGS += $(LIBS) all: $(TARGETS) ``` Then you can build the tools with: EXTRA_CFLAGS="${RPM_OPT_FLAGS}" %{tools_make} slabinfo page_owner_sort You can verify that the proper flags are being used passing V=1, for example: EXTRA_CFLAGS="${RPM_OPT_FLAGS}" %{tools_make} V=1 slabinfo page_owner_sort ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH 0/3] redhat/kernel.spec.template: Add global compression variables
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2173#note_1195644358 I'm not sure you can really change the symvers file compression away from gzip right now. At least looking quickly here, it seems grub2 on Fedora 36 has a script that references it: ``` $ grep -r symvers /usr/lib/kernel/install.d/* /usr/lib/kernel/install.d/20-grub.install:# symvers is symvers-.gz symlink, needs a special treatment /usr/lib/kernel/install.d/20-grub.install: i="$KERNEL_DIR/symvers.gz" /usr/lib/kernel/install.d/20-grub.install:rm -f "/boot/symvers-${KERNEL_VERSION}.gz" /usr/lib/kernel/install.d/20-grub.install:ln -s "$i" "/boot/symvers-${KERNEL_VERSION}.gz" /usr/lib/kernel/install.d/20-grub.install:restorecon "/boot/symvers-${KERNEL_VERSION}.gz" /usr/lib/kernel/install.d/20-grub.install:# symvers is symvers-.gz symlink, needs a special treatment /usr/lib/kernel/install.d/20-grub.install:rm -f "/boot/symvers-${KERNEL_VERSION}.gz" $ rpm -qf /usr/lib/kernel/install.d/20-grub.install grub2-common-2.06-54.fc36.noarch ``` ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat: genlog.sh should expect genlog.py in the current directory
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2167#note_1191028584 I think that's the way to do it. It's like an script, you can't remove the genlog.sh to a separate place due the CLOGF temp file. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat/Makefile: Fix RHJOBS grep warning
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2148#note_1174863504 So there is a problem in this expression I think, but it was already an existing problem before this change. If you have eg.: ```MAKEFLAGS="-j45"```, be at the beginning or -j being the only option in the MAKEFLAGS, the expression will not match. I think the expression need to be changed to: ```grep -Eo "(^|[ ])-j[0-9]*"``` So it matches either at the beginning, or as an option in the middle of other options with the space. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] redhat: Force remove tmp file
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2135#note_1163073892 I see. But I mean you could have folded it in just one line: ```rm -f vmlinux.o .tmp_vmlinux.btf``` ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat: Test tmp file before deleting
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2135#note_1162936472 Wouldn't it be better to just use ```rm -f``` instead of adding the if? ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH] redhat: fix the branch we pull from the documentation tree
From: Herton R. Krzesinski redhat: fix the branch we pull from the documentation tree Bugzilla: INTERNAL Upstream Status: RHEL only It has been some time since the documentation project has a main branch instead of master, so fix that. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/scripts/merge-subtrees.sh b/redhat/scripts/merge-subtrees.sh index blahblah..blahblah 100755 --- a/redhat/scripts/merge-subtrees.sh +++ b/redhat/scripts/merge-subtrees.sh @@ -8,5 +8,5 @@ entries=" echo "$entries" | while read -r name url; do [ -z "$name" ] && continue - git subtree pull --prefix="$name" "$url" master + git subtree pull --prefix="$name" "$url" main done -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2130 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151621759 Yes, python2 doesn't exist anymore, and python3 is the default. At least it hasn't been a problem. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151619466 Wouldn't it be better to just do what we already do eg. for redhat/genlog.py (where it's called directly from redhat/genlog.sh)? ``` Add #!/usr/bin/python3 to the first line of merge.py make it executable call it directly from buildconfigs.sh ``` ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat/configs: Disable CONFIG_FW_LOADER_COMPRESS
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2112#note_1146809414 Fedora enabled firmware compression. So when we inherited things for RHEL 9, the kernel had to followup and enable it, otherwise it breaks firmware loading. So yes, we can't disable it, otherwise it'll break firmware loading, as @jmflinuxtx mentions above. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat: set LC_ALL=C before sorting config content
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2011#note_1105589193 sorry I don't know. I could trace it back to a commit in rhel-7 that @jwilsonrh did (commit 41ce43f3f46207e6e2a3223fddf57ab7e0b99155 - "[redhat] configs: adapt tooling for new config option layout"). Not sure if Jarod will remember about this... But from the logic I believe the sort is done because the script concatenate some config files and may be for cosmetic reason to have a sane final config file. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv5 0/9] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980#note_1067972199 Check out the updated MR, example of the entry now: ``` +* Wed Aug 17 2022 Herton R. Krzesinski [6.0.0-0.rc1.3cc40a443a04.15] +- Linux v6.0.0-0.rc1.3cc40a443a04 +Resolves: + ``` ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 9/9] redhat: change the changelog item for upstream merges
From: Herton R. Krzesinski redhat: change the changelog item for upstream merges We do merges from upstream in ark, not real rebases. Reword the changelog item as suggested by Don Zickus and Justin Forbes. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -50,7 +50,7 @@ fi if [ "$MARKER" != "$LAST_MARKER" ]; then # genlog.py always adds a Resolves: line, thus we # can insert the rebase changelog item before it - sed -i "s/\(^Resolves:.*\)/- $MARKER rebase\n\1/" "$clogf" + sed -i "s/\(^Resolves:.*\)/- Linux v${SPECVERSION}${UPSTREAMBUILD:+-}${UPSTREAMBUILD%.}\n\1/" "$clogf" fi # during rh-dist-git genspec runs again and generates empty changelog -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 8/9] redhat: fix dist-release build number test
From: Herton R. Krzesinski redhat: fix dist-release build number test Since previous commit, when fixing the build number bump, this test will fail, now the build number and package release number should match as this test was intended to check. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/self-test/2001-dist-release.bats b/redhat/self-test/2001-dist-release.bats index blahblah..blahblah 100644 --- a/redhat/self-test/2001-dist-release.bats +++ b/redhat/self-test/2001-dist-release.bats @@ -43,7 +43,6 @@ _dist-release_test_2() { # Strip off ...kernel-VV.PP.SS-: pkgrelease=${title##*kernel-+([5-9]).+([0-9]).+([0-9])-} build=$(BUILD= DIST=.fc33 make dist-dump-variables | grep -E "^BUILD=" | cut -d"=" -f2 | xargs) - ((build--)) echo "pkgrelease=$pkgrelease" echo "build=$build" run _dist-release_test_2 -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 7/9] redhat: fix release number bump when dist-release-changed runs
From: Herton R. Krzesinski redhat: fix release number bump when dist-release-changed runs Right now inside the dist-release-changed target, we run a sub make invocation calling the dist-release-finish target, after bumping the release number with new_release.sh. The problem is that the BUILD number still pointed to the old pre-bump number inside the dist-release-finish invocation, and the problem is that we don't reload the RHEL_RELEASE number in redhat/Makefile if BUILD is already defined. Since it looks like that check was added to avoid overriding the BUILD number set when RHSELFTESTDATA is defined, lets change the if check there so BUILD has the updated value when dist-release-finish runs through dist-release-changed. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -58,7 +58,7 @@ SPECKPATCHLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^PATCHLEVEL\ = SPECKSUBLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^SUBLEVEL\ =\ /{s///;p;q}') SPECKEXTRAVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^EXTRAVERSION\ =\ /{s///;p;q}') GITID:= $(shell $(GIT) log --max-count=1 --pretty=format:%H $(HEAD)) -ifndef BUILD +ifndef RHSELFTESTDATA BUILD:=$(RHEL_RELEASE) endif FLAVOR= -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 6/9] redhat: use new genlog.sh script to detect changes for dist-release
From: Herton R. Krzesinski 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 diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -572,18 +572,18 @@ dist-rpm-baseonly: dist-sources do-rpmbuild # unless you know what you're doing, you don't want to use the next four ones dist-release-finish: setup-source @cp $(SOURCES)/$(SPECCHANGELOG) $(REDHAT)/$(SPECCHANGELOG) + @echo $(MARKER) > $(REDHAT)/marker @$(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)"; \ + 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@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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 5/9] redhat: move changelog addition to the spec file back into genspec.sh
From: Herton R. Krzesinski redhat: move changelog addition to the spec file back into genspec.sh In the next change, we want to detect at the Makefile level if we have new changelog entries before we touch the spec file, so it makes sense to have changelog addition being done in genspec.sh. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -36,13 +36,13 @@ git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ if [ "$HIDE_REDHAT" = "1" ]; then grep -v -e "^- \[redhat\]" "$clogf" | - sed -e 's!\[Fedora\]!!g' > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + sed -e 's!\[Fedora\]!!g' > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi if [ "$HIDE_UNSUPPORTED_ARCH" = "1" ]; then - grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi # If the markers aren't the same then this a rebase. @@ -60,17 +60,4 @@ if [ "$LENGTH" = 0 ]; then echo -n > "$clogf" fi -cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" -mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" - -# genlog.py generates Resolves lines as well, strip these from RPM changelog -grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped - -test -f "$SOURCES/$SPECFILE" && - sed -i -e " - /%%SPECCHANGELOG%%/r $clogf.stripped - /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" - echo "MARKER is $MARKER" - -rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -88,9 +88,20 @@ if [ -n "$RHSELFTESTDATA" ]; then fi clogf=$(mktemp) -trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +trap 'rm -f "$clogf" "$clogf".stripped' SIGHUP SIGINT SIGTERM EXIT "${0%/*}"/genlog.sh "$clogf" +cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" +mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" + +# genlog.py generates Resolves lines as well, strip these from RPM changelog +grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped + +test -f "$SOURCES/$SPECFILE" && + sed -i -e " + /%%SPECCHANGELOG%%/r $clogf.stripped + /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" + if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 4/9] redhat: always add a rebase entry when ark merges from upstream
From: Herton R. Krzesinski redhat: always add a rebase entry when ark merges from upstream We have some complex logic to parse changelog entries to choose whether we add a rebase entry or not to the changelog. Since genlog.py is adding a Resolves entry always now, simply replace that logic with a replacement using sed to add a rebase entry when the markers differ. The marker check doesn't work at the moment due Makefile logic but that will be fixed in the following changes. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -48,14 +48,9 @@ fi # If the markers aren't the same then this a rebase. # This means we need to zap entries that are already present in the changelog. if [ "$MARKER" != "$LAST_MARKER" ]; then - # awk trick to get all unique lines - awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique" - # sed trick to get the end of the changelog minus the line - sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp" - # Add an explicit entry to indicate a rebase. - echo "" > "$clogf" - echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf" - rm "$clogf.tmp" "$clogf.unique" + # genlog.py always adds a Resolves: line, thus we + # can insert the rebase changelog item before it + sed -i "s/\(^Resolves:.*\)/- $MARKER rebase\n\1/" "$clogf" fi # during rh-dist-git genspec runs again and generates empty changelog -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 2/9] redhat: don't hardcode temporary changelog file
From: Herton R. Krzesinski redhat: don't hardcode temporary changelog file We always create a changelog file inside the sources directory, which is temporary and always deleted at the end. Instead hardcoding the temporary file name, create a real temporary file to be used with genlog.sh script, given as its first argument. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -1,7 +1,7 @@ #!/bin/bash LAST_MARKER=$(cat "${REDHAT}"/marker) -clogf="$SOURCES/changelog" +clogf="$1" # hide [redhat] entries from changelog HIDE_REDHAT=1; # hide entries for unsupported arches @@ -70,8 +70,7 @@ fi # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') if [ "$LENGTH" = 0 ]; then - rm -f "$clogf" - touch "$clogf" + echo -n > "$clogf" fi cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" @@ -87,4 +86,4 @@ test -f "$SOURCES/$SPECFILE" && echo "MARKER is $MARKER" -rm -f "$clogf"{,.stripped}; +rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -87,7 +87,9 @@ if [ -n "$RHSELFTESTDATA" ]; then exit 0 fi -"${0%/*}"/genlog.sh +clogf=$(mktemp) +trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +"${0%/*}"/genlog.sh "$clogf" if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 3/9] redhat: drop merge ark patches hack
From: Herton R. Krzesinski redhat: drop merge ark patches hack Changelog generation carries a temporary hack to add a merge ark-patches entry in the changelog. I think we can drop this today. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -58,14 +58,6 @@ if [ "$MARKER" != "$LAST_MARKER" ]; then rm "$clogf.tmp" "$clogf.unique" fi -# HACK temporary hack until single tree workflow -# Don't reprint all the ark-patches again. -if [ -n "$(git log --oneline --first-parent --grep="Merge ark patches" "$lasttag"..)" ]; then - # Throw away the clogf and just print the summary merge - echo "" > "$clogf" - echo "- Merge ark-patches" >> "$clogf" -fi - # during rh-dist-git genspec runs again and generates empty changelog # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv5 1/9] redhat: split changelog generation from genspec.sh
From: Herton R. Krzesinski redhat: split changelog generation from genspec.sh This creates a new genlog.sh script to split out the changelog generation code from genspec.sh. The splitted code is kept as is. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh new file mode 100755 index blahblah..blahblah 100755 --- /dev/null +++ b/redhat/genlog.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +LAST_MARKER=$(cat "${REDHAT}"/marker) +clogf="$SOURCES/changelog" +# hide [redhat] entries from changelog +HIDE_REDHAT=1; +# hide entries for unsupported arches +HIDE_UNSUPPORTED_ARCH=1; +# override LC_TIME to avoid date conflicts when building the srpm +LC_TIME= + +GIT_FORMAT="--format=- %s (%an)%n%N%n^^^NOTES-END^^^%n%b" +GIT_NOTES="--notes=refs/notes/${RHEL_MAJOR}.${RHEL_MINOR}*" + +lasttag=$(git rev-list --first-parent --grep="^\[redhat\] kernel-${SPECKVERSION}.${SPECKPATCHLEVEL}" --max-count=1 HEAD) +# if we didn't find the proper tag, assume this is the first release +if [[ -z $lasttag ]]; then +if [[ -z ${MARKER//[0-9a-f]/} ]]; then +# if we're doing an untagged release, just use the marker +echo "Using $MARKER" +lasttag=$MARKER +else + lasttag=$(git describe --match="$MARKER" --abbrev=0) +fi +fi +echo "Gathering new log entries since $lasttag" +# master is expected to track mainline. + +cname="$(git var GIT_COMMITTER_IDENT |sed 's/>.*/>/')" +cdate="$(LC_ALL=C date +"%a %b %d %Y")" +cversion="[$BASEVERSION]"; +echo "* $cdate $cname $cversion" > "$clogf" + +git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ + ^"${UPSTREAM}" "$lasttag".. -- ':!/redhat/rhdocs' | "${0%/*}"/genlog.py >> "$clogf" + +if [ "$HIDE_REDHAT" = "1" ]; then + grep -v -e "^- \[redhat\]" "$clogf" | + sed -e 's!\[Fedora\]!!g' > "$clogf.stripped" + cp "$clogf.stripped" "$clogf" +fi + +if [ "$HIDE_UNSUPPORTED_ARCH" = "1" ]; then + grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.stripped" + cp "$clogf.stripped" "$clogf" +fi + +# If the markers aren't the same then this a rebase. +# This means we need to zap entries that are already present in the changelog. +if [ "$MARKER" != "$LAST_MARKER" ]; then + # awk trick to get all unique lines + awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique" + # sed trick to get the end of the changelog minus the line + sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp" + # Add an explicit entry to indicate a rebase. + echo "" > "$clogf" + echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf" + rm "$clogf.tmp" "$clogf.unique" +fi + +# HACK temporary hack until single tree workflow +# Don't reprint all the ark-patches again. +if [ -n "$(git log --oneline --first-parent --grep="Merge ark patches" "$lasttag"..)" ]; then + # Throw away the clogf and just print the summary merge + echo "" > "$clogf" + echo "- Merge ark-patches" >> "$clogf" +fi + +# during rh-dist-git genspec runs again and generates empty changelog +# create empty file to avoid adding extra header to changelog +LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') +if [ "$LENGTH" = 0 ]; then + rm -f "$clogf" + touch "$clogf" +fi + +cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" +mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" + +# genlog.py generates Resolves lines as well, strip these from RPM changelog +grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped + +test -f "$SOURCES/$SPECFILE" && + sed -i -e " + /%%SPECCHANGELOG%%/r $clogf.stripped + /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" + +echo "MARKER is $MARKER" + +rm -f "$clogf"{,.stripped}; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -1,16 +1,6 @@ #!/bin/bash # shellcheck disable=SC2153 -LAST_MARKER=$(cat "${REDHAT}"/marker) -clogf="$SOURCES/changelog" -# hide [redhat] entries from changelog -HIDE_REDHAT=1; -# hide entries for unsupported arches -HIDE_UNSUPPORTED_ARCH=1; -# override LC_TIME to avoid date conflicts when building the srpm -LC_TIME= -# STAMP=$(echo $MARKER | cut -f 1 -d '-' | sed -e "s/v//"); # unused - UPSTREAM=$(git rev-parse -q --verify origin/"${UPSTREAM_BRANCH}" || \ git rev-parse -q --verify "${UPSTREAM_BRANCH}") @@ -97,83 +87,7 @@ if [ -n "$RHSELFTESTDATA" ]; then exit 0 fi -GIT_FORMAT="--format=- %s (%an)%n%N%n^^^NOTES-END^^^%n%b" -GIT_NOTES="--notes=refs/notes/${RHEL_MAJOR}.${RHEL_MINOR}*" - -lasttag=$(git rev-list --first-parent --grep="^\[redhat\] kernel-${SPECKVERSION}.${SPECKPATCHLEVEL}" --max-count=1 HEAD) -# if we didn't find the proper tag, assume this is the first release -if [[ -z $lasttag ]]; then -if [[ -z ${MARKER//[
[OS-BUILD PATCHv5 0/9] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 This series try to improve the changelog generation process done during a dist-release target run. To avoid doing hacks and having to run setup-source/genspec.sh twice, this series splits the changelog creation from genspec.sh and changes the Makefile to use the splitted code. Signed-off-by: Herton R. Krzesinski --- redhat/self-test/2001-dist-release.bats | 1 - redhat/Makefile | 16 +++--- redhat/genlog.sh| 63 + redhat/genspec.sh | 81 +--- 4 files changed, 74 insertions(+), 87 deletions(-) ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv4 0/8] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980#note_1067946428 Ok I'll rework the changelog entry. About the Resolves line, it's kept only in the kernel.changelog file, the rpm/dist-git should have it removed. We need to keep the Resolves line in the redhat/kernel.changelog* since it's later used. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv4 0/8] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980#note_1067924279 I did a simulation here, using following steps, inside a kernel-ark checkout: ``` git checkout -b tmp b4f81e09279e3c37243c35a40947bab779eabd55 git merge split-loggen # this is my branch with changes of this MR make LOCALVERSION="" dist-release git merge origin/master make LOCALVERSION="" dist-release ``` And this is the result of the last release commit with just the master merge: ``` $ git show -p f4a834d051e7cf13707b42475355cd79b79d2533 commit f4a834d051e7cf13707b42475355cd79b79d2533 (HEAD -> tmp) Author: Herton R. Krzesinski Date: Wed Aug 17 12:50:22 2022 -0300 [redhat] kernel-6.0.0-0.rc1.3cc40a443a04.15 Signed-off-by: Herton R. Krzesinski diff --git a/Makefile.rhelver b/Makefile.rhelver index 5e65c2fc923e..39d4dc1fe57d 100644 --- a/Makefile.rhelver +++ b/Makefile.rhelver @@ -12,7 +12,7 @@ RHEL_MINOR = 99 # # Use this spot to avoid future merge conflicts. # Do not trim this comment. -RHEL_RELEASE = 14 +RHEL_RELEASE = 15 # # ZSTREAM diff --git a/redhat/kernel.changelog-9.99 b/redhat/kernel.changelog-9.99 index 8d861210ed9e..337912c32c5f 100644 --- a/redhat/kernel.changelog-9.99 +++ b/redhat/kernel.changelog-9.99 @@ -1,3 +1,7 @@ +* Wed Aug 17 2022 Herton R. Krzesinski [6.0.0-0.rc1.3cc40a443a04.15] +- 3cc40a443a04 rebase +Resolves: + * Wed Aug 17 2022 Herton R. Krzesinski [6.0.0-0.rc1.14] - redhat: fix dist-release build number test (Herton R. Krzesinski) - redhat: fix release number bump when dist-release-changed runs (Herton R. Krzesinski) diff --git a/redhat/marker b/redhat/marker index 60cf3a175526..6fa36a12cba0 100644 --- a/redhat/marker +++ b/redhat/marker @@ -1 +1 @@ -v6.0-rc1 +3cc40a443a04 ``` ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv4 0/8] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980#note_1067764364 Yes, the solution is to verify a temporary changelog instead of changing/reverting/changing again using the Makefile target hacks: so genlog.py always creates a header (the rpm changelog header for the changes with the author and timestamp) plus a Resolves line, plus a blank line. Thus that's 3 lines and why the check uses wc, so if there is only that, there are no changes, and we use that to check for changes. Also due ark rebases there is also the marker check. I see genlog.sh vs .py might be confusing, but didn't have a better name. Moving all code into python also may not be desirable, the python part does a good job of parsing the git changelog (it replaced the previous awk script we had), but the other stuff seems better to be handled through shell. And yes, genlog.py is only called by genlog.sh. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv4 0/8] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980#note_1067615447 Yes, we call genlog.sh twice, part of the check to see if there are changes and if we need a release bump/commit. What is not called anymore twice is the full genspec.sh/setup-source target. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH 0/2] RHMAINTAINERS: Add new maintainers for Automotive
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1989#note_1066767563 I expect once MR above you mention is merged to documentation tree, Prarit will later sync with ark and you then don't need this MR for kernel-ark, @prarit is this corect? ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv4 0/8] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980#note_1065030651 Noticed a small error where marker would not updated, so did a new pushed with it fixed. ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 6/8] redhat: use new genlog.sh script to detect changes for dist-release
From: Herton R. Krzesinski 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 diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -572,18 +572,18 @@ dist-rpm-baseonly: dist-sources do-rpmbuild # unless you know what you're doing, you don't want to use the next four ones dist-release-finish: setup-source @cp $(SOURCES)/$(SPECCHANGELOG) $(REDHAT)/$(SPECCHANGELOG) + @echo $(MARKER) > $(REDHAT)/marker @$(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)"; \ + 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@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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 7/8] redhat: fix release number bump when dist-release-changed runs
From: Herton R. Krzesinski redhat: fix release number bump when dist-release-changed runs Right now inside the dist-release-changed target, we run a sub make invocation calling the dist-release-finish target, after bumping the release number with new_release.sh. The problem is that the BUILD number still pointed to the old pre-bump number inside the dist-release-finish invocation, and the problem is that we don't reload the RHEL_RELEASE number in redhat/Makefile if BUILD is already defined. Since it looks like that check was added to avoid overriding the BUILD number set when RHSELFTESTDATA is defined, lets change the if check there so BUILD has the updated value when dist-release-finish runs through dist-release-changed. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -58,7 +58,7 @@ SPECKPATCHLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^PATCHLEVEL\ = SPECKSUBLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^SUBLEVEL\ =\ /{s///;p;q}') SPECKEXTRAVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^EXTRAVERSION\ =\ /{s///;p;q}') GITID:= $(shell $(GIT) log --max-count=1 --pretty=format:%H $(HEAD)) -ifndef BUILD +ifndef RHSELFTESTDATA BUILD:=$(RHEL_RELEASE) endif FLAVOR= -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 8/8] redhat: fix dist-release build number test
From: Herton R. Krzesinski redhat: fix dist-release build number test Since previous commit, when fixing the build number bump, this test will fail, now the build number and package release number should match as this test was intended to check. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/self-test/2001-dist-release.bats b/redhat/self-test/2001-dist-release.bats index blahblah..blahblah 100644 --- a/redhat/self-test/2001-dist-release.bats +++ b/redhat/self-test/2001-dist-release.bats @@ -43,7 +43,6 @@ _dist-release_test_2() { # Strip off ...kernel-VV.PP.SS-: pkgrelease=${title##*kernel-+([5-9]).+([0-9]).+([0-9])-} build=$(BUILD= DIST=.fc33 make dist-dump-variables | grep -E "^BUILD=" | cut -d"=" -f2 | xargs) - ((build--)) echo "pkgrelease=$pkgrelease" echo "build=$build" run _dist-release_test_2 -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 5/8] redhat: move changelog addition to the spec file back into genspec.sh
From: Herton R. Krzesinski redhat: move changelog addition to the spec file back into genspec.sh In the next change, we want to detect at the Makefile level if we have new changelog entries before we touch the spec file, so it makes sense to have changelog addition being done in genspec.sh. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -36,13 +36,13 @@ git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ if [ "$HIDE_REDHAT" = "1" ]; then grep -v -e "^- \[redhat\]" "$clogf" | - sed -e 's!\[Fedora\]!!g' > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + sed -e 's!\[Fedora\]!!g' > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi if [ "$HIDE_UNSUPPORTED_ARCH" = "1" ]; then - grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi # If the markers aren't the same then this a rebase. @@ -60,17 +60,4 @@ if [ "$LENGTH" = 0 ]; then echo -n > "$clogf" fi -cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" -mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" - -# genlog.py generates Resolves lines as well, strip these from RPM changelog -grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped - -test -f "$SOURCES/$SPECFILE" && - sed -i -e " - /%%SPECCHANGELOG%%/r $clogf.stripped - /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" - echo "MARKER is $MARKER" - -rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -88,9 +88,20 @@ if [ -n "$RHSELFTESTDATA" ]; then fi clogf=$(mktemp) -trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +trap 'rm -f "$clogf" "$clogf".stripped' SIGHUP SIGINT SIGTERM EXIT "${0%/*}"/genlog.sh "$clogf" +cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" +mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" + +# genlog.py generates Resolves lines as well, strip these from RPM changelog +grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped + +test -f "$SOURCES/$SPECFILE" && + sed -i -e " + /%%SPECCHANGELOG%%/r $clogf.stripped + /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" + if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 4/8] redhat: always add a rebase entry when ark merges from upstream
From: Herton R. Krzesinski redhat: always add a rebase entry when ark merges from upstream We have some complex logic to parse changelog entries to choose whether we add a rebase entry or not to the changelog. Since genlog.py is adding a Resolves entry always now, simply replace that logic with a replacement using sed to add a rebase entry when the markers differ. The marker check doesn't work at the moment due Makefile logic but that will be fixed in the following changes. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -48,14 +48,9 @@ fi # If the markers aren't the same then this a rebase. # This means we need to zap entries that are already present in the changelog. if [ "$MARKER" != "$LAST_MARKER" ]; then - # awk trick to get all unique lines - awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique" - # sed trick to get the end of the changelog minus the line - sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp" - # Add an explicit entry to indicate a rebase. - echo "" > "$clogf" - echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf" - rm "$clogf.tmp" "$clogf.unique" + # genlog.py always adds a Resolves: line, thus we + # can insert the rebase changelog item before it + sed -i "s/\(^Resolves:.*\)/- $MARKER rebase\n\1/" "$clogf" fi # during rh-dist-git genspec runs again and generates empty changelog -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 2/8] redhat: don't hardcode temporary changelog file
From: Herton R. Krzesinski redhat: don't hardcode temporary changelog file We always create a changelog file inside the sources directory, which is temporary and always deleted at the end. Instead hardcoding the temporary file name, create a real temporary file to be used with genlog.sh script, given as its first argument. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -1,7 +1,7 @@ #!/bin/bash LAST_MARKER=$(cat "${REDHAT}"/marker) -clogf="$SOURCES/changelog" +clogf="$1" # hide [redhat] entries from changelog HIDE_REDHAT=1; # hide entries for unsupported arches @@ -70,8 +70,7 @@ fi # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') if [ "$LENGTH" = 0 ]; then - rm -f "$clogf" - touch "$clogf" + echo -n > "$clogf" fi cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" @@ -87,4 +86,4 @@ test -f "$SOURCES/$SPECFILE" && echo "MARKER is $MARKER" -rm -f "$clogf"{,.stripped}; +rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -87,7 +87,9 @@ if [ -n "$RHSELFTESTDATA" ]; then exit 0 fi -"${0%/*}"/genlog.sh +clogf=$(mktemp) +trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +"${0%/*}"/genlog.sh "$clogf" if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 3/8] redhat: drop merge ark patches hack
From: Herton R. Krzesinski redhat: drop merge ark patches hack Changelog generation carries a temporary hack to add a merge ark-patches entry in the changelog. I think we can drop this today. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -58,14 +58,6 @@ if [ "$MARKER" != "$LAST_MARKER" ]; then rm "$clogf.tmp" "$clogf.unique" fi -# HACK temporary hack until single tree workflow -# Don't reprint all the ark-patches again. -if [ -n "$(git log --oneline --first-parent --grep="Merge ark patches" "$lasttag"..)" ]; then - # Throw away the clogf and just print the summary merge - echo "" > "$clogf" - echo "- Merge ark-patches" >> "$clogf" -fi - # during rh-dist-git genspec runs again and generates empty changelog # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 0/8] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 This series try to improve the changelog generation process done during a dist-release target run. To avoid doing hacks and having to run setup-source/genspec.sh twice, this series splits the changelog creation from genspec.sh and changes the Makefile to use the splitted code. Signed-off-by: Herton R. Krzesinski --- redhat/self-test/2001-dist-release.bats | 1 - redhat/Makefile | 16 +++--- redhat/genlog.sh| 63 + redhat/genspec.sh | 81 +--- 4 files changed, 74 insertions(+), 87 deletions(-) ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv4 1/8] redhat: split changelog generation from genspec.sh
From: Herton R. Krzesinski redhat: split changelog generation from genspec.sh This creates a new genlog.sh script to split out the changelog generation code from genspec.sh. The splitted code is kept as is. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh new file mode 100755 index blahblah..blahblah 100755 --- /dev/null +++ b/redhat/genlog.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +LAST_MARKER=$(cat "${REDHAT}"/marker) +clogf="$SOURCES/changelog" +# hide [redhat] entries from changelog +HIDE_REDHAT=1; +# hide entries for unsupported arches +HIDE_UNSUPPORTED_ARCH=1; +# override LC_TIME to avoid date conflicts when building the srpm +LC_TIME= + +GIT_FORMAT="--format=- %s (%an)%n%N%n^^^NOTES-END^^^%n%b" +GIT_NOTES="--notes=refs/notes/${RHEL_MAJOR}.${RHEL_MINOR}*" + +lasttag=$(git rev-list --first-parent --grep="^\[redhat\] kernel-${SPECKVERSION}.${SPECKPATCHLEVEL}" --max-count=1 HEAD) +# if we didn't find the proper tag, assume this is the first release +if [[ -z $lasttag ]]; then +if [[ -z ${MARKER//[0-9a-f]/} ]]; then +# if we're doing an untagged release, just use the marker +echo "Using $MARKER" +lasttag=$MARKER +else + lasttag=$(git describe --match="$MARKER" --abbrev=0) +fi +fi +echo "Gathering new log entries since $lasttag" +# master is expected to track mainline. + +cname="$(git var GIT_COMMITTER_IDENT |sed 's/>.*/>/')" +cdate="$(LC_ALL=C date +"%a %b %d %Y")" +cversion="[$BASEVERSION]"; +echo "* $cdate $cname $cversion" > "$clogf" + +git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ + ^"${UPSTREAM}" "$lasttag".. -- ':!/redhat/rhdocs' | "${0%/*}"/genlog.py >> "$clogf" + +if [ "$HIDE_REDHAT" = "1" ]; then + grep -v -e "^- \[redhat\]" "$clogf" | + sed -e 's!\[Fedora\]!!g' > "$clogf.stripped" + cp "$clogf.stripped" "$clogf" +fi + +if [ "$HIDE_UNSUPPORTED_ARCH" = "1" ]; then + grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.stripped" + cp "$clogf.stripped" "$clogf" +fi + +# If the markers aren't the same then this a rebase. +# This means we need to zap entries that are already present in the changelog. +if [ "$MARKER" != "$LAST_MARKER" ]; then + # awk trick to get all unique lines + awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique" + # sed trick to get the end of the changelog minus the line + sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp" + # Add an explicit entry to indicate a rebase. + echo "" > "$clogf" + echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf" + rm "$clogf.tmp" "$clogf.unique" +fi + +# HACK temporary hack until single tree workflow +# Don't reprint all the ark-patches again. +if [ -n "$(git log --oneline --first-parent --grep="Merge ark patches" "$lasttag"..)" ]; then + # Throw away the clogf and just print the summary merge + echo "" > "$clogf" + echo "- Merge ark-patches" >> "$clogf" +fi + +# during rh-dist-git genspec runs again and generates empty changelog +# create empty file to avoid adding extra header to changelog +LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') +if [ "$LENGTH" = 0 ]; then + rm -f "$clogf" + touch "$clogf" +fi + +cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" +mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" + +# genlog.py generates Resolves lines as well, strip these from RPM changelog +grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped + +test -f "$SOURCES/$SPECFILE" && + sed -i -e " + /%%SPECCHANGELOG%%/r $clogf.stripped + /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" + +echo "MARKER is $MARKER" + +rm -f "$clogf"{,.stripped}; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -1,16 +1,6 @@ #!/bin/bash # shellcheck disable=SC2153 -LAST_MARKER=$(cat "${REDHAT}"/marker) -clogf="$SOURCES/changelog" -# hide [redhat] entries from changelog -HIDE_REDHAT=1; -# hide entries for unsupported arches -HIDE_UNSUPPORTED_ARCH=1; -# override LC_TIME to avoid date conflicts when building the srpm -LC_TIME= -# STAMP=$(echo $MARKER | cut -f 1 -d '-' | sed -e "s/v//"); # unused - UPSTREAM=$(git rev-parse -q --verify origin/"${UPSTREAM_BRANCH}" || \ git rev-parse -q --verify "${UPSTREAM_BRANCH}") @@ -97,83 +87,7 @@ if [ -n "$RHSELFTESTDATA" ]; then exit 0 fi -GIT_FORMAT="--format=- %s (%an)%n%N%n^^^NOTES-END^^^%n%b" -GIT_NOTES="--notes=refs/notes/${RHEL_MAJOR}.${RHEL_MINOR}*" - -lasttag=$(git rev-list --first-parent --grep="^\[redhat\] kernel-${SPECKVERSION}.${SPECKPATCHLEVEL}" --max-count=1 HEAD) -# if we didn't find the proper tag, assume this is the first release -if [[ -z $lasttag ]]; then -if [[ -z ${MARKER//[
[OS-BUILD PATCHv3 8/8] redhat: fix dist-release build number test
From: Herton R. Krzesinski redhat: fix dist-release build number test Since previous commit, when fixing the build number bump, this test will fail, now the build number and package release number should match as this test was intended to check. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/self-test/2001-dist-release.bats b/redhat/self-test/2001-dist-release.bats index blahblah..blahblah 100644 --- a/redhat/self-test/2001-dist-release.bats +++ b/redhat/self-test/2001-dist-release.bats @@ -43,7 +43,6 @@ _dist-release_test_2() { # Strip off ...kernel-VV.PP.SS-: pkgrelease=${title##*kernel-+([5-9]).+([0-9]).+([0-9])-} build=$(BUILD= DIST=.fc33 make dist-dump-variables | grep -E "^BUILD=" | cut -d"=" -f2 | xargs) - ((build--)) echo "pkgrelease=$pkgrelease" echo "build=$build" run _dist-release_test_2 -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 7/8] redhat: fix release number bump when dist-release-changed runs
From: Herton R. Krzesinski redhat: fix release number bump when dist-release-changed runs Right now inside the dist-release-changed target, we run a sub make invocation calling the dist-release-finish target, after bumping the release number with new_release.sh. The problem is that the BUILD number still pointed to the old pre-bump number inside the dist-release-finish invocation, and the problem is that we don't reload the RHEL_RELEASE number in redhat/Makefile if BUILD is already defined. Since it looks like that check was added to avoid overriding the BUILD number set when RHSELFTESTDATA is defined, lets change the if check there so BUILD has the updated value when dist-release-finish runs through dist-release-changed. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -58,7 +58,7 @@ SPECKPATCHLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^PATCHLEVEL\ = SPECKSUBLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^SUBLEVEL\ =\ /{s///;p;q}') SPECKEXTRAVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^EXTRAVERSION\ =\ /{s///;p;q}') GITID:= $(shell $(GIT) log --max-count=1 --pretty=format:%H $(HEAD)) -ifndef BUILD +ifndef RHSELFTESTDATA BUILD:=$(RHEL_RELEASE) endif FLAVOR= -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 6/8] redhat: use new genlog.sh script to detect changes for dist-release
From: Herton R. Krzesinski 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 diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -575,15 +575,14 @@ 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)"; \ + 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@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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 5/8] redhat: move changelog addition to the spec file back into genspec.sh
From: Herton R. Krzesinski redhat: move changelog addition to the spec file back into genspec.sh In the next change, we want to detect at the Makefile level if we have new changelog entries before we touch the spec file, so it makes sense to have changelog addition being done in genspec.sh. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -36,13 +36,13 @@ git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ if [ "$HIDE_REDHAT" = "1" ]; then grep -v -e "^- \[redhat\]" "$clogf" | - sed -e 's!\[Fedora\]!!g' > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + sed -e 's!\[Fedora\]!!g' > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi if [ "$HIDE_UNSUPPORTED_ARCH" = "1" ]; then - grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi # If the markers aren't the same then this a rebase. @@ -60,17 +60,4 @@ if [ "$LENGTH" = 0 ]; then echo -n > "$clogf" fi -cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" -mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" - -# genlog.py generates Resolves lines as well, strip these from RPM changelog -grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped - -test -f "$SOURCES/$SPECFILE" && - sed -i -e " - /%%SPECCHANGELOG%%/r $clogf.stripped - /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" - echo "MARKER is $MARKER" - -rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -88,9 +88,20 @@ if [ -n "$RHSELFTESTDATA" ]; then fi clogf=$(mktemp) -trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +trap 'rm -f "$clogf" "$clogf".stripped' SIGHUP SIGINT SIGTERM EXIT "${0%/*}"/genlog.sh "$clogf" +cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" +mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" + +# genlog.py generates Resolves lines as well, strip these from RPM changelog +grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped + +test -f "$SOURCES/$SPECFILE" && + sed -i -e " + /%%SPECCHANGELOG%%/r $clogf.stripped + /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" + if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 1/8] redhat: split changelog generation from genspec.sh
From: Herton R. Krzesinski redhat: split changelog generation from genspec.sh This creates a new genlog.sh script to split out the changelog generation code from genspec.sh. The splitted code is kept as is. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh new file mode 100755 index blahblah..blahblah 100755 --- /dev/null +++ b/redhat/genlog.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +LAST_MARKER=$(cat "${REDHAT}"/marker) +clogf="$SOURCES/changelog" +# hide [redhat] entries from changelog +HIDE_REDHAT=1; +# hide entries for unsupported arches +HIDE_UNSUPPORTED_ARCH=1; +# override LC_TIME to avoid date conflicts when building the srpm +LC_TIME= + +GIT_FORMAT="--format=- %s (%an)%n%N%n^^^NOTES-END^^^%n%b" +GIT_NOTES="--notes=refs/notes/${RHEL_MAJOR}.${RHEL_MINOR}*" + +lasttag=$(git rev-list --first-parent --grep="^\[redhat\] kernel-${SPECKVERSION}.${SPECKPATCHLEVEL}" --max-count=1 HEAD) +# if we didn't find the proper tag, assume this is the first release +if [[ -z $lasttag ]]; then +if [[ -z ${MARKER//[0-9a-f]/} ]]; then +# if we're doing an untagged release, just use the marker +echo "Using $MARKER" +lasttag=$MARKER +else + lasttag=$(git describe --match="$MARKER" --abbrev=0) +fi +fi +echo "Gathering new log entries since $lasttag" +# master is expected to track mainline. + +cname="$(git var GIT_COMMITTER_IDENT |sed 's/>.*/>/')" +cdate="$(LC_ALL=C date +"%a %b %d %Y")" +cversion="[$BASEVERSION]"; +echo "* $cdate $cname $cversion" > "$clogf" + +git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ + ^"${UPSTREAM}" "$lasttag".. -- ':!/redhat/rhdocs' | "${0%/*}"/genlog.py >> "$clogf" + +if [ "$HIDE_REDHAT" = "1" ]; then + grep -v -e "^- \[redhat\]" "$clogf" | + sed -e 's!\[Fedora\]!!g' > "$clogf.stripped" + cp "$clogf.stripped" "$clogf" +fi + +if [ "$HIDE_UNSUPPORTED_ARCH" = "1" ]; then + grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.stripped" + cp "$clogf.stripped" "$clogf" +fi + +# If the markers aren't the same then this a rebase. +# This means we need to zap entries that are already present in the changelog. +if [ "$MARKER" != "$LAST_MARKER" ]; then + # awk trick to get all unique lines + awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique" + # sed trick to get the end of the changelog minus the line + sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp" + # Add an explicit entry to indicate a rebase. + echo "" > "$clogf" + echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf" + rm "$clogf.tmp" "$clogf.unique" +fi + +# HACK temporary hack until single tree workflow +# Don't reprint all the ark-patches again. +if [ -n "$(git log --oneline --first-parent --grep="Merge ark patches" "$lasttag"..)" ]; then + # Throw away the clogf and just print the summary merge + echo "" > "$clogf" + echo "- Merge ark-patches" >> "$clogf" +fi + +# during rh-dist-git genspec runs again and generates empty changelog +# create empty file to avoid adding extra header to changelog +LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') +if [ "$LENGTH" = 0 ]; then + rm -f "$clogf" + touch "$clogf" +fi + +cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" +mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" + +# genlog.py generates Resolves lines as well, strip these from RPM changelog +grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped + +test -f "$SOURCES/$SPECFILE" && + sed -i -e " + /%%SPECCHANGELOG%%/r $clogf.stripped + /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" + +echo "MARKER is $MARKER" + +rm -f "$clogf"{,.stripped}; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -1,16 +1,6 @@ #!/bin/bash # shellcheck disable=SC2153 -LAST_MARKER=$(cat "${REDHAT}"/marker) -clogf="$SOURCES/changelog" -# hide [redhat] entries from changelog -HIDE_REDHAT=1; -# hide entries for unsupported arches -HIDE_UNSUPPORTED_ARCH=1; -# override LC_TIME to avoid date conflicts when building the srpm -LC_TIME= -# STAMP=$(echo $MARKER | cut -f 1 -d '-' | sed -e "s/v//"); # unused - UPSTREAM=$(git rev-parse -q --verify origin/"${UPSTREAM_BRANCH}" || \ git rev-parse -q --verify "${UPSTREAM_BRANCH}") @@ -97,83 +87,7 @@ if [ -n "$RHSELFTESTDATA" ]; then exit 0 fi -GIT_FORMAT="--format=- %s (%an)%n%N%n^^^NOTES-END^^^%n%b" -GIT_NOTES="--notes=refs/notes/${RHEL_MAJOR}.${RHEL_MINOR}*" - -lasttag=$(git rev-list --first-parent --grep="^\[redhat\] kernel-${SPECKVERSION}.${SPECKPATCHLEVEL}" --max-count=1 HEAD) -# if we didn't find the proper tag, assume this is the first release -if [[ -z $lasttag ]]; then -if [[ -z ${MARKER//[
[OS-BUILD PATCHv3 4/8] redhat: always add a rebase entry when ark merges from upstream
From: Herton R. Krzesinski redhat: always add a rebase entry when ark merges from upstream We have some complex logic to parse changelog entries to choose whether we add a rebase entry or not to the changelog. Since genlog.py is adding a Resolves entry always now, simply replace that logic with a replacement using sed to add a rebase entry when the markers differ. The marker check doesn't work at the moment due Makefile logic but that will be fixed in the following changes. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -48,14 +48,9 @@ fi # If the markers aren't the same then this a rebase. # This means we need to zap entries that are already present in the changelog. if [ "$MARKER" != "$LAST_MARKER" ]; then - # awk trick to get all unique lines - awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique" - # sed trick to get the end of the changelog minus the line - sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp" - # Add an explicit entry to indicate a rebase. - echo "" > "$clogf" - echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf" - rm "$clogf.tmp" "$clogf.unique" + # genlog.py always adds a Resolves: line, thus we + # can insert the rebase changelog item before it + sed -i "s/\(^Resolves:.*\)/- $MARKER rebase\n\1/" "$clogf" fi # during rh-dist-git genspec runs again and generates empty changelog -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 3/8] redhat: drop merge ark patches hack
From: Herton R. Krzesinski redhat: drop merge ark patches hack Changelog generation carries a temporary hack to add a merge ark-patches entry in the changelog. I think we can drop this today. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -58,14 +58,6 @@ if [ "$MARKER" != "$LAST_MARKER" ]; then rm "$clogf.tmp" "$clogf.unique" fi -# HACK temporary hack until single tree workflow -# Don't reprint all the ark-patches again. -if [ -n "$(git log --oneline --first-parent --grep="Merge ark patches" "$lasttag"..)" ]; then - # Throw away the clogf and just print the summary merge - echo "" > "$clogf" - echo "- Merge ark-patches" >> "$clogf" -fi - # during rh-dist-git genspec runs again and generates empty changelog # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 2/8] redhat: don't hardcode temporary changelog file
From: Herton R. Krzesinski redhat: don't hardcode temporary changelog file We always create a changelog file inside the sources directory, which is temporary and always deleted at the end. Instead hardcoding the temporary file name, create a real temporary file to be used with genlog.sh script, given as its first argument. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -1,7 +1,7 @@ #!/bin/bash LAST_MARKER=$(cat "${REDHAT}"/marker) -clogf="$SOURCES/changelog" +clogf="$1" # hide [redhat] entries from changelog HIDE_REDHAT=1; # hide entries for unsupported arches @@ -70,8 +70,7 @@ fi # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') if [ "$LENGTH" = 0 ]; then - rm -f "$clogf" - touch "$clogf" + echo -n > "$clogf" fi cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" @@ -87,4 +86,4 @@ test -f "$SOURCES/$SPECFILE" && echo "MARKER is $MARKER" -rm -f "$clogf"{,.stripped}; +rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -87,7 +87,9 @@ if [ -n "$RHSELFTESTDATA" ]; then exit 0 fi -"${0%/*}"/genlog.sh +clogf=$(mktemp) +trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +"${0%/*}"/genlog.sh "$clogf" if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 0/8] ark: rework changelog generation process during dist-release
From: Herton R. Krzesinski on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 This series try to improve the changelog generation process done during a dist-release target run. To avoid doing hacks and having to run setup-source/genspec.sh twice, this series splits the changelog creation from genspec.sh and changes the Makefile to use the splitted code. Signed-off-by: Herton R. Krzesinski --- redhat/self-test/2001-dist-release.bats | 1 - redhat/Makefile | 15 ++--- redhat/genlog.sh| 63 + redhat/genspec.sh | 81 +--- 4 files changed, 73 insertions(+), 87 deletions(-) ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 4/8] redhat: always add a rebase entry when ark merges from upstream
From: Herton R. Krzesinski redhat: always add a rebase entry when ark merges from upstream We have some complex logic to parse changelog entries to choose whether we add a rebase entry or not to the changelog. Since genlog.py is adding a Resolves entry always now, simply replace that logic with a replacement using sed to add a rebase entry when the markers differ. The marker check doesn't work at the moment due Makefile logic but that will be fixed in the following changes. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -48,14 +48,9 @@ fi # If the markers aren't the same then this a rebase. # This means we need to zap entries that are already present in the changelog. if [ "$MARKER" != "$LAST_MARKER" ]; then - # awk trick to get all unique lines - awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique" - # sed trick to get the end of the changelog minus the line - sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp" - # Add an explicit entry to indicate a rebase. - echo "" > "$clogf" - echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf" - rm "$clogf.tmp" "$clogf.unique" + # genlog.py always adds a Resolves: line, thus we + # can insert the rebase changelog item before it + sed -i "s/\(^Resolves:.*\)/- $MARKER rebase\n\1/" "$clogf" fi # during rh-dist-git genspec runs again and generates empty changelog -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 8/8] redhat: fix dist-release build number test
From: Herton R. Krzesinski redhat: fix dist-release build number test Since previous commit, when fixing the build number bump, this test will fail, now the build number and package release number should match as this test was intended to check. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/self-test/2001-dist-release.bats b/redhat/self-test/2001-dist-release.bats index blahblah..blahblah 100644 --- a/redhat/self-test/2001-dist-release.bats +++ b/redhat/self-test/2001-dist-release.bats @@ -43,7 +43,6 @@ _dist-release_test_2() { # Strip off ...kernel-VV.PP.SS-: pkgrelease=${title##*kernel-+([5-9]).+([0-9]).+([0-9])-} build=$(BUILD= DIST=.fc33 make dist-dump-variables | grep -E "^BUILD=" | cut -d"=" -f2 | xargs) - ((build--)) echo "pkgrelease=$pkgrelease" echo "build=$build" run _dist-release_test_2 -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 7/8] redhat: fix release number bump when dist-release-changed runs
From: Herton R. Krzesinski redhat: fix release number bump when dist-release-changed runs Right now inside the dist-release-changed target, we run a sub make invocation calling the dist-release-finish target, after bumping the release number with new_release.sh. The problem is that the BUILD number still pointed to the old pre-bump number inside the dist-release-finish invocation, and the problem is that we don't reload the RHEL_RELEASE number in redhat/Makefile if BUILD is already defined. Since it looks like that check was added to avoid overriding the BUILD number set when RHSELFTESTDATA is defined, lets change the if check there so BUILD has the updated value when dist-release-finish runs through dist-release-changed. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -58,7 +58,7 @@ SPECKPATCHLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^PATCHLEVEL\ = SPECKSUBLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^SUBLEVEL\ =\ /{s///;p;q}') SPECKEXTRAVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^EXTRAVERSION\ =\ /{s///;p;q}') GITID:= $(shell $(GIT) log --max-count=1 --pretty=format:%H $(HEAD)) -ifndef BUILD +ifndef RHSELFTESTDATA BUILD:=$(RHEL_RELEASE) endif FLAVOR= -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 6/8] redhat: use new genlog.sh script to detect changes for dist-release
From: Herton R. Krzesinski 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 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@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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 3/8] redhat: drop merge ark patches hack
From: Herton R. Krzesinski redhat: drop merge ark patches hack Changelog generation carries a temporary hack to add a merge ark-patches entry in the changelog. I think we can drop this today. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -58,14 +58,6 @@ if [ "$MARKER" != "$LAST_MARKER" ]; then rm "$clogf.tmp" "$clogf.unique" fi -# HACK temporary hack until single tree workflow -# Don't reprint all the ark-patches again. -if [ -n "$(git log --oneline --first-parent --grep="Merge ark patches" "$lasttag"..)" ]; then - # Throw away the clogf and just print the summary merge - echo "" > "$clogf" - echo "- Merge ark-patches" >> "$clogf" -fi - # during rh-dist-git genspec runs again and generates empty changelog # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 5/8] redhat: move changelog addition to the spec file back into genspec.sh
From: Herton R. Krzesinski redhat: move changelog addition to the spec file back into genspec.sh In the next change, we want to detect at the Makefile level if we have new changelog entries before we touch the spec file, so it makes sense to have changelog addition being done in genspec.sh. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -36,13 +36,13 @@ git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ if [ "$HIDE_REDHAT" = "1" ]; then grep -v -e "^- \[redhat\]" "$clogf" | - sed -e 's!\[Fedora\]!!g' > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + sed -e 's!\[Fedora\]!!g' > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi if [ "$HIDE_UNSUPPORTED_ARCH" = "1" ]; then - grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.stripped" - cp "$clogf.stripped" "$clogf" + grep -E -v "^- \[(alpha|arc|arm|avr32|blackfin|c6x|cris|frv|h8300|hexagon|ia64|m32r|m68k|metag|microblaze|mips|mn10300|openrisc|parisc|score|sh|sparc|tile|um|unicore32|xtensa)\]" "$clogf" > "$clogf.tmp" + mv -f "$clogf.tmp" "$clogf" fi # If the markers aren't the same then this a rebase. @@ -60,17 +60,4 @@ if [ "$LENGTH" = 0 ]; then echo -n > "$clogf" fi -cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" -mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" - -# genlog.py generates Resolves lines as well, strip these from RPM changelog -grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped - -test -f "$SOURCES/$SPECFILE" && - sed -i -e " - /%%SPECCHANGELOG%%/r $clogf.stripped - /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" - echo "MARKER is $MARKER" - -rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -88,9 +88,20 @@ if [ -n "$RHSELFTESTDATA" ]; then fi clogf=$(mktemp) -trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +trap 'rm -f "$clogf" "$clogf".stripped' SIGHUP SIGINT SIGTERM EXIT "${0%/*}"/genlog.sh "$clogf" +cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" +mv -f "$clogf.full" "$SOURCES/$SPECCHANGELOG" + +# genlog.py generates Resolves lines as well, strip these from RPM changelog +grep -v -e "^Resolves: " "$SOURCES/$SPECCHANGELOG" > "$clogf".stripped + +test -f "$SOURCES/$SPECFILE" && + sed -i -e " + /%%SPECCHANGELOG%%/r $clogf.stripped + /%%SPECCHANGELOG%%/d" "$SOURCES/$SPECFILE" + if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 2/8] redhat: don't hardcode temporary changelog file
From: Herton R. Krzesinski redhat: don't hardcode temporary changelog file We always create a changelog file inside the sources directory, which is temporary and always deleted at the end. Instead hardcoding the temporary file name, create a real temporary file to be used with genlog.sh script, given as its first argument. Signed-off-by: Herton R. Krzesinski diff --git a/redhat/genlog.sh b/redhat/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/genlog.sh @@ -1,7 +1,7 @@ #!/bin/bash LAST_MARKER=$(cat "${REDHAT}"/marker) -clogf="$SOURCES/changelog" +clogf="$1" # hide [redhat] entries from changelog HIDE_REDHAT=1; # hide entries for unsupported arches @@ -70,8 +70,7 @@ fi # create empty file to avoid adding extra header to changelog LENGTH=$(grep -c "^-" "$clogf" | awk '{print $1}') if [ "$LENGTH" = 0 ]; then - rm -f "$clogf" - touch "$clogf" + echo -n > "$clogf" fi cat "$clogf" "$SOURCES/$SPECCHANGELOG" > "$clogf.full" @@ -87,4 +86,4 @@ test -f "$SOURCES/$SPECFILE" && echo "MARKER is $MARKER" -rm -f "$clogf"{,.stripped}; +rm -f "$clogf".stripped; diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -87,7 +87,9 @@ if [ -n "$RHSELFTESTDATA" ]; then exit 0 fi -"${0%/*}"/genlog.sh +clogf=$(mktemp) +trap 'rm -f "$clogf"' SIGHUP SIGINT SIGTERM EXIT +"${0%/*}"/genlog.sh "$clogf" if [ "$DISTRO" == "fedora" ]; then # The tarball in the SRPM contains only the upstream sources. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980 ___ 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, report it: https://pagure.io/fedora-infrastructure/new_issue