Bug#945269: debian-policy: packages should use tmpfiles.d(5) to create directories below /var
- To: Russ Allbery <rra@debian.org>, 945269@bugs.debian.org
- Cc: Guillem Jover <guillem@debian.org>
- Subject: Bug#945269: debian-policy: packages should use tmpfiles.d(5) to create directories below /var
- From: Simon McVittie <smcv@debian.org>
- Date: Sun, 1 Dec 2019 10:52:49 +0000
- Message-id: <[🔎] 20191201105249.GA13008@espresso.pseudorandom.co.uk>
- Reply-to: Simon McVittie <smcv@debian.org>, 945269@bugs.debian.org
- In-reply-to: <87h82lb38w.fsf@hope.eyrie.org>
- References: <87r21zq1ts.fsf@hope.eyrie.org> <8409736d303884e8a3c11589d2860e4f3238bd2e.camel@43-1.org> <8736egibhq.fsf@43-1.org> <87blt3pyq1.fsf@hope.eyrie.org> <20191129132131.GA151991@thunder.hadrons.org> <8736egibhq.fsf@43-1.org> <878snyk3lg.fsf@hope.eyrie.org> <20191130184311.GA18261@gaara.hadrons.org> <8736egibhq.fsf@43-1.org> <87h82lb38w.fsf@hope.eyrie.org> <8736egibhq.fsf@43-1.org>
On Sat, 30 Nov 2019 at 10:58:23 -0800, Russ Allbery wrote:
> Guillem Jover <guillem@debian.org> writes:
> > I don't mind much how this could end up being hooked into various init
> > systems and chroot/container managers. I can see how it could be done by
> > the respective imeplementations themselves or provided by dpkg itself,
> > I'm open to any of these TBH.
>
> One possibly interesting option would be for dpkg to take responsibility
> for writing the tmpfiles.d configuration file for a package based on its
> own metadata
I think the other way round could also make sense: having dpkg create
variable/transient directories, and track them as owned by the package,
using its tmpfiles.d fragment(s) as input (either directly, or via a
debhelper step that takes tmpfiles.d as input and registers it with dpkg
as output).
That way, in the hopefully-common case where the upstream developer
of a system service installs a tmpfiles.d fragment for the files that
their package owns (most likely generated at build-time with appropriate
Autoconf/etc. @substitutions@), the packaged version will do the right
thing, without the packager having to take action specifically.
Prior art/naming: I think RPM "ghost files" are files tracked as owned
but not actually shipped in the RPM?
smcv
Reply to: