diff options
author | Nowa Ammerlaan <andrewammerlaan@gentoo.org> | 2024-11-12 09:06:27 +0100 |
---|---|---|
committer | Nowa Ammerlaan <andrewammerlaan@gentoo.org> | 2024-11-12 09:09:11 +0100 |
commit | 3d37ab7f493f626e059cd24b8de8b722ba53b30a (patch) | |
tree | d5c03f72667b868a3a6b3594e49c3ec50a71c7b4 /eclass | |
parent | dev-java/swingx: style update, update EAPI 7 -> 8 (diff) | |
download | gentoo-3d37ab7f493f626e059cd24b8de8b722ba53b30a.tar.gz gentoo-3d37ab7f493f626e059cd24b8de8b722ba53b30a.tar.bz2 gentoo-3d37ab7f493f626e059cd24b8de8b722ba53b30a.zip |
kernel-build.eclass: install x509.genkey and everything else in certs/
Users setting up kernel module signing are instructed by our and upstream
documentation to use the kernels x509.genkey config file. This ensures that
a supported key is generated.
However, in the current situation users will first have to emerge
gentoo-sources or similar to actually get this genkey file. This is inconvenient
so lets just install the genkey config file in our dist-kernels.
There are also some other tools, scripts, and lists that may be useful, so while
we are changing this anyway lets just install all of those as well and in the
process simplify the code.
Signed-off-by: Nowa Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kernel-build.eclass | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 4a2af9845ad4..9d33aef92691 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -397,7 +397,7 @@ kernel-build_src_install() { fi dodir "${kernel_dir}/arch/${kern_arch}" - mv include scripts "${ED}${kernel_dir}/" || die + mv certs include scripts "${ED}${kernel_dir}/" || die mv "arch/${kern_arch}/include" \ "${ED}${kernel_dir}/arch/${kern_arch}/" || die # some arches need module.lds linker script to build external modules @@ -438,13 +438,8 @@ kernel-build_src_install() { local image=${ED}${kernel_dir}/${image_path} cp -p "build/${image_path}" "${image}" || die - # If a key was generated, copy it so external modules can be signed - local suffix - for suffix in pem x509; do - if [[ -f "build/certs/signing_key.${suffix}" ]]; then - cp -p "build/certs/signing_key.${suffix}" "${ED}${kernel_dir}/certs" || die - fi - done + # Copy built key/certificate files + cp -p build/certs/* "${ED}${kernel_dir}/certs/" || die # building modules fails with 'vmlinux has no symtab?' if stripped use ppc64 && dostrip -x "${kernel_dir}/${image_path}" |