[systemd-devel] [PATCH] shared: rename hasprefix() to startswith(), which is functionally identical and removed

2013-07-12 Thread Shawn Landden
as most (if not all) of the prefix strings are static, these will get forward constant propagation optimized into single memcmp() calls, which should be much better than the non-SIMD hand-rolled version. --- src/journal/journal-send.c | 2 +- src/journal/journald-native.c | 12 ++--

[systemd-devel] [PATCH v2] shared: rename hasprefix() to startswith(), which is functionally identical and removed

2013-07-12 Thread Shawn Landden
as most (if not all) of the prefix strings are static, these will get forward constant propagation optimized into single memcmp() calls, which should be much better than the non-SIMD hand-rolled version. --- TODO | 2 -- src/journal/journal-send.c | 2 +-

[systemd-devel] [PATCH] journalctl: have a useful --setup-keys error message when using non-persistant logging

2013-07-12 Thread Shawn Landden
Generating seed... Generating key pair... Generating sealing key... Failed to open /var/log/journal/33f46101703a10c5fc6fa4f451840101/fss.tmp.k2wDDU: No such file or directory --- src/journal/journalctl.c | 17 + 1 file changed, 17 insertions(+) diff --git

[systemd-devel] [PATCH 1/2] journalctl: add --force option to recreate FSS

2013-07-14 Thread Shawn Landden
reuse -f? --- src/journal/journalctl.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 32665b7..5f44fce 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -79,6 +79,7 @@

[systemd-devel] [PATCH v4] journal: add logging of effective capabilities _CAP_EFFECTIVE

2013-07-15 Thread Shawn Landden
I think this is the most important of the capabilities bitmasks to log. --- TODO | 2 -- man/systemd.journal-fields.xml | 9 + src/journal/journald-server.c | 7 +++ src/shared/util.c | 34 ++ src/shared/util.h

[systemd-devel] [PATCH] configure: add -Wno-cast-align to CFLAGS

2013-07-15 Thread Shawn Landden
these warnings on !x86 arches for good code are annoying, and there is no way to mark the offending code safe, so I guess we are just going to have to deal with the resulting problems as we come across them. Also, these warnings are present for armv6+armv7, when they moreso effect armv5. ---

[systemd-devel] [PATCH] shared: fix build on !x86

2013-07-20 Thread Shawn Landden
--- src/shared/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/virt.c b/src/shared/virt.c index 1abd686..4f8134a 100644 --- a/src/shared/virt.c +++ b/src/shared/virt.c @@ -29,6 +29,8 @@ /* Returns a short identifier for the various VM implementations

[systemd-devel] [PATCH] build: do not link everything with -lrt (and therefore -pthread)

2013-07-21 Thread Shawn Landden
--- Makefile.am | 1 + configure.ac | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 3ece887..f96866c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1832,6 +1832,7 @@ libsystemd_daemon_internal_la_SOURCES = \

[systemd-devel] [PATCH] man: make reference to bind(2) explicit

2013-08-21 Thread Shawn Landden
--- man/systemd.socket.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml index 852010b..1fc28c5 100644 --- a/man/systemd.socket.xml +++ b/man/systemd.socket.xml @@ -510,7 +510,7 @@ varlistentry

[systemd-devel] [PATCH] remove hasprefix(), use startswith()

2013-08-21 Thread Shawn Landden
memcmp() could read from uninitilized memory if string is at the end of a page boundry and shorter than prefix --- TODO | 2 -- src/journal/journal-send.c | 2 +- src/journal/journald-native.c | 12 ++-- src/libsystemd-bus/bus-match.c | 26

[systemd-devel] [PATCH] udev: fix printf(3) type specifier

2013-08-22 Thread Shawn Landden
From: Shawn Landden shawnland...@gmail.com src/udev/udev-rules.c: In function 'add_rule': src/udev/udev-rules.c:1078:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'int' [-Wformat=] log_error(invalid key/value pair

[systemd-devel] [PATCH] util, utf8: recognize wide characters in wellipsize_mem()

2013-08-28 Thread Shawn Landden
--- src/shared/utf8.c | 64 +++ src/shared/utf8.h | 4 +++- src/shared/util.c | 19 ++--- src/shared/util.h | 1 + 4 files changed, 84 insertions(+), 4 deletions(-) diff --git a/src/shared/utf8.c b/src/shared/utf8.c index

[systemd-devel] [PATCH 2/3] util, utf8: new wellipsize and wellipsize_mem that take into account multi-byte characters

2013-09-11 Thread Shawn Landden
This version counts all multibyte characters as 1 width, not taking into account double width cjk characters and zerowidth characters --- src/shared/util.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/util.c b/src/shared/util.c index b791433..c6375e5

Re: [systemd-devel] [PATCH] util, utf8: recognize wide characters in wellipsize_mem()

2013-09-11 Thread Shawn Landden
Original Message From: Zbigniew Jędrzejewski-Szmek To: shawnland...@gmail.com CC: systemd-devel@lists.freedesktop.org, Shawn Landden Sent: Tue, Sep 10, 2013, 08:59 Subject: Re: [systemd-devel] [PATCH] util, utf8: recognize wide characters in wellipsize_mem() Hi Shawn, thank you

[systemd-devel] [PATCH 1/3] util: ellipsize_mem: do not print partial utf-8 characters

2013-09-11 Thread Shawn Landden
100644 index 000..f6db82c --- /dev/null +++ b/src/test/test-wellipsize.c @@ -0,0 +1,42 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2013 Shawn Landden + + systemd is free software; you can redistribute it and/or modify

[systemd-devel] [PATCH 1/2] util, utf8: make ellipsize and ellipsize_mem take into account multi-byte characters

2013-09-13 Thread Shawn Landden
rename old versions to ascii_* Do not take into account zerowidth characters, but do consider double-wide characters. Import needed utf8 helper code from glib. --- TODO | 4 -- src/shared/utf8.c | 120 ++ src/shared/utf8.h | 100

[systemd-devel] [PATCH 2/2] test: test for new ellipsize_mem (requires user)

2013-09-13 Thread Shawn Landden
/null +++ b/src/test/test-ellipsize.c @@ -0,0 +1,42 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2013 Shawn Landden + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser

[systemd-devel] [PATCH 1/2] util, utf8: make ellipsize and ellipsize_mem take into account multi-byte characters

2013-09-13 Thread Shawn Landden
rename old versions to ascii_* Do not take into account zerowidth characters, but do consider double-wide characters. Import needed utf8 helper code from glib. --- TODO | 4 -- src/shared/utf8.c | 120 ++ src/shared/utf8.h | 100

[systemd-devel] [PATCH] util: preserve get_process_capeff behavior

2013-09-17 Thread Shawn Landden
69ab80881552d5f79ca95f6b3be48ad122ab1ec2 tried to unify parsing of status files, but removed the logic of skipping extra '0's when getting the effective capabilities. Restore that logic. --- src/shared/util.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git

[systemd-devel] [PATCH] Actually fix capability logging when effective caps are 0

2013-09-18 Thread Shawn Landden
--- src/shared/fileio.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/shared/fileio.c b/src/shared/fileio.c index 8aa4cdb..3a7f84e 100644 --- a/src/shared/fileio.c +++ b/src/shared/fileio.c @@ -677,13 +677,11 @@ int get_status_field(const char *filename,

[systemd-devel] [PATCH] Actually fix capability logging when effective caps are 0

2013-09-18 Thread Shawn Landden
--- src/shared/fileio.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/shared/fileio.c b/src/shared/fileio.c index 8aa4cdb..3eaa911 100644 --- a/src/shared/fileio.c +++ b/src/shared/fileio.c @@ -673,17 +673,15 @@ int get_status_field(const char *filename,

[systemd-devel] [PATCH] Actually fix capability logging when effective caps are 0

2013-09-19 Thread Shawn Landden
--- src/shared/fileio.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/shared/fileio.c b/src/shared/fileio.c index 01b803c..909a58f 100644 --- a/src/shared/fileio.c +++ b/src/shared/fileio.c @@ -662,6 +662,8 @@ int get_status_field(const char *filename,

[systemd-devel] [PATCH] util, fileio: do not use get_status_field() for get_process_capeff()

2013-09-19 Thread Shawn Landden
Tt is in the logging hot path and has too many special needs, like skipping extra '0's. --- src/shared/fileio.c | 16 +++- src/shared/util.c | 24 +++- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/shared/fileio.c b/src/shared/fileio.c

Re: [systemd-devel] [PATCH] util, fileio: do not use get_status_field() for get_process_capeff()

2013-09-19 Thread Shawn Landden
On Thu, Sep 19, 2013 at 11:58 AM, David Strauss da...@davidstrauss.net wrote: Does this supersede your earlier patch for get_status_field()? Yes. I tried to optimize the previous patch, and realized it is not really possible without splitting back out the capeff handling, which is the one

[systemd-devel] [PATCH 1/2] util, utf8: make ellipsize and ellipsize_mem take into account multi-byte characters

2013-09-20 Thread Shawn Landden
rename old versions to ascii_* Do not take into account zerowidth characters, but do consider double-wide characters. Import needed utf8 helper code from glib. v3: rebase ontop of utf8 restructuring work --- TODO | 4 -- src/shared/utf8.c | 120

[systemd-devel] [PATCH 2/2] test: test for ellipsize (manual)

2013-09-20 Thread Shawn Landden
@@ -0,0 +1,42 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2013 Shawn Landden + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published

Re: [systemd-devel] [PATCH] util: preserve get_process_capeff behavior

2013-09-21 Thread Shawn Landden
On Thu, Sep 19, 2013 at 2:40 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Thu, Sep 19, 2013 at 10:28:40AM -0700, Shawn Landden wrote: We can't optimize the strcspn(t, WHITESPACE); to a strchr(t, '\n') - t; because of the kB that meminfo and a few other places have, that we

Re: [systemd-devel] [ANNOUNCE] systemd 208

2013-10-03 Thread Shawn Landden
-- Lennart Poettering - Red Hat, Inc. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- --- Shawn Landden +1 360 389 3001 (SMS preferred

[systemd-devel] [PATCH 3/3] core: support Distribute=n to distribute to n SO_REUSEPORT workers

2013-11-14 Thread Shawn Landden
--- TODO | 3 +- src/core/dbus-socket.c| 2 ++ src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/service.c| 2 +- src/core/service.h| 13 +++- src/core/socket.c | 63

[systemd-devel] [PATCH 2/3] core/socket: fix SO_REUSEPORT

2013-11-14 Thread Shawn Landden
--- src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/socket.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index e3025d2..b64fdc9 100644 ---

[systemd-devel] [PATCH] core: support Distribute=n to distribute to n SO_REUSEPORT workers

2013-11-14 Thread Shawn Landden
Should SERVICE_SIMPLE test be a load-time test? v2 fix assert order --- TODO | 3 +- src/core/dbus-socket.c| 2 ++ src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/service.c| 2 +- src/core/service.h

[systemd-devel] [PATCH 1/2] core: support Distribute=n to distribute to n SO_REUSEPORT workers

2013-11-14 Thread Shawn Landden
v3 make each worker its own service --- TODO | 3 +- man/systemd.socket.xml| 9 +++ src/core/dbus-socket.c| 2 + src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/service.c| 7 +- src/core/service.h

[systemd-devel] [PATCH 2/2] core: lazy distribute for Distribute pools

2013-11-14 Thread Shawn Landden
--- man/systemd.socket.xml| 9 + src/core/dbus-socket.c| 2 ++ src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/socket.c | 7 ++- src/core/socket.h | 1 + 5 files changed, 19 insertions(+), 1 deletion(-)

[systemd-devel] [PATCH] core: support Distribute=n to distribute to n SO_REUSEPORT workers

2013-11-15 Thread Shawn Landden
v3: make each worker its own service v4: be less intrusive --- TODO | 3 - man/systemd.socket.xml| 9 +++ src/core/dbus-socket.c| 2 + src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/service.c| 7

[systemd-devel] [PATCH 1/4] core/socket: use _cleanup_free_

2013-11-16 Thread Shawn Landden
--- src/core/socket.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/core/socket.c b/src/core/socket.c index 03b8f92..f505e4f 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1475,7 +1475,7 @@ static void socket_enter_running(Socket *s, int cfd) {

[systemd-devel] [PATCH 3/4] core: support Distribute=n to distribute to n SO_REUSEPORT workers

2013-11-16 Thread Shawn Landden
v3: make each worker its own service v4: be less intrusive v5: misc fixups --- TODO | 3 - man/systemd.socket.xml| 11 src/core/dbus-socket.c| 2 + src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/service.c

[systemd-devel] [PATCH 4/4] core: lazy distribute for Distribute pools

2013-11-16 Thread Shawn Landden
--- man/systemd.socket.xml| 9 + src/core/dbus-socket.c| 2 ++ src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/socket.c | 7 ++- src/core/socket.h | 1 + 5 files changed, 19 insertions(+), 1 deletion(-)

[systemd-devel] [PATCH 2/4] core/socket: fix SO_REUSEPORT

2013-11-16 Thread Shawn Landden
--- src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/socket.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index e3025d2..b64fdc9 100644 ---

Re: [systemd-devel] [PATCH 4/4] core: lazy distribute for Distribute pools

2013-11-17 Thread Shawn Landden
On Sun, Nov 17, 2013 at 2:28 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Sun, Nov 17, 2013 at 08:46:46PM +0100, Lennart Poettering wrote: On Sat, 16.11.13 13:18, Shawn Landden (sh...@churchofgit.com) wrote: varlistentry

[systemd-devel] [PATCH] use #pragma once instead of foo*foo define guards

2013-11-18 Thread Shawn Landden
--- src/core/killall.h | 5 + src/core/switch-root.h | 5 + src/core/syscall-list.h | 5 + src/core/transaction.h | 5 + src/login/logind-action.h | 5 + src/login/logind-button.h | 5 + src/login/logind-inhibit.h | 5

[systemd-devel] [PATCH] service: remove unneccesary Socket.got_socket_fd

2013-11-20 Thread Shawn Landden
--- src/core/service.c | 3 +-- src/core/service.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/service.c b/src/core/service.c index c0ee114..24f7a42 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2812,7 +2812,7 @@ _pure_ static bool

[systemd-devel] [PATCH 2/2] systemctl: add systemctl cat

2013-11-22 Thread Shawn Landden
--- TODO | 2 -- src/shared/fileio.c | 73 - src/shared/fileio.h | 1 + src/systemctl/systemctl.c | 91 +++ 4 files changed, 149 insertions(+), 18 deletions(-) diff --git a/TODO

[systemd-devel] [PATCH 1/2] systemctl: refactor show()

2013-11-22 Thread Shawn Landden
--- src/systemctl/systemctl.c | 66 ++- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 84826a3..576396f 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c

[systemd-devel] [PATCH] core/socket: we only want one event on standard sockets

2013-11-22 Thread Shawn Landden
With EPOLLONESHOT we are guaranteed to only recieve one event until we reload with socket_enter_listening(s), otherwise multiple events can be generated upon receipt of multiple chunks of data. We also only want wake-ups when external events happen, i.e. edge-triggered wakeups. ---

[systemd-devel] [PATCH 1/2] systemctl: refactor show()

2013-11-23 Thread Shawn Landden
v2, don't leave in unused function --- src/systemctl/systemctl.c | 36 +--- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 84826a3..6cb7a82 100644 --- a/src/systemctl/systemctl.c +++

[systemd-devel] [PATCH 2/2] systemctl: add systemctl cat

2013-11-23 Thread Shawn Landden
--- TODO | 2 -- src/shared/fileio.c | 73 - src/shared/fileio.h | 1 + src/systemctl/systemctl.c | 91 +++ 4 files changed, 164 insertions(+), 3 deletions(-) diff --git a/TODO

[systemd-devel] [PATCH] nspawn: Give a more helpful error message when -D argument is bogus.

2013-11-25 Thread Shawn Landden
--- src/nspawn/nspawn.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 0973a00..1ee4ab3 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -200,6 +200,11 @@ static int parse_argv(int argc, char *argv[]) { case

Re: [systemd-devel] [PATCH] core/socket: we only want one event on standard sockets

2013-11-26 Thread Shawn Landden
As we only reciece one event at a time, and dequeue it in the same go, yeah ONESHOT won't change anything. On Tue, Nov 26, 2013 at 9:33 AM, David Timothy Strauss da...@davidstrauss.net wrote: On Wed, Nov 27, 2013 at 2:32 AM, Lennart Poettering lenn...@poettering.net wrote: Well, but EPOLLET

Re: [systemd-devel] [PATCH] core/socket: we only want one event on standard sockets

2013-11-26 Thread Shawn Landden
On Tue, Nov 26, 2013 at 1:48 PM, David Timothy Strauss da...@davidstrauss.net wrote: On Wed, Nov 27, 2013 at 6:23 AM, Shawn Landden sh...@churchofgit.com wrote: I was worried that the fact that we never accept() the socket when using distribute (now I am convinced we shouldn't use it otherwise

Re: [systemd-devel] [PATCH] core/socket: we only want one event on standard sockets

2013-11-27 Thread Shawn Landden
On Tue, Nov 26, 2013 at 7:57 PM, David Timothy Strauss da...@davidstrauss.net wrote: On Wed, Nov 27, 2013 at 7:57 AM, Shawn Landden sh...@churchofgit.com wrote: Are you sure applications can handle the extra file descriptor of passing both the sockfd and the acceptfd in this case? I don't see

[systemd-devel] [PATCH] systemctl: add systemctl cat

2013-11-28 Thread Shawn Landden
--- TODO | 2 - src/shared/fileio.c | 73 ++- src/shared/fileio.h | 1 + src/shared/util.c | 2 + src/systemctl/systemctl.c | 97 +++ 5 files changed, 172 insertions(+), 3

Re: [systemd-devel] [PATCH 2/2] systemctl: add systemctl cat

2013-11-28 Thread Shawn Landden
On Wed, Nov 27, 2013 at 11:59 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Sat, Nov 23, 2013 at 07:52:53PM -0800, Shawn Landden wrote: --- TODO | 2 -- src/shared/fileio.c | 73 - src/shared/fileio.h | 1

[systemd-devel] [PATCH] systemctl: add systemctl cat

2013-11-28 Thread Shawn Landden
v3: log_warning() inserts a trailing newline --- TODO | 2 - src/shared/fileio.c | 73 ++- src/shared/fileio.h | 1 + src/shared/util.c | 2 + src/systemctl/systemctl.c | 97 +++

[systemd-devel] [PATCH 1/2] nspawn: --populate to run static binaries on empty target directory

2013-11-30 Thread Shawn Landden
+++ b/src/nspawn/elf.c @@ -0,0 +1,127 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2013 Shawn Landden + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public

[systemd-devel] [PATCH 2/2] nspawn: --populate with dynamic libs and one-file scripts

2013-11-30 Thread Shawn Landden
the whitelist of dynamic linker paths comes from clang --- src/nspawn/elf.c| 174 ++- src/nspawn/elf.h| 14 +++- src/nspawn/nspawn.c | 191 +--- src/shared/util.c | 80 ++

[systemd-devel] [PATCH] systemctl: add systemctl cat

2013-11-30 Thread Shawn Landden
--- TODO | 2 - man/systemctl.xml | 9 src/shared/fileio.c | 73 ++- src/shared/fileio.h | 1 + src/shared/util.c | 2 + src/systemctl/systemctl.c | 107 ++ 6

Re: [systemd-devel] build broken on clang

2013-11-30 Thread Shawn Landden
On Sat, Nov 30, 2013 at 5:46 PM, Greg KH gre...@linuxfoundation.org wrote: On Sun, Dec 01, 2013 at 12:38:44AM +0100, Thomas H.P. Andersen wrote: Hi, Since 777d7a6123cbb192a8ff9e4ac5c05b1da84b4217 the build is broken on clang: src/libsystemd-bus/bus-control.c:686:41: error: fields must have a

[systemd-devel] [PATCH] fix regression of read_full_file() in fileio.c

2013-11-30 Thread Shawn Landden
my e93c33d4aa broke this stupidly --- src/shared/fileio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/fileio.c b/src/shared/fileio.c index ac1b409..ede8819 100644 --- a/src/shared/fileio.c +++ b/src/shared/fileio.c @@ -240,6 +240,7 @@ int read_full_file(const char *fn, char

Re: [systemd-devel] [RFC 05/12] gfx: add sd-gfx library with unifont section

2013-11-30 Thread Shawn Landden
On Sat, Nov 30, 2013 at 9:28 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Wed, Nov 27, 2013 at 07:48:40PM +0100, David Herrmann wrote: As a first step, we add the required header+build-chain and add the font-handling. To avoid heavy font-pipelines in systemd, we only provide a

[systemd-devel] [PATCH 1/4] nspawn: shorten conditional path

2013-12-01 Thread Shawn Landden
--- src/nspawn/nspawn.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index dd7337b..0151cf3 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -481,10 +481,8 @@ static int setup_timezone(const char

[systemd-devel] [PATCH 2/4] shared: mark strv_length() _pure_

2013-12-01 Thread Shawn Landden
--- src/shared/strv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/strv.c b/src/shared/strv.c index 607c221..cc6adfa 100644 --- a/src/shared/strv.c +++ b/src/shared/strv.c @@ -84,7 +84,7 @@ char **strv_copy(char * const *l) { return r; } -unsigned

[systemd-devel] [PATCH 4/4] nspawn: --populate with dynamic libs and one-file scripts

2013-12-01 Thread Shawn Landden
the whitelist of dynamic linker paths comes from clang --- man/systemd-nspawn.xml | 8 +-- src/nspawn/elf.c | 162 + src/nspawn/elf.h | 14 +++- src/nspawn/nspawn.c| 191 ++--- src/shared/util.c

[systemd-devel] [PATCH 3/4] nspawn: --populate to run static binaries on empty target directory

2013-12-01 Thread Shawn Landden
/src/nspawn/elf.c @@ -0,0 +1,131 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2013 Shawn Landden + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public

[systemd-devel] [PATCH] nspawn: --populate with dynamic libs and one-file scripts

2013-12-01 Thread Shawn Landden
the whitelist of dynamic linker paths comes from clang --- man/systemd-nspawn.xml | 8 +-- src/nspawn/elf.c | 161 + src/nspawn/elf.h | 14 +++- src/nspawn/nspawn.c| 191 ++--- src/shared/util.c

[systemd-devel] [PATCH] nspawn: shorten conditional path

2013-12-01 Thread Shawn Landden
--- src/nspawn/nspawn.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index dd7337b..f400a65 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -481,10 +481,8 @@ static int setup_timezone(const char

Re: [systemd-devel] [PATCH 1/2] nspawn: --populate to run static binaries on empty target directory

2013-12-02 Thread Shawn Landden
On Mon, Dec 2, 2013 at 8:27 AM, Lennart Poettering lenn...@poettering.net wrote: On Sat, 30.11.13 10:20, Shawn Landden (sh...@churchofgit.com) wrote: nspawn has been called chroot on steroids. Continue that tradition by supporting target directories that are not root directories

Re: [systemd-devel] [PATCH 1/2] nspawn: --populate to run static binaries on empty target directory

2013-12-03 Thread Shawn Landden
On Mon, Dec 2, 2013 at 9:41 AM, Shawn Landden sh...@churchofgit.com wrote: On Mon, Dec 2, 2013 at 8:27 AM, Lennart Poettering lenn...@poettering.net wrote: On Sat, 30.11.13 10:20, Shawn Landden (sh...@churchofgit.com) wrote: nspawn has been called chroot on steroids. Continue that tradition

[systemd-devel] [PATCH] nspawn: fix buggy mount_binds, now works for bind-mounted files

2013-12-05 Thread Shawn Landden
--- src/nspawn/nspawn.c | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index dd7337b..c1212c0 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -416,6 +416,7 @@ static int

Re: [systemd-devel] systemd-nspawn and kernel command line

2013-12-07 Thread Shawn Landden
On Sat, Dec 7, 2013 at 10:33 AM, Colin Guthrie gm...@colin.guthr.ie wrote: Hi, When playing with systemd-nspawn, is there a way to override the kernel command line seen inside the container. I mean it's probably not correct that the host systems /proc/cmdline leaks into the container. No it

Re: [systemd-devel] systemd-nspawn and kernel command line

2013-12-07 Thread Shawn Landden
On Sat, Dec 7, 2013 at 11:03 AM, Colin Guthrie gm...@colin.guthr.ie wrote: 'Twas brillig, and Shawn Landden at 07/12/13 18:57 did gyre and gimble: On Sat, Dec 7, 2013 at 10:33 AM, Colin Guthrie gm...@colin.guthr.ie wrote: Hi, When playing with systemd-nspawn, is there a way to override

Re: [systemd-devel] [PATCH] test: rework run_qemu

2013-12-07 Thread Shawn Landden
On Sat, Dec 7, 2013 at 3:01 PM, Ronny Chevalier chevalier.ro...@gmail.com wrote: It tries to find a suitable QEMU binary and will use KVM if present. We can now configure QEMU from outside with 4 variables : - $QEMU_BIN : path to QEMU's binary - $KERNEL_APPEND : arguments appended to

Re: [systemd-devel] [PATCH 4/4] core: lazy distribute for Distribute pools

2013-12-08 Thread Shawn Landden
On Sun, Dec 8, 2013 at 7:50 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Mon, Nov 18, 2013 at 12:36:52AM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Sun, Nov 17, 2013 at 02:57:56PM -0800, Shawn Landden wrote: On Sun, Nov 17, 2013 at 2:28 PM, Zbigniew Jędrzejewski-Szmek zbys

[systemd-devel] [PATCH] update README to not suggest that systemd works without procfs

2013-12-09 Thread Shawn Landden
--- README | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README b/README index cc43953..f2a86c5 100644 --- a/README +++ b/README @@ -45,6 +45,7 @@ REQUIREMENTS: CONFIG_EPOLL CONFIG_NET CONFIG_SYSFS + CONFIG_PROC_FS

[systemd-devel] [PATCH 2/2] epoll and signalfd has been moved into sd event loop

2013-12-09 Thread Shawn Landden
--- src/core/manager.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index f06df54..56c10cf 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -22,9 +22,7 @@ #include assert.h #include errno.h #include string.h -#include sys/epoll.h

[systemd-devel] [PATCH 1/2] core: support Distribute=n to distribute to n workers

2013-12-09 Thread Shawn Landden
Until there are some use cases for Distribute= w/o SO_REUSEPORT make it imply that. Otherwise we need a new config_parse_distribute in load-fragment.c and gain the same issues of config_parse_syscall, where NoNewPrivs can be still set to false, but only if set _after_ SystemCallFilter (only

[systemd-devel] [PATCH] core/manager: remove infinite loop

2013-12-10 Thread Shawn Landden
--- src/core/manager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index f06df54..c25343f 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2211,10 +2211,8 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {

[systemd-devel] [PATCH] core: support Distribute=n to distribute to n workers

2013-12-10 Thread Shawn Landden
Because it takes a while for the service to start up, and until then we spin in a fast epoll loop, this tends to start up all the instances all at once. There are a number of ways we can slow this instanciation down: 1) Call accept() and pass an additional fd to the service 2) Use EPOLLET:

[systemd-devel] [PATCH] timedatectl: work with old timedated

2013-12-11 Thread Shawn Landden
Which does have TimeUSec. Should we specifically check for this method instead of assuming time=0 means it doesn't exist? Before: shawn@debian-T61:~/git/systemd$ ./timedatectl Local time: Wed 1969-12-31 16:00:00 PST Universal time: Thu 1970-01-01 00:00:00 UTC RTC time: n/a

Re: [systemd-devel] [PATCH] test-fileio: replace mktemp with mkstemp to avoid warnings

2013-12-11 Thread Shawn Landden
Thank you for this! On Wed, Dec 11, 2013 at 5:55 PM, Thomas H.P. Andersen pho...@gmail.com wrote: On Thu, Dec 12, 2013 at 1:41 AM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Thu, Dec 12, 2013 at 12:32:43AM +0100, Thomas H.P. Andersen wrote: From: Thomas Hindoe Paaboel Andersen

Re: [systemd-devel] [HACK/RFC/PATCH] systemd-su: su on steroids

2013-12-11 Thread Shawn Landden
On Tue, Dec 10, 2013 at 3:18 PM, Lennart Poettering lenn...@poettering.net wrote: On Mon, 02.12.13 21:47, David Herrmann (dh.herrm...@gmail.com) wrote: 4h later, I present systemd-su: If you want to give it a try, run: systemd-su -u david /bin/sh It requires the systemd-suexec helper

[systemd-devel] [PATCH] timedatectl: work with old timedated

2013-12-12 Thread Shawn Landden
Which does have TimeUSec. Should we specifically check for this method instead of assuming time=0 means it doesn't exist? Before: shawn@debian-T61:~/git/systemd$ ./timedatectl Local time: Wed 1969-12-31 16:00:00 PST Universal time: Thu 1970-01-01 00:00:00 UTC RTC time: n/a

Re: [systemd-devel] [PATCH] timedatectl: work with old timedated

2013-12-12 Thread Shawn Landden
On Thu, Dec 12, 2013 at 11:02 AM, Lennart Poettering lenn...@poettering.net wrote: On Thu, 12.12.13 10:00, Shawn Landden (sh...@churchofgit.com) wrote: Applied. Dropped the fflush(stderr) bits though as we that's not necessary for stderr, and not even for stdout if an \n was printed anyway

[systemd-devel] [PATCH] core: support Distribute=n to distribute to n workers

2013-12-12 Thread Shawn Landden
If Distribute=n, turns SO_REUSEPORT on, and spawns n workers to handling incoming requests. SO_REUSEPORT sockets on the same port must all be created by the same uid, therefore using the option allows other root programs (or programs of the same user if running in --user mode) to hijack this

Re: [systemd-devel] [PATCH] core: support Distribute=n to distribute to n workers

2013-12-13 Thread Shawn Landden
Forgot to send my notes on the last review On Fri, Dec 13, 2013 at 7:12 AM, Lennart Poettering lenn...@poettering.net wrote: On Thu, 12.12.13 23:46, Shawn Landden (sh...@churchofgit.com) wrote: -Socket.ReusePort,config_parse_bool, 0

[systemd-devel] [PATCH] core: support Distribute=n to distribute to n workers

2013-12-13 Thread Shawn Landden
If Distribute=n, turns SO_REUSEPORT on, and spawns n workers to handling incoming requests. SO_REUSEPORT sockets on the same port must all be created by the same uid, therefore using the option allows other root programs (or programs of the same user if running in --user mode) to hijack this

[systemd-devel] [PATCH] sd-event: we do not support EPOLLONESHOT correctly

2013-12-13 Thread Shawn Landden
If this event is not the highest priority, then it will not be dispatched when the epoll triggers, and since we will not get any more wakeups (due to the way EPOLLONESHOT works) will never be dispatched. Since we only handle one event per epoll_wait() wakeup, and we dequeue a ONE_SHOT event when

Re: [systemd-devel] [PATCH 1/2] nspawn: --populate to run static binaries on empty target directory

2013-12-13 Thread Shawn Landden
On Tue, Dec 10, 2013 at 2:18 PM, Lennart Poettering lenn...@poettering.net wrote: On Mon, 02.12.13 09:41, Shawn Landden (sh...@churchofgit.com) wrote: On Mon, Dec 2, 2013 at 8:27 AM, Lennart Poettering lenn...@poettering.net wrote: On Sat, 30.11.13 10:20, Shawn Landden (sh

Re: [systemd-devel] [PATCH] sd-event: we do not support EPOLLONESHOT correctly

2013-12-13 Thread Shawn Landden
On Fri, Dec 13, 2013 at 7:17 PM, Lennart Poettering lenn...@poettering.net wrote: On Fri, 13.12.13 13:08, Shawn Landden (sh...@churchofgit.com) wrote: If this event is not the highest priority, then it will not be dispatched when the epoll triggers, and since we will not get any more wakeups

[systemd-devel] [PATCH] core: support Distribute=n to distribute to n workers

2013-12-13 Thread Shawn Landden
If Distribute=n, turns SO_REUSEPORT on, and spawns n workers to handling incoming requests. SO_REUSEPORT sockets on the same port must all be created by the same uid, therefore using the option allows other root programs (or programs of the same user if running in --user mode) to hijack this

Re: [systemd-devel] [PATCH] sd-event: we do not support EPOLLONESHOT correctly

2013-12-13 Thread Shawn Landden
On Fri, Dec 13, 2013 at 8:04 PM, Shawn Landden sh...@churchofgit.com wrote: On Fri, Dec 13, 2013 at 7:17 PM, Lennart Poettering lenn...@poettering.net wrote: On Fri, 13.12.13 13:08, Shawn Landden (sh...@churchofgit.com) wrote: If this event is not the highest priority

[systemd-devel] [PATCH] build: use -ftrapv for development

2013-12-14 Thread Shawn Landden
We want to find these bugs if they exist. --- autogen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autogen.sh b/autogen.sh index d0a2f3f..9ffd724 100755 --- a/autogen.sh +++ b/autogen.sh @@ -54,10 +54,10 @@ args=$args \ fi if [ x$1 = xc ]; then -

[systemd-devel] [PATCH] udev: fix printf specifiers

2013-12-14 Thread Shawn Landden
This keeps the same behavior, which is wierd. --- src/udev/udev-builtin-path_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c index 7476330..7543a11 100644 --- a/src/udev/udev-builtin-path_id.c +++

Re: [systemd-devel] [PATCH] udev: fix printf specifiers

2013-12-14 Thread Shawn Landden
On Sat, Dec 14, 2013 at 8:11 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Sat, Dec 14, 2013 at 06:48:34PM -0800, Shawn Landden wrote: This keeps the same behavior, which is wierd. --- src/udev/udev-builtin-path_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[systemd-devel] [PATCH] __thread -- thread_local for C11 compat

2013-12-15 Thread Shawn Landden
also make thread_local available w/o including threads.h --- src/libsystemd-bus/sd-bus.c | 4 ++-- src/libsystemd-bus/sd-event.c | 2 +- src/libsystemd-id128/sd-id128.c | 8 src/login/logind-inhibit.c | 2 +- src/shared/capability.c | 4 ++-- src/shared/cgroup-util.c

[systemd-devel] [PATCH] __thread -- thread_local for C11 compat

2013-12-15 Thread Shawn Landden
also make thread_local available w/o including threads.h --- src/libsystemd-bus/sd-bus.c | 4 ++-- src/libsystemd-bus/sd-event.c | 2 +- src/libsystemd-id128/sd-id128.c | 8 src/login/logind-inhibit.c | 2 +- src/shared/capability.c | 4 ++--

Re: [systemd-devel] [PATCH] __thread -- thread_local for C11 compat

2013-12-15 Thread Shawn Landden
On Sun, Dec 15, 2013 at 1:56 PM, Lennart Poettering lenn...@poettering.net wrote: On Sun, 15.12.13 13:19, Shawn Landden (sh...@churchofgit.com) wrote: also make thread_local available w/o including threads.h Hmm, that looks a bit too early, no? Does gcc even support this? glibc gcc-4.9

Re: [systemd-devel] [PATCH] __thread -- thread_local for C11 compat

2013-12-15 Thread Shawn Landden
On Sun, Dec 15, 2013 at 3:16 PM, Lennart Poettering lenn...@poettering.net wrote: On Sun, 15.12.13 14:56, Shawn Landden (sh...@churchofgit.com) wrote: On Sun, Dec 15, 2013 at 1:56 PM, Lennart Poettering lenn...@poettering.net wrote: On Sun, 15.12.13 13:19, Shawn Landden (sh

[systemd-devel] [PATCH] __thread -- thread_local for C11 compat

2013-12-15 Thread Shawn Landden
Also make thread_local available w/o including threads.h. (as the latter hasn't been implemented, but this part is trivial) --- src/libsystemd-bus/sd-bus.c | 4 ++-- src/libsystemd-bus/sd-event.c | 2 +- src/libsystemd-id128/sd-id128.c | 8 src/login/logind-inhibit.c | 2

[systemd-devel] [PATCH 1/2] util: no need for in_initrd() cache to be thread-local

2013-12-15 Thread Shawn Landden
the process only has one working directory, and a race is harmless --- src/shared/util.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/util.c b/src/shared/util.c index b5ffaa1..7c73074 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -2737,9

[systemd-devel] [PATCH] _noreturn_ -- noreturn for C11 compat

2013-12-16 Thread Shawn Landden
also define noreturn w/o stdnoreturn.h --- src/core/main.c | 2 +- src/journal/test-journal-interleaving.c | 2 +- src/shared/log.c| 4 ++-- src/shared/log.h| 4 ++-- src/shared/macro.h | 10

  1   2   3   >