Re: [systemd-devel] [PATCH] metadata: reflect change in task_cgroup_name

2014-04-09 Thread Hristo Venev
On Wed, 2014-04-09 at 15:04 +0200, Daniel Mack wrote: > Eh. Thanks for spotting this. However, I think we should have a compat > workaround for 3.14, for at least a couple of weeks. We can drop it > after that. Could you amend your patch for that? How do I check if the kernel version is 3.14.0 or

[systemd-devel] [PATCH] metadata: reflect change in task_cgroup_name

2014-04-09 Thread Hristo Venev
Change: e61734c55c24cdf11b07e52a74aec4dc4a7f4bd0. Merged: dc5ed40686a4da95881c35d913b60f867755cbe2 in 3.15-rc1. task_cgroup_name returns a pointer to the path or NULL if there is not enough space in the buffer (used to return nonnegative or -ENAMETOOLONG). On systemd systems fixes a kernel panic

Re: [systemd-devel] [PATCH 2/3] core: Put transient user units in XDG_RUNTIME_DIR instead of XDG_CONFIG_HOME.

2014-03-28 Thread Hristo Venev
On Fri, 2014-03-28 at 19:52 +0100, Kay Sievers wrote: > It should still go into its own variable if you want to skip the > check. We should not rely on the behaviour of external functions like > that. > > Even when it is not likely to ever fail, or never even to be called as > PID1, it's still the

Re: [systemd-devel] [PATCH 2/3] core: Put transient user units in XDG_RUNTIME_DIR instead of XDG_CONFIG_HOME.

2014-03-28 Thread Hristo Venev
On Fri, 2014-03-28 at 19:02 +0100, Kay Sievers wrote: > On Fri, Mar 28, 2014 at 6:38 PM, Hristo Venev wrote: > > They are temporary and should not clutter the configuration directory. > > --- > > src/core/unit.c | 32 +++- > > 1 file ch

Re: [systemd-devel] [PATCH 1/3] core: Move user generator directories to XDG_RUNTIME_DIR

2014-03-28 Thread Hristo Venev
On Fri, 2014-03-28 at 19:00 +0100, Kay Sievers wrote: > On Fri, Mar 28, 2014 at 6:38 PM, Hristo Venev wrote: > > Predictable names and more consistent. > > --- > > src/core/manager.c | 48 +++- > > 1 file changed, 11

Re: [systemd-devel] Some useful patches

2014-03-28 Thread Hristo Venev
On Fri, 2014-03-28 at 19:06 +0100, Kay Sievers wrote: > On Fri, Mar 28, 2014 at 6:38 PM, Hristo Venev wrote: > > The first patch moves the user generator directories to XDG_RUNTIME_DIR. > > This > > way the path for the generator directories is always under the manager

[systemd-devel] Some useful patches

2014-03-28 Thread Hristo Venev
The first patch moves the user generator directories to XDG_RUNTIME_DIR. This way the path for the generator directories is always under the manager's runtime prefix. Consistency and code size. The second patch moves the transient user units to XDG_RUNTIME_DIR. This way they are deleted on reboot

[systemd-devel] [PATCH 2/3] core: Put transient user units in XDG_RUNTIME_DIR instead of XDG_CONFIG_HOME.

2014-03-28 Thread Hristo Venev
They are temporary and should not clutter the configuration directory. --- src/core/unit.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/core/unit.c b/src/core/unit.c index 153b79b..69971ba 100644 --- a/src/core/unit.c +++ b/src/core/uni

[systemd-devel] [PATCH 3/3] core: add EnvironmentFiles to settable transient unit properties

2014-03-28 Thread Hristo Venev
--- src/core/dbus-execute.c | 16 src/libsystemd/sd-bus/bus-util.c | 18 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 13b3d0d..1f1f602 100644 --- a/src/core/dbus-execute.c +++ b/s

[systemd-devel] [PATCH 1/3] core: Move user generator directories to XDG_RUNTIME_DIR

2014-03-28 Thread Hristo Venev
Predictable names and more consistent. --- src/core/manager.c | 48 +++- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index ce8759e..b409738 100644 --- a/src/core/manager.c +++ b/src/core/manager

Re: [systemd-devel] [PATCH 2/7] Give the user permissions to their session's cgroup

2013-12-02 Thread Hristo Venev
See systemd src/core/execute.c:1299-1312, especially lines 1300 and 1307. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH 2/7] Give the user permissions to their session's cgroup

2013-12-01 Thread Hristo Venev
See systemd src/core/execute.c:1299-1312, especially lines 1300 and 1307. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] systemd session mode

2013-12-01 Thread Hristo Venev
What about DISPLAY being different for different graphical sessions? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH 7/7] run: Support KillMode via --kill-mode=... flag

2013-12-01 Thread Hristo Venev
--- src/run/run.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/run/run.c b/src/run/run.c index 537b725..c5c5c77 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -35,6 +35,7 @@ static bool arg_remain_after_exit = false; static const char *arg_unit = NUL

[systemd-devel] [PATCH 3/7] Preparations for session mode

2013-12-01 Thread Hristo Venev
Replace the conditions of some ifs that make no difference now but are the correct behavior if session mode is added --- src/core/dbus.c | 2 +- src/core/main.c | 4 ++-- src/core/manager.c| 2 +- src/core/service.c| 2 +- src/core/unit.c | 2 +- src/s

[systemd-devel] [PATCH 4/7] Session mode

2013-12-01 Thread Hristo Venev
systemctl --session restart gnome-settings-daemon Add a new environment variable: XDG_SESSION_DIR=/run/session/$XDG_SESSION_ID The session instance runs in session-*.scope and is started as a normal process inside a session. The socket is stored in $XDG_SESSION_DIR/systemd/private It would be

[systemd-devel] [PATCH 6/7] Better paths for transient user/session units

2013-12-01 Thread Hristo Venev
--- src/core/unit.c | 14 ++ src/shared/path-lookup.c | 34 ++ src/shared/path-lookup.h | 2 ++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/core/unit.c b/src/core/unit.c index c963870..029f7ee 100644 --- a/src/core/unit.

[systemd-devel] systemd session mode

2013-12-01 Thread Hristo Venev
I've implemented session mode for systemd. I am currently using it and it works pretty okay. I just had to generate D-Bus user services for D-Bus activation to work. A new variable, XDG_SESSION_DIR, has been added. It defaults to /run/session/$XDG_SESSION_ID and is to be used for session-specific

[systemd-devel] [PATCH 5/7] Move generator directories to XDG_{RUNTIME, SESSION}_DIR

2013-12-01 Thread Hristo Venev
More predictable names, easier to find if debugging, deleted on session/user termination --- src/core/manager.c | 35 --- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index ada62d0..617fc9f 100644 --- a/src/c

[systemd-devel] [PATCH 2/7] Give the user permissions to their session's cgroup

2013-12-01 Thread Hristo Venev
User is given permissions to their user@*.service cgroup so that user mode systemd can run. session-*.scope cgroup permissions are required for session mode. --- src/core/dbus-scope.c | 6 ++ src/core/scope.c | 16 src/core/scope.h | 2 ++ src/login/

[systemd-devel] [PATCH 1/7] bus_open_transport: use SystemdRunningAs instead of bool

2013-12-01 Thread Hristo Venev
SYSTEMD_USER/SYSTEMD_SYSTEM is far more clear than true/false --- src/analyze/analyze.c | 8 src/hostname/hostnamectl.c| 2 +- src/libsystemd-bus/bus-util.c | 39 --- src/libsystemd-bus/bus-util.h | 5 +++-- src/libsystemd-bus/busctl.c