Use of '--with-module-directory' breaks building tar kernel packages
Description:
Commit 0efd732c added --with-module-directory
to kmod
's build time configuration. Unfortunately, there is no way to override this value at run time, so building the .tar
packages for the upstream Linux kernel is broken because it installs to lib/modules
, not usr/lib/modules
.
Additional info:
The upstream Kbuild maintainer Masahiro Yamada brought this up with the kmod
maintainers on LKML and I recently revived it as a result of this issue: https://lore.kernel.org/20240821175843.GA2531464@thelio-3990X/
Please consider reverting this change while the upstream discussion plays out; as the change notes, it should not be strictly necessary right now.
Steps to reproduce:
In a Linux kernel tree with kmod 33-1
:
$ make -skj"$(nproc)" ARCH=x86_64 mrproper defconfig tarzst-pkg
...
depmod: ERROR: could not open directory /home/nathan/cbl/src/dev/linux/tar-install/usr/lib/modules/6.11.0-rc4-00019-gb311c1b497e5: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
$ ls tar-install
boot lib
With kmod 32-1
, there is no error.