Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o, zmedico@g.o
Subject: Re: [gentoo-dev] What's going on with the tmpfiles eclasses?
Date: Thu, 25 Apr 2019 21:26:38
Message-Id: 80d5bd6e07b5ec34b79253112a1d20d60de38437.camel@gentoo.org
In Reply to: Re: [gentoo-dev] What's going on with the tmpfiles eclasses? by Mike Gilbert
1 On Thu, 2019-04-25 at 17:24 -0400, Mike Gilbert wrote:
2 > On Tue, Apr 23, 2019 at 6:25 PM Zac Medico <zmedico@g.o> wrote:
3 > > On 4/23/19 2:03 PM, Michael Orlitzky wrote:
4 > > > We have two eclasses with almost-identical functions for handling
5 > > > tmpfiles.d entries:
6 > > >
7 > > > 1. systemd.eclass
8 > > >
9 > > > a. systemd_dotmpfilesd
10 > > > b. systemd_newtmpfilesd
11 > > > c. systemd_tmpfiles_create
12 > > >
13 > > > 2. tmpfiles.eclass
14 > > >
15 > > > a. dotmpfiles
16 > > > b. newtmpfiles
17 > > > c. tmpfiles_process
18 > > >
19 > > > The do/new functions are basically identical, while the create/process
20 > > > functions differ only in the fact that the one from tmpfiles.eclass
21 > > > supports opentmpfiles as well. Why do we have both? Couldn't the
22 > > > systemd.eclass ones be implemented in terms of the tmpfiles.eclass ones,
23 > > > and then deprecated (in favor of tmpfiles.eclass itself) in newer EAPIs?
24 > > >
25 > > > Or am I missing something?
26 > >
27 > > Note that systemd.eclass is lighter on dependencies, which is why I
28 > > chose it for the solution to bug 490676 [1] and bug 643386 [2] in the
29 > > sys-apps/portage ebuilds.
30 > >
31 > > [1] https://bugs.gentoo.org/490676
32 > > [2] https://bugs.gentoo.org/643386
33 >
34 > Having reviewed bug 643386, I would certainly call Portage's use of
35 > tmpfiles.d to be a "special case". There is no reason to depend on
36 > virtual/tmpfiles or to call tmpfiles --create in pkg_postinst.
37 >
38 > I don't think relying on the functions in systemd.eclass is a great
39 > solution. A couple of alternatives I would propose:
40 >
41 > 1. Add a magic variable to tmpfiles.eclass to disable the RDEPEND for
42 > packages that do not need to call tmpfiles --create on postinst or on
43 > system boot.
44 > 2. Revert back to insinto /usr/lib/tmpfiles.d and doins to avoid using
45 > tmpfiles.eclass or systemd.eclass.
46 >
47
48 3. Just live with the extra dependency given that some other package
49 will probably bring it anyway.
50
51 --
52 Best regards,
53 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] What's going on with the tmpfiles eclasses? Mike Gilbert <floppym@g.o>