On Fri, 19 Aug 2022 at 23:43, Colin Watson <cjwat...@debian.org> wrote: > > On Thu, Aug 18, 2022 at 07:56:27PM +0200, Ansgar wrote: > > 1. Creating files in non-persistent locations (/run) and cleanup (at boot > > and via cron job): > > > > One example is the case above. > > > > The dependency on "systemd | systemd-tmpfiles" does not cause tmpfiles to be > > processed during boot or normal system operation with sysvinit-core as the > > systemd-standalone-tmpfiles package ships no init script or cron job taking > > over the function of systemd-tmpfiles-setup.service and > > systemd-tmpfiles-clean.timer. > > > > I expect that such tmpfiles could mostly be ignored in init-less > > environments such as containers as these usually don't expect cleanup > > actions for boot and service startup is handled differently. > > > > With one exception this could be covered by mandating that init systems must > > run tmpfiles during boot and packages do not need an explicit dependency for > > this to happen. > > > > (Why mandate the init system to do so? Because I do not think we want to > > require passwd and other packages to ship an init script just to call > > systemd-tmpfiles or reimplement the equivalent behavior in a different way.) > > > > However there is also the issue that tmpfiles should probably be called on > > package installation to create the requested files below /run before the > > next system reboot; they might be relevant for the service to start. It > > might be sufficient to only call systemd-tmpfiles if some init system is > > used (i.e., not in the init-less container case) and so also be covered by > > the requirement above (it would have to include some systemd-tmpfiles binary > > to be available). > > > > Some tmpfiles also include only exception rules for cleanup, for example > > gvfsd-fuse-tmpfiles.conf: > > > > x /run/user/*/gvfs > > > > This case does not need an explicit dependency either. > > I just had my attention drawn to this bug because a man-db upload > unexpectedly (to me) gained a dependency on systemd | systemd-tmpfiles, > thus adding to the build-essential set. /usr/lib/tmpfiles.d/man-db.conf > reads: > > d /var/cache/man 0755 man man 1w > > This line exists only for cleanup purposes; the directory is also > shipped in the package with matching ownership and permissions, so > man-db clearly doesn't rely on tmpfiles for creating that directory.
Shipping files in /var in a package is a bug though, and it really needs to be fixed. So it sounds like in this case a dependency is indeed the right thing, given presence of the directory in /var is necessary? Kind regards, Luca Boccassi