Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Martin Pitt
Hey Lennart, Lennart Poettering [2015-01-27 0:55 +0100]: > Hmm? I don't see how mount propagation would break 60-cdrom_id... The > eject ioctl operates on the device node, and does not care for > mounts. This problem sounds made-up to me. Right now cdrom_id indeed wouldn't be affected as it does

Re: [systemd-devel] logind vs CAP_SYS_ADMIN-lessness

2015-01-27 Thread Christian Seiler
On a general note: the stuff I mentioned that I did to modify the container was just taken from the lxc-debian template that comes with LXC 1.0, and I didn't have time to look at it thoroughly to see what's actually needed there. The stuff I mentioned was more along the lines of 'what I did to get

Re: [systemd-devel] ConditionNeedsUpdate date comparison

2015-01-27 Thread Umut Tezduyar Lindskog
Hi, On Tue, Jan 27, 2015 at 1:35 AM, Lennart Poettering wrote: > On Mon, 26.01.15 14:00, Umut Tezduyar Lindskog (u...@tezduyar.com) wrote: > >> Hi, >> >> condition_test_needs_update() wants the timestamp of /usr to be newer >> than what is being checked. >> >> Is there a reason why we don't check

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 06:47, Andrei Borzenkov (arvidj...@gmail.com) wrote: > > Hmm, I see. In many ways this feels like VLAN setup from a > > configuration PoV, right? i.e. you have one hw device the driver > > creates, and then you configure a couple of additional interfaces on > > top of it. > > > >

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Martin Polednik
- Original Message - > From: "Lennart Poettering" > To: "Andrei Borzenkov" > Cc: "Martin Polednik" , > systemd-devel@lists.freedesktop.org, ibar...@redhat.com > Sent: Tuesday, January 27, 2015 1:21:32 PM > Subject: Re: [systemd-devel] persisting sriov_numvfs > > On Tue, 27.01.15 06:47

Re: [systemd-devel] Unwants

2015-01-27 Thread Lennart Poettering
On Thu, 22.01.15 13:54, Dimitri John Ledkov (dimitri.j.led...@intel.com) wrote: > Is there a way to remove / override wants that are specified via > .wants directory, .d snippet with "Wants=", or wants specified in the > unit itself? Dependencies are always additive and coalescing currently. We d

Re: [systemd-devel] Unwants

2015-01-27 Thread Lennart Poettering
On Thu, 22.01.15 14:08, Dimitri John Ledkov (dimitri.j.led...@intel.com) wrote: > > In any case, /etc overrides /run, so your example can never work. > > > > Oh, ok. But any combination of the two. E.g. for /etc to unwant from > /run then, or for /etc to unwant from /usr. > > At the moment, I'm

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Tom Gundersen
Hi Dan, On Mon, Jan 19, 2015 at 3:18 PM, Dan Kenigsberg wrote: > I'm an http://oVirt.org developer, and we plan to (finally) support > SR-IOV cards natively. Working on this feature, we've noticed that > something is missing in the platform OS. > > If I maintain a host with sr-iov cards, I'd like

Re: [systemd-devel] Unwants

2015-01-27 Thread Lennart Poettering
On Thu, 22.01.15 15:16, Dimitri John Ledkov (dimitri.j.led...@intel.com) wrote: > On 22 January 2015 at 14:46, Michael Biebl wrote: > > 2015-01-22 15:08 GMT+01:00 Dimitri John Ledkov : > >> At the moment, I'm looking at packaging symlinks in .wants directories > >> under /usr and then allow to un

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 09:40, Martin Pitt (martin.p...@ubuntu.com) wrote: > Hey Lennart, > > Lennart Poettering [2015-01-27 0:55 +0100]: > > Hmm? I don't see how mount propagation would break 60-cdrom_id... The > > eject ioctl operates on the device node, and does not care for > > mounts. This problem

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 07:35, Martin Polednik (mpoled...@redhat.com) wrote: > > > > Hmm, I see. In many ways this feels like VLAN setup from a > > > > configuration PoV, right? i.e. you have one hw device the driver > > > > creates, and then you configure a couple of additional interfaces on > > > > top

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Martin Polednik
- Original Message - > From: "Lennart Poettering" > To: "Martin Polednik" > Cc: "Andrei Borzenkov" , > systemd-devel@lists.freedesktop.org, ibar...@redhat.com > Sent: Tuesday, January 27, 2015 2:21:21 PM > Subject: Re: [systemd-devel] persisting sriov_numvfs > > On Tue, 27.01.15 07:35

Re: [systemd-devel] logind vs CAP_SYS_ADMIN-lessness

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 10:53, Christian Seiler (christ...@iwakd.de) wrote: > LXC predates systemd by about 2 years. (And at the very beginning, > systemd didn't support containers out of the box, so it predates > systemd's container support by even more.) And at that time, doing that > was a way to sysv

Re: [systemd-devel] Unwants

2015-01-27 Thread Dimitri John Ledkov
On 27 January 2015 at 12:38, Lennart Poettering wrote: > On Thu, 22.01.15 14:08, Dimitri John Ledkov (dimitri.j.led...@intel.com) > wrote: > >> > In any case, /etc overrides /run, so your example can never work. >> > >> >> Oh, ok. But any combination of the two. E.g. for /etc to unwant from >> /r

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Jóhann B. Guðmundsson
On 01/27/2015 12:40 PM, Tom Gundersen wrote: Hi Dan, On Mon, Jan 19, 2015 at 3:18 PM, Dan Kenigsberg wrote: I'm an http://oVirt.org developer, and we plan to (finally) support SR-IOV cards natively. Working on this feature, we've noticed that something is missing in the platform OS. If I mai

Re: [systemd-devel] Unwants

2015-01-27 Thread Dimitri John Ledkov
On 27 January 2015 at 12:42, Lennart Poettering wrote: > On Thu, 22.01.15 15:16, Dimitri John Ledkov (dimitri.j.led...@intel.com) > wrote: > >> On 22 January 2015 at 14:46, Michael Biebl wrote: >> > 2015-01-22 15:08 GMT+01:00 Dimitri John Ledkov >> > : >> >> At the moment, I'm looking at packag

Re: [systemd-devel] logind vs CAP_SYS_ADMIN-lessness

2015-01-27 Thread Christian Seiler
Am 27.01.2015 um 14:46 schrieb Lennart Poettering: > Note that $container_ttys= is actually just a frontend for dynamically > instantiating console-getty@.service instances for the specified > ptys. You can just enable them statically too. No, I can't, because you only support PTY numbers in that

Re: [systemd-devel] Examples in man pages

2015-01-27 Thread Christian Seiler
Just a heads-up: while reading the "Unwants" thread I noticed that dependencies are the only types of lists in unit files that can't be reset, so my example in there actually doesn't work, so please don't commit my patch just now. I'm writing more examples and will resubmit anyway. Christian

Re: [systemd-devel] Unwants

2015-01-27 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jan 27, 2015 at 01:36:41PM +0100, Lennart Poettering wrote: > On Thu, 22.01.15 13:54, Dimitri John Ledkov (dimitri.j.led...@intel.com) > wrote: > > > Is there a way to remove / override wants that are specified via > > .wants directory, .d snippet with "Wants=", or wants specified in the

Re: [systemd-devel] Unwants

2015-01-27 Thread Christian Seiler
Am 27.01.2015 um 15:45 schrieb Zbigniew Jędrzejewski-Szmek: > On Tue, Jan 27, 2015 at 01:36:41PM +0100, Lennart Poettering wrote: >> Dependencies are always additive and coalescing currently. We don't >> track which configuration file or automatic logic created which >> dependency, and hence it is

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Martin Pitt
Lennart Poettering [2015-01-27 13:52 +0100]: > So, why is this a new problem, and why do you say that > MountFlags=slave broke anything? I didn't say that. :-) I just said that due to this the two proposed solutions of cleaning up the mounts after CD ejection won't work. > I mean, cdrom_id cannot

Re: [systemd-devel] Unwants

2015-01-27 Thread Dimitri John Ledkov
On 27 January 2015 at 15:18, Christian Seiler wrote: > Am 27.01.2015 um 15:45 schrieb Zbigniew Jędrzejewski-Szmek: >> On Tue, Jan 27, 2015 at 01:36:41PM +0100, Lennart Poettering wrote: >>> Dependencies are always additive and coalescing currently. We don't >>> track which configuration file or au

Re: [systemd-devel] Examples in man pages

2015-01-27 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jan 27, 2015 at 03:19:51PM +0100, Christian Seiler wrote: > Just a heads-up: while reading the "Unwants" thread I noticed that > dependencies are the only types of lists in unit files that can't be > reset, so my example in there actually doesn't work, so please don't > commit my patch just

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 16:24, Martin Pitt (martin.p...@ubuntu.com) wrote: > > Well, again, the right answer then is to handle it with .mount units, > > How would that look like, on a very high level? Create .mount units on > the fly with udev rules when devices appear, and asking systemd to > unmount t

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Martin Pitt
Lennart Poettering [2015-01-27 17:22 +0100]: > The .mount units of device nodes already have a BindsTo= dependency on > their respective backing .device units. This should have the effect > that systemd will take the .mount units down if the .device units are > removed. Are you saying that doesn't

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Jóhann B. Guðmundsson
On 01/27/2015 01:41 PM, Martin Polednik wrote: - Original Message - From: "Lennart Poettering" To: "Martin Polednik" Cc: "Andrei Borzenkov" , systemd-devel@lists.freedesktop.org, ibar...@redhat.com Sent: Tuesday, January 27, 2015 2:21:21 PM Subject: Re: [systemd-devel] persisting sr

[systemd-devel] [PATCH v2 1/2] systemd.unit(5): add examples for common tasks

2015-01-27 Thread Christian Seiler
Add examples for (a) making units enableable and (b) overriding vendor settings to the man page. --- man/systemd.unit.xml | 164 +++ 1 file changed, 164 insertions(+) diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index e820b33..8714f70 10

[systemd-devel] [PATCH v2 2/2] systemd.service(5): add some simple examples

2015-01-27 Thread Christian Seiler
Add a couple of exampels, at least one for each service type that include some explanations and pointers to various relevant options. --- man/systemd.service.xml | 332 1 file changed, 332 insertions(+) diff --git a/man/systemd.service.xml b/man/sy

Re: [systemd-devel] Unwants

2015-01-27 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jan 27, 2015 at 03:50:49PM +, Dimitri John Ledkov wrote: > On 27 January 2015 at 15:18, Christian Seiler wrote: > > Am 27.01.2015 um 15:45 schrieb Zbigniew Jędrzejewski-Szmek: > >> On Tue, Jan 27, 2015 at 01:36:41PM +0100, Lennart Poettering wrote: > >>> Dependencies are always additiv

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Dave Reisner
On Tue, Jan 27, 2015 at 05:33:06PM +0100, Martin Pitt wrote: > Lennart Poettering [2015-01-27 17:22 +0100]: > > The .mount units of device nodes already have a BindsTo= dependency on > > their respective backing .device units. This should have the effect > > that systemd will take the .mount units

Re: [systemd-devel] persisting sriov_numvfs

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 08:41, Martin Polednik (mpoled...@redhat.com) wrote: > > b) Expose this via udev .link files. This would be appropriate if > >adding/removing VFs is a one-time thing, when a device pops > >up. This would be networking specific, not cover anything else like > >GPU or st

Re: [systemd-devel] Unwants

2015-01-27 Thread Dimitri John Ledkov
On 27 January 2015 at 16:47, Zbigniew Jędrzejewski-Szmek wrote: > On Tue, Jan 27, 2015 at 03:50:49PM +, Dimitri John Ledkov wrote: >> On 27 January 2015 at 15:18, Christian Seiler wrote: >> > Am 27.01.2015 um 15:45 schrieb Zbigniew Jędrzejewski-Szmek: >> >> On Tue, Jan 27, 2015 at 01:36:41PM

Re: [systemd-devel] networkd link file not setting MTU

2015-01-27 Thread Lennart Poettering
On Sun, 25.01.15 13:32, Ian Pilcher (arequip...@gmail.com) wrote: > It looks like that 99-default.link file is part of systemd, not some- > thing added by Fedora. Given that, wouldn't it make sense to document > the effect of this file in the systemd.link man page (i.e. to document > the fact tha

Re: [systemd-devel] ConditionNeedsUpdate date comparison

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 11:17, Umut Tezduyar Lindskog (u...@tezduyar.com) wrote: > > Well, this stuf is not intended to support downgrades. I don't think > > that can ever work... > > > > But anyway, I don't really understand what you are trying to say I > > must admit. Could you please elaborate? > > S

Re: [systemd-devel] [PATCH 1/2] logind: remove per-user runtime dir again if setup fails

2015-01-27 Thread Lennart Poettering
On Fri, 23.01.15 15:26, Christian Seiler (christ...@iwakd.de) wrote: > If setup of per-user runtime dir fails, clean up afterwards by removing > the directory before returning from the function, so we don't leave the > directory behind. > > If this is not done, the second time the user logs in lo

Re: [systemd-devel] [PATCH 2/2] logind: chown+chmod /run/user/$UID if mount(tmpfs) fails with EPERM

2015-01-27 Thread Lennart Poettering
On Fri, 23.01.15 15:26, Christian Seiler (christ...@iwakd.de) wrote: > In containers without CAP_SYS_ADMIN, it is not possible to mount tmpfs > (or any filesystem for that matter) on top of /run/user/$UID. > Previously, logind just failed in such a situation. > > Now, logind will resort to chown+

Re: [systemd-devel] [PATCH v2 1/2] systemd.unit(5): add examples for common tasks

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 17:45, Christian Seiler (christ...@iwakd.de) wrote: > Add examples for (a) making units enableable and (b) overriding vendor > settings to the man page. I am not a native english speaker, but I am not sure there's a word like "enableable" in the english language. Maybe rephrase t

Re: [systemd-devel] [systemd-commits] 5 commits - TODO configure.ac man/systemd.link.xml units/container-ge...@.service.m4.in units/systemd-resolved.service.in

2015-01-27 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jan 27, 2015 at 09:30:16AM -0800, Lennart Poettering wrote: > TODO |6 +- > configure.ac |8 +--- > man/systemd.link.xml | 16 +++- > units/container-ge...@.service.m4.in |4 ++-- > un

Re: [systemd-devel] [PATCH v2 1/2] systemd.unit(5): add examples for common tasks

2015-01-27 Thread Christian Seiler
Am 27.01.2015 um 19:12 schrieb Lennart Poettering: > On Tue, 27.01.15 17:45, Christian Seiler (christ...@iwakd.de) wrote: > >> Add examples for (a) making units enableable and (b) overriding vendor >> settings to the man page. > > I am not a native english speaker, but I am not sure there's a wor

Re: [systemd-devel] [systemd-commits] 5 commits - TODO configure.ac man/systemd.link.xml units/container-ge...@.service.m4.in units/systemd-resolved.service.in

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 19:14, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > On Tue, Jan 27, 2015 at 09:30:16AM -0800, Lennart Poettering wrote: > > TODO |6 +- > > configure.ac |8 +--- > > man/systemd.link.xml

Re: [systemd-devel] [PATCH v2 1/2] systemd.unit(5): add examples for common tasks

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 19:26, Christian Seiler (christ...@iwakd.de) wrote: > I know, but I wanted to have something that was easily understandable at > first glance that was already set in the original unit that would then > be overridden. I'll use Nice= instead, that's more likely to be > used. Yeah,

Re: [systemd-devel] [PATCH 2/2] logind: chown+chmod /run/user/$UID if mount(tmpfs) fails with EPERM

2015-01-27 Thread Christian Seiler
Am 27.01.2015 um 19:02 schrieb Lennart Poettering: > Merged this one too, made some changes first howver. I reworked this > to use our chmod_and_chown() helper, and removed the bit that checks > whether the mount point actually was a mount point after umount2(). I > really prefer if we can just che

[systemd-devel] [PATCH v3] systemd.unit(5): add examples for common tasks

2015-01-27 Thread Christian Seiler
Am 27.01.2015 um 19:32 schrieb Lennart Poettering: > On Tue, 27.01.15 19:26, Christian Seiler (christ...@iwakd.de) wrote: >> Will send second patch after your response to my question. > > Uh, which question are you precisely referring to? Forget it, I answered that question myself and forgot to e

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Topi Miettinen
On 01/26/15 21:04, Lennart Poettering wrote: > On Mon, 26.01.15 17:07, Topi Miettinen (toiwo...@gmail.com) wrote: > >> On 01/26/15 12:41, Simon McVittie wrote: >>> On 24/01/15 10:09, Topi Miettinen wrote: For example, smartd only needs access to /dev/sd*. >>> >>> Let me spell that differently

Re: [systemd-devel] [PATCH] Added UFD (Uplink failure detection) support to networkd

2015-01-27 Thread Tom Gundersen
Hi Alin, Thanks for working on this. I think the main concepts here make sense, but I have some comments on the implementation. So the main ideas are: 1) a notion of groups of links 2) a notion of up- and downlinks 3) configuring downlinks if and only if at least one uplink in the group has a c

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Topi Miettinen
On 01/26/15 23:46, Lennart Poettering wrote: >> But independently of the PrivateDevices thing, would you think >> tmpfiles.d could be extended to be usable for unit specific cases >> instead of just one global setup? I think there could be more uses, for >> example, creating directories and links i

Re: [systemd-devel] [PATCH] libudev-monitor: ensure proper string termination

2015-01-27 Thread Topi Miettinen
On 01/27/15 00:19, Lennart Poettering wrote: > On Sun, 25.01.15 07:10, Topi Miettinen (toiwo...@gmail.com) wrote: > >> On 01/25/15 03:34, Zbigniew Jędrzejewski-Szmek wrote: >>> On Sat, Jan 24, 2015 at 10:39:56AM +0200, Topi Miettinen wrote: Leave space for the terminating zero when reading an

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Topi Miettinen
On 01/27/15 01:54, Lennart Poettering wrote: > On Sun, 25.01.15 12:23, Topi Miettinen (toiwo...@gmail.com) wrote: > >> There's no need for CAP_CHOWN, CAP_DAC_OVERRIDE or CAP_FOWNER. > > Hmm, that's not true, is it? load_clock_timestamp() is invoked before > we drop privs in the daemon. And it cer

Re: [systemd-devel] [PATCH v2 2/2] systemd.service(5): add some simple examples

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 17:45, Christian Seiler (christ...@iwakd.de) wrote: > +Examples > + > + > +Simple service > + > +The following unit file creates a service > +that will execute > +

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 19:04, Topi Miettinen (toiwo...@gmail.com) wrote: > On 01/26/15 23:46, Lennart Poettering wrote: > >> But independently of the PrivateDevices thing, would you think > >> tmpfiles.d could be extended to be usable for unit specific cases > >> instead of just one global setup? I thin

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 18:51, Topi Miettinen (toiwo...@gmail.com) wrote: > On 01/26/15 21:04, Lennart Poettering wrote: > > On Mon, 26.01.15 17:07, Topi Miettinen (toiwo...@gmail.com) wrote: > > > >> On 01/26/15 12:41, Simon McVittie wrote: > >>> On 24/01/15 10:09, Topi Miettinen wrote: > For exam

Re: [systemd-devel] [PATCH v3] systemd.unit(5): add examples for common tasks

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 19:44, Christian Seiler (christ...@iwakd.de) wrote: > Am 27.01.2015 um 19:32 schrieb Lennart Poettering: > > On Tue, 27.01.15 19:26, Christian Seiler (christ...@iwakd.de) wrote: > >> Will send second patch after your response to my question. > > > > Uh, which question are you pre

[systemd-devel] [PATCH v3] systemd.service(5): add some simple examples

2015-01-27 Thread Christian Seiler
Am 27.01.2015 um 21:45 schrieb Lennart Poettering: > On Tue, 27.01.15 17:45, Christian Seiler (christ...@iwakd.de) wrote: >> +Note that systemd assumes here that the >> +program will continue running in the foreground >> +as lo

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 19:47, Topi Miettinen (toiwo...@gmail.com) wrote: > On 01/27/15 01:54, Lennart Poettering wrote: > > On Sun, 25.01.15 12:23, Topi Miettinen (toiwo...@gmail.com) wrote: > > > >> There's no need for CAP_CHOWN, CAP_DAC_OVERRIDE or CAP_FOWNER. > > > > Hmm, that's not true, is it? lo

Re: [systemd-devel] [PATCH v3] systemd.service(5): add some simple examples

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 22:10, Christian Seiler (christ...@iwakd.de) wrote: Thanks a ton! Applied! > Am 27.01.2015 um 21:45 schrieb Lennart Poettering: > > On Tue, 27.01.15 17:45, Christian Seiler (christ...@iwakd.de) wrote: > >> +Note that systemd assumes here that the > >> +

Re: [systemd-devel] [PATCH] Added UFD (Uplink failure detection) support to networkd

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 19:54, Tom Gundersen (t...@jklm.no) wrote: > Hi Alin, > > Thanks for working on this. > > I think the main concepts here make sense, but I have some comments on > the implementation. > > So the main ideas are: > > 1) a notion of groups of links > 2) a notion of up- and downlin

Re: [systemd-devel] Unwants

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 15:45, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > Yes, I think attempting any kind of dependency removal *from loaded > units* would be very complicated, and would require major surgery to > current unit engine. And things would become conceptually more complicated,

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Topi Miettinen
On 01/27/15 20:48, Lennart Poettering wrote: > On Tue, 27.01.15 19:04, Topi Miettinen (toiwo...@gmail.com) wrote: > >> On 01/26/15 23:46, Lennart Poettering wrote: But independently of the PrivateDevices thing, would you think tmpfiles.d could be extended to be usable for unit specific c

Re: [systemd-devel] Unwants

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 16:18, Christian Seiler (christ...@iwakd.de) wrote: > Or to put it this way: if you take the following things: > - the unit file itself > - all drop-ins > - all .requires.d/ > - all .wants.d/ > you could combine them (according to precedence rules) to a single large > unit fil

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 21:32, Topi Miettinen (toiwo...@gmail.com) wrote: > On 01/27/15 20:48, Lennart Poettering wrote: > > On Tue, 27.01.15 19:04, Topi Miettinen (toiwo...@gmail.com) wrote: > > > >> On 01/26/15 23:46, Lennart Poettering wrote: > But independently of the PrivateDevices thing, woul

Re: [systemd-devel] Unwants

2015-01-27 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jan 27, 2015 at 10:30:48PM +0100, Lennart Poettering wrote: > On Tue, 27.01.15 15:45, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > > > Yes, I think attempting any kind of dependency removal *from loaded > > units* would be very complicated, and would require major surgery to >

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Topi Miettinen
On 01/27/15 20:52, Lennart Poettering wrote: > On Tue, 27.01.15 18:51, Topi Miettinen (toiwo...@gmail.com) wrote: > >> On 01/26/15 21:04, Lennart Poettering wrote: >>> On Mon, 26.01.15 17:07, Topi Miettinen (toiwo...@gmail.com) wrote: >>> On 01/26/15 12:41, Simon McVittie wrote: > On 24/0

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 21:38, Topi Miettinen (toiwo...@gmail.com) wrote: > >> CAP_SYS_RAWIO, yes. Only read access is needed otherwise: > >> DevicePolicy=closed > >> DeviceAllow=block-sd r > >> DeviceAllow=/dev/sda r > >> DeviceAllow=/dev/sdb r > >> works fine here. > > > > You should be able to reduce

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 17:22, Lennart Poettering (lenn...@poettering.net) wrote: > On Tue, 27.01.15 16:24, Martin Pitt (martin.p...@ubuntu.com) wrote: > > > > Well, again, the right answer then is to handle it with .mount units, > > > > How would that look like, on a very high level? Create .mount uni

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Topi Miettinen
On 01/27/15 21:16, Lennart Poettering wrote: > On Tue, 27.01.15 19:47, Topi Miettinen (toiwo...@gmail.com) wrote: > >> On 01/27/15 01:54, Lennart Poettering wrote: >>> On Sun, 25.01.15 12:23, Topi Miettinen (toiwo...@gmail.com) wrote: >>> There's no need for CAP_CHOWN, CAP_DAC_OVERRIDE or CAP

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Topi Miettinen
On 01/27/15 21:35, Lennart Poettering wrote: > On Tue, 27.01.15 21:32, Topi Miettinen (toiwo...@gmail.com) wrote: > >> On 01/27/15 20:48, Lennart Poettering wrote: >>> On Tue, 27.01.15 19:04, Topi Miettinen (toiwo...@gmail.com) wrote: >>> On 01/26/15 23:46, Lennart Poettering wrote: >> Bu

Re: [systemd-devel] PrivateDevices with more than basic set of devices?

2015-01-27 Thread Topi Miettinen
On 01/27/15 21:40, Lennart Poettering wrote: > On Tue, 27.01.15 21:38, Topi Miettinen (toiwo...@gmail.com) wrote: > CAP_SYS_RAWIO, yes. Only read access is needed otherwise: DevicePolicy=closed DeviceAllow=block-sd r DeviceAllow=/dev/sda r DeviceAllow=/dev/sdb r works

Re: [systemd-devel] [PATCH] sysv-generator: Handle .sh suffixes when translating Provides:

2015-01-27 Thread Lennart Poettering
On Tue, 20.01.15 17:44, Martin Pitt (martin.p...@ubuntu.com) wrote: > Hey all, > > the recent fix for sysv-generator's Provides: handling [1] caused, or > rather uncovered, another bug which now creates symlinks to itself > "foo.service -> foo.service" for any /etc/init.d/foo.sh. > > The generat

Re: [systemd-devel] [PATCH v3] sysv-generator: Handle .sh suffixes when translating Provides:

2015-01-27 Thread Lennart Poettering
On Wed, 21.01.15 14:55, Martin Pitt (martin.p...@ubuntu.com) wrote: > Martin Pitt [2015-01-21 9:49 +0100]: > > One more adjustment to master, considering a recent change in the > > sysv-generator tests. > > Thomas and Michael both reviewed this patch, it's quite > straightforward, and it fixes q

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 21:58, Topi Miettinen (toiwo...@gmail.com) wrote: > > Well, to enable stateless systems I think it is a good idea to write > > services in a way that they can rebuild what they need in /var on > > their own, should it be missing, so that /var can be flushed out and > > things will

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Martin Pitt
Hey Lennart, Lennart Poettering [2015-01-27 22:46 +0100]: > So I figure the bit that is missing here is the fact that the .device > units for CD drives and USB card readers don't care for media sense right > now. Indeed, I had a similar thought on my evening walk: This works well for USB sticks a

Re: [systemd-devel] [PATCH v3] sysv-generator: Handle .sh suffixes when translating Provides:

2015-01-27 Thread Martin Pitt
Lennart Poettering [2015-01-27 23:11 +0100]: > Which one is the "other one" you refer to? That was http://lists.freedesktop.org/archives/systemd-devel/2015-January/027249.html Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Devel

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Lennart Poettering
On Fri, 23.01.15 10:18, Martin Pitt (martin.p...@ubuntu.com) wrote: > So perhaps the more robust fix would be to make the gpt generator not > generate swap units if fstab already configures any swap device? I. e. > auto-discovery and swaps in fstab are mutually exclusive then. Hmm, so there's som

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 23:20, Martin Pitt (martin.p...@ubuntu.com) wrote: > Hey Lennart, > > Lennart Poettering [2015-01-27 22:46 +0100]: > > So I figure the bit that is missing here is the fact that the .device > > units for CD drives and USB card readers don't care for media sense right > > now. > >

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Martin Pitt
Lennart Poettering [2015-01-27 22:46 +0100]: > However, I think it would make a ton of sense to change that, and set > SYSTEMD_READY=0 on all block devices where the media sensing suggests > that no medium is in it. Thinking about it again, we already know that this rule in 60-cdrom_id.rules still

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 23:31, Lennart Poettering (lenn...@poettering.net) wrote: > On Fri, 23.01.15 10:18, Martin Pitt (martin.p...@ubuntu.com) wrote: > > > So perhaps the more robust fix would be to make the gpt generator not > > generate swap units if fstab already configures any swap device? I. e. >

Re: [systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 23:33, Martin Pitt (martin.p...@ubuntu.com) wrote: > Lennart Poettering [2015-01-27 22:46 +0100]: > > However, I think it would make a ton of sense to change that, and set > > SYSTEMD_READY=0 on all block devices where the media sensing suggests > > that no medium is in it. > > T

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 23:40, Lennart Poettering (lenn...@poettering.net) wrote: > On Tue, 27.01.15 23:31, Lennart Poettering (lenn...@poettering.net) wrote: > > > On Fri, 23.01.15 10:18, Martin Pitt (martin.p...@ubuntu.com) wrote: > > > > > So perhaps the more robust fix would be to make the gpt gene

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Cameron Norman
On Tue, Jan 27, 2015 at 1:16 PM, Lennart Poettering wrote: > On Tue, 27.01.15 19:47, Topi Miettinen (toiwo...@gmail.com) wrote: > >> I'm not sure. Shouldn't we then ship a SELinux policy file then? Would >> you be interested in AppArmor profile for timesyncd, I have one? Also, >> if a distro uses

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Cameron Norman
On Tue, Jan 27, 2015 at 1:58 PM, Topi Miettinen wrote: > > Well, I'm no expert on AppArmor policies. This is what I have: > > #include > > /lib/systemd/systemd-timesyncd { I am not sure how that would be done, but this needs to handle timesyncd being in /usr/lib/systemd as well as /lib. Also, a

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Jóhann B. Guðmundsson
On 01/27/2015 10:48 PM, Lennart Poettering wrote: Another idea might be to simply accept that activating the swap by two names at the same time can happen concurrently, and teach mkswap in some way to handle this gracefully. For example, mkswap could learn a new switch --idempotent or so, which

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 23:48, Lennart Poettering (lenn...@poettering.net) wrote: > > That said, it would of course be nicer if we wouldn't have to > > serialize here... > > Another idea might be to simply accept that activating the swap by two > names at the same time can happen concurrently, and teach

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 23:29, Jóhann B. Guðmundsson (johan...@gmail.com) wrote: > > On 01/27/2015 10:48 PM, Lennart Poettering wrote: > >Another idea might be to simply accept that activating the swap by two > >names at the same time can happen concurrently, and teach mkswap in > >some way to handle th

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 14:58, Cameron Norman (camerontnor...@gmail.com) wrote: > On Tue, Jan 27, 2015 at 1:16 PM, Lennart Poettering > wrote: > > On Tue, 27.01.15 19:47, Topi Miettinen (toiwo...@gmail.com) wrote: > > > >> I'm not sure. Shouldn't we then ship a SELinux policy file then? Would > >> you b

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Chris Murphy
On Tue, Jan 27, 2015 at 5:05 PM, Lennart Poettering wrote: > On Tue, 27.01.15 23:29, Jóhann B. Guðmundsson (johan...@gmail.com) wrote: > >> >> On 01/27/2015 10:48 PM, Lennart Poettering wrote: >> >Another idea might be to simply accept that activating the swap by two >> >names at the same time can

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 15:12, Cameron Norman (camerontnor...@gmail.com) wrote: > Lennart: if you really want to test the profile, you just need to spin > up an OpenSuSE, Ubuntu, or Debian VM (on debian you need to install > and enable apparmor, which takes a short while). Well, I have no personal inter

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Lennart Poettering
On Tue, 27.01.15 17:17, Chris Murphy (li...@colorremedies.com) wrote: > > The problem is simply that we cannot know in advance that /dev/sda7 > > and /dev/disk/by-uuid/c0e7978b-f82b-4b7f-b72b-6717f6909abc will > > eventually refer to the same device. > > Are these just scary looking warnings? I

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Jóhann B. Guðmundsson
On 01/28/2015 12:24 AM, Lennart Poettering wrote: On Tue, 27.01.15 17:17, Chris Murphy (li...@colorremedies.com) wrote: > >The problem is simply that we cannot know in advance that /dev/sda7 > >and /dev/disk/by-uuid/c0e7978b-f82b-4b7f-b72b-6717f6909abc will > >eventually refer to the same devi

Re: [systemd-devel] [PATCH] sysv-generator: Replace Provides: symlinks with real units

2015-01-27 Thread Lennart Poettering
On Wed, 21.01.15 10:46, Martin Pitt (martin.p...@ubuntu.com) wrote: > A similar case can also happen if > one init.d script Provides: the name of another init.d script > (arguably this is at least questionable, but it might happen in > practice -- e. g. /etc/init.d/mariad might very well "Provides

Re: [systemd-devel] [PATCH] sysv-generator: Replace Provides: symlinks with real units

2015-01-27 Thread Lennart Poettering
On Wed, 21.01.15 11:08, Martin Pitt (martin.p...@ubuntu.com) wrote: > Hey Jóhann, > > "Jóhann B. Guðmundsson" [2015-01-21 9:59 +]: > > Seems like a corner case as administrator should fix himself by not backing > > up files in the /etc/init.d directory so arguably this broken behaviour is >

Re: [systemd-devel] Swap gets activated twice (through fstab and gpt generators)

2015-01-27 Thread Chris Murphy
On Tue, Jan 27, 2015 at 5:28 PM, "Jóhann B. Guðmundsson" wrote: > > On 01/28/2015 12:24 AM, Lennart Poettering wrote: >> >> On Tue, 27.01.15 17:17, Chris Murphy (li...@colorremedies.com) wrote: >> > >The problem is simply that we cannot know in advance that /dev/sda7 > >and /dev/disk/by-

Re: [systemd-devel] [PATCH] sysv-generator: Replace Provides: symlinks with real units

2015-01-27 Thread Lennart Poettering
On Wed, 21.01.15 19:56, Jóhann B. Guðmundsson (johan...@gmail.com) wrote: > > On 01/21/2015 03:43 PM, Zbigniew Jędrzejewski-Szmek wrote: > >On Wed, Jan 21, 2015 at 11:08:44AM +0100, Martin Pitt wrote: > >>>So I expect if it gets dropped upstream, a lot of distros (and all the > >>>major ones) wil

Re: [systemd-devel] [systemd-commits] src/journal

2015-01-27 Thread Lennart Poettering
On Mon, 19.01.15 10:43, Zbigniew Jędrzejewski-Szmek (zbys...@kemper.freedesktop.org) wrote: > src/journal/journalctl.c | 28 ++-- > 1 file changed, 14 insertions(+), 14 deletions(-) > > New commits: > commit 40f0b71b063da6a36b8d7ec75ef20103abd18243 > Author: Zbigniew J

Re: [systemd-devel] failing boot start jobs delay reboot

2015-01-27 Thread Lennart Poettering
On Mon, 19.01.15 17:59, Felix Miata (mrma...@earthlink.net) wrote: > Has anything been done in more recent releases about this? I do a lot of > cloning, and sometimes produce typos on grub cmdlines and fstab lines. This > produces long delays in init followed by emergency mode when the > non-essen

Re: [systemd-devel] failing boot start jobs delay reboot

2015-01-27 Thread Lennart Poettering
On Mon, 19.01.15 23:03, Felix Miata (mrma...@earthlink.net) wrote: > Andrei Borzenkov composed on 2015-01-20 06:35 (UTC+0300): > > > Mon, 19 Jan 2015 17:59:41 -0500 Felix Miata composed: > > >> Has anything been done in more recent releases about this? I do a lot of > >> cloning, and sometimes p

Re: [systemd-devel] failing boot start jobs delay reboot

2015-01-27 Thread Lennart Poettering
On Tue, 20.01.15 11:24, Andrei Borzenkov (arvidj...@gmail.com) wrote: > > When they occur during init they repeat during shutdown. Even when > > I > > let init complete and succeed to fix the typo or oversight, the init failure > > gets remembered and repeated at shutdown. > > Yes, that

Re: [systemd-devel] failing boot start jobs delay reboot

2015-01-27 Thread Lennart Poettering
On Wed, 28.01.15 02:02, Lennart Poettering (lenn...@poettering.net) wrote: > On Mon, 19.01.15 17:59, Felix Miata (mrma...@earthlink.net) wrote: > > > Has anything been done in more recent releases about this? I do a lot of > > cloning, and sometimes produce typos on grub cmdlines and fstab lines.

Re: [systemd-devel] Making udev emit a signal when it is done loading modules

2015-01-27 Thread Lennart Poettering
On Sat, 17.01.15 17:03, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > On Sat, Jan 17, 2015 at 09:44:00AM +0100, Hans de Goede wrote: > > We would like > > udev to emit a signal (ABI to be discussed) when it is done > > trying to load modules for everything which was already enumerated >

Re: [systemd-devel] [PATCH] timedated: support split usr v3

2015-01-27 Thread Lennart Poettering
On Sun, 18.01.15 10:53, Shawn Landden (sh...@churchofgit.com) wrote: > From: Shawn Paul Landden > > The current Debian solution to this is really ugly, and I would rather > have them use the correct patch even if split usr is dumb. Again, I really don't grok what the point of this is. The right

Re: [systemd-devel] systemd-216 breaks combined ReadOnlyDirectories / ReadWriteDirectories

2015-01-27 Thread Lennart Poettering
On Tue, 20.01.15 13:48, Reindl Harald (h.rei...@thelounge.net) wrote: > after upgrade to Fedora 21 with new systemd namespaces like below no longer > works which breaks *all my systemd-units* > > why? > > ReadOnlyDirectories=/var/lib > ReadWriteDirectories=/var/lib/mysql I cannot reproduce this

  1   2   >