summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-09-29 14:11:44 +0200
committerAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-10-02 09:54:42 +0200
commit1b7265f718bc5363e34c2e028b7c559cb5d070cc (patch)
treeb0ea8cdd9dda27d96f85b31875ab5ca7b55359bd
parent730de2b9913674bbdf5a6a11ebd25cb839258a8c (diff)
downloadarbor-1b7265f718bc5363e34c2e028b7c559cb5d070cc.tar.gz
arbor-1b7265f718bc5363e34c2e028b7c559cb5d070cc.tar.xz
systemd: drop 233
Signed-off-by: Marc-Antoine Perennou <keruspe@exherbo.org>
-rw-r--r--packages/sys-apps/systemd/files/patches-233/0001-Don-t-enable-audit-by-default.patch35
-rw-r--r--packages/sys-apps/systemd/files/patches-233/0002-CVE-2017-9445.patch153
-rw-r--r--packages/sys-apps/systemd/files/patches-233/007ef0a224e01d9c6e3499da2bba14a2988a8a9d.patch374
-rw-r--r--packages/sys-apps/systemd/files/patches-233/233-stable.patch3690
-rw-r--r--packages/sys-apps/systemd/files/patches-233/284d1cd0a12cad96a5ea61d1afb0dd677dbd147e.patch41
-rw-r--r--packages/sys-apps/systemd/files/patches-233/71a047d2f7ca37bb8e20e94622e94240f8812649.patch210
-rw-r--r--packages/sys-apps/systemd/files/patches-233/77525fdc8d60bff55b60b9e443401187204ddfe7.patch62
-rw-r--r--packages/sys-apps/systemd/files/patches-233/c6a8f6f66da111a417cef7be81ceb9a8f336e541.patch74
-rw-r--r--packages/sys-apps/systemd/systemd-233-r8.exheres-07
-rw-r--r--packages/sys-apps/systemd/systemd.exlib16
10 files changed, 0 insertions, 4662 deletions
diff --git a/packages/sys-apps/systemd/files/patches-233/0001-Don-t-enable-audit-by-default.patch b/packages/sys-apps/systemd/files/patches-233/0001-Don-t-enable-audit-by-default.patch
deleted file mode 100644
index 7bda33b..0000000
--- a/packages/sys-apps/systemd/files/patches-233/0001-Don-t-enable-audit-by-default.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream: https://lists.freedesktop.org/archives/systemd-devel/2014-December/026591.html
- https://bugzilla.redhat.com/show_bug.cgi?id=1160046
-Source: Debian, http://sources.debian.net/patches/systemd/
-Reason: Don't flood dmesg and syslog with audit messages
-
-From: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Sun, 28 Dec 2014 12:49:35 +0100
-Subject: Don't enable audit by default
-
-It causes flooding of dmesg and syslog, suppressing actually important
-messages.
-
-Don't enable it for now, until a better solution is found:
-http://lists.freedesktop.org/archives/systemd-devel/2014-December/026591.html
-
-Bug-Debian: https://bugs.debian.org/773528
----
- src/journal/journald-audit.c | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/src/journal/journald-audit.c b/src/journal/journald-audit.c
-index a433c91..a86f87b 100644
---- a/src/journal/journald-audit.c
-+++ b/src/journal/journald-audit.c
-@@ -555,10 +555,5 @@ int server_open_audit(Server *s) {
- if (r < 0)
- return log_error_errno(r, "Failed to add audit fd to event loop: %m");
-
-- /* We are listening now, try to enable audit */
-- r = enable_audit(s->audit_fd, true);
-- if (r < 0)
-- log_warning_errno(r, "Failed to issue audit enable call: %m");
--
- return 0;
- }
diff --git a/packages/sys-apps/systemd/files/patches-233/0002-CVE-2017-9445.patch b/packages/sys-apps/systemd/files/patches-233/0002-CVE-2017-9445.patch
deleted file mode 100644
index e607013..0000000
--- a/packages/sys-apps/systemd/files/patches-233/0002-CVE-2017-9445.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-Source: Gentoo, https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9a542b09cb0ee4c3b085881190bed393f4ece03
-Upstream: Fixed in git master
-Reason: CVE-2017-9445
-
-From 29bb43cc46412366fc939c66331a916de07bfac4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sun, 18 Jun 2017 16:07:57 -0400
-Subject: [PATCH 1/4] resolved: simplify alloc size calculation
-
-The allocation size was calculated in a complicated way, and for values
-close to the page size we would actually allocate less than requested.
-
-Reported by Chris Coulson <chris.coulson@canonical.com>.
-
-CVE-2017-9445
----
- src/resolve/resolved-dns-packet.c | 8 +-------
- src/resolve/resolved-dns-packet.h | 2 --
- 2 files changed, 1 insertion(+), 9 deletions(-)
-
-diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
-index 652970284..2034e3c8c 100644
---- a/src/resolve/resolved-dns-packet.c
-+++ b/src/resolve/resolved-dns-packet.c
-@@ -47,13 +47,7 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
-
- assert(ret);
-
-- if (mtu <= UDP_PACKET_HEADER_SIZE)
-- a = DNS_PACKET_SIZE_START;
-- else
-- a = mtu - UDP_PACKET_HEADER_SIZE;
--
-- if (a < DNS_PACKET_HEADER_SIZE)
-- a = DNS_PACKET_HEADER_SIZE;
-+ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
-
- /* round up to next page size */
- a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
-diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
-index 2c92392e4..3abcaf8cf 100644
---- a/src/resolve/resolved-dns-packet.h
-+++ b/src/resolve/resolved-dns-packet.h
-@@ -66,8 +66,6 @@ struct DnsPacketHeader {
- /* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
- #define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096
-
--#define DNS_PACKET_SIZE_START 512
--
- struct DnsPacket {
- int n_ref;
- DnsProtocol protocol;
---
-2.13.1
-
-
-From cd3d8a7ebc01cd6913eaa9a591f7d606038a7588 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Tue, 27 Jun 2017 14:20:00 -0400
-Subject: [PATCH 2/4] resolved: do not allocate packets with minimum size
-
-dns_packet_new() is sometimes called with mtu == 0, and in that case we should
-allocate more than the absolute minimum (which is the dns packet header size),
-otherwise we have to resize immediately again after appending the first data to
-the packet.
-
-This partially reverts the previous commit.
----
- src/resolve/resolved-dns-packet.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
-index 2034e3c8c..9d806ab33 100644
---- a/src/resolve/resolved-dns-packet.c
-+++ b/src/resolve/resolved-dns-packet.c
-@@ -28,6 +28,9 @@
-
- #define EDNS0_OPT_DO (1<<15)
-
-+#define DNS_PACKET_SIZE_START 512
-+assert_cc(DNS_PACKET_SIZE_START > UDP_PACKET_HEADER_SIZE)
-+
- typedef struct DnsPacketRewinder {
- DnsPacket *packet;
- size_t saved_rindex;
-@@ -47,7 +50,14 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
-
- assert(ret);
-
-- a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
-+ /* When dns_packet_new() is called with mtu == 0, allocate more than the
-+ * absolute minimum (which is the dns packet header size), to avoid
-+ * resizing immediately again after appending the first data to the packet.
-+ */
-+ if (mtu < UDP_PACKET_HEADER_SIZE)
-+ a = DNS_PACKET_SIZE_START;
-+ else
-+ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
-
- /* round up to next page size */
- a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
---
-2.13.1
-
-
-From a03fc1acd66d23e239f2545e9a6887c7d0aad7c5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Tue, 27 Jun 2017 16:59:06 -0400
-Subject: [PATCH 3/4] resolved: define various packet sizes as unsigned
-
-This seems like the right thing to do, and apparently at least some compilers
-warn about signed/unsigned comparisons with DNS_PACKET_SIZE_MAX.
----
- src/resolve/resolved-dns-packet.c | 2 +-
- src/resolve/resolved-dns-packet.h | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
-index 9d806ab33..e2285b440 100644
---- a/src/resolve/resolved-dns-packet.c
-+++ b/src/resolve/resolved-dns-packet.c
-@@ -28,7 +28,7 @@
-
- #define EDNS0_OPT_DO (1<<15)
-
--#define DNS_PACKET_SIZE_START 512
-+#define DNS_PACKET_SIZE_START 512u
- assert_cc(DNS_PACKET_SIZE_START > UDP_PACKET_HEADER_SIZE)
-
- typedef struct DnsPacketRewinder {
-diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
-index 3abcaf8cf..5dff272fd 100644
---- a/src/resolve/resolved-dns-packet.h
-+++ b/src/resolve/resolved-dns-packet.h
-@@ -58,13 +58,13 @@ struct DnsPacketHeader {
- /* The various DNS protocols deviate in how large a packet can grow,
- but the TCP transport has a 16bit size field, hence that appears to
- be the absolute maximum. */
--#define DNS_PACKET_SIZE_MAX 0xFFFF
-+#define DNS_PACKET_SIZE_MAX 0xFFFFu
-
- /* RFC 1035 say 512 is the maximum, for classic unicast DNS */
--#define DNS_PACKET_UNICAST_SIZE_MAX 512
-+#define DNS_PACKET_UNICAST_SIZE_MAX 512u
-
- /* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
--#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096
-+#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096u
-
- struct DnsPacket {
- int n_ref;
---
-2.13.1
diff --git a/packages/sys-apps/systemd/files/patches-233/007ef0a224e01d9c6e3499da2bba14a2988a8a9d.patch b/packages/sys-apps/systemd/files/patches-233/007ef0a224e01d9c6e3499da2bba14a2988a8a9d.patch
deleted file mode 100644
index 5bbfd1b..0000000
--- a/packages/sys-apps/systemd/files/patches-233/007ef0a224e01d9c6e3499da2bba14a2988a8a9d.patch
+++ /dev/null
@@ -1,374 +0,0 @@
-Upstream: yes
-From 007ef0a224e01d9c6e3499da2bba14a2988a8a9d Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Tue, 21 Mar 2017 13:30:48 +0900
-Subject: [PATCH] resolved: detect and warn other running LLMNR stack
-
-Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
-even if another LLMNR stack is running, `bind` always success and
-we cannot detect the other stack. By this commit, we first try to
-`bind` without `SO_REUSEADDR`, and if it fails, show warning and
-retry with `SO_REUSEADDR`.
----
- src/resolve/resolved-llmnr.c | 194 ++++++++++++++++++++++++++++++-------------
- 1 file changed, 135 insertions(+), 59 deletions(-)
-
-diff --git a/src/resolve/resolved-llmnr.c b/src/resolve/resolved-llmnr.c
-index 3516af58ee..29396e9973 100644
---- a/src/resolve/resolved-llmnr.c
-+++ b/src/resolve/resolved-llmnr.c
-@@ -77,7 +77,7 @@ int manager_llmnr_start(Manager *m) {
- return 0;
-
- eaddrinuse:
-- log_warning("There appears to be another LLMNR responder running. Turning off LLMNR support.");
-+ log_warning("Another LLMNR responder prohibits binding the socket to the same port. Turning off LLMNR support.");
- m->llmnr_support = RESOLVE_SUPPORT_NO;
- manager_llmnr_stop(m);
-
-@@ -136,56 +136,75 @@ int manager_llmnr_ipv4_udp_fd(Manager *m) {
-
- m->llmnr_ipv4_udp_fd = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
- if (m->llmnr_ipv4_udp_fd < 0)
-- return -errno;
-+ return log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to create socket: %m");
-
- /* RFC 4795, section 2.5 recommends setting the TTL of UDP packets to 255. */
- r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set IP_TTL: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set IP_MULTICAST_TTL: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-- }
--
-- r = setsockopt(m->llmnr_ipv4_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set IP_MULTICAST_LOOP: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_PKTINFO, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set IP_PKTINFO: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_RECVTTL, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set IP_RECVTTL: %m");
- goto fail;
- }
-
- /* Disable Don't-Fragment bit in the IP header */
- r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set IP_MTU_DISCOVER: %m");
- goto fail;
- }
-
-+ /* first try to bind without SO_REUSEADDR to detect another LLMNR responder */
- r = bind(m->llmnr_ipv4_udp_fd, &sa.sa, sizeof(sa.in));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-+ if (errno != EADDRINUSE) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+
-+ log_warning("LLMNR-IPv4(UDP): There appears to be another LLMNR responder running, or previously systemd-resolved crashed with some outstanding transfers.");
-+
-+ /* try again with SO_REUSEADDR */
-+ r = setsockopt(m->llmnr_ipv4_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
-+
-+ r = bind(m->llmnr_ipv4_udp_fd, &sa.sa, sizeof(sa.in));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+ } else {
-+ /* enable SO_REUSEADDR for the case that the user really wants multiple LLMNR responders */
-+ r = setsockopt(m->llmnr_ipv4_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(UDP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
- }
-
- r = sd_event_add_io(m->event, &m->llmnr_ipv4_udp_event_source, m->llmnr_ipv4_udp_fd, EPOLLIN, on_llmnr_packet, m);
-@@ -216,55 +235,74 @@ int manager_llmnr_ipv6_udp_fd(Manager *m) {
-
- m->llmnr_ipv6_udp_fd = socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
- if (m->llmnr_ipv6_udp_fd < 0)
-- return -errno;
-+ return log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to create socket: %m");
-
- r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set IPV6_UNICAST_HOPS: %m");
- goto fail;
- }
-
- /* RFC 4795, section 2.5 recommends setting the TTL of UDP packets to 255. */
- r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set IPV6_MULTICAST_HOPS: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set IPV6_MULTICAST_LOOP: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-- }
--
-- r = setsockopt(m->llmnr_ipv6_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set IPV6_V6ONLY: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set IPV6_RECVPKTINFO: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set IPV6_RECVHOPLIMIT: %m");
- goto fail;
- }
-
-+ /* first try to bind without SO_REUSEADDR to detect another LLMNR responder */
- r = bind(m->llmnr_ipv6_udp_fd, &sa.sa, sizeof(sa.in6));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-+ if (errno != EADDRINUSE) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+
-+ log_warning("LLMNR-IPv6(UDP): There appears to be another LLMNR responder running, or previously systemd-resolved crashed with some outstanding transfers.");
-+
-+ /* try again with SO_REUSEADDR */
-+ r = setsockopt(m->llmnr_ipv6_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
-+
-+ r = bind(m->llmnr_ipv6_udp_fd, &sa.sa, sizeof(sa.in6));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+ } else {
-+ /* enable SO_REUSEADDR for the case that the user really wants multiple LLMNR responders */
-+ r = setsockopt(m->llmnr_ipv6_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(UDP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
- }
-
- r = sd_event_add_io(m->event, &m->llmnr_ipv6_udp_event_source, m->llmnr_ipv6_udp_fd, EPOLLIN, on_llmnr_packet, m);
-@@ -338,49 +376,68 @@ int manager_llmnr_ipv4_tcp_fd(Manager *m) {
-
- m->llmnr_ipv4_tcp_fd = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
- if (m->llmnr_ipv4_tcp_fd < 0)
-- return -errno;
-+ return log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to create socket: %m");
-
- /* RFC 4795, section 2.5. requires setting the TTL of TCP streams to 1 */
- r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_TTL, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-- }
--
-- r = setsockopt(m->llmnr_ipv4_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to set IP_TTL: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_PKTINFO, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to set IP_PKTINFO: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_RECVTTL, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to set IP_RECVTTL: %m");
- goto fail;
- }
-
- /* Disable Don't-Fragment bit in the IP header */
- r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to set IP_MTU_DISCOVER: %m");
- goto fail;
- }
-
-+ /* first try to bind without SO_REUSEADDR to detect another LLMNR responder */
- r = bind(m->llmnr_ipv4_tcp_fd, &sa.sa, sizeof(sa.in));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-+ if (errno != EADDRINUSE) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+
-+ log_warning("LLMNR-IPv4(TCP): There appears to be another LLMNR responder running, or previously systemd-resolved crashed with some outstanding transfers.");
-+
-+ /* try again with SO_REUSEADDR */
-+ r = setsockopt(m->llmnr_ipv4_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
-+
-+ r = bind(m->llmnr_ipv4_tcp_fd, &sa.sa, sizeof(sa.in));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+ } else {
-+ /* enable SO_REUSEADDR for the case that the user really wants multiple LLMNR responders */
-+ r = setsockopt(m->llmnr_ipv4_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
- }
-
- r = listen(m->llmnr_ipv4_tcp_fd, SOMAXCONN);
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv4(TCP): Failed to listen the stream: %m");
- goto fail;
- }
-
-@@ -412,48 +469,67 @@ int manager_llmnr_ipv6_tcp_fd(Manager *m) {
-
- m->llmnr_ipv6_tcp_fd = socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
- if (m->llmnr_ipv6_tcp_fd < 0)
-- return -errno;
-+ return log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to create socket: %m");
-
- /* RFC 4795, section 2.5. requires setting the TTL of TCP streams to 1 */
- r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to set IPV6_UNICAST_HOPS: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-- }
--
-- r = setsockopt(m->llmnr_ipv6_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to set IPV6_V6ONLY: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to set IPV6_RECVPKTINFO: %m");
- goto fail;
- }
-
- r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to set IPV6_RECVHOPLIMIT: %m");
- goto fail;
- }
-
-+ /* first try to bind without SO_REUSEADDR to detect another LLMNR responder */
- r = bind(m->llmnr_ipv6_tcp_fd, &sa.sa, sizeof(sa.in6));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-+ if (errno != EADDRINUSE) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+
-+ log_warning("LLMNR-IPv6(TCP): There appears to be another LLMNR responder running, or previously systemd-resolved crashed with some outstanding transfers.");
-+
-+ /* try again with SO_REUSEADDR */
-+ r = setsockopt(m->llmnr_ipv6_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
-+
-+ r = bind(m->llmnr_ipv6_tcp_fd, &sa.sa, sizeof(sa.in6));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to bind socket: %m");
-+ goto fail;
-+ }
-+ } else {
-+ /* enable SO_REUSEADDR for the case that the user really wants multiple LLMNR responders */
-+ r = setsockopt(m->llmnr_ipv6_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
- }
-
- r = listen(m->llmnr_ipv6_tcp_fd, SOMAXCONN);
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "LLMNR-IPv6(TCP): Failed to listen the stream: %m");
- goto fail;
- }
-
diff --git a/packages/sys-apps/systemd/files/patches-233/233-stable.patch b/packages/sys-apps/systemd/files/patches-233/233-stable.patch
deleted file mode 100644
index 485524a..0000000
--- a/packages/sys-apps/systemd/files/patches-233/233-stable.patch
+++ /dev/null
@@ -1,3690 +0,0 @@
-Upstream: yes, backported from systemd-stable
-From a75dde1983510900243f247b41a8cb935590ac7b Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Thu, 9 Feb 2017 10:16:52 +0100
-Subject: [PATCH 01/75] dhcp-server: add two missing OOM checks
-
-(cherry picked from commit 357e1b17b901b48714fa5301c745ae5389661798)
----
- src/libsystemd-network/sd-dhcp-server.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c
-index 289068156..315cbf1ac 100644
---- a/src/libsystemd-network/sd-dhcp-server.c
-+++ b/src/libsystemd-network/sd-dhcp-server.c
-@@ -197,7 +197,11 @@ int sd_dhcp_server_new(sd_dhcp_server **ret, int ifindex) {
- server->address = htobe32(INADDR_ANY);
- server->netmask = htobe32(INADDR_ANY);
- server->ifindex = ifindex;
-+
- server->leases_by_client_id = hashmap_new(&client_id_hash_ops);
-+ if (!server->leases_by_client_id)
-+ return -ENOMEM;
-+
- server->default_lease_time = DIV_ROUND_UP(DHCP_DEFAULT_LEASE_TIME_USEC, USEC_PER_SEC);
- server->max_lease_time = DIV_ROUND_UP(DHCP_MAX_LEASE_TIME_USEC, USEC_PER_SEC);
-
-@@ -857,6 +861,8 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message,
-
- if (!existing_lease) {
- lease = new0(DHCPLease, 1);
-+ if (!lease)
-+ return -ENOMEM;
- lease->address = address;
- lease->client_id.data = memdup(req->client_id.data,
- req->client_id.length);
---
-2.13.3
-
-
-From eea54ddfeac9e4c19dff45a5cd9f1389646de114 Mon Sep 17 00:00:00 2001
-From: Dax Kelson <dkelson@gurulabs.com>
-Date: Sun, 5 Mar 2017 05:03:53 -0700
-Subject: [PATCH 02/75] import: bump image size safety limit for machinectl
- pull (#5535)
-
-We currenly use 40GB images in our environment
-(cherry picked from commit 055c521ad4e9d2f923e9373ac12e214a1e896cc7)
----
- src/import/pull-job.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/import/pull-job.c b/src/import/pull-job.c
-index e550df2c5..70aaa5c29 100644
---- a/src/import/pull-job.c
-+++ b/src/import/pull-job.c
-@@ -527,7 +527,7 @@ int pull_job_new(PullJob **ret, const char *url, CurlGlue *glue, void *userdata)
- j->glue = glue;
- j->content_length = (uint64_t) -1;
- j->start_usec = now(CLOCK_MONOTONIC);
-- j->compressed_max = j->uncompressed_max = 8LLU * 1024LLU * 1024LLU * 1024LLU; /* 8GB */
-+ j->compressed_max = j->uncompressed_max = 64LLU * 1024LLU * 1024LLU * 1024LLU; /* 64GB safety limit */
-
- j->url = strdup(url);
- if (!j->url)
---
-2.13.3
-
-
-From 26bffa023b572b25ec8ef6be70b4ed114492a592 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sun, 5 Mar 2017 10:35:44 -0500
-Subject: [PATCH 03/75] coredump: fix handling of premature-eof data for
- --backtrace
-
-We'd fail with an assert in journal_importer_process_data(),
-because that function requires the caller to handle EOF themselves.
-
-(cherry picked from commit d74dc4f2d00644c04ad9dc900ef43050fcadaa8b)
----
- src/basic/journal-importer.c | 2 +-
- src/coredump/coredump.c | 3 ++-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/basic/journal-importer.c b/src/basic/journal-importer.c
-index 4c13e46a4..d25fd358e 100644
---- a/src/basic/journal-importer.c
-+++ b/src/basic/journal-importer.c
-@@ -314,7 +314,7 @@ int journal_importer_process_data(JournalImporter *imp) {
- return r;
- if (r == 0) {
- imp->state = IMPORTER_STATE_EOF;
-- return r;
-+ return 0;
- }
- assert(n > 0);
- assert(line[n-1] == '\n');
-diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
-index 4c4f36aea..5828e949e 100644
---- a/src/coredump/coredump.c
-+++ b/src/coredump/coredump.c
-@@ -1326,7 +1326,8 @@ static int process_backtrace(int argc, char *argv[]) {
- log_error_errno(r, "Failed to parse journal entry on stdin: %m");
- goto finish;
- }
-- if (r == 1)
-+ if (r == 1 || /* complete entry */
-+ journal_importer_eof(&importer)) /* end of data */
- break;
- }
-
---
-2.13.3
-
-
-From 16037d22ebb2682dc948e6a1fc869635d0c949e3 Mon Sep 17 00:00:00 2001
-From: "Thomas H. P. Andersen" <phomes@gmail.com>
-Date: Tue, 7 Mar 2017 07:47:18 +0100
-Subject: [PATCH 04/75] cgtop: use PRIu64 to print uint64_t (#5544)
-
-Commit 59f448cf replaced usage of off_t with uint64_t. Change the
-format string to use PRIu64 to match it.
-(cherry picked from commit 557e36934d21b08acafbe2baf6ebfde761fbae25)
----
- src/cgtop/cgtop.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
-index a1c0f48c8..67f3a9986 100644
---- a/src/cgtop/cgtop.c
-+++ b/src/cgtop/cgtop.c
-@@ -118,7 +118,7 @@ static const char *maybe_format_bytes(char *buf, size_t l, bool is_valid, uint64
- if (!is_valid)
- return "-";
- if (arg_raw) {
-- snprintf(buf, l, "%jd", t);
-+ snprintf(buf, l, "%" PRIu64, t);
- return buf;
- }
- return format_bytes(buf, l, t);
---
-2.13.3
-
-
-From 5fba61468e476e1d224655d23915b543dd900a78 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Torstein=20Huseb=C3=B8?= <torstein@huseboe.net>
-Date: Wed, 8 Mar 2017 13:54:22 +0100
-Subject: [PATCH 05/75] man: fix typo (#5556)
-
-(cherry picked from commit 6cf5a9648928be1e2b8fcdbf2903761000f6e803)
----
- man/systemd.exec.xml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
-index 5d4986b6b..fb64cd6d8 100644
---- a/man/systemd.exec.xml
-+++ b/man/systemd.exec.xml
-@@ -138,7 +138,7 @@
- <varlistentry>
- <term><varname>RootImage=</varname></term>
- <listitem><para>Takes a path to a block device node or regular file as argument. This call is similar to
-- <varname>RootDirectory=</varname> however mounts a file system hierarchy from a block device node or loopack
-+ <varname>RootDirectory=</varname> however mounts a file system hierarchy from a block device node or loopback
- file instead of a directory. The device node or file system image file needs to contain a file system without a
- partition table, or a file system within an MBR/MS-DOS or GPT partition table with only a single
- Linux-compatible partition, or a set of file systems within a GPT partition table that follows the <ulink
---
-2.13.3
-
-
-From 400d52221daba3d0480b11b631a6c9972b7ba939 Mon Sep 17 00:00:00 2001
-From: Michal Sekletar <msekletar@users.noreply.github.com>
-Date: Fri, 10 Mar 2017 15:16:24 +0100
-Subject: [PATCH 06/75] Fix typo in function name (#5565)
-
-(cherry picked from commit 8feabc46263079cffba8a39c4082563320aeffc0)
----
- man/sd_journal_get_fd.xml | 4 ++--
- man/sd_login_monitor_new.xml | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml
-index 61293f7f9..2e686cacc 100644
---- a/man/sd_journal_get_fd.xml
-+++ b/man/sd_journal_get_fd.xml
-@@ -146,7 +146,7 @@ if (t == (uint64_t) -1)
- else {
- struct timespec ts;
- uint64_t n;
-- clock_getttime(CLOCK_MONOTONIC, &amp;ts);
-+ clock_gettime(CLOCK_MONOTONIC, &amp;ts);
- n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
- msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
- }</programlisting>
-@@ -304,7 +304,7 @@ int wait_for_changes(sd_journal *j) {
- else {
- struct timespec ts;
- uint64_t n;
-- clock_getttime(CLOCK_MONOTONIC, &amp;ts);
-+ clock_gettime(CLOCK_MONOTONIC, &amp;ts);
- n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
- msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
- }
-diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml
-index 5625ab920..129c99f97 100644
---- a/man/sd_login_monitor_new.xml
-+++ b/man/sd_login_monitor_new.xml
-@@ -203,7 +203,7 @@ if (t == (uint64_t) -1)
- else {
- struct timespec ts;
- uint64_t n;
-- clock_getttime(CLOCK_MONOTONIC, &amp;ts);
-+ clock_gettime(CLOCK_MONOTONIC, &amp;ts);
- n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
- msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
- }</programlisting>
---
-2.13.3
-
-
-From 90eee306291a39b888ec13b3bd2f418f1f5aba0d Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Mon, 13 Mar 2017 09:12:03 +0900
-Subject: [PATCH 07/75] resolve: add missing space in output message (#5574)
-
-(cherry picked from commit 44ccb3d72315f68d0b4b07217c99bad35b055ec3)
----
- src/resolve/resolve-tool.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/resolve/resolve-tool.c b/src/resolve/resolve-tool.c
-index 32537ce6e..c62058917 100644
---- a/src/resolve/resolve-tool.c
-+++ b/src/resolve/resolve-tool.c
-@@ -114,8 +114,8 @@ static void print_source(uint64_t flags, usec_t rtt) {
- flags & SD_RESOLVED_DNS ? " DNS" :"",
- flags & SD_RESOLVED_LLMNR_IPV4 ? " LLMNR/IPv4" : "",
- flags & SD_RESOLVED_LLMNR_IPV6 ? " LLMNR/IPv6" : "",
-- flags & SD_RESOLVED_MDNS_IPV4 ? "mDNS/IPv4" : "",
-- flags & SD_RESOLVED_MDNS_IPV6 ? "mDNS/IPv6" : "");
-+ flags & SD_RESOLVED_MDNS_IPV4 ? " mDNS/IPv4" : "",
-+ flags & SD_RESOLVED_MDNS_IPV6 ? " mDNS/IPv6" : "");
-
- assert_se(format_timespan(rtt_str, sizeof(rtt_str), rtt, 100));
-
---
-2.13.3
-
-
-From cc60212ef3acc982eb0da5f2e6839af84a3a2f10 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Mon, 13 Mar 2017 03:11:24 -0400
-Subject: [PATCH 08/75] headers: check that __INCLUDE_LEVEL__ is defined before
- using it (#5575)
-
-That macro is a gcc extension, and while widely supported, not ubiquitous.
-In particular the coverity scanner is having trouble with it.
-(cherry picked from commit 1070d271fa8fa553d57dd5f74dd1e3f60732d0b9)
----
- src/systemd/_sd-common.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h
-index 3bb886be7..97c394386 100644
---- a/src/systemd/_sd-common.h
-+++ b/src/systemd/_sd-common.h
-@@ -22,8 +22,8 @@
-
- /* This is a private header; never even think of including this directly! */
-
--#if __INCLUDE_LEVEL__ <= 1
--#error "Do not include _sd-common.h directly; it is a private header."
-+#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1
-+# error "Do not include _sd-common.h directly; it is a private header."
- #endif
-
- #ifndef _sd_printf_
---
-2.13.3
-
-
-From bdd5ae00e8cf4f45183a20e5bc89efd3dcc02266 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
-Date: Mon, 13 Mar 2017 08:14:42 +0100
-Subject: [PATCH 09/75] journal: prevent integer overflow while validating
- header (#5569)
-
-It is possible to overflow uint64_t while validating the header of
-a journal file. To prevent this, the addition itself is checked to
-be within the limits of UINT64_MAX first.
-
-To keep this readable, I have introduced two stack variables which
-hold the converted values during validation.
-(cherry picked from commit 6f94e420e8355421fc31713a0df760d6b20473ac)
----
- src/journal/journal-file.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
-index a6ccb679a..14cb01a60 100644
---- a/src/journal/journal-file.c
-+++ b/src/journal/journal-file.c
-@@ -546,6 +546,8 @@ static bool warn_wrong_flags(const JournalFile *f, bool compatible) {
- }
-
- static int journal_file_verify_header(JournalFile *f) {
-+ uint64_t arena_size, header_size;
-+
- assert(f);
- assert(f->header);
-
-@@ -564,17 +566,21 @@ static int journal_file_verify_header(JournalFile *f) {
- if (f->header->state >= _STATE_MAX)
- return -EBADMSG;
-
-+ header_size = le64toh(f->header->header_size);
-+
- /* The first addition was n_data, so check that we are at least this large */
-- if (le64toh(f->header->header_size) < HEADER_SIZE_MIN)
-+ if (header_size < HEADER_SIZE_MIN)
- return -EBADMSG;
-
- if (JOURNAL_HEADER_SEALED(f->header) && !JOURNAL_HEADER_CONTAINS(f->header, n_entry_arrays))
- return -EBADMSG;
-
-- if ((le64toh(f->header->header_size) + le64toh(f->header->arena_size)) > (uint64_t) f->last_stat.st_size)
-+ arena_size = le64toh(f->header->arena_size);
-+
-+ if (UINT64_MAX - header_size < arena_size || header_size + arena_size > (uint64_t) f->last_stat.st_size)
- return -ENODATA;
-
-- if (le64toh(f->header->tail_object_offset) > (le64toh(f->header->header_size) + le64toh(f->header->arena_size)))
-+ if (le64toh(f->header->tail_object_offset) > header_size + arena_size)
- return -ENODATA;
-
- if (!VALID64(le64toh(f->header->data_hash_table_offset)) ||
---
-2.13.3
-
-
-From fb724063b60139468caceec06b946b82235578bc Mon Sep 17 00:00:00 2001
-From: Michal Sekletar <msekletar@users.noreply.github.com>
-Date: Tue, 14 Mar 2017 22:38:19 +0100
-Subject: [PATCH 10/75] machinectl: don't return 1 in case we couldn't figure
- out container IP addresses (#5587)
-
-This is in spirit very similar to commit
-4b2419165ce409ee55ce96a926302f89685f2293.
-
-Fixes: #5581
-(cherry picked from commit 3c302cddfb2e921578d1238ebcc0cb5ff34fbebe)
----
- src/machine/machinectl.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
-index 28384286f..3031ed5de 100644
---- a/src/machine/machinectl.c
-+++ b/src/machine/machinectl.c
-@@ -340,6 +340,7 @@ static int list_machines(int argc, char *argv[], void *userdata) {
- printf("No machines.\n");
- }
-
-+ r = 0;
- out:
- clean_machine_info(machines, n_machines);
- return r;
---
-2.13.3
-
-
-From 7883270b0b0ac13a84bd4f25eba1264ae82afa79 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Adrian=20Heine=20n=C3=A9=20Lang?= <mail@adrianheine.de>
-Date: Tue, 14 Mar 2017 22:42:18 +0100
-Subject: [PATCH 11/75] man: Document when pam_systemd sets XDG_RUNTIME_DIR
- (#5570)
-
-https://github.com/systemd/systemd/blob/f97b34a6/src/login/pam_systemd.c#L439
-(cherry picked from commit 5c50321ca9c660dac39976ab29ed2f28f872628d)
----
- man/pam_systemd.xml | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml
-index 6e1aa0dd9..cef5445c1 100644
---- a/man/pam_systemd.xml
-+++ b/man/pam_systemd.xml
-@@ -88,7 +88,7 @@
- and so will the user's slice unit.</para></listitem>
-
- <listitem><para>If the last concurrent session of a user ends,
-- the <varname>$XDG_RUNTIME_DIR</varname> directory and all its
-+ the user runtime directory <filename>/run/user/$UID</filename> and all its
- contents are removed, too.</para></listitem>
- </orderedlist>
-
-@@ -192,7 +192,8 @@
- offers the greatest possible file system feature set the
- operating system provides. For further details, see the <ulink
- url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
-- Base Directory Specification</ulink>.</para></listitem>
-+ Base Directory Specification</ulink>. <varname>$XDG_RUNTIME_DIR</varname>
-+ is not set if the current user is not the original user of the session.</para></listitem>
- </varlistentry>
-
- </variablelist>
---
-2.13.3
-
-
-From abb0fd4473c325ee48d551e8d1b790dad3234c85 Mon Sep 17 00:00:00 2001
-From: AlexanderKurtz <alexander@kurtz.be>
-Date: Thu, 16 Mar 2017 01:33:56 +0100
-Subject: [PATCH 12/75] man: Fix a simple grammar error in systemd.service.xml
- (#5594)
-
-(cherry picked from commit bda99fab3104095420d3ee03593d07469153f6c4)
----
- man/systemd.service.xml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/man/systemd.service.xml b/man/systemd.service.xml
-index 52eb2bb42..a452e3a67 100644
---- a/man/systemd.service.xml
-+++ b/man/systemd.service.xml
-@@ -184,7 +184,7 @@
- process has to exit before systemd starts follow-up units.
- <varname>RemainAfterExit=</varname> is particularly useful for
- this type of service. This is the implied default if neither
-- <varname>Type=</varname> or <varname>ExecStart=</varname> are
-+ <varname>Type=</varname> nor <varname>ExecStart=</varname> are
- specified.</para>
-
- <para>Behavior of <option>dbus</option> is similar to
---
-2.13.3
-
-
-From 47ae16f221555779be1d1781f4a9f5cbb2b56680 Mon Sep 17 00:00:00 2001
-From: Felix Zhang <fezhang@suse.com>
-Date: Mon, 20 Mar 2017 18:27:39 +0800
-Subject: [PATCH 13/75] systemctl: fix broken vertical lines in
- list-dependencies --all (#5608)
-
-(cherry picked from commit 60705040152c9953a200eea16fffb5fef894c613)
----
- src/systemctl/systemctl.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index d78e56d77..cb9ca9ae1 100644
---- a/src/systemctl/systemctl.c
-+++ b/src/systemctl/systemctl.c
-@@ -1780,6 +1780,7 @@ static int list_dependencies_one(
- STRV_FOREACH(c, deps) {
- if (strv_contains(*units, *c)) {
- if (!arg_plain) {
-+ printf(" ");
- r = list_dependencies_print("...", level + 1, (branches << 1) | (c[1] == NULL ? 0 : 1), 1);
- if (r < 0)
- return r;
---
-2.13.3
-
-
-From a7637ee87936b9530b0ed56b5520a3e22bd04f94 Mon Sep 17 00:00:00 2001
-From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
-Date: Wed, 22 Mar 2017 03:36:50 +0100
-Subject: [PATCH 14/75] basic/journal-importer: Fix unaligned access in
- get_data_size() (#5622)
-
-(cherry picked from commit f652c62d71a412704efe7c73c2066d1baaf83456)
----
- src/basic/journal-importer.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/basic/journal-importer.c b/src/basic/journal-importer.c
-index d25fd358e..66119d2de 100644
---- a/src/basic/journal-importer.c
-+++ b/src/basic/journal-importer.c
-@@ -24,6 +24,7 @@
- #include "fd-util.h"
- #include "parse-util.h"
- #include "string-util.h"
-+#include "unaligned.h"
-
- enum {
- IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
-@@ -203,7 +204,7 @@ static int get_data_size(JournalImporter *imp) {
- if (r <= 0)
- return r;
-
-- imp->data_size = le64toh( *(uint64_t *) data );
-+ imp->data_size = unaligned_read_le64(data);
- if (imp->data_size > DATA_SIZE_MAX) {
- log_error("Stream declares field with size %zu > DATA_SIZE_MAX = %u",
- imp->data_size, DATA_SIZE_MAX);
---
-2.13.3
-
-
-From b4e76a669bedc420f9616c4a7d8b3e15b43fca78 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Fri, 24 Mar 2017 15:36:06 +0100
-Subject: [PATCH 15/75] basic: don't link "libm.so" into "libbasic.so" (#5628)
-
-Very few parts of the systemd source require <math.h> or "libm.so".
-Linking libbasic with -lm drags the mathematical library in for all
-systemd components, and in turn for all users of systemd libraries.
-
-It's just unneeded.
-(cherry picked from commit 1539a651a9d31c18273df917bbfe175ab3606025)
----
- Makefile.am | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 2a5610740..a767a5aa0 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1005,8 +1005,7 @@ libbasic_la_CFLAGS = \
- libbasic_la_LIBADD = \
- $(SELINUX_LIBS) \
- $(CAP_LIBS) \
-- -lrt \
-- -lm
-+ -lrt
-
- # -----------------------------------------------------------------------------
- noinst_LTLIBRARIES += \
---
-2.13.3
-
-
-From edfdd314c82f42d2e571a24d6a8bdc674a892b43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Mon, 27 Mar 2017 06:55:55 -0400
-Subject: [PATCH 16/75] units: make enablement of s-n-wait-online.service
- follow systemd-networkd.service (#5635)
-
-In 58a6dd15582c038a25bd7059435833943e2e4617 s-n-wait-online.service was added
-to presets to synchronize the presets with the state after installation. But it
-is harmful to have s-n-wait-online.service enabled when s-n.service is
-disabled, because s-n-wait-online.service has Requsite=s-n.service and cannot
-be activated. Thus remove s-n-wait-online.service from presets again, and let
-it be enabled whenever s-n.service is enabled.
-
-During installation we create enablement symlinks by hand, and since s-n.service
-is enabled, s-n-w-o.service should be enabled too, so the symlink should still
-be created during installation.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1433459#c15(cherry picked from commit 9e49656037717b96c06b1f1507a41550bdb2c795)
----
- system-preset/90-systemd.preset | 1 -
- units/systemd-networkd.service.m4.in | 6 ++++++
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/system-preset/90-systemd.preset b/system-preset/90-systemd.preset
-index 6b5349dc8..3ba4bb760 100644
---- a/system-preset/90-systemd.preset
-+++ b/system-preset/90-systemd.preset
-@@ -15,7 +15,6 @@ enable getty@.service
- enable systemd-timesyncd.service
- enable systemd-networkd.service
- enable systemd-resolved.service
--enable systemd-networkd-wait-online.service
-
- disable console-getty.service
- disable debug-shell.service
-diff --git a/units/systemd-networkd.service.m4.in b/units/systemd-networkd.service.m4.in
-index d1cf3fc13..2623b2194 100644
---- a/units/systemd-networkd.service.m4.in
-+++ b/units/systemd-networkd.service.m4.in
-@@ -39,3 +39,9 @@ SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete
- [Install]
- WantedBy=multi-user.target
- Also=systemd-networkd.socket
-+
-+# We want to enable systemd-networkd-wait-online.service whenever this service
-+# is enabled. systemd-networkd-wait-online.service has
-+# WantedBy=network-online.target, so enabling it only has an effect if
-+# network-online.target itself is enabled or pulled in by some other unit.
-+Also=systemd-networkd-wait-online.service
---
-2.13.3
-
-
-From 677a50e8e931741a174f45d9cae981253dfae3ff Mon Sep 17 00:00:00 2001
-From: Jan Synacek <jan.synacek@gmail.com>
-Date: Wed, 29 Mar 2017 08:25:52 +0200
-Subject: [PATCH 17/75] basic: forbid rm_rf() to remove paths ending with ".."
- (#5653)
-
-Fixes: #5644(cherry picked from commit ab883125704b9310dcdfcf7451a27e85609da76c)
----
- src/basic/rm-rf.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/basic/rm-rf.c b/src/basic/rm-rf.c
-index 08497af72..bdaca264f 100644
---- a/src/basic/rm-rf.c
-+++ b/src/basic/rm-rf.c
-@@ -187,6 +187,13 @@ int rm_rf(const char *path, RemoveFlags flags) {
- return -EPERM;
- }
-
-+ /* Another safe-check. Removing "/path/.." could easily remove entire root as well.
-+ * It's especially easy to do using globs in tmpfiles, like "/path/.*", which the glob()
-+ * function expands to both "/path/." and "/path/..".
-+ * Return -EINVAL to be consistent with rmdir("/path/."). */
-+ if (endswith(path, "/..") || endswith(path, "/../"))
-+ return -EINVAL;
-+
- if ((flags & (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) == (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) {
- /* Try to remove as subvolume first */
- r = btrfs_subvol_remove(path, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA);
---
-2.13.3
-
-
-From 709ea8522339275193a9cef277f9b86926ba4068 Mon Sep 17 00:00:00 2001
-From: Michael Biebl <mbiebl@gmail.com>
-Date: Thu, 30 Mar 2017 11:56:25 +0200
-Subject: [PATCH 18/75] journal: fix up syslog facility when forwarding native
- messages (#5667)
-
-Native journal messages (_TRANSPORT=journal) typically don't have a
-syslog facility attached to it. As a result when forwarding the messages
-to syslog they ended up with facility 0 (LOG_KERN).
-Apply syslog_fixup_facility() so we use LOG_USER instead.
-
-Fixes: #5640(cherry picked from commit b6a20306fa5dbb8129dd09e07efeacfcfc57363f)
----
- src/journal/journald-native.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
-index 3c03b8375..c9bf3832c 100644
---- a/src/journal/journald-native.c
-+++ b/src/journal/journald-native.c
-@@ -279,7 +279,7 @@ void server_process_native_message(
-
- if (message) {
- if (s->forward_to_syslog)
-- server_forward_syslog(s, priority, identifier, message, ucred, tv);
-+ server_forward_syslog(s, syslog_fixup_facility(priority), identifier, message, ucred, tv);
-
- if (s->forward_to_kmsg)
- server_forward_kmsg(s, priority, identifier, message, ucred);
---
-2.13.3
-
-
-From 817b7724521ad886045fd89097c64c468fa9f87a Mon Sep 17 00:00:00 2001
-From: Susant Sahani <ssahani@users.noreply.github.com>
-Date: Fri, 31 Mar 2017 11:59:20 +0530
-Subject: [PATCH 19/75] networkd: fix route_new_static assert when
- IPv4LLRoute=true (#5676)
-
-fixes: #5664(cherry picked from commit 0b180d754cd9b171f38e39554495841f666060f7)
----
- src/network/networkd-network.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
-index ab372568d..fac42d847 100644
---- a/src/network/networkd-network.c
-+++ b/src/network/networkd-network.c
-@@ -428,7 +428,7 @@ int network_apply(Network *network, Link *link) {
- if (network->ipv4ll_route) {
- Route *route;
-
-- r = route_new_static(network, "Network", 0, &route);
-+ r = route_new_static(network, NULL, 0, &route);
- if (r < 0)
- return r;
-
---
-2.13.3
-
-
-From 1bcc1b6eba1505f816c91db504098b5b8509311e Mon Sep 17 00:00:00 2001
-From: afrantzis <alexandros.frantzis@canonical.com>
-Date: Wed, 5 Apr 2017 11:32:55 +0300
-Subject: [PATCH 20/75] logind: Stopped inhibitions should be considered
- inactive (#5698)
-
-(cherry picked from commit 5e8273acac6af57d8c9cdec57388bab451a4cbc0)
----
- src/login/logind-inhibit.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c
-index 5ca42b1ca..1e6f38373 100644
---- a/src/login/logind-inhibit.c
-+++ b/src/login/logind-inhibit.c
-@@ -347,7 +347,7 @@ InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm) {
- assert(m);
-
- HASHMAP_FOREACH(i, m->inhibitors, j)
-- if (i->mode == mm)
-+ if (i->mode == mm && i->started)
- what |= i->what;
-
- return what;
-@@ -388,6 +388,9 @@ bool manager_is_inhibited(
- assert(w > 0 && w < _INHIBIT_WHAT_MAX);
-
- HASHMAP_FOREACH(i, m->inhibitors, j) {
-+ if (!i->started)
-+ continue;
-+
- if (!(i->what & w))
- continue;
-
---
-2.13.3
-
-
-From 678199bb6dbc8ee15ccffe6dc9d62b42e5ac6da8 Mon Sep 17 00:00:00 2001
-From: umuttl <umut@tezduyar.com>
-Date: Mon, 10 Apr 2017 13:12:25 +0200
-Subject: [PATCH 21/75] core: downgrade legit error logs (#5705)
-
-manager_sync_bus_names() function retrieves the dbus names
-and compares it with unit bus names. It could be right
-after the list is retrieved, the dbus peer is disconnected.
-In this case it is really not an ERROR print if
-sd_bus_get_name_creds() or sd_bus_creds_get_unique_name()
-fail.
-(cherry picked from commit ddbf0d4b92733a54de50724c756fd48237ad70c9)
----
- src/core/dbus.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/core/dbus.c b/src/core/dbus.c
-index 065f2d81d..cfc045d28 100644
---- a/src/core/dbus.c
-+++ b/src/core/dbus.c
-@@ -753,13 +753,13 @@ int manager_sync_bus_names(Manager *m, sd_bus *bus) {
- /* If it is, determine its current owner */
- r = sd_bus_get_name_creds(bus, name, SD_BUS_CREDS_UNIQUE_NAME, &creds);
- if (r < 0) {
-- log_error_errno(r, "Failed to get bus name owner %s: %m", name);
-+ log_full_errno(r == -ENXIO ? LOG_DEBUG : LOG_ERR, r, "Failed to get bus name owner %s: %m", name);
- continue;
- }
-
- r = sd_bus_creds_get_unique_name(creds, &unique);
- if (r < 0) {
-- log_error_errno(r, "Failed to get unique name for %s: %m", name);
-+ log_full_errno(r == -ENXIO ? LOG_DEBUG : LOG_ERR, r, "Failed to get unique name for %s: %m", name);
- continue;
- }
-
---
-2.13.3
-
-
-From 22b4881bf042aceaf079efec71447ef17aa7e913 Mon Sep 17 00:00:00 2001
-From: Evgeny Vereshchagin <evvers@ya.ru>
-Date: Mon, 10 Apr 2017 14:20:17 +0300
-Subject: [PATCH 22/75] core: fix values of BindPaths and BindReadOnlyPaths
- properties on 32-bit platforms (#5713)
-
-$ busctl get-property \
- org.freedesktop.systemd1 \
- /org/freedesktop/systemd1/unit/run_2dr471de87550554a6dbb165501c33c5dab_2eservice \
- org.freedesktop.systemd1.Service BindReadOnlyPaths
-
-a(ssbt) 1 "/etc" "/etc" false 9228635523571007488
-
-The correct values are 0 and 16384
-(cherry picked from commit c9b061085678a8b00cf3631b123378fc6104a56f)
----
- src/core/dbus-execute.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
-index 7df4cab3f..0454a28e1 100644
---- a/src/core/dbus-execute.c
-+++ b/src/core/dbus-execute.c
-@@ -710,7 +710,7 @@ static int property_get_bind_paths(
- c->bind_mounts[i].source,
- c->bind_mounts[i].destination,
- c->bind_mounts[i].ignore_enoent,
-- c->bind_mounts[i].recursive ? MS_REC : 0);
-+ c->bind_mounts[i].recursive ? (uint64_t) MS_REC : (uint64_t) 0);
- if (r < 0)
- return r;
- }
---
-2.13.3
-
-
-From 4dfc537efdff7b6297ff809a5c3f1a445f707c44 Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Mon, 10 Apr 2017 20:22:18 +0900
-Subject: [PATCH 23/75] tmpfiles: downgrade error message when operation is not
- supported (#5692)
-
-Fixes #5607
-(cherry picked from commit c258349f1a56b987fd91a5c136fd15536eec3890)
----
- src/tmpfiles/tmpfiles.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
-index 7326597b8..ed6a9adaa 100644
---- a/src/tmpfiles/tmpfiles.c
-+++ b/src/tmpfiles/tmpfiles.c
-@@ -973,7 +973,7 @@ static int path_set_attribute(Item *item, const char *path) {
-
- r = chattr_fd(fd, f, item->attribute_mask);
- if (r < 0)
-- log_full_errno(r == -ENOTTY ? LOG_DEBUG : LOG_WARNING,
-+ log_full_errno(r == -ENOTTY || r == -EOPNOTSUPP ? LOG_DEBUG : LOG_WARNING,
- r,
- "Cannot set file attribute for '%s', value=0x%08x, mask=0x%08x: %m",
- path, item->attribute_value, item->attribute_mask);
---
-2.13.3
-
-
-From 1371c920fcdd9cef144e09547a72884c01581cf9 Mon Sep 17 00:00:00 2001
-From: slodki <slodki@users.noreply.github.com>
-Date: Thu, 13 Apr 2017 12:34:59 +0200
-Subject: [PATCH 24/75] loginctl: fix typo causing ignoring multiple session
- IDs (#5732)
-
-Fixes #5733
-(cherry picked from commit b0d08b056e73007695f2f001213da73d19802e23)
----
- src/login/loginctl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/login/loginctl.c b/src/login/loginctl.c
-index 7dea5c085..68cac4cb0 100644
---- a/src/login/loginctl.c
-+++ b/src/login/loginctl.c
-@@ -929,7 +929,7 @@ static int show_session(int argc, char *argv[], void *userdata) {
- _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
- _cleanup_free_ char *path = NULL;
-
-- r = get_session_path(bus, argv[1], &error, &path);
-+ r = get_session_path(bus, argv[i], &error, &path);
- if (r < 0) {
- log_error("Failed to get session path: %s", bus_error_message(&error, r));
- return r;
---
-2.13.3
-
-
-From 432c3bd7c14c83306b66b3d3fdd7f834acd1856c Mon Sep 17 00:00:00 2001
-From: Philip Withnall <philip@tecnocode.co.uk>
-Date: Thu, 20 Apr 2017 11:34:26 +0100
-Subject: [PATCH 25/75] man: Fix reference to timer-sync.target instead of
- time-sync.target (#5764)
-
-Also fix an erroneous reference to it in the NEWS file, for posterity.
-
-Signed-off-by: Philip Withnall <withnall@endlessm.com>(cherry picked from commit 46ae28d8c3b3c438dd1796b78bbff8f9dc188b31)
----
- NEWS | 2 +-
- man/systemd.timer.xml | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index da9e20383..05822a2cd 100644
---- a/NEWS
-+++ b/NEWS
-@@ -3315,7 +3315,7 @@ CHANGES WITH 216:
- like Cockpit which register web clients as PAM sessions.
-
- * timer units with at least one OnCalendar= setting will now
-- be started only after timer-sync.target has been
-+ be started only after time-sync.target has been
- reached. This way they will not elapse before the system
- clock has been corrected by a local NTP client or
- similar. This is particular useful on RTC-less embedded
-diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml
-index 4fe140e4b..7102d626e 100644
---- a/man/systemd.timer.xml
-+++ b/man/systemd.timer.xml
-@@ -93,7 +93,7 @@
- on <filename>timers.target</filename>, as well as <varname>Conflicts=</varname> and <varname>Before=</varname> on
- <filename>shutdown.target</filename> to ensure that they are stopped cleanly prior to system shutdown. Timer units
- with at least one <varname>OnCalendar=</varname> directive will have an additional <varname>After=</varname>
-- dependency on <filename>timer-sync.target</filename> to avoid being started before the system clock has been
-+ dependency on <filename>time-sync.target</filename> to avoid being started before the system clock has been
- correctly set. Only timer units involved with early boot or late system shutdown should disable the
- <varname>DefaultDependencies=</varname> option.</para>
- </refsect1>
---
-2.13.3
-
-
-From b8a7de0282ed299ec0897d00d0743bcf58492063 Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Fri, 21 Apr 2017 18:21:17 +0900
-Subject: [PATCH 26/75] units: systemd-resolved should start before
- network-online.target and nss-lookup.target (#5691)
-
-systemd-resolved provides
-1. local API via NSS and D-Bus
-2. kind of a local "DNS proxy" through its stub listener
-The 1st item should be started before nss-lookup.target.
-The 2nd item should be started before network-online.target,
-because if the networking works in general, then DNS (and DNS proxy) should too.
-
-Fixes #5650
-(cherry picked from commit 3e06055500755053050620a45236ef606507e1bd)
----
- units/systemd-resolved.service.m4.in | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/units/systemd-resolved.service.m4.in b/units/systemd-resolved.service.m4.in
-index d3b8f8160..41f696abe 100644
---- a/units/systemd-resolved.service.m4.in
-+++ b/units/systemd-resolved.service.m4.in
-@@ -12,6 +12,8 @@ Documentation=http://www.freedesktop.org/wiki/Software/systemd/resolved
- Documentation=http://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
- Documentation=http://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
- After=systemd-networkd.service network.target
-+Before=network-online.target nss-lookup.target
-+Wants=nss-lookup.target
-
- # On kdbus systems we pull in the busname explicitly, because it
- # carries policy that allows the daemon to acquire its name.
---
-2.13.3
-
-
-From 89a8044039733dea760056d4109bb201300e9b65 Mon Sep 17 00:00:00 2001
-From: Michal Sekletar <msekletar@users.noreply.github.com>
-Date: Mon, 24 Apr 2017 18:33:12 +0200
-Subject: [PATCH 27/75] sd-journal: return SD_JOURNAL_INVALIDATE only if
- journal files were actually deleted/moved (#5580)
-
-When caller invokes sd_journal_open() we usually open at least one
-directory with journal files. add_root_directory() function increments
-current_invalidate_counter. After sd_journal_open() returns
-current_invalidate_counter != last_invalidate_counter.
-
-After caller waits for journal events (e.g. waits for new messages in
-journal) then it usually calls sd_journal_process(). However, on first
-call to sd_journal_process(), function determine_change() returns
-SD_JOURNAL_INVALIDATE even though no journal files were
-deleted/moved. This is because current_invalidate_counter !=
-last_invalidate_counter.
-
-After the fix we make sure counters has the same value before we begin
-processing inotify events.
-(cherry picked from commit f934644424daa6c86fd2284fe8f33ea233ece874)
----
- src/journal/sd-journal.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
-index 71967a0f3..86afb4985 100644
---- a/src/journal/sd-journal.c
-+++ b/src/journal/sd-journal.c
-@@ -2424,6 +2424,7 @@ _public_ int sd_journal_process(sd_journal *j) {
- assert_return(!journal_pid_changed(j), -ECHILD);
-
- j->last_process_usec = now(CLOCK_MONOTONIC);
-+ j->last_invalidate_counter = j->current_invalidate_counter;
-
- for (;;) {
- union inotify_event_buffer buffer;
---
-2.13.3
-
-
-From fd22bede6e06da50ca072cdfdd7b9acbb5f1fc06 Mon Sep 17 00:00:00 2001
-From: Ivan Shapovalov <intelfx@intelfx.name>
-Date: Mon, 24 Apr 2017 20:38:53 +0400
-Subject: [PATCH 28/75] fstab-generator: do not skip Before= ordering for
- noauto mountpoints (#5547)
-
-(cherry picked from commit bd6bcce4d7fd9f34f84588888fa9d0e664e0500b)
----
- src/fstab-generator/fstab-generator.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
-index 2677a3fb3..50d350fce 100644
---- a/src/fstab-generator/fstab-generator.c
-+++ b/src/fstab-generator/fstab-generator.c
-@@ -358,7 +358,7 @@ static int add_mount(
- "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
- source);
-
-- if (!noauto && !nofail && !automount)
-+ if (!nofail && !automount)
- fprintf(f, "Before=%s\n", post);
-
- if (!automount && opts) {
---
-2.13.3
-
-
-From f88105d528645b5c99dbe5dcbd0300948a01c9c9 Mon Sep 17 00:00:00 2001
-From: Yusuke Nojima <nojima718@gmail.com>
-Date: Sun, 30 Apr 2017 02:37:53 +0900
-Subject: [PATCH 29/75] journald: fix assertion failure on
- journal_file_link_data. (#5843)
-
-When some error occurs during the initialization of JournalFile,
-the JournalFile can be left without hash tables created. When later
-trying to append an entry to that file, the assertion in
-journal_file_link_data() fails, and journald crashes.
-
-This patch fix this issue by checking *_hash_table_size in
-journal_file_verify_header().
-(cherry picked from commit 5b3cc0c86aeddd4615e7e28e79aa89e5b77a6507)
----
- src/journal/journal-file.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
-index 14cb01a60..243d5198d 100644
---- a/src/journal/journal-file.c
-+++ b/src/journal/journal-file.c
-@@ -613,6 +613,9 @@ static int journal_file_verify_header(JournalFile *f) {
- return -EBUSY;
- }
-
-+ if (f->header->field_hash_table_size == 0 || f->header->data_hash_table_size == 0)
-+ return -EBADMSG;
-+
- /* Don't permit appending to files from the future. Because otherwise the realtime timestamps wouldn't
- * be strictly ordered in the entries in the file anymore, and we can't have that since it breaks
- * bisection. */
---
-2.13.3
-
-
-From e6715ab647230fae7b489a5cc3edcb2d59c98e2f Mon Sep 17 00:00:00 2001
-From: Roelf Wichertjes <roelf@roelf.org>
-Date: Sun, 30 Apr 2017 13:12:32 +0200
-Subject: [PATCH 30/75] networkd: Add check to ensure link is down before
- attempting to enslave (#5853)
-
-netdev to bond.
-
-There are situations where a link can be in an "UP" state when
- systemd-networkd attempts to add the link to a bond device.
-This is a problem because the bonding driver will refuse to
- enslave a link if it is in the "UP" state.
-This check ensures systemd-networkd sets the link to "DOWN"
- before attempting to add the link to the bond.
-
-Fixes #5838.
-(cherry picked from commit 14b6bb776287e72887071dafae3d4c2c65ee926d)
----
- src/network/netdev/netdev.c | 8 ++++++++
- src/network/networkd-link.c | 4 ++--
- src/network/networkd-link.h | 3 +++
- 3 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
-index 9b9e83d9d..f70117e6f 100644
---- a/src/network/netdev/netdev.c
-+++ b/src/network/netdev/netdev.c
-@@ -28,6 +28,7 @@
- #include "network-internal.h"
- #include "netdev/netdev.h"
- #include "networkd-manager.h"
-+#include "networkd-link.h"
- #include "siphash24.h"
- #include "stat-util.h"
- #include "string-table.h"
-@@ -218,6 +219,13 @@ static int netdev_enslave_ready(NetDev *netdev, Link* link, sd_netlink_message_h
- assert(link);
- assert(callback);
-
-+ if (link->flags & IFF_UP) {
-+ log_netdev_debug(netdev, "Link '%s' was up when attempting to enslave it. Bringing link down.", link->ifname);
-+ r = link_down(link);
-+ if (r < 0)
-+ return log_netdev_error_errno(netdev, r, "Could not bring link down: %m");
-+ }
-+
- r = sd_rtnl_message_new_link(netdev->manager->rtnl, &req, RTM_SETLINK, link->ifindex);
- if (r < 0)
- return log_netdev_error_errno(netdev, r, "Could not allocate RTM_SETLINK message: %m");
-diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
-index 0c1229336..c37bc7f60 100644
---- a/src/network/networkd-link.c
-+++ b/src/network/networkd-link.c
-@@ -1598,7 +1598,7 @@ static int link_up_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userda
- return 1;
- }
-
--static int link_up(Link *link) {
-+int link_up(Link *link) {
- _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
- uint8_t ipv6ll_mode;
- int r;
-@@ -1719,7 +1719,7 @@ static int link_down_handler(sd_netlink *rtnl, sd_netlink_message *m, void *user
- return 1;
- }
-
--static int link_down(Link *link) {
-+int link_down(Link *link) {
- _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
- int r;
-
-diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
-index e6190fbe5..be5c4f328 100644
---- a/src/network/networkd-link.h
-+++ b/src/network/networkd-link.h
-@@ -138,6 +138,9 @@ int link_get(Manager *m, int ifindex, Link **ret);
- int link_add(Manager *manager, sd_netlink_message *message, Link **ret);
- void link_drop(Link *link);
-
-+int link_up(Link *link);
-+int link_down(Link *link);
-+
- int link_address_remove_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata);
- int link_route_remove_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata);
-
---
-2.13.3
-
-
-From 66ff3b83bae08e5c3ddd9f62d2bdfbef2aaf95fb Mon Sep 17 00:00:00 2001
-From: Aggelos Avgerinos <evaggelos.avgerinos@gmail.com>
-Date: Tue, 9 May 2017 02:09:22 +0300
-Subject: [PATCH 31/75] execute: Properly log errors considering socket fds
- (#5910)
-
-Till now if the params->n_fds was 0, systemd was logging that there were
-more than one sockets.
-
-Thanks @gregoryp and @VFXcode who did the most work debugging this.
-(cherry picked from commit 488ab41cb89828e68162f34fb68241bbda700c05)
----
- src/core/execute.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/core/execute.c b/src/core/execute.c
-index d7798387c..aa655cfae 100644
---- a/src/core/execute.c
-+++ b/src/core/execute.c
-@@ -2927,11 +2927,16 @@ int exec_spawn(Unit *unit,
- context->std_output == EXEC_OUTPUT_SOCKET ||
- context->std_error == EXEC_OUTPUT_SOCKET) {
-
-- if (params->n_fds != 1) {
-+ if (params->n_fds > 1) {
- log_unit_error(unit, "Got more than one socket.");
- return -EINVAL;
- }
-
-+ if (params->n_fds == 0) {
-+ log_unit_error(unit, "Got no socket.");
-+ return -EINVAL;
-+ }
-+
- socket_fd = params->fds[0];
- } else {
- socket_fd = -1;
---
-2.13.3
-
-
-From 207b45b46c41b84cbd2be29331c105308d66b3bd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Thu, 11 May 2017 12:12:41 -0400
-Subject: [PATCH 32/75] pid1: improve logging when failing to remount / ro
- (#5940)
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1227736#c49
-
-We counted how many filesystems could not be unmounted, but only for those
-filesystems which we tried to unmount. Since we only remount / ro, without
-attempting to unmount, we would emit a confusing error message:
-
-Remounting '/' read-only with options 'seclabel,space_cache,subvolid=5,subvol=/'.
-Remounting '/' read-only with options 'seclabel,space_cache,subvolid=5,subvol=/'.
-Remounting '/' read-only with options 'seclabel,space_cache,subvolid=5,subvol=/'.
-All filesystems unmounted.
-
-Warn when remount-ro fails, and for filesystems which we won't try to unmount,
-include the failure to remount-ro in n_failed.
-
-A few minor cleanups:
-- remove unecessary goto which jumps to the next line anyway
-- always calculate n_failed, even if log_error is false. This causes no change
- in behaviour, but I think the code is easier to follow, since the log setting
- cannot influence other logic.
-(cherry picked from commit c826cd3f7cfd950c8a86d57dfa6303f70de3e207)
----
- src/core/umount.c | 33 ++++++++++++++++++++-------------
- 1 file changed, 20 insertions(+), 13 deletions(-)
-
-diff --git a/src/core/umount.c b/src/core/umount.c
-index 2f4b12bdb..77b5bd955 100644
---- a/src/core/umount.c
-+++ b/src/core/umount.c
-@@ -369,6 +369,14 @@ static int delete_dm(dev_t devnum) {
- return 0;
- }
-
-+static bool nonunmountable_path(const char *path) {
-+ return path_equal(path, "/")
-+#ifndef HAVE_SPLIT_USR
-+ || path_equal(path, "/usr")
-+#endif
-+ || path_startswith(path, "/run/initramfs");
-+}
-+
- static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_error) {
- MountPoint *m, *n;
- int n_failed = 0;
-@@ -404,21 +412,21 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
- * somehwere else via a bind mount. If we
- * explicitly remount the super block of that
- * alias read-only we hence should be
-- * relatively safe regarding keeping the fs we
-- * can otherwise not see dirty. */
-+ * relatively safe regarding keeping dirty an fs
-+ * we cannot otherwise see. */
- log_info("Remounting '%s' read-only with options '%s'.", m->path, options);
-- (void) mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, options);
-+ if (mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, options) < 0) {
-+ if (log_error)
-+ log_notice_errno(errno, "Failed to remount '%s' read-only: %m", m->path);
-+ if (nonunmountable_path(m->path))
-+ n_failed++;
-+ }
- }
-
- /* Skip / and /usr since we cannot unmount that
- * anyway, since we are running from it. They have
- * already been remounted ro. */
-- if (path_equal(m->path, "/")
--#ifndef HAVE_SPLIT_USR
-- || path_equal(m->path, "/usr")
--#endif
-- || path_startswith(m->path, "/run/initramfs")
-- )
-+ if (nonunmountable_path(m->path))
- continue;
-
- /* Trying to umount. We don't force here since we rely
-@@ -430,8 +438,9 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
- *changed = true;
-
- mount_point_free(head, m);
-- } else if (log_error) {
-- log_warning_errno(errno, "Could not unmount %s: %m", m->path);
-+ } else {
-+ if (log_error)
-+ log_warning_errno(errno, "Could not unmount %s: %m", m->path);
- n_failed++;
- }
- }
-@@ -555,8 +564,6 @@ int umount_all(bool *changed) {
-
- /* umount one more time with logging enabled */
- r = mount_points_list_umount(&mp_list_head, &umount_changed, true);
-- if (r <= 0)
-- goto end;
-
- end:
- mount_points_list_free(&mp_list_head);
---
-2.13.3
-
-
-From 05fdab5434369be3fefef47d072403ca2c5b0aeb Mon Sep 17 00:00:00 2001
-From: Matthijs van Duin <matthijsvanduin@gmail.com>
-Date: Fri, 12 May 2017 00:55:26 +0200
-Subject: [PATCH 33/75] sd-bus: fix c++ compatibility (#5941)
-
-g++ annoyingly requires a non-empty struct-initializer to initialize all
-struct members, in order of declaration.
-
-Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>(cherry picked from commit cc9daff2289381d2fe7fb5ee7c3fa3435e8fc478)
----
- src/systemd/sd-bus-vtable.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/systemd/sd-bus-vtable.h b/src/systemd/sd-bus-vtable.h
-index 3563a2b12..1e82cae03 100644
---- a/src/systemd/sd-bus-vtable.h
-+++ b/src/systemd/sd-bus-vtable.h
-@@ -131,6 +131,7 @@ struct sd_bus_vtable {
- .member = _member, \
- .signature = _signature, \
- .get = _get, \
-+ .set = NULL, \
- .offset = _offset, \
- }, \
- }, \
-@@ -154,6 +155,9 @@ struct sd_bus_vtable {
- #define SD_BUS_VTABLE_END \
- { \
- .type = _SD_BUS_VTABLE_END, \
-+ .flags = 0, \
-+ .x = { \
-+ }, \
- }
-
- _SD_END_DECLARATIONS;
---
-2.13.3
-
-
-From 6a9a1a31feb8b7144e9d02046bfdc8404409e513 Mon Sep 17 00:00:00 2001
-From: Elias Probst <mail@eliasprobst.eu>
-Date: Sat, 13 May 2017 20:55:03 +0200
-Subject: [PATCH 34/75] =?UTF-8?q?man:=20fix=20typo=20(`--network-zones`=20?=
- =?UTF-8?q?=E2=86=92=20`--network-zone`)?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-(cherry picked from commit cf917c27b654d4f1ee719ea27f49c6db93a3ec9c)
----
- man/systemd-nspawn.xml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
-index a7af8c25d..ae7082776 100644
---- a/man/systemd-nspawn.xml
-+++ b/man/systemd-nspawn.xml
-@@ -636,7 +636,7 @@
- broadcast domain, here called a "zone". Each container may only be part of one zone, but each zone may contain
- any number of containers. Each zone is referenced by its name. Names may be chosen freely (as long as they form
- valid network interface names when prefixed with <literal>vz-</literal>), and it is sufficient to pass the same
-- name to the <option>--network-zones=</option> switch of the various concurrently running containers to join
-+ name to the <option>--network-zone=</option> switch of the various concurrently running containers to join
- them in one zone.</para>
-
- <para>Note that
---
-2.13.3
-
-
-From 429a69d0dd273a431f396fe8f5846a8e8a1a0ac7 Mon Sep 17 00:00:00 2001
-From: Ronny Chevalier <chevalier.ronny@gmail.com>
-Date: Sun, 14 May 2017 16:30:40 +0200
-Subject: [PATCH 35/75] env-util: fix memory leak (#5962)
-
-If cunescape succeeds, but the assignment is not valid, uce is not freed.
-(cherry picked from commit 16eefcafedeecf0e282add6c1eadeebcb3ad0609)
----
- src/basic/env-util.c | 4 +++-
- src/test/test-env-util.c | 10 ++++++++++
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/src/basic/env-util.c b/src/basic/env-util.c
-index 1ec574e8a..e79b441ab 100644
---- a/src/basic/env-util.c
-+++ b/src/basic/env-util.c
-@@ -799,8 +799,10 @@ int deserialize_environment(char ***environment, const char *line) {
- if (r < 0)
- return r;
-
-- if (!env_assignment_is_valid(uce))
-+ if (!env_assignment_is_valid(uce)) {
-+ free(uce);
- return -EINVAL;
-+ }
-
- return strv_env_replace(environment, uce);
- }
-diff --git a/src/test/test-env-util.c b/src/test/test-env-util.c
-index e5cc2a2df..904c50f0e 100644
---- a/src/test/test-env-util.c
-+++ b/src/test/test-env-util.c
-@@ -314,6 +314,15 @@ static void test_env_assignment_is_valid(void) {
- assert_se(!env_assignment_is_valid("głąb=printf \"\x1b]0;<mock-chroot>\x07<mock-chroot>\""));
- }
-
-+static void test_deserialize_environment(void) {
-+ _cleanup_strv_free_ char **env = strv_new("A=1", NULL);
-+
-+ assert_se(deserialize_environment(&env, "env=test") < 0);
-+ assert_se(deserialize_environment(&env, "env=B=2") >= 0);
-+
-+ assert_se(strv_equal(env, STRV_MAKE("A=1", "B=2")));
-+}
-+
- int main(int argc, char *argv[]) {
- test_strv_env_delete();
- test_strv_env_get();
-@@ -330,6 +339,7 @@ int main(int argc, char *argv[]) {
- test_env_name_is_valid();
- test_env_value_is_valid();
- test_env_assignment_is_valid();
-+ test_deserialize_environment();
-
- return 0;
- }
---
-2.13.3
-
-
-From 8061fde2d95f0b67d299815a5944abeed0b1ee46 Mon Sep 17 00:00:00 2001
-From: Ronny Chevalier <chevalier.ronny@gmail.com>
-Date: Sun, 14 May 2017 13:19:11 +0200
-Subject: [PATCH 36/75] conf-parser: fix wrong argument given to
- log_syntax_invalid_utf8
-
-The condition is on "word", hence we give word instead of rvalue.
-
-An assert would be triggered if !utf8_is_valid(word) is true and
-rvalue == NULL, since log_syntax_invalid_utf8 calls utf8_escape_invalid
-which calls assert(str).
-
-A test case has been added to test with valid and invalid utf8.
-
-(cherry picked from commit b4958f42af08a72cf02e845c8db8d60fe2e5a82f)
----
- src/shared/conf-parser.c | 2 +-
- src/test/test-conf-parser.c | 2 ++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
-index 265ac83dc..863034d18 100644
---- a/src/shared/conf-parser.c
-+++ b/src/shared/conf-parser.c
-@@ -792,7 +792,7 @@ int config_parse_strv(const char *unit,
- }
-
- if (!utf8_is_valid(word)) {
-- log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, rvalue);
-+ log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, word);
- free(word);
- continue;
- }
-diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
-index be5d2611f..26ff27035 100644
---- a/src/test/test-conf-parser.c
-+++ b/src/test/test-conf-parser.c
-@@ -180,6 +180,8 @@ static void test_config_parse_strv(void) {
- test_config_parse_strv_one("foo", STRV_MAKE("foo"));
- test_config_parse_strv_one("foo bar foo", STRV_MAKE("foo", "bar", "foo"));
- test_config_parse_strv_one("\"foo bar\" foo", STRV_MAKE("foo bar", "foo"));
-+ test_config_parse_strv_one("\xc3\x80", STRV_MAKE("\xc3\x80"));
-+ test_config_parse_strv_one("\xc3\x7f", STRV_MAKE_EMPTY);
- }
-
- static void test_config_parse_mode(void) {
---
-2.13.3
-
-
-From fa32003951787e5fb4e974d72700bfaf3ab1aa80 Mon Sep 17 00:00:00 2001
-From: Ronny Chevalier <chevalier.ronny@gmail.com>
-Date: Sun, 14 May 2017 13:19:11 +0200
-Subject: [PATCH 37/75] test-conf-parser: add valid and invalid utf8 test for
- config_parse_path
-
-(cherry picked from commit d5ade2d6027c67ef5a16d4a0e38c9fa38fd68212)
----
- src/test/test-conf-parser.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
-index 26ff27035..77fcbc0dd 100644
---- a/src/test/test-conf-parser.c
-+++ b/src/test/test-conf-parser.c
-@@ -109,8 +109,10 @@ static void test_config_parse_path(void) {
- test_config_parse_path_one("/path", "/path");
- test_config_parse_path_one("/path//////////", "/path");
- test_config_parse_path_one("///path/foo///bar////bar//", "/path/foo/bar/bar");
-+ test_config_parse_path_one("/path/\xc3\x80", "/path/\xc3\x80");
-
- test_config_parse_path_one("not_absolute/path", NULL);
-+ test_config_parse_path_one("/path/\xc3\x7f", NULL);
- }
-
- static void test_config_parse_log_level(void) {
---
-2.13.3
-
-
-From 7785a2b82fcc11171699ccb9839a147ad6bf258d Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Fri, 19 May 2017 11:37:30 +0200
-Subject: [PATCH 38/75] =?UTF-8?q?man:=20fix=20typo=20m86k=20=E2=86=92=20m6?=
- =?UTF-8?q?8k=20(#5993)?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-(cherry picked from commit 215a2db41972230e1df7733d29727247685d58dc)
----
- man/systemd.unit.xml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
-index 44841ac7d..c963a9353 100644
---- a/man/systemd.unit.xml
-+++ b/man/systemd.unit.xml
-@@ -859,7 +859,7 @@
- <varname>arm64-be</varname>,
- <varname>sh</varname>,
- <varname>sh64</varname>,
-- <varname>m86k</varname>,
-+ <varname>m68k</varname>,
- <varname>tilegx</varname>,
- <varname>cris</varname> to test
- against a specific architecture. The architecture is
---
-2.13.3
-
-
-From d91fd10aaee61ae9281f96f0661d2a3564ed4274 Mon Sep 17 00:00:00 2001
-From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
-Date: Wed, 22 Mar 2017 21:34:32 +0100
-Subject: [PATCH 39/75] journal/journald-console: fix format-specifier issue
-
-timespec::tv_nsec can have different sizes depending on the
-host architecture. On x32 in particular, it is 8 bytes long
-while the long int type is only 4 bytes long. Hence, using
-ld as a format specifier will trigger a format error. Thus,
-explicitly cast timespec::tv_nsec to nsec_t and use PRI_NSEC
-as the format specifier to make sure the sizes for both match.
-
-(cherry picked from commit b123d975ca50c5b44adaeb407cfd7da36c123b03)
----
- src/journal/journald-console.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c
-index 5126c2160..5fbcdb43c 100644
---- a/src/journal/journald-console.c
-+++ b/src/journal/journald-console.c
-@@ -72,9 +72,9 @@ void server_forward_console(
- /* First: timestamp */
- if (prefix_timestamp()) {
- assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0);
-- xsprintf(tbuf, "[%5"PRI_TIME".%06ld] ",
-+ xsprintf(tbuf, "[%5"PRI_TIME".%06"PRI_NSEC"] ",
- ts.tv_sec,
-- ts.tv_nsec / 1000);
-+ (nsec_t)ts.tv_nsec / 1000);
- IOVEC_SET_STRING(iovec[n++], tbuf);
- }
-
---
-2.13.3
-
-
-From e7327ee6a1c1bc10afa422587f4d7716f04f32bc Mon Sep 17 00:00:00 2001
-From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
-Date: Wed, 22 Mar 2017 21:40:51 +0100
-Subject: [PATCH 40/75] udev/udevadm-monitor: fix format-specifier issue
-
-timespec::tv_nsec can have different sizes depending on the
-host architecture. On x32 in particular, it is 8 bytes long
-while the long int type is only 4 bytes long. Hence, using
-ld as a format specifier will trigger a format error. Thus,
-explicitly cast timespec::tv_nsec to nsec_t and use PRI_NSEC
-as the format specifier to make sure the sizes for both match.
-
-(cherry picked from commit cc9211b030c1fa7dd8d0e14df1de3e2aba32e50c)
----
- src/udev/udevadm-monitor.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c
-index f63183434..94a59186e 100644
---- a/src/udev/udevadm-monitor.c
-+++ b/src/udev/udevadm-monitor.c
-@@ -41,9 +41,9 @@ static void print_device(struct udev_device *device, const char *source, int pro
- struct timespec ts;
-
- assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0);
-- printf("%-6s[%"PRI_TIME".%06ld] %-8s %s (%s)\n",
-+ printf("%-6s[%"PRI_TIME".%06"PRI_NSEC"] %-8s %s (%s)\n",
- source,
-- ts.tv_sec, ts.tv_nsec/1000,
-+ ts.tv_sec, (nsec_t)ts.tv_nsec/1000,
- udev_device_get_action(device),
- udev_device_get_devpath(device),
- udev_device_get_subsystem(device));
---
-2.13.3
-
-
-From 589fa9087a49e4250099bb6a4cf00358379fa3a4 Mon Sep 17 00:00:00 2001
-From: Matija Skala <mskala@gmx.com>
-Date: Fri, 19 May 2017 14:36:12 +0200
-Subject: [PATCH 41/75] timesync/timesyncd-manager: fix format-specifier issues
-
-timex::time::tv_usec and timex::freq can have different sizes
-depending on the host architecture. On x32 in particular,
-it is 8 bytes long while the long int type is only 4 bytes
-long. Hence, using li as a format specifier will trigger
-a format error. Thus, introduce a new format specifier
-PRI_TIMEX which is defined as PRIi64 on x32 and li
-everywhere else.
-
-(cherry picked from commit 3bd7ef833caae7431a9c50450ce7b303234d45eb)
----
- src/basic/format-util.h | 6 ++++++
- src/timesync/timesyncd-manager.c | 4 ++--
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/basic/format-util.h b/src/basic/format-util.h
-index 39a185f59..ae42a8f89 100644
---- a/src/basic/format-util.h
-+++ b/src/basic/format-util.h
-@@ -54,6 +54,12 @@
- # error Unknown time_t size
- #endif
-
-+#if defined __x86_64__ && defined __ILP32__
-+# define PRI_TIMEX PRIi64
-+#else
-+# define PRI_TIMEX "li"
-+#endif
-+
- #if SIZEOF_RLIM_T == 8
- # define RLIM_FMT "%" PRIu64
- #elif SIZEOF_RLIM_T == 4
-diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
-index 6a6c1577c..11c495e29 100644
---- a/src/timesync/timesyncd-manager.c
-+++ b/src/timesync/timesyncd-manager.c
-@@ -379,9 +379,9 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
-
- log_debug(" status : %04i %s\n"
- " time now : %li.%03"PRI_USEC"\n"
-- " constant : %li\n"
-+ " constant : %"PRI_TIMEX"\n"
- " offset : %+.3f sec\n"
-- " freq offset : %+li (%i ppm)\n",
-+ " freq offset : %+"PRI_TIMEX" (%i ppm)\n",
- tmx.status, tmx.status & STA_UNSYNC ? "unsync" : "sync",
- tmx.time.tv_sec, tmx.time.tv_usec / NSEC_PER_MSEC,
- tmx.constant,
---
-2.13.3
-
-
-From 416ca19f3149e44fee7fee2df9b8e63042076fda Mon Sep 17 00:00:00 2001
-From: Matija Skala <mskala@gmx.com>
-Date: Fri, 19 May 2017 14:36:40 +0200
-Subject: [PATCH 42/75] timesync/timesyncd-manager: fix format-specifier issue
-
-timex::time::tv_sec can have different sizes depending on the
-host architecture. On x32 in particular, it is 8 bytes
-long while the long int type is only 4 bytes long. Hence,
-using li as a format specifier will trigger a format
-error. Thus, better use PRI_TIME instead of li which is
-actually the right format specifier to use for time_t.
-
-(cherry picked from commit 0060bb8f5bbad433bc29405cc76b955d3125d8e9)
----
- src/timesync/timesyncd-manager.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
-index 11c495e29..ae8514550 100644
---- a/src/timesync/timesyncd-manager.c
-+++ b/src/timesync/timesyncd-manager.c
-@@ -378,7 +378,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
- m->drift_ppm = tmx.freq / 65536;
-
- log_debug(" status : %04i %s\n"
-- " time now : %li.%03"PRI_USEC"\n"
-+ " time now : %"PRI_TIME".%03"PRI_USEC"\n"
- " constant : %"PRI_TIMEX"\n"
- " offset : %+.3f sec\n"
- " freq offset : %+"PRI_TIMEX" (%i ppm)\n",
---
-2.13.3
-
-
-From c19df00f6def1ee74ae0812b529f2a1b589c256f Mon Sep 17 00:00:00 2001
-From: Daniel Wang <wonderfly@users.noreply.github.com>
-Date: Sat, 20 May 2017 04:05:18 -0700
-Subject: [PATCH 43/75] DHCP: when adding static routes set scopes properly
- (#5982)
-
-DHCP responses could include static routes, but unfortunately not an
-option to tell what scope to use. So it's important that the client sets
-it properly.
-
-This mimics what the `ip route add` command does when adding a static
-route without an explicit scope:
-
-* If the destination IP is on the local host, use scope `host`
-* Otherwise if the gateway IP is null (direct route), use scope `link`
-* If anything else, use the current default `global`.
-
-Fixes #5979.
-(cherry picked from commit d6eac9bd06066c8d041449538a9cdee0fd928835)
----
- man/systemd.network.xml | 8 +++++---
- src/network/networkd-dhcp4.c | 17 +++++++++++++++--
- 2 files changed, 20 insertions(+), 5 deletions(-)
-
-diff --git a/man/systemd.network.xml b/man/systemd.network.xml
-index b807ebf29..aaa7b0968 100644
---- a/man/systemd.network.xml
-+++ b/man/systemd.network.xml
-@@ -937,9 +937,11 @@
- <varlistentry>
- <term><varname>UseRoutes=</varname></term>
- <listitem>
-- <para>When true (the default), the static routes will be
-- requested from the DHCP server and added to the routing
-- table with a metric of 1024.</para>
-+ <para>When true (the default), the static routes will be requested from the DHCP server and added to the
-+ routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's
-+ destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the
-+ link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a
-+ "link" scope will be used. For anything else, scope defaults to "global".</para>
- </listitem>
- </varlistentry>
-
-diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
-index c5c5b95c8..ae0f78daa 100644
---- a/src/network/networkd-dhcp4.c
-+++ b/src/network/networkd-dhcp4.c
-@@ -52,8 +52,21 @@ static int dhcp4_route_handler(sd_netlink *rtnl, sd_netlink_message *m,
- return 1;
- }
-
-+static int route_scope_from_address(const Route *route, const struct in_addr *self_addr) {
-+ assert(route);
-+ assert(self_addr);
-+
-+ if (in_addr_is_localhost(AF_INET, &route->dst) ||
-+ (self_addr->s_addr && route->dst.in.s_addr == self_addr->s_addr))
-+ return RT_SCOPE_HOST;
-+ else if (in4_addr_is_null(&route->gw.in))
-+ return RT_SCOPE_LINK;
-+ else
-+ return RT_SCOPE_UNIVERSE;
-+}
-+
- static int link_set_dhcp_routes(Link *link) {
-- struct in_addr gateway;
-+ struct in_addr gateway, address;
- _cleanup_free_ sd_dhcp_route **static_routes = NULL;
- int r, n, i;
-
-@@ -69,7 +82,6 @@ static int link_set_dhcp_routes(Link *link) {
- return log_link_warning_errno(link, r, "DHCP error: could not get gateway: %m");
-
- if (r >= 0) {
-- struct in_addr address;
- _cleanup_route_free_ Route *route = NULL;
- _cleanup_route_free_ Route *route_gw = NULL;
-
-@@ -141,6 +153,7 @@ static int link_set_dhcp_routes(Link *link) {
- assert_se(sd_dhcp_route_get_destination_prefix_length(static_routes[i], &route->dst_prefixlen) >= 0);
- route->priority = link->network->dhcp_route_metric;
- route->table = link->network->dhcp_route_table;
-+ route->scope = route_scope_from_address(route, &address);
-
- r = route_configure(route, link, dhcp4_route_handler);
- if (r < 0)
---
-2.13.3
-
-
-From 32fb431ebca202f885257c50574bf1c13939e5e9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sat, 13 May 2017 22:42:08 -0400
-Subject: [PATCH 44/75] journald: use unaligned_read instead of memcpy
-
-(cherry picked from commit 731e10f3c588a31936454d3207155c497219d99a)
----
- src/journal/journald-native.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
-index c9bf3832c..d839e0448 100644
---- a/src/journal/journald-native.c
-+++ b/src/journal/journald-native.c
-@@ -40,6 +40,7 @@
- #include "selinux-util.h"
- #include "socket-util.h"
- #include "string-util.h"
-+#include "unaligned.h"
-
- bool valid_user_field(const char *p, size_t l, bool allow_protected) {
- const char *a;
-@@ -218,7 +219,6 @@ void server_process_native_message(
- p = e + 1;
- continue;
- } else {
-- le64_t l_le;
- uint64_t l;
- char *k;
-
-@@ -227,8 +227,7 @@ void server_process_native_message(
- break;
- }
-
-- memcpy(&l_le, e + 1, sizeof(uint64_t));
-- l = le64toh(l_le);
-+ l = unaligned_read_le64(e + 1);
-
- if (l > DATA_SIZE_MAX) {
- log_debug("Received binary data block of %"PRIu64" bytes is too large, ignoring.", l);
---
-2.13.3
-
-
-From d56ab41b58a760907c5fda19b79bcb01aa9611d8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sat, 13 May 2017 22:42:14 -0400
-Subject: [PATCH 45/75] journal-remote: fix memleak of the name of the remote
- source
-
-(cherry picked from commit 2ddb70d26f9a284fbf38bca37ea857f24c3f39de)
----
- src/basic/journal-importer.c | 1 +
- src/journal-remote/journal-remote-parse.c | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/basic/journal-importer.c b/src/basic/journal-importer.c
-index 66119d2de..7d72effde 100644
---- a/src/basic/journal-importer.c
-+++ b/src/basic/journal-importer.c
-@@ -69,6 +69,7 @@ void journal_importer_cleanup(JournalImporter *imp) {
- safe_close(imp->fd);
- }
-
-+ free(imp->name);
- free(imp->buf);
- iovw_free_contents(&imp->iovw);
- }
-diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
-index 79afe6604..d61d1c18f 100644
---- a/src/journal-remote/journal-remote-parse.c
-+++ b/src/journal-remote/journal-remote-parse.c
-@@ -41,7 +41,7 @@ void source_free(RemoteSource *source) {
-
- /**
- * Initialize zero-filled source with given values. On success, takes
-- * ownerhship of fd and writer, otherwise does not touch them.
-+ * ownership of fd, name, and writer, otherwise does not touch them.
- */
- RemoteSource* source_new(int fd, bool passive_fd, char *name, Writer *writer) {
-
---
-2.13.3
-
-
-From c5af9aa2ccab078cf6f5bf68b88a3defa2f768f8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sat, 13 May 2017 16:40:09 -0400
-Subject: [PATCH 46/75] shared/logs-show: avoid printing "(null)" when
- timestamp is not specified
-
-$ perl -e 'print("MESSAGE\n", pack("q<", 1), "A\n\nMESSAGE=test2\n")' > message.bin
-$ systemd-journal-remote -o /tmp/out.journal message.bin
-$ journalctl -o export --file /tmp/out.journal
-__CURSOR=s=b16c464c2db44384b29e75a564d8388e;i=1;b=6b0be47627bd4932913dc126012c21c0;m=0;t=0;x=b04263a253e357a
-__REALTIME_TIMESTAMP=0
-__MONOTONIC_TIMESTAMP=0
-_BOOT_ID=6b0be47627bd4932913dc126012c21c0
-MESSAGE=A
-
-$ journalctl -o verbose --file /tmp/out.journal
-(null) [s=b16c464c2db44384b29e75a564d8388e;i=1;b=6b0be47627bd4932913dc126012c21c0;m=0;t=0;x=b04263a253e357a]
- MESSAGE=A
-
-This is changed to
-$ build/journalctl -o verbose --file /tmp/out.journal
-(no timestamp) [s=b16c464c2db44384b29e75a564d8388e;i=1;b=6b0be47627bd4932913dc126012c21c0;m=0;t=0;x=b04263a253e357a]
- MESSAGE=A
-
-We should deal gracefully with unexpected input.
-
-(cherry picked from commit 8924973ae2e1f0a0c131dcec0578669dc26e5e26)
----
- src/shared/logs-show.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
-index 72c43e80c..b4c72215c 100644
---- a/src/shared/logs-show.c
-+++ b/src/shared/logs-show.c
-@@ -473,6 +473,7 @@ static int output_verbose(
- _cleanup_free_ char *cursor = NULL;
- uint64_t realtime = 0;
- char ts[FORMAT_TIMESTAMP_MAX + 7];
-+ const char *timestamp;
- int r;
-
- assert(f);
-@@ -508,10 +509,10 @@ static int output_verbose(
- if (r < 0)
- return log_error_errno(r, "Failed to get cursor: %m");
-
-+ timestamp = flags & OUTPUT_UTC ? format_timestamp_us_utc(ts, sizeof ts, realtime)
-+ : format_timestamp_us(ts, sizeof ts, realtime);
- fprintf(f, "%s [%s]\n",
-- flags & OUTPUT_UTC ?
-- format_timestamp_us_utc(ts, sizeof(ts), realtime) :
-- format_timestamp_us(ts, sizeof(ts), realtime),
-+ timestamp ?: "(no timestamp)",
- cursor);
-
- JOURNAL_FOREACH_DATA_RETVAL(j, data, length, r) {
---
-2.13.3
-
-
-From 88cf51c38bb39b49e2b11cdde7ac20ca851ea344 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sat, 13 May 2017 22:34:40 -0400
-Subject: [PATCH 47/75] journald: properly process multiple entries in the same
- native packet
-
-For all except the last entry in a single packet, we would dispatch the
-message to the journal, but not forward it, nor perform proper cleanup.
-Rewrite the code to process each entry in a helper function, and make
-server_process_native_message() just call this function in a loop.
-
-Fixes #5643.
-
-v2:
-- properly decrement *remaining when processing entry separator
-
-(cherry picked from commit 68944f196bc85b067de71c4fe1631d824d0aded5)
----
- src/journal/journald-native.c | 83 +++++++++++++++++++++++++------------------
- 1 file changed, 49 insertions(+), 34 deletions(-)
-
-diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
-index d839e0448..83250c34e 100644
---- a/src/journal/journald-native.c
-+++ b/src/journal/journald-native.c
-@@ -81,60 +81,52 @@ static bool allow_object_pid(const struct ucred *ucred) {
- return ucred && ucred->uid == 0;
- }
-
--void server_process_native_message(
-+static int server_process_entry(
- Server *s,
-- const void *buffer, size_t buffer_size,
-+ const void *buffer, size_t *remaining,
- const struct ucred *ucred,
- const struct timeval *tv,
- const char *label, size_t label_len) {
-
-+ /* Process a single entry from a native message.
-+ * Returns 0 if nothing special happened and the message processing should continue,
-+ * and a negative or positive value otherwise.
-+ *
-+ * Note that *remaining is altered on both success and failure. */
-+
- struct iovec *iovec = NULL;
- unsigned n = 0, j, tn = (unsigned) -1;
- const char *p;
-- size_t remaining, m = 0, entry_size = 0;
-+ size_t m = 0, entry_size = 0;
- int priority = LOG_INFO;
- char *identifier = NULL, *message = NULL;
- pid_t object_pid = 0;
--
-- assert(s);
-- assert(buffer || buffer_size == 0);
-+ int r = 0;
-
- p = buffer;
-- remaining = buffer_size;
-
-- while (remaining > 0) {
-+ while (*remaining > 0) {
- const char *e, *q;
-
-- e = memchr(p, '\n', remaining);
-+ e = memchr(p, '\n', *remaining);
-
- if (!e) {
- /* Trailing noise, let's ignore it, and flush what we collected */
- log_debug("Received message with trailing noise, ignoring.");
-+ r = 1; /* finish processing of the message */
- break;
- }
-
- if (e == p) {
- /* Entry separator */
--
-- if (entry_size + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
-- log_debug("Entry is too big with %u properties and %zu bytes, ignoring.", n, entry_size);
-- continue;
-- }
--
-- server_dispatch_message(s, iovec, n, m, ucred, tv, label, label_len, NULL, priority, object_pid);
-- n = 0;
-- priority = LOG_INFO;
-- entry_size = 0;
--
-- p++;
-- remaining--;
-- continue;
-+ *remaining -= 1;
-+ break;
- }
-
- if (*p == '.' || *p == '#') {
- /* Ignore control commands for now, and
- * comments too. */
-- remaining -= (e - p) + 1;
-+ *remaining -= (e - p) + 1;
- p = e + 1;
- continue;
- }
-@@ -143,7 +135,7 @@ void server_process_native_message(
-
- /* n existing properties, 1 new, +1 for _TRANSPORT */
- if (!GREEDY_REALLOC(iovec, m, n + 2 + N_IOVEC_META_FIELDS + N_IOVEC_OBJECT_FIELDS)) {
-- log_oom();
-+ r = log_oom();
- break;
- }
-
-@@ -160,7 +152,7 @@ void server_process_native_message(
- * field */
- iovec[n].iov_base = (char*) p;
- iovec[n].iov_len = l;
-- entry_size += iovec[n].iov_len;
-+ entry_size += l;
- n++;
-
- /* We need to determine the priority
-@@ -210,19 +202,18 @@ void server_process_native_message(
- memcpy(buf, p + strlen("OBJECT_PID="), l - strlen("OBJECT_PID="));
- buf[l-strlen("OBJECT_PID=")] = '\0';
-
-- /* ignore error */
-- parse_pid(buf, &object_pid);
-+ (void) parse_pid(buf, &object_pid);
- }
- }
-
-- remaining -= (e - p) + 1;
-+ *remaining -= (e - p) + 1;
- p = e + 1;
- continue;
- } else {
- uint64_t l;
- char *k;
-
-- if (remaining < e - p + 1 + sizeof(uint64_t) + 1) {
-+ if (*remaining < e - p + 1 + sizeof(uint64_t) + 1) {
- log_debug("Failed to parse message, ignoring.");
- break;
- }
-@@ -234,7 +225,7 @@ void server_process_native_message(
- break;
- }
-
-- if ((uint64_t) remaining < e - p + 1 + sizeof(uint64_t) + l + 1 ||
-+ if ((uint64_t) *remaining < e - p + 1 + sizeof(uint64_t) + l + 1 ||
- e[1+sizeof(uint64_t)+l] != '\n') {
- log_debug("Failed to parse message, ignoring.");
- break;
-@@ -258,13 +249,15 @@ void server_process_native_message(
- } else
- free(k);
-
-- remaining -= (e - p) + 1 + sizeof(uint64_t) + l + 1;
-+ *remaining -= (e - p) + 1 + sizeof(uint64_t) + l + 1;
- p = e + 1 + sizeof(uint64_t) + l + 1;
- }
- }
-
-- if (n <= 0)
-+ if (n <= 0) {
-+ r = 1;
- goto finish;
-+ }
-
- tn = n++;
- IOVEC_SET_STRING(iovec[tn], "_TRANSPORT=journal");
-@@ -298,13 +291,35 @@ finish:
- continue;
-
- if (iovec[j].iov_base < buffer ||
-- (const uint8_t*) iovec[j].iov_base >= (const uint8_t*) buffer + buffer_size)
-+ (const char*) iovec[j].iov_base >= p + *remaining)
- free(iovec[j].iov_base);
- }
-
- free(iovec);
- free(identifier);
- free(message);
-+
-+ return r;
-+}
-+
-+void server_process_native_message(
-+ Server *s,
-+ const void *buffer, size_t buffer_size,
-+ const struct ucred *ucred,
-+ const struct timeval *tv,
-+ const char *label, size_t label_len) {
-+
-+ int r;
-+ size_t remaining = buffer_size;
-+
-+ assert(s);
-+ assert(buffer || buffer_size == 0);
-+
-+ do {
-+ r = server_process_entry(s,
-+ (const uint8_t*) buffer + (buffer_size - remaining), &remaining,
-+ ucred, tv, label, label_len);
-+ } while (r == 0);
- }
-
- void server_process_native_file(
---
-2.13.3
-
-
-From 6a4bb8712d25a3e8e4700c7a3c6c9bd614c74d7f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Fri, 19 May 2017 11:59:47 -0400
-Subject: [PATCH 48/75] journald: process "binary" fields the same as text
- fields
-
-MESSAGE=data\n and MESSAGE\n40000000data\n are both valid serializations, so
-they should be stored in the journal. Before, MESSAGE, SYSLOG_FACILITY,
-SYSLOG_IDENTIFIER, PRIORITY, and OBJECT_PID would be only honoured if they were
-given in the first form.
-
-Fixed #5973.
-
-(cherry picked from commit 4b29a7f41fa1f418520d66362fd904a504f67c02)
----
- src/journal/journald-native.c | 120 ++++++++++++++++++++++++------------------
- 1 file changed, 70 insertions(+), 50 deletions(-)
-
-diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
-index 83250c34e..db3fdcf1d 100644
---- a/src/journal/journald-native.c
-+++ b/src/journal/journald-native.c
-@@ -81,6 +81,64 @@ static bool allow_object_pid(const struct ucred *ucred) {
- return ucred && ucred->uid == 0;
- }
-
-+static void server_process_entry_meta(
-+ const char *p, size_t l,
-+ const struct ucred *ucred,
-+ int *priority,
-+ char **identifier,
-+ char **message,
-+ pid_t *object_pid) {
-+
-+ /* We need to determine the priority of this entry for the rate limiting logic */
-+
-+ if (l == 10 &&
-+ startswith(p, "PRIORITY=") &&
-+ p[9] >= '0' && p[9] <= '9')
-+ *priority = (*priority & LOG_FACMASK) | (p[9] - '0');
-+
-+ else if (l == 17 &&
-+ startswith(p, "SYSLOG_FACILITY=") &&
-+ p[16] >= '0' && p[16] <= '9')
-+ *priority = (*priority & LOG_PRIMASK) | ((p[16] - '0') << 3);
-+
-+ else if (l == 18 &&
-+ startswith(p, "SYSLOG_FACILITY=") &&
-+ p[16] >= '0' && p[16] <= '9' &&
-+ p[17] >= '0' && p[17] <= '9')
-+ *priority = (*priority & LOG_PRIMASK) | (((p[16] - '0')*10 + (p[17] - '0')) << 3);
-+
-+ else if (l >= 19 &&
-+ startswith(p, "SYSLOG_IDENTIFIER=")) {
-+ char *t;
-+
-+ t = strndup(p + 18, l - 18);
-+ if (t) {
-+ free(*identifier);
-+ *identifier = t;
-+ }
-+
-+ } else if (l >= 8 &&
-+ startswith(p, "MESSAGE=")) {
-+ char *t;
-+
-+ t = strndup(p + 8, l - 8);
-+ if (t) {
-+ free(*message);
-+ *message = t;
-+ }
-+
-+ } else if (l > strlen("OBJECT_PID=") &&
-+ l < strlen("OBJECT_PID=") + DECIMAL_STR_MAX(pid_t) &&
-+ startswith(p, "OBJECT_PID=") &&
-+ allow_object_pid(ucred)) {
-+ char buf[DECIMAL_STR_MAX(pid_t)];
-+ memcpy(buf, p + strlen("OBJECT_PID="), l - strlen("OBJECT_PID="));
-+ buf[l-strlen("OBJECT_PID=")] = '\0';
-+
-+ (void) parse_pid(buf, object_pid);
-+ }
-+}
-+
- static int server_process_entry(
- Server *s,
- const void *buffer, size_t *remaining,
-@@ -148,62 +206,18 @@ static int server_process_entry(
-
- /* If the field name starts with an
- * underscore, skip the variable,
-- * since that indidates a trusted
-+ * since that indicates a trusted
- * field */
- iovec[n].iov_base = (char*) p;
- iovec[n].iov_len = l;
- entry_size += l;
- n++;
-
-- /* We need to determine the priority
-- * of this entry for the rate limiting
-- * logic */
-- if (l == 10 &&
-- startswith(p, "PRIORITY=") &&
-- p[9] >= '0' && p[9] <= '9')
-- priority = (priority & LOG_FACMASK) | (p[9] - '0');
--
-- else if (l == 17 &&
-- startswith(p, "SYSLOG_FACILITY=") &&
-- p[16] >= '0' && p[16] <= '9')
-- priority = (priority & LOG_PRIMASK) | ((p[16] - '0') << 3);
--
-- else if (l == 18 &&
-- startswith(p, "SYSLOG_FACILITY=") &&
-- p[16] >= '0' && p[16] <= '9' &&
-- p[17] >= '0' && p[17] <= '9')
-- priority = (priority & LOG_PRIMASK) | (((p[16] - '0')*10 + (p[17] - '0')) << 3);
--
-- else if (l >= 19 &&
-- startswith(p, "SYSLOG_IDENTIFIER=")) {
-- char *t;
--
-- t = strndup(p + 18, l - 18);
-- if (t) {
-- free(identifier);
-- identifier = t;
-- }
--
-- } else if (l >= 8 &&
-- startswith(p, "MESSAGE=")) {
-- char *t;
--
-- t = strndup(p + 8, l - 8);
-- if (t) {
-- free(message);
-- message = t;
-- }
--
-- } else if (l > strlen("OBJECT_PID=") &&
-- l < strlen("OBJECT_PID=") + DECIMAL_STR_MAX(pid_t) &&
-- startswith(p, "OBJECT_PID=") &&
-- allow_object_pid(ucred)) {
-- char buf[DECIMAL_STR_MAX(pid_t)];
-- memcpy(buf, p + strlen("OBJECT_PID="), l - strlen("OBJECT_PID="));
-- buf[l-strlen("OBJECT_PID=")] = '\0';
--
-- (void) parse_pid(buf, &object_pid);
-- }
-+ server_process_entry_meta(p, l, ucred,
-+ &priority,
-+ &identifier,
-+ &message,
-+ &object_pid);
- }
-
- *remaining -= (e - p) + 1;
-@@ -246,6 +260,12 @@ static int server_process_entry(
- iovec[n].iov_len = (e - p) + 1 + l;
- entry_size += iovec[n].iov_len;
- n++;
-+
-+ server_process_entry_meta(k, (e - p) + 1 + l, ucred,
-+ &priority,
-+ &identifier,
-+ &message,
-+ &object_pid);
- } else
- free(k);
-
---
-2.13.3
-
-
-From 68a923966fcbce01bb867108a877e9c2fa783dc9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Fri, 19 May 2017 12:52:05 -0400
-Subject: [PATCH 49/75] journald: fix trivial memleak
-
-Fixes #5516.
-
-(cherry picked from commit c6e9e16f7702188127bf8dfbac45a87f8d1a3512)
----
- src/journal/journald-server.c | 2 ++
- src/journal/journald-server.h | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
-index 6466e46cc..da85260cc 100644
---- a/src/journal/journald-server.c
-+++ b/src/journal/journald-server.c
-@@ -2177,6 +2177,8 @@ void server_done(Server *s) {
- free(s->tty_path);
- free(s->cgroup_root);
- free(s->hostname_field);
-+ free(s->runtime_storage.path);
-+ free(s->system_storage.path);
-
- if (s->mmap)
- mmap_cache_unref(s->mmap);
-diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
-index 75ac114d2..203460c50 100644
---- a/src/journal/journald-server.h
-+++ b/src/journal/journald-server.h
-@@ -61,7 +61,7 @@ typedef struct JournalStorageSpace {
-
- typedef struct JournalStorage {
- const char *name;
-- const char *path;
-+ char *path;
-
- JournalMetrics metrics;
- JournalStorageSpace space;
---
-2.13.3
-
-
-From 90c0dc446632c7b5b2ed6251e0ce94c714b5a180 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sat, 20 May 2017 19:34:50 -0400
-Subject: [PATCH 50/75] core/load-droping: avoid oom warning when the unit
- symlink is not a template
-
-unit_name_template returns -EINVAL if the unit name is not a template, but
-the code assumed that OOM is the only failure mode. Fix that to emit the warning
-if a non-template unit is encountered (because in this case we expect the name
-to match exactly), and just skip the warning on other errors (presumably oom).
-
-Fixes #5543.
-
-(cherry picked from commit e450032f0990067c0076068774162265db99d22c)
----
- src/core/load-dropin.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
-index ff3636149..3180f911b 100644
---- a/src/core/load-dropin.c
-+++ b/src/core/load-dropin.c
-@@ -38,10 +38,12 @@ static bool unit_name_compatible(const char *a, const char *b) {
- return true;
-
- r = unit_name_template(a, &prefix);
-- if (r < 0) {
-- log_oom();
-+ if (r == -EINVAL)
-+ /* not a template */
-+ return false;
-+ if (r < 0)
-+ /* oom, or some other failure. Just skip the warning. */
- return true;
-- }
-
- /* an instance name points to a target that is just the template name */
- if (streq(prefix, b))
---
-2.13.3
-
-
-From 5dd32bbe8c4cb06df63cadb7e40ecd92997f001d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Thu, 18 May 2017 20:58:23 -0400
-Subject: [PATCH 51/75] sd-login: read list of uids of sessions from UIDS not
- ACTIVE_SESSIONS
-
-As described by Luke Shumaker:
-
- sd_seat_get_sessions looks at /run/systemd/seats/${seat_name}:SESSIONS to get
- the list of sessions (which I believe is correct), and at
- /run/systemd/seats/${seat_name}:ACTIVE_SESSIONS for the list of users (which
- I believe is incorrect); I believe that it should look at the UIDS field for
- the list of users. As far as I can tell, the ACTIVE_SESSIONS field is never
- even present in the seats file. I also believe that this has been broken
- since the function was first committed almost 6 years ago.
-
-Fixes #5743.
-
-(cherry picked from commit d3cfab3148de482649e22d9dbbfec6e967a80856)
----
- src/libsystemd/sd-login/sd-login.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c
-index d2cfbdf5b..cdbdc3785 100644
---- a/src/libsystemd/sd-login/sd-login.c
-+++ b/src/libsystemd/sd-login/sd-login.c
-@@ -687,7 +687,7 @@ _public_ int sd_seat_get_sessions(const char *seat, char ***sessions, uid_t **ui
-
- r = parse_env_file(p, NEWLINE,
- "SESSIONS", &s,
-- "ACTIVE_SESSIONS", &t,
-+ "UIDS", &t,
- NULL);
- if (r == -ENOENT)
- return -ENXIO;
---
-2.13.3
-
-
-From 557d5e9fecff500b010a9be44dda1ae000f45039 Mon Sep 17 00:00:00 2001
-From: Matthias Greiner <magreiner@users.noreply.github.com>
-Date: Mon, 22 May 2017 03:11:25 +0200
-Subject: [PATCH 52/75] Allow bad MTU values with warning to be able to connect
- to the machine. (#5954)
-
-Ensure the MTU value is valid. Emit a warning and ignore otherwise.
-
-(cherry picked from commit 955d99edc7991386a36e3d33924cc584931fde91)
----
- src/libsystemd-network/sd-dhcp-lease.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
-index 7fed55c5f..565ec4cbe 100644
---- a/src/libsystemd-network/sd-dhcp-lease.c
-+++ b/src/libsystemd-network/sd-dhcp-lease.c
-@@ -594,6 +594,11 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void
- r = lease_parse_u16(option, len, &lease->mtu, 68);
- if (r < 0)
- log_debug_errno(r, "Failed to parse MTU, ignoring: %m");
-+ if (lease->mtu < DHCP_DEFAULT_MIN_SIZE) {
-+ log_warning("MTU value of %d too small. Using default MTU value of %d instead.", lease->mtu, DHCP_DEFAULT_MIN_SIZE);
-+ lease->mtu = DHCP_DEFAULT_MIN_SIZE;
-+ }
-+
- break;
-
- case SD_DHCP_OPTION_DOMAIN_NAME:
---
-2.13.3
-
-
-From a530427e4eaf7ca69f223a86173ec37c282a34f9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sat, 13 May 2017 11:24:37 -0400
-Subject: [PATCH 53/75] tree-wide: fix incorrect uses of %m
-
-In those cases errno was not set, so we would be logging some unrelated error
-or "Success".
-
-(cherry picked from commit 35bca925f9bf78df3f64e321ab4830936fcef662)
----
- src/import/import-raw.c | 4 ++--
- src/import/import-tar.c | 4 ++--
- src/libsystemd/sd-bus/test-bus-objects.c | 2 --
- src/nspawn/nspawn.c | 2 +-
- src/stdio-bridge/stdio-bridge.c | 4 ++--
- src/test/test-loopback.c | 2 +-
- 6 files changed, 8 insertions(+), 10 deletions(-)
-
-diff --git a/src/import/import-raw.c b/src/import/import-raw.c
-index 808eae38f..55cf8e8ed 100644
---- a/src/import/import-raw.c
-+++ b/src/import/import-raw.c
-@@ -355,7 +355,7 @@ static int raw_import_process(RawImport *i) {
- }
- if (l == 0) {
- if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
-- log_error("Premature end of file: %m");
-+ log_error("Premature end of file.");
- r = -EIO;
- goto finish;
- }
-@@ -369,7 +369,7 @@ static int raw_import_process(RawImport *i) {
- if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
- r = import_uncompress_detect(&i->compress, i->buffer, i->buffer_size);
- if (r < 0) {
-- log_error("Failed to detect file compression: %m");
-+ log_error_errno(r, "Failed to detect file compression: %m");
- goto finish;
- }
- if (r == 0) /* Need more data */
-diff --git a/src/import/import-tar.c b/src/import/import-tar.c
-index 1c229ec82..ba140bccb 100644
---- a/src/import/import-tar.c
-+++ b/src/import/import-tar.c
-@@ -284,7 +284,7 @@ static int tar_import_process(TarImport *i) {
- }
- if (l == 0) {
- if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
-- log_error("Premature end of file: %m");
-+ log_error("Premature end of file.");
- r = -EIO;
- goto finish;
- }
-@@ -298,7 +298,7 @@ static int tar_import_process(TarImport *i) {
- if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
- r = import_uncompress_detect(&i->compress, i->buffer, i->buffer_size);
- if (r < 0) {
-- log_error("Failed to detect file compression: %m");
-+ log_error_errno(r, "Failed to detect file compression: %m");
- goto finish;
- }
- if (r == 0) /* Need more data */
-diff --git a/src/libsystemd/sd-bus/test-bus-objects.c b/src/libsystemd/sd-bus/test-bus-objects.c
-index 233a21a52..0b33ab7a3 100644
---- a/src/libsystemd/sd-bus/test-bus-objects.c
-+++ b/src/libsystemd/sd-bus/test-bus-objects.c
-@@ -525,8 +525,6 @@ int main(int argc, char *argv[]) {
- void *p;
- int r, q;
-
-- zero(c);
--
- c.automatic_integer_property = 4711;
- assert_se(c.automatic_string_property = strdup("dudeldu"));
-
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 1fc0501c2..236c0f314 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -2012,7 +2012,7 @@ static int determine_names(void) {
- if (r < 0)
- return log_error_errno(r, "Failed to find image for machine '%s': %m", arg_machine);
- if (r == 0) {
-- log_error("No image for machine '%s': %m", arg_machine);
-+ log_error("No image for machine '%s'.", arg_machine);
- return -ENOENT;
- }
-
-diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c
-index ce8efce3d..02ba5269d 100644
---- a/src/stdio-bridge/stdio-bridge.c
-+++ b/src/stdio-bridge/stdio-bridge.c
-@@ -115,7 +115,7 @@ int main(int argc, char *argv[]) {
- in_fd = SD_LISTEN_FDS_START;
- out_fd = SD_LISTEN_FDS_START;
- } else {
-- log_error("Illegal number of file descriptors passed\n");
-+ log_error("Illegal number of file descriptors passed.");
- goto finish;
- }
-
-@@ -190,7 +190,7 @@ int main(int argc, char *argv[]) {
- }
-
- for (;;) {
-- _cleanup_(sd_bus_message_unrefp)sd_bus_message *m = NULL;
-+ _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- int events_a, events_b, fd;
- uint64_t timeout_a, timeout_b, t;
- struct timespec _ts, *ts;
-diff --git a/src/test/test-loopback.c b/src/test/test-loopback.c
-index 7b6733733..8ebd0e0e0 100644
---- a/src/test/test-loopback.c
-+++ b/src/test/test-loopback.c
-@@ -31,7 +31,7 @@ int main(int argc, char* argv[]) {
-
- r = loopback_setup();
- if (r < 0)
-- log_error("loopback: %m");
-+ log_error_errno(r, "loopback: %m");
-
- return r >= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
- }
---
-2.13.3
-
-
-From b2d91572a13de1cf5bdf78c3926b50cacc8a5dd3 Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Mon, 22 May 2017 14:38:01 +0200
-Subject: [PATCH 54/75] sd-dhcp: library code shouldn't log above LOG_DEBUG
- (#6001)
-
-Let's downgrade the warning introduced by
-955d99edc7991386a36e3d33924cc584931fde91 to debug, as we really
-shouldn't log at more than debug level from library code.
-
-(And while we are at it, print the MTU as the right (unsigned) type in
-the format string.)
-(cherry picked from commit 4dd53da97daf3f064149380b6ca9e53273d77d88)
----
- src/libsystemd-network/sd-dhcp-lease.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
-index 565ec4cbe..13dc6e438 100644
---- a/src/libsystemd-network/sd-dhcp-lease.c
-+++ b/src/libsystemd-network/sd-dhcp-lease.c
-@@ -595,7 +595,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void
- if (r < 0)
- log_debug_errno(r, "Failed to parse MTU, ignoring: %m");
- if (lease->mtu < DHCP_DEFAULT_MIN_SIZE) {
-- log_warning("MTU value of %d too small. Using default MTU value of %d instead.", lease->mtu, DHCP_DEFAULT_MIN_SIZE);
-+ log_debug("MTU value of %" PRIu16 " too small. Using default MTU value of %d instead.", lease->mtu, DHCP_DEFAULT_MIN_SIZE);
- lease->mtu = DHCP_DEFAULT_MIN_SIZE;
- }
-
---
-2.13.3
-
-
-From 3aeb9ea17c3f3d84077c3bb2367835d96fd57432 Mon Sep 17 00:00:00 2001
-From: sjoerd-ccu <sjoerd.simons@collabora.co.uk>
-Date: Tue, 23 May 2017 09:10:59 +0200
-Subject: [PATCH 55/75] networkd-link: Receive LLDP on Bridge slaves not master
- (#5995)
-
-LLDP should be received on bridge slaves as they're the entities
-directly connected to a peer. Receiving LLDP on the bridge device makes
-little sense, Linux by default even filters out LLDP going onto the
-bridge device.
-
-Flip the current logic, receive LLDP on bridge slaves don't listen for
-them on the bridge itself.
-(cherry picked from commit 764febc23ee9a22fa64981adb0be901f964df93d)
----
- src/network/networkd-link.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
-index c37bc7f60..b1282931f 100644
---- a/src/network/networkd-link.c
-+++ b/src/network/networkd-link.c
-@@ -131,7 +131,10 @@ static bool link_lldp_rx_enabled(Link *link) {
- if (!link->network)
- return false;
-
-- if (link->network->bridge)
-+ /* LLDP should be handled on bridge slaves as those have a direct
-+ * connection to their peers not on the bridge master. Linux doesn't
-+ * even (by default) forward lldp packets to the bridge master.*/
-+ if (streq_ptr("bridge", link->kind))
- return false;
-
- return link->network->lldp_mode != LLDP_MODE_NO;
---
-2.13.3
-
-
-From 2d148f574c5c1e8bf7bf7da964e0f063395d42c8 Mon Sep 17 00:00:00 2001
-From: tomty89 <tom.ty89@gmail.com>
-Date: Tue, 23 May 2017 15:41:36 +0800
-Subject: [PATCH 56/75] nspawn: add nosuid and nodev to /tmp mount (#6004)
-
-When automatic /tmp mount was introduced to nspawn in v219, it was done without having the nosuid and nodev mount options, which was the same case as systemd's default tmp.mount unit back then.
-
-nosuid and nodev was added to tmp.mount(.m4) in v231 for security reasons. matching the nspawn /tmp mount entry against that.
-
-Ref.:
-https://github.com/systemd/systemd/commit/2f9df7c96a25adb42093ee3ee201577f3e01da42
-https://github.com/systemd/systemd/commit/bbb99c30d01a8bcdc27fb151cc6376a7877a6b07
-(cherry picked from commit e8a94ce83ebc5e5fa0dd312d8340d589506528f9)
----
- src/nspawn/nspawn-mount.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c
-index d27699412..ac7290732 100644
---- a/src/nspawn/nspawn-mount.c
-+++ b/src/nspawn/nspawn-mount.c
-@@ -552,7 +552,7 @@ int mount_all(const char *dest,
- { NULL, "/proc/sysrq-trigger", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* ... then, make it r/o */
-
- /* outer child mounts */
-- { "tmpfs", "/tmp", "tmpfs", "mode=1777", MS_STRICTATIME, MOUNT_FATAL },
-+ { "tmpfs", "/tmp", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, MOUNT_FATAL },
- { "tmpfs", "/sys", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL|MOUNT_APPLY_APIVFS_NETNS },
- { "sysfs", "/sys", "sysfs", NULL, MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL|MOUNT_APPLY_APIVFS_RO }, /* skipped if above was mounted */
- { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL }, /* skipped if above was mounted */
---
-2.13.3
-
-
-From a28e8d4e77d1bbca7f0b13c6a2eebc4883ba1123 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neil@brown.name>
-Date: Tue, 23 May 2017 17:42:26 +1000
-Subject: [PATCH 57/75] Allow TimeoutSec=0 to work as documented in mount units
- and elsewhere (#6013)
-
-Since commit 36c16a7cdd6c ("core: rework unit timeout handling, and add
-new setting RuntimeMaxSec=") TimeoutSec=0 in mount units has
-cause the mount to timeout immediately instead of never as documented.
-
-There is a similar problem with Socket.TimeoutSec and Swap.TimeoutSec.
-
-These are easily fixed using config_parse_sec_fix_0().
-
-Automount.TimeoutIdleSec looks like it could have the same problem,
-but doesn't because the kernel treats '0' as 'no timeout'.
-It handle USEC_INFINITY correctly only because that constant has
-the value '-1', and when round up, it becomes zero.
-To avoid possible confusion, use config_parse_sec_fix_0() as well, and
-explicitly handle USEC_INFINITY.
-(cherry picked from commit 2d79a0bbb9f651656384a0a86ed814e6306fb5dd)
----
- src/core/automount.c | 7 +++++--
- src/core/load-fragment-gperf.gperf.m4 | 8 ++++----
- 2 files changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/src/core/automount.c b/src/core/automount.c
-index 99e804762..ccc113b59 100644
---- a/src/core/automount.c
-+++ b/src/core/automount.c
-@@ -415,8 +415,11 @@ static int autofs_set_timeout(int dev_autofs_fd, int ioctl_fd, usec_t usec) {
- init_autofs_dev_ioctl(&param);
- param.ioctlfd = ioctl_fd;
-
-- /* Convert to seconds, rounding up. */
-- param.timeout.timeout = (usec + USEC_PER_SEC - 1) / USEC_PER_SEC;
-+ if (usec == USEC_INFINITY)
-+ param.timeout.timeout = 0;
-+ else
-+ /* Convert to seconds, rounding up. */
-+ param.timeout.timeout = (usec + USEC_PER_SEC - 1) / USEC_PER_SEC;
-
- if (ioctl(dev_autofs_fd, AUTOFS_DEV_IOCTL_TIMEOUT, &param) < 0)
- return -errno;
-diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
-index cb9e6fea2..3f7cbaa0d 100644
---- a/src/core/load-fragment-gperf.gperf.m4
-+++ b/src/core/load-fragment-gperf.gperf.m4
-@@ -298,7 +298,7 @@ Socket.ExecStartPre, config_parse_exec, SOCKET_EXEC
- Socket.ExecStartPost, config_parse_exec, SOCKET_EXEC_START_POST, offsetof(Socket, exec_command)
- Socket.ExecStopPre, config_parse_exec, SOCKET_EXEC_STOP_PRE, offsetof(Socket, exec_command)
- Socket.ExecStopPost, config_parse_exec, SOCKET_EXEC_STOP_POST, offsetof(Socket, exec_command)
--Socket.TimeoutSec, config_parse_sec, 0, offsetof(Socket, timeout_usec)
-+Socket.TimeoutSec, config_parse_sec_fix_0, 0, offsetof(Socket, timeout_usec)
- Socket.SocketUser, config_parse_user_group, 0, offsetof(Socket, user)
- Socket.SocketGroup, config_parse_user_group, 0, offsetof(Socket, group)
- Socket.SocketMode, config_parse_mode, 0, offsetof(Socket, socket_mode)
-@@ -362,7 +362,7 @@ Mount.What, config_parse_unit_string_printf, 0,
- Mount.Where, config_parse_path, 0, offsetof(Mount, where)
- Mount.Options, config_parse_unit_string_printf, 0, offsetof(Mount, parameters_fragment.options)
- Mount.Type, config_parse_string, 0, offsetof(Mount, parameters_fragment.fstype)
--Mount.TimeoutSec, config_parse_sec, 0, offsetof(Mount, timeout_usec)
-+Mount.TimeoutSec, config_parse_sec_fix_0, 0, offsetof(Mount, timeout_usec)
- Mount.DirectoryMode, config_parse_mode, 0, offsetof(Mount, directory_mode)
- Mount.SloppyOptions, config_parse_bool, 0, offsetof(Mount, sloppy_options)
- Mount.LazyUnmount, config_parse_bool, 0, offsetof(Mount, lazy_unmount)
-@@ -373,12 +373,12 @@ KILL_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
- m4_dnl
- Automount.Where, config_parse_path, 0, offsetof(Automount, where)
- Automount.DirectoryMode, config_parse_mode, 0, offsetof(Automount, directory_mode)
--Automount.TimeoutIdleSec, config_parse_sec, 0, offsetof(Automount, timeout_idle_usec)
-+Automount.TimeoutIdleSec, config_parse_sec_fix_0, 0, offsetof(Automount, timeout_idle_usec)
- m4_dnl
- Swap.What, config_parse_path, 0, offsetof(Swap, parameters_fragment.what)
- Swap.Priority, config_parse_int, 0, offsetof(Swap, parameters_fragment.priority)
- Swap.Options, config_parse_unit_string_printf, 0, offsetof(Swap, parameters_fragment.options)
--Swap.TimeoutSec, config_parse_sec, 0, offsetof(Swap, timeout_usec)
-+Swap.TimeoutSec, config_parse_sec_fix_0, 0, offsetof(Swap, timeout_usec)
- EXEC_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
- CGROUP_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
- KILL_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
---
-2.13.3
-
-
-From cb58341c27c8a28f43245e2846360226a0605b14 Mon Sep 17 00:00:00 2001
-From: Evgeny Vereshchagin <evvers@ya.ru>
-Date: Wed, 24 May 2017 08:56:48 +0300
-Subject: [PATCH 58/75] resolved: bugfix of null pointer p->question
- dereferencing (#6020)
-
-See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
-(cherry picked from commit a924f43f30f9c4acaf70618dd2a055f8b0f166be)
----
- src/resolve/resolved-dns-packet.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
-index 652970284..240ee448f 100644
---- a/src/resolve/resolved-dns-packet.c
-+++ b/src/resolve/resolved-dns-packet.c
-@@ -2269,6 +2269,9 @@ int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key) {
- if (r < 0)
- return r;
-
-+ if (!p->question)
-+ return 0;
-+
- if (p->question->n_keys != 1)
- return 0;
-
---
-2.13.3
-
-
-From 57497d1f0367e4418c7c5e419ba0f911ad840ce9 Mon Sep 17 00:00:00 2001
-From: Daniel Wang <wonderfly@users.noreply.github.com>
-Date: Wed, 24 May 2017 05:05:49 -0700
-Subject: [PATCH 59/75] DHCP: Fail link_dhcp_set_routes promotely if no address
- is assigned from lease (#6009)
-
-Currently the local variable `address` is unintialized if the DHCP lease
-doesn't provide a router address (when r == -ENODATA). Thus the
-subsequent call to route_scope_from_address will result in accessing an
-unintialized variable.
-
-As a matter of fact, sd-dhcp-client ignores DHCP leases without an
-address so link_dhcp_set_routes probably will never be called without a
-valid address.
-(cherry picked from commit b23aec0d6b98bc99998786506a8769e1a1ea1841)
----
- src/network/networkd-dhcp4.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
-index ae0f78daa..9229b5753 100644
---- a/src/network/networkd-dhcp4.c
-+++ b/src/network/networkd-dhcp4.c
-@@ -77,6 +77,10 @@ static int link_set_dhcp_routes(Link *link) {
- if (!link->network->dhcp_use_routes)
- return 0;
-
-+ r = sd_dhcp_lease_get_address(link->dhcp_lease, &address);
-+ if (r < 0)
-+ return log_link_warning_errno(link, r, "DHCP error: could not get address: %m");
-+
- r = sd_dhcp_lease_get_router(link->dhcp_lease, &gateway);
- if (r < 0 && r != -ENODATA)
- return log_link_warning_errno(link, r, "DHCP error: could not get gateway: %m");
-@@ -85,10 +89,6 @@ static int link_set_dhcp_routes(Link *link) {
- _cleanup_route_free_ Route *route = NULL;
- _cleanup_route_free_ Route *route_gw = NULL;
-
-- r = sd_dhcp_lease_get_address(link->dhcp_lease, &address);
-- if (r < 0)
-- return log_link_warning_errno(link, r, "DHCP error: could not get address: %m");
--
- r = route_new(&route);
- if (r < 0)
- return log_link_error_errno(link, r, "Could not allocate route: %m");
---
-2.13.3
-
-
-From fff58beb5618e6cabdf716418de7e5976ed8d87f Mon Sep 17 00:00:00 2001
-From: Michael Biebl <biebl@debian.org>
-Date: Sun, 21 May 2017 03:22:43 +0200
-Subject: [PATCH 60/75] timesyncd: don't use compiled-in list if FallbackNTP
- has been configured explicitly
-
-Parse the config files first and only apply the compiled-in list of
-fallback servers if no NTP server was configured via FallbackNTP.
-
-Closes: #5091
-(cherry picked from commit 3745770ae4dcf262707882a38f6c5ba2684329a3)
----
- src/timesync/timesyncd-conf.c | 10 ++++++++++
- src/timesync/timesyncd-conf.h | 1 +
- src/timesync/timesyncd-manager.c | 4 ----
- src/timesync/timesyncd-manager.h | 2 ++
- src/timesync/timesyncd.c | 2 ++
- 5 files changed, 15 insertions(+), 4 deletions(-)
-
-diff --git a/src/timesync/timesyncd-conf.c b/src/timesync/timesyncd-conf.c
-index bf25b112e..b4a4f1997 100644
---- a/src/timesync/timesyncd-conf.c
-+++ b/src/timesync/timesyncd-conf.c
-@@ -34,6 +34,9 @@ int manager_parse_server_string(Manager *m, ServerType type, const char *string)
-
- first = type == SERVER_FALLBACK ? m->fallback_servers : m->system_servers;
-
-+ if (type == SERVER_FALLBACK)
-+ m->have_fallbacks = true;
-+
- for (;;) {
- _cleanup_free_ char *word = NULL;
- bool found = false;
-@@ -63,6 +66,13 @@ int manager_parse_server_string(Manager *m, ServerType type, const char *string)
- return 0;
- }
-
-+int manager_parse_fallback_string(Manager *m, const char *string) {
-+ if (m->have_fallbacks)
-+ return 0;
-+
-+ return manager_parse_server_string(m, SERVER_FALLBACK, string);
-+}
-+
- int config_parse_servers(
- const char *unit,
- const char *filename,
-diff --git a/src/timesync/timesyncd-conf.h b/src/timesync/timesyncd-conf.h
-index 0280697e9..0c4b44e70 100644
---- a/src/timesync/timesyncd-conf.h
-+++ b/src/timesync/timesyncd-conf.h
-@@ -29,3 +29,4 @@ int manager_parse_server_string(Manager *m, ServerType type, const char *string)
- int config_parse_servers(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-
- int manager_parse_config_file(Manager *m);
-+int manager_parse_fallback_string(Manager *m, const char *string);
-diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
-index ae8514550..a24c821bd 100644
---- a/src/timesync/timesyncd-manager.c
-+++ b/src/timesync/timesyncd-manager.c
-@@ -1124,10 +1124,6 @@ int manager_new(Manager **ret) {
-
- RATELIMIT_INIT(m->ratelimit, RATELIMIT_INTERVAL_USEC, RATELIMIT_BURST);
-
-- r = manager_parse_server_string(m, SERVER_FALLBACK, NTP_SERVERS);
-- if (r < 0)
-- return r;
--
- r = sd_event_default(&m->event);
- if (r < 0)
- return r;
-diff --git a/src/timesync/timesyncd-manager.h b/src/timesync/timesyncd-manager.h
-index efe3e60d3..cf681f609 100644
---- a/src/timesync/timesyncd-manager.h
-+++ b/src/timesync/timesyncd-manager.h
-@@ -38,6 +38,8 @@ struct Manager {
- LIST_HEAD(ServerName, link_servers);
- LIST_HEAD(ServerName, fallback_servers);
-
-+ bool have_fallbacks:1;
-+
- RateLimit ratelimit;
- bool exhausted_servers;
-
-diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
-index b67d672a6..052329f61 100644
---- a/src/timesync/timesyncd.c
-+++ b/src/timesync/timesyncd.c
-@@ -132,6 +132,8 @@ int main(int argc, char *argv[]) {
- if (r < 0)
- log_warning_errno(r, "Failed to parse configuration file: %m");
-
-+ assert_se(manager_parse_fallback_string(m, NTP_SERVERS) >= 0);
-+
- log_debug("systemd-timesyncd running as pid " PID_FMT, getpid());
- sd_notify(false,
- "READY=1\n"
---
-2.13.3
-
-
-From d7215ee47b09ca190b2eadfe3af71f810cd94418 Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Tue, 30 May 2017 14:49:35 +0200
-Subject: [PATCH 61/75] timesyncd: properly handle OOM errors when parsing
- fallback servers (#6047)
-
-(cherry picked from commit c4c069121cbd5f882ef2e7effba5cdd3673c0a1f)
----
- src/timesync/timesyncd.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
-index 052329f61..ff90f0407 100644
---- a/src/timesync/timesyncd.c
-+++ b/src/timesync/timesyncd.c
-@@ -132,7 +132,11 @@ int main(int argc, char *argv[]) {
- if (r < 0)
- log_warning_errno(r, "Failed to parse configuration file: %m");
-
-- assert_se(manager_parse_fallback_string(m, NTP_SERVERS) >= 0);
-+ r = manager_parse_fallback_string(m, NTP_SERVERS);
-+ if (r < 0) {
-+ log_error_errno(r, "Failed to parse fallback server strings: %m");
-+ goto finish;
-+ }
-
- log_debug("systemd-timesyncd running as pid " PID_FMT, getpid());
- sd_notify(false,
---
-2.13.3
-
-
-From 3d1922335f63c10b50527f210c05e039a51f69de Mon Sep 17 00:00:00 2001
-From: George McCollister <george.mccollister@gmail.com>
-Date: Thu, 25 May 2017 21:13:50 -0500
-Subject: [PATCH 62/75] rules: Handle MMC boot partitions by-path correctly
- (#6026)
-
-Many eMMC devices have separate boot partitions that aren't part of the
-normal partition table that show up as /dev/mmcblk[0-9]boot[0-9]. These
-partitions are generally small (128KB to 16MB) and typically hold a boot
-loader, boot loader data or a recovery image. Match these and create
--boot%n by-path symlinks.
-
-Prior to this change by-path symlinks for the main device would be
-incorrectly linked to one of the boot partitions.
-
-For instance before:
-/dev/disk/by-path/platform-219c000.usdhc linked to /dev/mmcblk1boot1
-
-Now:
-/dev/disk/by-path/platform-219c000.usdhc links to /dev/mmcblk1
-/dev/disk/by-path/platform-219c000.usdhc-boot0 links to /dev/mmcblk1boot0
-/dev/disk/by-path/platform-219c000.usdhc-boot1 links to /dev/mmcblk1boot1
-
-On systems that support multiple SD/MMC devices it can be essential to
-have by-path links to these devices since device names vary depending on
-which other devices are connected.
-(cherry picked from commit 4e3f07029ad7b86773ce85db422bbce95ac578cf)
----
- rules/60-persistent-storage.rules | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
-index 9817e9c64..d2745f65f 100644
---- a/rules/60-persistent-storage.rules
-+++ b/rules/60-persistent-storage.rules
-@@ -64,7 +64,8 @@ KERNEL=="msblk[0-9]p[0-9]|mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}
-
- # by-path
- ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id"
--ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
-+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-boot%n"
-+KERNEL!="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
- ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
-
- # legacy virtio-pci by-path links (deprecated)
---
-2.13.3
-
-
-From 3d3190669482604d552250259654573c6fb01deb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Wed, 24 May 2017 23:25:10 -0400
-Subject: [PATCH 63/75] vconsole-setup: add more log messages
-
-This makes it quite a bit easier to see what failed.
-
-strv_join is called inline in log_debug so that it is under the conditional
-that kills the whole thing if debugging is disabled.
-
-(cherry picked from commit 3d62378088593a7868d58b840ef5ca25dd357339)
----
- src/vconsole/vconsole-setup.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
-index a0ab5990f..2401077be 100644
---- a/src/vconsole/vconsole-setup.c
-+++ b/src/vconsole/vconsole-setup.c
-@@ -41,6 +41,7 @@
- #include "signal-util.h"
- #include "stdio-util.h"
- #include "string-util.h"
-+#include "strv.h"
- #include "terminal-util.h"
- #include "util.h"
- #include "virt.h"
-@@ -124,6 +125,7 @@ static int toggle_utf8_sysfs(bool utf8) {
- }
-
- static int keyboard_load_and_wait(const char *vc, const char *map, const char *map_toggle, bool utf8) {
-+ _cleanup_free_ char *cmd = NULL;
- const char *args[8];
- int i = 0;
- pid_t pid;
-@@ -143,6 +145,9 @@ static int keyboard_load_and_wait(const char *vc, const char *map, const char *m
- args[i++] = map_toggle;
- args[i++] = NULL;
-
-+ log_debug("Executing \"%s\"...",
-+ strnull((cmd = strv_join((char**) args, " "))));
-+
- pid = fork();
- if (pid < 0)
- return log_error_errno(errno, "Failed to fork: %m");
-@@ -159,6 +164,7 @@ static int keyboard_load_and_wait(const char *vc, const char *map, const char *m
- }
-
- static int font_load_and_wait(const char *vc, const char *font, const char *map, const char *unimap) {
-+ _cleanup_free_ char *cmd = NULL;
- const char *args[9];
- int i = 0;
- pid_t pid;
-@@ -182,6 +188,9 @@ static int font_load_and_wait(const char *vc, const char *font, const char *map,
- args[i++] = font;
- args[i++] = NULL;
-
-+ log_debug("Executing \"%s\"...",
-+ strnull((cmd = strv_join((char**) args, " "))));
-+
- pid = fork();
- if (pid < 0)
- return log_error_errno(errno, "Failed to fork: %m");
---
-2.13.3
-
-
-From d80b4dbf2c0d91ad54c2c0a0296096293ed59b39 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Wed, 24 May 2017 23:25:44 -0400
-Subject: [PATCH 64/75] vconsole-setup: skip setting fonts when setfont returns
- EX_OSERR
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-On a machine without a VGA console, /dev/tty{0,1,…} exist, so
-systemd-vconsole-setup is started, but all setfont operations fail.
-
-setfont has a bunch of return codes for different failure modes. It uses
-EX_OSERR when the communication with the kernel using ioctls fails. This isn't
-too specific, but at least it's only used this general class of errors. Let's
-swallow the error in this case to avoid systemd-vconsole-setup.service failing
-on cloud vms.
-
-On a machine from https://bugzilla.redhat.com/show_bug.cgi?id=1272686#c4:
-$ build/systemd-vconsole-setup
-setfont: putfont: 512,8x16: failed: -1
-putfont: PIO_FONT: Invalid argument
-/usr/bin/setfont failed with error code 71.
-Setting fonts failed with a "system error", ignoring.
-
-$ SYSTEMD_LOG_LEVEL=debug build/systemd-vconsole-setup
-Found container virtualization none.
-Sysfs UTF-8 flag enabled
-UTF-8 kbdmode enabled on /dev/tty0
-Executing "/usr/bin/setfont -C /dev/tty0 eurlatgr"...
-setfont: putfont: 512,8x16: failed: -1
-putfont: PIO_FONT: Invalid argument
-/usr/bin/setfont failed with error code 71.
-Executing "/usr/bin/loadkeys -q -C /dev/tty0 -u us"...
-/usr/bin/loadkeys succeeded.
-Setting fonts failed with a "system error", ignoring.
-
-$ lspci | grep -i vga
-
-$ ls /dev/tty?
-/dev/tty0 /dev/tty2 /dev/tty4 /dev/tty6 /dev/tty8
-/dev/tty1 /dev/tty3 /dev/tty5 /dev/tty7 /dev/tty9
-
-If we have a better test for /dev/tty? being connected to something that has a
-font, we could avoid running setfont at all… ATM, I'm not aware of a simple
-test like that.
-
-(cherry picked from commit 93c9a9d235e2304500c490b4868534385f925c76)
----
- src/vconsole/vconsole-setup.c | 19 ++++++++++++-------
- 1 file changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
-index 2401077be..dc63bb530 100644
---- a/src/vconsole/vconsole-setup.c
-+++ b/src/vconsole/vconsole-setup.c
-@@ -28,6 +28,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/ioctl.h>
-+#include <sysexits.h>
- #include <termios.h>
- #include <unistd.h>
-
-@@ -336,8 +337,8 @@ int main(int argc, char **argv) {
- *vc_keymap = NULL, *vc_keymap_toggle = NULL,
- *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL;
- _cleanup_close_ int fd = -1;
-- bool utf8, font_copy = false, font_ok, keyboard_ok;
-- int r = EXIT_FAILURE;
-+ bool utf8, font_copy = false, keyboard_ok;
-+ int r;
-
- log_set_target(LOG_TARGET_AUTO);
- log_parse_environment();
-@@ -382,7 +383,6 @@ int main(int argc, char **argv) {
- "FONT_MAP", &vc_font_map,
- "FONT_UNIMAP", &vc_font_unimap,
- NULL);
--
- if (r < 0 && r != -ENOENT)
- log_warning_errno(r, "Failed to read /etc/vconsole.conf: %m");
-
-@@ -399,22 +399,27 @@ int main(int argc, char **argv) {
- "vconsole.font.map", &vc_font_map,
- "vconsole.font.unimap", &vc_font_unimap,
- NULL);
--
- if (r < 0 && r != -ENOENT)
- log_warning_errno(r, "Failed to read /proc/cmdline: %m");
- }
-
- toggle_utf8_sysfs(utf8);
- toggle_utf8(vc, fd, utf8);
-- font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) == 0;
-+
-+ r = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap);
- keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8) == 0;
-
- if (font_copy) {
-- if (font_ok)
-+ if (r == 0)
- setup_remaining_vcs(fd, utf8);
-+ else if (r == EX_OSERR)
-+ /* setfont returns EX_OSERR when ioctl(KDFONTOP/PIO_FONTX/PIO_FONTX) fails.
-+ * This might mean various things, but in particular lack of a graphical
-+ * console. Let's be generous and not treat this as an error. */
-+ log_notice("Setting fonts failed with a \"system error\", ignoring.");
- else
- log_warning("Setting source virtual console failed, ignoring remaining ones");
- }
-
-- return font_ok && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;
-+ return IN_SET(r, 0, EX_OSERR) && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;
- }
---
-2.13.3
-
-
-From 16f48ba5c9c432bc9daa215ceadbe739be1a1928 Mon Sep 17 00:00:00 2001
-From: Lucas Werkmeister <mail@lucaswerkmeister.de>
-Date: Mon, 29 May 2017 15:01:01 +0200
-Subject: [PATCH 65/75] shell-completion: add systemctl revert (#6042)
-
-The `systemctl revert` command was added in v230 (commit 344ca7556b),
-but was missing from the shell completion specifications.
-
-Fixes #5978.
-(cherry picked from commit 0f8158bd26ded859ffcca70c4750939800ea6c51)
----
- shell-completion/bash/systemctl.in | 2 +-
- shell-completion/zsh/_systemctl.in | 3 ++-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
-index e4ccad879..3e553c1e6 100644
---- a/shell-completion/bash/systemctl.in
-+++ b/shell-completion/bash/systemctl.in
-@@ -189,7 +189,7 @@ _systemctl () {
- fi
-
- local -A VERBS=(
-- [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit set-property'
-+ [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit set-property revert'
- [ENABLED_UNITS]='disable'
- [DISABLED_UNITS]='enable'
- [REENABLABLE_UNITS]='reenable'
-diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
-index 92a56ba99..7d3d47bef 100644
---- a/shell-completion/zsh/_systemctl.in
-+++ b/shell-completion/zsh/_systemctl.in
-@@ -58,6 +58,7 @@
- "kexec:Shut down and reboot the system with kexec"
- "exit:Ask for user instance termination"
- "switch-root:Change root directory"
-+ "revert:Revert unit files to their vendor versions"
- )
-
- if (( CURRENT == 1 )); then
-@@ -157,7 +158,7 @@ _systemctl_unit_state() { typeset -gA _sys_unit_state; _sys_unit_state=( $(__sys
-
- local fun
- # Completion functions for ALL_UNITS
--for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit ; do
-+for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit revert ; do
- (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
- {
- _systemctl_really_all_units
---
-2.13.3
-
-
-From d6bc07b87a56804a8bc063c16ee0106cdb86f72d Mon Sep 17 00:00:00 2001
-From: kjackiewicz <kjackiewicz@users.noreply.github.com>
-Date: Tue, 30 May 2017 15:19:03 +0200
-Subject: [PATCH 66/75] rules: watch metadata changes in mmcblk devices (#6050)
-
-Formatting sd-cards does not trigger "change" uevents. As a result clients
-using udev API don't get any updates afterwards and get outdated information
-about the device.
-
-Include mmcblk* in a match for watch option assignment.
-(cherry picked from commit e74d0a9a5cdd8562aeaab1994ebd9c4cd07e82c3)
----
- rules/60-block.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rules/60-block.rules b/rules/60-block.rules
-index 42c75974a..343fc06f8 100644
---- a/rules/60-block.rules
-+++ b/rules/60-block.rules
-@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
- ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
-
- # watch metadata changes, caused by tools closing the device node which was opened for writing
--ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*", OPTIONS+="watch"
-+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch"
---
-2.13.3
-
-
-From 59cf3f439d358163d895093bb8adfbe1db650131 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Tue, 30 May 2017 23:14:31 -0400
-Subject: [PATCH 67/75] systemctl: avoid spurious warning about missing
- reboot-param file
-
-$ reboot -f
-Failed to read reboot parameter file: No such file or directory
-
-It seems that the warning on ENOENT was inadvertently introduced in
-27c06cb516c3b87c34f2a1c2c227152997d05c8c.
-
-The warning reported in #5646 comes from systemctl, but let's fix the other
-call site in the same way too.
-
-Fixes #5646.
-
-(cherry picked from commit 19fbf49cdec0e12fa0ee13d6ff6f858ea0f27479)
----
- src/core/shutdown.c | 2 +-
- src/systemctl/systemctl.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/core/shutdown.c b/src/core/shutdown.c
-index a2309b772..a7d5e5793 100644
---- a/src/core/shutdown.c
-+++ b/src/core/shutdown.c
-@@ -403,7 +403,7 @@ int main(int argc, char *argv[]) {
- _cleanup_free_ char *param = NULL;
-
- r = read_one_line_file("/run/systemd/reboot-param", &param);
-- if (r < 0)
-+ if (r < 0 && r != -ENOENT)
- log_warning_errno(r, "Failed to read reboot parameter file: %m");
-
- if (!isempty(param)) {
-diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index cb9ca9ae1..1a47cb564 100644
---- a/src/systemctl/systemctl.c
-+++ b/src/systemctl/systemctl.c
-@@ -8260,7 +8260,7 @@ static int halt_now(enum action a) {
- _cleanup_free_ char *param = NULL;
-
- r = read_one_line_file("/run/systemd/reboot-param", &param);
-- if (r < 0)
-+ if (r < 0 && r != -ENOENT)
- log_warning_errno(r, "Failed to read reboot parameter file: %m");
-
- if (!isempty(param)) {
---
-2.13.3
-
-
-From d657efda431dc0bdac8a421336a6735daf6fc776 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Tue, 30 May 2017 16:31:51 -0400
-Subject: [PATCH 68/75] man: don't say that ExecStart syntax is "very shell"
-
-Fixes #6035.
-
-(cherry picked from commit 0e3f51cf8d1004375e72d080f2aceddb9432b430)
----
- man/systemd.service.xml | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/man/systemd.service.xml b/man/systemd.service.xml
-index a452e3a67..555719186 100644
---- a/man/systemd.service.xml
-+++ b/man/systemd.service.xml
-@@ -926,10 +926,9 @@
- result in a warning. In particular, any backslashes should be doubled. Finally, a trailing
- backslash (<literal>\</literal>) may be used to merge lines.</para>
-
-- <para>This syntax is intended to be very similar to shell syntax,
-- but only the meta-characters and expansions described in the
-- following paragraphs are understood. Specifically, redirection
-- using
-+ <para>This syntax is inspired by shell syntax, but only the meta-characters and expansions
-+ described in the following paragraphs are understood, and the expansion of variables is
-+ different. Specifically, redirection using
- <literal>&lt;</literal>,
- <literal>&lt;&lt;</literal>,
- <literal>&gt;</literal>, and
---
-2.13.3
-
-
-From adc6a92ae92647c9b098ffb5ff257c8ab685411e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Tue, 30 May 2017 16:43:48 -0400
-Subject: [PATCH 69/75] man: update MemoryDenyWriteExecute description for
- executable stacks
-
-Without going into details, mention that libraries are also covered by the
-filters, and that executable stacks are a no no.
-
-Closes #5970.
-
-(cherry picked from commit 03c3c520402db803cffd5abc7ea0c55fba95fbb3)
----
- man/systemd.exec.xml | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
-index fb64cd6d8..9a9387b79 100644
---- a/man/systemd.exec.xml
-+++ b/man/systemd.exec.xml
-@@ -1655,8 +1655,8 @@
- <citerefentry><refentrytitle>mprotect</refentrytitle><manvolnum>2</manvolnum></citerefentry> system calls with
- <constant>PROT_EXEC</constant> set and
- <citerefentry><refentrytitle>shmat</refentrytitle><manvolnum>2</manvolnum></citerefentry> system calls with
-- <constant>SHM_EXEC</constant> set. Note that this option is incompatible with programs that generate program
-- code dynamically at runtime, such as JIT execution engines, or programs compiled making use of the code
-+ <constant>SHM_EXEC</constant> set. Note that this option is incompatible with programs and libraries that
-+ generate program code dynamically at runtime, including JIT execution engines, executable stacks, and code
- "trampoline" feature of various C compilers. This option improves service security, as it makes harder for
- software exploits to change running code dynamically. Note that this feature is fully available on x86-64, and
- partially on x86. Specifically, the <function>shmat()</function> protection is not available on x86. Note that
---
-2.13.3
-
-
-From 4f7c12c0147e9467a4adb76c5587cc2fe9bb627a Mon Sep 17 00:00:00 2001
-From: Michael Biebl <mbiebl@gmail.com>
-Date: Thu, 1 Jun 2017 03:21:11 +0200
-Subject: [PATCH 70/75] hwdb: use path_join() to generate the hwdb_bin path
- (#6063)
-
-This avoids having double slashes which can confuse selinux.
-(cherry picked from commit 0aac506b64dd6102374635290ca979b080d1192f)
----
- src/hwdb/hwdb.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
-index a23b61479..df79fbc27 100644
---- a/src/hwdb/hwdb.c
-+++ b/src/hwdb/hwdb.c
-@@ -31,6 +31,7 @@
- #include "hwdb-util.h"
- #include "label.h"
- #include "mkdir.h"
-+#include "path-util.h"
- #include "selinux-util.h"
- #include "strbuf.h"
- #include "string-util.h"
-@@ -670,7 +671,7 @@ static int hwdb_update(int argc, char *argv[], void *userdata) {
- log_debug("strings dedup'ed: %8zu bytes (%8zu)",
- trie->strings->dedup_len, trie->strings->dedup_count);
-
-- hwdb_bin = strjoin(arg_root, "/", arg_hwdb_bin_dir, "/hwdb.bin");
-+ hwdb_bin = path_join(arg_root, arg_hwdb_bin_dir, "hwdb.bin");
- if (!hwdb_bin)
- return -ENOMEM;
-
---
-2.13.3
-
-
-From dd8fe7cf46d372a012d01192949b8ba62887c996 Mon Sep 17 00:00:00 2001
-From: Josef Gajdusek <atx@atx.name>
-Date: Tue, 6 Jun 2017 17:18:22 +0200
-Subject: [PATCH 71/75] systemd-nspawn@.service: start after /var/lib/machines
- is mounted (#6079)
-
-This fixes a race condition during boot, where an nspawn container would start
-before /var/lib/machines got mounted resulting in a failure.
-(cherry picked from commit be5bd2ec62dd7cedd56da82296b9296918806b48)
----
- units/systemd-nspawn@.service.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in
-index 8c0685aef..5e80054a5 100644
---- a/units/systemd-nspawn@.service.in
-+++ b/units/systemd-nspawn@.service.in
-@@ -11,6 +11,7 @@ Documentation=man:systemd-nspawn(1)
- PartOf=machines.target
- Before=machines.target
- After=network.target systemd-resolved.service
-+RequiresMountsFor=/var/lib/machines
-
- [Service]
- ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth -U --settings=override --machine=%i
---
-2.13.3
-
-
-From 6389db18b0cec4637af4483923b57a7a0a125317 Mon Sep 17 00:00:00 2001
-From: Felipe Sateler <fsateler@users.noreply.github.com>
-Date: Tue, 6 Jun 2017 21:32:15 -0400
-Subject: [PATCH 72/75] zsh: add completion for add-wants and add-requires
- (#6082)
-
-(cherry picked from commit d739ce98f33fce467e1d5b447140eb53262244d3)
----
- shell-completion/zsh/_systemctl.in | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
-index 7d3d47bef..aad700b73 100644
---- a/shell-completion/zsh/_systemctl.in
-+++ b/shell-completion/zsh/_systemctl.in
-@@ -29,6 +29,8 @@
- "list-unit-files:List installed unit files"
- "enable:Enable one or more unit files"
- "disable:Disable one or more unit files"
-+ "add-wants:Add Wants= dependencies to a unit"
-+ "add-requires:Add Requires= dependencies to a unit"
- "reenable:Reenable one or more unit files"
- "preset:Enable/disable one or more unit files based on preset configuration"
- "set-default:Set the default target"
-@@ -158,7 +160,7 @@ _systemctl_unit_state() { typeset -gA _sys_unit_state; _sys_unit_state=( $(__sys
-
- local fun
- # Completion functions for ALL_UNITS
--for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit revert ; do
-+for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit revert add-wants add-requires ; do
- (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
- {
- _systemctl_really_all_units
---
-2.13.3
-
-
-From a52e62a329f27e5f0a35402cdbd194c9ed4542a7 Mon Sep 17 00:00:00 2001
-From: Evgeny Vereshchagin <evvers@ya.ru>
-Date: Wed, 7 Jun 2017 04:47:47 +0300
-Subject: [PATCH 73/75] udev: stop freeing value after using it for setting
- sysattr (#6094)
-
-This prevents udev from double-freeing and crashing.
-
-See https://github.com/systemd/systemd/issues/6040#issuecomment-306589836
-==351== Invalid free() / delete / delete[] / realloc()
-==351== at 0x4C2C14B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
-==351== by 0x13CBE8: hashmap_clear_free_free (hashmap.c:900)
-==351== by 0x13CBE8: hashmap_free_free_free (hashmap.c:852)
-==351== by 0x147F4F: sd_device_unref (sd-device.c:88)
-==351== by 0x130CCC: udev_device_unref (libudev-device.c:552)
-==351== by 0x130CD5: udev_device_unref (libudev-device.c:553)
-==351== by 0x11FBBB: worker_spawn (udevd.c:488)
-==351== by 0x1216E5: event_run (udevd.c:584)
-==351== by 0x1216E5: event_queue_start (udevd.c:823)
-==351== by 0x122213: on_uevent (udevd.c:927)
-==351== by 0x141F2F: source_dispatch (sd-event.c:2272)
-==351== by 0x142D52: sd_event_dispatch (sd-event.c:2631)
-==351== by 0x142D52: sd_event_run (sd-event.c:2690)
-==351== by 0x142D52: sd_event_loop (sd-event.c:2710)
-==351== by 0x1159CB: run (udevd.c:1643)
-==351== by 0x1159CB: main (udevd.c:1772)
-==351== Address 0x81745b0 is 0 bytes inside a block of size 1 free'd
-==351== at 0x4C2C14B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
-==351== by 0x1447F0: freep (alloc-util.h:57)
-==351== by 0x1447F0: sd_device_set_sysattr_value (sd-device.c:1859)
-==351== by 0x132081: udev_device_set_sysattr_value (libudev-device.c:849)
-==351== by 0x12E777: set_trackpoint_sensitivity (udev-builtin-keyboard.c:180)
-==351== by 0x12E777: builtin_keyboard.lto_priv.170 (udev-builtin-keyboard.c:263)
-==351== by 0x14D03F: udev_builtin_run.constprop.75 (udev-builtin.c:133)
-==351== by 0x11FAEB: udev_event_execute_run (udev-event.c:957)
-==351== by 0x11FAEB: worker_spawn (udevd.c:461)
-==351== by 0x1216E5: event_run (udevd.c:584)
-==351== by 0x1216E5: event_queue_start (udevd.c:823)
-==351== by 0x122213: on_uevent (udevd.c:927)
-==351== by 0x141F2F: source_dispatch (sd-event.c:2272)
-==351== by 0x142D52: sd_event_dispatch (sd-event.c:2631)
-==351== by 0x142D52: sd_event_run (sd-event.c:2690)
-==351== by 0x142D52: sd_event_loop (sd-event.c:2710)
-==351== by 0x1159CB: run (udevd.c:1643)
-==351== by 0x1159CB: main (udevd.c:1772)
-==351== Block was alloc'd at
-==351== at 0x4C2CF35: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
-==351== by 0x144853: sd_device_set_sysattr_value (sd-device.c:1888)
-==351== by 0x132081: udev_device_set_sysattr_value (libudev-device.c:849)
-==351== by 0x12E777: set_trackpoint_sensitivity (udev-builtin-keyboard.c:180)
-==351== by 0x12E777: builtin_keyboard.lto_priv.170 (udev-builtin-keyboard.c:263)
-==351== by 0x14D03F: udev_builtin_run.constprop.75 (udev-builtin.c:133)
-==351== by 0x11FAEB: udev_event_execute_run (udev-event.c:957)
-==351== by 0x11FAEB: worker_spawn (udevd.c:461)
-==351== by 0x1216E5: event_run (udevd.c:584)
-==351== by 0x1216E5: event_queue_start (udevd.c:823)
-==351== by 0x122213: on_uevent (udevd.c:927)
-==351== by 0x141F2F: source_dispatch (sd-event.c:2272)
-==351== by 0x142D52: sd_event_dispatch (sd-event.c:2631)
-==351== by 0x142D52: sd_event_run (sd-event.c:2690)
-==351== by 0x142D52: sd_event_loop (sd-event.c:2710)
-==351== by 0x1159CB: run (udevd.c:1643)
-==351== by 0x1159CB: main (udevd.c:1772)
-(cherry picked from commit 3bd82598a1b48d27b17baf4b43bdf1104bcb1021)
----
- src/libsystemd/sd-device/sd-device.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
-index 04ead2933..81d8d61ba 100644
---- a/src/libsystemd/sd-device/sd-device.c
-+++ b/src/libsystemd/sd-device/sd-device.c
-@@ -1892,6 +1892,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
- r = device_add_sysattr_value(device, sysattr, value);
- if (r < 0)
- return r;
-+ value = NULL;
-
- return -ENXIO;
- }
---
-2.13.3
-
-
-From e0a8e194a2e3ca0a405dadfcbc9b5347e46fe8c0 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neil@brown.name>
-Date: Wed, 7 Jun 2017 22:28:23 +1000
-Subject: [PATCH 74/75] core/mount: pass "-c" flag to /bin/umount (#6093)
-
-"-c", which is short for "--no-canonicalize", tells /bin/umount
-that the path name is canonical (no .. or symlinks etc).
-
-systemd always uses a canonical name, so this flag is appropriate
-for systemd to use.
-Knowing that the path is canonical allows umount to avoid
-some calls to lstat() on the path.
-
-From v2.30 "-c" goes further and causes umount to avoid all
-attempts to 'lstat()' (or similar) the path. This is important
-when automatically unmounting a filesystem, as lstat() can
-hang indefinitely in some cases such as when an NFS server
-is not accessible.
-
-"-c" has been supported since util-linux 2.17 which is before the
-earliest version supported by systemd.
-So "-c" is safe to use now, and once util-linux v2.30 is in use,
-it will allow mounts from non-responsive NFS servers to be
-unmounted.
-(cherry picked from commit 83897d5470190a9818df50026cf38cd97114f77d)
----
- src/core/mount.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/mount.c b/src/core/mount.c
-index ca0c4b0d5..214364d87 100644
---- a/src/core/mount.c
-+++ b/src/core/mount.c
-@@ -886,7 +886,7 @@ static void mount_enter_unmounting(Mount *m) {
- m->control_command_id = MOUNT_EXEC_UNMOUNT;
- m->control_command = m->exec_command + MOUNT_EXEC_UNMOUNT;
-
-- r = exec_command_set(m->control_command, UMOUNT_PATH, m->where, NULL);
-+ r = exec_command_set(m->control_command, UMOUNT_PATH, m->where, "-c", NULL);
- if (r >= 0 && m->lazy_unmount)
- r = exec_command_append(m->control_command, "-l", NULL);
- if (r >= 0 && m->force_unmount)
---
-2.13.3
-
-
-From 27c7bc970d9e7ffe060688a8dd77b7747503a564 Mon Sep 17 00:00:00 2001
-From: Pat Riehecky <jcpunk@gmail.com>
-Date: Fri, 9 Jun 2017 17:48:25 -0500
-Subject: [PATCH 75/75] man: systemd-timesyncd.service(8) (#6109)
-
-Updates the documentation to note use of SNTP (resolves #5735)
-(cherry picked from commit 42d3bf86bb75842602d3712caa2baccd09a1c795)
----
- man/systemd-timesyncd.service.xml | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/man/systemd-timesyncd.service.xml b/man/systemd-timesyncd.service.xml
-index 6ec384313..3edcaf1b4 100644
---- a/man/systemd-timesyncd.service.xml
-+++ b/man/systemd-timesyncd.service.xml
-@@ -64,6 +64,12 @@
- reboots to ensure it monotonically advances even if the system
- lacks a battery-buffered RTC chip.</para>
-
-+ <para>The <filename>systemd-timesyncd</filename> service
-+ specifically implements only SNTP. This minimalistic
-+ service will set the system clock for large offsets or
-+ slowly adjust it for smaller deltas. More complex use
-+ cases are not covered by <filename>systemd-timesyncd</filename>.</para>
-+
- <para>The NTP servers contacted are determined from the global
- settings in
- <citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
---
-2.13.3
-
diff --git a/packages/sys-apps/systemd/files/patches-233/284d1cd0a12cad96a5ea61d1afb0dd677dbd147e.patch b/packages/sys-apps/systemd/files/patches-233/284d1cd0a12cad96a5ea61d1afb0dd677dbd147e.patch
deleted file mode 100644
index d8fef01..0000000
--- a/packages/sys-apps/systemd/files/patches-233/284d1cd0a12cad96a5ea61d1afb0dd677dbd147e.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Source/Upstream: Yes, https://github.com/systemd/systemd/commit/284d1cd0a12cad96a5ea61d1afb0dd677dbd147e
-Reason: Fix build with glibc-2.26 (https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27)
-
-From 284d1cd0a12cad96a5ea61d1afb0dd677dbd147e Mon Sep 17 00:00:00 2001
-From: Matija Skala <mskala@gmx.com>
-Date: Wed, 15 Mar 2017 13:21:10 +0100
-Subject: [PATCH] fix includes
-
-linux/sockios.h is needed for the SIOCGSTAMPNS macro
-
-xlocale.h is included indirectly in glibc and doesn't even exist in
-other libcs
----
- src/basic/parse-util.c | 1 -
- src/libsystemd-network/sd-lldp.c | 1 +
- 2 files changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
-index 6e58ced6f5..d86700736d 100644
---- a/src/basic/parse-util.c
-+++ b/src/basic/parse-util.c
-@@ -23,7 +23,6 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <xlocale.h>
-
- #include "alloc-util.h"
- #include "extract-word.h"
-diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/sd-lldp.c
-index 0702241506..39ddb2461a 100644
---- a/src/libsystemd-network/sd-lldp.c
-+++ b/src/libsystemd-network/sd-lldp.c
-@@ -19,6 +19,7 @@
- ***/
-
- #include <arpa/inet.h>
-+#include <linux/sockios.h>
-
- #include "sd-lldp.h"
-
diff --git a/packages/sys-apps/systemd/files/patches-233/71a047d2f7ca37bb8e20e94622e94240f8812649.patch b/packages/sys-apps/systemd/files/patches-233/71a047d2f7ca37bb8e20e94622e94240f8812649.patch
deleted file mode 100644
index 2832a83..0000000
--- a/packages/sys-apps/systemd/files/patches-233/71a047d2f7ca37bb8e20e94622e94240f8812649.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-Upstream: yes
-From 71a047d2f7ca37bb8e20e94622e94240f8812649 Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Tue, 21 Mar 2017 13:34:52 +0900
-Subject: [PATCH] resolved: detect and warn other running mDNS stack
-
-Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
-even if another mDNS stack (e.g. avahi) is running, `bind` always
-success and we cannot detect the other stack.
-By this commit, we first try to `bind` without `SO_REUSEADDR`,
-and if it fails, show warning and retry with `SO_REUSEADDR`.
----
- src/resolve/resolved-mdns.c | 102 ++++++++++++++++++++++++++++++--------------
- 1 file changed, 71 insertions(+), 31 deletions(-)
-
-diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c
-index c40e8f75f0..415dc1a532 100644
---- a/src/resolve/resolved-mdns.c
-+++ b/src/resolve/resolved-mdns.c
-@@ -60,7 +60,7 @@ int manager_mdns_start(Manager *m) {
- return 0;
-
- eaddrinuse:
-- log_warning("There appears to be another mDNS responder running. Turning off mDNS support.");
-+ log_warning("Another mDNS responder prohibits binding the socket to the same port. Turning off mDNS support.");
- m->mdns_support = RESOLVE_SUPPORT_NO;
- manager_mdns_stop(m);
-
-@@ -217,55 +217,75 @@ int manager_mdns_ipv4_fd(Manager *m) {
-
- m->mdns_ipv4_fd = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
- if (m->mdns_ipv4_fd < 0)
-- return -errno;
-+ return log_error_errno(errno, "mDNS-IPv4: Failed to create socket: %m");
-
- r = setsockopt(m->mdns_ipv4_fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set IP_TTL: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv4_fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set IP_MULTICAST_TTL: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv4_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-- }
--
-- r = setsockopt(m->mdns_ipv4_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set IP_MULTICAST_LOOP: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv4_fd, IPPROTO_IP, IP_PKTINFO, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set IP_PKTINFO: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv4_fd, IPPROTO_IP, IP_RECVTTL, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set IP_RECVTTL: %m");
- goto fail;
- }
-
- /* Disable Don't-Fragment bit in the IP header */
- r = setsockopt(m->mdns_ipv4_fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set IP_MTU_DISCOVER: %m");
- goto fail;
- }
-
-+ /* See the section 15.1 of RFC6762 */
-+ /* first try to bind without SO_REUSEADDR to detect another mDNS responder */
- r = bind(m->mdns_ipv4_fd, &sa.sa, sizeof(sa.in));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-+ if (errno != EADDRINUSE) {
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to bind socket: %m");
-+ goto fail;
-+ }
-+
-+ log_warning("mDNS-IPv4: There appears to be another mDNS responder running, or previously systemd-resolved crashed with some outstanding transfers.");
-+
-+ /* try again with SO_REUSEADDR */
-+ r = setsockopt(m->mdns_ipv4_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
-+
-+ r = bind(m->mdns_ipv4_fd, &sa.sa, sizeof(sa.in));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to bind socket: %m");
-+ goto fail;
-+ }
-+ } else {
-+ /* enable SO_REUSEADDR for the case that the user really wants multiple mDNS responders */
-+ r = setsockopt(m->mdns_ipv4_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "mDNS-IPv4: Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
- }
-
- r = sd_event_add_io(m->event, &m->mdns_ipv4_event_source, m->mdns_ipv4_fd, EPOLLIN, on_mdns_packet, m);
-@@ -294,55 +314,75 @@ int manager_mdns_ipv6_fd(Manager *m) {
-
- m->mdns_ipv6_fd = socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
- if (m->mdns_ipv6_fd < 0)
-- return -errno;
-+ return log_error_errno(errno, "mDNS-IPv6: Failed to create socket: %m");
-
- r = setsockopt(m->mdns_ipv6_fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set IPV6_UNICAST_HOPS: %m");
- goto fail;
- }
-
- /* RFC 4795, section 2.5 recommends setting the TTL of UDP packets to 255. */
- r = setsockopt(m->mdns_ipv6_fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &ttl, sizeof(ttl));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set IPV6_MULTICAST_HOPS: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv6_fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set IPV6_MULTICAST_LOOP: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv6_fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-- }
--
-- r = setsockopt(m->mdns_ipv6_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set IPV6_V6ONLY: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv6_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set IPV6_RECVPKTINFO: %m");
- goto fail;
- }
-
- r = setsockopt(m->mdns_ipv6_fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &one, sizeof(one));
- if (r < 0) {
-- r = -errno;
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set IPV6_RECVHOPLIMIT: %m");
- goto fail;
- }
-
-+ /* See the section 15.1 of RFC6762 */
-+ /* first try to bind without SO_REUSEADDR to detect another mDNS responder */
- r = bind(m->mdns_ipv6_fd, &sa.sa, sizeof(sa.in6));
- if (r < 0) {
-- r = -errno;
-- goto fail;
-+ if (errno != EADDRINUSE) {
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to bind socket: %m");
-+ goto fail;
-+ }
-+
-+ log_warning("mDNS-IPv6: There appears to be another mDNS responder running, or previously systemd-resolved crashed with some outstanding transfers.");
-+
-+ /* try again with SO_REUSEADDR */
-+ r = setsockopt(m->mdns_ipv6_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
-+
-+ r = bind(m->mdns_ipv6_fd, &sa.sa, sizeof(sa.in6));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to bind socket: %m");
-+ goto fail;
-+ }
-+ } else {
-+ /* enable SO_REUSEADDR for the case that the user really wants multiple mDNS responders */
-+ r = setsockopt(m->mdns_ipv6_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-+ if (r < 0) {
-+ r = log_error_errno(errno, "mDNS-IPv6: Failed to set SO_REUSEADDR: %m");
-+ goto fail;
-+ }
- }
-
- r = sd_event_add_io(m->event, &m->mdns_ipv6_event_source, m->mdns_ipv6_fd, EPOLLIN, on_mdns_packet, m);
diff --git a/packages/sys-apps/systemd/files/patches-233/77525fdc8d60bff55b60b9e443401187204ddfe7.patch b/packages/sys-apps/systemd/files/patches-233/77525fdc8d60bff55b60b9e443401187204ddfe7.patch
deleted file mode 100644
index bb1fa14..0000000
--- a/packages/sys-apps/systemd/files/patches-233/77525fdc8d60bff55b60b9e443401187204ddfe7.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Upstream: yes
-From 77525fdc8d60bff55b60b9e443401187204ddfe7 Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Thu, 16 Mar 2017 14:30:16 +0900
-Subject: [PATCH] resolved: add global config option to control mDNS stack
-
----
- man/resolved.conf.xml | 15 +++++++++++++++
- src/resolve/resolved-gperf.gperf | 1 +
- src/resolve/resolved.conf.in | 1 +
- 3 files changed, 17 insertions(+)
-
-diff --git a/man/resolved.conf.xml b/man/resolved.conf.xml
-index 4fc1ef1b33..7babc5c5c4 100644
---- a/man/resolved.conf.xml
-+++ b/man/resolved.conf.xml
-@@ -127,6 +127,21 @@
- </varlistentry>
-
- <varlistentry>
-+ <term><varname>MulticastDNS=</varname></term>
-+ <listitem><para>Takes a boolean argument or
-+ <literal>resolve</literal>. Controls Multicast DNS support (<ulink
-+ url="https://tools.ietf.org/html/rfc6762">RFC 6762</ulink>) on
-+ the local host. If true, enables full Multicast DNS responder and
-+ resolver support. If false, disables both. If set to
-+ <literal>resolve</literal>, only resolution support is enabled,
-+ but responding is disabled. Note that
-+ <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-+ also maintains per-link Multicast DNS settings. Multicast DNS will be
-+ enabled on a link only if the per-link and the
-+ global setting is on.</para></listitem>
-+ </varlistentry>
-+
-+ <varlistentry>
- <term><varname>DNSSEC=</varname></term>
- <listitem><para>Takes a boolean argument or
- <literal>allow-downgrade</literal>. If true all DNS lookups are
-diff --git a/src/resolve/resolved-gperf.gperf b/src/resolve/resolved-gperf.gperf
-index 446f85cdf4..5153563b99 100644
---- a/src/resolve/resolved-gperf.gperf
-+++ b/src/resolve/resolved-gperf.gperf
-@@ -18,6 +18,7 @@ Resolve.DNS, config_parse_dns_servers, DNS_SERVER_SYSTEM,
- Resolve.FallbackDNS, config_parse_dns_servers, DNS_SERVER_FALLBACK, 0
- Resolve.Domains, config_parse_search_domains, 0, 0
- Resolve.LLMNR, config_parse_resolve_support, 0, offsetof(Manager, llmnr_support)
-+Resolve.MulticastDNS, config_parse_resolve_support, 0, offsetof(Manager, mdns_support)
- Resolve.DNSSEC, config_parse_dnssec_mode, 0, offsetof(Manager, dnssec_mode)
- Resolve.Cache, config_parse_bool, 0, offsetof(Manager, enable_cache)
- Resolve.DNSStubListener, config_parse_dns_stub_listener_mode, 0, offsetof(Manager, dns_stub_listener_mode)
-diff --git a/src/resolve/resolved.conf.in b/src/resolve/resolved.conf.in
-index 60afa151e3..e6b20620e2 100644
---- a/src/resolve/resolved.conf.in
-+++ b/src/resolve/resolved.conf.in
-@@ -16,6 +16,7 @@
- #FallbackDNS=@DNS_SERVERS@
- #Domains=
- #LLMNR=yes
-+#MulticastDNS=yes
- #DNSSEC=@DEFAULT_DNSSEC_MODE@
- #Cache=yes
- #DNSStubListener=udp
diff --git a/packages/sys-apps/systemd/files/patches-233/c6a8f6f66da111a417cef7be81ceb9a8f336e541.patch b/packages/sys-apps/systemd/files/patches-233/c6a8f6f66da111a417cef7be81ceb9a8f336e541.patch
deleted file mode 100644
index a02c8bd..0000000
--- a/packages/sys-apps/systemd/files/patches-233/c6a8f6f66da111a417cef7be81ceb9a8f336e541.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-Upstream: yes
-From c6a8f6f66da111a417cef7be81ceb9a8f336e541 Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Thu, 16 Mar 2017 15:52:34 +0900
-Subject: [PATCH] resolved: do not start LLMNR or mDNS stack when no network
- enables them
-
-When no network enables LLMNR or mDNS, it is not necessary to create
-LLMNR or mDNS related sockets. So, let's create them only when
-LLMNR- or mDNS-enabled network becomes active or at least one network
-enables `LLMNR=` or `MulticastDNS=` options.
----
- src/resolve/resolved-link.c | 17 +++++++++++++++++
- src/resolve/resolved-manager.c | 8 --------
- 2 files changed, 17 insertions(+), 8 deletions(-)
-
-diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
-index 3f7f9035cf..d06096f3f2 100644
---- a/src/resolve/resolved-link.c
-+++ b/src/resolve/resolved-link.c
-@@ -28,6 +28,8 @@
- #include "mkdir.h"
- #include "parse-util.h"
- #include "resolved-link.h"
-+#include "resolved-llmnr.h"
-+#include "resolved-mdns.h"
- #include "string-util.h"
- #include "strv.h"
-
-@@ -523,10 +525,25 @@ static void link_read_settings(Link *l) {
- }
-
- int link_update(Link *l) {
-+ int r;
-+
- assert(l);
-
- link_read_settings(l);
- link_load_user(l);
-+
-+ if (l->llmnr_support != RESOLVE_SUPPORT_NO) {
-+ r = manager_llmnr_start(l->manager);
-+ if (r < 0)
-+ return r;
-+ }
-+
-+ if (l->mdns_support != RESOLVE_SUPPORT_NO) {
-+ r = manager_mdns_start(l->manager);
-+ if (r < 0)
-+ return r;
-+ }
-+
- link_allocate_scopes(l);
- link_add_rrs(l, false);
-
-diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
-index c4e4409fe3..9db8b8f616 100644
---- a/src/resolve/resolved-manager.c
-+++ b/src/resolve/resolved-manager.c
-@@ -612,14 +612,6 @@ int manager_start(Manager *m) {
- if (r < 0)
- return r;
-
-- r = manager_llmnr_start(m);
-- if (r < 0)
-- return r;
--
-- r = manager_mdns_start(m);
-- if (r < 0)
-- return r;
--
- return 0;
- }
-
diff --git a/packages/sys-apps/systemd/systemd-233-r8.exheres-0 b/packages/sys-apps/systemd/systemd-233-r8.exheres-0
deleted file mode 100644
index 747877e..0000000
--- a/packages/sys-apps/systemd/systemd-233-r8.exheres-0
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2010-2016 Wulf C. Krueger <philantrop@exherbo.org>
-# Distributed under the terms of the GNU General Public License v2
-
-require systemd
-
-PLATFORMS="~amd64 ~arm ~armv7 ~x86"
-
diff --git a/packages/sys-apps/systemd/systemd.exlib b/packages/sys-apps/systemd/systemd.exlib
index 937e17d..5387cc2 100644
--- a/packages/sys-apps/systemd/systemd.exlib
+++ b/packages/sys-apps/systemd/systemd.exlib
@@ -403,21 +403,6 @@ systemd_src_install() {
alternatives_for installkernel ${PN} 100 \
/usr/$(exhost --target)/bin/installkernel kernel-install
- # Don't install funny RPM macros.
- if ! ever at_least 234; then
- if [[ -d "${IMAGE}"/etc/rpm ]]; then
- edo rm -r "${IMAGE}"/etc/rpm
- fi
-
- if [[ -d "${IMAGE}"/usr/${host}/lib/rpm ]]; then
- edo rm -r "${IMAGE}"/usr/${host}/lib/rpm
- fi
-
- if [[ -d "${IMAGE}"/no ]]; then
- edo rm -r "${IMAGE}"/no
- fi
- fi
-
# Install the legacy.conf tmpdirs.d config file.
# systemd does not install it itself if SysV compatibility is not enabled.
insinto /usr/${host}/lib/tmpfiles.d
@@ -623,7 +608,6 @@ systemd_pkg_postinst() {
"${ROOT}"/etc/init.d/sysinit.bash
"${ROOT}"/etc/systemd/{systemd-journald.conf,systemd-logind.conf}
)
- ever at_least 234 || cruft+=("${ROOT}"/etc/rpm/macros.systemd)
for file in "${cruft[@]}"; do
if [[ -f ${file} || -L ${file} ]]; then
nonfatal edo rm "${file}" || ewarn "removing ${file} failed"