After the switch to dlopen() the lzma and zstd compression libraries, libkmod2 does no longer depend on the liblzma5 and libzstd1 packages. This is bad because kmod is not going to be automatically rebuilt should one of these libraries change SONAME. Policy §8.6 recommends to generate dependencies on dlopen'ed libraries: ,---- | Other packages which use a shared library (for example using | "dlopen()") should compute appropriate dependencies using these files | at build time as well. `----
I think that this would be a very rare event, hence it could be easily handled manually. Do you believe that there are any other reasons to declare such dependencies?
One reason to depend on decompression libraries is so that they are added to the initramfs -- otherwise we end up with an initramfs that is unable to decompress .xz-compressed modules.
Did you actually test this? If this really happens then it can be better fixed in /usr/share/initramfs-tools/hooks/kmod by checking if compressed modules are being installed in the initramfs.
Yes, I tested it. On a kernel built with CONFIG_MODULE_DECOMPRESS=n
modules were not being loaded and I was dropped at the initramfs shell.
I fixed it by adding a hook with
copy_exec /usr/lib/*-linux-gnu/liblzma.so.5
but I'm not sure what the best way to detect the path is.
Please copy this updated hook on your system and let me know if it works. https://salsa.debian.org/md/kmod/-/blob/master/debian/kmod.initramfs-hook
We believe that the bug you reported is fixed in the latest version of
kmod, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1099801@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Marco d'Itri <md@linux.it> (supplier of updated kmod package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 25 Apr 2025 11:50:41 +0200
Source: kmod
Architecture: source
Version: 34.2-2
Distribution: unstable
Urgency: medium
Maintainer: Marco d'Itri <md@linux.it>
Changed-By: Marco d'Itri <md@linux.it>
Closes: 1099801
Changes:
kmod (34.2-2) unstable; urgency=medium
.
* kmod.initramfs-hook: if compressed modules have been copied to the
initramfs and CONFIG_MODULE_DECOMPRESS=n (which is not the default
in Debian kernels) then also copy the compression libraries needed
by kmod to load them. (Closes: #1099801)
Checksums-Sha1:
c87862acf41acf478696d7ebd34432bc17f75c49 1819 kmod_34.2-2.dsc
cae7eeaa09da06449a3202ebd921fc87d477ef4b 12144 kmod_34.2-2.debian.tar.xz
b6fae61c0814fa89c9d0eed3f7f130f8ba573940 8820 kmod_34.2-2_amd64.buildinfo
Checksums-Sha256:
a36884eceaccc3647b5181233282578548d1f1fc39bfb5c1d4459982fb52505a 1819 kmod_34.2-2.dsc
93c9d227cf07a7c18a7292a79e51c94a6ea23e0ef4626ab2c31b5d711c73cefe 12144 kmod_34.2-2.debian.tar.xz
2687876426bd4c2189d4397e0e790880551443207f140602a1d9bedb24f135db 8820 kmod_34.2-2_amd64.buildinfo
Files:
7187fe05cd92c03f94151a48c0c32e31 1819 admin important kmod_34.2-2.dsc
18d0e2c97cb725b68830650ce5b5d1ea 12144 admin important kmod_34.2-2.debian.tar.xz
2a777caf82f3f2d8bbacfbd79bd7cc46 8820 admin important kmod_34.2-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQQnKUXNg20437dCfobLPsM64d7XgQUCaAtewgAKCRDLPsM64d7X
gQgfAQDl9La0sWS8OnyGyt3BxxMWCs0m1F60UPlU+bLNlL+bhAEA+g3T26u1oepR
BBxoUDuWVjuZeE+PjBTDMECn/5Ih7gc=
=VCZI
-----END PGP SIGNATURE-----
Hi,
on armhf, the initramfs-hook on kmod now fails intermittently, when the
kernel is compiled with CONFIG_MODULE_DECOMPRESS=n and
CONFIG_MODULE_COMPRESS_ALL. I.e. if all modules are present as .ko.xz
files, and userspace is required to decompress those. This prevents
update-initramfs from creating any initrd images.
The failure is triggered by the lines you added when fixes this bug:
copy_exec /usr/lib/*-linux-gnu/liblzma.so.5
copy_exec /usr/lib/*-linux-gnu/libzstd.so.1
There is no /usr/lib/*-linux-gnu directory on armhf. The directory is
named /usr/lib/arm-linux-gnueabihf here. Likely other Debian
architectures are affected as well.
I fixed the issue for me by changing these wildcards to
copy_exec /usr/lib/*-linux-gnu*/liblzma.so.5
copy_exec /usr/lib/*-linux-gnu*/libzstd.so.1
Not that I really understand the implications of that change :)
cheers,
David
PS thanks to Mark Hindley for tracking down this issue to this bug fix.
We believe that the bug you reported is fixed in the latest version of
kmod, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1103478@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Marco d'Itri <md@linux.it> (supplier of updated kmod package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 08 Nov 2026 17:45:14 +0100
Source: kmod
Architecture: source
Version: 34.3-1
Distribution: unstable
Urgency: medium
Maintainer: Marco d'Itri <md@linux.it>
Changed-By: Marco d'Itri <md@linux.it>
Closes: 1059518 1103478 1124327
Changes:
kmod (34.3-1) unstable; urgency=medium
.
* New upstream release.
* Backport an upstram bug fix for using modprobe --show-depends with
softdeps. (Closes: #1059518)
* When CONFIG_MODULE_DECOMPRESS=n on multiarch systems, copy the
correct version of the compression libraries to the initramfs.
(Closes: #1103478)
* Build-depend on different kernel headers on sh4. (Closes: #1124327)
Checksums-Sha1:
1fef36d30727488139b5aacae65fd869bf964d7f 2715 kmod_34.3-1.dsc
c933ec9414820308cff38908cb7dc015250bb630 192680 kmod_34.3.orig.tar.xz
c5490352917ba22463951439ccfaf3ff0d2bedea 11880 kmod_34.3-1.debian.tar.xz
68336b622271cf1bf0f98a7d46bf9c15e5e10e74 453544 kmod_34.3-1.git.tar.xz
b01e7dce9146617626e19d6d0654752f631e81f1 17721 kmod_34.3-1_source.buildinfo
Checksums-Sha256:
75f3b8bc4cea2230409468f6e8fca508ee4d6d18682f06055d2bced10e726aa5 2715 kmod_34.3-1.dsc
21768efd014d5569b5aac349c40c64047a6d804ccff7f338328f3326dbe4a1f7 192680 kmod_34.3.orig.tar.xz
5a9dcbd814a137b7d3b484d4311a07fcacb3b1adaded4eb48afb7848f4139d52 11880 kmod_34.3-1.debian.tar.xz
fe1123e43da1255ffc7c6947dd1a2584bc9870765de8e604873b25de1401c63e 453544 kmod_34.3-1.git.tar.xz
4208cd5a010bc73c53d1bac939e5b8cbf1759e585a07c5091ca32592b7b1bd05 17721 kmod_34.3-1_source.buildinfo
Files:
03dc9b6d71557cc5cf1d14c89e28a9af 2715 admin important kmod_34.3-1.dsc
d58a43edcc7b5355e011b0adf03817b9 192680 admin important kmod_34.3.orig.tar.xz
c52f5da06b5e873c767aed1e72c9ef92 11880 admin important kmod_34.3-1.debian.tar.xz
6101fb7b467463ee9aff7c3e9e91680f 453544 admin important kmod_34.3-1.git.tar.xz
42f47093c7b63323f5a7df55b784e3c8 17721 admin important kmod_34.3-1_source.buildinfo
Git-Tag-Info: tag=96be292752f43d8d1f5c854be9ac452dfb09781b fp=272945cd836d38dfb7427e86cb3ec33ae1ded781
Git-Tag-Tagger: Marco d'Itri <md@linux.it>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmrwqlEACgkQYG0ITkaD
wHmZiw//VAK5Z6ezL/znyEnrHJ3vlEAFPxLt+aWnJfw/BIegsbKtj0PFnc6QHmNY
8paVEX3qW9hqrcUJMwD1FqsE02TvoRoGJcRpy8pCWu+txjVNQmb31mxRn3ot7s7T
kmBtXBOsNaOruXtH8ccveTEJSUPLyVsq/RDN6bFGwg4FIIyo4KilODNOnBLe0eHs
qQKk4uq+l5QRhWor3JKyZPJURmMHRD4necpjJ7G9Fcm13x0qJ+lCS39m4k/PSIkx
DILzUTPDNqlozssa9FRrF7+GHjI5SP7r431IWC6Xojuzgq+iZL5ASX0z7PV1jd3o
1Dk9BGGCs4CJzB/1LLzP86ZDpvJdJrW7JUUnkM+T/FvoP06yf5LUT42NgCcLbFUd
wnBo8fHbFb5XyN+BpHWgeO1PJIUC+jVgvooOWCdeENpatSB1bbhV7DILADJXSzyP
VZ6hcu32kkLcWydtHB5Hqos/Nr2TmLI4l2SFSvcLzQ+Z57WPCvUWhZaqjUCt5EfH
RG1B3OPjj0FUyyzwAx5TMmsT88zOW6o3Ur7kv9Md4/R4nWJ7Av0oYhceUtkfIQD5
wexUdxpvd11rP+MOdKTetF1hDJ+SoUhdWfE7+3ICN7vPTRtsf/7adDBolRelODi0
trXlfs/XKhMrjp2v71xM41nYoOAnvZdy2TbSh4eYQmTd1mk1TqA=
=nqI7
-----END PGP SIGNATURE-----