Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-19 Thread Michael Scherer
Le mardi 16 juillet 2013 à 17:59 +0100, Colin Guthrie a écrit : > 'Twas brillig, and Kay Sievers at 16/07/13 17:24 did gyre and gimble: > > On Tue, Jul 16, 2013 at 6:01 PM, Lennart Poettering > > wrote: > > > >> Hmm, I'd like such an automatism, but I'd really prefer if we could come > >> up with

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-18 Thread Jóhann B. Guðmundsson
On 07/18/2013 12:51 AM, Lennart Poettering wrote: Fedora is not completely converted, but here are some stats. $ repoquery --whatprovides '/etc/rc.d/init.d/*' --qf "%{name}" | sort -u | egrep -v '(-sysvinit|-initscript|-sysv)$' | wc -l 139 Well even that number is not accurate si

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-18 Thread Kay Sievers
On Thu, Jul 18, 2013 at 4:50 AM, Zbigniew Jędrzejewski-Szmek wrote: > On Thu, Jul 18, 2013 at 02:51:09AM +0200, Lennart Poettering wrote: > [snip repoquery magic] > >> This means: ~81% of the packages have been converted from sysv to >> systemd. And ~10% of the converted packages make use of tmpfi

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jul 18, 2013 at 02:51:09AM +0200, Lennart Poettering wrote: [snip repoquery magic] > This means: ~81% of the packages have been converted from sysv to > systemd. And ~10% of the converted packages make use of tmpfiles. > > Now, my rpm/yum-fu is a bit too limited to easily figure out what

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Lennart Poettering
On Wed, 17.07.13 11:24, Michael Biebl (mbi...@gmail.com) wrote: > > 2013/7/17 Michael Biebl : > > If this scheme is not flexible enough to cover the vast majority of > > all cases (for services), then I fear we'd end up half of the services > > using RuntimeDirectory, the other half a tmpfile. An

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Lennart Poettering
On Wed, 17.07.13 11:07, Michael Biebl (mbi...@gmail.com) wrote: > > 2013/7/16 Lennart Poettering : > > > I'd be very conservative regarding adding full tmpfiles support into > > unit files directly. Instead, I'd suggest adding two very minimal, very > > specific new unit file settings: > > > > R

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Lennart Poettering
On Wed, 17.07.13 06:56, Andrey Borzenkov (arvidj...@gmail.com) wrote: > > On Tue, 16.07.13 18:53, Lennart Poettering (lenn...@poettering.net) wrote: > > > > I'd be very conservative regarding adding full tmpfiles support into > > unit files directly. Instead, I'd suggest adding two very minimal,

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Michael Biebl
2013/7/17 Michael Biebl : > If this scheme is not flexible enough to cover the vast majority of > all cases (for services), then I fear we'd end up half of the services > using RuntimeDirectory, the other half a tmpfile. And that imho would > be even more confusing. Could we have some stats from F

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Michael Biebl
2013/7/17 Harald Hoyer : > If RuntimeDirectory would support variable substitutions, this feature could > not > be provided with systemd-tmpfiles. That would indeed be a nice feature. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Michael Biebl
2013/7/16 Lennart Poettering : > I'd be very conservative regarding adding full tmpfiles support into > unit files directly. Instead, I'd suggest adding two very minimal, very > specific new unit file settings: > > RuntimeDirectory= > RuntimeDirectoyMode= > > If RuntimeDirectory= is set we'd creat

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-17 Thread Harald Hoyer
On 07/16/2013 09:28 PM, "Jóhann B. Guðmundsson" wrote: > On 07/16/2013 06:26 PM, Lennart Poettering wrote: >> I discussed this a bit more with Kay on the phone. Here's what we'd propose: >> >> I'd be very conservative regarding adding full tmpfiles support into >> unit files directly. Instead, I'd

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Tomasz Torcz
On Tue, Jul 16, 2013 at 07:41:08PM +, "Jóhann B. Guðmundsson" wrote: > On 07/16/2013 07:34 PM, Kay Sievers wrote: > >On Tue, Jul 16, 2013 at 9:28 PM, "Jóhann B. Guðmundsson" > > wrote: > >>On 07/16/2013 06:26 PM, Lennart Poettering wrote: > >>>I discussed this a bit more with Kay on the phone.

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Andrey Borzenkov
В Tue, 16 Jul 2013 20:26:23 +0200 Lennart Poettering пишет: > On Tue, 16.07.13 18:53, Lennart Poettering (lenn...@poettering.net) wrote: > > I'd be very conservative regarding adding full tmpfiles support into > unit files directly. Instead, I'd suggest adding two very minimal, very > specific n

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Michael Biebl
And to follow up on that: 2013/7/16 Michael Biebl : > I think it's even less of an issue for Debian, as we usually only > install stuff when needed and not in a disabled state. So the unused directories in /run are something I don't expect to be an issue for Debian. As for tmpfiles support: In D

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Michael Biebl
2013/7/16 Zbigniew Jędrzejewski-Szmek : > On Tue, Jul 16, 2013 at 05:08:12PM +0100, Colin Guthrie wrote: >> I am not too concerned about unused runtime directories. After all this >> is not something that would (or even could) grow without bounds. There >> will never be more than O(n) runtime dire

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Jóhann B. Guðmundsson
On 07/16/2013 07:34 PM, Kay Sievers wrote: On Tue, Jul 16, 2013 at 9:28 PM, "Jóhann B. Guðmundsson" wrote: On 07/16/2013 06:26 PM, Lennart Poettering wrote: I discussed this a bit more with Kay on the phone. Here's what we'd propose: I'd be very conservative regarding adding full tmpfiles sup

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Kay Sievers
On Tue, Jul 16, 2013 at 9:28 PM, "Jóhann B. Guðmundsson" wrote: > On 07/16/2013 06:26 PM, Lennart Poettering wrote: >> >> I discussed this a bit more with Kay on the phone. Here's what we'd >> propose: >> >> I'd be very conservative regarding adding full tmpfiles support into >> unit files directl

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jul 16, 2013 at 07:28:12PM +, "Jóhann B. Guðmundsson" wrote: > On 07/16/2013 06:26 PM, Lennart Poettering wrote: > >I discussed this a bit more with Kay on the phone. Here's what we'd propose: > > > >I'd be very conservative regarding adding full tmpfiles support into > >unit files dire

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Jóhann B. Guðmundsson
On 07/16/2013 06:26 PM, Lennart Poettering wrote: I discussed this a bit more with Kay on the phone. Here's what we'd propose: I'd be very conservative regarding adding full tmpfiles support into unit files directly. Instead, I'd suggest adding two very minimal, very specific new unit file setti

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Kay Sievers
On Tue, Jul 16, 2013 at 9:17 PM, Tomasz Torcz wrote: >> If RuntimeDirectory= is set we'd create it and chown() it to the UID/GID >> set with User= and Group=. We'd apply the mode specified in >> RuntimeDirectoryMode= to it. > > There are daemons which do, in order: > 1) start as root > 2) open

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Tomasz Torcz
On Tue, Jul 16, 2013 at 08:26:23PM +0200, Lennart Poettering wrote: > On Tue, 16.07.13 18:53, Lennart Poettering (lenn...@poettering.net) wrote: > > > > > I can do a mass update to all our packages anyway so the slight change > > > > in syntax isn't a problem. > > > Hm, can we take a step back for

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Lennart Poettering
On Tue, 16.07.13 17:59, Colin Guthrie (co...@mageia.org) wrote: > > 'Twas brillig, and Kay Sievers at 16/07/13 17:24 did gyre and gimble: > > On Tue, Jul 16, 2013 at 6:01 PM, Lennart Poettering > > wrote: > > > >> Hmm, I'd like such an automatism, but I'd really prefer if we could come > >> up

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Lennart Poettering
On Tue, 16.07.13 18:53, Lennart Poettering (lenn...@poettering.net) wrote: > > > I can do a mass update to all our packages anyway so the slight change > > > in syntax isn't a problem. > > Hm, can we take a step back for a moment? It seems that the rpm macros > > are a fairly complicated solution,

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Jóhann B. Guðmundsson
On 07/16/2013 04:53 PM, Lennart Poettering wrote: On my (pretty much fully converted) Fedora I currently have 20 tmpfiles snippets around. I doubt on an everage Debian machine this would grow much larger. May 40 or so, but that's still not much. Well we have only migrated what 400 components o

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Colin Guthrie
'Twas brillig, and Kay Sievers at 16/07/13 17:24 did gyre and gimble: > On Tue, Jul 16, 2013 at 6:01 PM, Lennart Poettering > wrote: > >> Hmm, I'd like such an automatism, but I'd really prefer if we could come >> up with some scheme to automatically determine all tmpfiles snippets in >> the pack

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Lennart Poettering
On Tue, 16.07.13 18:34, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > > On Tue, Jul 16, 2013 at 05:08:12PM +0100, Colin Guthrie wrote: > > 'Twas brillig, and Lennart Poettering at 16/07/13 17:01 did gyre and gimble: > > > Anyway, does that RPM macro sound good to you? > > > > Sure, see

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Lennart Poettering
On Tue, 16.07.13 17:08, Colin Guthrie (gm...@colin.guthr.ie) wrote: > > 'Twas brillig, and Lennart Poettering at 16/07/13 17:01 did gyre and gimble: > > Anyway, does that RPM macro sound good to you? > > Sure, seems close enough :) > > I can do a mass update to all our packages anyway so the sl

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Lennart Poettering
On Tue, 16.07.13 18:24, Kay Sievers (k...@vrfy.org) wrote: > > On Tue, Jul 16, 2013 at 6:01 PM, Lennart Poettering > wrote: > > > Hmm, I'd like such an automatism, but I'd really prefer if we could come > > up with some scheme to automatically determine all tmpfiles snippets in > > the package

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Tom Gundersen
On Tue, Jul 16, 2013 at 6:34 PM, Zbigniew Jędrzejewski-Szmek wrote: > Hm, can we take a step back for a moment? It seems that the rpm macros > are a fairly complicated solution, and they also don't carry over into > debian or arch. User mode sessions also will not work with rpm macros. For what i

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jul 16, 2013 at 05:08:12PM +0100, Colin Guthrie wrote: > 'Twas brillig, and Lennart Poettering at 16/07/13 17:01 did gyre and gimble: > > Anyway, does that RPM macro sound good to you? > > Sure, seems close enough :) > > I can do a mass update to all our packages anyway so the slight change

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Kay Sievers
On Tue, Jul 16, 2013 at 6:01 PM, Lennart Poettering wrote: > Hmm, I'd like such an automatism, but I'd really prefer if we could come > up with some scheme to automatically determine all tmpfiles snippets in > the package and apply them all automatically. But I am not sure how that > could be don

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Colin Guthrie
'Twas brillig, and Lennart Poettering at 16/07/13 17:01 did gyre and gimble: > Anyway, does that RPM macro sound good to you? Sure, seems close enough :) I can do a mass update to all our packages anyway so the slight change in syntax isn't a problem. Col -- Colin Guthrie gmane(at)colin.guthr

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Lennart Poettering
On Tue, 16.07.13 16:50, Colin Guthrie (gm...@colin.guthr.ie) wrote: > 3. Finally I settled on: > > %_tmpfilesdir /usr/lib/tmpfiles.d > %_tmpfilescreate() /usr/bin/systemd-tmpfiles --create %{1}.conf \ > %{nil} > This looks pretty close to what I'd like to see in place. Note that %_tmpfilesdir i

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Colin Guthrie
'Twas brillig, and Lennart Poettering at 16/07/13 16:00 did gyre and gimble: > Something I'd love to see though is if we could make it easier to apply > tmpfiles stuff automatically on package installation. More specifically, > I'd like an RPM macro to be added that handles this, and which is > suf

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Lennart Poettering
On Tue, 16.07.13 03:24, Michael Biebl (mbi...@gmail.com) wrote: > Hi, > > an interesting issue was raised as part of reviewing a patch for > iodione [1], a system service which needs a runtime directory. We > thought this might need further dicussion, so reposting the issue to > systemd-devel: >

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Tom Gundersen
Hi Michael, On Tue, Jul 16, 2013 at 3:24 AM, Michael Biebl wrote: > an interesting issue was raised as part of reviewing a patch for > iodione [1], a system service which needs a runtime directory. We > thought this might need further dicussion, so reposting the issue to > systemd-devel: > > For

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-16 Thread Colin Guthrie
'Twas brillig, and Michael Biebl at 16/07/13 02:24 did gyre and gimble: > Hi, > > an interesting issue was raised as part of reviewing a patch for > iodione [1], a system service which needs a runtime directory. We > thought this might need further dicussion, so reposting the issue to > systemd-de

Re: [systemd-devel] runtime directories for services vs. tmpfiles

2013-07-15 Thread Michael Biebl
2013/7/16 Michael Biebl : > For system services needing a runtime directory, we basically have two > (three) options nowadays > 1/ use ExecStartPre=/usr/bin/mkdir /var/run/foo > 2/ use a tmpfile snippet > (3/ let the daemon create the runtime directory itself) > > In [1] we recommended the the usag

[systemd-devel] runtime directories for services vs. tmpfiles

2013-07-15 Thread Michael Biebl
Hi, an interesting issue was raised as part of reviewing a patch for iodione [1], a system service which needs a runtime directory. We thought this might need further dicussion, so reposting the issue to systemd-devel: For system services needing a runtime directory, we basically have two (three)