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 4B9FB15800A for ; Fri, 14 Jul 2023 08:45:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3CF8E08F6; Fri, 14 Jul 2023 08:45:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 5B93BE08F3 for ; Fri, 14 Jul 2023 08:45:07 +0000 (UTC) Message-ID: <651892cc-af57-f9a7-a0ee-050a71d933b7@gentoo.org> Date: Fri, 14 Jul 2023 10:45:04 +0200 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 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US, nl-NL To: gentoo-dev@lists.gentoo.org From: Andrew Ammerlaan Subject: [gentoo-dev] [PATCH 5/5]: kernel-build.eclass: require modules-sign if secureboot Organization: Gentoo Linux Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 4d3653f9-cfe6-4059-8083-60d47317042a X-Archives-Hash: b91c0f35cb3b8fe72cdf3a89ce2d85a0 From d528f87cb015cc60ef6f702d02d20b4f1fc42e74 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Thu, 13 Jul 2023 09:55:32 +0200 Subject: [PATCH 05/13] kernel-build.eclass: require modules-sign if secureboot Signed-off-by: Andrew Ammerlaan --- eclass/kernel-build.eclass | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 0c8eaf3c1cd5..c9f18a1f0c4f 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -29,6 +29,11 @@ if [[ ! ${_KERNEL_BUILD_ECLASS} ]]; then _KERNEL_BUILD_ECLASS=1 PYTHON_COMPAT=( python3_{10..12} ) +if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then + # If we have enabled module signing IUSE + # then we can also enable secureboot IUSE + KERNEL_IUSE_SECUREBOOT=1 +fi inherit multiprocessing python-any-r1 savedconfig toolchain-funcs kernel-install @@ -86,8 +91,19 @@ IUSE="+strip" if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then IUSE+=" modules-sign" + REQUIRED_USE="secureboot? ( modules-sign )" fi +# @FUNCTION: kernel-build_pkg_setup +# @DESCRIPTION: +# Call python-any-r1 and secureboot pkg_setup +kernel-build_pkg_setup() { + python-any-r1_pkg_setup + if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then + secureboot_pkg_setup + fi +} + # @FUNCTION: kernel-build_src_configure # @DESCRIPTION: # Prepare the toolchain for building the kernel, get the default .config @@ -395,4 +411,4 @@ kernel-build_merge_configs() { fi -EXPORT_FUNCTIONS src_configure src_compile src_test src_install pkg_postinst +EXPORT_FUNCTIONS src_configure src_compile src_test src_install pkg_postinst pkg_setup -- 2.41.0