From 5f5a72715819f43db6ecff2a834f7c8ccb3917f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 24 Jul 2025 18:00:56 +0200 Subject: [PATCH] kernel-build.eclass: Force GNU tar for kernel builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Override the tar executable used by kernel Makefiles to force GNU tar. This is necessary since some of the scripts use options specific to GNU tar, and therefore fail with other choices for app-alternatives/tar. That said, this override works only with the most recent version of sys-kernel/gentoo-kernel. It doesn't cover all upstream uses of tar, but it does cover these that fail with other tar implementations. Closes: https://bugs.gentoo.org/951102 Signed-off-by: Michał Górny --- eclass/kernel-build.eclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 3296f2c6ad756..7a5c80cfd6a6e 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -47,6 +47,7 @@ BDEPEND=" ${PYTHON_DEPS} app-alternatives/cpio app-alternatives/bc + app-arch/tar dev-lang/perl sys-devel/bison sys-devel/flex @@ -226,6 +227,7 @@ kernel-build_src_configure() { OBJCOPY="$(tc-getOBJCOPY)" OBJDUMP="$(tc-getOBJDUMP)" READELF="$(tc-getREADELF)" + TAR=gtar # we need to pass it to override colliding Gentoo envvar ARCH=$(tc-arch-kernel)