Hi all,
Currently if the MODULES_SIGN_KEY exists but is not readable the kernel
will fail to compile. The kernel build system does not produce a clear
error when this happens so it is not immediately obvious what is wrong.
This small patch adjusts our src_prepare logic to check if the signing
key is readable, this makes the build error out sooner and with a
clearer error message.
Best regards,
Andrew
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index d498dd2e705b..5b324e036c5f 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -421,11 +421,11 @@ kernel-build_merge_configs() {
cat "${MODULES_SIGN_CERT}" "${MODULES_SIGN_KEY}" > "${T}/kernel_key.pem"
|| die
MODULES_SIGN_KEY="${T}/kernel_key.pem"
fi
- if [[ ${MODULES_SIGN_KEY} == pkcs11:* || -e ${MODULES_SIGN_KEY} ]]; then
+ if [[ ${MODULES_SIGN_KEY} == pkcs11:* || -r ${MODULES_SIGN_KEY} ]]; then
echo "CONFIG_MODULE_SIG_KEY=\"${MODULES_SIGN_KEY}\"" \
"${WORKDIR}/modules-sign.config"
elif [[ -n ${MODULES_SIGN_KEY} ]]; then
- die
"MODULES_SIGN_KEY=${MODULES_SIGN_KEY} not found!"
+ die
"MODULES_SIGN_KEY=${MODULES_SIGN_KEY} not found or not readable!"
fi
merge_configs+=( "${WORKDIR}/modules-sign.config" )
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)