daedalus-v4l2-dkms: postinst — autoinstall for all installed kernels (#64) #65
Reference in New Issue
Block a user
Delete Branch "claude-noether/marfrit-packages:fix/daedalus-dkms-multi-kernel-64"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #64.
Symptom (recap)
On higgs (Pi CM5) the daedalus stack went dark after rebooting into a
newly installed kernel:
/dev/daedalus-v4l2absent, service skipped,HW video decode silently falling back to software. Package looked fine
in
dpkg -l.Root cause
postinstrunsdkms autoinstall "$NAME/$VERSION"(no-k), whichbuilds the module against
$(uname -r)only. The verification blockthen
dkms status -k "$KERNELVER"also only inspects that one kernel.A separately-installed kernel (e.g. 6.18.29 when the package was added
under 6.12.88) gets zero coverage and stays moduleless after switch.
Fix
postinstnow enumerates every/lib/modules/<kver>/buildthatresolves to a real directory (i.e. headers are actually installed
for that kernel) and runs
dkms autoinstall -k <kver>for each.Per-kernel verify; the warning block now aggregates per-kernel
failures with per-kernel finish-commands, instead of fingering only
the running kernel.
Dangling
/buildsymlinks (kernels with no headers installed) arefiltered out by the
[ -d "$d" ]test, so we don't spam warningsabout kernels we deliberately don't have headers for.
Note: not migrating to
dh-dkmsin this PRThe issue's "long-term" suggestion (move to
dh-dkmsfor dpkg-triggerbased auto-rebuild on new-kernel install) is real and worth doing, but
that's a bigger restructure of the build — this hand-rolled
dpkg-debrecipe would have to become an actual debhelper-driven dpkg-source
tree. Tracking that separately.
Manual test
Only the kernel whose headers actually resolve is selected — the
dangling-symlink one is correctly skipped.
Smoke plan (post-merge)
build step, just postinst content; should green).
apt install daedalus-v4l2-dkmswhile booted on 6.12.88 with6.18.29 headers also present → expect both
/lib/modules/6.12.88... /updates/dkms/daedalus_v4l2.ko.xzand the same under 6.18.29./dev/daedalus-v4l2appears,daedalus-v4l2.servicenot skipped.