From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 562F9158020 for ; Tue, 11 Oct 2022 22:57:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36F53E0963; Tue, 11 Oct 2022 22:55:17 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BAF7EE095E for ; Tue, 11 Oct 2022 22:55:16 +0000 (UTC) From: Sam James To: gentoo-dev@lists.gentoo.org Cc: dist-kernel@gentoo.org, kernel@gentoo.org, Sam James Subject: [gentoo-dev] [PATCH 8/8] kernel-build.eclass: use pbzip2/lbzip2 for parallel compression if available Date: Tue, 11 Oct 2022 23:54:44 +0100 Message-Id: <20221011225444.56032-8-sam@gentoo.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221011225444.56032-1-sam@gentoo.org> References: <20221011225444.56032-1-sam@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 45353bf7-4581-4c81-8c2e-58a17ac466fc X-Archives-Hash: 5b46653e06379e3c602781cc9738f5e9 Note that this will only take effect if compressing modules with bzip2 (COMPRESS_MODULE_BZIP2 is set) or compressing the kernel with bzip2 (CONFIG_KERNEL_BZIP2 is set). Signed-off-by: Sam James --- eclass/kernel-build.eclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index faf36d763d08..cc99298811bc 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -98,13 +98,19 @@ kernel-build_src_configure() { export ZSTD_NBTHREADS="$(makeopts_jobs)" fi - # pigz needs to take an argument, not an env var, - # for its options, which won't work because of how the kernel build system + # pigz/pbzip2/lbzip2 all need to take an argument, not an env var, + # for their options, which won't work because of how the kernel build system # uses the variables (e.g. passes directly to tar as an executable). if type -P pigz ; then MAKEARGS+=( KGZIP="pigz" ) fi + if type -P pbzip2 ; then + MAKEARGS+=( KBZIP2="pbzip2" ) + elif type -P lbzip2 ; then + MAKEARGS+=( KBZIP2="lbzip2" ) + fi + restore_config .config [[ -f .config ]] || die "Ebuild error: please copy default config into .config" -- 2.38.0