From: Prarit Bhargava <prarit(a)redhat.com>
kernel.spec.template: Fix --without bpftool
The selftests turn bpftool on unconditionally. If a user has specified
--without bpftool it means the user really wants to disable bpftool. In
this case the selftest should be disabled.
Disable selftests and output a message to the user disabled when --without
bpftool is specified.
Signed-off-by: Prarit Bhargava <prarit(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
@@ -447,8 +447,13 @@ Summary: The Linux kernel
# selftests require bpftool to be built
%if %{with_selftests}
+%if %{with_bpftool} == 0
+%{echo:Disabling selftests build: '--without bpftool' specified}
+%define with_selftests 0
+%else
%define with_bpftool 1
%endif
+%endif
%ifnarch noarch
%define with_kernel_abi_stablelists 0
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2720