Re: [OS-BUILD PATCHv2] redhat: fix dist-git/upload for the kernel.changelog.xz file

2023-12-21 Thread Herton R. Krzesinski (via Email Bridge)
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


Re: [OS-BUILD PATCHv2] redhat: fix dist-git/upload for the kernel.changelog.xz file

2023-12-21 Thread Justin M. Forbes (via Email Bridge)
From: Justin M. Forbes on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2841#note_1704939342

Something perhaps worth considering in the longer term. Every time a binary
file changes, we must upload the entire file to the look aside (or dist-git
before this change).  I am wondering if a non compressed changelog would be
much less actual overhead as only a diff has to be stored with each update.
Perhaps it might be better to wait to compress during the rpmbuild itself so
that it is still compressed when installed with kernel-docs?  As RPMs and git
history is compressed, I think this might be the better method.
--
___
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

2023-12-21 Thread Herton R. Krzesinski (via Email Bridge)
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