NEWS: https://github.com/systemd/systemd/blob/v262-stable/NEWS#L3-L877
- Refresh patches for v262 - Drop deprecated meson build options [1] - Drop 0001-include-fix-limits.h-override.patch [2] - Add rules: install 60-persistent-media-controller.rules [3] - Gate systemd-coredumpd.service on kernel >= 6.19 262's systemd-coredumpd.service needs PIDFD_INFO_COREDUMP_SIGNAL (Linux 6.19); on older kernels its ExecCondition fails and the unit flaps into start-limit-hit, failing test_systemd_failed on qemu*-alt (6.18). Add a ConditionKernelVersion=>=6.19 drop-in so it is skipped on 6.18 and active on 7.2. Upstream report: [4] [1] https://github.com/systemd/systemd/blob/v262-stable/NEWS#L41 [2] https://github.com/systemd/systemd/commit/6a131b32e0fe948e845ae4bf41f8fed003ec30ce [3] https://github.com/systemd/systemd/commit/d153b49473 [4] https://github.com/systemd/systemd/issues/43963 Signed-off-by: Jaipaul Cheernam <[email protected]> --- Changes since v3: - Trim inline comment Changes since v2: - Add conditional kernel version for systemd-coredumpd.service Changes since v1: - Drop 0001-include-fix-limits.h-override.patch ...ve_261.3.bb => systemd-boot-native_262.bb} | 0 ...temd-boot_261.3.bb => systemd-boot_262.bb} | 0 ...e_261.3.bb => systemd-tools-native_262.bb} | 3 - meta/recipes-core/systemd/systemd.inc | 4 +- ...tall-dependency-links-at-install-tim.patch | 8 +- .../0001-include-fix-limits.h-override.patch | 74 ------------------- .../0003-Do-not-create-var-log-README.patch | 2 +- .../systemd/coredumpd-kernel-version.conf | 4 + .../{systemd_261.3.bb => systemd_262.bb} | 13 +++- 9 files changed, 22 insertions(+), 86 deletions(-) rename meta/recipes-core/systemd/{systemd-boot-native_261.3.bb => systemd-boot-native_262.bb} (100%) rename meta/recipes-core/systemd/{systemd-boot_261.3.bb => systemd-boot_262.bb} (100%) rename meta/recipes-core/systemd/{systemd-tools-native_261.3.bb => systemd-tools-native_262.bb} (93%) delete mode 100644 meta/recipes-core/systemd/systemd/0001-include-fix-limits.h-override.patch create mode 100644 meta/recipes-core/systemd/systemd/coredumpd-kernel-version.conf rename meta/recipes-core/systemd/{systemd_261.3.bb => systemd_262.bb} (98%) diff --git a/meta/recipes-core/systemd/systemd-boot-native_261.3.bb b/meta/recipes-core/systemd/systemd-boot-native_262.bb similarity index 100% rename from meta/recipes-core/systemd/systemd-boot-native_261.3.bb rename to meta/recipes-core/systemd/systemd-boot-native_262.bb diff --git a/meta/recipes-core/systemd/systemd-boot_261.3.bb b/meta/recipes-core/systemd/systemd-boot_262.bb similarity index 100% rename from meta/recipes-core/systemd/systemd-boot_261.3.bb rename to meta/recipes-core/systemd/systemd-boot_262.bb diff --git a/meta/recipes-core/systemd/systemd-tools-native_261.3.bb b/meta/recipes-core/systemd/systemd-tools-native_262.bb similarity index 93% rename from meta/recipes-core/systemd/systemd-tools-native_261.3.bb rename to meta/recipes-core/systemd/systemd-tools-native_262.bb index bffaf5a2f08..359bc972ccf 100644 --- a/meta/recipes-core/systemd/systemd-tools-native_261.3.bb +++ b/meta/recipes-core/systemd/systemd-tools-native_262.bb @@ -18,9 +18,6 @@ EXTRA_OEMESON += "--auto-features disabled" # Link the binaries statically as we don't install libsystemd-shared.so EXTRA_OEMESON += "-Dlink-systemctl-shared=false -Dlink-udev-shared=false" -# Ensure unused build paths are not in the binary -EXTRA_OEMESON += "-Dsysvinit-path= -Dsysvrcnd-path=" - # Target-absolute paths that satisfy both tools from one meson configure: # - systemd-hwdb needs prefix=/usr so the compiled-in UDEVLIBEXECDIR # (/usr/lib/udev) matches the target rootfs layout, letting diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index 7b82c930836..3efc48f65bd 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc @@ -13,8 +13,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=c09786363500a9acc29b147e6e72d2c6 \ file://LICENSE.LGPL2.1;md5=be0aaf4a380f73f7e00b420a007368f2" -SRCREV = "3255daee1572366b74fe92f002a3d60ecbb27103" -SRCBRANCH = "v261-stable" +SRCREV = "8cc40e0c5e9234bf45084751ac53b1fbfe70b492" +SRCBRANCH = "v262-stable" SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV}" CVE_PRODUCT = "systemd" diff --git a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch index b83803aa08e..0b9eb4ac3cc 100644 --- a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -1,4 +1,4 @@ -From 451af4755f0c1da552498682d910f4f4c5209639 Mon Sep 17 00:00:00 2001 +From 4793a67d3d738520f0193a9edff491989e8d77bc Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Thu, 21 Feb 2019 16:23:24 +0800 Subject: [PATCH] binfmt: Don't install dependency links at install time for @@ -25,10 +25,10 @@ Signed-off-by: Scott Murray <[email protected]> 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/units/meson.build b/units/meson.build -index 27d8ef2f72..864caa44bb 100644 +index 9f8f8d0e41..9a74236690 100644 --- a/units/meson.build +++ b/units/meson.build -@@ -168,7 +168,6 @@ units = [ +@@ -172,7 +172,6 @@ units = [ { 'file' : 'proc-sys-fs-binfmt_misc.automount', 'conditions' : ['ENABLE_BINFMT'], @@ -36,7 +36,7 @@ index 27d8ef2f72..864caa44bb 100644 }, { 'file' : 'proc-sys-fs-binfmt_misc.mount', -@@ -279,7 +278,6 @@ units = [ +@@ -283,7 +282,6 @@ units = [ { 'file' : 'systemd-binfmt.service.in', 'conditions' : ['ENABLE_BINFMT'], diff --git a/meta/recipes-core/systemd/systemd/0001-include-fix-limits.h-override.patch b/meta/recipes-core/systemd/systemd/0001-include-fix-limits.h-override.patch deleted file mode 100644 index d11a5fe3f82..00000000000 --- a/meta/recipes-core/systemd/systemd/0001-include-fix-limits.h-override.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 6a131b32e0fe948e845ae4bf41f8fed003ec30ce Mon Sep 17 00:00:00 2001 -From: Yu Watanabe <[email protected]> -Date: Tue, 22 Sep 2026 01:55:01 +0900 -Subject: [PATCH] include: fix limits.h override - -This is especially necessary since GCC 16.x. - -===== -$ gcc --version -gcc (GCC) 16.2.1 20260819 (Red Hat 16.2.1-2) -Copyright (C) 2026 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -===== - -Without this change, /usr/include/limits.h is not included, hence POSIX -constants are not defined: -===== -$ echo '#include <limits.h>' | gcc -E -H -isystem ~/git/systemd/src/include/musl - 2>&1 >/dev/null | grep '^\..*limit' -. /home/watanabe/git/systemd/src/include/musl/limits.h -.. /usr/lib/gcc/x86_64-redhat-linux/16/include/limits.h -... /usr/lib/gcc/x86_64-redhat-linux/16/include/syslimits.h -===== - -With this change, /usr/include/limits.h is included, thus POSIX -constants are defined: -===== -$ echo '#include <limits.h>' | gcc -E -H -isystem ~/git/systemd/src/include/musl - 2>&1 >/dev/null | grep '^\..*limit' -. /home/watanabe/git/systemd/src/include/musl/limits.h -.. /usr/lib/gcc/x86_64-redhat-linux/16/include/limits.h -... /usr/include/limits.h -...... /usr/include/linux/limits.h -.. /usr/lib/gcc/x86_64-redhat-linux/16/include/limits.h -===== - -Replaces #43824. - -Upstream-Status: Backport [https://github.com/systemd/systemd/pull/43831] -Signed-off-by: Jaipaul Cheernam <[email protected]> ---- - src/include/musl/limits.h | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/src/include/musl/limits.h b/src/include/musl/limits.h -index 9620a3b0ac..bcc585be2c 100644 ---- a/src/include/musl/limits.h -+++ b/src/include/musl/limits.h -@@ -1,6 +1,26 @@ - /* SPDX-License-Identifier: LGPL-2.1-or-later */ - #pragma once - -+/* GCC introduces a spurious, tricky inclusion cycle: -+ * GCC's limits.h -+ * -> GCC's syslimits.h -+ * -> GCC's limits.h (again!!!) -+ * -> glibc/musl's limits.h -+ * -> define POSIX defines -+ * -> define ISO C defines -+ * This works only when GCC's limits.h is included first, but a user override breaks the cycle. Hence, we -+ * need to manually achieve the cycle here. If GCC is not used (e.g., Clang), then including the compiler's -+ * limits.h twice should be redundant but harmless. */ -+ -+/* First, get the POSIX defines from glibc/musl's limits.h. When the two macros below are defined, GCC's -+ * limits.h includes the next limits.h, that is, one from glibc/musl. */ -+#define _GCC_LIMITS_H_ -+#define _GCC_NEXT_LIMITS_H -+#include_next <limits.h> /* IWYU pragma: export */ -+#undef _GCC_NEXT_LIMITS_H -+#undef _GCC_LIMITS_H_ -+ -+/* Next, get the ISO C defines from GCC's limits.h. */ - #include_next <limits.h> /* IWYU pragma: export */ - - #include <assert.h> diff --git a/meta/recipes-core/systemd/systemd/0003-Do-not-create-var-log-README.patch b/meta/recipes-core/systemd/systemd/0003-Do-not-create-var-log-README.patch index 175ec7955bd..c64bfa82491 100644 --- a/meta/recipes-core/systemd/systemd/0003-Do-not-create-var-log-README.patch +++ b/meta/recipes-core/systemd/systemd/0003-Do-not-create-var-log-README.patch @@ -1,4 +1,4 @@ -From 0d4a5976056387ff3801fdb7f53e6d0760df0475 Mon Sep 17 00:00:00 2001 +From e36f6fc852f8331791f391a216885b9bea543aff Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt <[email protected]> Date: Tue, 21 Jan 2025 05:02:00 +0100 Subject: [PATCH] Do not create /var/log/README diff --git a/meta/recipes-core/systemd/systemd/coredumpd-kernel-version.conf b/meta/recipes-core/systemd/systemd/coredumpd-kernel-version.conf new file mode 100644 index 00000000000..38ea613da94 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/coredumpd-kernel-version.conf @@ -0,0 +1,4 @@ +# Requires the PIDFD_INFO_COREDUMP_SIGNAL pidfd flag, added in Linux 6.19. +# Upstream report: https://github.com/systemd/systemd/issues/43963 +[Unit] +ConditionKernelVersion=>=6.19 diff --git a/meta/recipes-core/systemd/systemd_261.3.bb b/meta/recipes-core/systemd/systemd_262.bb similarity index 98% rename from meta/recipes-core/systemd/systemd_261.3.bb rename to meta/recipes-core/systemd/systemd_262.bb index 0901736e7c9..d613f01c582 100644 --- a/meta/recipes-core/systemd/systemd_261.3.bb +++ b/meta/recipes-core/systemd/systemd_262.bb @@ -34,9 +34,9 @@ SRC_URI += "file://touchscreen.rules \ file://init \ file://99-default.preset \ file://systemd-pager.sh \ + file://coredumpd-kernel-version.conf \ file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0003-Do-not-create-var-log-README.patch \ - file://0001-include-fix-limits.h-override.patch \ " PAM_PLUGINS = " \ @@ -144,7 +144,6 @@ PACKAGECONFIG[journal-color] = ",,,less" PACKAGECONFIG[journal-upload] = "-Dlibcurl=enabled,-Dlibcurl=disabled,curl" PACKAGECONFIG[kmod] = "-Dkmod=enabled,-Dkmod=disabled,kmod,libkmod" PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" -PACKAGECONFIG[libidn] = "-Dlibidn=enabled,-Dlibidn=disabled,libidn" PACKAGECONFIG[libidn2] = "-Dlibidn2=enabled,-Dlibidn2=disabled,libidn2" # Link udev shared with systemd helper library. # If enabled the udev package depends on the systemd package (which has the needed shared library). @@ -355,6 +354,15 @@ do_install() { # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto install -Dm 0644 ${UNPACKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset + # Gate the new (v262) kernel coredump socket manager on a kernel + # that actually supports it (>= 6.19). See the drop-in for the full rationale. + if [ -e ${D}${systemd_system_unitdir}/systemd-coredumpd.service ]; then + install -Dm 0644 ${UNPACKDIR}/coredumpd-kernel-version.conf \ + ${D}${systemd_system_unitdir}/systemd-coredumpd.service.d/99-kernel-version.conf + install -Dm 0644 ${UNPACKDIR}/coredumpd-kernel-version.conf \ + ${D}${systemd_system_unitdir}/systemd-coredump-register.service.d/99-kernel-version.conf + fi + # add a profile fragment to disable systemd pager with busybox less install -Dm 0644 ${UNPACKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh @@ -799,6 +807,7 @@ FILES:udev += "${base_sbindir}/udevd \ ${nonarch_libdir}/udev/rules.d/60-persistent-alsa.rules \ ${nonarch_libdir}/udev/rules.d/60-persistent-hidraw.rules \ ${nonarch_libdir}/udev/rules.d/60-persistent-input.rules \ + ${nonarch_libdir}/udev/rules.d/60-persistent-media-controller.rules \ ${nonarch_libdir}/udev/rules.d/60-persistent-storage.rules \ ${nonarch_libdir}/udev/rules.d/60-persistent-storage-mtd.rules \ ${nonarch_libdir}/udev/rules.d/60-persistent-storage-tape.rules \
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#247326): https://lists.openembedded.org/g/openembedded-core/message/247326 Mute This Topic: https://lists.openembedded.org/mt/121616567/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
