• [gentoo-dev] [PATCH 5/5]: kernel-build.eclass: require modules-sign if

    From Andrew Ammerlaan@21:1/5 to All on Fri Jul 14 10:50:02 2023
    From d528f87cb015cc60ef6f702d02d20b4f1fc42e74 Mon Sep 17 00:00:00 2001
    From: Andrew Ammerlaan <[email protected]>
    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 <[email protected]>
    ---
    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_MODUL