mbox series

[0/4] wic: ship the tools it needs where it is packaged

Message ID 20260701075411.1092848-1-twoerner@gmail.com
Headers show
Series wic: ship the tools it needs where it is packaged | expand

Message

Trevor Woerner July 1, 2026, 7:54 a.m. UTC
wic shells out to a number of host-side tools (parted, mkdosfs, mcopy,
the mkfs.* family, mdir, sfdisk, e2fsck, resize2fs, ...) but does not
declare them as dependencies. For the bitbake do_image_wic task this is
covered by the wic-tools recipe. Wherever else wic is installed as a
package it gets none of them, and its offline lookup (wic ls/cp/write)
falls back to the host PATH, so wic works only by chance depending on
what the host has installed:

  wic.WicError: Can't find executable 'mcopy'

This series makes wic carry its own tool dependencies wherever it is
packaged, and then takes advantage of that to offer it in the SDK:

  1. move the helper-tool list shared with wic-tools into wic-tools.inc
  2. have nativesdk-wic RDEPEND that list, so wic is complete wherever it
     is packaged
  3. simplify buildtools-extended-tarball to just nativesdk-wic
  4. add nativesdk-wic to the standard SDK host packagegroup

The native and target wic variants are unaffected; the tools are added
to the nativesdk variant only. cdrtools (mkisofs) is native-only with
no nativesdk variant and so is not included.

Trevor Woerner (4):
  wic-tools.inc: add
  wic: add runtime dependencies on the tools it invokes
  buildtools-extended-tarball: use nativesdk-wic
  nativesdk-packagegroup-sdk-host: add wic

 .../meta/buildtools-extended-tarball.bb       |  4 +---
 meta/recipes-core/meta/wic-tools.bb           | 15 ++++++------
 meta/recipes-core/meta/wic-tools.inc          | 24 +++++++++++++++++++
 .../nativesdk-packagegroup-sdk-host.bb        |  1 +
 meta/recipes-support/wic/wic_0.3.0.bb         | 18 ++++++++++++++
 5 files changed, 52 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-core/meta/wic-tools.inc