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

2014-03-02 Thread Zbigniew Jędrzejewski-Szmek
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
 zbys...@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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-02 Thread Lennart Poettering
On Sun, 02.03.14 15:38, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:

 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
  zbys...@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 could even be turned into a shell read loop I figure... I do like
the general concept.

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

I am pretty sure that whatever we end up adding here, it should come
with an RPM macro from day 1, so that we have some freedom to change
around later on should we need it.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-01 Thread Kay Sievers
On Sun, Mar 2, 2014 at 3:06 AM, Zbigniew Jędrzejewski-Szmek
zbys...@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?

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel