[systemd-devel] binding tmpfiles.d to unit startup

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Mar 1 11:26:23 PST 2014


On Sat, Mar 01, 2014 at 02:46:45PM +0000, Colin Walters wrote:
> 2) Loss of association between package data and directory.  While
> this is
>    pretty minor, it *is* useful to be able to do rpm -qf /var/kerberos
>    and see that it comes from the "krb5-libs" package.
On a related note, I want to generate rpm %files contents from tmpfiles
snippets. I think it should work like this:

--------------------------------

%build
systemd-tmpfiles --generate-rpm-files %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf >.tpmfiles.list

%files -f .tmpfiles.list

%post
systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf

--------------------------------

Where the output out tmpfiles --generate-rpm-files [name subject to change],
would be something like:

%ghost /var/name/

The point is that this will simplify rpm packaging by removing the need
to repeat the list in two places.

Zbyszek


More information about the systemd-devel mailing list