]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: update 252.5 -> 253.1
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 9 Mar 2023 15:19:37 +0000 (16:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 11 Mar 2023 00:08:38 +0000 (00:08 +0000)
Add a musl compatibility patch to systemd-boot.

Backport a patch to address systemctl fails on 32 bit targets.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-core/systemd/systemd-boot_253.1.bb [moved from meta/recipes-core/systemd/systemd-boot_252.5.bb with 100% similarity]
meta/recipes-core/systemd/systemd.inc
meta/recipes-core/systemd/systemd/0004-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd/fix-32bit.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd_253.1.bb [moved from meta/recipes-core/systemd/systemd_252.5.bb with 99% similarity]

index df27e01b1c9de68069c34aa54cfe656189c0576a..354cc46e906ce6d0cf10d8fa0dbfc99e7f9e18b3 100644 (file)
@@ -14,9 +14,11 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
                     file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "61f5710d0bfd8f522af6f8eef399a851509946e2"
-SRCBRANCH = "v252-stable"
+SRCREV = "6c327d74aa0d350482e82a247d7018559699798d"
+SRCBRANCH = "v253-stable"
 SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \
-"
+           file://0004-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch \
+           file://fix-32bit.patch \
+           "
 
 S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/systemd/systemd/0004-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch b/meta/recipes-core/systemd/systemd/0004-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch
new file mode 100644 (file)
index 0000000..927f914
--- /dev/null
@@ -0,0 +1,40 @@
+From a4ff7772acf1d983921833aa20ccd7c4d5e59a1c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Mon, 6 Mar 2023 15:24:49 +0100
+Subject: [PATCH] src/boot/efi/efi-string.c: define wchar_t from __WCHAR_TYPE__
+
+systemd-boot relies on wchar_t being 16 bit, and breaks at build time otherwise.
+
+To set wchar_t to 16 bit it is passing -fshort-wchar to gcc; this has the
+desired effect on glibc (which sets wchar_t from __WCHAR_TYPE__) but not on
+musl (which hardcodes it to 32 bit).
+
+This patch ensures wchar_t is set from the compiler flags on all systems; note
+that systemd-boot is not actually using functions from musl or other libc, just their headers.
+
+Meanwhile upstream has refactored the code to not rely on libc headers at all;
+however this will not be backported to v253 and we need a different fix.
+
+Upstream-Status: Inappropriate [fixed differently in trunk according to https://github.com/systemd/systemd/pull/26689]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/boot/efi/efi-string.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/boot/efi/efi-string.c b/src/boot/efi/efi-string.c
+index 22923d60f6..22a8d1ef71 100644
+--- a/src/boot/efi/efi-string.c
++++ b/src/boot/efi/efi-string.c
+@@ -2,7 +2,12 @@
+ #include <stdbool.h>
+ #include <stdint.h>
++
++#if SD_BOOT
++typedef __WCHAR_TYPE__ wchar_t;
++#else
+ #include <wchar.h>
++#endif
+ #include "efi-string.h"
diff --git a/meta/recipes-core/systemd/systemd/fix-32bit.patch b/meta/recipes-core/systemd/systemd/fix-32bit.patch
new file mode 100644 (file)
index 0000000..6b61462
--- /dev/null
@@ -0,0 +1,41 @@
+From c63bfd0884cf20e48befbee49d41f667660a8802 Mon Sep 17 00:00:00 2001
+From: Frantisek Sumsal <frantisek@sumsal.cz>
+Date: Fri, 3 Mar 2023 12:17:27 +0100
+Subject: [PATCH] systemctl: explicitly cast the constants to uint64_t
+
+Otherwise under certain conditions `va_arg()` might get garbage instead
+of the expected value, i.e.:
+
+$ sudo build-o0/systemctl disable asdfasfaf
+sd_bus_message_appendv: Got uint64_t: 0
+Failed to disable unit: Unit file asdfasfaf.service does not exist.
+
+$ sudo build-o1/systemctl disable asdfasfaf
+sd_bus_message_appendv: Got uint64_t: 7954875719681572864
+Failed to disable unit: Invalid argument
+
+(reproduced on an armv7hl machine)
+
+Resolves: #26568
+Follow-up to: bf1bea43f15
+Related issue: https://github.com/systemd/systemd/pull/14470#discussion_r362893735
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/c63bfd0884cf20e48befbee49d41f667660a8802]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/systemctl/systemctl-enable.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/systemctl/systemctl-enable.c b/src/systemctl/systemctl-enable.c
+index 4ebe5888ac69..a9c6f3a742c9 100644
+--- a/src/systemctl/systemctl-enable.c
++++ b/src/systemctl/systemctl-enable.c
+@@ -211,7 +211,7 @@ int verb_enable(int argc, char *argv[], void *userdata) {
+                 if (send_runtime) {
+                         if (streq(method, "DisableUnitFilesWithFlagsAndInstallInfo"))
+-                                r = sd_bus_message_append(m, "t", arg_runtime ? UNIT_FILE_RUNTIME : 0);
++                                r = sd_bus_message_append(m, "t", arg_runtime ? (uint64_t) UNIT_FILE_RUNTIME : UINT64_C(0));
+                         else
+                                 r = sd_bus_message_append(m, "b", arg_runtime);
+                         if (r < 0)
similarity index 99%
rename from meta/recipes-core/systemd/systemd_252.5.bb
rename to meta/recipes-core/systemd/systemd_253.1.bb
index 784a24820756ee3939dfcb1b1c3e9c792cdb93af..4a0bb18254b27d01fa91167594d960ef32afc3a5 100644 (file)
@@ -57,6 +57,7 @@ PAM_PLUGINS = " \
     pam-plugin-unix \
     pam-plugin-loginuid \
     pam-plugin-keyinit \
+    pam-plugin-namespace \
 "
 
 PACKAGECONFIG ??= " \
@@ -715,6 +716,7 @@ FILES:udev += "${base_sbindir}/udevd \
                ${rootlibexecdir}/udev/rules.d/60-drm.rules \
                ${rootlibexecdir}/udev/rules.d/60-evdev.rules \
                ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \
+               ${rootlibexecdir}/udev/rules.d/60-infiniband.rules \
                ${rootlibexecdir}/udev/rules.d/60-input-id.rules \
                ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
                ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \