From: Trevor Woerner <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 1/3] wic: add runtime dependencies on the tools it invokes
Date: Tue, 7 Jul 2026 10:40:07 -0400 [thread overview]
Message-ID: <20260707144009.708407-2-twoerner@gmail.com> (raw)
In-Reply-To: <20260707144009.708407-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. Providing the tools as proper dependencies pins
known-good versions rather than leaving it to whatever the host has.
Add the tools as RDEPENDS so they are installed alongside wic and found
regardless of the host. They are added to the nativesdk variant only,
which is where wic is packaged for use outside a bitbake build; the
native and target variants are unaffected (and wic is not expected on a
target).
resize2fs is named explicitly: e2fsprogs splits it into its own
e2fsprogs-resize2fs package, so nativesdk-e2fsprogs alone does not
provide it, and it is needed by the wic cp/write resize path.
syslinux (with its isohybrid helper) is gated to x86 hosts; cdrtools
(mkisofs) is native-only with no nativesdk variant and is only needed
for ISO images, so it cannot be included here.
AI-Generated: codex/claude-opus 4.8 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
meta/recipes-support/wic/wic_0.3.0.bb | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/meta/recipes-support/wic/wic_0.3.0.bb b/meta/recipes-support/wic/wic_0.3.0.bb
index 7dbf84b039a6..2d4d32a6b15d 100644
--- a/meta/recipes-support/wic/wic_0.3.0.bb
+++ b/meta/recipes-support/wic/wic_0.3.0.bb
@@ -17,4 +17,27 @@ RDEPENDS:${PN} += " \
python3-misc \
"
+# Pull in the tools wic invokes for the nativesdk variant, where wic is
+# packaged for use outside a bitbake build; native and target are
+# unaffected. resize2fs is named explicitly as e2fsprogs splits it into
+# its own package.
+RDEPENDS:${PN}:append:class-nativesdk = " \
+ nativesdk-parted \
+ nativesdk-gptfdisk \
+ nativesdk-dosfstools \
+ nativesdk-mtools \
+ nativesdk-bmaptool \
+ nativesdk-grub \
+ nativesdk-btrfs-tools \
+ nativesdk-squashfs-tools \
+ nativesdk-e2fsprogs \
+ nativesdk-e2fsprogs-resize2fs \
+ nativesdk-util-linux \
+ nativesdk-tar \
+ nativesdk-erofs-utils \
+"
+
+# syslinux (with its isohybrid helper) only builds for x86 hosts.
+RDEPENDS:${PN}:append:class-nativesdk = "${@' nativesdk-syslinux nativesdk-syslinux-misc' if d.getVar('SDK_ARCH') in ['x86_64', 'i686'] else ''}"
+
BBCLASSEXTEND = "native nativesdk"
--
2.50.0.173.g8b6f19ccfc3a
next prev parent reply other threads:[~2026-07-07 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 14:40 [PATCH v2 0/3] wic: give installed wic the tools it needs Trevor Woerner
2026-07-07 14:40 ` Trevor Woerner [this message]
2026-07-07 14:40 ` [PATCH v2 2/3] buildtools-extended-tarball: drop wic helper tools Trevor Woerner
2026-07-07 14:40 ` [PATCH v2 3/3] nativesdk-packagegroup-sdk-host: optionally add wic 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=20260707144009.708407-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.