From: Viktor Malik <vmalik(a)redhat.com>
redhat/spec: Update bpftool versioning scheme
The upstream has changed the versioning scheme of bpftool [1].
Instead of following the kernel version, it is now deduced from the
libbpf version by adding +6 to the libbpf major version number.
This appropriately updates the bpftool sub-package version number. The
version is deduced automatically from the libbpf version, which can be
retrieved from tools/lib/bpf/libbpf.map.
One problem is that even though RPM allows to override sub-package
version, doing that overrides the internal %{version} macro. The macro
is used later throughout the specfile, so we reset it to its default
value (%{specversion}) at the end of the bpftool sub-package definition.
[1] https://lore.kernel.org/bpf/20220210104237.11649-3-quentin@isovalent.com/
Signed-off-by: Viktor Malik <vmalik(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -281,6 +281,12 @@ KABI_TARBALL:=$(SOURCES)/kernel-abi-stablelists-$(SPECKABIVERSION).tar.bz2
KABIDW := $(REDHAT)/kabi-dwarf
KABIDW_TARBALL:=$(SOURCES)/kernel-kabi-dw-$(SPECKABIVERSION).tar.bz2
+# Taken from tools/lib/bpf/Makefile
+BPFTOOLVERSION:=$(shell \
+ grep -oE '^LIBBPF_([0-9.]+)' $(TOPDIR)/tools/lib/bpf/libbpf.map | \
+ sort -rV | head -n1 | cut -d'_' -f2 | \
+ awk -F. -v OFS=. '{$$1 += 6 ; print}')
+
# load Makefile variable settings from user-specified configuration file,
# ~/.rhpkg.mk or $TOPDIR/.rhpkg.mk
ifeq ("$(RHDISTGIT_CACHE)", "")
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -1091,23 +1091,31 @@ and root causes of unexpected results.
%if %{with_bpftool}
+%define bpftoolversion %%BPFTOOLVERSION%%
+
%package -n bpftool
Summary: Inspection and simple manipulation of eBPF programs and maps
License: GPLv2
+Version: %{bpftoolversion}
%description -n bpftool
This package contains the bpftool, which allows inspection and simple
manipulation of eBPF programs and maps.
%package -n bpftool-debuginfo
Summary: Debug information for package bpftool
+Version: %{bpftoolversion}
Group: Development/Debug
-Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
+Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specversion}-%{release}
AutoReqProv: no
%description -n bpftool-debuginfo
This package provides debug information for the bpftool package.
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_sbindir}/bpftool(\.debug)?|XXX' -o bpftool-debuginfo.list}
+# Setting "Version:" above overrides the internal {version} macro,
+# need to restore it here
+%define version %{specversion}
+
# with_bpftool
%endif
diff --git a/redhat/scripts/genspec/genspec.sh b/redhat/scripts/genspec/genspec.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/genspec/genspec.sh
+++ b/redhat/scripts/genspec/genspec.sh
@@ -55,6 +55,7 @@ test -f "$SOURCES/$SPECFILE" &&
s/%%SPECPATCHLIST_CHANGELOG%%/$SPECPATCHLIST_CHANGELOG/
s/%%SPECVERSION%%/$SPECVERSION/
s/%%SPECKABIVERSION%%/$SPECKABIVERSION/
+ s/%%BPFTOOLVERSION%%/$BPFTOOLVERSION/
s/%%SPECTARFILE_RELEASE%%/$SPECTARFILE_RELEASE/
s/%%SPECSELFTESTS_MUST_BUILD%%/$SPECSELFTESTS_MUST_BUILD/" "$SOURCES/$SPECFILE"
test -n "$RHSELFTESTDATA" && test -f "$SOURCES/$SPECFILE" && sed -i -e "
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2295
From: Justin M. Forbes <jforbes(a)fedoraproject.org>
Turn on IDLE_INJECT for x86
Upstream commit 8526eb7fc75ab changed INTEL_POWERCLAMP to select
IDLE_INJECT. As we have INTEL_POWERCLAMP selected as a module, we must
either turn on IDLE_INJECT or turn off INTEL_POWERCLAMP.
Signed-off-by: Justin M. Forbes <jforbes(a)fedoraproject.org>
diff --git a/redhat/configs/pending-fedora/generic/x86/CONFIG_IDLE_INJECT b/redhat/configs/common/generic/x86/CONFIG_IDLE_INJECT
rename from redhat/configs/pending-fedora/generic/x86/CONFIG_IDLE_INJECT
rename to redhat/configs/common/generic/x86/CONFIG_IDLE_INJECT
index blahblah..blahblah 100644
--- a/redhat/configs/pending-fedora/generic/x86/CONFIG_IDLE_INJECT
+++ b/redhat/configs/common/generic/x86/CONFIG_IDLE_INJECT
diff --git a/redhat/configs/pending-rhel/generic/x86/CONFIG_IDLE_INJECT b/redhat/configs/pending-rhel/generic/x86/CONFIG_IDLE_INJECT
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/pending-rhel/generic/x86/CONFIG_IDLE_INJECT
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_IDLE_INJECT=y
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2302
From: Justin M. Forbes <jforbes(a)fedoraproject.org>
Turn on IDLE_INJECT for x86
Upstream commit 8526eb7fc75ab changed INTEL_POWERCLAMP to select
IDLE_INJECT. As we have INTEL_POWERCLAMP selected as a module, we must
either turn on IDLE_INJECT or turn off INTEL_POWERCLAMP.
Signed-off-by: Justin M. Forbes <jforbes(a)fedoraproject.org>
diff --git a/redhat/configs/common/generic/CONFIG_IDLE_INJECT b/redhat/configs/common/generic/CONFIG_IDLE_INJECT
index blahblah..blahblah 100644
--- a/redhat/configs/common/generic/CONFIG_IDLE_INJECT
+++ b/redhat/configs/common/generic/CONFIG_IDLE_INJECT
@@ -1 +1 @@
-# CONFIG_IDLE_INJECT is not set
+CONFIG_IDLE_INJECT=y
diff --git a/redhat/configs/pending-fedora/generic/x86/CONFIG_IDLE_INJECT b/redhat/configs/pending-fedora/generic/x86/CONFIG_IDLE_INJECT
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/pending-fedora/generic/x86/CONFIG_IDLE_INJECT
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_IDLE_INJECT=y
diff --git a/redhat/configs/pending-rhel/generic/x86/CONFIG_IDLE_INJECT b/redhat/configs/pending-rhel/generic/x86/CONFIG_IDLE_INJECT
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/pending-rhel/generic/x86/CONFIG_IDLE_INJECT
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_IDLE_INJECT=y
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2302
From: Gerd Hoffmann <kraxel(a)redhat.com>
aarch64: enable zboot
Enable CONFIG_EFI_ZBOOT.
Also adapt %make_target and %kernel_image for zboot.
With the kernel self-uncompressing itself the bootloader or the
systemd-stub doesn't need to handle the uncompressing (and doesn't need
to know how the kernel is compressed, i.e. whenever it is .gz or .xz).
Some more background: https://github.com/systemd/systemd/issues/23788
It also makes aarch64 work more like x86_64 where the kernel
decompresses itself too.
Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
diff --git a/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT b/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT
index blahblah..blahblah 100644
--- a/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT
+++ b/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT
@@ -1 +1 @@
-# CONFIG_EFI_ZBOOT is not set
+CONFIG_EFI_ZBOOT=y
diff --git a/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT b/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT
index blahblah..blahblah 100644
--- a/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT
+++ b/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT
@@ -1 +1 @@
-# CONFIG_EFI_ZBOOT is not set
+CONFIG_EFI_ZBOOT=y
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -484,8 +484,8 @@ Summary: The Linux kernel
%define all_arch_configs kernel-%{version}-aarch64*.config
%define asmarch arm64
%define hdrarch arm64
-%define make_target Image.gz
-%define kernel_image arch/arm64/boot/Image.gz
+%define make_target vmlinuz.efi
+%define kernel_image arch/arm64/boot/vmlinuz.efi
%endif
# Should make listnewconfig fail if there's config options
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2283
From: Viktor Malik <vmalik(a)redhat.com>
redhat/spec: Update bpftool versioning scheme
The upstream has changed the versioning scheme of bpftool [1].
Instead of following the kernel version, it is now deduced from the
libbpf version by adding +6 to the libbpf major version number.
This appropriately updates the bpftool sub-package version number. The
version is deduced automatically from the libbpf version, which can be
retrieved from tools/lib/bpf/libbpf.map.
One problem is that even though RPM allows to override sub-package
version, doing that overrides the internal %{version} macro. The macro
is used later throughout the specfile, so we reset it to its default
value (%{specversion}) at the end of the bpftool sub-package definition.
[1] https://lore.kernel.org/bpf/20220210104237.11649-3-quentin@isovalent.com/
Signed-off-by: Viktor Malik <vmalik(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -281,6 +281,12 @@ KABI_TARBALL:=$(SOURCES)/kernel-abi-stablelists-$(SPECKABIVERSION).tar.bz2
KABIDW := $(REDHAT)/kabi-dwarf
KABIDW_TARBALL:=$(SOURCES)/kernel-kabi-dw-$(SPECKABIVERSION).tar.bz2
+# Taken from tools/lib/bpf/Makefile
+BPFTOOLVERSION:=$(shell \
+ grep -oE '^LIBBPF_([0-9.]+)' $(TOPDIR)/tools/lib/bpf/libbpf.map | \
+ sort -rV | head -n1 | cut -d'_' -f2 | \
+ awk -F. -v OFS=. '{$$1 += 6 ; print}')
+
# load Makefile variable settings from user-specified configuration file,
# ~/.rhpkg.mk or $TOPDIR/.rhpkg.mk
ifeq ("$(RHDISTGIT_CACHE)", "")
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -1091,23 +1091,31 @@ and root causes of unexpected results.
%if %{with_bpftool}
+%define bpftoolversion %%BPFTOOLVERSION%%
+
%package -n bpftool
Summary: Inspection and simple manipulation of eBPF programs and maps
License: GPLv2
+Version: %{bpftoolversion}
%description -n bpftool
This package contains the bpftool, which allows inspection and simple
manipulation of eBPF programs and maps.
%package -n bpftool-debuginfo
Summary: Debug information for package bpftool
+Version: %{bpftoolversion}
Group: Development/Debug
-Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
+Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specversion}-%{release}
AutoReqProv: no
%description -n bpftool-debuginfo
This package provides debug information for the bpftool package.
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_sbindir}/bpftool(\.debug)?|XXX' -o bpftool-debuginfo.list}
+# Setting "Version:" above overrides the internal {version} macro,
+# need to restore it here
+%define version %{specversion}
+
# with_bpftool
%endif
diff --git a/redhat/scripts/genspec/genspec.sh b/redhat/scripts/genspec/genspec.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/genspec/genspec.sh
+++ b/redhat/scripts/genspec/genspec.sh
@@ -55,6 +55,7 @@ test -f "$SOURCES/$SPECFILE" &&
s/%%SPECPATCHLIST_CHANGELOG%%/$SPECPATCHLIST_CHANGELOG/
s/%%SPECVERSION%%/$SPECVERSION/
s/%%SPECKABIVERSION%%/$SPECKABIVERSION/
+ s/%%BPFTOOLVERSION%%/$BPFTOOLVERSION/
s/%%SPECTARFILE_RELEASE%%/$SPECTARFILE_RELEASE/
s/%%SPECSELFTESTS_MUST_BUILD%%/$SPECSELFTESTS_MUST_BUILD/" "$SOURCES/$SPECFILE"
test -n "$RHSELFTESTDATA" && test -f "$SOURCES/$SPECFILE" && sed -i -e "
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2295
From: Michal Schmidt <mschmidt(a)redhat.com>
redhat/configs: enable Octeon TX2 network drivers for RHEL
Enable the Admin/Physical/Virtual Function Octeon TX2 drivers for RHEL.
Move the relevant config enabling snippets from 'fedora' to 'common'.
Delete the disabling snippets in 'rhel'.
CONFIG_NDC_DIS_DYNAMIC_CACHING affects the behavior of the AF driver. It
remains disabled. Its snippet is moved to 'common' too.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2040643
Signed-off-by: Michal Schmidt <mschmidt(a)redhat.com>
diff --git a/redhat/configs/fedora/generic/CONFIG_NDC_DIS_DYNAMIC_CACHING b/redhat/configs/common/generic/CONFIG_NDC_DIS_DYNAMIC_CACHING
rename from redhat/configs/fedora/generic/CONFIG_NDC_DIS_DYNAMIC_CACHING
rename to redhat/configs/common/generic/CONFIG_NDC_DIS_DYNAMIC_CACHING
index blahblah..blahblah 100644
--- a/redhat/configs/fedora/generic/CONFIG_NDC_DIS_DYNAMIC_CACHING
+++ b/redhat/configs/common/generic/CONFIG_NDC_DIS_DYNAMIC_CACHING
diff --git a/redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_AF b/redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_AF
rename from redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_AF
rename to redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_AF
index blahblah..blahblah 100644
--- a/redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_AF
+++ b/redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_AF
diff --git a/redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_PF b/redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_PF
rename from redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_PF
rename to redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_PF
index blahblah..blahblah 100644
--- a/redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_PF
+++ b/redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_PF
diff --git a/redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_VF b/redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_VF
rename from redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_VF
rename to redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_VF
index blahblah..blahblah 100644
--- a/redhat/configs/fedora/generic/arm/aarch64/CONFIG_OCTEONTX2_VF
+++ b/redhat/configs/common/generic/arm/aarch64/CONFIG_OCTEONTX2_VF
diff --git a/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_AF b/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_AF
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_AF
+++ /dev/null
@@ -1 +0,0 @@
-# CONFIG_OCTEONTX2_AF is not set
diff --git a/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_PF b/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_PF
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_PF
+++ /dev/null
@@ -1 +0,0 @@
-# CONFIG_OCTEONTX2_PF is not set
diff --git a/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_VF b/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_VF
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/rhel/generic/arm/aarch64/CONFIG_OCTEONTX2_VF
+++ /dev/null
@@ -1 +0,0 @@
-# CONFIG_OCTEONTX2_VF is not set
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2291