Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 916587

Summary: eclass/linux-mod-r1.eclass incompatible with Linux 6.6+
Product: Gentoo Linux Reporter: Daniel Pouzzner <douzzer>
Component: EclassesAssignee: Ionen Wolkens <ionen>
Status: RESOLVED FIXED    
Severity: normal CC: kernel
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Daniel Pouzzner 2023-10-31 20:20:10 UTC
With kernel commit 4d15c9fa058e6, the "$DEPMOD" invocation at the end of kernel scripts/depmod.sh became an "exec", which broke the old strategy in linux-mod-r1.eclass whereby $DEPMOD was set to ":".  (See also kernel commit 79b96c332241c.)

I was able to recover correct functionality with this:


--- /etc/portage/overlay/eclass/linux-mod-r1.eclass.dist        2023-06-06 17:04:46.189817830 -0500
+++ /etc/portage/overlay/eclass/linux-mod-r1.eclass     2023-10-31 15:06:55.556355747 -0500
@@ -1161,7 +1161,7 @@ _modules_set_makeargs() {
                # eclass handle strip, sign, compress, and depmod (CONFIG_ should
                # have no impact on building, only used by Makefile.modinst)
                CONFIG_MODULE_{SIG_ALL,COMPRESS_{GZIP,XZ,ZSTD}}=
-               DEPMOD=:
+               DEPMOD=/bin/true
                STRIP=:
        )


I discovered the problem while reinstalling net-firewall/xtables-addons.  The failure looked like this:


# DEPMOD  /tmp/portage/net-firewall/xtables-addons-3.24-r1/image/lib/modules/6.6.0-gentoo
  ./scripts/depmod.sh 6.6.0-gentoo
./scripts/depmod.sh: line 32: exec: :: not found
make[5]: *** [scripts/Makefile.modinst:128: depmod] Error 127
make[4]: *** [/usr/src/linux-6.6.0-gentoo/Makefile:1821: modules_install] Error 2
make[3]: *** [Makefile:234: __sub-make] Error 2
make[3]: Leaving directory '/usr/src/linux-6.6.0-gentoo'
make[2]: *** [Makefile:471: modules_install] Error 2
make[2]: Leaving directory '/tmp/portage/net-firewall/xtables-addons-3.24-r1/work/xtables-addons-3.24/extensions'
make[1]: *** [Makefile:354: install-am] Error 2
make[1]: Leaving directory '/tmp/portage/net-firewall/xtables-addons-3.24-r1/work/xtables-addons-3.24/extensions'
make: *** [Makefile:623: install-recursive] Error 1
Comment 1 Ionen Wolkens gentoo-dev 2023-11-01 07:59:17 UTC
Thanks, will handle this in a bit.

(note that this is only an issue for modules doing `make install`, so e.g. nvidia-drivers which I already tested with 6.6 was not affected)
Comment 2 Larry the Git Cow gentoo-dev 2023-11-01 08:11:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=017bff0a540eab67bd9657d4455f13a62dbcca28

commit 017bff0a540eab67bd9657d4455f13a62dbcca28
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-11-01 08:07:13 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-11-01 08:10:42 +0000

    linux-mod-r1.eclass: fix DEPMOD override for kernel 6.6
    
    Not necessary, but also change STRIP while at it for parity.
    
    Closes: https://bugs.gentoo.org/916587
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 eclass/linux-mod-r1.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)