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