From: Vitaly Kuznetsov on gitlab.com
Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2648
Be more picky about kernel's source code licenses:
- Keep track of all currently used license in specfile template.
- Add a selftest which checks all currently present license identifiers
against License:.
Signed-off-by: Vitaly Kuznetsov <vkuznets(a)redhat.com>
---
redhat/scripts/kspdx-tool/kspdx.py | 225 +++++++++++++++++++++++++++++++
redhat/self-test/1007-spdx-licenses.bats | 54 +++++++
redhat/Makefile | 10 +
redhat/kernel.spec.template | 9 +-
4 files changed, 290 insertions(+), 8 deletions(-)
From: Brian Masney <bmasney(a)redhat.com>
redhat/kernel.spec.template: update compression variables to support zstd
Upstream Status: RHEL Only
The kernel.spec.template file has a compression variable to define which
binary is used to compress the kernel modules. The binary is currently
invoked in the following manner: '%compression -c9'. There is a desire
to use zstd for automotive since it results in faster decompression,
and faster boot times. To support zstd, different flags need to be
passed to the compression binary, so let's introduce a compression_flags
variable.
The BuildRequires needs to be updated to include the compression
binary as well since these variables can be overridden on the command
line with "rpmbuild --define 'compression zstd' ...".
The zstd support was tested with the following configuration:
%global compression zstd
%global compression_flags --rm
%global compext zst
Note that the --stdout flag that's passed to the compression binary
works with bz2, gz, xz, and zstd.
Signed-off-by: Brian Masney <bmasney(a)redhat.com>
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
@@ -120,6 +120,7 @@ Summary: The Linux kernel
# Default compression algorithm
%global compression xz
+%global compression_flags --compress
%global compext xz
%if %{zipmodules}
%global zipsed -e 's/\.ko$/\.ko.%compext/'
@@ -659,7 +660,7 @@ Provides: installonlypkg(kernel)
# List the packages used during the kernel build
#
BuildRequires: kmod, bash, coreutils, tar, git-core, which
-BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk
+BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk, %compression
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++
BuildRequires: net-tools, hostname, bc, elfutils-devel
BuildRequires: dwarves
@@ -2115,7 +2116,7 @@ BuildKernel() {
# NOTENOTE: checksums to the rpm metadata provides list.
# NOTENOTE: if you change the symvers name, update the backend too
echo "**** GENERATING kernel ABI metadata ****"
- %compression -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext
+ %compression --stdout %compression_flags < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext
cp $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext $RPM_BUILD_ROOT/lib/modules/$KernelVer/symvers.%compext
%if %{with_kabichk}
@@ -2824,7 +2825,7 @@ find Documentation -type d | xargs chmod u+w
fi \
if [ "%{zipmodules}" -eq "1" ]; then \
echo "Compressing kernel modules ..." \
- find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 16 -P${RPM_BUILD_NCPUS} -r %compression; \
+ find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 16 -P${RPM_BUILD_NCPUS} -r %compression %compression_flags; \
fi \
%{nil}
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2650
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: 105195582
You can find all the details about the test run at
https://datawarehouse.cki-project.org/kcidb/checkouts/101264
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
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: Brian Masney <bmasney(a)redhat.com>
redhat/kernel.spec.template: update compression variables to support zstd
Upstream Status: RHEL Only
The kernel.spec.template file has a compression variable to define which
binary is used to compress the kernel modules. The binary is currently
invoked in the following manner: '%compression -c9'. There is a desire
to use zstd for automotive since it results in faster decompression,
and faster boot times. To support zstd, different flags need to be
passed to the compression binary, so let's introduce a compression_flags
variable.
The BuildRequires needs to be updated to include the compression
binary as well since these variables can be overridden on the command
line with "rpmbuild --define 'compression zstd' ...".
The zstd support was tested with the following configuration:
%global compression zstd
%global compression_flags --rm
%global compext zst
Note that the --stdout flag that's passed to the compression binary
works with bz2, gz, xz, and zstd.
Signed-off-by: Brian Masney <bmasney(a)redhat.com>
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
@@ -120,6 +120,7 @@ Summary: The Linux kernel
# Default compression algorithm
%global compression xz
+%global compression_flags
%global compext xz
%if %{zipmodules}
%global zipsed -e 's/\.ko$/\.ko.%compext/'
@@ -659,7 +660,7 @@ Provides: installonlypkg(kernel)
# List the packages used during the kernel build
#
BuildRequires: kmod, bash, coreutils, tar, git-core, which
-BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk
+BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk, %compression
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++
BuildRequires: net-tools, hostname, bc, elfutils-devel
BuildRequires: dwarves
@@ -2115,7 +2116,7 @@ BuildKernel() {
# NOTENOTE: checksums to the rpm metadata provides list.
# NOTENOTE: if you change the symvers name, update the backend too
echo "**** GENERATING kernel ABI metadata ****"
- %compression -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext
+ %compression --stdout %compression_flags < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext
cp $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext $RPM_BUILD_ROOT/lib/modules/$KernelVer/symvers.%compext
%if %{with_kabichk}
@@ -2824,7 +2825,7 @@ find Documentation -type d | xargs chmod u+w
fi \
if [ "%{zipmodules}" -eq "1" ]; then \
echo "Compressing kernel modules ..." \
- find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 16 -P${RPM_BUILD_NCPUS} -r %compression; \
+ find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 16 -P${RPM_BUILD_NCPUS} -r %compression %compression_flags; \
fi \
%{nil}
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2650
From: Brian Masney <bmasney(a)redhat.com>
redhat/kernel.spec.template: update compression variables to support zstd
Upstream Status: RHEL Only
The kernel.spec.template file has a compression variable to define which
binary is used to compress the kernel modules. The binary is currently
invoked in the following manner: '%compression -c9'. There is a desire
to use zstd for automotive since it results in faster decompression,
and faster boot times. To support zstd, different flags need to be
passed to the compression binary, so let's introduce a compression_flags
variable.
The BuildRequires needs to be updated to include the compression
binary as well since these variables can be overridden on the command
line with "rpmbuild --define 'compression zstd' ...".
The zstd support was tested with the following configuration:
%global compression zstd
%global compression_flags --rm
%global compext zst
Signed-off-by: Brian Masney <bmasney(a)redhat.com>
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
@@ -120,6 +120,7 @@ Summary: The Linux kernel
# Default compression algorithm
%global compression xz
+%global compression_flags -c9
%global compext xz
%if %{zipmodules}
%global zipsed -e 's/\.ko$/\.ko.%compext/'
@@ -659,7 +660,7 @@ Provides: installonlypkg(kernel)
# List the packages used during the kernel build
#
BuildRequires: kmod, bash, coreutils, tar, git-core, which
-BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk
+BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk, %compression
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++
BuildRequires: net-tools, hostname, bc, elfutils-devel
BuildRequires: dwarves
@@ -2115,7 +2116,7 @@ BuildKernel() {
# NOTENOTE: checksums to the rpm metadata provides list.
# NOTENOTE: if you change the symvers name, update the backend too
echo "**** GENERATING kernel ABI metadata ****"
- %compression -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext
+ %compression %compression_flags < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext
cp $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext $RPM_BUILD_ROOT/lib/modules/$KernelVer/symvers.%compext
%if %{with_kabichk}
@@ -2824,7 +2825,7 @@ find Documentation -type d | xargs chmod u+w
fi \
if [ "%{zipmodules}" -eq "1" ]; then \
echo "Compressing kernel modules ..." \
- find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 16 -P${RPM_BUILD_NCPUS} -r %compression; \
+ find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 16 -P${RPM_BUILD_NCPUS} -r %compression %compression_flags; \
fi \
%{nil}
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2650
From: Prarit Bhargava <prarit(a)redhat.com>
redhat/self-test: Remove rpmlint test
rpmlint reports errors and warnings on syntax and variable usage in spec
files. Hundreds of errors are reported when rpmlint is run on the
kernel.spec. These errors are for everything from RPM_BUILD_ROOT usage to
listing unversioned package dependencies. These errors are all caused by
explicit design choices by the kernel maintainers and spec authors.
For example, the use of RPM_BUILD_ROOT is required to move kernel compile
artificats from one directory to another in the rpm build phase which
seems to be an exception called out in rpmlint (but is still reported as
an error).
These errors can be blocked but only at a global level; that is, if error
reporting for these issues were blocked then new issues would not be
reported.
The rpmlint test failures don't offer new insight into the kernel spec.
For now, remove the rpmlint test from the self-tests.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/self-test/1001-rpmlint.bats b/redhat/self-test/1001-rpmlint.bats
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/self-test/1001-rpmlint.bats
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bats
-# Purpose: This test runs rpmlint on the source rpm.
-
-load test-lib.bash
-
-@test "rpmlint" {
- if ! test -x /usr/bin/rpmlint; then
- skip "The rpmlint package is not installed"
- else
- skip "Skip rpmlint test pending kernel.spec.template changes"
- fi
-
- numsrpms=$(find "$BATS_TEST_DIRNAME"/.. -name "*.rpm" | wc -l)
- if [ "$numsrpms" != "1" ]; then
- skip "Only one SRPM should be in $BATS_TEST_DIRNAME/redhat/rpms/SRPMS."
- fi
-
- srpm=$(find "$BATS_TEST_DIRNAME"/.. -name "*.rpm")
- run rpmlint $srpm
- check_result
-}
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2649
From: Mark Salter <msalter(a)redhat.com>
redhat/configs: disable CONFIG_ROCKCHIP_ERRATUM_3588001 for RHEL
RockChip is not enabled for RHEL, so no sense in enabling the
erratum.
Signed-off-by: Mark Salter <msalter(a)redhat.com>
diff --git a/redhat/configs/rhel/generic/CONFIG_ROCKCHIP_ERRATUM_3588001 b/redhat/configs/rhel/generic/CONFIG_ROCKCHIP_ERRATUM_3588001
index blahblah..blahblah 100644
--- a/redhat/configs/rhel/generic/CONFIG_ROCKCHIP_ERRATUM_3588001
+++ b/redhat/configs/rhel/generic/CONFIG_ROCKCHIP_ERRATUM_3588001
@@ -1 +1 @@
-CONFIG_ROCKCHIP_ERRATUM_3588001=y
+# CONFIG_ROCKCHIP_ERRATUM_3588001 is not set
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2526