Author: Andrew Ammerlaan <[email protected]>
Date:   Sun Feb 11 10:41:32 2024 +0100

kernel-install.eclass: explicitly set kernel image to 644

The kernel build system sets the permissions on the kernel
image to 644. However objcopy creates a file with permissions
755. This causes a discrepancy in the permissions on the
installed kernel image between +generic-uki,-generic-uki and
between gentoo-kernel, gentoo-kernel-bin.

Restore the symmetry by explicitly setting the objcopy'ed
files permissions to 644.

Signed-off-by: Andrew Ammerlaan <[email protected]>

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 47865a953389..f512d815fe09 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -621,6 +621,7 @@ kernel-install_extract_from_uki() {

$(tc-getOBJCOPY) -O binary "-j.${extract_type}" "${uki}" "${out}" ||
die "Failed to extract ${extract_type}"
+       chmod 644 "${out}" || die
}

# @FUNCTION: kernel-install_install_all

Reply via email to