Summary: | sys-kernel/genkernel-3.4.45.1 - genkernel --no-install still installs modules | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Toralf Förster <toralf> |
Component: | genkernel | Assignee: | Gentoo Genkernel Maintainers <genkernel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bkohler |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | put module installation behind CMD_INSTALL |
Description
Toralf Förster
2014-03-25 20:54:17 UTC
Created attachment 493226 [details, diff]
put module installation behind CMD_INSTALL
See if this patch looks sane. Tested here and seems to work. The attached patch is ugly due to indent changes, but here's the jist of it:
diff --git a/gen_compile.sh b/gen_compile.sh
index 1cd1ebf..fb818a7 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -308,6 +308,9 @@ compile_modules() {
print_info 1 " >> Compiling ${KV} modules..."
cd ${KERNEL_DIR}
compile_generic modules kernel
+
+ if isTrue "${CMD_INSTALL}"
+ then
export UNAME_MACHINE="${ARCH}"
[ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
if [ "${CMD_STRIP_TYPE}" == "all" -o "${CMD_STRIP_TYPE}" == "modules" ]
@@ -328,6 +331,7 @@ compile_modules() {
fi
unset UNAME_MACHINE
unset INSTALL_MOD_STRIP
+ fi
}
compile_kernel() {
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=5cab38a2aec2d6886eb8525240c83b3ee70b3d5d commit 5cab38a2aec2d6886eb8525240c83b3ee70b3d5d Author: Robin H. Johnson <robbat2@gentoo.org> AuthorDate: 2017-12-25 07:05:47 +0000 Commit: Robin H. Johnson <robbat2@gentoo.org> CommitDate: 2017-12-25 07:05:47 +0000 gen_compile: modules should respect --no-install Closes: https://bugs.gentoo.org/505810 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> gen_compile.sh | 4 ++++ 1 file changed, 4 insertions(+) @bkohler: Your solution introduced a breakage (both in it's original form and my equivilent patch) Specifically, if you pass: --no-install but want to create packages instead via --modulespackage/--minkernpackage, then it's not installed at all, and it can't create a modulepackage: * Creating modules package * Could not create a modules package /var/tmp/portage/sys-kernel/gentoo-infra-kernel-sources-4.14.8-r1/temp/lib/modules/4.14.8-gentoo-r1-infra37 was not found I'm wondering if we need to seperate out the module install, and do a seperate tmpdir install for the package, and then if install is enabled, rsync from the tmpdir to final. Been looking at this issue this morning. These installed modules in /lib/modules/ are used by kerncache, minkernpackage, and modulespackage (if there are any more, please let me know). Where right now in compile_modules() we have recently added a simple "return" for NO_INSTALL, instead we should detect if any of those 3 features is set, and do an extra "make modules_install" with INSTALL_MOD_PATH="${TEMP}/no-install" set. Then return. Right now in those 3 functions using /lib/modules, we already have checks to use ${INSTALL_MOD_PATH}/lib/modules if it exists, we can add another check to use ${TEMP}/no-install/lib/modules if it exists. Thoughts? Trying to get this done with minimal changes to the existing code. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=15b34c0a3b9c63cbedc25db05081fc5e2ed00b67 commit 15b34c0a3b9c63cbedc25db05081fc5e2ed00b67 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-07-28 21:10:49 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-07-29 20:00:26 +0000 genkernel: Don't install modules to /lib/modules when --kerncache is used but --no-install is set Bug: https://bugs.gentoo.org/505810 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> genkernel | 15 +++++++++++++++ 1 file changed, 15 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=febeae936c626eb4c0a44654cda2a6351671098b commit febeae936c626eb4c0a44654cda2a6351671098b Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-08-02 22:01:21 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-08-02 22:42:11 +0000 gen_determineargs.sh: determine_real_args(): Set KERNEL_MODULES_PREFIX to temporary location when --no-install is set This will ensure that we won't install anything on user's system when --no-install was set. While here, make use of expand_file() for --kernel-modules-prefix. Bug: https://bugs.gentoo.org/505810 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> gen_determineargs.sh | 25 +++++++++++++++++++++++++ genkernel | 15 --------------- 2 files changed, 25 insertions(+), 15 deletions(-) Fix released with >=sys-kernel/genkernel-4.1.0_rc1! |