[systemd-devel] Restart of Target should restart all services that are wanted by that target and have StopWhenUnneeded=true

2014-06-26 Thread Michael Seiwald
Hi, I have a target unit that acts as a collection unit for several service units. The service units all have a WantedBy directive pointing to the target unit as well as StopWhenUnneeded set to true. When I stop the target the service units stop as well which ist the expected behaviour. When I

Re: [systemd-devel] [PATCH] [RFC] Add binary password agent protocol

2014-06-26 Thread Filipe Brandenburger
On Thu, Jun 26, 2014 at 4:54 PM, David Härdeman wrote: > Add binary string handling functions and extend the password agent > protocol to support binary strings (using "=" as a string prefix > instead of "+"). Please also add /test-bstrv to .gitignore.

[systemd-devel] [PATCH] [RFC] Add binary password agent protocol

2014-06-26 Thread David Härdeman
Add binary string handling functions and extend the password agent protocol to support binary strings (using "=" as a string prefix instead of "+"). --- Makefile.am|9 + src/ask-password/ask-password.c| 33 +-- src/cryptsetup/crypts

Re: [systemd-devel] [PATCH resend] Add support for DHCP static route options in networkd

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Jun 25, 2014 at 10:39:11PM -0700, Eugene Yakubovich wrote: > This adds support for DHCP options 33 and 121: Static Route and > Classless Static Route. To enable this feature, set UseRoutes=true > in .network file. Returned routes are added to the routing table. > --- > man/systemd.network.

[systemd-devel] [PATCH] journald: make MaxFileSec really default to 1month

2014-06-26 Thread Michał Bartoszkiewicz
journald.conf(5) states that the default for MaxFileSec is one month, but the code didn't respect that. --- src/journal/journald-server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index a4600e3..58410a2 100644 --- a/src/jou

Re: [systemd-devel] [PATCH] Add support for DHCP static route options in networkd

2014-06-26 Thread Eugene Yakubovich
On Thu, Jun 26, 2014 at 11:17 AM, Lennart Poettering wrote: > I am tempted to say that we should try to apply as much information from > DHCP as we can by default, but make sure it doesn't become a security > problem. i.e. we should probably use metrics or so so that manual routes > always win, o

Re: [systemd-devel] [PATCH] Add support for DHCP static route options in networkd

2014-06-26 Thread Lennart Poettering
On Thu, 26.06.14 10:37, Eugene Yakubovich (eyakubov...@gmail.com) wrote: > > > On Wed, 25.06.14 18:03, Eugene Yakubovich (eyakubov...@gmail.com) wrote: > > > > The patch is line-broken > I resent it last night with [PATCH resent] in the subject. Is that one > also line broken? It was resent w

Re: [systemd-devel] [PATCH] Add support for DHCP static route options in networkd

2014-06-26 Thread Eugene Yakubovich
> On Wed, 25.06.14 18:03, Eugene Yakubovich (eyakubov...@gmail.com) wrote: > > The patch is line-broken I resent it last night with [PATCH resent] in the subject. Is that one also line broken? It was resent with git send-email so should be ok. > Just one quick question without looking into muc

Re: [systemd-devel] [PATCH] Add support for DHCP static route options in networkd

2014-06-26 Thread Lennart Poettering
On Wed, 25.06.14 18:03, Eugene Yakubovich (eyakubov...@gmail.com) wrote: > This adds support for DHCP options 33 and 121: Static Route and > Classless Static Route. To enable this feature, set UseRoutes=true > in .network file. Returned routes are added to the routing table. The patch is line-bro

Re: [systemd-devel] possible to run systemd-nspawn in a nested Xorg server?

2014-06-26 Thread Lennart Poettering
On Wed, 25.06.14 19:18, Kai Krakow (hurikha...@gmail.com) wrote: > > Lennart Poettering schrieb: > > >> I wonder if it is possible to spawn systemd nspawn containers in a way > >> that the login manager and GUI start up in a nested Xorg server so that I > >> can run the container system in a wi

Re: [systemd-devel] [systemd-commits] man/systemctl.xml src/systemctl

2014-06-26 Thread Lennart Poettering
On Wed, 25.06.14 14:43, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > > On Wed, Jun 25, 2014 at 03:32:12AM -0700, Lennart Poettering wrote: > > man/systemctl.xml | 17 + > > src/systemctl/systemctl.c | 26 ++ > > 2 files changed, 43

Re: [systemd-devel] [PATCH] install: enable timesyncd by default

2014-06-26 Thread Lennart Poettering
On Wed, 25.06.14 14:47, Reindl Harald (h.rei...@thelounge.net) wrote: > > +GENERAL_ALIASES += \ > > + $(systemunitdir)/systemd-timesyncd.service > > $(pkgsysconfdir)/system/multi-user.target.wants/systemd-timesyncd.service > > + > > EXTRA_DIST += \ > > units/systemd-timesyncd.service.in >

Re: [systemd-devel] [PATCH] install: enable timesyncd by default

2014-06-26 Thread Reindl Harald
Am 25.06.2014 14:43, schrieb Michael Olbrich: > This treats it similarly to networkd, resolved and others and it matches > what 90-systemd.preset does. > --- > Makefile.am | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Makefile.am b/Makefile.am > index 4b292b2..bfef1c3 100644 > ---

Re: [systemd-devel] [PATCH] rules: don't enable usb pm for Avocent devices

2014-06-26 Thread Lennart Poettering
On Wed, 25.06.14 11:57, Tom Hirst (tom.hi...@ipe-systems.co.uk) wrote: > The Avocent KVM over IP devices doesn't work correctly with USB power > management enabled. > --- > rules/42-usb-hid-pm.rules | 4 > 1 file changed, 4 deletions(-) > > diff --git a/rules/42-usb-hid-pm.rules b/rules/42-

Re: [systemd-devel] [RFC 4/8] HACK0: allow meta information customizable

2014-06-26 Thread Daniel Mack
Hi, On 06/26/2014 12:33 PM, AKASHI Takahiro wrote: > On 06/25/2014 06:56 PM, Daniel Mack wrote: >> On 06/25/2014 11:13 AM, AKASHI Takahiro wrote: >> Note that the kernel features of kdbus are defined by the kernel code, >> not by the convenience wrappers for ioctl() that live in test/. As soon >>

Re: [systemd-devel] [RFC 7/8] HACK3: minimize the range of D-Cache flush in ioctl(CMD_MSG_RECV)

2014-06-26 Thread Daniel Mack
Hi, I now booted an ARM board and tried your change, but it doesn't work. On 06/25/2014 11:13 AM, AKASHI Takahiro wrote: > void kdbus_pool_slice_flush(const struct kdbus_pool_slice *slice) > { > +#if KDBUS_HACK3 > + flush_kernel_vmap_range((void *)slice->off, slice->size); slice->off is th

Re: [systemd-devel] [PATCH 8/8] TODO: Add items for the DHCPv6 implementation

2014-06-26 Thread Dan Williams
On Thu, 2014-06-26 at 13:24 +0300, Patrik Flykt wrote: > --- > TODO | 16 > 1 file changed, 16 insertions(+) > > diff --git a/TODO b/TODO > index a5f482b..8d8d694 100644 > --- a/TODO > +++ b/TODO > @@ -624,6 +624,22 @@ Features: > - export timezone information > - FORCERE

Re: [systemd-devel] Setting bridge parameters

2014-06-26 Thread Lukáš Nykrýn
poma píše v Pá 20. 06. 2014 v 13:36 +0200: > On 20.06.2014 13:31, Tom Gundersen wrote: > > On Thu, Jun 19, 2014 at 1:37 PM, Vladimir Elisseev wrote: > >> Simple question: is there a way to set bridge parameters (bridge forward > >> delay, bridge hello time, etc) using systemd networking units? >

Re: [systemd-devel] [PATCH 0/8] Basic DHCPv6 client implementation

2014-06-26 Thread Patrik Flykt
On Thu, 2014-06-26 at 13:24 +0300, Patrik Flykt wrote: > With this patch set it looks like basic DHCPv6 client functionality > should be covered as Renew and Rebind are now also handled. Patch set updated according to Zbyszek's comments and pushed. Cheers, Patrik __

Re: [systemd-devel] [PATCH 5/8] sd-dhcp6-lease: Add helper function to compute remaining expiry time

2014-06-26 Thread Patrik Flykt
On Thu, 2014-06-26 at 14:07 +0200, Zbigniew Jędrzejewski-Szmek wrote: > No comments, the rest looks great, as usual. I think you can push it. Thanks. And pushed. Cheers, Patrik ___ systemd-devel mailing list systemd-devel@lists.freedesktop.or

Re: [systemd-devel] [PATCH] ask-password-api.c: fix assigned but not read warning

2014-06-26 Thread Daniel Buch
You are right! Sorry for the confusion 2014-06-26 14:04 GMT+02:00 Zbigniew Jędrzejewski-Szmek : > On Thu, Jun 26, 2014 at 01:49:56PM +0200, Daniel Buch wrote: > > Well we assign fd to be -1 above signalfd() and afterwards never read it. > > That's what my compiler complained about. > > > > Think

Re: [systemd-devel] [PATCH 5/8] sd-dhcp6-lease: Add helper function to compute remaining expiry time

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jun 26, 2014 at 03:00:06PM +0300, Patrik Flykt wrote: > On Thu, 2014-06-26 at 13:01 +0200, Zbigniew Jędrzejewski-Szmek wrote: > > > +*expire = 0; > > > + > > > +LIST_FOREACH(addresses, addr, ia->addresses) { > > > +t = be32toh(addr->lifetime_valid); > > > +

Re: [systemd-devel] [PATCH] ask-password-api.c: fix assigned but not read warning

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jun 26, 2014 at 01:49:56PM +0200, Daniel Buch wrote: > Well we assign fd to be -1 above signalfd() and afterwards never read it. > That's what my compiler complained about. > > Thinking further i guess its the assignment thats redundant since cleanup > attribute calls safe_close() that bas

Re: [systemd-devel] [PATCH 5/8] sd-dhcp6-lease: Add helper function to compute remaining expiry time

2014-06-26 Thread Patrik Flykt
On Thu, 2014-06-26 at 13:01 +0200, Zbigniew Jędrzejewski-Szmek wrote: > > +*expire = 0; > > + > > +LIST_FOREACH(addresses, addr, ia->addresses) { > > +t = be32toh(addr->lifetime_valid); > > +if (*expire < t) > > +*expire = t; >

Re: [systemd-devel] [PATCH 4/8] sd-dhcp6-client: Add Option Request Option support

2014-06-26 Thread Patrik Flykt
On Thu, 2014-06-26 at 12:59 +0200, Zbigniew Jędrzejewski-Szmek wrote: > > +if (!GREEDY_REALLOC(client->req_opts, client->req_opts_allocated, > > +(client->req_opts_len + 1) * sizeof(option))) > > +return -ENOMEM; > GREEDY_REALLOC takes the number

Re: [systemd-devel] [PATCH] ask-password-api.c: fix assigned but not read warning

2014-06-26 Thread Daniel Buch
Well we assign fd to be -1 above signalfd() and afterwards never read it. That's what my compiler complained about. Thinking further i guess its the assignment thats redundant since cleanup attribute calls safe_close() that basiclly assigns fd to be -1. I got, gcc version 4.9.0 20140604 (prerele

Re: [systemd-devel] [PATCH] rules: don't enable usb pm for Avocent devices

2014-06-26 Thread Tom Hirst
> > On Wed, Jun 25, 2014 at 11:57:11AM +, Tom Hirst wrote: > > The Avocent KVM over IP devices doesn't work correctly with USB power > > management enabled. > > --- > > rules/42-usb-hid-pm.rules | 4 > > 1 file changed, 4 deletions(-) > > > > diff --git a/rules/42-usb-hid-pm.rules b/rul

Re: [systemd-devel] [RFC 6/8] HACK2: blocking ioctl(CMD_MSG_RECV)

2014-06-26 Thread AKASHI Takahiro
Hi, On 06/26/2014 12:39 PM, microcai wrote: 2014-06-25 18:30 GMT+08:00 Kay Sievers : On Wed, Jun 25, 2014 at 11:13 AM, AKASHI Takahiro wrote: In the current implementation, ioctl(CMD_MSG_RECV) returns immediately if no message has been queued, and so a service process has to wait by explicitl

Re: [systemd-devel] [PATCH] rules: don't enable usb pm for Avocent devices

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Jun 25, 2014 at 11:57:11AM +, Tom Hirst wrote: > The Avocent KVM over IP devices doesn't work correctly with USB power > management enabled. > --- > rules/42-usb-hid-pm.rules | 4 > 1 file changed, 4 deletions(-) > > diff --git a/rules/42-usb-hid-pm.rules b/rules/42-usb-hid-pm.ru

Re: [systemd-devel] [PATCH] timer: name the stamp file consistently

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jun 26, 2014 at 10:16:27AM +0200, Michał Bartoszkiewicz wrote: > The stamp file for systemd --user timers was named stamp-foo.timer if > XDG_DATA_HOME was unset, but foo.timer otherwise. > --- > src/core/timer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/

Re: [systemd-devel] [PATCH] ask-password-api.c: fix assigned but not read warning

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jun 26, 2014 at 12:50:40PM +0200, Daniel Buch wrote: > Not sure this is an appropiate fix, feel free to leave it out > > --- > src/shared/ask-password-api.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-ap

Re: [systemd-devel] [RFC 5/8] HACK1: optimize copy operations in kdbus_conn_queue_alloc()

2014-06-26 Thread AKASHI Takahiro
Hello Kay, On 06/25/2014 07:20 PM, Kay Sievers wrote: On Wed, Jun 25, 2014 at 11:13 AM, AKASHI Takahiro wrote: This function copies the reply message directly into receiver's buffer (pool slice). Looking into the implementation closely, however, there are multiple occurrences of copy operation

Re: [systemd-devel] [PATCH 5/8] sd-dhcp6-lease: Add helper function to compute remaining expiry time

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jun 26, 2014 at 01:24:15PM +0300, Patrik Flykt wrote: > Create a helper function to compute the remaining time in seconds from > time T2 to the IPv6 address with the longest lifetime. The computed > time is used as the Maximum Retransmission Duration in Rebinding state. > See RFC 3315, sect

Re: [systemd-devel] [PATCH 4/8] sd-dhcp6-client: Add Option Request Option support

2014-06-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jun 26, 2014 at 01:24:14PM +0300, Patrik Flykt wrote: > Provide a function to request more options from the DHCPv6 server. > Provide a sensible default set at startup and add test basic test > cases for the intended usage. > > Define DNS and NTP related option codes and add comments for th

[systemd-devel] [PATCH] ask-password-api.c: fix assigned but not read warning

2014-06-26 Thread Daniel Buch
Not sure this is an appropiate fix, feel free to leave it out --- src/shared/ask-password-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 5997a03..39eab0d 100644 --- a/src/shared/ask-password-api.c +++ b

Re: [systemd-devel] [RFC 7/8] HACK3: minimize the range of D-Cache flush in ioctl(CMD_MSG_RECV)

2014-06-26 Thread AKASHI Takahiro
n 06/25/2014 07:03 PM, Daniel Mack wrote: On 06/25/2014 11:13 AM, AKASHI Takahiro wrote: Current ioctl(CMD_MSG_RECV) contains an expensive cache operation. Even if the data is quite small, it always executes D-Cache flush on a buffer at minimum unit of one page in kdbus_conn_msg_install() / kdbu

Re: [systemd-devel] [RFC 4/8] HACK0: allow meta information customizable

2014-06-26 Thread AKASHI Takahiro
On 06/25/2014 06:56 PM, Daniel Mack wrote: Hi, On 06/25/2014 11:13 AM, AKASHI Takahiro wrote: My ftrace log shows that kdbus_meta_append(), is one of dominant functions in sending a message, while the other is kdbus_conn_queue_alloc(). This patch adds an extra argument to kdbus_hello() utility

[systemd-devel] [PATCH 1/8] sd-dhcp6-client: return NULL from _unref() like the other sd-* libraries

2014-06-26 Thread Patrik Flykt
In order to keep the refcounting working, a DONT_DESTROY macro similar to the one in sd-bus has been added also to DHCPv6. --- src/libsystemd-network/sd-dhcp6-client.c | 37 +++- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/libsystemd-network/sd-d

[systemd-devel] [PATCH 2/8] sd-icmp6-nd: Add function to stop ongoing ICMPv6 discovery

2014-06-26 Thread Patrik Flykt
In some use cases stopping an ongoing ICMPv6 discovery is more useful than always unreferencing the whole structure. --- src/libsystemd-network/sd-icmp6-nd.c | 13 + src/libsystemd-network/test-icmp6-rs.c | 4 src/systemd/sd-icmp6-nd.h | 1 + 3 files changed, 18 i

[systemd-devel] [PATCH 6/8] sd-dhcp6-client: Implement Renew and Rebind

2014-06-26 Thread Patrik Flykt
Start sending Renew and Rebind DHCPv6 messages when respective timers T1 and T2 expire. Rebind messages do not include a Server ID option and the Rebind procedure ends when the last IPv6 address valid lifetime expires, whereafter the client restarts the address acquisition procedure by Soliciting f

[systemd-devel] [PATCH 7/8] sd-dhcp6-client: Implement Rapid Commit

2014-06-26 Thread Patrik Flykt
Add a Rapid Commit option to Solicit messages and expect a Reply to be received instead of an Advertise. When receiving a DHCPv6 message from the server in state Solicit, continue testing whether the message is a Reply. Ease up the message type checking, it's not fatal if the message is of a wrong

[systemd-devel] [PATCH 8/8] TODO: Add items for the DHCPv6 implementation

2014-06-26 Thread Patrik Flykt
--- TODO | 16 1 file changed, 16 insertions(+) diff --git a/TODO b/TODO index a5f482b..8d8d694 100644 --- a/TODO +++ b/TODO @@ -624,6 +624,22 @@ Features: - export timezone information - FORCERENEW +* dhcp6: + - add functions to set previously stored IPv6 addresses o

[systemd-devel] [PATCH 0/8] Basic DHCPv6 client implementation

2014-06-26 Thread Patrik Flykt
Hi, With this patch set it looks like basic DHCPv6 client functionality should be covered as Renew and Rebind are now also handled. The first patch in the series clears up dhcpv6 unref handling, after this it works like the rest of the code in systemd. Patches 02 and 03 add support for

[systemd-devel] [PATCH 3/8] networkd: Properly stop router solicitation and DHCPv6 client

2014-06-26 Thread Patrik Flykt
When a link fails or looses carrier, always stop ongoing router solicitation and any DHCPv6 client that may be running. --- src/network/networkd-link.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c inde

[systemd-devel] [PATCH 4/8] sd-dhcp6-client: Add Option Request Option support

2014-06-26 Thread Patrik Flykt
Provide a function to request more options from the DHCPv6 server. Provide a sensible default set at startup and add test basic test cases for the intended usage. Define DNS and NTP related option codes and add comments for the unassigned codes. --- src/libsystemd-network/dhcp6-protocol.h| 12

[systemd-devel] [PATCH 5/8] sd-dhcp6-lease: Add helper function to compute remaining expiry time

2014-06-26 Thread Patrik Flykt
Create a helper function to compute the remaining time in seconds from time T2 to the IPv6 address with the longest lifetime. The computed time is used as the Maximum Retransmission Duration in Rebinding state. See RFC 3315, section 18.1.4. for details. --- src/libsystemd-network/dhcp6-lease-inter

Re: [systemd-devel] [RFC 1/8] (bugfix) undefined member, len, in struct kdbus_pool_slice

2014-06-26 Thread AKASHI Takahiro
Hi Daniel, On 06/25/2014 06:49 PM, Daniel Mack wrote: On 06/25/2014 11:13 AM, AKASHI Takahiro wrote: Signed-off-by: AKASHI Takahiro --- pool.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pool.c b/pool.c index d896d9b..4267c54 100644 --- a/pool.c +++ b/pool.c @@ -

[systemd-devel] [PATCH] timer: name the stamp file consistently

2014-06-26 Thread Michał Bartoszkiewicz
The stamp file for systemd --user timers was named stamp-foo.timer if XDG_DATA_HOME was unset, but foo.timer otherwise. --- src/core/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/timer.c b/src/core/timer.c index 6f2deda..e69dfbd 100644 --- a/src/core/timer.c