From: Prarit Bhargava prarit@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@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 @@ -298,8 +298,6 @@ Summary: The Linux kernel %define with_perf 0 %define with_tools 0 %define with_bpftool 0 -# selftests turns on bpftool -%define with_selftests 0 # No realtime fedora variants %define with_realtime 0 %define with_arm64_64k 0 @@ -445,9 +443,10 @@ Summary: The Linux kernel %define use_vdso 1 %endif
-# selftests require bpftool to be built -%if %{with_selftests} -%define with_bpftool 1 +# selftests require bpftool to be built. If bpftools is disabled, then disable selftests +%if %{with_bpftool} == 0 +%{echo:bpftools disabled ... disabling selftests} +%define with_selftests 0 %endif
%ifnarch noarch
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2720
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2720#note_1567874...
I updated the message to be a bit more generic. Instead of referencing 'without bpftool' the rpm log will output 'bpftools disabled ... disabling selftests'
I've also removed another selftests & bpftools reference.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2720#note_1569520...
Odd .. this seems to have failed a CI check. Looking into it now.
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2720#note_1569540...
For some reason that message propagates into output as buildrequires: ``` $ rpmspec -q --buildrequires redhat/rpm/SPECS/kernel.spec | head -5 bpftools disabled ... disabling selftests asciidoc audit-libs-devel bash bc ```
kernel@lists.fedoraproject.org