[systemd-devel] [PATCH] units: user@.service: fix user bus path

2013-12-27 Thread Mantas Mikulėnas
--- units/u...@.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units/u...@.service.in b/units/u...@.service.in index 3f8b59d..1deefb0 100644 --- a/units/u...@.service.in +++ b/units/u...@.service.in @@ -14,5 +14,5 @@ User=%I PAMName=systemd-user Type=notify

[systemd-devel] [PATCH] bus: PORTING-DBUS1: fix user bus path

2013-12-27 Thread Mantas Mikulėnas
--- src/libsystemd-bus/PORTING-DBUS1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd-bus/PORTING-DBUS1 b/src/libsystemd-bus/PORTING-DBUS1 index b8a6ff7..ca8f31c 100644 --- a/src/libsystemd-bus/PORTING-DBUS1 +++ b/src/libsystemd-bus/PORTING-DBUS1 @@ -516,7 +516,7

[systemd-devel] Code=exited, status=16 :: While Stopping

2013-12-27 Thread Chinmay Mahata
Hi, nbsp;nbsp;nbsp; I have written a systemd service script for one my daemons. The service is of Type=forking. When starting the service everything is working fine and I am getting status SUCCESS. But while I am stopping the service I am getting failed state error like code=exited, status=15.

Re: [systemd-devel] Code=exited, status=16 :: While Stopping

2013-12-27 Thread Mantas Mikulėnas
On Fri, Dec 27, 2013 at 10:36 AM, Chinmay Mahata chinmay_mah...@rediffmail.com wrote: Hi, I have written a systemd service script for one my daemons. The service is of Type=forking. When starting the service everything is working fine and I am getting status SUCCESS. But while I am

[systemd-devel] [PATCH RFC] namespace: make sure ReadWriteDirectories are actually writable

2013-12-27 Thread Michael Olbrich
Currently adding directories to ReadWriteDirectories= only restores the original mount flags. So e.g. setting ReadOnlyDirectories=/usr and ReadWriteDirectories=/usr/local works as expected if the underlying file system was writable. However, setting ReadWriteDirectories= has no effect if the

[systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Holger Schurig
Hi all, I'm using systemd for embedded devices. The kernel is compiled for the target and I don't need / use an initrd, as all device drivers are known beforehand and I like the faster boot speed. That means that / is mounted read-only when systemd starts. However, systemd (and also journald, as

Re: [systemd-devel] [PATCH] man: fix Type= reference

2013-12-27 Thread Marcos Felipe Rasia de Mello
Thanks for the correction. -- Marcos 2013/12/27 Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl: On Fri, Dec 27, 2013 at 07:46:20AM +0200, Mantas Mikulėnas wrote: On Thu, Dec 26, 2013 at 11:01 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Thu, Dec 26, 2013 at 05:47:57PM -0200,

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Holger Schurig
I was in error about this: 3. Now it tries to generate a machine ID and tries to write it into /run/machine-id. Again this fails, because /run is still on the same partition as /, and it is still not writable. FAIL ! When there is no writable or readable /etc/machine-id, then it won't even

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Mantas Mikulėnas
On Fri, Dec 27, 2013 at 12:35 PM, Holger Schurig holgerschu...@gmail.com wrote: Hi all, I'm using systemd for embedded devices. The kernel is compiled for the target and I don't need / use an initrd, as all device drivers are known beforehand and I like the faster boot speed. That means that

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Kay Sievers
On Fri, Dec 27, 2013 at 11:35 AM, Holger Schurig holgerschu...@gmail.com wrote: I'm using systemd for embedded devices. The kernel is compiled for the target and I don't need / use an initrd, as all device drivers are known beforehand and I like the faster boot speed. That means that / is

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Holger Schurig
If I place an empty /etc/machine-id into the image, then /run/machine-id will be bind-mounted over it. But that file will be different whenever I boot. So obviously I want to save it, once my filesystem is fsck'd and mounted read-write. But if I do it like that ... umount /etc/machine-id cp

Re: [systemd-devel] Code=exited, status=16 :: While Stopping

2013-12-27 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Dec 27, 2013 at 08:36:18AM -, Chinmay Mahata wrote: Hi, nbsp;nbsp;nbsp; I have written a systemd service script for one my daemons. The service is of Type=forking. When starting the service everything is working fine and I am getting status SUCCESS. But while I am stopping the

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Kay Sievers
On Fri, Dec 27, 2013 at 1:44 PM, Holger Schurig holgerschu...@gmail.com wrote: If I place an empty /etc/machine-id into the image, then /run/machine-id will be bind-mounted over it. But that file will be different whenever I boot. So obviously I want to save it, once my filesystem is fsck'd

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Kay Sievers
On Fri, Dec 27, 2013 at 3:41 PM, Kay Sievers k...@vrfy.org wrote: Yes, you can mount the root block device to a different place a second time, and should be able to unlink the file and replace it, then umount the file on the real /, and all should be atomic. Nah, sorry, it probably fails with

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Holger Schurig
Maybe sd_id128_get_machine() could try first to read /etc/machine-id and use that. If it doesn't exist, it could read /run/machine-id and use that. If that doesn't exist we're doomed *) That would allow some save-code like this (quick'n'dirty untested) [Unit] Description=Save machine-id

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Mantas Mikulėnas
On Fri, Dec 27, 2013 at 4:47 PM, Kay Sievers k...@vrfy.org wrote: On Fri, Dec 27, 2013 at 3:41 PM, Kay Sievers k...@vrfy.org wrote: Yes, you can mount the root block device to a different place a second time, and should be able to unlink the file and replace it, then umount the file on the

[systemd-devel] [PATCH v2] units: user@.service: fix user bus path

2013-12-27 Thread Mantas Mikulėnas
--- units/u...@.service.in | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/units/u...@.service.in b/units/u...@.service.in index 3f8b59d..7b7d52b 100644 --- a/units/u...@.service.in +++ b/units/u...@.service.in @@ -14,5 +14,9 @@ User=%I PAMName=systemd-user Type=notify

Re: [systemd-devel] /etc/machine-id handling in a non-initrd / embedded environment ?!?!

2013-12-27 Thread Kay Sievers
On Fri, Dec 27, 2013 at 4:02 PM, Holger Schurig holgerschu...@gmail.com wrote: Maybe sd_id128_get_machine() could try first to read /etc/machine-id and use that. If it doesn't exist, it could read /run/machine-id and use that. If that doesn't exist we're doomed *) It's a simple defined 3rd

[systemd-devel] [PATCH] systemd.service(5): clarify behavior of SuccessExitStatus

2013-12-27 Thread Dave Reisner
The behavior of this is a little cryptic in that $MAINPID must exit as a direct result of receiving a signal in order for a listed signal to be considered a success condition. --- man/systemd.service.xml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [systemd-devel] [PATCH] systemd.service(5): clarify behavior of SuccessExitStatus

2013-12-27 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Dec 27, 2013 at 10:46:48AM -0500, Dave Reisner wrote: The behavior of this is a little cryptic in that $MAINPID must exit as a direct result of receiving a signal in order for a listed signal to be considered a success condition. --- man/systemd.service.xml | 5 - 1 file

Re: [systemd-devel] [PATCH] bus: PORTING-DBUS1: fix user bus path

2013-12-27 Thread Lennart Poettering
On Fri, 27.12.13 10:30, Mantas Mikulėnas (graw...@gmail.com) wrote: Applied this one. Thanks! --- src/libsystemd-bus/PORTING-DBUS1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd-bus/PORTING-DBUS1 b/src/libsystemd-bus/PORTING-DBUS1 index

Re: [systemd-devel] [PATCH RFC] namespace: make sure ReadWriteDirectories are actually writable

2013-12-27 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Dec 27, 2013 at 10:18:30AM +0100, Michael Olbrich wrote: Currently adding directories to ReadWriteDirectories= only restores the original mount flags. So e.g. setting ReadOnlyDirectories=/usr and ReadWriteDirectories=/usr/local works as expected if the underlying file system was

Re: [systemd-devel] [PATCH v2] units: user@.service: fix user bus path

2013-12-27 Thread Lennart Poettering
On Fri, 27.12.13 17:10, Mantas Mikulėnas (graw...@gmail.com) wrote: The service file needs to be turned into an m4 template first I figure. i.e. replaced by u...@.service.m4.in... Note that this in a way is a bit of an anachronism... In the long run everybody should just connect to the right

Re: [systemd-devel] Control process

2013-12-27 Thread Lennart Poettering
On Fri, 27.12.13 10:39, Marcos Felipe Rasia de Mello (marcos...@gmail.com) wrote: systemctl man page defines kill --kill-who=control as kill [..] the control process. What is this control process? ExecStartPre= processes? These are killed automatically before ExecStart= according to

Re: [systemd-devel] [PATCH v2] units: user@.service: fix user bus path

2013-12-27 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Dec 27, 2013 at 06:02:37PM +0100, Lennart Poettering wrote: On Fri, 27.12.13 17:10, Mantas Mikulėnas (graw...@gmail.com) wrote: Applied. I guess that this wasn't even compile tested though :| The service file needs to be turned into an m4 template first I figure. i.e. replaced by

Re: [systemd-devel] Control process

2013-12-27 Thread Marcos Felipe Rasia de Mello
2013/12/27 Lennart Poettering lenn...@poettering.net: On Fri, 27.12.13 10:39, Marcos Felipe Rasia de Mello (marcos...@gmail.com) wrote: systemctl man page defines kill --kill-who=control as kill [..] the control process. What is this control process? ExecStartPre= processes? These are

Re: [systemd-devel] [PATCH RFC] namespace: make sure ReadWriteDirectories are actually writable

2013-12-27 Thread Michael Olbrich
On Fri, Dec 27, 2013 at 05:52:16PM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Dec 27, 2013 at 10:18:30AM +0100, Michael Olbrich wrote: Currently adding directories to ReadWriteDirectories= only restores the original mount flags. So e.g. setting ReadOnlyDirectories=/usr and

Re: [systemd-devel] [PATCH] systemd.service(5): clarify behavior of SuccessExitStatus

2013-12-27 Thread Lennart Poettering
On Fri, 27.12.13 17:00, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: On Fri, Dec 27, 2013 at 10:46:48AM -0500, Dave Reisner wrote: The behavior of this is a little cryptic in that $MAINPID must exit as a direct result of receiving a signal in order for a listed signal to be

[systemd-devel] [PATCH 2/2] autogen: add shortcut for running scan-build

2013-12-27 Thread Thomas H.P. Andersen
From: Thomas Hindoe Paaboel Andersen pho...@gmail.com scan-build is a static analyzer in llvm. As ususal static analyzers tend to mostly find theoretical bugs in software that has been in production for a while. For in-development code it can be useful to check if new issues is added as there is

[systemd-devel] [PATCH 1/2] autogen: add shortcut for building with clang

2013-12-27 Thread Thomas H.P. Andersen
From: Thomas Hindoe Paaboel Andersen pho...@gmail.com For a while I have been cleaning up warnings when building with clang. There are currently only two sources of warnings left: Wcast-align and Wgnu. I am not convinced that fixing up those up is feasible so I run with them disabled to spot

[systemd-devel] libcap .pc file

2013-12-27 Thread Thomas H.P. Andersen
Hi, Just a heads up that libcap now includes a pc file in version 2.23. https://git.kernel.org/cgit/linux/kernel/git/morgan/libcap.git/commit/?id=dfea7eba31e6d15e8a63f818bb4438340b70a8c9 (The commit message gives me way more credit than I deserve. Bryan Kadzban did all the work. I just herded

[systemd-devel] [PATCH] Add SELinuxContext configuration item

2013-12-27 Thread misc
From: Michael Scherer m...@zarb.org This permit to let system administrators decide of the domain of a service. This can be used with templated units to have each service in a différent domain ( for example, a per customer database, using MLS or anything ), or can be used to force a non selinux

Re: [systemd-devel] [PATCH] systemd.service(5): clarify behavior of SuccessExitStatus

2013-12-27 Thread Dave Reisner
On Fri, Dec 27, 2013 at 09:09:21PM +0100, Lennart Poettering wrote: On Fri, 27.12.13 17:00, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: On Fri, Dec 27, 2013 at 10:46:48AM -0500, Dave Reisner wrote: The behavior of this is a little cryptic in that $MAINPID must exit as a

[systemd-devel] [PATCH 2/4] bus: driverd: don't remove twice a match from the list

2013-12-27 Thread Marc-Antoine Perennou
match_free already does it --- src/bus-driverd/bus-driverd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c index 44172c4..b423420 100644 --- a/src/bus-driverd/bus-driverd.c +++ b/src/bus-driverd/bus-driverd.c

[systemd-devel] [PATCH 3/4] bus: driverd: don't attempt to remove from empty list

2013-12-27 Thread Marc-Antoine Perennou
--- src/bus-driverd/bus-driverd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c index b423420..1fdea7e 100644 --- a/src/bus-driverd/bus-driverd.c +++ b/src/bus-driverd/bus-driverd.c @@ -90,10 +90,10 @@