#1112267 zfs-dkms doesn't attempt to build for any kernels: missing dependency on linux-headers?

#1112267#5
Date:
2025-08-28 02:05:32 UTC
From:
To:
Dear Maintainer,

I recently made a fresh install of Trixie amd64, and after applying all updates
attempted to install zfs-dkms.

Installation succeeds, but it does not seem to attempt to build any DKMS
modules, as a result of which the modules obviously can't be loaded and ZFS
filesystems can't be mounted.

During installation I get this output:

mbp@bobcat:~$ sudo apt reinstall zfs-dkms
Summary:
  Upgrading: 0, Installing: 0, Reinstalling: 1, Removing: 0, Not Upgrading: 0
  Download size: 2452 kB
  Space needed: 0 B / 1552 GB available

Get:1 http://deb.debian.org/debian trixie/contrib amd64 zfs-dkms all 2.3.2-2
[2452 kB]
Fetched 2452 kB in 0s (8158 kB/s)
Preconfiguring packages ...
(Reading database ... 261168 files and directories currently installed.)
Preparing to unpack .../zfs-dkms_2.3.2-2_all.deb ...
Deleting module zfs/2.3.2 completely from the DKMS tree.
Unpacking zfs-dkms (2.3.2-2) over (2.3.2-2) ...
Setting up zfs-dkms (2.3.2-2) ...
Loading new zfs/2.3.2 DKMS files...
Building for
Processing triggers for initramfs-tools (0.148.3) ..
update-initramfs: Generating /boot/initrd.img-6.12.38+deb13-amd64

Note the "Building for [blank]" line.

After some investigation it seems the problem is that I didn't have the kernel
headers installed, and `/usr/lib/dkms/common.postinst` in this case decides to
do nothing.

Manually installing linux-headers-amd64 and then reinstalling zfs-dkms fixes
it.

I'd like to suggest two changes:

1. Maybe the postinst script (or some part of the zfs-dkms install chain?)
should fail if no modules can be built? This script seems unchanged from the
upstream https://github.com/dell/dkms/blob/main/dkms_common.postinst.in so
perhaps I should suggest it there?

2. Maybe Debian's zfs-dkms (or dkms itself?) should depend upon or at least
recommend linux-headers? (I can't believe I'm the first to hit this so perhaps
there's some strong reason why it does not?)


Thanks!

#1112267#10
Date:
2025-08-29 18:38:18 UTC
From:
To:
Actually this is a duplicate of
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091428

Martin