On Sat, 26 Sep 2026 at 10:10:28 +0200, David Prévot wrote:
But we also want to allow packages to not
bring those dependencies in the rare cases where the maintainer has
checked that they are not needed in the normal use of their package
(e.g., they’re just a nice feature, but the package would still be
usable in most cases without them).
The dbus-daemon package might make a convenient concrete example of a
non-Essential package where the tmpfiles.d snippet is nice to have (it
allows dbus-daemon to run successfully from an empty/factory-reset /etc
and /var), but not mandatory. In forky/sid it currently has a hard
dependency on a tmpfiles.d implementation; in trixie, it didn't.
One possible implementation would be to guard the maintscript snippet
with "if [ -x "$(command -v systemd-tmpfiles)" ]" as it was in trixie,
and have an equivalent of dpkg-shlibdeps'
-d{Pre-Depends,Depends,Recommends,Suggests} option, defaulting to
Depends like dpkg-shlibdeps does. I know I've suggested that as
potentially useful for other dependency-generating debhelper scripts in
the past (possibly dh_installgsettings?), so perhaps it could even be
generalized beyond dh_installtmpfiles.
smcv