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