[systemd-devel] [PATCH 2/2] path-lookup: don't hardcode .config

2014-04-11 Thread Tanu Kaskinen
If XDG_CONFIG_HOME is set, then we should respect that. --- src/shared/path-lookup.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 63af43c..a885b66 100644 --- a/src/shared/path-lookup.c +++

[systemd-devel] [PATCH 1/2] man: mention XDG_CONFIG_HOME in systemd.unit

2014-04-11 Thread Tanu Kaskinen
--- man/systemd.unit.xml | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 07a73fd..bcd4ba8 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -70,7 +70,8 @@ filename.../filename

[systemd-devel] [PATCH 0/2] XDG_CONFIG_HOME fixes

2014-04-11 Thread Tanu Kaskinen
of $HOME/.config in the code, and found one. The second patch fixes this. The patch is untested. Tanu Kaskinen (2): man: mention XDG_CONFIG_HOME in systemd.unit path-lookup: don't hardcode .config man/systemd.unit.xml | 9 +++-- src/shared/path-lookup.c | 6 +- 2 files changed, 12

[systemd-devel] Default file permissions in user mode

2014-04-12 Thread Tanu Kaskinen
Hi, The systemd.socket man page says that the default value for DirectoryMode is 0755. Judging from the code in the socket_init() function, the documentation matches the implementation. 0755 seems appropriate for the system mode, but wouldn't 0700 be better for the user mode? Likewise for

Re: [systemd-devel] [PATCH 2/2] path-lookup: don't hardcode .config

2014-04-13 Thread Tanu Kaskinen
On Sat, 2014-04-12 at 19:30 +0200, Zbigniew Jędrzejewski-Szmek wrote: On Sat, Apr 12, 2014 at 08:37:39AM +0300, Tanu Kaskinen wrote: If XDG_CONFIG_HOME is set, then we should respect that. --- src/shared/path-lookup.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[systemd-devel] [PATCH 2/2] path-lookup: don't hardcode .config

2014-05-03 Thread Tanu Kaskinen
If XDG_CONFIG_HOME is set, then we should respect that. --- src/shared/path-lookup.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 63af43c..92abd11 100644 --- a/src/shared/path-lookup.c +++

[systemd-devel] [PATCH 0/2] Don't hardcode ~/.config in presence of XDG_CONFIG_HOME

2014-05-03 Thread Tanu Kaskinen
These patches supersede an earlier patch of mine: http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/18473/focus=18474 Tanu Kaskinen (2): path-util: add path_make_relative() path-lookup: don't hardcode .config src/shared/path-lookup.c | 12 +-- src/shared/path-util.c | 90

[systemd-devel] [PATCH 1/2] path-util: add path_make_relative()

2014-05-03 Thread Tanu Kaskinen
In user_dirs() in path-lookup.c, I want to replace this: symlink(../../../.config/systemd/user, data_home); with symlink(config_home, data_home); to avoid hardcoding .config when XDG_CONFIG_HOME is set. The problem is that config_home is an absolute path, and it's better to make

Re: [systemd-devel] [PATCH 1/2] path-util: add path_make_relative()

2014-05-19 Thread Tanu Kaskinen
On Fri, 2014-05-16 at 18:46 +0200, Lennart Poettering wrote: On Sat, 03.05.14 11:52, Tanu Kaskinen (tanu.kaski...@linux.intel.com) wrote: In user_dirs() in path-lookup.c, I want to replace this: symlink(../../../.config/systemd/user, data_home); with symlink(config_home

[systemd-devel] [PATCH 0/2] path_make_relative() fix and tests

2014-05-24 Thread Tanu Kaskinen
I recently added path_make_relative() to path-util, and Lennart asked me to write a test case for it. It's good that he did, because that revealed a serious bug that I had somehow missed in my initial testing. Tanu Kaskinen (2): path-util: fix missing terminating zero test-path-util: add

[systemd-devel] [PATCH 2/2] test-path-util: add tests for path_make_relative()

2014-05-24 Thread Tanu Kaskinen
--- src/test/test-path-util.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c index 0aa0bf1..9f8ae4d 100644 --- a/src/test/test-path-util.c +++ b/src/test/test-path-util.c @@ -170,10 +170,32 @@ static void

[systemd-devel] [PATCH 1/2] path-util: fix missing terminating zero

2014-05-24 Thread Tanu Kaskinen
There was this code: if (to_path_len 0) memcpy(p, to_path, to_path_len); That didn't add the terminating zero, so the resulting string was corrupt if this code path was taken. Using strcpy() instead of memcpy() solves this issue, and also simplifies the code.

[systemd-devel] ~/.local/share/systemd/user

2014-06-07 Thread Tanu Kaskinen
Hi, Currently, systemd symlinks ~/.local/share/systemd/user to ~/.config/systemd/user. I'd prefer to not have that symlink. I'd want the two locations have different semantics, analogous to the separation between /usr/lib/systemd/user and /etc/systemd/user, i.e. service upstreams should

Re: [systemd-devel] ~/.local/share/systemd/user

2014-06-07 Thread Tanu Kaskinen
On Sat, 2014-06-07 at 07:42 -0500, William Giokas wrote: On Sat, Jun 07, 2014 at 01:07:08PM +0300, Tanu Kaskinen wrote: Hi, Currently, systemd symlinks ~/.local/share/systemd/user to ~/.config/systemd/user. I'd prefer to not have that symlink. I'd want the two locations have different

[systemd-devel] [PATCH] path-lookup: don't make ~/.local/share/systemd/user a symlink

2014-07-12 Thread Tanu Kaskinen
We already encourage upstreams to keep the default configuration separate from user customizations for software that is installed in the system location. Let's allow that separation also for software that is installed in the home directory. Some discussion:

[systemd-devel] [PATCH] man: mention XDG_DATA_HOME in systemd.unit

2014-07-12 Thread Tanu Kaskinen
--- man/systemd.unit.xml | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index d0431ce..6447584 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -74,6 +74,8 @@

[systemd-devel] Preventing automatic seat assignments

2014-08-26 Thread Tanu Kaskinen
Hi, If I want to designate some sound card to be shared between seats, then I suppose that sound card shouldn't be assigned to any seats. However, currently /usr/lib/udev/rules.d/71-seat.rules unconditionally tags all sound cards with the seat tag. How should this be solved? My current

Re: [systemd-devel] Preventing automatic seat assignments

2014-08-27 Thread Tanu Kaskinen
On Tue, 2014-08-26 at 14:00 +0200, Lennart Poettering wrote: On Tue, 26.08.14 12:17, Tanu Kaskinen (tanu.kaski...@linux.intel.com) wrote: Hi, If I want to designate some sound card to be shared between seats, then I suppose that sound card shouldn't be assigned to any seats. However

Re: [systemd-devel] Preventing automatic seat assignments

2014-09-09 Thread Tanu Kaskinen
On Wed, 2014-08-27 at 11:47 +0300, Tanu Kaskinen wrote: On Tue, 2014-08-26 at 14:00 +0200, Lennart Poettering wrote: On Tue, 26.08.14 12:17, Tanu Kaskinen (tanu.kaski...@linux.intel.com) wrote: Hi, If I want to designate some sound card to be shared between seats, then I suppose

Re: [systemd-devel] Preventing automatic seat assignments

2014-09-11 Thread Tanu Kaskinen
On Wed, 2014-09-10 at 12:44 +0200, David Herrmann wrote: Hi On Tue, Sep 9, 2014 at 10:49 AM, Tanu Kaskinen tanu.kaski...@linux.intel.com wrote: On Wed, 2014-08-27 at 11:47 +0300, Tanu Kaskinen wrote: On Tue, 2014-08-26 at 14:00 +0200, Lennart Poettering wrote: On Tue, 26.08.14 12:17

Re: [systemd-devel] [PATCH RFC] udev: allow removing tags via TAG-=foobar

2014-09-12 Thread Tanu Kaskinen
On Thu, 2014-09-11 at 15:25 +0200, David Herrmann wrote: Hi On Thu, Sep 11, 2014 at 1:28 PM, David Herrmann dh.herrm...@gmail.com wrote: This extends the udev parser to support OP_REMOVE (-=) and adds support for TAG-= to remove previously set tags. We don't fail if the tag didn't exist.