From f300354de9fe5d997850456a9e1f400193e6544f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 26 Aug 2024 12:00:09 +0100 Subject: gentoo auto-resync : 26:08:2024 - 12:00:09 --- eclass/kernel-build.eclass | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'eclass/kernel-build.eclass') diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 6406f5b3c0f3..be02920162f4 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -625,18 +625,6 @@ kernel-build_merge_configs() { CONFIG_MODULE_SIG_FORCE=y CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}=y EOF - if [[ -n ${MODULES_SIGN_KEY_CONTENTS} ]]; then - (umask 066 && touch "${T}/kernel_key.pem" || die) - echo "${MODULES_SIGN_KEY_CONTENTS}" > "${T}/kernel_key.pem" || die - unset MODULES_SIGN_KEY_CONTENTS - export MODULES_SIGN_KEY="${T}/kernel_key.pem" - fi - if [[ ${MODULES_SIGN_KEY} == pkcs11:* || -r ${MODULES_SIGN_KEY} ]]; then - echo "CONFIG_MODULE_SIG_KEY=\"${MODULES_SIGN_KEY}\"" \ - >> "${WORKDIR}/modules-sign-key.config" - elif [[ -n ${MODULES_SIGN_KEY} ]]; then - die "MODULES_SIGN_KEY=${MODULES_SIGN_KEY} not found or not readable!" - fi merge_configs+=( "${WORKDIR}/modules-sign.config" ) fi @@ -657,7 +645,19 @@ kernel-build_merge_configs() { fi if [[ ${KERNEL_IUSE_MODULES_SIGN} ]] && use modules-sign; then - merge_configs+=( "${WORKDIR}/modules-sign-key.config" ) + if [[ -n ${MODULES_SIGN_KEY_CONTENTS} ]]; then + (umask 066 && touch "${T}/kernel_key.pem" || die) + echo "${MODULES_SIGN_KEY_CONTENTS}" > "${T}/kernel_key.pem" || die + unset MODULES_SIGN_KEY_CONTENTS + export MODULES_SIGN_KEY="${T}/kernel_key.pem" + fi + if [[ ${MODULES_SIGN_KEY} == pkcs11:* || -r ${MODULES_SIGN_KEY} ]]; then + echo "CONFIG_MODULE_SIG_KEY=\"${MODULES_SIGN_KEY}\"" \ + >> "${WORKDIR}/modules-sign-key.config" + merge_configs+=( "${WORKDIR}/modules-sign-key.config" ) + elif [[ -n ${MODULES_SIGN_KEY} ]]; then + die "MODULES_SIGN_KEY=${MODULES_SIGN_KEY} not found or not readable!" + fi fi if [[ ${#user_configs[@]} -gt 0 ]]; then -- cgit v1.2.3