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 lenn...@poettering.net wrote: Hmm, I'd like such an automatism, but I'd really prefer if we could come

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 zbys...@in.waw.pl 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

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

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

2013-07-17 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 johan...@gmail.com wrote: On 07/16/2013 06:26 PM, Lennart Poettering wrote: I discussed this a bit more with Kay on the

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 suggest

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

2013-07-17 Thread Michael Biebl
2013/7/16 Lennart Poettering lenn...@poettering.net: 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

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

2013-07-17 Thread Michael Biebl
2013/7/17 Harald Hoyer harald.ho...@gmail.com: 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

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

2013-07-17 Thread Michael Biebl
2013/7/17 Michael Biebl mbi...@gmail.com: 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

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, very

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 mbi...@gmail.com: 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

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-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-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 mbi...@gmail.com 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

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

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 is

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

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 lenn...@poettering.net 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

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 in

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 zbys...@in.waw.pl 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

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 lenn...@poettering.net 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

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 slight

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, seems close

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 lenn...@poettering.net 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

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

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, and they

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 lenn...@poettering.net wrote: Hmm, I'd like such an automatism, but I'd really prefer if we could

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 a moment?

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 to...@pipebreaker.pl 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

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

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 directly.

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 johan...@gmail.com 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

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 johan...@gmail.com 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

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

2013-07-16 Thread Michael Biebl
2013/7/16 Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl: 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)

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 mbi...@gmail.com: 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

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 lenn...@poettering.net пишет: 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