Skip to contentSkip to conversation

systemd: drop libmount dependency and add blkid and fdisk PACKAGECONFIGs

PATCH Superseded Hiago De Franco 3 participants 9 messages Jul 16, 2025 – Jul 17, 2025 1 message not in the archive Arm/Amlogic Meson SoC support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover systemd: drop libmount dependency and add blkid and fdisk PACKAGECONFIGs

From: Hiago De Franco <[email protected]>

The libmount dependency in systemd was made optional upstream [2]. This series backports that change, allowing us to drop util-linux as a build dependency for systemd. This resolves a circular dependency between util-linux and systemd when systemd PACKAGECONFIG is enabled in util-linux. Without this fix, each recipe depends on the other, triggering the circular dependency error.

Note that this alone does not fully resolve the circular dependency on util-linux-fstrim/uuid. There is another one:

glib-2.0 -> util-linux -> systemd -> shared-mime-info -> glib-2.0

But the libmount PACKAGECONFIG can be removed from glib-2.0 to break its dependency on util-linux.

In addition, according to systemd's README [2], the dependencies on libblkid and libfdisk from util-linux are optional, so add them as new PACKAGECONFIGs.

[1] https://github.com/systemd/systemd/commit/d1ee3889cf8e8a9edc82e41d306155fb4c531c8f
[2] https://github.com/systemd/systemd/blob/main/README#L216

Hiago De Franco (2):
systemd: drop build dependency on util-linux
systemd: add libblkid and libfdisk PACKAGECONFIG options

 .../0001-meson-Add-libmount-feature.patch     | 58 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_257.6.bb    |  9 ++-
 2 files changed, 65 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch
Signature · 1 line
2.39.5
#1 lore raw

PATCH 1/2 systemd: drop build dependency on util-linux

From: Hiago De Franco <[email protected]>

The libmount dependency was made optional on systemd upstream [2]. By backporting this upstream change, we can drop util-linux as a build dependency for systemd, making it only as a runtime dependency.

This is important to fix a circular dependency between util-linux and systemd when util-linux is built with the systemd PACKAGECONFIG enabled. Without this change, each recipe depends on the other, triggering the circular dependency error.

[1] https://github.com/systemd/systemd/blob/main/README#L216
[2] https://github.com/systemd/systemd/commit/d1ee3889cf8e8a9edc82e41d306155fb4c531c8f

---
 .../0001-meson-Add-libmount-feature.patch     | 58 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_257.6.bb    |  7 ++-
 2 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch
meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch new file +58 -0
new file mode 100644
index 000000000000..b04acd6fef08
@@ -0,0 +1,58 @@
+From 821c809e1e1e449f5a2fe591d6aae1343b141b6c Mon Sep 17 00:00:00 2001
+From: Daan De Meyer <[email protected]>
+Date: Thu, 5 Jun 2025 11:05:08 +0200
+Subject: [PATCH] meson: Add libmount feature
+
+Let's reduce the dependencies required to build just libsystemd by
+making libmount optional. The meson disabler feature makes this quite
+trivial.
+
+Upstream-Status: Backport [d1ee3889cf8e8a9edc82e41d306155fb4c531c8f]
+Signed-off-by: Hiago De Franco <[email protected]>
+---
+ meson.build       | 4 +++-
+ meson_options.txt | 2 ++
+ tools/oss-fuzz.sh | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 957e00ecad..594fadbb37 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1179,7 +1179,9 @@ else
+ endif
+ 
+ libmount = dependency('mount',
+-                      version : fuzzer_build ? '>= 0' : '>= 2.30')
++                      version : fuzzer_build ? '>= 0' : '>= 2.30',
++                      disabler : true,
++                      required : get_option('libmount'))
+ 
+ libfdisk = dependency('fdisk',
+                       version : '>= 2.32',
+diff --git a/meson_options.txt b/meson_options.txt
+index f30b3f5238..f292732d62 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -471,6 +471,8 @@ option('dbus', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'd
+        description : 'libdbus support (for tests only)')
+ option('libarchive', type : 'feature',
+        description : 'libarchive support')
++option('libmount', type : 'feature',
++       description : 'libmount support')
+ 
+ option('bootloader', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
+        description : 'sd-boot/stub and userspace tools')
+diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh
+index df3d39eba6..b7a70207df 100755
+--- a/tools/oss-fuzz.sh
++++ b/tools/oss-fuzz.sh
+@@ -32,7 +32,7 @@ meson_args=("-Db_lundef=false")
+ if [ -z "$FUZZING_ENGINE" ]; then
+     meson_args+=("-Dllvm-fuzz=true")
+ else
+-    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled")
++    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled" "-Dlibmount=enabled")
+ 
+     apt-get update
+     apt-get install -y gperf m4 gettext python3-pip \
meta/recipes-core/systemd/systemd_257.6.bb +5 -2
index 9092d02c5109..d73c0cfe0d8b 100644
@@ -4,7 +4,7 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "gperf-native libcap util-linux python3-jinja2-native"
+DEPENDS = "gperf-native libcap python3-jinja2-native"
 
 SECTION = "base/shell"
 
@@ -29,6 +29,7 @@ SRC_URI += " \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0002-implment-systemd-sysv-install-for-OE.patch \
            file://0001-Do-not-create-var-log-README.patch \
+           file://0001-meson-Add-libmount-feature.patch \
            "
 
 # patches needed by musl
@@ -81,6 +82,7 @@ PACKAGECONFIG ??= " \
     idn \
     ima \
     kmod \
+    libmount \
     localed \
     logind \
     machined \
@@ -172,6 +174,7 @@ PACKAGECONFIG[kmod] = "-Dkmod=enabled,-Dkmod=disabled,kmod,libkmod"
 PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
 PACKAGECONFIG[libidn] = "-Dlibidn=enabled,-Dlibidn=disabled,libidn,,libidn"
 PACKAGECONFIG[libidn2] = "-Dlibidn2=enabled,-Dlibidn2=disabled,libidn2,,libidn2"
+PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux,util-linux-mount util-linux-umount"
 # Link udev shared with systemd helper library.
 # If enabled the udev package depends on the systemd package (which has the needed shared library).
 PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false"
@@ -742,7 +745,7 @@ FILES:${PN} = " ${base_bindir}/* \
 
 FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
 
-RDEPENDS:${PN} += "kmod ${VIRTUAL-RUNTIME_dbus} util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap"
+RDEPENDS:${PN} += "kmod ${VIRTUAL-RUNTIME_dbus} udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap"
 RDEPENDS:${PN} += "systemd-serialgetty"
 RDEPENDS:${PN} += "volatile-binds"
 
Signature · 1 line
2.39.5
#2 lore raw

Re: [PATCH 1/2] systemd: drop build dependency on util-linux

I don't understand. The backported patch adds a meson option, but not any uses of it. Why is it needed?

Alex

Quoted 135 lines · Hiago De Franco

From: Hiago De Franco <[email protected]>

The libmount dependency was made optional on systemd upstream [2]. By backporting this upstream change, we can drop util-linux as a build dependency for systemd, making it only as a runtime dependency.

This is important to fix a circular dependency between util-linux and systemd when util-linux is built with the systemd PACKAGECONFIG enabled. Without this change, each recipe depends on the other, triggering the circular dependency error.

[1] https://github.com/systemd/systemd/blob/main/README#L216
[2] https://github.com/systemd/systemd/commit/d1ee3889cf8e8a9edc82e41d306155fb4c531c8f

---
 .../0001-meson-Add-libmount-feature.patch     | 58 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_257.6.bb    |  7 ++-
 2 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch
meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch new file +58 -0
new file mode 100644
index 000000000000..b04acd6fef08
@@ -0,0 +1,58 @@
+From 821c809e1e1e449f5a2fe591d6aae1343b141b6c Mon Sep 17 00:00:00 2001
+From: Daan De Meyer <[email protected]>
+Date: Thu, 5 Jun 2025 11:05:08 +0200
+Subject: [PATCH] meson: Add libmount feature
+
+Let's reduce the dependencies required to build just libsystemd by
+making libmount optional. The meson disabler feature makes this quite
+trivial.
+
+Upstream-Status: Backport [d1ee3889cf8e8a9edc82e41d306155fb4c531c8f]
+Signed-off-by: Hiago De Franco <[email protected]>
+---
+ meson.build       | 4 +++-
+ meson_options.txt | 2 ++
+ tools/oss-fuzz.sh | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 957e00ecad..594fadbb37 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1179,7 +1179,9 @@ else
+ endif
+
+ libmount = dependency('mount',
+-                      version : fuzzer_build ? '>= 0' : '>= 2.30')
++                      version : fuzzer_build ? '>= 0' : '>= 2.30',
++                      disabler : true,
++                      required : get_option('libmount'))
+
+ libfdisk = dependency('fdisk',
+                       version : '>= 2.32',
+diff --git a/meson_options.txt b/meson_options.txt
+index f30b3f5238..f292732d62 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -471,6 +471,8 @@ option('dbus', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'd
+        description : 'libdbus support (for tests only)')
+ option('libarchive', type : 'feature',
+        description : 'libarchive support')
++option('libmount', type : 'feature',
++       description : 'libmount support')
+
+ option('bootloader', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
+        description : 'sd-boot/stub and userspace tools')
+diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh
+index df3d39eba6..b7a70207df 100755
+--- a/tools/oss-fuzz.sh
++++ b/tools/oss-fuzz.sh
+@@ -32,7 +32,7 @@ meson_args=("-Db_lundef=false")
+ if [ -z "$FUZZING_ENGINE" ]; then
+     meson_args+=("-Dllvm-fuzz=true")
+ else
+-    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled")
++    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled" "-Dlibmount=enabled")
+
+     apt-get update
+     apt-get install -y gperf m4 gettext python3-pip \
meta/recipes-core/systemd/systemd_257.6.bb +5 -3
index 9092d02c5109..d73c0cfe0d8b 100644
@@ -4,7 +4,7 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "gperf-native libcap util-linux python3-jinja2-native"
+DEPENDS = "gperf-native libcap python3-jinja2-native"
 
 SECTION = "base/shell"
 
@@ -29,6 +29,7 @@ SRC_URI += " \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0002-implment-systemd-sysv-install-for-OE.patch \
            file://0001-Do-not-create-var-log-README.patch \
+           file://0001-meson-Add-libmount-feature.patch \
            "
 
 # patches needed by musl
@@ -81,6 +82,7 @@ PACKAGECONFIG ??= " \
     idn \
     ima \
     kmod \
+    libmount \
     localed \
     logind \
     machined \
@@ -172,6 +174,7 @@ PACKAGECONFIG[kmod] = "-Dkmod=enabled,-Dkmod=disabled,kmod,libkmod"
 PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
 PACKAGECONFIG[libidn] = "-Dlibidn=enabled,-Dlibidn=disabled,libidn,,libidn"
 PACKAGECONFIG[libidn2] = "-Dlibidn2=enabled,-Dlibidn2=disabled,libidn2,,libidn2"
+PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux,util-linux-mount util-linux-umount"
 # Link udev shared with systemd helper library.
 # If enabled the udev package depends on the systemd package (which has the needed shared library).
 PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false"
@@ -742,7 +745,7 @@ FILES:${PN} = " ${base_bindir}/* \
 
 FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
 
-RDEPENDS:${PN} += "kmod ${VIRTUAL-RUNTIME_dbus} util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap"
+RDEPENDS:${PN} += "kmod ${VIRTUAL-RUNTIME_dbus} udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap"
 RDEPENDS:${PN} += "systemd-serialgetty"
 RDEPENDS:${PN} += "volatile-binds"
 
--

2.39.5

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [OE-core] [PATCH 1/2] systemd: drop build dependency on util-linux

Ah nevermind. The dependency was already there, it's just converted from floating to explicit?

Alex

Quoted 151 lines · Alexander Kanavin via lists.openembedded.org

I don't understand. The backported patch adds a meson option, but not any uses of it. Why is it needed?

Alex

Quoted 133 lines · Hiago De Franco

From: Hiago De Franco <[email protected]>

The libmount dependency was made optional on systemd upstream [2]. By backporting this upstream change, we can drop util-linux as a build dependency for systemd, making it only as a runtime dependency.

This is important to fix a circular dependency between util-linux and systemd when util-linux is built with the systemd PACKAGECONFIG enabled. Without this change, each recipe depends on the other, triggering the circular dependency error.

[1] https://github.com/systemd/systemd/blob/main/README#L216
[2] https://github.com/systemd/systemd/commit/d1ee3889cf8e8a9edc82e41d306155fb4c531c8f

---
 .../0001-meson-Add-libmount-feature.patch     | 58 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_257.6.bb    |  7 ++-
 2 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch
meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch new file +58 -0
new file mode 100644
index 000000000000..b04acd6fef08
@@ -0,0 +1,58 @@
+From 821c809e1e1e449f5a2fe591d6aae1343b141b6c Mon Sep 17 00:00:00 2001
+From: Daan De Meyer <[email protected]>
+Date: Thu, 5 Jun 2025 11:05:08 +0200
+Subject: [PATCH] meson: Add libmount feature
+
+Let's reduce the dependencies required to build just libsystemd by
+making libmount optional. The meson disabler feature makes this quite
+trivial.
+
+Upstream-Status: Backport [d1ee3889cf8e8a9edc82e41d306155fb4c531c8f]
+Signed-off-by: Hiago De Franco <[email protected]>
+---
+ meson.build       | 4 +++-
+ meson_options.txt | 2 ++
+ tools/oss-fuzz.sh | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 957e00ecad..594fadbb37 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1179,7 +1179,9 @@ else
+ endif
+
+ libmount = dependency('mount',
+-                      version : fuzzer_build ? '>= 0' : '>= 2.30')
++                      version : fuzzer_build ? '>= 0' : '>= 2.30',
++                      disabler : true,
++                      required : get_option('libmount'))
+
+ libfdisk = dependency('fdisk',
+                       version : '>= 2.32',
+diff --git a/meson_options.txt b/meson_options.txt
+index f30b3f5238..f292732d62 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -471,6 +471,8 @@ option('dbus', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'd
+        description : 'libdbus support (for tests only)')
+ option('libarchive', type : 'feature',
+        description : 'libarchive support')
++option('libmount', type : 'feature',
++       description : 'libmount support')
+
+ option('bootloader', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
+        description : 'sd-boot/stub and userspace tools')
+diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh
+index df3d39eba6..b7a70207df 100755
+--- a/tools/oss-fuzz.sh
++++ b/tools/oss-fuzz.sh
+@@ -32,7 +32,7 @@ meson_args=("-Db_lundef=false")
+ if [ -z "$FUZZING_ENGINE" ]; then
+     meson_args+=("-Dllvm-fuzz=true")
+ else
+-    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled")
++    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled" "-Dlibmount=enabled")
+
+     apt-get update
+     apt-get install -y gperf m4 gettext python3-pip \
meta/recipes-core/systemd/systemd_257.6.bb +5 -3
index 9092d02c5109..d73c0cfe0d8b 100644
@@ -4,7 +4,7 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "gperf-native libcap util-linux python3-jinja2-native"
+DEPENDS = "gperf-native libcap python3-jinja2-native"
 
 SECTION = "base/shell"
 
@@ -29,6 +29,7 @@ SRC_URI += " \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0002-implment-systemd-sysv-install-for-OE.patch \
            file://0001-Do-not-create-var-log-README.patch \
+           file://0001-meson-Add-libmount-feature.patch \
            "
 
 # patches needed by musl
@@ -81,6 +82,7 @@ PACKAGECONFIG ??= " \
     idn \
     ima \
     kmod \
+    libmount \
     localed \
     logind \
     machined \
@@ -172,6 +174,7 @@ PACKAGECONFIG[kmod] = "-Dkmod=enabled,-Dkmod=disabled,kmod,libkmod"
 PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
 PACKAGECONFIG[libidn] = "-Dlibidn=enabled,-Dlibidn=disabled,libidn,,libidn"
 PACKAGECONFIG[libidn2] = "-Dlibidn2=enabled,-Dlibidn2=disabled,libidn2,,libidn2"
+PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux,util-linux-mount util-linux-umount"
 # Link udev shared with systemd helper library.
 # If enabled the udev package depends on the systemd package (which has the needed shared library).
 PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false"
@@ -742,7 +745,7 @@ FILES:${PN} = " ${base_bindir}/* \
 
 FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
 
-RDEPENDS:${PN} += "kmod ${VIRTUAL-RUNTIME_dbus} util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap"
+RDEPENDS:${PN} += "kmod ${VIRTUAL-RUNTIME_dbus} udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap"
 RDEPENDS:${PN} += "systemd-serialgetty"
 RDEPENDS:${PN} += "volatile-binds"
 
--
Quoted 2 lines

2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#220528): https://lists.openembedded.org/g/openembedded-core/message/220528
Mute This Topic: https://lists.openembedded.org/mt/114194829/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw

Re: [OE-core] [PATCH 1/2] systemd: drop build dependency on util-linux

Hi Alex,

Quoted 2 lines · Alexander Kanavin

Ah nevermind. The dependency was already there, it's just converted from floating to explicit?

Yes it was already there, but now we can set the option to build without it, so we can remove it from DEPENDS and convert it into a PACKAGECONFIG.

Thanks!

Hiago.

Quoted 3 lines

Alex

#6 lore raw

PATCH 2/2 systemd: add libblkid and libfdisk PACKAGECONFIG options

In reply to Hiago De Franco

From: Hiago De Franco <[email protected]>

Introduce new PACKAGECONFIG options in systemd for both libblkid and libfdisk to allow explicit control over these optional dependencies [1] [2].

[1] https://github.com/systemd/systemd/blob/main/README#L219
[2] https://github.com/systemd/systemd/blob/main/README#L228

---
 meta/recipes-core/systemd/systemd_257.6.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd_257.6.bb +2 -0
index d73c0cfe0d8b..019f084b2e34 100644
@@ -137,6 +137,7 @@ PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit"
 PACKAGECONFIG[apparmor] = "-Dapparmor=enabled,-Dapparmor=disabled,apparmor"
 PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
 PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
+PACKAGECONFIG[blkid] = "-Dblkid=enabled,-Dblkid=disabled,util-linux,util-linux-libblkid util-linux-blkid"
 PACKAGECONFIG[bpf-framework] = "-Dbpf-framework=enabled,-Dbpf-framework=disabled,clang-native bpftool-native libbpf,libbpf"
 PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2"
 PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
@@ -152,6 +153,7 @@ PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true -Ddefault-compression=zst
 PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus"
 PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=enabled,-Defi=false -Dbootloader=disabled,python3-pyelftools-native"
 PACKAGECONFIG[elfutils] = "-Delfutils=enabled,-Delfutils=disabled,elfutils,,libelf libdw"
+PACKAGECONFIG[fdisk] = "-Dfdisk=enabled,-Dfdisk=disabled,util-linux,util-linux-libfdisk util-linux-fdisk"
 PACKAGECONFIG[fido] = "-Dlibfido2=enabled,-Dlibfido2=disabled,libfido2"
 PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
 PACKAGECONFIG[repart] = "-Drepart=enabled,-Drepart=disabled"
Signature · 1 line
2.39.5
#7 lore raw
In reply to Hiago De Franco
Quoted 24 lines · Hiago De Franco via lists.openembedded.org

From: Hiago De Franco <[email protected]>

The libmount dependency in systemd was made optional upstream [2]. This series backports that change, allowing us to drop util-linux as a build dependency for systemd. This resolves a circular dependency between util-linux and systemd when systemd PACKAGECONFIG is enabled in util-linux. Without this fix, each recipe depends on the other, triggering the circular dependency error.

Note that this alone does not fully resolve the circular dependency on util-linux-fstrim/uuid. There is another one:

glib-2.0 -> util-linux -> systemd -> shared-mime-info -> glib-2.0

But the libmount PACKAGECONFIG can be removed from glib-2.0 to break its dependency on util-linux.

In addition, according to systemd's README [2], the dependencies on libblkid and libfdisk from util-linux are optional, so add them as new PACKAGECONFIGs.

[1] https://github.com/systemd/systemd/commit/d1ee3889cf8e8a9edc82e41d306155fb4c531c8f
[2] https://github.com/systemd/systemd/blob/main/README#L216

Quoted 8 lines

Hiago De Franco (2):
systemd: drop build dependency on util-linux
systemd: add libblkid and libfdisk PACKAGECONFIG options

 .../0001-meson-Add-libmount-feature.patch     | 58 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_257.6.bb    |  9 ++-
 2 files changed, 65 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch

Hi Hiago,

Thanks for your patches.

I suspect this series is responsible from a test failure:

Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
return func(*args, **kwargs)
File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/runtime/cases/systemd.py", line 100, in test_systemd_failed

    output += self.systemctl('status --full --failed')

File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/runtime/cases/systemd.py", line 26, in systemctl
self.assertEqual(status, expected, message)
AssertionError: 3 != 0 : SYSTEMD_BUS_TIMEOUT=240s systemctl status --full --failed
× systemd-boot-update.service - Automatic Boot Loader Update
Loaded: loaded (/usr/lib/systemd/system/systemd-boot-update.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-07-17 09:02:59 UTC; 25min ago
Invocation: a44df1a151da4bbfa387c056d59eb001
Docs: man:bootctl(1)
Main PID: 189 (code=exited, status=203/EXEC)
Mem peak: 828K

        CPU: 58ms

...
RESULTS - systemd.SystemdBasicTests.test_systemd_failed: FAILED (9.36s)

https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/2034
https://autobuilder.yoctoproject.org/valkyrie/#/builders/9/builds/2030
https://autobuilder.yoctoproject.org/valkyrie/#/builders/95/builds/2018
https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/2017

Can you have a look at this failure please?

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

Hi Mathieu,

Quoted 59 lines · Mathieu Dubois-Briand
Quoted 24 lines · Hiago De Franco via lists.openembedded.org

From: Hiago De Franco <[email protected]>

The libmount dependency in systemd was made optional upstream [2]. This series backports that change, allowing us to drop util-linux as a build dependency for systemd. This resolves a circular dependency between util-linux and systemd when systemd PACKAGECONFIG is enabled in util-linux. Without this fix, each recipe depends on the other, triggering the circular dependency error.

Note that this alone does not fully resolve the circular dependency on util-linux-fstrim/uuid. There is another one:

glib-2.0 -> util-linux -> systemd -> shared-mime-info -> glib-2.0

But the libmount PACKAGECONFIG can be removed from glib-2.0 to break its dependency on util-linux.

In addition, according to systemd's README [2], the dependencies on libblkid and libfdisk from util-linux are optional, so add them as new PACKAGECONFIGs.

[1] https://github.com/systemd/systemd/commit/d1ee3889cf8e8a9edc82e41d306155fb4c531c8f
[2] https://github.com/systemd/systemd/blob/main/README#L216

Quoted 8 lines

Hiago De Franco (2):
systemd: drop build dependency on util-linux
systemd: add libblkid and libfdisk PACKAGECONFIG options

 .../0001-meson-Add-libmount-feature.patch     | 58 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_257.6.bb    |  9 ++-
 2 files changed, 65 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch

Hi Hiago,

Thanks for your patches.

I suspect this series is responsible from a test failure:

Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
return func(*args, **kwargs)
File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/runtime/cases/systemd.py", line 100, in test_systemd_failed

    output += self.systemctl('status --full --failed')

File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/runtime/cases/systemd.py", line 26, in systemctl
self.assertEqual(status, expected, message)
AssertionError: 3 != 0 : SYSTEMD_BUS_TIMEOUT=240s systemctl status --full --failed
� systemd-boot-update.service - Automatic Boot Loader Update
Loaded: loaded (/usr/lib/systemd/system/systemd-boot-update.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-07-17 09:02:59 UTC; 25min ago
Invocation: a44df1a151da4bbfa387c056d59eb001
Docs: man:bootctl(1)
Main PID: 189 (code=exited, status=203/EXEC)
Mem peak: 828K

        CPU: 58ms

...
RESULTS - systemd.SystemdBasicTests.test_systemd_failed: FAILED (9.36s)

Quoted 6 lines

https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/2034
https://autobuilder.yoctoproject.org/valkyrie/#/builders/9/builds/2030
https://autobuilder.yoctoproject.org/valkyrie/#/builders/95/builds/2018
https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/2017

Can you have a look at this failure please?

Sure, I will take a look.

Best Regards,
Hiago.

Quoted 6 lines
Signature · 4 lines
-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw
Quoted 62 lines · Hiago De Franco

Hi Mathieu,

Quoted 59 lines · Mathieu Dubois-Briand
Quoted 24 lines · Hiago De Franco via lists.openembedded.org

From: Hiago De Franco <[email protected]>

The libmount dependency in systemd was made optional upstream [2]. This series backports that change, allowing us to drop util-linux as a build dependency for systemd. This resolves a circular dependency between util-linux and systemd when systemd PACKAGECONFIG is enabled in util-linux. Without this fix, each recipe depends on the other, triggering the circular dependency error.

Note that this alone does not fully resolve the circular dependency on util-linux-fstrim/uuid. There is another one:

glib-2.0 -> util-linux -> systemd -> shared-mime-info -> glib-2.0

But the libmount PACKAGECONFIG can be removed from glib-2.0 to break its dependency on util-linux.

In addition, according to systemd's README [2], the dependencies on libblkid and libfdisk from util-linux are optional, so add them as new PACKAGECONFIGs.

[1] https://github.com/systemd/systemd/commit/d1ee3889cf8e8a9edc82e41d306155fb4c531c8f
[2] https://github.com/systemd/systemd/blob/main/README#L216

Quoted 8 lines

Hiago De Franco (2):
systemd: drop build dependency on util-linux
systemd: add libblkid and libfdisk PACKAGECONFIG options

 .../0001-meson-Add-libmount-feature.patch     | 58 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_257.6.bb    |  9 ++-
 2 files changed, 65 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-libmount-feature.patch

Hi Hiago,

Thanks for your patches.

I suspect this series is responsible from a test failure:

Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
return func(*args, **kwargs)
File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/runtime/cases/systemd.py", line 100, in test_systemd_failed

    output += self.systemctl('status --full --failed')

File "/srv/pokybuild/yocto-worker/qemuarm-alt/build/meta/lib/oeqa/runtime/cases/systemd.py", line 26, in systemctl
self.assertEqual(status, expected, message)
AssertionError: 3 != 0 : SYSTEMD_BUS_TIMEOUT=240s systemctl status --full --failed
� systemd-boot-update.service - Automatic Boot Loader Update
Loaded: loaded (/usr/lib/systemd/system/systemd-boot-update.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-07-17 09:02:59 UTC; 25min ago
Invocation: a44df1a151da4bbfa387c056d59eb001
Docs: man:bootctl(1)
Main PID: 189 (code=exited, status=203/EXEC)
Mem peak: 828K

        CPU: 58ms

...
RESULTS - systemd.SystemdBasicTests.test_systemd_failed: FAILED (9.36s)

Quoted 8 lines
Quoted 6 lines

https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/2034
https://autobuilder.yoctoproject.org/valkyrie/#/builders/9/builds/2030
https://autobuilder.yoctoproject.org/valkyrie/#/builders/95/builds/2018
https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/2017

Can you have a look at this failure please?

Sure, I will take a look.

I was looking at it now and I was able to find the issue. We need to set the new blkid PACKAGECONFIG from patch 2 as default, because this is needed to build bootctl. I will fix this and send a v2.

Best regards,
Hiago.

Quoted 10 lines

Best Regards,
Hiago.

Quoted 6 lines
Signature · 4 lines
-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com