From: Herton R. Krzesinski <herton(a)redhat.com>
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 <jforbes(a)redhat.com>
Signed-off-by: Herton R. Krzesinski <herton(a)redhat.com>
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
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 <bmasney(a)redhat.com>
Signed-off-by: Herton R. Krzesinski <herton(a)redhat.com>
---
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(-)
Hi, we tested your kernel and here are the results:
Overall result: PASSED
Merge: OK
Compile: OK
Test: OK
Tested-by: CKI Project <cki-project(a)redhat.com>
Kernel information:
Brew / Koji Task ID: 110631052
You can find all the details about the test run at
https://datawarehouse.cki-project.org/kcidb/checkouts/119996
One or more kernel tests failed:
We also see the following known issues which are not related to your changes:
Issue: NFS Connectathon: SELinux prevents rpcbind
URL: https://bugzilla.redhat.com/1758147
Affected tests:
ppc64le - Filesystem - NFS Connectathon
x86_64 - Filesystem - NFS Connectathon
If you find a failure unrelated to your changes, please ask the test maintainer to review it.
This will prevent the failures from being incorrectly reported in the future.
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
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 <bmasney(a)redhat.com>
Signed-off-by: Herton R. Krzesinski <herton(a)redhat.com>
---
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(-)
From: Prarit Bhargava <prarit(a)redhat.com>
redhat/self-test: Remove --all from git query
It was reported that executing this test on an older tag failed. This
occurs because the git query to find the most recent "[redhat] kernel"
commit looks at the entire git history instead of the branch's history.
Removing the '--all' from the "[redhat] kernel" lookup resolves this
problem.
Testing:
There are 3 cases that I considered which all succeed with this change:
1. running on os-build or ark-latest
git co origin/os-build
RHEL_MAJOR=9 RHEL_MINOR=99 bats redhat/self-test/2001-dist-release.bats
2. a new branch based on os-build/ark-latest
git co origin/ark-latest
git checkout -b junk
/# make some changes
RHEL_MAJOR=9 RHEL_MINOR=99 bats redhat/self-test/2001-dist-release.bats
3. an older branch based on a tag
git co kernel-6.6.0-0.rc7.56567a20b22b.59
RHEL_MAJOR=9 RHEL_MINOR=99 bats redhat/self-test/2001-dist-release.bats
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
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
@@ -60,15 +60,20 @@ _dist-release_test_3() {
# Test whether the version in the commit message matches
# the version in the change log.
cd $BATS_TMPDIR/distrelease
+
# Extract just the version part (the part between [ ]) on the first line of
# the change log:
changelog=$(head -1 ./redhat/kernel.changelog-${RHEL_MAJOR}.${RHEL_MINOR} | sed -e 's/.*\[\(.*\)\].*/\1/')
- commit="$(git log --oneline --all --grep "\[redhat\] kernel" -n 1 --pretty="format:%s")"
+
+ # Extract the tag in the latest [redhat] kernel commit message
+ commit="$(git log --oneline --grep "\[redhat\] kernel" -n 1 --pretty="format:%s")"
# Extract just the commit message part AFTER "[redhat] ":
gitlog=${commit##*\[redhat\] }
# This time, strip off "kernel-" also:
gitlog=${gitlog/kernel-/}
+
echo "The kernel version in the changelog-${RHEL_MAJOR}.${RHEL_MINOR} ("${changelog}") differs from the version in the git log ($gitlog)"
+
run _dist-release_test_3
check_status
}
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2837