From: Prarit Bhargava <pra...@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 <pra...@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
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to