From 7a96a8a0e2dd4bb35502aa5250517ae96c4bf80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= Date: Mon, 22 Jun 2026 08:46:16 +0200 Subject: [PATCH] dev-debug/bpftrace: only check host kernel config when running tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When tests are enabled, linux-info will check an on-disk configuration first before checking the running kernel. This fails when the tests are run in e.g. a container which contains a valid kernel configuration on disk, but the host kernel does not. Fix this by forcing linux-info to look for kernel sources in a directory that (hopefully) does not exist and therefore fall back to runtime checks only. Closes: https://bugs.gentoo.org/977516 Signed-off-by: Holger Hoffstätte Part-of: https://codeberg.org/gentoo/gentoo/pulls/1215 Merges: https://codeberg.org/gentoo/gentoo/pulls/1215 Signed-off-by: Joonas Niilola --- dev-debug/bpftrace/bpftrace-0.24.2.ebuild | 6 ++++++ dev-debug/bpftrace/bpftrace-0.25.1.ebuild | 6 ++++++ dev-debug/bpftrace/bpftrace-0.26.1.ebuild | 6 ++++++ dev-debug/bpftrace/bpftrace-9999.ebuild | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/dev-debug/bpftrace/bpftrace-0.24.2.ebuild b/dev-debug/bpftrace/bpftrace-0.24.2.ebuild index ea57a4ba3a3ff..1acda8b72b78d 100644 --- a/dev-debug/bpftrace/bpftrace-0.24.2.ebuild +++ b/dev-debug/bpftrace/bpftrace-0.24.2.ebuild @@ -89,6 +89,12 @@ pkg_pretend() { ~HAVE_EBPF_JIT " + if use test; then + # force linux-info to check kernel configurations only in the + # running kernel, not in any on-disk configuration (bug 977516) + KERNEL_DIR="linux-info-runtime-checks-only" + fi + check_extra_config if use test; then diff --git a/dev-debug/bpftrace/bpftrace-0.25.1.ebuild b/dev-debug/bpftrace/bpftrace-0.25.1.ebuild index ab4ee111d39f9..5b65f8be22286 100644 --- a/dev-debug/bpftrace/bpftrace-0.25.1.ebuild +++ b/dev-debug/bpftrace/bpftrace-0.25.1.ebuild @@ -88,6 +88,12 @@ pkg_pretend() { ~HAVE_EBPF_JIT " + if use test; then + # force linux-info to check kernel configurations only in the + # running kernel, not in any on-disk configuration (bug 977516) + KERNEL_DIR="linux-info-runtime-checks-only" + fi + check_extra_config if use test; then diff --git a/dev-debug/bpftrace/bpftrace-0.26.1.ebuild b/dev-debug/bpftrace/bpftrace-0.26.1.ebuild index 726742c759d6e..37e9efa983ec0 100644 --- a/dev-debug/bpftrace/bpftrace-0.26.1.ebuild +++ b/dev-debug/bpftrace/bpftrace-0.26.1.ebuild @@ -88,6 +88,12 @@ pkg_pretend() { ~HAVE_EBPF_JIT " + if use test; then + # force linux-info to check kernel configurations only in the + # running kernel, not in any on-disk configuration (bug 977516) + KERNEL_DIR="linux-info-runtime-checks-only" + fi + check_extra_config if use test; then diff --git a/dev-debug/bpftrace/bpftrace-9999.ebuild b/dev-debug/bpftrace/bpftrace-9999.ebuild index 726742c759d6e..37e9efa983ec0 100644 --- a/dev-debug/bpftrace/bpftrace-9999.ebuild +++ b/dev-debug/bpftrace/bpftrace-9999.ebuild @@ -88,6 +88,12 @@ pkg_pretend() { ~HAVE_EBPF_JIT " + if use test; then + # force linux-info to check kernel configurations only in the + # running kernel, not in any on-disk configuration (bug 977516) + KERNEL_DIR="linux-info-runtime-checks-only" + fi + check_extra_config if use test; then