#1099801 libkmod2: missing dependencies on compression libraries

Package:
libkmod2
Source:
libkmod2
Description:
libkmod shared library
Submitter:
Sven Joachim
Date:
2025-07-02 11:43:02 UTC
Severity:
normal
Tags:
#1099801#5
Date:
2025-03-08 11:29:25 UTC
From:
To:
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.
`----

#1099801#10
Date:
2025-03-08 21:13:59 UTC
From:
To:
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?

#1099801#15
Date:
2025-04-08 22:11:26 UTC
From:
To:
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.

#1099801#20
Date:
2025-04-11 18:52:17 UTC
From:
To:
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.

#1099801#25
Date:
2025-04-11 23:38:32 UTC
From:
To:
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.

#1099801#30
Date:
2025-04-13 22:53:36 UTC
From:
To:
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

#1099801#43
Date:
2025-04-25 12:24:24 UTC
From:
To:
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-----