Package: dh-dlopenlibdeps
Version: 0.15
Severity: important
File: /usr/bin/dh_dlopenlibdeps
The latest development snapshots of libsdl3 have ELF notes for dlopen'd
libraries according to systemd's specification, making it much easier to
keep track of dlopen'd dependencies than in the past, particularly when
combined with dh_dlopenlibdeps.
While trying to switch SDL's rarely-used libsndio dependency to be
dynamically opened at runtime, I noticed that dh_dlopenlibdeps wasn't
generating a Suggests as I expected. Similarly for libpipewire (I'm
unsure whether I want to convert that be dynamically-opened or not,
but I tried it as an experiment), no Suggests was generated.
This turns out to be because their binary packages are named libsndio7.0
and libpipewire-0.3-0t64, which are valid package names but do not match
the regex used in dh_dlopenlibdeps because they contain a dot:
> $line =~ m/^([-a-z0-9+]+):/
The simplest fix would be to add the dot to the character class, making
it match every valid Debian package name. (Strictly speaking it also
matches some invalid package names, because there must be at least two
characters and the first one must be alphanumeric, but I think it's fine
to be slightly too lenient here.)
Debian Policy §5.6.7 says binary package names follow the same
restrictions as source package names, and §5.6.1 says that means
lower-case letters, digits, plus, minus or period. So the only valid
character that is not matched by dh_dlopenlibdeps' regex is the dot
(period), and adding the dot should be a complete/future-proof solution.
I'll open a pull request with the obvious change when I have a bug
number to close in it, unless a maintainer gets there first.
Thanks,
smcv