diff options
Diffstat (limited to 'poky/meta/recipes-core/systemd')
8 files changed, 17 insertions, 291 deletions
diff --git a/poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service index e8b027e97..15af16a9f 100644 --- a/poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service +++ b/poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service @@ -9,7 +9,8 @@ Description=Serial Getty on %I Documentation=man:agetty(8) man:systemd-getty-generator(8) Documentation=http://0pointer.de/blog/projects/serial-console.html -BindsTo=dev-%i.device +PartOf=dev-%i.device +ConditionPathExists=/dev/%i After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service After=rc-local.service diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc index 3a353b009..191271561 100644 --- a/poky/meta/recipes-core/systemd/systemd.inc +++ b/poky/meta/recipes-core/systemd/systemd.inc @@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "db2e367bfc3b119609f837eb973d915f6c550b2f" +SRCREV = "f875dced33462641e1fb7875d2f9a8cd8e8c2fcc" SRCBRANCH = "v242-stable" SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" diff --git a/poky/meta/recipes-core/systemd/systemd/0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch b/poky/meta/recipes-core/systemd/systemd/0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch deleted file mode 100644 index ff64f58c9..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6e2f78948403a4cce45b9e34311c9577c624f066 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering <lennart@poettering.net> -Date: Mon, 17 Jun 2019 10:51:25 +0200 -Subject: [PATCH] core: set fs.file-max sysctl to LONG_MAX rather than - ULONG_MAX - -Since kernel 5.2 the kernel thankfully returns proper errors when we -write a value out of range to the sysctl. Which however breaks writing -ULONG_MAX to request the maximum value. Hence let's write the new -maximum value instead, LONG_MAX. - -/cc @brauner - -Fixes: #12803 - -Upstream-Status: Backport - -Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> ---- - src/core/main.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/core/main.c b/src/core/main.c -index b33ea1b5b5..e7f51815f0 100644 ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -1245,9 +1245,9 @@ static void bump_file_max_and_nr_open(void) { - #endif - - #if BUMP_PROC_SYS_FS_FILE_MAX -- /* I so wanted to use STRINGIFY(ULONG_MAX) here, but alas we can't as glibc/gcc define that as -- * "(0x7fffffffffffffffL * 2UL + 1UL)". Seriously. 😢 */ -- if (asprintf(&t, "%lu\n", ULONG_MAX) < 0) { -+ /* The maximum the kernel allows for this since 5.2 is LONG_MAX, use that. (Previously thing where -+ * different but the operation would fail silently.) */ -+ if (asprintf(&t, "%li\n", LONG_MAX) < 0) { - log_oom(); - return; - } diff --git a/poky/meta/recipes-core/systemd/systemd/0001-networkd-fix-link-up.patch b/poky/meta/recipes-core/systemd/systemd/0001-networkd-fix-link-up.patch deleted file mode 100644 index 4c7a0a33a..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-networkd-fix-link-up.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 6bd76d2d4ff130decd3aa13e0c2dbfd56ff8d7b7 Mon Sep 17 00:00:00 2001 -From: Susant Sahani <ssahani@gmail.com> -Date: Thu, 9 May 2019 07:35:35 +0530 -Subject: [PATCH] networkd: fix link_up() (#12505) - -Fillup IFLA_INET6_ADDR_GEN_MODE while we do link_up. - -Fixes the following error: -``` -dummy-test: Could not bring up interface: Invalid argument -``` - -After reading the kernel code when we do a link up -``` -net/core/rtnetlink.c -IFLA_AF_SPEC - af_ops->set_link_af(dev, af); - inet6_set_link_af - if (tb[IFLA_INET6_ADDR_GEN_MODE]) - Here it looks for IFLA_INET6_ADDR_GEN_MODE -``` -Since link up we didn't filling up that it's failing. - -Closes #12504. - -Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> - -Upstream-Status: Backport [https://github.com/systemd/systemd/commit/4eb086a38712ea98faf41e075b84555b11b54362.patch] - ---- - src/network/networkd-link.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index e466b96792..042496173c 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -2034,6 +2034,8 @@ static int link_up(Link *link) { - } - - if (link_ipv6_enabled(link)) { -+ uint8_t ipv6ll_mode; -+ - r = sd_netlink_message_open_container(req, IFLA_AF_SPEC); - if (r < 0) - return log_link_error_errno(link, r, "Could not open IFLA_AF_SPEC container: %m"); -@@ -2049,6 +2051,19 @@ static int link_up(Link *link) { - return log_link_error_errno(link, r, "Could not append IFLA_INET6_TOKEN: %m"); - } - -+ if (!link_ipv6ll_enabled(link)) -+ ipv6ll_mode = IN6_ADDR_GEN_MODE_NONE; -+ else if (sysctl_read_ip_property(AF_INET6, link->ifname, "stable_secret", NULL) < 0) -+ /* The file may not exist. And event if it exists, when stable_secret is unset, -+ * reading the file fails with EIO. */ -+ ipv6ll_mode = IN6_ADDR_GEN_MODE_EUI64; -+ else -+ ipv6ll_mode = IN6_ADDR_GEN_MODE_STABLE_PRIVACY; -+ -+ r = sd_netlink_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, ipv6ll_mode); -+ if (r < 0) -+ return log_link_error_errno(link, r, "Could not append IFLA_INET6_ADDR_GEN_MODE: %m"); -+ - r = sd_netlink_message_close_container(req); - if (r < 0) - return log_link_error_errno(link, r, "Could not close AF_INET6 container: %m"); diff --git a/poky/meta/recipes-core/systemd/systemd/0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch b/poky/meta/recipes-core/systemd/systemd/0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch deleted file mode 100644 index f0ae1db60..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 18bddeaaf225d5becfc10cd2c6a1d037c90574a2 Mon Sep 17 00:00:00 2001 -From: Tomas Mraz <tmraz@fedoraproject.org> -Date: Tue, 11 Jun 2019 15:10:21 +0200 -Subject: [PATCH] resolved: Fix incorrect use of OpenSSL BUF_MEM - -Fixes: #12763 -Upstream-Status: Backport [Not yet released] - https://github.com/systemd/systemd/commit/18bddeaaf225d5becfc10cd2c6a1d037c90574a2 -Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> ---- - src/resolve/resolved-dnstls-openssl.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/resolve/resolved-dnstls-openssl.c b/src/resolve/resolved-dnstls-openssl.c -index f269e4d6487f..5d9223007581 100644 ---- a/src/resolve/resolved-dnstls-openssl.c -+++ b/src/resolve/resolved-dnstls-openssl.c -@@ -6,6 +6,7 @@ - - #include <openssl/bio.h> - #include <openssl/err.h> -+#include <string.h> - - #include "io-util.h" - #include "resolved-dns-stream.h" -@@ -34,9 +35,11 @@ static int dnstls_flush_write_buffer(DnsStream *stream) { - return ss; - } else { - stream->dnstls_data.write_buffer->length -= ss; -- stream->dnstls_data.write_buffer->data += ss; - - if (stream->dnstls_data.write_buffer->length > 0) { -+ memmove(stream->dnstls_data.write_buffer->data, -+ stream->dnstls_data.write_buffer->data + ss, -+ stream->dnstls_data.write_buffer->length); - stream->dnstls_events |= EPOLLOUT; - return -EAGAIN; - } --- -2.17.1 - diff --git a/poky/meta/recipes-core/systemd/systemd/0002-network-do-not-send-ipv6.patch b/poky/meta/recipes-core/systemd/systemd/0002-network-do-not-send-ipv6.patch deleted file mode 100644 index 256531487..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0002-network-do-not-send-ipv6.patch +++ /dev/null @@ -1,96 +0,0 @@ -From b5c4eb818101127a606849e822937b15b8497c75 Mon Sep 17 00:00:00 2001 -From: Yu Watanabe <watanabe.yu+github@gmail.com> -Date: Thu, 9 May 2019 14:39:46 +0900 -Subject: [PATCH] network: do not send ipv6 token to kernel - -We disabled kernel RA support. Then, we should not send -IFLA_INET6_TOKEN. -Thus, we do not need to send IFLA_INET6_ADDR_GEN_MODE twice. - -Follow-up for 0e2fdb83bb5e22047e0c7cc058b415d0e93f02cf and -4eb086a38712ea98faf41e075b84555b11b54362. - -Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> - -Upstream-Status: Backport [https://github.com/systemd/systemd/commit/9f6e82e6eb3b6e73d66d00d1d6eee60691fb702f] - ---- - src/network/networkd-link.c | 51 +++++-------------------------------- - 1 file changed, 6 insertions(+), 45 deletions(-) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 042496173c..c49dba33da 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -1940,6 +1940,9 @@ static int link_configure_addrgen_mode(Link *link) { - assert(link->manager); - assert(link->manager->rtnl); - -+ if (!socket_ipv6_is_supported()) -+ return 0; -+ - log_link_debug(link, "Setting address genmode for link"); - - r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_SETLINK, link->ifindex); -@@ -2033,46 +2036,6 @@ static int link_up(Link *link) { - return log_link_error_errno(link, r, "Could not set MAC address: %m"); - } - -- if (link_ipv6_enabled(link)) { -- uint8_t ipv6ll_mode; -- -- r = sd_netlink_message_open_container(req, IFLA_AF_SPEC); -- if (r < 0) -- return log_link_error_errno(link, r, "Could not open IFLA_AF_SPEC container: %m"); -- -- /* if the kernel lacks ipv6 support setting IFF_UP fails if any ipv6 options are passed */ -- r = sd_netlink_message_open_container(req, AF_INET6); -- if (r < 0) -- return log_link_error_errno(link, r, "Could not open AF_INET6 container: %m"); -- -- if (!in_addr_is_null(AF_INET6, &link->network->ipv6_token)) { -- r = sd_netlink_message_append_in6_addr(req, IFLA_INET6_TOKEN, &link->network->ipv6_token.in6); -- if (r < 0) -- return log_link_error_errno(link, r, "Could not append IFLA_INET6_TOKEN: %m"); -- } -- -- if (!link_ipv6ll_enabled(link)) -- ipv6ll_mode = IN6_ADDR_GEN_MODE_NONE; -- else if (sysctl_read_ip_property(AF_INET6, link->ifname, "stable_secret", NULL) < 0) -- /* The file may not exist. And event if it exists, when stable_secret is unset, -- * reading the file fails with EIO. */ -- ipv6ll_mode = IN6_ADDR_GEN_MODE_EUI64; -- else -- ipv6ll_mode = IN6_ADDR_GEN_MODE_STABLE_PRIVACY; -- -- r = sd_netlink_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, ipv6ll_mode); -- if (r < 0) -- return log_link_error_errno(link, r, "Could not append IFLA_INET6_ADDR_GEN_MODE: %m"); -- -- r = sd_netlink_message_close_container(req); -- if (r < 0) -- return log_link_error_errno(link, r, "Could not close AF_INET6 container: %m"); -- -- r = sd_netlink_message_close_container(req); -- if (r < 0) -- return log_link_error_errno(link, r, "Could not close IFLA_AF_SPEC container: %m"); -- } -- - r = netlink_call_async(link->manager->rtnl, NULL, req, link_up_handler, - link_netlink_destroy_callback, link); - if (r < 0) -@@ -3208,11 +3171,9 @@ static int link_configure(Link *link) { - if (r < 0) - return r; - -- if (socket_ipv6_is_supported()) { -- r = link_configure_addrgen_mode(link); -- if (r < 0) -- return r; -- } -+ r = link_configure_addrgen_mode(link); -+ if (r < 0) -+ return r; - - return link_configure_after_setting_mtu(link); - } diff --git a/poky/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch b/poky/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch deleted file mode 100644 index 33f482ae9..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 9e6940858c7dbdd56b297bdf49f58d623e3430b7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> -Date: Tue, 7 May 2019 13:46:55 +0200 -Subject: [PATCH] network: remove redunant link name in message - -Fixes #12454. - -gcc was complaining that the link->ifname argument is NULL. Adding -assert(link->ifname) right before the call has no effect. It seems that -gcc is confused by the fact that log_link_warning_errno() internally -calls log_object(), with link->ifname passed as the object. log_object() -is also a macro and is does a check whether the passed object is NULL. -So we have a check if something is NULL right next an unconditional use -of it where it cannot be NULL. I think it's a bug in gcc. - -Anyway, we don't need to use link->ifname here. log_object() already prepends -the object name to the message. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: backport [https://github.com/systemd/systemd/commit/c98b3545008d8e984ab456dcf79787418fcbfe13] ---- - src/network/networkd-link.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 3e334c8d29..a158c01bbd 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -321,8 +321,7 @@ static int link_enable_ipv6(Link *link) { - - r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "disable_ipv6", disabled); - if (r < 0) -- log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m", -- enable_disable(!disabled), link->ifname); -+ log_link_warning_errno(link, r, "Cannot %s IPv6: %m", enable_disable(!disabled)); - else - log_link_info(link, "IPv6 successfully %sd", enable_disable(!disabled)); - --- -2.21.0 - diff --git a/poky/meta/recipes-core/systemd/systemd_242.bb b/poky/meta/recipes-core/systemd/systemd_242.bb index b368ca8a2..2c101cbbb 100644 --- a/poky/meta/recipes-core/systemd/systemd_242.bb +++ b/poky/meta/recipes-core/systemd/systemd_242.bb @@ -22,12 +22,7 @@ SRC_URI += "file://touchscreen.rules \ file://0003-implment-systemd-sysv-install-for-OE.patch \ file://0004-rules-whitelist-hd-devices.patch \ file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ - file://0006-network-remove-redunant-link-name-in-message.patch \ file://99-default.preset \ - file://0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch \ - file://0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch \ - file://0001-networkd-fix-link-up.patch \ - file://0002-network-do-not-send-ipv6.patch \ " # patches needed by musl @@ -88,6 +83,7 @@ PACKAGECONFIG ??= " \ quotacheck \ randomseed \ resolved \ + set-time-epoch \ smack \ sysusers \ timedated \ @@ -171,7 +167,12 @@ PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" -PACKAGECONFIG[time-epoch] = "-Dtime-epoch=0,," +# When enabled use reproducble build timestamp if set as time epoch, +# or build time if not. When disabled, time epoch is unset. +def build_epoch(d): + epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1" + return '-Dtime-epoch=%d' % int(epoch) +PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" @@ -210,6 +211,7 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ -Dquotacheck-path=${sbindir}/quotacheck \ -Dquotaon-path=${sbindir}/quotaon \ -Dsulogin-path=${base_sbindir}/sulogin \ + -Dnologin-path=${base_sbindir}/nologin \ -Dumount-path=${base_bindir}/umount" do_install() { @@ -619,6 +621,12 @@ python __anonymous() { d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") } +python do_warn_musl() { + if d.getVar('TCLIBC') == "musl": + bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.") +} +addtask warn_musl before do_configure + ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel resolv-conf" ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" |