[systemd-devel] [PATCH] build: Allow disabling maintainer mode

2013-11-13 Thread Umut Tezduyar Lindskog
This allows make rules for generated build files (i.e. configure, Makefile.in, ... ) to be skipped. This is useful when the source is stored without timestamps (for example in CVS or GIT). When the build rules trigger to regenerate the build files, it tries to use the same autotools version

[systemd-devel] [PATCH] Add bootctl man page, zsh completion

2013-11-13 Thread Marko Myllynen
Hi, please consider the attached bootctl man page to fix RHBZ#1014303. As a bonus I'm also attaching zsh completion rules for bootctl. Cheers, -- Marko Myllynen From 02399073f22fcdaf1af7f36fc5494fb12ba045a7 Mon Sep 17 00:00:00 2001 From: Marko Myllynen mylly...@redhat.com Date: Tue, 12 Nov

[systemd-devel] [PATCH] systemctl: honor --no-legend in 'list-jobs'

2013-11-13 Thread Mantas Mikulėnas
--- src/systemctl/systemctl.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 8b6dae2..737cd67 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -1445,11 +1445,12 @@ static

[systemd-devel] [PATCH] activate: mention -E in the help text

2013-11-13 Thread Mantas Mikulėnas
--- src/activate/activate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/activate/activate.c b/src/activate/activate.c index dffc6e2..2639d1c 100644 --- a/src/activate/activate.c +++ b/src/activate/activate.c @@ -289,6 +289,8 @@ static int help(void) { -l

[systemd-devel] [PATCH] activate: fix crash when -s is passed

2013-11-13 Thread Mantas Mikulėnas
getopt_long() was told to accept -s which was never implemented. --- src/activate/activate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activate/activate.c b/src/activate/activate.c index 07e46b9..dffc6e2 100644 --- a/src/activate/activate.c +++

Re: [systemd-devel] [PATCH] build: Allow disabling maintainer mode

2013-11-13 Thread David Timothy Strauss
Based on the autotools docs, it looks like this would change the default to enabled maintainer mode, meaning developers would need to run --disable-maintainer-mode to maintain the current behavior. Is this correct? If that's so, then maybe the suggested ./configure command from ./autogen.sh

Re: [systemd-devel] [PATCH] build: Allow disabling maintainer mode

2013-11-13 Thread Simon McVittie
On 13/11/13 12:24, David Timothy Strauss wrote: Based on the autotools docs, it looks like this would change the default to enabled maintainer mode, meaning developers would need to run --disable-maintainer-mode to maintain the current behavior. Is this correct? Absence of AM_MAINTAINER_MODE

Re: [systemd-devel] [PATCH] build: Allow disabling maintainer mode

2013-11-13 Thread David Timothy Strauss
Thanks. Applied. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH] systemctl: honor --no-legend in 'list-jobs'

2013-11-13 Thread David Timothy Strauss
Thanks. Applied. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH] activate: mention -E in the help text

2013-11-13 Thread David Timothy Strauss
Thanks. Applied. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH] activate: fix crash when -s is passed

2013-11-13 Thread David Timothy Strauss
Thanks. Applied. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH] journal: timestamp support on console messages

2013-11-13 Thread Umut Tezduyar Lindskog
--- src/journal/journald-console.c | 33 ++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c index be55f94..93e3241 100644 --- a/src/journal/journald-console.c +++

Re: [systemd-devel] Path unit configuration starts early (DefaultDependencies=no)

2013-11-13 Thread Abdelghani Ouchabane
On 11/11/13 18:23, Zbigniew Jędrzejewski-Szmek wrote: On Mon, Nov 11, 2013 at 05:50:51PM +0100, Abdelghani Ouchabane wrote: On 11/11/13 17:35, Zbigniew Jędrzejewski-Szmek wrote: On Mon, Nov 11, 2013 at 05:26:28PM +0100,

Re: [systemd-devel] Need help with a systemd/mdadm interaction.

2013-11-13 Thread Lennart Poettering
On Tue, 12.11.13 11:31, NeilBrown (ne...@suse.de) wrote: Hi, I wonder if I could get some advice mdadm is quite good at assembling arrays incrementally. udev runs mdadm -I for each new device and mdadm gathers them into arrays and activates the array once all the expected devices

Re: [systemd-devel] Need help with a systemd/mdadm interaction.

2013-11-13 Thread Alexander E. Patrakov
2013/11/13 NeilBrown ne...@suse.de: On Tue, 12 Nov 2013 19:01:49 +0400 Andrey Borzenkov arvidj...@gmail.com wrote: В Tue, 12 Nov 2013 21:17:19 +1100 NeilBrown ne...@suse.de пишет: On Tue, 12 Nov 2013 18:16:24 +0900 Greg KH gre...@linuxfoundation.org wrote: On Tue, Nov 12, 2013 at

Re: [systemd-devel] systemd-networkd questions

2013-11-13 Thread Bill Nottingham
Tom Gundersen (t...@jklm.no) said: Without criticizing any of the existing solutions, some of the things that motivated my interest in this is that I think we need: something easily configured via plain configuration files by a sysadmin, something that would take a limited amount of space

Re: [systemd-devel] systemd-networkd questions

2013-11-13 Thread Tom Gundersen
On Wed, Nov 13, 2013 at 5:31 PM, Bill Nottingham nott...@redhat.com wrote: Tom Gundersen (t...@jklm.no) said: Without criticizing any of the existing solutions, some of the things that motivated my interest in this is that I think we need: something easily configured via plain configuration

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Alexander E. Patrakov
2013/11/13 Alexander E. Patrakov patra...@gmail.com: Colin Guthrie wrote: Hi, In this bug report https://bugs.mageia.org/show_bug.cgi?id=11645 a user is unable to enter their encrypted root password via a wireless keyboard connected with a Logitech, Inc. Unifying Receiver. Just in case,

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Colin Guthrie
'Twas brillig, and Alexander E. Patrakov at 13/11/13 16:49 did gyre and gimble: 2013/11/13 Alexander E. Patrakov patra...@gmail.com: Colin Guthrie wrote: Hi, In this bug report https://bugs.mageia.org/show_bug.cgi?id=11645 a user is unable to enter their encrypted root password via a

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Alexander E. Patrakov
2013/11/13 Colin Guthrie gm...@colin.guthr.ie: 'Twas brillig, and Alexander E. Patrakov at 13/11/13 16:49 did gyre and gimble: 2013/11/13 Alexander E. Patrakov patra...@gmail.com: Colin Guthrie wrote: Hi, In this bug report https://bugs.mageia.org/show_bug.cgi?id=11645 a user is unable to

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Colin Guthrie
'Twas brillig, and Alexander E. Patrakov at 13/11/13 17:18 did gyre and gimble: 2013/11/13 Colin Guthrie gm...@colin.guthr.ie: 'Twas brillig, and Alexander E. Patrakov at 13/11/13 16:49 did gyre and gimble: 2013/11/13 Alexander E. Patrakov patra...@gmail.com: Colin Guthrie wrote: Hi, In

Re: [systemd-devel] Need help with a systemd/mdadm interaction.

2013-11-13 Thread Dax Kelson
On Nov 13, 2013 8:03 AM, Lennart Poettering lenn...@poettering.net wrote: I also have the suspicion that the best strategy for handling degraded arrays is to timeout and not assemble them but rather put the system in a state where the admin has to become active. Auto-assembling degraded

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Alexander E. Patrakov
2013/11/13 Colin Guthrie gm...@colin.guthr.ie: What about if you generate it with the keyboard plugged in? It should include the usbhid module then, but does it actually work? Will try a bit later, but I suspect this is the wrong direction of thought. The problem we're encountering is that

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Alexander E. Patrakov
2013/11/13 Alexander E. Patrakov patra...@gmail.com: 2013/11/13 Colin Guthrie gm...@colin.guthr.ie: What about if you generate it with the keyboard plugged in? It should include the usbhid module then, but does it actually work? Will try a bit later, but I suspect this is the wrong direction

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Colin Guthrie
'Twas brillig, and Alexander E. Patrakov at 13/11/13 17:55 did gyre and gimble: 2013/11/13 Alexander E. Patrakov patra...@gmail.com: 2013/11/13 Colin Guthrie gm...@colin.guthr.ie: What about if you generate it with the keyboard plugged in? It should include the usbhid module then, but does it

Re: [systemd-devel] [PATCH 0/2] (dracut) hwdb needed in early boot for some keyboards

2013-11-13 Thread Alexander E. Patrakov
2013/11/14 Colin Guthrie gm...@colin.guthr.ie: What kernel are you using out of interest? This kernel is a git snapshot between 3.12.0-rc2 and -rc3. Compiled on Gentoo. -- Alexander E. Patrakov ___ systemd-devel mailing list

Re: [systemd-devel] systemd-networkd questions

2013-11-13 Thread Dan Williams
On Tue, 2013-11-12 at 23:19 +0100, Tom Gundersen wrote: Hi Dan, On Tue, Nov 12, 2013 at 10:38 PM, Dan Williams d...@redhat.com wrote: 1) what is lacking in other userspace solutions (NetworkManager, ConnMan, wicked, initscripts, etc) that requires yet-another-network-daemon? Without

[systemd-devel] [PATCH 03/28] dhcp: Add test for DHCP client initialization and parameter setting

2013-11-13 Thread Patrik Flykt
--- src/dhcp/test-dhcp-client.c | 81 +++ 1 file changed, 81 insertions(+) create mode 100644 src/dhcp/test-dhcp-client.c diff --git a/src/dhcp/test-dhcp-client.c b/src/dhcp/test-dhcp-client.c new file mode 100644 index 000..26857b6 --- /dev/null

[systemd-devel] [PATCH 23/28] dhcp: Add maximum message size option

2013-11-13 Thread Patrik Flykt
Add maximum message size option to keep some DHCP server implementations from sending too big messages. See ConnMan commit 0c5c862749c05193cf4c513628328c6db02b5222. --- src/dhcp/client.c | 10 ++ src/dhcp/protocol.h |1 + 2 files changed, 11 insertions(+) diff --git

[systemd-devel] [PATCH 11/28] dhcp: Add function for sending a raw packet

2013-11-13 Thread Patrik Flykt
Open a packet socket, create a link level header, send packet and close socket. Adding it to a separate file makes testing of the DHCP sending much easier, as the test program can supply any socket to the DHCP client code. --- src/dhcp/internal.h |2 ++ src/dhcp/network.c | 63

[systemd-devel] [PATCH 20/28] dhcp: Add timeout and main loop support

2013-11-13 Thread Patrik Flykt
Require a main loop to be set when creating a DHCP client. Set up a timer to resend DHCP Discover messages and add a 0-2 second delay to the timeout value. Move to state Selecting after successful sending of a Discover message. --- src/dhcp/client.c | 77

[systemd-devel] [PATCH 14/28] dhcp: Add test for discover DHCP packet creation

2013-11-13 Thread Patrik Flykt
Set a fake MAC address and emulate raw packet sending. When the buffer containing the Discover message is received, check selected IP and UDP headers and compute IP header and UDP message checksums. Also send the DHCP message for option parsing and expect a successful outcome. --- Makefile.am

[systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Patrik Flykt
Create a new directory to host DHCP components. --- src/dhcp/protocol.h | 93 +++ 1 file changed, 93 insertions(+) create mode 100644 src/dhcp/protocol.h diff --git a/src/dhcp/protocol.h b/src/dhcp/protocol.h new file mode 100644 index

[systemd-devel] [PATCH 04/28] build: Add initial build support

2013-11-13 Thread Patrik Flykt
The client test program is the only one to be built so far. --- Makefile.am | 15 +++ configure.ac |9 + src/dhcp/Makefile |1 + 3 files changed, 25 insertions(+) create mode 12 src/dhcp/Makefile diff --git a/Makefile.am b/Makefile.am index

[systemd-devel] [PATCH 15/28] dhcp: Add example DHCP client test program

2013-11-13 Thread Patrik Flykt
The test program runs the DHCP protocol using libsystemd-dhcp. --- src/dhcp/dhcp-example-client.c | 112 1 file changed, 112 insertions(+) create mode 100644 src/dhcp/dhcp-example-client.c diff --git a/src/dhcp/dhcp-example-client.c

[systemd-devel] [PATCH 16/28] build: Add example DHCP test program

2013-11-13 Thread Patrik Flykt
--- Makefile.am | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Makefile.am b/Makefile.am index 1c73423..f079822 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3760,6 +3760,12 @@ libsystemd_dhcp_la_LDFLAGS = \ libsystemd_dhcp_la_LIBADD = \ libsystemd-shared.la

[systemd-devel] [PATCH 07/28] build: Add DHCP option test

2013-11-13 Thread Patrik Flykt
--- Makefile.am | 10 ++ src/dhcp/test-dhcp-option.c | 16 +++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index cc52f01..aeca484 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3740,6 +3740,15 @@ endif #

[systemd-devel] [PATCH 02/28] dhcp: Add DHCP client initialization

2013-11-13 Thread Patrik Flykt
Provide functionality for initializing a DHCP client struct, setting interface index, last used address and additional options to request. On initialization the most useful options are added by default. --- src/dhcp/client.c | 137 +

[systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Patrik Flykt
Hi, This patch set implements a DHCPv4 client library named libsystemd-dhcp to be used with systemd-network. The code implements the DHCP protocol from the INIT state up to expiry, T1 and T2 timer setting, but does nothing in response to the IP address reacquisition T1 and T2 timers

[systemd-devel] [PATCH 21/28] dhcp: Handle received DHCP Offer message

2013-11-13 Thread Patrik Flykt
Create a function for handling the full IP, UDP and DHCP packet and tie it to the main loop. Verify IP and UDP headers and checksum. Creat a new lease structure with using the values supplied in the DHCP message. Free the lease structure when client is stopped. Split out socket handling into a

[systemd-devel] [PATCH 25/28] dhcp: Compute expire, T1 and T2 timers

2013-11-13 Thread Patrik Flykt
Compute the default T1 and T2 timer values if they were not set by the DHCP server. Verify that the values are reasonable. --- src/dhcp/client.c | 123 ++- src/dhcp/protocol.h |2 + 2 files changed, 124 insertions(+), 1 deletion(-) diff

[systemd-devel] [PATCH 17/28] dhcp: Support seconds elapsed since start of DHCP negotiation

2013-11-13 Thread Patrik Flykt
It was noticed by Grant Erickson in ConnMan commit 95e15c09350acf58d4707056ae2614570883ef66 that: Certain DHCP servers, such as that implemented in Mac OS X ( 10.7) for its Internet Sharing feature, refuse to issue a DHCP lease to clients that have not set a non-zero value in their

[systemd-devel] [PATCH 19/28] build: Add dependency on libsystemd-bus needed for main loop

2013-11-13 Thread Patrik Flykt
--- Makefile.am |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index f079822..433383d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3758,7 +3758,8 @@ libsystemd_dhcp_la_LDFLAGS = \ $(AM_LDFLAGS) libsystemd_dhcp_la_LIBADD = \ -

[systemd-devel] [PATCH 22/28] dhcp: Send DHCP Request to acquire an IP address

2013-11-13 Thread Patrik Flykt
Create and send a DHCP Request message reusing already existing parts of the code. This causes factoring out IP and UDP header creation and moving next timeout calculation to be done every time in the timer callback function independent of DHCP state. Also add an exponential part to the timer

[systemd-devel] [PATCH 27/28] dhcp: Add function to free DHCP client data

2013-11-13 Thread Patrik Flykt
--- src/dhcp/client.c | 11 +++ src/dhcp/client.h |2 ++ 2 files changed, 13 insertions(+) diff --git a/src/dhcp/client.c b/src/dhcp/client.c index 0144c70..a274549 100644 --- a/src/dhcp/client.c +++ b/src/dhcp/client.c @@ -994,6 +994,17 @@ int dhcp_client_stop(DHCPClient *client)

[systemd-devel] [PATCH 06/28] dhcp: Add buffer length and invalid cookie tests for DHCP options

2013-11-13 Thread Patrik Flykt
Create an initial simple test program for these two cases. --- src/dhcp/test-dhcp-option.c | 54 +++ 1 file changed, 54 insertions(+) create mode 100644 src/dhcp/test-dhcp-option.c diff --git a/src/dhcp/test-dhcp-option.c b/src/dhcp/test-dhcp-option.c

[systemd-devel] [PATCH 10/28] dhcp: Add test function for computing checksum

2013-11-13 Thread Patrik Flykt
--- src/dhcp/test-dhcp-client.c | 40 1 file changed, 40 insertions(+) diff --git a/src/dhcp/test-dhcp-client.c b/src/dhcp/test-dhcp-client.c index 26857b6..94f576a 100644 --- a/src/dhcp/test-dhcp-client.c +++ b/src/dhcp/test-dhcp-client.c @@ -22,6

[systemd-devel] [PATCH 12/28] dhcp: Add DHCP discover sending

2013-11-13 Thread Patrik Flykt
On starting the client, use the supplied interface mac address and create a transaction id. Puzzle together an IP/UDP/DHCP Discover message, compute checksums and send it out as a raw packet. Create an additional function that constructs default options common to all DHCP messages. Set the DHCP

[systemd-devel] [PATCH 24/28] dhcp: Process DHCP Ack/Nak message

2013-11-13 Thread Patrik Flykt
Process a DHCP Ack/Nak in much the same way as an DHCP Offer. Factor out header verification and process options sent. Add notification functionality with discrete values for the outcome of the DHCP Ack/ Nak processing. --- src/dhcp/client.c | 145

[systemd-devel] [PATCH 13/28] build: Add libsystemd-dhcp

2013-11-13 Thread Patrik Flykt
--- Makefile.am | 20 1 file changed, 20 insertions(+) diff --git a/Makefile.am b/Makefile.am index aeca484..5c350ab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3740,6 +3740,26 @@ endif # --

[systemd-devel] [PATCH 18/28] dhcp: Add function to stop the DHCP client

2013-11-13 Thread Patrik Flykt
The client is stopped and brought back to its initial state. --- src/dhcp/client.c | 35 +++ src/dhcp/client.h |1 + 2 files changed, 36 insertions(+) diff --git a/src/dhcp/client.c b/src/dhcp/client.c index dc92880..79ac93b 100644 --- a/src/dhcp/client.c

[systemd-devel] [PATCH 08/28] dhcp: Add tests for DHCP options, file and sname fields

2013-11-13 Thread Patrik Flykt
Add a structure describing the DHCP file, sname and trailing options fields. Create a messge holding these fields and call the internal option parsing function. In the test callback function verify that only regular options are passed and figure out which part of the DHCP message is the one that

[systemd-devel] [PATCH 26/28] dhcp: Add notification callback

2013-11-13 Thread Patrik Flykt
Define a notification callback and events for stopping and client lease expiry. Add functions to fetch IP parameters from a lease. --- src/dhcp/client.c | 98 - src/dhcp/client.h |9 + 2 files changed, 106 insertions(+), 1 deletion(-)

[systemd-devel] [PATCH 09/28] dhcp: Add option append tests

2013-11-13 Thread Patrik Flykt
Add checks for invalid lengths and parameters when using the option appending function. Add also checks for adding options, see to it that the resulting array is identical to the array of options added. --- src/dhcp/test-dhcp-option.c | 71 +++ 1 file

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Greg KH
On Wed, Nov 13, 2013 at 11:22:28PM +0200, Patrik Flykt wrote: Hi, This patch set implements a DHCPv4 client library named libsystemd-dhcp to be used with systemd-network. Nice stuff. Where did this code come from, conman? If so, for some reason I thought that it would be easier to

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Marcel Holtmann
Hi Greg, This patch set implements a DHCPv4 client library named libsystemd-dhcp to be used with systemd-network. Nice stuff. Where did this code come from, conman? If so, for some reason I thought that it would be easier to make a library of the existing conman dhcp code and have both

Re: [systemd-devel] systemd-networkd questions

2013-11-13 Thread Patrik Flykt
Hi, On Wed, 2013-11-13 at 17:39 +0100, Tom Gundersen wrote: I'm sure I would like avoid that :) Hopefully we'll be able to reuse the dhcp client from connman, but as the work of converting that into a library has not yet finished I don't know yet exactly how that will work out.

Re: [systemd-devel] systemd-networkd questions

2013-11-13 Thread Tom Gundersen
On Wed, Nov 13, 2013 at 10:41 PM, Patrik Flykt patrik.fl...@linux.intel.com wrote: Hi, On Wed, 2013-11-13 at 17:39 +0100, Tom Gundersen wrote: I'm sure I would like avoid that :) Hopefully we'll be able to reuse the dhcp client from connman, but as the work of converting that into

Re: [systemd-devel] systemd-networkd questions

2013-11-13 Thread Marcel Holtmann
Hi Bill, Without criticizing any of the existing solutions, some of the things that motivated my interest in this is that I think we need: something easily configured via plain configuration files by a sysadmin, something that would take a limited amount of space (including its dependencies)

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Patrik Flykt
Hi, On Thu, 2013-11-14 at 06:31 +0900, Greg KH wrote: Nice stuff. Where did this code come from, conman? If so, for some reason I thought that it would be easier to make a library of the existing conman dhcp code and have both projects use it instead of forking and having two

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Colin Walters
On Thu, 2013-11-14 at 06:49 +0900, Marcel Holtmann wrote: that is the long term plan. Once ConnMan is switching over to use libsystemd-bus and kdbus, we are switching over to using the systemd event loop instead of GLib main loop But I think the long term architecturally correct place for

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Marcel Holtmann
Hi Colin, that is the long term plan. Once ConnMan is switching over to use libsystemd-bus and kdbus, we are switching over to using the systemd event loop instead of GLib main loop But I think the long term architecturally correct place for the core system main loop is glibc, not

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Colin Walters
On Thu, 2013-11-14 at 07:25 +0900, Marcel Holtmann wrote: I am a bit lost on your concerns here. Our focus for ConnMan is libsystemd-bus and kdbus support. Yeah, sorry; I just kind of used your mail as a basis for the larger picture of sd_event as public API. And as a system daemon, I only

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:29PM +0200, Patrik Flykt wrote: Create a new directory to host DHCP components. --- src/dhcp/protocol.h | 93 +++ 1 file changed, 93 insertions(+) create mode 100644 src/dhcp/protocol.h diff --git

Re: [systemd-devel] [PATCH 02/28] dhcp: Add DHCP client initialization

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:30PM +0200, Patrik Flykt wrote: Provide functionality for initializing a DHCP client struct, setting interface index, last used address and additional options to request. On initialization the most useful options are added by default. --- src/dhcp/client.c |

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 17:18, Colin Walters (walt...@verbum.org) wrote: On Thu, 2013-11-14 at 06:49 +0900, Marcel Holtmann wrote: that is the long term plan. Once ConnMan is switching over to use libsystemd-bus and kdbus, we are switching over to using the systemd event loop instead of GLib

Re: [systemd-devel] [PATCH 05/28] dhcp: Add option appending and parsing

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:33PM +0200, Patrik Flykt wrote: Add functions to append and parse DHCP options. Not all options are passed to the callback function, the ones not exposed are pad, end, message type and overload. If indicated by the overload option, file and sname fields will be

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +struct DHCPMessage { +uint8_t op; +uint8_t htype; +uint8_t hlen; +uint8_t hops; +uint32_t xid; +uint16_t secs; +uint16_t flags; +uint32_t ciaddr; +

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Nov 14, 2013 at 12:47:24AM +0100, Lennart Poettering wrote: I doubt moving OpenJDK or Python to sd-event or something like it ever would make sense. (Do either even have any event loop? http://www.python.org/dev/peps/pep-3156/ Zbyszek ___

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Marcel Holtmann
Hi Lennart, +#define BOOTREQUEST 1 +#define BOOTREPLY 2 + +#define DHCP_DISCOVER 1 +#define DHCP_OFFER 2 +#define DHCP_REQUEST3 +#define DHCP_DECLINE

Re: [systemd-devel] [PATCH 02/28] dhcp: Add DHCP client initialization

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +static uint8_t default_req_opts[] = { +DHCP_OPTION_SUBNET_MASK, +DHCP_OPTION_ROUTER, +DHCP_OPTION_HOST_NAME, +DHCP_OPTION_DOMAIN_NAME, +DHCP_OPTION_DOMAIN_NAME_SERVER, +

Re: [systemd-devel] [PATCH 05/28] dhcp: Add option appending and parsing

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +int __dhcp_option_append(uint8_t **buf, int *buflen, uint8_t code, + uint8_t optlen, void *optval); + The __ prefix is actually private property by the C compiler, according to ANSI C. Please

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Lennart Poettering
On Thu, 14.11.13 08:56, Marcel Holtmann (mar...@holtmann.org) wrote: Hi Lennart, +#define BOOTREQUEST 1 +#define BOOTREPLY 2 + +#define DHCP_DISCOVER 1 +#define DHCP_OFFER

Re: [systemd-devel] [PATCH 11/28] dhcp: Add function for sending a raw packet

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +int __dhcp_network_send_raw_packet(int index, void *packet, int len); Shouldn't this be const void *? int __dhcp_option_append(uint8_t **buf, int *buflen, uint8_t code, buflen should better be size_t, no?

Re: [systemd-devel] [PATCH 12/28] dhcp: Add DHCP discover sending

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +static int client_send_discover(DHCPClient *client) +{ +int err = 0; +DHCPPacket *discover; +int optlen, len; +uint8_t *opt; + +optlen = DHCP_CLIENT_MIN_OPTIONS_SIZE; +

Re: [systemd-devel] [PATCH 13/28] build: Add libsystemd-dhcp

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: --- Makefile.am | 20 1 file changed, 20 insertions(+) diff --git a/Makefile.am b/Makefile.am index aeca484..5c350ab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3740,6 +3740,26 @@ endif

Re: [systemd-devel] [PATCH 15/28] dhcp: Add example DHCP client test program

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +static int get_mac(int index, struct ether_addr *mac) +{ +struct ifreq ifr; +int s, err; + +if (index 0 || !mac) +return -EINVAL; + +s = socket(PF_INET, SOCK_DGRAM

Re: [systemd-devel] [PATCH 17/28] dhcp: Support seconds elapsed since start of DHCP negotiation

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: It was noticed by Grant Erickson in ConnMan commit 95e15c09350acf58d4707056ae2614570883ef66 that: Certain DHCP servers, such as that implemented in Mac OS X ( 10.7) for its Internet Sharing feature, refuse to

Re: [systemd-devel] [PATCH 04/28] build: Add initial build support

2013-11-13 Thread Tom Gundersen
On Wed, Nov 13, 2013 at 10:22 PM, Patrik Flykt patrik.fl...@linux.intel.com wrote: The client test program is the only one to be built so far. --- Makefile.am | 15 +++ configure.ac |9 + src/dhcp/Makefile |1 + 3 files changed, 25 insertions(+)

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Nov 14, 2013 at 01:10:07AM +0100, Lennart Poettering wrote: On Thu, 14.11.13 08:56, Marcel Holtmann (mar...@holtmann.org) wrote: Hi Lennart, +#define BOOTREQUEST 1 +#define BOOTREPLY 2 + +#define DHCP_DISCOVER

Re: [systemd-devel] [PATCH 20/28] dhcp: Add timeout and main loop support

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: int index; uint8_t *req_opts; int req_opts_size; struct in_addr *last_addr; struct ether_addr mac_addr; uint32_t xid; +uint64_t start_time; Internally

Re: [systemd-devel] [PATCH 21/28] dhcp: Handle received DHCP Offer message

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +if (client-fd 0) +close(client-fd); +client-fd = 0; fd 0 is a valid fd (actually refers to stdin), I am pretty sure you want to assign -1 here, no? +if (hdrlen +

Re: [systemd-devel] [PATCH 04/28] build: Add initial build support

2013-11-13 Thread Tom Gundersen
On Thu, Nov 14, 2013 at 1:28 AM, Tom Gundersen t...@jklm.no wrote: On Wed, Nov 13, 2013 at 10:22 PM, Patrik Flykt patrik.fl...@linux.intel.com wrote: The client test program is the only one to be built so far. --- Makefile.am | 15 +++ configure.ac |9 +

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Lennart Poettering
On Wed, 13.11.13 23:22, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: Hi, This patch set implements a DHCPv4 client library named libsystemd-dhcp to be used with systemd-network. The code implements the DHCP protocol from the INIT state up to expiry, T1 and T2 timer setting,

Re: [systemd-devel] [PATCH 00/28] Initial DHCP v4 library implementation

2013-11-13 Thread Colin Walters
On Thu, 2013-11-14 at 00:47 +0100, Lennart Poettering wrote: I am pretty sure it makes sense to have domain-specific event loops. I am not convinced that it would even be possible to unify all event loop implementations into one. For example, GLib and and sd-event support priorization of

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Marcel Holtmann
Hi Zbyszek, +#define BOOTREQUEST 1 +#define BOOTREPLY 2 + +#define DHCP_DISCOVER 1 +#define DHCP_OFFER 2 +#define DHCP_REQUEST3 +#define DHCP_DECLINE

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Lennart Poettering
On Thu, 14.11.13 09:50, Marcel Holtmann (mar...@holtmann.org) wrote: +#define BOOTREQUEST 1 +#define BOOTREPLY 2 + +#define DHCP_DISCOVER 1 +#define DHCP_OFFER 2 +#define

Re: [systemd-devel] [PATCH 01/28] dhcp: Add DHCP protocol structures and initial defines

2013-11-13 Thread Marcel Holtmann
Hi Lennart, +#define BOOTREQUEST 1 +#define BOOTREPLY 2 + +#define DHCP_DISCOVER 1 +#define DHCP_OFFER 2 +#define DHCP_REQUEST3 +#define DHCP_DECLINE

Re: [systemd-devel] [PATCH 25/28] dhcp: Compute expire, T1 and T2 timers

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:53PM +0200, Patrik Flykt wrote: Compute the default T1 and T2 timer values if they were not set by the DHCP server. Verify that the values are reasonable. --- src/dhcp/client.c | 123 ++- src/dhcp/protocol.h |

Re: [systemd-devel] [PATCH 24/28] dhcp: Process DHCP Ack/Nak message

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:52PM +0200, Patrik Flykt wrote: Process a DHCP Ack/Nak in much the same way as an DHCP Offer. Factor out header verification and process options sent. Add notification functionality with discrete values for the outcome of the DHCP Ack/ Nak processing. ---

Re: [systemd-devel] [PATCH 28/28] dhcp: Use callback in test client

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:56PM +0200, Patrik Flykt wrote: Print out the event received and possibly also IP related data. --- src/dhcp/dhcp-example-client.c | 53 1 file changed, 53 insertions(+) diff --git a/src/dhcp/dhcp-example-client.c

Re: [systemd-devel] [PATCH 10/28] dhcp: Add test function for computing checksum

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:38PM +0200, Patrik Flykt wrote: --- src/dhcp/test-dhcp-client.c | 40 1 file changed, 40 insertions(+) diff --git a/src/dhcp/test-dhcp-client.c b/src/dhcp/test-dhcp-client.c index 26857b6..94f576a 100644 ---

Re: [systemd-devel] [PATCH 08/28] dhcp: Add tests for DHCP options, file and sname fields

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:22:36PM +0200, Patrik Flykt wrote: Add a structure describing the DHCP file, sname and trailing options fields. Create a messge holding these fields and call the internal option parsing function. In the test callback function verify that only regular options are

Re: [systemd-devel] [PATCH] nspawn does not correctly handle I/O redirection

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Nov 05, 2013 at 07:59:46PM +0100, Lennart Poettering wrote: On Mon, 04.11.13 11:05, Luke T. Shumaker (luke...@sbcglobal.net) wrote: A couple of weeks ago, I reported a bug that systemd-nspawn does not correctly handle I/O redirection[1]. I described in detail the several

Re: [systemd-devel] [PATCH] journal: timestamp support on console messages

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 03:27:19PM +0100, Umut Tezduyar Lindskog wrote: --- src/journal/journald-console.c | 33 ++--- 1 files changed, 30 insertions(+), 3 deletions(-) Applied, but changed prefix_timestamp to be more like on_tty(), and make use of

Re: [systemd-devel] [PATCH] Add bootctl man page, zsh completion

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 13, 2013 at 11:06:13AM +0200, Marko Myllynen wrote: Hi, please consider the attached bootctl man page to fix RHBZ#1014303. As a bonus I'm also attaching zsh completion rules for bootctl. Applied, thanks. In the future, please provide patches separately, and after adding man

Re: [systemd-devel] [PATCH 0/3] Fix issues re: visibility of status messages

2013-11-13 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Sep 20, 2013 at 10:18:27PM +0200, Olivier Brunel wrote: Hi, I'm running Arch Linux, have been using systemd-204, and recently tried the new 207 release, and I have been having some issues with it. One was that status messages would just stop at some point near the end of the boot

[systemd-devel] [PATCHv2 0/2] zsh-completion style fixes

2013-11-13 Thread William Giokas
Just style changes to the zsh completion. If either of these patches are too large, you can view them at http://git.kaictl.net/wgiokas/systemd.git/?h=zsh-stylefix v2: Added fixes to _bootctl William Giokas (2): zsh-completion: Use same tab-width for all files zsh-completion: Function

[systemd-devel] [PATCHv2 2/2] zsh-completion: Function declarations follow style

2013-11-13 Thread William Giokas
Follow the instructions in CODING_STYLE for the zsh completion functions. --- shell-completion/zsh/_hostnamectl | 3 ++- shell-completion/zsh/_journalctl | 12 shell-completion/zsh/_kernel-install | 6 -- shell-completion/zsh/_localectl | 12

Re: [systemd-devel] Need help with a systemd/mdadm interaction.

2013-11-13 Thread Alexander E. Patrakov
NeilBrown пишет: On Wed, 13 Nov 2013 22:11:27 +0600 Alexander E. Patrakov patra...@gmail.com wrote: 2013/11/13 NeilBrown ne...@suse.de: On Tue, 12 Nov 2013 19:01:49 +0400 Andrey Borzenkov arvidj...@gmail.com wrote: Something like mdadm-last-resort@.timer [Timer] OnCalendar=+5s

  1   2   >