* [PATCH v3 1/3] dlopen-deps.inc: treat soname list as ordered alternatives
2026-06-30 11:50 [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 daniel.turull
@ 2026-06-30 11:50 ` daniel.turull
2026-06-30 11:50 ` [PATCH v3 2/3] systemd: upgrade to 261 daniel.turull
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: daniel.turull @ 2026-06-30 11:50 UTC (permalink / raw)
To: openembedded-core
Cc: qi.chen, alex.kanavin, richard.purdie, Ross.Burton,
mathieu.dubois-briand, Daniel Turull
From: Daniel Turull <daniel.turull@ericsson.com>
The .note.dlopen format defines the soname array as a list of
alternatives (e.g. ["libcrypt.so.2", "libcrypt.so.1"]). The previous
code warned for every soname that was not found, even when an earlier
entry in the list already satisfied the dependency.
Select the first available provider and only warn when no alternative
can be resolved.
AI-Generated: Claude-opus-4.6
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
meta/recipes-core/systemd/dlopen-deps.inc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-core/systemd/dlopen-deps.inc b/meta/recipes-core/systemd/dlopen-deps.inc
index e0b333398c..82a2ccd389 100644
--- a/meta/recipes-core/systemd/dlopen-deps.inc
+++ b/meta/recipes-core/systemd/dlopen-deps.inc
@@ -66,15 +66,18 @@ python package_generate_dlopen_deps() {
elf = oe.qa.ELFFile(f)
elf.open()
for dep in parse(extract_segment(f, ".note.dlopen"), elf.isLittleEndian()):
+ # soname list contains alternatives; find the first available provider
+ found = False
for soname in dep["soname"]:
if soname in shlibs:
- # TODO assumes the first match is good
package, version = list(shlibs[soname].values())[0]
dependency = dep_map[dep["priority"]]
bb.note(f"{pkg}: adding {dependency} on {package} via .note.dlopen")
d.appendVar(f"{dependency}:{pkg}", f" {package} (>= {version})")
- else:
- bb.warn(f"cannot find {soname}")
+ found = True
+ break
+ if not found:
+ bb.warn(f"cannot find any provider for dlopen dependency: {dep['soname']}")
except oe.qa.NotELFFileError as e:
bb.note(f"Cannot extract ELF notes: {e}")
pass
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v3 2/3] systemd: upgrade to 261
2026-06-30 11:50 [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 daniel.turull
2026-06-30 11:50 ` [PATCH v3 1/3] dlopen-deps.inc: treat soname list as ordered alternatives daniel.turull
@ 2026-06-30 11:50 ` daniel.turull
2026-06-30 23:08 ` [OE-core] " Khem Raj
2026-06-30 11:50 ` [PATCH v3 3/3] systemd: add native hwdb generator for hosts without STATX_MNT_ID daniel.turull
2026-07-02 8:36 ` [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 Mathieu Dubois-Briand
3 siblings, 1 reply; 14+ messages in thread
From: daniel.turull @ 2026-06-30 11:50 UTC (permalink / raw)
To: openembedded-core
Cc: qi.chen, alex.kanavin, richard.purdie, Ross.Burton,
mathieu.dubois-briand, Daniel Turull
From: Daniel Turull <daniel.turull@ericsson.com>
Changes: https://github.com/systemd/systemd/compare/v259.5...v261-stable
- Drop backported patches no longer needed (libfido2_cflags,
tpm2-util PCR bank, fdset_new debug)
- Remove sysvinit-path/sysvrcnd-path meson options and
systemd-sysv-install skeleton (removed upstream in 260)
- Add explicit meson disables for auto-detected features in
systemd-systemctl-native to prevent host sysroot contamination
- Refresh 0003-Do-not-create-var-log-README.patch
Tested on qemu target with testsuite systemd
AI-Generated: Claude-opus-4.6
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
...ve_259.5.bb => systemd-boot-native_261.bb} | 0
...temd-boot_259.5.bb => systemd-boot_261.bb} | 0
...9.5.bb => systemd-systemctl-native_261.bb} | 8 +-
meta/recipes-core/systemd/systemd.inc | 8 +-
...meson-use-libfido2_cflags-dependency.patch | 54 -----------
.../0003-Do-not-create-var-log-README.patch | 10 +-
...il-fix-PCR-bank-guessing-without-EFI.patch | 62 ------------
...-detailed-debug-logging-to-fdset_new.patch | 97 -------------------
.../{systemd_259.5.bb => systemd_261.bb} | 12 +--
9 files changed, 18 insertions(+), 233 deletions(-)
rename meta/recipes-core/systemd/{systemd-boot-native_259.5.bb => systemd-boot-native_261.bb} (100%)
rename meta/recipes-core/systemd/{systemd-boot_259.5.bb => systemd-boot_261.bb} (100%)
rename meta/recipes-core/systemd/{systemd-systemctl-native_259.5.bb => systemd-systemctl-native_261.bb} (54%)
delete mode 100644 meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch
rename meta/recipes-core/systemd/{systemd_259.5.bb => systemd_261.bb} (99%)
diff --git a/meta/recipes-core/systemd/systemd-boot-native_259.5.bb b/meta/recipes-core/systemd/systemd-boot-native_261.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot-native_259.5.bb
rename to meta/recipes-core/systemd/systemd-boot-native_261.bb
diff --git a/meta/recipes-core/systemd/systemd-boot_259.5.bb b/meta/recipes-core/systemd/systemd-boot_261.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_259.5.bb
rename to meta/recipes-core/systemd/systemd-boot_261.bb
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb b/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
similarity index 54%
rename from meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb
rename to meta/recipes-core/systemd/systemd-systemctl-native_261.bb
index bf9c9f4776..28fddc79df 100644
--- a/meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb
+++ b/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
@@ -10,8 +10,14 @@ inherit pkgconfig meson native
MESON_TARGET = "systemctl"
MESON_INSTALL_TAGS = "systemctl"
+# Explicitly disable features that meson auto-detects from the native sysroot.
+# Only systemctl is built here; these prevent spurious dependencies and ensure
+# reproducible builds regardless of what is installed on the build host.
EXTRA_OEMESON += "-Dlink-systemctl-shared=false"
-EXTRA_OEMESON += "-Dsysvinit-path= -Dsysvrcnd-path="
+EXTRA_OEMESON += "-Dpam=disabled -Daudit=disabled -Dselinux=disabled"
+EXTRA_OEMESON += "-Dacl=disabled -Dapparmor=disabled -Dseccomp=disabled"
+EXTRA_OEMESON += "-Dlibcryptsetup=disabled -Dlibcurl=disabled -Dlibfido2=disabled"
+EXTRA_OEMESON += "-Dpcre2=disabled -Dp11kit=disabled -Dopenssl=disabled"
# Systemctl is supposed to operate on target, but the target sysroot is not
# determined at run-time, but rather set during configure
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index f107c4c5da..d9048e9187 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -15,14 +15,10 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=c09786363500a9acc29b147e6e72d2c6 \
file://LICENSE.LGPL2.1;md5=be0aaf4a380f73f7e00b420a007368f2"
-SRCREV = "b3d8fc43e9cb531d958c17ef2cd93b374bc14e8a"
-SRCBRANCH = "v259-stable"
+SRCREV = "de9dbc37ad4aa637e200ac02a0545095997055df"
+SRCBRANCH = "v261-stable"
SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV}"
CVE_PRODUCT = "systemd"
CVE_STATUS[CVE-2019-3815] = "not-applicable-platform: only applied to RHEL"
-CVE_STATUS[CVE-2026-40223] = "fixed-version: fixed in 259.2"
-CVE_STATUS[CVE-2026-40224] = "fixed-version: fixed in 259.3"
-CVE_STATUS[CVE-2026-40225] = "fixed-version: fixed in 259.5"
-CVE_STATUS[CVE-2026-40226] = "fixed-version: fixed in 259.4"
diff --git a/meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch b/meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch
deleted file mode 100644
index 4bc1e10ee7..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 97142fd1db4124de5d5bdd3f49cc5a390286e522 Mon Sep 17 00:00:00 2001
-From: Dan McGregor <danmcgr@protonmail.com>
-Date: Wed, 11 Mar 2026 18:26:05 -0600
-Subject: [PATCH] meson: use libfido2_cflags dependency
-
-Add the libfido2 dependency to cryptenroll and cryptsetup's
-meson files. If libfido2's not installed in the default path
-the build wasn't finding its headers correctly.
-
-Signed-off-by: Dan McGregor <danmcgr@protonmail.com>
-Upstream-Status: Backport [https://github.com/systemd/systemd/commit/9ce905e35f690e7a10cd286be2b50594d0857f5e]
----
- src/cryptenroll/meson.build | 1 +
- src/cryptsetup/cryptsetup-tokens/meson.build | 2 +-
- src/cryptsetup/meson.build | 1 +
- 3 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/cryptenroll/meson.build b/src/cryptenroll/meson.build
-index 488ceea14d..11265c8b41 100644
---- a/src/cryptenroll/meson.build
-+++ b/src/cryptenroll/meson.build
-@@ -23,6 +23,7 @@ executables += [
- 'dependencies' : [
- libcryptsetup,
- libdl,
-+ libfido2_cflags,
- libopenssl,
- libp11kit_cflags,
- ],
-diff --git a/src/cryptsetup/cryptsetup-tokens/meson.build b/src/cryptsetup/cryptsetup-tokens/meson.build
-index 804e18bc67..0fd6309201 100644
---- a/src/cryptsetup/cryptsetup-tokens/meson.build
-+++ b/src/cryptsetup/cryptsetup-tokens/meson.build
-@@ -58,7 +58,7 @@ modules += [
- 'sources' : cryptsetup_token_systemd_fido2_sources,
- 'dependencies' : [
- libcryptsetup,
-- libfido2,
-+ libfido2_cflags,
- ],
- },
- template + {
-diff --git a/src/cryptsetup/meson.build b/src/cryptsetup/meson.build
-index d9778259c2..b36354fb0a 100644
---- a/src/cryptsetup/meson.build
-+++ b/src/cryptsetup/meson.build
-@@ -19,6 +19,7 @@ executables += [
- 'sources' : systemd_cryptsetup_sources,
- 'dependencies' : [
- libcryptsetup,
-+ libfido2_cflags,
- libmount_cflags,
- libopenssl,
- libp11kit_cflags,
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 1d3c4f83c0..0128c83d9f 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,7 +1,7 @@
From a7f6a296707642d05463aec22ea3dfce7d06c989 Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <pkj@axis.com>
Date: Tue, 21 Jan 2025 05:02:00 +0100
-Subject: [PATCH 03/16] Do not create /var/log/README
+Subject: [PATCH] Do not create /var/log/README
/var/log/README is a link to /usr/share/doc/systemd/README.logs. The
latter is packaged in systemd-doc and likely not installed, which leaves
@@ -15,19 +15,15 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
1 file changed, 3 deletions(-)
diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
-index cdef21fa9b..03798c953e 100644
+index cdef21fa9b..7890abcdef 100644
--- a/tmpfiles.d/legacy.conf.in
+++ b/tmpfiles.d/legacy.conf.in
-@@ -13,9 +13,6 @@
+@@ -13,6 +13,3 @@
d /run/lock 0755 root root -
L /var/lock - - - - ../run/lock
-{% if CREATE_LOG_DIRS %}
-L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
-{% endif %}
-
- {% if HAVE_SYSV_COMPAT %}
- # /run/lock/subsys is used for serializing SysV service execution, and
--
2.34.1
-
diff --git a/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch b/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch
deleted file mode 100644
index c590b01cd3..0000000000
--- a/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 3cef11c710e95bb5f891181e9b2a6d8f174712c3 Mon Sep 17 00:00:00 2001
-From: Patrick Wicki <patrick.wicki@subset.ch>
-Date: Fri, 20 Mar 2026 15:56:56 +0100
-Subject: [PATCH] tpm2-util: fix PCR bank guessing without EFI
-
-Since 7643e4a89 efi_get_active_pcr_banks() is used to determine the
-active PCR banks. Without EFI support, this returns -EOPNOTSUPP. This in
-turns leads to cryptenroll and cryptsetup attach failures unless the PCR
-bank is explicitly set, i.e.
-
-$ systemd-cryptenroll $LUKS_PART --tpm2-device=auto --tpm2-pcrs='7'
-[...]
-Could not read pcr values: Operation not supported
-
-But it works fine with --tpm2-pcrs='7:sha256'.
-
-Similarly, unsealing during cryptsetup attach also fails if the bank
-needs to be determined:
-
-Failed to unseal secret using TPM2: Operation not supported
-
-Catch the -EOPNOTSUPP and fallback to the guessing strategy.
-
-Upstream-Status: Backport [https://github.com/systemd/systemd/pull/41231]
-
-Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
----
- src/shared/tpm2-util.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
-index cf11b50695..c0590fe575 100644
---- a/src/shared/tpm2-util.c
-+++ b/src/shared/tpm2-util.c
-@@ -2702,11 +2702,11 @@ int tpm2_get_best_pcr_bank(
- uint32_t efi_banks;
- r = efi_get_active_pcr_banks(&efi_banks);
- if (r < 0) {
-- if (r != -ENOENT)
-+ if (!IN_SET(r, -ENOENT, -EOPNOTSUPP))
- return r;
-
- /* If variable is not set use guesswork below */
-- log_debug("Boot loader didn't set the LoaderTpm2ActivePcrBanks EFI variable, we have to guess the used PCR banks.");
-+ log_debug("Boot loader didn't set the LoaderTpm2ActivePcrBanks EFI variable or EFI support is unavailable, we have to guess the used PCR banks.");
- } else if (efi_banks == UINT32_MAX)
- log_debug("Boot loader set the LoaderTpm2ActivePcrBanks EFI variable to indicate that the GetActivePcrBanks() API is not available in the firmware. We have to guess the used PCR banks.");
- else {
-@@ -2811,11 +2811,11 @@ int tpm2_get_good_pcr_banks(
- uint32_t efi_banks;
- r = efi_get_active_pcr_banks(&efi_banks);
- if (r < 0) {
-- if (r != -ENOENT)
-+ if (!IN_SET(r, -ENOENT, -EOPNOTSUPP))
- return r;
-
- /* If the variable is not set we have to guess via the code below */
-- log_debug("Boot loader didn't set the LoaderTpm2ActivePcrBanks EFI variable, we have to guess the used PCR banks.");
-+ log_debug("Boot loader didn't set the LoaderTpm2ActivePcrBanks EFI variable or EFI support is unavailable, we have to guess the used PCR banks.");
- } else if (efi_banks == UINT32_MAX)
- log_debug("Boot loader set the LoaderTpm2ActivePcrBanks EFI variable to indicate that the GetActivePcrBanks() API is not available in the firmware. We have to guess the used PCR banks.");
- else {
diff --git a/meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch b/meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch
deleted file mode 100644
index 63fa7fefec..0000000000
--- a/meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 0565f9f27323a8f9e62d85f2add542af99cea06a Mon Sep 17 00:00:00 2001
-From: AshishKumar Mishra <ashishkumar.mishra@bmwtechworks.in>
-Date: Wed, 21 Jan 2026 14:13:29 +0530
-Subject: [PATCH] systemd: Add detailed debug logging to fdset_new_fill()
-
-Currently, when fdset_new_fill() fails to open /proc/self/fd or
-encounters an error while processing individual file descriptors
-(such as fcntl or fstat failures), it returns a silent error code.
-
-For debugging rarely reproducible failures it becomes difficult to
-know the exact cause of failure
-This commit updates the function to use log_debug_errno() for all
-error paths and hence provides better visibility into why FD collection
-failed, including the path of the problematic FD (via fd_get_path)
-and its inode type.
-
-Upstream-Status: Backport [https://github.com/systemd/systemd/pull/40385]
-
-Signed-off-by: AshishKumar Mishra <ashishkumar.mishra@bmwtechworks.in>
----
- src/shared/fdset.c | 35 ++++++++++++++++++++++++++---------
- 1 file changed, 26 insertions(+), 9 deletions(-)
-
-diff --git a/src/shared/fdset.c b/src/shared/fdset.c
-index 832e7fda60..f340f41b0e 100644
---- a/src/shared/fdset.c
-+++ b/src/shared/fdset.c
-@@ -8,6 +8,7 @@
- #include "alloc-util.h"
- #include "async.h"
- #include "dirent-util.h"
-+#include "errno-util.h"
- #include "fd-util.h"
- #include "fdset.h"
- #include "log.h"
-@@ -179,9 +180,10 @@ int fdset_new_fill(
- d = opendir("/proc/self/fd");
- if (!d) {
- if (errno == ENOENT && proc_mounted() == 0)
-- return -ENOSYS;
-+ return log_debug_errno(SYNTHETIC_ERRNO(ENOSYS),
-+ "Failed to open /proc/self/fd/, /proc/ is not mounted.");
-
-- return -errno;
-+ return log_debug_errno(errno, "Failed to open /proc/self/fd/: %m ");
- }
-
- s = fdset_new();
-@@ -210,9 +212,14 @@ int fdset_new_fill(
- * been passed in can be collected and fds which have been created locally can be
- * ignored, under the assumption that only the latter have O_CLOEXEC set. */
-
-- fl = fcntl(fd, F_GETFD);
-- if (fl < 0)
-- return -errno;
-+ fl = RET_NERRNO(fcntl(fd, F_GETFD));
-+ if (fl < 0) {
-+ _cleanup_free_ char *path = NULL;
-+ (void) fd_get_path(fd, &path);
-+ return log_debug_errno(fl,
-+ "Failed to get flag of fd=%d (%s): %m ",
-+ fd, strna(path));
-+ }
-
- if (FLAGS_SET(fl, FD_CLOEXEC) != !!filter_cloexec)
- continue;
-@@ -221,13 +228,23 @@ int fdset_new_fill(
- /* We need to set CLOEXEC manually only if we're collecting non-CLOEXEC fds. */
- if (filter_cloexec <= 0) {
- r = fd_cloexec(fd, true);
-- if (r < 0)
-- return r;
-+ if (r < 0) {
-+ _cleanup_free_ char *path = NULL;
-+ (void) fd_get_path(fd, &path);
-+ return log_debug_errno(r,
-+ "Failed to set CLOEXEC flag fd=%d (%s): %m ",
-+ fd, strna(path));
-+ }
- }
-
- r = fdset_put(s, fd);
-- if (r < 0)
-- return r;
-+ if (r < 0) {
-+ _cleanup_free_ char *path = NULL;
-+ (void) fd_get_path(fd, &path);
-+ return log_debug_errno(r,
-+ "Failed to put fd=%d (%s) into fdset: %m ",
-+ fd, strna(path));
-+ }
- }
-
- *ret = TAKE_PTR(s);
---
-2.34.1
-
diff --git a/meta/recipes-core/systemd/systemd_259.5.bb b/meta/recipes-core/systemd/systemd_261.bb
similarity index 99%
rename from meta/recipes-core/systemd/systemd_259.5.bb
rename to meta/recipes-core/systemd/systemd_261.bb
index f3ec0edae7..eedce348c3 100644
--- a/meta/recipes-core/systemd/systemd_259.5.bb
+++ b/meta/recipes-core/systemd/systemd_261.bb
@@ -32,9 +32,6 @@ SRC_URI += " \
file://systemd-pager.sh \
file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
file://0003-Do-not-create-var-log-README.patch \
- file://0001-meson-use-libfido2_cflags-dependency.patch \
- file://0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch \
- file://0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch \
"
PAM_PLUGINS = " \
@@ -226,9 +223,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
-Ddbus=disabled \
-Dtests=false \
-Dlibc=${TCLIBC} \
- -Drc-local='' \
- -Dsysvinit-path='' \
- -Dsysvrcnd-path='' \
"
# Hardcode target binary paths to avoid using paths from sysroot or worse
@@ -582,6 +576,8 @@ FILES:${PN}-extra-utils = "\
${bindir}/systemd-cgtop \
${bindir}/systemd-stdio-bridge \
${base_sbindir}/mount.ddi \
+ ${base_sbindir}/mount.mstack \
+ ${base_sbindir}/mount.storage \
${systemd_system_unitdir}/initrd.target.wants/systemd-pcrphase-initrd.path \
${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase.path \
${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.path \
@@ -678,6 +674,7 @@ FILES:${PN} = " ${base_bindir}/* \
${datadir}/polkit-1 \
${datadir}/${BPN} \
${datadir}/factory \
+ ${datadir}/user-tmpfiles.d \
${sysconfdir}/credstore/ \
${sysconfdir}/credstore.encrypted/ \
${sysconfdir}/dbus-1/ \
@@ -687,6 +684,7 @@ FILES:${PN} = " ${base_bindir}/* \
${sysconfdir}/sysctl.d/ \
${sysconfdir}/systemd/ \
${sysconfdir}/tmpfiles.d/ \
+ ${sysconfdir}/user-tmpfiles.d/ \
${sysconfdir}/xdg/ \
${sysconfdir}/init.d/README \
${sysconfdir}/resolv-conf.systemd \
@@ -797,11 +795,13 @@ FILES:udev += "${base_sbindir}/udevd \
${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 \
+ ${nonarch_libdir}/udev/rules.d/60-tpm2-id.rules \
${nonarch_libdir}/udev/rules.d/60-persistent-v4l.rules \
${nonarch_libdir}/udev/rules.d/60-sensor.rules \
${nonarch_libdir}/udev/rules.d/60-serial.rules \
${nonarch_libdir}/udev/rules.d/61-autosuspend-manual.rules \
${nonarch_libdir}/udev/rules.d/64-btrfs.rules \
+ ${nonarch_libdir}/udev/rules.d/65-integration.rules \
${nonarch_libdir}/udev/rules.d/70-camera.rules \
${nonarch_libdir}/udev/rules.d/70-joystick.rules \
${nonarch_libdir}/udev/rules.d/70-memory.rules \
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [OE-core] [PATCH v3 2/3] systemd: upgrade to 261
2026-06-30 11:50 ` [PATCH v3 2/3] systemd: upgrade to 261 daniel.turull
@ 2026-06-30 23:08 ` Khem Raj
2026-07-01 7:12 ` Daniel Turull
0 siblings, 1 reply; 14+ messages in thread
From: Khem Raj @ 2026-06-30 23:08 UTC (permalink / raw)
To: daniel.turull
Cc: openembedded-core, qi.chen, alex.kanavin, richard.purdie,
Ross.Burton, mathieu.dubois-briand
[-- Attachment #1: Type: text/plain, Size: 22869 bytes --]
I think, this patch also needs to revert changes from -
https://git.openembedded.org/openembedded-core/commit/?id=30140cb9354
its fails in do_install of systemd-systemctl-native right now.
On Tue, Jun 30, 2026 at 4:50 AM Daniel Turull via lists.openembedded.org
<daniel.turull=ericsson.com@lists.openembedded.org> wrote:
> From: Daniel Turull <daniel.turull@ericsson.com>
>
> Changes: https://github.com/systemd/systemd/compare/v259.5...v261-stable
>
> - Drop backported patches no longer needed (libfido2_cflags,
> tpm2-util PCR bank, fdset_new debug)
> - Remove sysvinit-path/sysvrcnd-path meson options and
> systemd-sysv-install skeleton (removed upstream in 260)
> - Add explicit meson disables for auto-detected features in
> systemd-systemctl-native to prevent host sysroot contamination
> - Refresh 0003-Do-not-create-var-log-README.patch
>
> Tested on qemu target with testsuite systemd
>
> AI-Generated: Claude-opus-4.6
> Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
> ---
> ...ve_259.5.bb => systemd-boot-native_261.bb} | 0
> ...temd-boot_259.5.bb => systemd-boot_261.bb} | 0
> ...9.5.bb => systemd-systemctl-native_261.bb} | 8 +-
> meta/recipes-core/systemd/systemd.inc | 8 +-
> ...meson-use-libfido2_cflags-dependency.patch | 54 -----------
> .../0003-Do-not-create-var-log-README.patch | 10 +-
> ...il-fix-PCR-bank-guessing-without-EFI.patch | 62 ------------
> ...-detailed-debug-logging-to-fdset_new.patch | 97 -------------------
> .../{systemd_259.5.bb => systemd_261.bb} | 12 +--
> 9 files changed, 18 insertions(+), 233 deletions(-)
> rename meta/recipes-core/systemd/{systemd-boot-native_259.5.bb =>
> systemd-boot-native_261.bb} (100%)
> rename meta/recipes-core/systemd/{systemd-boot_259.5.bb =>
> systemd-boot_261.bb} (100%)
> rename meta/recipes-core/systemd/{systemd-systemctl-native_259.5.bb =>
> systemd-systemctl-native_261.bb} (54%)
> delete mode 100644
> meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch
> delete mode 100644
> meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch
> delete mode 100644
> meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch
> rename meta/recipes-core/systemd/{systemd_259.5.bb => systemd_261.bb}
> (99%)
>
> diff --git a/meta/recipes-core/systemd/systemd-boot-native_259.5.bb
> b/meta/recipes-core/systemd/systemd-boot-native_261.bb
> similarity index 100%
> rename from meta/recipes-core/systemd/systemd-boot-native_259.5.bb
> rename to meta/recipes-core/systemd/systemd-boot-native_261.bb
> diff --git a/meta/recipes-core/systemd/systemd-boot_259.5.bb
> b/meta/recipes-core/systemd/systemd-boot_261.bb
> similarity index 100%
> rename from meta/recipes-core/systemd/systemd-boot_259.5.bb
> rename to meta/recipes-core/systemd/systemd-boot_261.bb
> diff --git a/meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb
> b/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
> similarity index 54%
> rename from meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb
> rename to meta/recipes-core/systemd/systemd-systemctl-native_261.bb
> index bf9c9f4776..28fddc79df 100644
> --- a/meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb
> +++ b/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
> @@ -10,8 +10,14 @@ inherit pkgconfig meson native
>
> MESON_TARGET = "systemctl"
> MESON_INSTALL_TAGS = "systemctl"
> +# Explicitly disable features that meson auto-detects from the native
> sysroot.
> +# Only systemctl is built here; these prevent spurious dependencies and
> ensure
> +# reproducible builds regardless of what is installed on the build host.
> EXTRA_OEMESON += "-Dlink-systemctl-shared=false"
> -EXTRA_OEMESON += "-Dsysvinit-path= -Dsysvrcnd-path="
> +EXTRA_OEMESON += "-Dpam=disabled -Daudit=disabled -Dselinux=disabled"
> +EXTRA_OEMESON += "-Dacl=disabled -Dapparmor=disabled -Dseccomp=disabled"
> +EXTRA_OEMESON += "-Dlibcryptsetup=disabled -Dlibcurl=disabled
> -Dlibfido2=disabled"
> +EXTRA_OEMESON += "-Dpcre2=disabled -Dp11kit=disabled -Dopenssl=disabled"
>
> # Systemctl is supposed to operate on target, but the target sysroot is
> not
> # determined at run-time, but rather set during configure
> diff --git a/meta/recipes-core/systemd/systemd.inc
> b/meta/recipes-core/systemd/systemd.inc
> index f107c4c5da..d9048e9187 100644
> --- a/meta/recipes-core/systemd/systemd.inc
> +++ b/meta/recipes-core/systemd/systemd.inc
> @@ -15,14 +15,10 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
> LIC_FILES_CHKSUM =
> "file://LICENSE.GPL2;md5=c09786363500a9acc29b147e6e72d2c6 \
>
> file://LICENSE.LGPL2.1;md5=be0aaf4a380f73f7e00b420a007368f2"
>
> -SRCREV = "b3d8fc43e9cb531d958c17ef2cd93b374bc14e8a"
> -SRCBRANCH = "v259-stable"
> +SRCREV = "de9dbc37ad4aa637e200ac02a0545095997055df"
> +SRCBRANCH = "v261-stable"
> SRC_URI = "git://
> github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV}
> <http://github.com/systemd/systemd.git;protocol=https;branch=$%7BSRCBRANCH%7D;tag=v$%7BPV%7D>
> "
>
> CVE_PRODUCT = "systemd"
>
> CVE_STATUS[CVE-2019-3815] = "not-applicable-platform: only applied to
> RHEL"
> -CVE_STATUS[CVE-2026-40223] = "fixed-version: fixed in 259.2"
> -CVE_STATUS[CVE-2026-40224] = "fixed-version: fixed in 259.3"
> -CVE_STATUS[CVE-2026-40225] = "fixed-version: fixed in 259.5"
> -CVE_STATUS[CVE-2026-40226] = "fixed-version: fixed in 259.4"
> diff --git
> a/meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch
> b/meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch
> deleted file mode 100644
> index 4bc1e10ee7..0000000000
> ---
> a/meta/recipes-core/systemd/systemd/0001-meson-use-libfido2_cflags-dependency.patch
> +++ /dev/null
> @@ -1,54 +0,0 @@
> -From 97142fd1db4124de5d5bdd3f49cc5a390286e522 Mon Sep 17 00:00:00 2001
> -From: Dan McGregor <danmcgr@protonmail.com>
> -Date: Wed, 11 Mar 2026 18:26:05 -0600
> -Subject: [PATCH] meson: use libfido2_cflags dependency
> -
> -Add the libfido2 dependency to cryptenroll and cryptsetup's
> -meson files. If libfido2's not installed in the default path
> -the build wasn't finding its headers correctly.
> -
> -Signed-off-by: Dan McGregor <danmcgr@protonmail.com>
> -Upstream-Status: Backport [
> https://github.com/systemd/systemd/commit/9ce905e35f690e7a10cd286be2b50594d0857f5e
> ]
> ----
> - src/cryptenroll/meson.build | 1 +
> - src/cryptsetup/cryptsetup-tokens/meson.build | 2 +-
> - src/cryptsetup/meson.build | 1 +
> - 3 files changed, 3 insertions(+), 1 deletion(-)
> -
> -diff --git a/src/cryptenroll/meson.build b/src/cryptenroll/meson.build
> -index 488ceea14d..11265c8b41 100644
> ---- a/src/cryptenroll/meson.build
> -+++ b/src/cryptenroll/meson.build
> -@@ -23,6 +23,7 @@ executables += [
> - 'dependencies' : [
> - libcryptsetup,
> - libdl,
> -+ libfido2_cflags,
> - libopenssl,
> - libp11kit_cflags,
> - ],
> -diff --git a/src/cryptsetup/cryptsetup-tokens/meson.build
> b/src/cryptsetup/cryptsetup-tokens/meson.build
> -index 804e18bc67..0fd6309201 100644
> ---- a/src/cryptsetup/cryptsetup-tokens/meson.build
> -+++ b/src/cryptsetup/cryptsetup-tokens/meson.build
> -@@ -58,7 +58,7 @@ modules += [
> - 'sources' : cryptsetup_token_systemd_fido2_sources,
> - 'dependencies' : [
> - libcryptsetup,
> -- libfido2,
> -+ libfido2_cflags,
> - ],
> - },
> - template + {
> -diff --git a/src/cryptsetup/meson.build b/src/cryptsetup/meson.build
> -index d9778259c2..b36354fb0a 100644
> ---- a/src/cryptsetup/meson.build
> -+++ b/src/cryptsetup/meson.build
> -@@ -19,6 +19,7 @@ executables += [
> - 'sources' : systemd_cryptsetup_sources,
> - 'dependencies' : [
> - libcryptsetup,
> -+ libfido2_cflags,
> - libmount_cflags,
> - libopenssl,
> - libp11kit_cflags,
> 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 1d3c4f83c0..0128c83d9f 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,7 +1,7 @@
> From a7f6a296707642d05463aec22ea3dfce7d06c989 Mon Sep 17 00:00:00 2001
> From: Peter Kjellerstedt <pkj@axis.com>
> Date: Tue, 21 Jan 2025 05:02:00 +0100
> -Subject: [PATCH 03/16] Do not create /var/log/README
> +Subject: [PATCH] Do not create /var/log/README
>
> /var/log/README is a link to /usr/share/doc/systemd/README.logs. The
> latter is packaged in systemd-doc and likely not installed, which leaves
> @@ -15,19 +15,15 @@ Signed-off-by: Peter Kjellerstedt <
> peter.kjellerstedt@axis.com>
> 1 file changed, 3 deletions(-)
>
> diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
> -index cdef21fa9b..03798c953e 100644
> +index cdef21fa9b..7890abcdef 100644
> --- a/tmpfiles.d/legacy.conf.in
> +++ b/tmpfiles.d/legacy.conf.in
> -@@ -13,9 +13,6 @@
> +@@ -13,6 +13,3 @@
>
> d /run/lock 0755 root root -
> L /var/lock - - - - ../run/lock
> -{% if CREATE_LOG_DIRS %}
> -L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
> -{% endif %}
> -
> - {% if HAVE_SYSV_COMPAT %}
> - # /run/lock/subsys is used for serializing SysV service execution, and
> --
> 2.34.1
> -
> diff --git
> a/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch
> b/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch
> deleted file mode 100644
> index c590b01cd3..0000000000
> ---
> a/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch
> +++ /dev/null
> @@ -1,62 +0,0 @@
> -From 3cef11c710e95bb5f891181e9b2a6d8f174712c3 Mon Sep 17 00:00:00 2001
> -From: Patrick Wicki <patrick.wicki@subset.ch>
> -Date: Fri, 20 Mar 2026 15:56:56 +0100
> -Subject: [PATCH] tpm2-util: fix PCR bank guessing without EFI
> -
> -Since 7643e4a89 efi_get_active_pcr_banks() is used to determine the
> -active PCR banks. Without EFI support, this returns -EOPNOTSUPP. This in
> -turns leads to cryptenroll and cryptsetup attach failures unless the PCR
> -bank is explicitly set, i.e.
> -
> -$ systemd-cryptenroll $LUKS_PART --tpm2-device=auto --tpm2-pcrs='7'
> -[...]
> -Could not read pcr values: Operation not supported
> -
> -But it works fine with --tpm2-pcrs='7:sha256'.
> -
> -Similarly, unsealing during cryptsetup attach also fails if the bank
> -needs to be determined:
> -
> -Failed to unseal secret using TPM2: Operation not supported
> -
> -Catch the -EOPNOTSUPP and fallback to the guessing strategy.
> -
> -Upstream-Status: Backport [https://github.com/systemd/systemd/pull/41231]
> -
> -Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
> ----
> - src/shared/tpm2-util.c | 8 ++++----
> - 1 file changed, 4 insertions(+), 4 deletions(-)
> -
> -diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
> -index cf11b50695..c0590fe575 100644
> ---- a/src/shared/tpm2-util.c
> -+++ b/src/shared/tpm2-util.c
> -@@ -2702,11 +2702,11 @@ int tpm2_get_best_pcr_bank(
> - uint32_t efi_banks;
> - r = efi_get_active_pcr_banks(&efi_banks);
> - if (r < 0) {
> -- if (r != -ENOENT)
> -+ if (!IN_SET(r, -ENOENT, -EOPNOTSUPP))
> - return r;
> -
> - /* If variable is not set use guesswork below */
> -- log_debug("Boot loader didn't set the
> LoaderTpm2ActivePcrBanks EFI variable, we have to guess the used PCR
> banks.");
> -+ log_debug("Boot loader didn't set the
> LoaderTpm2ActivePcrBanks EFI variable or EFI support is unavailable, we
> have to guess the used PCR banks.");
> - } else if (efi_banks == UINT32_MAX)
> - log_debug("Boot loader set the LoaderTpm2ActivePcrBanks
> EFI variable to indicate that the GetActivePcrBanks() API is not available
> in the firmware. We have to guess the used PCR banks.");
> - else {
> -@@ -2811,11 +2811,11 @@ int tpm2_get_good_pcr_banks(
> - uint32_t efi_banks;
> - r = efi_get_active_pcr_banks(&efi_banks);
> - if (r < 0) {
> -- if (r != -ENOENT)
> -+ if (!IN_SET(r, -ENOENT, -EOPNOTSUPP))
> - return r;
> -
> - /* If the variable is not set we have to guess via the
> code below */
> -- log_debug("Boot loader didn't set the
> LoaderTpm2ActivePcrBanks EFI variable, we have to guess the used PCR
> banks.");
> -+ log_debug("Boot loader didn't set the
> LoaderTpm2ActivePcrBanks EFI variable or EFI support is unavailable, we
> have to guess the used PCR banks.");
> - } else if (efi_banks == UINT32_MAX)
> - log_debug("Boot loader set the LoaderTpm2ActivePcrBanks
> EFI variable to indicate that the GetActivePcrBanks() API is not available
> in the firmware. We have to guess the used PCR banks.");
> - else {
> diff --git
> a/meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch
> b/meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch
> deleted file mode 100644
> index 63fa7fefec..0000000000
> ---
> a/meta/recipes-core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch
> +++ /dev/null
> @@ -1,97 +0,0 @@
> -From 0565f9f27323a8f9e62d85f2add542af99cea06a Mon Sep 17 00:00:00 2001
> -From: AshishKumar Mishra <ashishkumar.mishra@bmwtechworks.in>
> -Date: Wed, 21 Jan 2026 14:13:29 +0530
> -Subject: [PATCH] systemd: Add detailed debug logging to fdset_new_fill()
> -
> -Currently, when fdset_new_fill() fails to open /proc/self/fd or
> -encounters an error while processing individual file descriptors
> -(such as fcntl or fstat failures), it returns a silent error code.
> -
> -For debugging rarely reproducible failures it becomes difficult to
> -know the exact cause of failure
> -This commit updates the function to use log_debug_errno() for all
> -error paths and hence provides better visibility into why FD collection
> -failed, including the path of the problematic FD (via fd_get_path)
> -and its inode type.
> -
> -Upstream-Status: Backport [https://github.com/systemd/systemd/pull/40385]
> -
> -Signed-off-by: AshishKumar Mishra <ashishkumar.mishra@bmwtechworks.in>
> ----
> - src/shared/fdset.c | 35 ++++++++++++++++++++++++++---------
> - 1 file changed, 26 insertions(+), 9 deletions(-)
> -
> -diff --git a/src/shared/fdset.c b/src/shared/fdset.c
> -index 832e7fda60..f340f41b0e 100644
> ---- a/src/shared/fdset.c
> -+++ b/src/shared/fdset.c
> -@@ -8,6 +8,7 @@
> - #include "alloc-util.h"
> - #include "async.h"
> - #include "dirent-util.h"
> -+#include "errno-util.h"
> - #include "fd-util.h"
> - #include "fdset.h"
> - #include "log.h"
> -@@ -179,9 +180,10 @@ int fdset_new_fill(
> - d = opendir("/proc/self/fd");
> - if (!d) {
> - if (errno == ENOENT && proc_mounted() == 0)
> -- return -ENOSYS;
> -+ return log_debug_errno(SYNTHETIC_ERRNO(ENOSYS),
> -+ "Failed to open
> /proc/self/fd/, /proc/ is not mounted.");
> -
> -- return -errno;
> -+ return log_debug_errno(errno, "Failed to open
> /proc/self/fd/: %m ");
> - }
> -
> - s = fdset_new();
> -@@ -210,9 +212,14 @@ int fdset_new_fill(
> - * been passed in can be collected and fds which
> have been created locally can be
> - * ignored, under the assumption that only the
> latter have O_CLOEXEC set. */
> -
> -- fl = fcntl(fd, F_GETFD);
> -- if (fl < 0)
> -- return -errno;
> -+ fl = RET_NERRNO(fcntl(fd, F_GETFD));
> -+ if (fl < 0) {
> -+ _cleanup_free_ char *path = NULL;
> -+ (void) fd_get_path(fd, &path);
> -+ return log_debug_errno(fl,
> -+ "Failed to get
> flag of fd=%d (%s): %m ",
> -+ fd, strna(path));
> -+ }
> -
> - if (FLAGS_SET(fl, FD_CLOEXEC) !=
> !!filter_cloexec)
> - continue;
> -@@ -221,13 +228,23 @@ int fdset_new_fill(
> - /* We need to set CLOEXEC manually only if we're
> collecting non-CLOEXEC fds. */
> - if (filter_cloexec <= 0) {
> - r = fd_cloexec(fd, true);
> -- if (r < 0)
> -- return r;
> -+ if (r < 0) {
> -+ _cleanup_free_ char *path = NULL;
> -+ (void) fd_get_path(fd, &path);
> -+ return log_debug_errno(r,
> -+ "Failed to set
> CLOEXEC flag fd=%d (%s): %m ",
> -+ fd, strna(path));
> -+ }
> - }
> -
> - r = fdset_put(s, fd);
> -- if (r < 0)
> -- return r;
> -+ if (r < 0) {
> -+ _cleanup_free_ char *path = NULL;
> -+ (void) fd_get_path(fd, &path);
> -+ return log_debug_errno(r,
> -+ "Failed to put fd=%d (%s)
> into fdset: %m ",
> -+ fd, strna(path));
> -+ }
> - }
> -
> - *ret = TAKE_PTR(s);
> ---
> -2.34.1
> -
> diff --git a/meta/recipes-core/systemd/systemd_259.5.bb
> b/meta/recipes-core/systemd/systemd_261.bb
> similarity index 99%
> rename from meta/recipes-core/systemd/systemd_259.5.bb
> rename to meta/recipes-core/systemd/systemd_261.bb
> index f3ec0edae7..eedce348c3 100644
> --- a/meta/recipes-core/systemd/systemd_259.5.bb
> +++ b/meta/recipes-core/systemd/systemd_261.bb
> @@ -32,9 +32,6 @@ SRC_URI += " \
> file://systemd-pager.sh \
>
> file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
> file://0003-Do-not-create-var-log-README.patch \
> - file://0001-meson-use-libfido2_cflags-dependency.patch \
> -
> file://0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch \
> - file://0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch \
> "
>
> PAM_PLUGINS = " \
> @@ -226,9 +223,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
> -Ddbus=disabled \
> -Dtests=false \
> -Dlibc=${TCLIBC} \
> - -Drc-local='' \
> - -Dsysvinit-path='' \
> - -Dsysvrcnd-path='' \
> "
>
> # Hardcode target binary paths to avoid using paths from sysroot or worse
> @@ -582,6 +576,8 @@ FILES:${PN}-extra-utils = "\
> ${bindir}/systemd-cgtop \
> ${bindir}/systemd-stdio-bridge \
> ${base_sbindir}/mount.ddi \
> + ${base_sbindir}/mount.mstack \
> + ${base_sbindir}/mount.storage \
>
> ${systemd_system_unitdir}/initrd.target.wants/systemd-pcrphase-initrd.path
> \
>
> ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase.path \
>
> ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.path
> \
> @@ -678,6 +674,7 @@ FILES:${PN} = " ${base_bindir}/* \
> ${datadir}/polkit-1 \
> ${datadir}/${BPN} \
> ${datadir}/factory \
> + ${datadir}/user-tmpfiles.d \
> ${sysconfdir}/credstore/ \
> ${sysconfdir}/credstore.encrypted/ \
> ${sysconfdir}/dbus-1/ \
> @@ -687,6 +684,7 @@ FILES:${PN} = " ${base_bindir}/* \
> ${sysconfdir}/sysctl.d/ \
> ${sysconfdir}/systemd/ \
> ${sysconfdir}/tmpfiles.d/ \
> + ${sysconfdir}/user-tmpfiles.d/ \
> ${sysconfdir}/xdg/ \
> ${sysconfdir}/init.d/README \
> ${sysconfdir}/resolv-conf.systemd \
> @@ -797,11 +795,13 @@ FILES:udev += "${base_sbindir}/udevd \
> ${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 \
> + ${nonarch_libdir}/udev/rules.d/60-tpm2-id.rules \
> ${nonarch_libdir}/udev/rules.d/60-persistent-v4l.rules \
> ${nonarch_libdir}/udev/rules.d/60-sensor.rules \
> ${nonarch_libdir}/udev/rules.d/60-serial.rules \
> ${nonarch_libdir}/udev/rules.d/61-autosuspend-manual.rules
> \
> ${nonarch_libdir}/udev/rules.d/64-btrfs.rules \
> + ${nonarch_libdir}/udev/rules.d/65-integration.rules \
> ${nonarch_libdir}/udev/rules.d/70-camera.rules \
> ${nonarch_libdir}/udev/rules.d/70-joystick.rules \
> ${nonarch_libdir}/udev/rules.d/70-memory.rules \
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#239883):
> https://lists.openembedded.org/g/openembedded-core/message/239883
> Mute This Topic: https://lists.openembedded.org/mt/120045145/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 31038 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [OE-core] [PATCH v3 2/3] systemd: upgrade to 261
2026-06-30 23:08 ` [OE-core] " Khem Raj
@ 2026-07-01 7:12 ` Daniel Turull
0 siblings, 0 replies; 14+ messages in thread
From: Daniel Turull @ 2026-07-01 7:12 UTC (permalink / raw)
To: raj.khem@gmail.com
Cc: qi.chen@windriver.com, openembedded-core@lists.openembedded.org,
richard.purdie@linuxfoundation.org, alex.kanavin@gmail.com,
Ross.Burton@arm.com, mathieu.dubois-briand@bootlin.com
Hi,
I think I created some confusion with my v3 patches. I tried to be
proactive and I rebase them on top of Ross meson patches. This is v3. I
put a note in the cover letter but probably I should have put it also
in the commit message.
https://patchwork.yoctoproject.org/project/oe-core/patch/20260629141559.1305873-1-ross.burton@arm.com/
v2: is without Ross patches since they were not in the mailing list
when I sent mine. Probably in master-next we should keep v2.
Best regards,
Daniel
On Tue, 2026-06-30 at 16:08 -0700, Khem Raj wrote:
> I think, this patch also needs to revert changes from -
> https://git.openembedded.org/openembedded-core/commit/?id=30140cb935
> 4
> its fails in do_install of systemd-systemctl-native right now.
>
> On Tue, Jun 30, 2026 at 4:50 AM Daniel Turull via
> lists.openembedded.org
> <daniel.turull=ericsson.com@lists.openembedded.org> wrote:
> > From: Daniel Turull <daniel.turull@ericsson.com>
> >
> > Changes:
> > https://github.com/systemd/systemd/compare/v259.5...v261-stable
> >
> > - Drop backported patches no longer needed (libfido2_cflags,
> > tpm2-util PCR bank, fdset_new debug)
> > - Remove sysvinit-path/sysvrcnd-path meson options and
> > systemd-sysv-install skeleton (removed upstream in 260)
> > - Add explicit meson disables for auto-detected features in
> > systemd-systemctl-native to prevent host sysroot contamination
> > - Refresh 0003-Do-not-create-var-log-README.patch
> >
> > Tested on qemu target with testsuite systemd
> >
> > AI-Generated: Claude-opus-4.6
> > Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
> > ---
> > ...ve_259.5.bb => systemd-boot-native_261.bb} | 0
> > ...temd-boot_259.5.bb => systemd-boot_261.bb} | 0
> > ...9.5.bb => systemd-systemctl-native_261.bb} | 8 +-
> > meta/recipes-core/systemd/systemd.inc | 8 +-
> > ...meson-use-libfido2_cflags-dependency.patch | 54 -----------
> > .../0003-Do-not-create-var-log-README.patch | 10 +-
> > ...il-fix-PCR-bank-guessing-without-EFI.patch | 62 ------------
> > ...-detailed-debug-logging-to-fdset_new.patch | 97 ---------------
> > ----
> > .../{systemd_259.5.bb => systemd_261.bb} | 12 +--
> > 9 files changed, 18 insertions(+), 233 deletions(-)
> > rename meta/recipes-core/systemd/{systemd-boot-native_259.5.bb =>
> > systemd-boot-native_261.bb} (100%)
> > rename meta/recipes-core/systemd/{systemd-boot_259.5.bb =>
> > systemd-boot_261.bb} (100%)
> > rename meta/recipes-core/systemd/{systemd-systemctl-
> > native_259.5.bb => systemd-systemctl-native_261.bb} (54%)
> > delete mode 100644 meta/recipes-core/systemd/systemd/0001-meson-
> > use-libfido2_cflags-dependency.patch
> > delete mode 100644 meta/recipes-core/systemd/systemd/0004-tpm2-
> > util-fix-PCR-bank-guessing-without-EFI.patch
> > delete mode 100644 meta/recipes-core/systemd/systemd/0018-shared-
> > fdset-add-detailed-debug-logging-to-fdset_new.patch
> > rename meta/recipes-core/systemd/{systemd_259.5.bb =>
> > systemd_261.bb} (99%)
> >
> > diff --git a/meta/recipes-core/systemd/systemd-boot-native_259.5.bb
> > b/meta/recipes-core/systemd/systemd-boot-native_261.bb
> > similarity index 100%
> > rename from meta/recipes-core/systemd/systemd-boot-native_259.5.bb
> > rename to meta/recipes-core/systemd/systemd-boot-native_261.bb
> > diff --git a/meta/recipes-core/systemd/systemd-boot_259.5.bb
> > b/meta/recipes-core/systemd/systemd-boot_261.bb
> > similarity index 100%
> > rename from meta/recipes-core/systemd/systemd-boot_259.5.bb
> > rename to meta/recipes-core/systemd/systemd-boot_261.bb
> > diff --git a/meta/recipes-core/systemd/systemd-systemctl-
> > native_259.5.bb b/meta/recipes-core/systemd/systemd-systemctl-
> > native_261.bb
> > similarity index 54%
> > rename from meta/recipes-core/systemd/systemd-systemctl-
> > native_259.5.bb
> > rename to meta/recipes-core/systemd/systemd-systemctl-native_261.bb
> > index bf9c9f4776..28fddc79df 100644
> > --- a/meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb
> > +++ b/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
> > @@ -10,8 +10,14 @@ inherit pkgconfig meson native
> >
> > MESON_TARGET = "systemctl"
> > MESON_INSTALL_TAGS = "systemctl"
> > +# Explicitly disable features that meson auto-detects from the
> > native sysroot.
> > +# Only systemctl is built here; these prevent spurious
> > dependencies and ensure
> > +# reproducible builds regardless of what is installed on the build
> > host.
> > EXTRA_OEMESON += "-Dlink-systemctl-shared=false"
> > -EXTRA_OEMESON += "-Dsysvinit-path= -Dsysvrcnd-path="
> > +EXTRA_OEMESON += "-Dpam=disabled -Daudit=disabled -
> > Dselinux=disabled"
> > +EXTRA_OEMESON += "-Dacl=disabled -Dapparmor=disabled -
> > Dseccomp=disabled"
> > +EXTRA_OEMESON += "-Dlibcryptsetup=disabled -Dlibcurl=disabled -
> > Dlibfido2=disabled"
> > +EXTRA_OEMESON += "-Dpcre2=disabled -Dp11kit=disabled -
> > Dopenssl=disabled"
> >
> > # Systemctl is supposed to operate on target, but the target
> > sysroot is not
> > # determined at run-time, but rather set during configure
> > diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-
> > core/systemd/systemd.inc
> > index f107c4c5da..d9048e9187 100644
> > --- a/meta/recipes-core/systemd/systemd.inc
> > +++ b/meta/recipes-core/systemd/systemd.inc
> > @@ -15,14 +15,10 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
> > LIC_FILES_CHKSUM =
> > "file://LICENSE.GPL2;md5=c09786363500a9acc29b147e6e72d2c6 \
> >
> > file://LICENSE.LGPL2.1;md5=be0aaf4a380f73f7e00b420a007368f2"
> >
> > -SRCREV = "b3d8fc43e9cb531d958c17ef2cd93b374bc14e8a"
> > -SRCBRANCH = "v259-stable"
> > +SRCREV = "de9dbc37ad4aa637e200ac02a0545095997055df"
> > +SRCBRANCH = "v261-stable"
> > SRC_URI =
> > "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBR
> > ANCH};tag=v${PV}"
> >
> > CVE_PRODUCT = "systemd"
> >
> > CVE_STATUS[CVE-2019-3815] = "not-applicable-platform: only applied
> > to RHEL"
> > -CVE_STATUS[CVE-2026-40223] = "fixed-version: fixed in 259.2"
> > -CVE_STATUS[CVE-2026-40224] = "fixed-version: fixed in 259.3"
> > -CVE_STATUS[CVE-2026-40225] = "fixed-version: fixed in 259.5"
> > -CVE_STATUS[CVE-2026-40226] = "fixed-version: fixed in 259.4"
> > diff --git a/meta/recipes-core/systemd/systemd/0001-meson-use-
> > libfido2_cflags-dependency.patch b/meta/recipes-
> > core/systemd/systemd/0001-meson-use-libfido2_cflags-
> > dependency.patch
> > deleted file mode 100644
> > index 4bc1e10ee7..0000000000
> > --- a/meta/recipes-core/systemd/systemd/0001-meson-use-
> > libfido2_cflags-dependency.patch
> > +++ /dev/null
> > @@ -1,54 +0,0 @@
> > -From 97142fd1db4124de5d5bdd3f49cc5a390286e522 Mon Sep 17 00:00:00
> > 2001
> > -From: Dan McGregor <danmcgr@protonmail.com>
> > -Date: Wed, 11 Mar 2026 18:26:05 -0600
> > -Subject: [PATCH] meson: use libfido2_cflags dependency
> > -
> > -Add the libfido2 dependency to cryptenroll and cryptsetup's
> > -meson files. If libfido2's not installed in the default path
> > -the build wasn't finding its headers correctly.
> > -
> > -Signed-off-by: Dan McGregor <danmcgr@protonmail.com>
> > -Upstream-Status: Backport
> > [https://github.com/systemd/systemd/commit/9ce905e35f690e7a10cd286b
> > e2b50594d0857f5e]
> > ----
> > - src/cryptenroll/meson.build | 1 +
> > - src/cryptsetup/cryptsetup-tokens/meson.build | 2 +-
> > - src/cryptsetup/meson.build | 1 +
> > - 3 files changed, 3 insertions(+), 1 deletion(-)
> > -
> > -diff --git a/src/cryptenroll/meson.build
> > b/src/cryptenroll/meson.build
> > -index 488ceea14d..11265c8b41 100644
> > ---- a/src/cryptenroll/meson.build
> > -+++ b/src/cryptenroll/meson.build
> > -@@ -23,6 +23,7 @@ executables += [
> > - 'dependencies' : [
> > - libcryptsetup,
> > - libdl,
> > -+ libfido2_cflags,
> > - libopenssl,
> > - libp11kit_cflags,
> > - ],
> > -diff --git a/src/cryptsetup/cryptsetup-tokens/meson.build
> > b/src/cryptsetup/cryptsetup-tokens/meson.build
> > -index 804e18bc67..0fd6309201 100644
> > ---- a/src/cryptsetup/cryptsetup-tokens/meson.build
> > -+++ b/src/cryptsetup/cryptsetup-tokens/meson.build
> > -@@ -58,7 +58,7 @@ modules += [
> > - 'sources' :
> > cryptsetup_token_systemd_fido2_sources,
> > - 'dependencies' : [
> > - libcryptsetup,
> > -- libfido2,
> > -+ libfido2_cflags,
> > - ],
> > - },
> > - template + {
> > -diff --git a/src/cryptsetup/meson.build
> > b/src/cryptsetup/meson.build
> > -index d9778259c2..b36354fb0a 100644
> > ---- a/src/cryptsetup/meson.build
> > -+++ b/src/cryptsetup/meson.build
> > -@@ -19,6 +19,7 @@ executables += [
> > - 'sources' : systemd_cryptsetup_sources,
> > - 'dependencies' : [
> > - libcryptsetup,
> > -+ libfido2_cflags,
> > - libmount_cflags,
> > - libopenssl,
> > - libp11kit_cflags,
> > 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 1d3c4f83c0..0128c83d9f 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,7 +1,7 @@
> > From a7f6a296707642d05463aec22ea3dfce7d06c989 Mon Sep 17 00:00:00
> > 2001
> > From: Peter Kjellerstedt <pkj@axis.com>
> > Date: Tue, 21 Jan 2025 05:02:00 +0100
> > -Subject: [PATCH 03/16] Do not create /var/log/README
> > +Subject: [PATCH] Do not create /var/log/README
> >
> > /var/log/README is a link to /usr/share/doc/systemd/README.logs.
> > The
> > latter is packaged in systemd-doc and likely not installed, which
> > leaves
> > @@ -15,19 +15,15 @@ Signed-off-by: Peter Kjellerstedt
> > <peter.kjellerstedt@axis.com>
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
> > -index cdef21fa9b..03798c953e 100644
> > +index cdef21fa9b..7890abcdef 100644
> > --- a/tmpfiles.d/legacy.conf.in
> > +++ b/tmpfiles.d/legacy.conf.in
> > -@@ -13,9 +13,6 @@
> > +@@ -13,6 +13,3 @@
> >
> > d /run/lock 0755 root root -
> > L /var/lock - - - - ../run/lock
> > -{% if CREATE_LOG_DIRS %}
> > -L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
> > -{% endif %}
> > -
> > - {% if HAVE_SYSV_COMPAT %}
> > - # /run/lock/subsys is used for serializing SysV service
> > execution, and
> > --
> > 2.34.1
> > -
> > diff --git a/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-
> > PCR-bank-guessing-without-EFI.patch b/meta/recipes-
> > core/systemd/systemd/0004-tpm2-util-fix-PCR-bank-guessing-without-
> > EFI.patch
> > deleted file mode 100644
> > index c590b01cd3..0000000000
> > --- a/meta/recipes-core/systemd/systemd/0004-tpm2-util-fix-PCR-
> > bank-guessing-without-EFI.patch
> > +++ /dev/null
> > @@ -1,62 +0,0 @@
> > -From 3cef11c710e95bb5f891181e9b2a6d8f174712c3 Mon Sep 17 00:00:00
> > 2001
> > -From: Patrick Wicki <patrick.wicki@subset.ch>
> > -Date: Fri, 20 Mar 2026 15:56:56 +0100
> > -Subject: [PATCH] tpm2-util: fix PCR bank guessing without EFI
> > -
> > -Since 7643e4a89 efi_get_active_pcr_banks() is used to determine
> > the
> > -active PCR banks. Without EFI support, this returns -EOPNOTSUPP.
> > This in
> > -turns leads to cryptenroll and cryptsetup attach failures unless
> > the PCR
> > -bank is explicitly set, i.e.
> > -
> > -$ systemd-cryptenroll $LUKS_PART --tpm2-device=auto --tpm2-
> > pcrs='7'
> > -[...]
> > -Could not read pcr values: Operation not supported
> > -
> > -But it works fine with --tpm2-pcrs='7:sha256'.
> > -
> > -Similarly, unsealing during cryptsetup attach also fails if the
> > bank
> > -needs to be determined:
> > -
> > -Failed to unseal secret using TPM2: Operation not supported
> > -
> > -Catch the -EOPNOTSUPP and fallback to the guessing strategy.
> > -
> > -Upstream-Status: Backport
> > [https://github.com/systemd/systemd/pull/41231]
> > -
> > -Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
> > ----
> > - src/shared/tpm2-util.c | 8 ++++----
> > - 1 file changed, 4 insertions(+), 4 deletions(-)
> > -
> > -diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
> > -index cf11b50695..c0590fe575 100644
> > ---- a/src/shared/tpm2-util.c
> > -+++ b/src/shared/tpm2-util.c
> > -@@ -2702,11 +2702,11 @@ int tpm2_get_best_pcr_bank(
> > - uint32_t efi_banks;
> > - r = efi_get_active_pcr_banks(&efi_banks);
> > - if (r < 0) {
> > -- if (r != -ENOENT)
> > -+ if (!IN_SET(r, -ENOENT, -EOPNOTSUPP))
> > - return r;
> > -
> > - /* If variable is not set use guesswork below */
> > -- log_debug("Boot loader didn't set the
> > LoaderTpm2ActivePcrBanks EFI variable, we have to guess the used
> > PCR banks.");
> > -+ log_debug("Boot loader didn't set the
> > LoaderTpm2ActivePcrBanks EFI variable or EFI support is
> > unavailable, we have to guess the used PCR banks.");
> > - } else if (efi_banks == UINT32_MAX)
> > - log_debug("Boot loader set the
> > LoaderTpm2ActivePcrBanks EFI variable to indicate that the
> > GetActivePcrBanks() API is not available in the firmware. We have
> > to guess the used PCR banks.");
> > - else {
> > -@@ -2811,11 +2811,11 @@ int tpm2_get_good_pcr_banks(
> > - uint32_t efi_banks;
> > - r = efi_get_active_pcr_banks(&efi_banks);
> > - if (r < 0) {
> > -- if (r != -ENOENT)
> > -+ if (!IN_SET(r, -ENOENT, -EOPNOTSUPP))
> > - return r;
> > -
> > - /* If the variable is not set we have to guess
> > via the code below */
> > -- log_debug("Boot loader didn't set the
> > LoaderTpm2ActivePcrBanks EFI variable, we have to guess the used
> > PCR banks.");
> > -+ log_debug("Boot loader didn't set the
> > LoaderTpm2ActivePcrBanks EFI variable or EFI support is
> > unavailable, we have to guess the used PCR banks.");
> > - } else if (efi_banks == UINT32_MAX)
> > - log_debug("Boot loader set the
> > LoaderTpm2ActivePcrBanks EFI variable to indicate that the
> > GetActivePcrBanks() API is not available in the firmware. We have
> > to guess the used PCR banks.");
> > - else {
> > diff --git a/meta/recipes-core/systemd/systemd/0018-shared-fdset-
> > add-detailed-debug-logging-to-fdset_new.patch b/meta/recipes-
> > core/systemd/systemd/0018-shared-fdset-add-detailed-debug-logging-
> > to-fdset_new.patch
> > deleted file mode 100644
> > index 63fa7fefec..0000000000
> > --- a/meta/recipes-core/systemd/systemd/0018-shared-fdset-add-
> > detailed-debug-logging-to-fdset_new.patch
> > +++ /dev/null
> > @@ -1,97 +0,0 @@
> > -From 0565f9f27323a8f9e62d85f2add542af99cea06a Mon Sep 17 00:00:00
> > 2001
> > -From: AshishKumar Mishra <ashishkumar.mishra@bmwtechworks.in>
> > -Date: Wed, 21 Jan 2026 14:13:29 +0530
> > -Subject: [PATCH] systemd: Add detailed debug logging to
> > fdset_new_fill()
> > -
> > -Currently, when fdset_new_fill() fails to open /proc/self/fd or
> > -encounters an error while processing individual file descriptors
> > -(such as fcntl or fstat failures), it returns a silent error code.
> > -
> > -For debugging rarely reproducible failures it becomes difficult to
> > -know the exact cause of failure
> > -This commit updates the function to use log_debug_errno() for all
> > -error paths and hence provides better visibility into why FD
> > collection
> > -failed, including the path of the problematic FD (via fd_get_path)
> > -and its inode type.
> > -
> > -Upstream-Status: Backport
> > [https://github.com/systemd/systemd/pull/40385]
> > -
> > -Signed-off-by: AshishKumar Mishra
> > <ashishkumar.mishra@bmwtechworks.in>
> > ----
> > - src/shared/fdset.c | 35 ++++++++++++++++++++++++++---------
> > - 1 file changed, 26 insertions(+), 9 deletions(-)
> > -
> > -diff --git a/src/shared/fdset.c b/src/shared/fdset.c
> > -index 832e7fda60..f340f41b0e 100644
> > ---- a/src/shared/fdset.c
> > -+++ b/src/shared/fdset.c
> > -@@ -8,6 +8,7 @@
> > - #include "alloc-util.h"
> > - #include "async.h"
> > - #include "dirent-util.h"
> > -+#include "errno-util.h"
> > - #include "fd-util.h"
> > - #include "fdset.h"
> > - #include "log.h"
> > -@@ -179,9 +180,10 @@ int fdset_new_fill(
> > - d = opendir("/proc/self/fd");
> > - if (!d) {
> > - if (errno == ENOENT && proc_mounted() == 0)
> > -- return -ENOSYS;
> > -+ return
> > log_debug_errno(SYNTHETIC_ERRNO(ENOSYS),
> > -+ "Failed to open
> > /proc/self/fd/, /proc/ is not mounted.");
> > -
> > -- return -errno;
> > -+ return log_debug_errno(errno, "Failed to open
> > /proc/self/fd/: %m ");
> > - }
> > -
> > - s = fdset_new();
> > -@@ -210,9 +212,14 @@ int fdset_new_fill(
> > - * been passed in can be collected and
> > fds which have been created locally can be
> > - * ignored, under the assumption that
> > only the latter have O_CLOEXEC set. */
> > -
> > -- fl = fcntl(fd, F_GETFD);
> > -- if (fl < 0)
> > -- return -errno;
> > -+ fl = RET_NERRNO(fcntl(fd, F_GETFD));
> > -+ if (fl < 0) {
> > -+ _cleanup_free_ char *path = NULL;
> > -+ (void) fd_get_path(fd, &path);
> > -+ return log_debug_errno(fl,
> > -+ "Failed to
> > get flag of fd=%d (%s): %m ",
> > -+ fd,
> > strna(path));
> > -+ }
> > -
> > - if (FLAGS_SET(fl, FD_CLOEXEC) !=
> > !!filter_cloexec)
> > - continue;
> > -@@ -221,13 +228,23 @@ int fdset_new_fill(
> > - /* We need to set CLOEXEC manually only if we're
> > collecting non-CLOEXEC fds. */
> > - if (filter_cloexec <= 0) {
> > - r = fd_cloexec(fd, true);
> > -- if (r < 0)
> > -- return r;
> > -+ if (r < 0) {
> > -+ _cleanup_free_ char *path = NULL;
> > -+ (void) fd_get_path(fd, &path);
> > -+ return log_debug_errno(r,
> > -+ "Failed to
> > set CLOEXEC flag fd=%d (%s): %m ",
> > -+ fd,
> > strna(path));
> > -+ }
> > - }
> > -
> > - r = fdset_put(s, fd);
> > -- if (r < 0)
> > -- return r;
> > -+ if (r < 0) {
> > -+ _cleanup_free_ char *path = NULL;
> > -+ (void) fd_get_path(fd, &path);
> > -+ return log_debug_errno(r,
> > -+ "Failed to put
> > fd=%d (%s) into fdset: %m ",
> > -+ fd, strna(path));
> > -+ }
> > - }
> > -
> > - *ret = TAKE_PTR(s);
> > ---
> > -2.34.1
> > -
> > diff --git a/meta/recipes-core/systemd/systemd_259.5.bb
> > b/meta/recipes-core/systemd/systemd_261.bb
> > similarity index 99%
> > rename from meta/recipes-core/systemd/systemd_259.5.bb
> > rename to meta/recipes-core/systemd/systemd_261.bb
> > index f3ec0edae7..eedce348c3 100644
> > --- a/meta/recipes-core/systemd/systemd_259.5.bb
> > +++ b/meta/recipes-core/systemd/systemd_261.bb
> > @@ -32,9 +32,6 @@ SRC_URI += " \
> > file://systemd-pager.sh \
> >
> > file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> > \
> > file://0003-Do-not-create-var-log-README.patch \
> > - file://0001-meson-use-libfido2_cflags-dependency.patch
> > \
> > -
> > file://0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.p
> > atch \
> > -
> > file://0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch \
> > "
> >
> > PAM_PLUGINS = " \
> > @@ -226,9 +223,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
> > -Ddbus=disabled \
> > -Dtests=false \
> > -Dlibc=${TCLIBC} \
> > - -Drc-local='' \
> > - -Dsysvinit-path='' \
> > - -Dsysvrcnd-path='' \
> > "
> >
> > # Hardcode target binary paths to avoid using paths from sysroot
> > or worse
> > @@ -582,6 +576,8 @@ FILES:${PN}-extra-utils = "\
> > ${bindir}/systemd-cgtop \
> > ${bindir}/systemd-stdio-bridge \
> > ${base_sbindir}/mount.ddi \
> > + ${base_sbindir}/mount.mstack \
> > + ${base_sbindir}/mount.storage \
> >
> > ${systemd_system_unitdir}/initrd.target.wants/systemd-pcrphase-
> > initrd.path \
> >
> > ${systemd_system_unitdir}/sysinit.target.wants/systemd-
> > pcrphase.path \
> >
> > ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase-
> > sysinit.path \
> > @@ -678,6 +674,7 @@ FILES:${PN} = " ${base_bindir}/* \
> > ${datadir}/polkit-1 \
> > ${datadir}/${BPN} \
> > ${datadir}/factory \
> > + ${datadir}/user-tmpfiles.d \
> > ${sysconfdir}/credstore/ \
> > ${sysconfdir}/credstore.encrypted/ \
> > ${sysconfdir}/dbus-1/ \
> > @@ -687,6 +684,7 @@ FILES:${PN} = " ${base_bindir}/* \
> > ${sysconfdir}/sysctl.d/ \
> > ${sysconfdir}/systemd/ \
> > ${sysconfdir}/tmpfiles.d/ \
> > + ${sysconfdir}/user-tmpfiles.d/ \
> > ${sysconfdir}/xdg/ \
> > ${sysconfdir}/init.d/README \
> > ${sysconfdir}/resolv-conf.systemd \
> > @@ -797,11 +795,13 @@ FILES:udev += "${base_sbindir}/udevd \
> > ${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 \
> > + ${nonarch_libdir}/udev/rules.d/60-tpm2-id.rules \
> > ${nonarch_libdir}/udev/rules.d/60-persistent-
> > v4l.rules \
> > ${nonarch_libdir}/udev/rules.d/60-sensor.rules \
> > ${nonarch_libdir}/udev/rules.d/60-serial.rules \
> > ${nonarch_libdir}/udev/rules.d/61-autosuspend-
> > manual.rules \
> > ${nonarch_libdir}/udev/rules.d/64-btrfs.rules \
> > + ${nonarch_libdir}/udev/rules.d/65-integration.rules
> > \
> > ${nonarch_libdir}/udev/rules.d/70-camera.rules \
> > ${nonarch_libdir}/udev/rules.d/70-joystick.rules \
> > ${nonarch_libdir}/udev/rules.d/70-memory.rules \
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#239883):
> > https://lists.openembedded.org/g/openembedded-core/message/239883
> > Mute This Topic:
> > https://lists.openembedded.org/mt/120045145/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe:
> > https://lists.openembedded.org/g/openembedded-core/unsub
> > [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 3/3] systemd: add native hwdb generator for hosts without STATX_MNT_ID
2026-06-30 11:50 [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 daniel.turull
2026-06-30 11:50 ` [PATCH v3 1/3] dlopen-deps.inc: treat soname list as ordered alternatives daniel.turull
2026-06-30 11:50 ` [PATCH v3 2/3] systemd: upgrade to 261 daniel.turull
@ 2026-06-30 11:50 ` daniel.turull
2026-07-02 8:36 ` [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 Mathieu Dubois-Briand
3 siblings, 0 replies; 14+ messages in thread
From: daniel.turull @ 2026-06-30 11:50 UTC (permalink / raw)
To: openembedded-core
Cc: qi.chen, alex.kanavin, richard.purdie, Ross.Burton,
mathieu.dubois-briand, Daniel Turull
From: Daniel Turull <daniel.turull@ericsson.com>
systemd 261 requires STATX_MNT_ID (kernel >= 5.8) for path resolution.
On older hosts (e.g. RHEL 8 with kernel 4.18), the QEMU-emulated
udevadm hwdb fails during image construction.
Add systemd-hwdb-native recipe that builds systemd-hwdb natively with:
- A patch restoring /proc/self/fdinfo mount-ID fallback for kernels
lacking STATX_MNT_ID (applied only to native recipes)
- A patch forcing compat mode in hwdb generation to avoid embedding
build-host paths in hwdb.bin (reproducibility)
Update the update_udev_hwdb intercept to prefer the native
systemd-hwdb over QEMU emulation, with a test -s check to catch
silent failures from either path.
Tested on RHEL 8.10 and Ubuntu 22.04.5
AI-Generated: Claude-opus-4.6
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
I'm not sure who should be the maitainer of the new native recipe.
is it Qi Chen, who is the maintainer for the rest of systemd recipes,
unassigned or me? The question I'm asking is because all need to be
updated at the same time.
---
meta/conf/distro/include/maintainers.inc | 1 +
.../systemd/systemd-hwdb-native_261.bb | 32 ++++
.../systemd/systemd-systemctl-native_261.bb | 3 +
...idfd_open-and-STATX_MNT_ID-on-older-.patch | 176 ++++++++++++++++++
...t-mode-for-reproducible-cross-builds.patch | 36 ++++
meta/recipes-core/systemd/systemd_261.bb | 2 +-
scripts/postinst-intercepts/update_udev_hwdb | 24 ++-
7 files changed, 269 insertions(+), 5 deletions(-)
create mode 100644 meta/recipes-core/systemd/systemd-hwdb-native_261.bb
create mode 100644 meta/recipes-core/systemd/systemd/Handle-missing-pidfd_open-and-STATX_MNT_ID-on-older-.patch
create mode 100644 meta/recipes-core/systemd/systemd/hwdb-use-compat-mode-for-reproducible-cross-builds.patch
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 4c6307086c..b51c66ea18 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -831,6 +831,7 @@ RECIPE_MAINTAINER:pn-systemd-boot-native = "Viswanath Kraleti <quic_vkraleti@qui
RECIPE_MAINTAINER:pn-systemd-bootchart = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER:pn-systemd-bootconf = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER:pn-systemd-conf = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER:pn-systemd-hwdb-native = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-systemd-machine-units = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER:pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER:pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>"
diff --git a/meta/recipes-core/systemd/systemd-hwdb-native_261.bb b/meta/recipes-core/systemd/systemd-hwdb-native_261.bb
new file mode 100644
index 0000000000..d328fc3c44
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-hwdb-native_261.bb
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: MIT
+FILESEXTRAPATHS:prepend := "${THISDIR}/systemd:"
+
+SUMMARY = "Hardware database management tool from systemd"
+
+require systemd.inc
+
+DEPENDS = "gperf-native libcap-native util-linux-native python3-jinja2-native"
+
+# TODO: Remove STATX_MNT_ID patch once minimum supported build host kernel is >= 5.8 (RHEL 8 EOL: 2029)
+SRC_URI += "file://Handle-missing-pidfd_open-and-STATX_MNT_ID-on-older-.patch \
+ file://hwdb-use-compat-mode-for-reproducible-cross-builds.patch \
+ "
+
+inherit pkgconfig meson native
+
+MESON_TARGET = "systemd-hwdb"
+
+# Override prefix so compiled-in UDEVLIBEXECDIR (/usr/lib/udev) matches the
+# target rootfs layout. This allows --root $D --usr to find hwdb.d source
+# files and write hwdb.bin to the correct location.
+EXTRA_OEMESON += "--prefix /usr"
+EXTRA_OEMESON += "-Dhwdb=true -Dlink-udev-shared=false"
+EXTRA_OEMESON += "-Dpam=disabled -Daudit=disabled -Dselinux=disabled"
+EXTRA_OEMESON += "-Dacl=disabled -Dapparmor=disabled -Dseccomp=disabled"
+EXTRA_OEMESON += "-Dlibcryptsetup=disabled -Dlibcurl=disabled -Dlibfido2=disabled"
+EXTRA_OEMESON += "-Dpcre2=disabled -Dp11kit=disabled -Dopenssl=disabled"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/systemd-hwdb ${D}${bindir}/systemd-hwdb
+}
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native_261.bb b/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
index 28fddc79df..ac09c804a5 100644
--- a/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
+++ b/meta/recipes-core/systemd/systemd-systemctl-native_261.bb
@@ -6,6 +6,9 @@ require systemd.inc
DEPENDS = "gperf-native libcap-native util-linux-native python3-jinja2-native"
+# TODO: Remove STATX_MNT_ID patch once minimum supported build host kernel is >= 5.8 (RHEL 8 EOL: 2029)
+SRC_URI += "file://Handle-missing-pidfd_open-and-STATX_MNT_ID-on-older-.patch"
+
inherit pkgconfig meson native
MESON_TARGET = "systemctl"
diff --git a/meta/recipes-core/systemd/systemd/Handle-missing-pidfd_open-and-STATX_MNT_ID-on-older-.patch b/meta/recipes-core/systemd/systemd/Handle-missing-pidfd_open-and-STATX_MNT_ID-on-older-.patch
new file mode 100644
index 0000000000..c63423cc96
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/Handle-missing-pidfd_open-and-STATX_MNT_ID-on-older-.patch
@@ -0,0 +1,176 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Daniel Turull <daniel.turull@ericsson.com>
+Date: Mon, 23 Jun 2026 12:00:00 +0200
+Subject: [PATCH] Handle missing pidfd_open and STATX_MNT_ID on older kernels
+
+On hosts lacking pidfd_open (kernel < 5.3) or STATX_MNT_ID (kernel < 5.8,
+e.g. RHEL 8), native tools (systemctl --root, systemd-hwdb --root) fail
+during path resolution. Fix by:
+
+- Treating ENOSYS/EOPNOTSUPP from pidfd_open as graceful fallback.
+- Adding fd_get_mount_id() to read mnt_id from /proc/self/fdinfo (available
+ since kernel 3.15) and using it as fallback when statx returns -EUNATCH in
+ fds_inode_and_mount_same() and chase_statx().
+
+This restores the /proc/self/fdinfo fallback that existed in systemd 259
+(fd_fdinfo_mnt_id in mountpoint-util.c) but was removed upstream in 260+.
+
+This patch is only applied to native recipes (systemd-systemctl-native,
+systemd-hwdb-native) where /proc/self/fdinfo is guaranteed available.
+Do NOT apply to the target systemd recipe.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Assisted-by: kiro:claude-opus-4.6
+Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
+---
+ src/basic/chase.c | 20 ++++++++++++++-
+ src/basic/fd-util.c | 63 +++++++++++++++++++++++++++++++++++++++++++--
+ src/basic/fd-util.h | 1 +
+ src/basic/pidref.c | 4 +--
+ 4 files changed, 83 insertions(+), 5 deletions(-)
+
+--- a/src/basic/pidref.c 2026-06-25 14:01:12.007875484 +0200
++++ b/src/basic/pidref.c 2026-06-25 14:01:55.098770206 +0200
+@@ -106,8 +106,8 @@ int pidref_set_pid(PidRef *pidref, pid_t
+
+ fd = pidfd_open(pid, 0);
+ if (fd < 0) {
+- /* Graceful fallback in case the kernel is out of fds */
+- if (!ERRNO_IS_RESOURCE(errno))
++ /* Graceful fallback in case the kernel is out of fds or lacks pidfd support */
++ if (!ERRNO_IS_RESOURCE(errno) && !ERRNO_IS_NOT_SUPPORTED(errno))
+ return log_debug_errno(errno, "Failed to open pidfd for pid " PID_FMT ": %m", pid);
+
+ fd = -EBADF;
+--- a/src/basic/fd-util.h 2026-06-25 14:01:12.009875526 +0200
++++ b/src/basic/fd-util.h 2026-06-25 14:01:20.909060415 +0200
+@@ -188,6 +188,7 @@ static inline int dir_fd_is_root_or_cwd(
+ }
+
+ int fds_inode_and_mount_same(int fd1, int fd2);
++int fd_get_mount_id(int fd, uint64_t *ret);
+
+ int resolve_xat_fdroot(int *fd, const char **path, char **ret_buffer);
+
+--- a/src/basic/fd-util.c 2026-06-25 14:01:12.011875567 +0200
++++ b/src/basic/fd-util.c 2026-06-25 14:01:40.007456905 +0200
+@@ -1082,6 +1082,38 @@ int path_is_root_at(int dir_fd, const ch
+ return fds_inode_and_mount_same(dir_fd, XAT_FDROOT);
+ }
+
++int fd_get_mount_id(int fd, uint64_t *ret) {
++ char path[STRLEN("/proc/self/fdinfo/") + DECIMAL_STR_MAX(int)];
++ _cleanup_close_ int real_fd = -EBADF;
++ _cleanup_free_ char *p = NULL;
++ uint64_t mnt_id;
++ int r;
++
++ assert(ret);
++
++ /* /proc/self/fdinfo/ requires a real fd; resolve AT_FDCWD/XAT_FDROOT via O_PATH. */
++ if (fd == AT_FDCWD || fd == XAT_FDROOT) {
++ real_fd = open(fd == XAT_FDROOT ? "/" : ".", O_PATH|O_CLOEXEC);
++ if (real_fd < 0)
++ return -errno;
++ fd = real_fd;
++ }
++
++ assert(fd >= 0);
++ xsprintf(path, "/proc/self/fdinfo/%i", fd);
++
++ r = get_proc_field(path, "mnt_id", &p);
++ if (r < 0)
++ return r;
++
++ r = safe_atou64(p, &mnt_id);
++ if (r < 0)
++ return r;
++
++ *ret = mnt_id;
++ return 0;
++}
++
+ int fds_inode_and_mount_same(int fd1, int fd2) {
+ struct statx sx1, sx2;
+ int r;
+@@ -1092,7 +1124,20 @@ int fds_inode_and_mount_same(int fd1, in
+ r = xstatx(fd1, /* path = */ NULL, AT_EMPTY_PATH,
+ STATX_TYPE|STATX_INO|STATX_MNT_ID,
+ &sx1);
+- if (r < 0)
++ if (r == -EUNATCH) {
++ uint64_t mnt_id;
++
++ /* Kernel lacks STATX_MNT_ID; fall back to /proc/self/fdinfo. */
++ r = xstatx(fd1, /* path = */ NULL, AT_EMPTY_PATH,
++ STATX_TYPE|STATX_INO, &sx1);
++ if (r < 0)
++ return r;
++ r = fd_get_mount_id(fd1, &mnt_id);
++ if (r < 0)
++ return r;
++ sx1.stx_mnt_id = mnt_id;
++ sx1.stx_mask |= STATX_MNT_ID;
++ } else if (r < 0)
+ return r;
+
+ if (fd1 == fd2) /* Shortcut things if fds are the same (only after validating the fd) */
+@@ -1101,7 +1146,19 @@ int fds_inode_and_mount_same(int fd1, in
+ r = xstatx(fd2, /* path = */ NULL, AT_EMPTY_PATH,
+ STATX_TYPE|STATX_INO|STATX_MNT_ID,
+ &sx2);
+- if (r < 0)
++ if (r == -EUNATCH) {
++ uint64_t mnt_id;
++
++ r = xstatx(fd2, /* path = */ NULL, AT_EMPTY_PATH,
++ STATX_TYPE|STATX_INO, &sx2);
++ if (r < 0)
++ return r;
++ r = fd_get_mount_id(fd2, &mnt_id);
++ if (r < 0)
++ return r;
++ sx2.stx_mnt_id = mnt_id;
++ sx2.stx_mask |= STATX_MNT_ID;
++ } else if (r < 0)
+ return r;
+
+ r = statx_mount_same(&sx1, &sx2);
+--- a/src/basic/chase.c 2026-06-25 14:01:12.013875609 +0200
++++ b/src/basic/chase.c 2026-06-25 14:01:47.117604514 +0200
+@@ -40,7 +40,9 @@
+ (CHASE_MUST_BE_DIRECTORY|CHASE_MUST_BE_REGULAR|CHASE_MUST_BE_SOCKET)
+
+ static int chase_statx(int fd, struct statx *ret) {
+- return xstatx_full(fd,
++ int r;
++
++ r = xstatx_full(fd,
+ /* path= */ NULL,
+ /* statx_flags= */ 0,
+ XSTATX_MNT_ID_BEST,
+@@ -48,6 +50,23 @@ static int chase_statx(int fd, struct st
+ /* optional_mask= */ 0,
+ /* mandatory_attributes= */ 0,
+ ret);
++ if (r == -EUNATCH) {
++ uint64_t mnt_id;
++
++ /* Kernel lacks STATX_MNT_ID; fall back to /proc/self/fdinfo. */
++ r = xstatx(fd, /* path= */ NULL, /* statx_flags= */ 0,
++ STATX_TYPE|STATX_UID|STATX_INO,
++ ret);
++ if (r < 0)
++ return r;
++ r = fd_get_mount_id(fd, &mnt_id);
++ if (r < 0)
++ return r;
++ ret->stx_mnt_id = mnt_id;
++ ret->stx_mask |= STATX_MNT_ID;
++ }
++
++ return r;
+ }
+
+ static int chase_openat2(int root_fd, int dir_fd, const char *path, ChaseFlags chase_flags) {
diff --git a/meta/recipes-core/systemd/systemd/hwdb-use-compat-mode-for-reproducible-cross-builds.patch b/meta/recipes-core/systemd/systemd/hwdb-use-compat-mode-for-reproducible-cross-builds.patch
new file mode 100644
index 0000000000..bb90105cbd
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/hwdb-use-compat-mode-for-reproducible-cross-builds.patch
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Daniel Turull <daniel.turull@ericsson.com>
+Date: Wed, 25 Jun 2026 10:00:00 +0200
+Subject: [PATCH] hwdb: use compat mode to avoid embedding source paths
+
+Use compat=true in systemd-hwdb's verb_update() so that source
+filenames, line numbers, and priorities are not embedded in hwdb.bin.
+
+Without this, when --root $D is used during cross-compilation, the
+absolute build paths (e.g. /tmp/work/.../rootfs/usr/lib/udev/hwdb.d/...)
+are written into the database, causing:
+- Non-reproducible builds (different TMPDIR → different hwdb.bin)
+- Build directory path leakage into the target image
+
+The compat format matches what udevadm hwdb (the deprecated path)
+has always produced, and is the expected format for cross-built images.
+
+Upstream-Status: Inappropriate [oe specific]
+
+AI-Generated: Claude Opus 4.6
+Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
+---
+ src/hwdb/hwdb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/hwdb/hwdb.c
++++ b/src/hwdb/hwdb.c
+@@ -27,7 +27,7 @@ static int verb_update(int argc, char *argv[], uintptr_t _data, void *userdata)
+ if (hwdb_bypass())
+ return 0;
+
+- return hwdb_update(arg_root, arg_hwdb_bin_dir, arg_strict, false);
++ return hwdb_update(arg_root, arg_hwdb_bin_dir, arg_strict, true);
+ }
+
+ static int help(void) {
diff --git a/meta/recipes-core/systemd/systemd_261.bb b/meta/recipes-core/systemd/systemd_261.bb
index eedce348c3..22bd4ca5fc 100644
--- a/meta/recipes-core/systemd/systemd_261.bb
+++ b/meta/recipes-core/systemd/systemd_261.bb
@@ -910,7 +910,7 @@ pkg_prerm:${PN}:libc-glibc () {
fi
}
-PACKAGE_WRITE_DEPS += "qemuwrapper-cross"
+PACKAGE_WRITE_DEPS += "qemuwrapper-cross systemd-hwdb-native"
pkg_postinst:udev-hwdb () {
if test -n "$D"; then
diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb
index 8b3f5de791..d7a4ffc294 100644
--- a/scripts/postinst-intercepts/update_udev_hwdb
+++ b/scripts/postinst-intercepts/update_udev_hwdb
@@ -19,7 +19,23 @@ case "${PREFERRED_PROVIDER_udev}" in
;;
esac
-rm -f $D${UDEVLIBDIR}/udev/hwdb.bin
-PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} ||
- PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS}
-chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
+hwdb_bin="$D${UDEVLIBDIR}/udev/hwdb.bin"
+rm -f "$hwdb_bin"
+
+# Use native systemd-hwdb to generate hwdb.bin at build time.
+# This avoids QEMU user-mode emulation and works on host kernels < 5.8
+# (e.g. RHEL 8) where systemd 261+ would fail due to missing STATX_MNT_ID.
+NATIVE_HWDB="${STAGING_DIR_NATIVE}/usr/bin/systemd-hwdb"
+if test -x "$NATIVE_HWDB" && test "${PREFERRED_PROVIDER_udev}" = "systemd"; then
+ PSEUDO_UNLOAD=1 $NATIVE_HWDB update --root $D ${UDEV_EXTRA_ARGS}
+else
+ PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} ||
+ PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS}
+fi
+
+if ! test -s "$hwdb_bin"; then
+ echo "ERROR: hwdb.bin was not created at $hwdb_bin" >&2
+ echo "The hwdb generation command exited successfully but produced no output." >&2
+ exit 1
+fi
+chown root:root "$hwdb_bin"
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-06-30 11:50 [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 daniel.turull
` (2 preceding siblings ...)
2026-06-30 11:50 ` [PATCH v3 3/3] systemd: add native hwdb generator for hosts without STATX_MNT_ID daniel.turull
@ 2026-07-02 8:36 ` Mathieu Dubois-Briand
2026-07-02 8:58 ` Daniel Turull
3 siblings, 1 reply; 14+ messages in thread
From: Mathieu Dubois-Briand @ 2026-07-02 8:36 UTC (permalink / raw)
To: daniel.turull, openembedded-core
Cc: qi.chen, alex.kanavin, richard.purdie, Ross.Burton
On Tue Jun 30, 2026 at 1:50 PM CEST, daniel.turull wrote:
> From: Daniel Turull <daniel.turull@ericsson.com>
>
> systemd increases the dependency on the host kernel,
> which breaks builds with rhel 8
>
> This series add native patches in the systemd tools
> to make it work.
>
> v2:
> - re-add tag verification in SRC_URI
> v3:
> - rebase on top of Ross Burton meson patches. if not needed keep v2
> - re-tested
> See https://patchwork.yoctoproject.org/project/oe-core/patch/20260629141559.1305873-1-ross.burton@arm.com/
>
> Tested on rhel8.10 with testsuite systemd on qemux86-64
Hi Daniel,
Thanks for the new version.
I just note we have some intermittent failure. So far I only saw that on
debian11 workers, so maybe it is related to the host distro.
ERROR: systemd-hwdb-native-261-r0 do_compile: Execution of '/srv/pokybuild/yocto-worker/meta-virt/build/build/tmp/work/x86_64-linux/systemd-hwdb-native/261/temp/run.do_compile.3747249' failed with exit code 1
...
| ../sources/systemd-hwdb-261/src/libc/mount.c: In function ‘mount_setattr_shim’:
| ../sources/systemd-hwdb-261/src/libc/libc-shim.h:71:32: error: ‘__NR_mount_setattr’ undeclared (first use in this function); did you mean ‘mount_setattr’?
| 71 | return syscall(__NR_##func, _SHIM_NAME(__VA_ARGS__)); \
| | ^~~~~
| ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in expansion of macro ‘DEFINE_SYSCALL_SHIM’
| 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
| | ^~~~~~~~~~~~~~~~~~~
| ../sources/systemd-hwdb-261/src/libc/libc-shim.h:71:32: note: each undeclared identifier is reported only once for each function it appears in
| 71 | return syscall(__NR_##func, _SHIM_NAME(__VA_ARGS__)); \
| | ^~~~~
| ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in expansion of macro ‘DEFINE_SYSCALL_SHIM’
| 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
| | ^~~~~~~~~~~~~~~~~~~
| ../sources/systemd-hwdb-261/src/libc/libc-shim.h:72:9: error: control reaches end of non-void function [-Werror=return-type]
| 72 | }
| | ^
| ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in expansion of macro ‘DEFINE_SYSCALL_SHIM’
| 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
| | ^~~~~~~~~~~~~~~~~~~
| cc1: some warnings being treated as errors
https://autobuilder.yoctoproject.org/valkyrie/#/builders/89/builds/3878
https://autobuilder.yoctoproject.org/valkyrie/#/builders/93/builds/4029
I don't have more details right now, so I just want to note this so it
is known before we merge the series.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-07-02 8:36 ` [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 Mathieu Dubois-Briand
@ 2026-07-02 8:58 ` Daniel Turull
2026-07-02 9:54 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 14+ messages in thread
From: Daniel Turull @ 2026-07-02 8:58 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org,
mathieu.dubois-briand@bootlin.com
Cc: qi.chen@windriver.com, richard.purdie@linuxfoundation.org,
alex.kanavin@gmail.com, Ross.Burton@arm.com
On Thu, 2026-07-02 at 10:36 +0200, Mathieu Dubois-Briand wrote:
>
> Hi Daniel,
>
> Thanks for the new version.
>
> I just note we have some intermittent failure. So far I only saw that
> on
> debian11 workers, so maybe it is related to the host distro.
>
> ERROR: systemd-hwdb-native-261-r0 do_compile: Execution of
> '/srv/pokybuild/yocto-worker/meta-virt/build/build/tmp/work/x86_64-
> linux/systemd-hwdb-native/261/temp/run.do_compile.3747249' failed
> with exit code 1
> ...
> > ../sources/systemd-hwdb-261/src/libc/mount.c: In function
> > ‘mount_setattr_shim’:
> > ../sources/systemd-hwdb-261/src/libc/libc-shim.h:71:32: error:
> > ‘__NR_mount_setattr’ undeclared (first use in this function); did
> > you mean ‘mount_setattr’?
> > 71 | return syscall(__NR_##func,
> > _SHIM_NAME(__VA_ARGS__)); \
> > | ^~~~~
> > ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in
> > expansion of macro ‘DEFINE_SYSCALL_SHIM’
> > 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
> > | ^~~~~~~~~~~~~~~~~~~
> > ../sources/systemd-hwdb-261/src/libc/libc-shim.h:71:32: note: each
> > undeclared identifier is reported only once for each function it
> > appears in
> > 71 | return syscall(__NR_##func,
> > _SHIM_NAME(__VA_ARGS__)); \
> > | ^~~~~
> > ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in
> > expansion of macro ‘DEFINE_SYSCALL_SHIM’
> > 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
> > | ^~~~~~~~~~~~~~~~~~~
> > ../sources/systemd-hwdb-261/src/libc/libc-shim.h:72:9: error:
> > control reaches end of non-void function [-Werror=return-type]
> > 72 | }
> > | ^
> > ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in
> > expansion of macro ‘DEFINE_SYSCALL_SHIM’
> > 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
> > | ^~~~~~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
>
>
>
did v2 work? I saw it was in master-next.
The only difference between v3 and v2 is the meson wrapper and it
should not affect.
Daniel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-07-02 8:58 ` Daniel Turull
@ 2026-07-02 9:54 ` Mathieu Dubois-Briand
2026-07-02 11:03 ` Alexander Kanavin
0 siblings, 1 reply; 14+ messages in thread
From: Mathieu Dubois-Briand @ 2026-07-02 9:54 UTC (permalink / raw)
To: Daniel Turull, openembedded-core@lists.openembedded.org
Cc: qi.chen@windriver.com, richard.purdie@linuxfoundation.org,
alex.kanavin@gmail.com, Ross.Burton@arm.com
On Thu Jul 2, 2026 at 10:58 AM CEST, Daniel Turull wrote:
> On Thu, 2026-07-02 at 10:36 +0200, Mathieu Dubois-Briand wrote:
>>
>> Hi Daniel,
>>
>> Thanks for the new version.
>>
>> I just note we have some intermittent failure. So far I only saw that
>> on
>> debian11 workers, so maybe it is related to the host distro.
>>
>> ERROR: systemd-hwdb-native-261-r0 do_compile: Execution of
>> '/srv/pokybuild/yocto-worker/meta-virt/build/build/tmp/work/x86_64-
>> linux/systemd-hwdb-native/261/temp/run.do_compile.3747249' failed
>> with exit code 1
>> ...
>> > ../sources/systemd-hwdb-261/src/libc/mount.c: In function
>> > ‘mount_setattr_shim’:
>> > ../sources/systemd-hwdb-261/src/libc/libc-shim.h:71:32: error:
>> > ‘__NR_mount_setattr’ undeclared (first use in this function); did
>> > you mean ‘mount_setattr’?
>> > 71 | return syscall(__NR_##func,
>> > _SHIM_NAME(__VA_ARGS__)); \
>> > | ^~~~~
>> > ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in
>> > expansion of macro ‘DEFINE_SYSCALL_SHIM’
>> > 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
>> > | ^~~~~~~~~~~~~~~~~~~
>> > ../sources/systemd-hwdb-261/src/libc/libc-shim.h:71:32: note: each
>> > undeclared identifier is reported only once for each function it
>> > appears in
>> > 71 | return syscall(__NR_##func,
>> > _SHIM_NAME(__VA_ARGS__)); \
>> > | ^~~~~
>> > ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in
>> > expansion of macro ‘DEFINE_SYSCALL_SHIM’
>> > 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
>> > | ^~~~~~~~~~~~~~~~~~~
>> > ../sources/systemd-hwdb-261/src/libc/libc-shim.h:72:9: error:
>> > control reaches end of non-void function [-Werror=return-type]
>> > 72 | }
>> > | ^
>> > ../sources/systemd-hwdb-261/src/libc/mount.c:35:1: note: in
>> > expansion of macro ‘DEFINE_SYSCALL_SHIM’
>> > 35 | DEFINE_SYSCALL_SHIM(mount_setattr, int,
>> > | ^~~~~~~~~~~~~~~~~~~
>> > cc1: some warnings being treated as errors
>>
>>
>>
>
> did v2 work? I saw it was in master-next.
>
> The only difference between v3 and v2 is the meson wrapper and it
> should not affect.
>
> Daniel
I suspect we had the same issue with v2, we just have been a bit
(un)lucky as it never ran on a Debian 11 worker.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-07-02 9:54 ` Mathieu Dubois-Briand
@ 2026-07-02 11:03 ` Alexander Kanavin
2026-07-02 13:19 ` Daniel Turull
0 siblings, 1 reply; 14+ messages in thread
From: Alexander Kanavin @ 2026-07-02 11:03 UTC (permalink / raw)
To: Mathieu Dubois-Briand
Cc: Daniel Turull, openembedded-core@lists.openembedded.org,
qi.chen@windriver.com, richard.purdie@linuxfoundation.org,
Ross.Burton@arm.com
On Thu, 2 Jul 2026 at 11:55, Mathieu Dubois-Briand
<mathieu.dubois-briand@bootlin.com> wrote:
> I suspect we had the same issue with v2, we just have been a bit
> (un)lucky as it never ran on a Debian 11 worker.
Debian 11 has host glibc that is too old for systemd. There are other
distros that use an even older glibc, and they do not fail because
they use buildtools. So we need to adjust the autobuilder to start
using buildtools on debian 11 as well.
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-07-02 11:03 ` Alexander Kanavin
@ 2026-07-02 13:19 ` Daniel Turull
2026-07-02 13:34 ` Richard Purdie
0 siblings, 1 reply; 14+ messages in thread
From: Daniel Turull @ 2026-07-02 13:19 UTC (permalink / raw)
To: alex.kanavin@gmail.com, mathieu.dubois-briand@bootlin.com
Cc: qi.chen@windriver.com, openembedded-core@lists.openembedded.org,
richard.purdie@linuxfoundation.org, Ross.Burton@arm.com
On Thu, 2026-07-02 at 13:03 +0200, Alexander Kanavin wrote:
> On Thu, 2 Jul 2026 at 11:55, Mathieu Dubois-Briand
> <mathieu.dubois-briand@bootlin.com> wrote:
>
> > I suspect we had the same issue with v2, we just have been a bit
> > (un)lucky as it never ran on a Debian 11 worker.
>
> Debian 11 has host glibc that is too old for systemd. There are other
> distros that use an even older glibc, and they do not fail because
> they use buildtools. So we need to adjust the autobuilder to start
> using buildtools on debian 11 as well.
>
> Alex
Yes, I can reproduce th problems with glibc on debian 11.
I have tested inside a debian 11 container and using buildtools-
extendend-tarball should fix the issue.
Daniel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-07-02 13:19 ` Daniel Turull
@ 2026-07-02 13:34 ` Richard Purdie
2026-07-02 14:03 ` Daniel Turull
2026-07-02 17:12 ` Alexander Kanavin
0 siblings, 2 replies; 14+ messages in thread
From: Richard Purdie @ 2026-07-02 13:34 UTC (permalink / raw)
To: Daniel Turull, alex.kanavin@gmail.com,
mathieu.dubois-briand@bootlin.com
Cc: qi.chen@windriver.com, openembedded-core@lists.openembedded.org,
Ross.Burton@arm.com
On Thu, 2026-07-02 at 13:19 +0000, Daniel Turull wrote:
> On Thu, 2026-07-02 at 13:03 +0200, Alexander Kanavin wrote:
> > On Thu, 2 Jul 2026 at 11:55, Mathieu Dubois-Briand
> > <mathieu.dubois-briand@bootlin.com> wrote:
> >
> > > I suspect we had the same issue with v2, we just have been a bit
> > > (un)lucky as it never ran on a Debian 11 worker.
> >
> > Debian 11 has host glibc that is too old for systemd. There are
> > other
> > distros that use an even older glibc, and they do not fail because
> > they use buildtools. So we need to adjust the autobuilder to start
> > using buildtools on debian 11 as well.
> >
> > Alex
>
> Yes, I can reproduce th problems with glibc on debian 11.
>
> I have tested inside a debian 11 container and using buildtools-
> extendend-tarball should fix the issue.
If we start putting buildtools everywhere, we may as well just stop
testing on most of the distros :(.
I'm already worried about the implications of buildtools on RHEL9
derivatives :(.
Cheers,
Richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-07-02 13:34 ` Richard Purdie
@ 2026-07-02 14:03 ` Daniel Turull
2026-07-02 17:12 ` Alexander Kanavin
1 sibling, 0 replies; 14+ messages in thread
From: Daniel Turull @ 2026-07-02 14:03 UTC (permalink / raw)
To: richard.purdie@linuxfoundation.org, alex.kanavin@gmail.com,
mathieu.dubois-briand@bootlin.com
Cc: qi.chen@windriver.com, openembedded-core@lists.openembedded.org,
Ross.Burton@arm.com
On Thu, 2026-07-02 at 14:34 +0100, Richard Purdie wrote:
> On Thu, 2026-07-02 at 13:19 +0000, Daniel Turull wrote:
> > On Thu, 2026-07-02 at 13:03 +0200, Alexander Kanavin wrote:
> > > On Thu, 2 Jul 2026 at 11:55, Mathieu Dubois-Briand
> > > <mathieu.dubois-briand@bootlin.com> wrote:
> > >
> > > > I suspect we had the same issue with v2, we just have been a
> > > > bit
> > > > (un)lucky as it never ran on a Debian 11 worker.
> > >
> > > Debian 11 has host glibc that is too old for systemd. There are
> > > other
> > > distros that use an even older glibc, and they do not fail
> > > because
> > > they use buildtools. So we need to adjust the autobuilder to
> > > start
> > > using buildtools on debian 11 as well.
> > >
> > > Alex
> >
> > Yes, I can reproduce th problems with glibc on debian 11.
> >
> > I have tested inside a debian 11 container and using buildtools-
> > extendend-tarball should fix the issue.
>
> If we start putting buildtools everywhere, we may as well just stop
> testing on most of the distros :(.
>
> I'm already worried about the implications of buildtools on RHEL9
> derivatives :(.
>
In the case of Debian 11, EOL is August 2026.
https://www.debian.org/releases/
And without buildtools I was getting a different error than the
autobuilder, so probably a few things broke.
Is it worth the effort to put into make it compile with Debian 11 for 2
months, while there is the option to use buildtools-extended and works
ok?
Could we mark in the supported distro, which ones required buildtools?
then maybe is reduces the load on the testing?
We run buildtools-extendend on our rhel8. It isolate problems and maybe
it should be a guideline if you use old distros to build it with
buildtools-extended.
Cheers,
Daniel
> Cheers,
>
> Richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8
2026-07-02 13:34 ` Richard Purdie
2026-07-02 14:03 ` Daniel Turull
@ 2026-07-02 17:12 ` Alexander Kanavin
1 sibling, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2026-07-02 17:12 UTC (permalink / raw)
To: Richard Purdie
Cc: Daniel Turull, mathieu.dubois-briand@bootlin.com,
qi.chen@windriver.com, openembedded-core@lists.openembedded.org,
Ross.Burton@arm.com
On Thu, 2 Jul 2026 at 15:34, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> If we start putting buildtools everywhere, we may as well just stop
> testing on most of the distros :(.
>
> I'm already worried about the implications of buildtools on RHEL9
> derivatives :(.
The reasons for using buildtools are well understood: it's when the
host software (gcc, python) is too old to try to be compatible with.
Debian 11 is almost 5 years old at this point (one year older than
rhel 9) and goes EOL in just eight weeks. It also has a glibc version
that systemd explicitly does not support and fails to build with. I
think this fits the reasons.
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread