From: Trevor Woerner <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v3 1/6] wic: add runtime dependencies on the tools it invokes
Date: Fri, 17 Jul 2026 09:34:16 -0400 [thread overview]
Message-ID: <20260717133421.3510970-2-twoerner@gmail.com> (raw)
In-Reply-To: <20260717133421.3510970-1-twoerner@gmail.com>
wic shells out to a number of host-side tools to do its work: parted,
mkdosfs, mcopy, the mkfs.* family, sfdisk, e2fsck, resize2fs, debugfs,
blkid and more, depending on the operation and on the partition types
in the image.
None of these are declared as dependencies of wic. For the bitbake
do_image_wic task this is handled by the wic-tools recipe, which builds
the tools into a native sysroot. Wherever else wic is installed as a
package it gets none of them, and its offline lookup (wic ls/cp/write)
resolves each tool over a search path that falls back to the host PATH,
so on a machine that happens to have the tool installed system-wide wic
succeeds while on a machine without it wic fails:
wic.WicError: Can't find executable 'mcopy'
Falling back to the host is unreliable even when the tool is found: wic
depends on specific minimum versions of some of these tools, and an
arbitrary host copy may be too old, so wic can pick up a tool that does
not behave as it needs. Declaring the tools as dependencies pins
known-good versions instead of trusting whatever the host provides.
Add the tools wic runs as RDEPENDS so they are installed alongside it.
resize2fs is listed on its own because e2fsprogs packages it separately
as e2fsprogs-resize2fs, which e2fsprogs does not pull in, and wic needs
it for the cp/write resize path.
syslinux (with its isohybrid helper) is only available on x86, so it is
gated to those hosts; cdrtools (mkisofs) is native-only with no
nativesdk variant and is only needed for ISO images, so it is not
listed here.
AI-Generated: codex/claude-opus 4.8 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
changes in v3:
- list the tools on all variants rather than only the nativesdk variant
changes in v2:
- merge the tool list from the v1 "wic-tools.inc: add" patch into this recipe as RDEPENDS; the separate .inc is dropped
- list the tools inline rather than via a shared WIC_TOOLS variable
- note in the commit log that a host tool may also be the wrong version, not merely absent
---
meta/recipes-support/wic/wic_0.3.1.bb | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/meta/recipes-support/wic/wic_0.3.1.bb b/meta/recipes-support/wic/wic_0.3.1.bb
index d9b4cc05c4bd..0911a2ae35d7 100644
--- a/meta/recipes-support/wic/wic_0.3.1.bb
+++ b/meta/recipes-support/wic/wic_0.3.1.bb
@@ -17,4 +17,27 @@ RDEPENDS:${PN} += " \
python3-misc \
"
+# wic shells out to these host-side tools when it runs, so they must be
+# installed alongside it.
+RDEPENDS:${PN} += " \
+ parted \
+ gptfdisk \
+ dosfstools \
+ mtools \
+ bmaptool \
+ grub \
+ btrfs-tools \
+ squashfs-tools \
+ e2fsprogs \
+ e2fsprogs-resize2fs \
+ util-linux \
+ tar \
+ erofs-utils \
+"
+
+# syslinux (with its isohybrid helper) is only available on x86.
+RDEPENDS:${PN}:append:x86 = " syslinux syslinux-misc"
+RDEPENDS:${PN}:append:x86-64 = " syslinux syslinux-misc"
+RDEPENDS:${PN}:append:x86-x32 = " syslinux syslinux-misc"
+
BBCLASSEXTEND = "native nativesdk"
--
2.50.0.173.g8b6f19ccfc3a
next prev parent reply other threads:[~2026-07-17 13:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 13:34 [PATCH v3 0/6] wic: ship its tools, and add an SDK_FEATURES lever Trevor Woerner
2026-07-17 13:34 ` Trevor Woerner [this message]
2026-07-17 13:34 ` [PATCH v3 2/6] nativesdk-packagegroup-sdk-host: add wic via a new " Trevor Woerner
2026-07-17 13:34 ` [PATCH v3 3/6] nativesdk-packagegroup-sdk-host: gate qemu behind SDK_FEATURES Trevor Woerner
2026-07-17 13:34 ` [PATCH v3 4/6] nativesdk-packagegroup-sdk-host: add an sbom SDK feature Trevor Woerner
2026-07-17 13:34 ` [PATCH v3 5/6] packagegroup-cross-canadian: gate gdb behind SDK_FEATURES Trevor Woerner
2026-07-17 13:34 ` [PATCH v3 6/6] nativesdk-packagegroup-sdk-host: add an lldb SDK feature Trevor Woerner
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=20260717133421.3510970-2-twoerner@gmail.com \
--to=twoerner@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/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