[systemd-devel] [RFC/PATCH] tmpfiles: implement --transform=rpm

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sun Mar 2 06:38:43 PST 2014


On Sun, Mar 02, 2014 at 06:14:58AM +0100, Kay Sievers wrote:
> On Sun, Mar 2, 2014 at 3:06 AM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
> > +               "     --transform=rpm       Create files list suitable for RPM %%files section\n"
> 
> Hmm, can't we maybe come up with something that isn't specific to rpm
> or dpkg, something that is easily parsed but not bound to the
> internals of the format of the files?
> 
> It sounds like the-wrong-way-around to encode packaging formats into
> high-level systemd tools. In the end, both formats are really a blast
> from the past, and represent the status quo, but are surely not the
> future of how packaging of of a modern Linux system should look like,
> so it might be nicer to make it generic?

Something like this would certainly work too:
output from systemd-tmpfiles would be just
/some/file
/some/dir/
...

and it would be used as

%install
systemd-tmpfiles --transform=list ... | sed 's|.*/$|%dir \0|; s|^/|%ghost /;' > .tmpfiles.list

This makes the "consumer" side slightly more complex, but I guess we could
wrap this is in a macro too.

Zbyszek


More information about the systemd-devel mailing list