[systemd-devel] [PATCH] networkd: add preferred source to dhcp4 gateway route

2014-09-05 Thread Emil Renner Berthing
This makes DHCPv4 and IPv4LL coexist peacefully. --- src/network/networkd-dhcp4.c | 11 +++ src/network/networkd-route.c | 22 ++ src/network/networkd.h | 2 ++ 3 files changed, 35 insertions(+) diff --git a/src/network/networkd-dhcp4.c

[systemd-devel] [PATCH 2/2] remove unneeded error.h includes

2014-09-15 Thread Emil Renner Berthing
These are the only two places where this glibc-specific header is included. However none of the definitions in it seem to be used, so just remove the includes. --- src/notify/notify.c | 1 - src/path/path.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/notify/notify.c

[systemd-devel] [PATCH 1/2] shared/pty: remove unused pty_signal

2014-09-15 Thread Emil Renner Berthing
--- src/shared/pty.c | 8 src/shared/pty.h | 1 - 2 files changed, 9 deletions(-) diff --git a/src/shared/pty.c b/src/shared/pty.c index 2863da4..a3332dd 100644 --- a/src/shared/pty.c +++ b/src/shared/pty.c @@ -541,14 +541,6 @@ int pty_write(Pty *pty, const void *buf, size_t size) {

Re: [systemd-devel] [PATCH 1/2] shared/pty: remove unused pty_signal

2014-09-15 Thread Emil Renner Berthing
Hi, On 15 September 2014 16:59, David Herrmann dh.herrm...@gmail.com wrote: Hi On Mon, Sep 15, 2014 at 3:29 PM, Emil Renner Berthing syst...@esmil.dk wrote: --- src/shared/pty.c | 8 src/shared/pty.h | 1 - 2 files changed, 9 deletions(-) diff --git a/src/shared/pty.c b/src

[systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Emil Renner Berthing
my time. The first two patches are not strictly needed, but it makes the compilation much quieter and they are correct according POSIX. /Emil Emil Renner Berthing (25): include poll.h rather than sys/poll.h include fcntl.h rather than sys/fcntl.h udev: link-config: remove unneded linux

[systemd-devel] [RFC 09/25] shared/socket-util: don't fail if libc doesn't support IDN

2014-09-18 Thread Emil Renner Berthing
--- src/shared/socket-util.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index e3e54e8..d4a1679 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -41,6 +41,16 @@ #include missing.h #include fileio.h

[systemd-devel] [RFC 08/25] don't fail if GLOB_BRACE is not defined

2014-09-18 Thread Emil Renner Berthing
If the standard library doesn't provide brace expansion users just won't get it. --- src/shared/util.c | 6 ++ src/tmpfiles/tmpfiles.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/src/shared/util.c b/src/shared/util.c index 9157b2f..76899f5 100644 --- a/src/shared/util.c

[systemd-devel] [RFC 10/25] shared/pty: fall back to kernel header for TIOCSIG

2014-09-18 Thread Emil Renner Berthing
--- src/shared/pty.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/shared/pty.c b/src/shared/pty.c index 2863da4..21a87e5 100644 --- a/src/shared/pty.c +++ b/src/shared/pty.c @@ -61,6 +61,11 @@ #include termios.h #include unistd.h +/* If sys/ioctl.h doesn't provide TIOCSIG use

[systemd-devel] [RFC 15/25] shared/utmp-wtmp: don't fail if libc doesn't support utmpx/wtmpx

2014-09-18 Thread Emil Renner Berthing
I'd like to make utmp/wtmp handling a configure option, but for now this is the minimal change needed to make it compile with musl. The musl utmp/wtmp functions doesn't do anything anyway. --- src/shared/utmp-wtmp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/shared/utmp-wtmp.c

[systemd-devel] [RFC 04/25] sd-rtnl: rtnl-message: remove unneeded linux includes

2014-09-18 Thread Emil Renner Berthing
--- src/libsystemd/sd-rtnl/rtnl-message.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index 30e3358..b501a52 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c

[systemd-devel] [RFC 02/25] include fcntl.h rather than sys/fcntl.h

2014-09-18 Thread Emil Renner Berthing
--- src/socket-proxy/socket-proxyd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index 81d8457..ff2b24f 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -26,7 +26,7

[systemd-devel] [RFC 13/25] shared/missing.h: check for missing strndupa

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 3 ++- src/shared/missing.h | 11 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1f2bbd0..3db0e24 100644 --- a/configure.ac +++ b/configure.ac @@ -301,9 +301,10 @@ LIBS=$save_LIBS

[systemd-devel] [RFC 01/25] include poll.h rather than sys/poll.h

2014-09-18 Thread Emil Renner Berthing
--- man/sd_journal_get_fd.xml | 2 +- src/ask-password/ask-password.c | 2 +- src/bus-proxyd/bus-proxyd.c | 2 +- src/core/execute.c | 2 +- src/core/manager.c |

[systemd-devel] [RFC 06/25] shared/label.h: add missing stdio.h include

2014-09-18 Thread Emil Renner Berthing
--- src/shared/label.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/label.h b/src/shared/label.h index 7294820..cb2ec79 100644 --- a/src/shared/label.h +++ b/src/shared/label.h @@ -24,6 +24,7 @@ #include sys/types.h #include stdbool.h #include sys/socket.h +#include stdio.h

[systemd-devel] [RFC 05/25] shared/util.h: include sys/reg.h for __WORDSIZE

2014-09-18 Thread Emil Renner Berthing
--- src/shared/util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/util.h b/src/shared/util.h index 08d556f..32e5090 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -24,6 +24,7 @@ #include alloca.h #include fcntl.h #include inttypes.h +#include sys/reg.h #include

[systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

2014-09-18 Thread Emil Renner Berthing
--- src/shared/missing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/missing.h b/src/shared/missing.h index b441149..8389c28 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -353,7 +353,7 @@ static inline int name_to_handle_at(int fd, const char

[systemd-devel] [RFC 14/25] shared/missing.h: check for missing __compar_fn_t typedef

2014-09-18 Thread Emil Renner Berthing
--- src/shared/missing.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/shared/missing.h b/src/shared/missing.h index 55e61f6..be099c5 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -147,6 +147,11 @@ static inline char *canonicalize_file_name(const char *path) {

[systemd-devel] [RFC 12/25] shared/missing.h: check for missing canonicalize_file_name

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 3 ++- src/shared/missing.h | 6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fb16904..1f2bbd0 100644 --- a/configure.ac +++ b/configure.ac @@ -301,8 +301,9 @@ LIBS=$save_LIBS AC_CHECK_FUNCS([fanotify_init

[systemd-devel] [RFC 07/25] shared/sparse-endian.h: add missing byteswap.h include

2014-09-18 Thread Emil Renner Berthing
--- src/shared/sparse-endian.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/sparse-endian.h b/src/shared/sparse-endian.h index eb4dbf3..c913fda 100644 --- a/src/shared/sparse-endian.h +++ b/src/shared/sparse-endian.h @@ -21,6 +21,7 @@ #ifndef SPARSE_ENDIAN_H #define

[systemd-devel] [RFC 19/25] mount-setup: skip relabelling when SELinux and SMACK not supported

2014-09-18 Thread Emil Renner Berthing
This is also the only place where FTW_ACTIONRETVAL is used, so this makes systemd compile without SELinux or SMACK support when the standard library doesn't support this extension. --- src/core/mount-setup.c | 4 1 file changed, 4 insertions(+) diff --git a/src/core/mount-setup.c

[systemd-devel] [RFC 20/25] udevadm-hwdb: don't use glibc-specific qsort_r

2014-09-18 Thread Emil Renner Berthing
--- src/udev/udevadm-hwdb.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 65cbf61..3f31662 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -123,13 +123,13 @@ static void

[systemd-devel] [RFC 21/25] make sure basename that doesn't alter it's argument

2014-09-18 Thread Emil Renner Berthing
--- src/core/execute.c | 6 +++--- src/core/load-fragment.c| 2 +- src/core/manager.c | 2 +- src/core/unit.c | 4 ++-- src/delta/delta.c | 14 +++--- src/journal/journalctl.c| 2 +-

[systemd-devel] [RFC 18/25] sd-ipv4all: fall back to random if no random_r

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 1 + src/libsystemd-network/sd-ipv4ll.c | 25 + 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 397521e..9cd4c05 100644 --- a/configure.ac +++ b/configure.ac @@ -301,6 +301,7 @@

[systemd-devel] [RFC 23/25] mount: order options before other arguments to mount

2014-09-18 Thread Emil Renner Berthing
--- src/core/mount.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/mount.c b/src/core/mount.c index e284357..f3ec736 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -903,10 +903,10 @@ static void mount_enter_mounting(Mount *m) {

[systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-18 Thread Emil Renner Berthing
In case we don't have the new gold linker, linking with ld fails without this option. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 3f17833..4be6e08 100644 --- a/configure.ac +++ b/configure.ac @@ -216,6 +216,7 @@

[systemd-devel] [RFC 16/25] add fallback parse_printf_format implementation

2014-09-18 Thread Emil Renner Berthing
/shared/parse-printf-format.c new file mode 100644 index 000..49437e5 --- /dev/null +++ b/src/shared/parse-printf-format.c @@ -0,0 +1,273 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2014 Emil Renner Berthing syst...@esmil.dk

[systemd-devel] [RFC 24/25] units: order options before other arguments

2014-09-18 Thread Emil Renner Berthing
--- units/initrd-udevadm-cleanup-db.service.in | 2 +- units/kmod-static-nodes.service.in | 2 +- units/systemd-journal-flush.service.in | 2 +- units/systemd-udev-hwdb-update.service.in | 2 +- units/systemd-udev-trigger.service.in | 2 +- 5 files changed, 5 insertions(+), 5

[systemd-devel] [RFC 22/25] support POSIX strerror_r returning int

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 2 ++ src/journal/journal-send.c| 36 +++- src/libsystemd/sd-bus/bus-error.c | 14 +- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 9cd4c05..3f17833

Re: [systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

2014-09-18 Thread Emil Renner Berthing
On 18 September 2014 15:56, Karol Lewandowski k.lewando...@samsung.com wrote: I think it would be way better (and easy) to reimplement original secure_getenv() rather than falling back to function with different semantics. secure_ is there for a reason. Agreed. Added to my TODO, thanks.

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Emil Renner Berthing
On 18 September 2014 16:10, Jóhann B. Guðmundsson johan...@gmail.com wrote: On 09/18/2014 01:24 PM, Emil Renner Berthing wrote: The real reason is of course that I'd like to see systemd running on my router and other small devices that usually run some OpenWRT derivative. The openwrt

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Emil Renner Berthing
Hi Tom, On 18 September 2014 18:29, Tom Gundersen t...@jklm.no wrote: In general, I don't think we should add patches for the sole purpose of non-glibc compatibility. You would in most cases be much better served by adding the missing functionality to your libc, rather than to each of the

Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-19 Thread Emil Renner Berthing
On 19 September 2014 08:42, Michael Biebl mbi...@gmail.com wrote: 2014-09-19 0:34 GMT+02:00 David Herrmann dh.herrm...@gmail.com: -Wl,-fuse-ld=gold]) The reason to use gold was that the compat libraries require the ifunc functionality. This is no longer the case, so I'd suggest to

[systemd-devel] [PATCH] shared/util.h: portable sizeof(long) == sizeof(int) test

2014-09-19 Thread Emil Renner Berthing
Don't rely on __WORDSIZE, but just standard LONG_MAX and INT_MAX from limits.h. --- src/shared/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/util.h b/src/shared/util.h index 08d556f..00068c6 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -205,7

Re: [systemd-devel] [PATCH] shared/util.h: portable sizeof(long) == sizeof(int) test

2014-09-19 Thread Emil Renner Berthing
On 19 September 2014 22:19, David Herrmann dh.herrm...@gmail.com wrote: On Fri, Sep 19, 2014 at 8:26 PM, Emil Renner Berthing syst...@esmil.dk wrote: Don't rely on __WORDSIZE, but just standard LONG_MAX and INT_MAX from limits.h. Why? The commit message lacks any explanation of that change

[systemd-devel] [PATCH 4/7] journal: honour !HAVE_UTMP

2014-09-24 Thread Emil Renner Berthing
--- src/journal/journald-wall.c | 5 - src/journal/journald-wall.h | 6 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/journal/journald-wall.c b/src/journal/journald-wall.c index fcbd918..360b3bd 100644 --- a/src/journal/journald-wall.c +++

[systemd-devel] [PATCH 1/7] make utmp/wtmp support configurable

2014-09-24 Thread Emil Renner Berthing
For now just stub out the functions in utmp-wtmp.h so code will still compile. These stubs will be removed in the last commit in this patch series. --- Makefile.am | 34 +++--- configure.ac| 11 +++

[systemd-devel] [PATCH 6/7] core/execute: honour !HAVE_UTMP

2014-09-24 Thread Emil Renner Berthing
--- src/core/execute.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/execute.c b/src/core/execute.c index e27cc7a..001bc33 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -69,7 +69,6 @@ #include namespace.h #include exit-status.h #include

[systemd-devel] [PATCH 5/7] tty-ask-password-agent: honour !HAVE_UTMP

2014-09-24 Thread Emil Renner Berthing
--- src/tty-ask-password-agent/tty-ask-password-agent.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 8a02fb0..9428419 100644 ---

[systemd-devel] [PATCH 7/7] utmp-wtmp.h: clean up stubbed functions

2014-09-24 Thread Emil Renner Berthing
Now that there are no more users of utmp-wtmp.h left when !HAVE_UTMP we can remove the stubbed functions. Also tell automake that the header is not used unless we have utmp enabled. --- Makefile.am| 4 ++-- src/shared/utmp-wtmp.h | 28 2 files changed, 2

[systemd-devel] [PATCH 2/7] shutdownd: honour !HAVE_UTMP

2014-09-24 Thread Emil Renner Berthing
--- src/shutdownd/shutdownd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c index 99aa4b3..4132d9a 100644 --- a/src/shutdownd/shutdownd.c +++ b/src/shutdownd/shutdownd.c @@ -36,10 +36,13 @@ #include log.h

[systemd-devel] [PATCH 3/7] systemctl: honour !HAVE_UTMP

2014-09-24 Thread Emil Renner Berthing
--- src/systemctl/systemctl.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 9012128..b9e165c 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -47,7 +47,6 @@ #include

Re: [systemd-devel] [PATCH 1/7] make utmp/wtmp support configurable

2014-09-26 Thread Emil Renner Berthing
On 26 September 2014 04:43, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Wed, Sep 24, 2014 at 05:25:00PM +0200, Emil Renner Berthing wrote: For now just stub out the functions in utmp-wtmp.h so code will still compile. These stubs will be removed in the last commit in this patch