Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Tan Siewert <tan.siewert@9elements.com>
To: openembedded-core@lists.openembedded.org
Cc: Sai Sireesha T <saisireesha.t@windriver.com>,
	 Patrick Williams <patrick@stwcx.xyz>,
	 Tan Siewert <tan.siewert@9elements.com>
Subject: [PATCH 4/4] systemd: add fdisk packageconfig
Date: Fri, 23 Oct 2026 12:51:56 +0200	[thread overview]
Message-ID: <20261023-systemd-optimisations-v1-4-0cce103e54df@9elements.com> (raw)
In-Reply-To: <20261023-systemd-optimisations-v1-0-0cce103e54df@9elements.com>

libfdisk is used only by repart, homed and sysupdate, but as a dlopen
dependency of libsystemd-shared it always adds an RRECOMMENDS entry for
util-linux-libfdisk, even when none of those features are enabled.

Add a packageconfig option and make repart and homed require it, as they
would otherwise fail. sysupdate is auto-detected and silently dropped
when fdisk is disabled.

Signed-off-by: Tan Siewert <tan.siewert@9elements.com>
---
 meta/recipes-core/systemd/systemd_262.bb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_262.bb b/meta/recipes-core/systemd/systemd_262.bb
index 03f4e049d5..65c6ce141d 100644
--- a/meta/recipes-core/systemd/systemd_262.bb
+++ b/meta/recipes-core/systemd/systemd_262.bb
@@ -57,6 +57,7 @@ PACKAGECONFIG ??= " \
     backlight \
     binfmt \
     coredump \
+    fdisk \
     gshadow \
     hibernate \
     hostnamed \
@@ -131,6 +132,7 @@ PACKAGECONFIG[default-compression-xz] = "-Dxz=true -Ddefault-compression=xz,,xz"
 PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true -Ddefault-compression=zstd,,zstd"
 PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=enabled,-Defi=false -Dbootloader=disabled,python3-pyelftools-native"
 PACKAGECONFIG[elfutils] = "-Delfutils=enabled,-Delfutils=disabled,elfutils"
+PACKAGECONFIG[fdisk] = "-Dfdisk=enabled,-Dfdisk=disabled"
 PACKAGECONFIG[fido] = "-Dlibfido2=enabled,-Dlibfido2=disabled,libfido2-initial"
 PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
 PACKAGECONFIG[repart] = "-Drepart=enabled,-Drepart=disabled"
@@ -869,11 +871,11 @@ python __anonymous() {
     if bb.utils.contains('DISTRO_FEATURES', 'systemd-resolved', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'nss-resolve resolved', True, False, d):
         bb.error("DISTRO_FEATURES[systemd-resolved] requires PACKAGECONFIG[nss-resolve, resolved]")
 
-    if bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'openssl', True, False, d):
-        bb.error("PACKAGECONFIG[repart] requires PACKAGECONFIG[openssl]")
+    if bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'openssl fdisk', True, False, d):
+        bb.error("PACKAGECONFIG[repart] requires PACKAGECONFIG[openssl] and PACKAGECONFIG[fdisk]")
 
-    if bb.utils.contains('PACKAGECONFIG', 'homed', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'userdb openssl cryptsetup', True, False, d):
-        bb.error("PACKAGECONFIG[homed] requires PACKAGECONFIG[userdb], PACKAGECONFIG[openssl] and PACKAGECONFIG[cryptsetup]")
+    if bb.utils.contains('PACKAGECONFIG', 'homed', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'userdb openssl cryptsetup fdisk', True, False, d):
+        bb.error("PACKAGECONFIG[homed] requires PACKAGECONFIG[userdb], PACKAGECONFIG[openssl], PACKAGECONFIG[cryptsetup] and PACKAGECONFIG[fdisk]")
 
     if bb.utils.contains('PACKAGECONFIG', 'sysinstall', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d):
         bb.warn("PACKAGECONFIG[sysinstall] may call commands from PACKAGECONFIG[repart]. Consider adding it")

-- 
2.53.0


  parent reply	other threads:[~2026-10-23 10:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 10:51 [PATCH 0/4] systemd: add packageconfigs for storage optimisation Tan Siewert
2026-10-23 10:51 ` [PATCH 1/4] systemd: add ukify packageconfig Tan Siewert
2026-10-23 11:34   ` Paul Barker
2026-10-28 14:48     ` Tan Siewert
2026-10-23 10:51 ` [PATCH 2/4] systemd: add sysinstall packageconfig Tan Siewert
2026-10-23 10:51 ` [PATCH 3/4] systemd: add hwdb packageconfig Tan Siewert
2026-10-23 10:51 ` Tan Siewert [this message]
2026-10-23 20:00 ` [PATCH 0/4] systemd: add packageconfigs for storage optimisation Tirumala Pudi, Sai Sireesha
2026-10-28 14:50   ` Tan Siewert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261023-systemd-optimisations-v1-4-0cce103e54df@9elements.com \
    --to=tan.siewert@9elements.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=patrick@stwcx.xyz \
    --cc=saisireesha.t@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox