wic shells out to a range of host tools but does not declare them, so wherever it is installed as a package it works only by chance depending on what the host has installed. The do_image_wic task does not have that problem: image_types_wic.bbclass makes the image recipe depend on the -native recipe of each tool, so they are all in the image's own native sysroot by the time wic runs. Nothing outside that task gets the same treatment.
Patch 1 narrows wic-tools to staging wic's host tools: the target bootloader firmware (syslinux, grub-efi, systemd-boot) it depended on for the wic oe-selftest is now built by that oe-selftest instead. Which firmware is needed depends on the plugins a .wks uses, so it belongs to whoever supplies the .wks, not to wic-tools. Images already work that way through WKS_FILE_DEPENDS in image_types_wic.bbclass, and now the oe-selftest does too. Patch 2 gives that tool list a single home. It was written out three times -- in wic-tools, in image_types_wic.bbclass and (as of patch 3) in the wic recipe -- and the copies had already drifted. Patch 3 makes wic declare the host tools it runs as RDEPENDS, so they are installed alongside it in every variant that packages it. Patches 4 and 5 are follow-on cleanups of the wic oe-selftest: drop a dead in-tree wic lookup, and drop the redundant per-test PATH overrides that duplicated what the test setup already establishes. Patch 6 fixes a dependency that has been on the wrong axis since 2019: an image depends on syslinux-native when the build host is x86, but it is the target that decides whether a .wks needs it, so an x86 image built on a non-x86 host ends up with the bootloader but not the installer. That is bug 16383, which carries the full history: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16383 Should wic-tools be renamed? Nothing but the wic oe-selftest has used it since 2017, when do_image_wic stopped depending on it, and it already sits in meta/recipes-core/meta/ alongside meta-environment, meta-ide-support and meta-toolchain without following their naming. meta-wic-support would fit better, but it is a user-visible rename, so I would rather hear objections before doing it. changes in v5: - the SDK_FEATURES half of the v4 series (patches 5 to 10) is not here. Reworking it to resolve features at the class level, as review asked, turned it into a larger piece of work than the wic changes it was travelling with, so it is being finished and sent as its own series. - new patch 2: one shared list of the tools wic runs, replacing the three copies that had drifted apart. Images gain tar-native and util-linux-native, which only wic-tools staged before. - new patch 6: gate syslinux-native on the target rather than the build host [YOCTO #13276] - wic RDEPENDS patch: drop the bootloader (grub, syslinux) RDEPENDS entirely; wic declares only the host tools it runs. The bootloader firmware wic copies into an image is the responsibility of whatever drives wic (the oe-selftest, and image_types_wic.bbclass via WKS_FILE_DEPENDS), not of the wic package. This also removes the arch-gating that the v4 grub/syslinux RDEPENDS required. - drastically trimmed the commit messages and in-tree comments throughout the series changes in v4: - new patch 1: move the target bootloader firmware out of wic-tools and stage it from the wic oe-selftest instead, so wic-tools carries only the host tools wic runs - new selftest cleanups (drop the dead COREBASE/scripts wic lookup and the redundant per-test PATH overrides) changes in v3: - list the tools on all variants rather than only the nativesdk variant changes in v2: - dropped the wic-tools.inc refactor; folded the tool list into the wic recipe - reworked the buildtools-extended-tarball change into a plain removal Trevor Woerner (6): wic-tools: drop the target bootloader firmware wic: add a shared helper tool list wic: add runtime dependencies on the tools it invokes oeqa/selftest/wic: drop dead COREBASE/scripts wic lookup oeqa/selftest/wic: drop redundant per-test PATH overrides wic: gate syslinux-native on the target, not the build host meta/classes-recipe/image_types_wic.bbclass | 8 +- meta/conf/wic-helper-tools.inc | 22 + meta/lib/oeqa/selftest/cases/wic.py | 842 +++++++++----------- meta/recipes-core/meta/wic-tools.bb | 12 +- meta/recipes-support/wic/wic_0.3.1.bb | 3 + 5 files changed, 425 insertions(+), 462 deletions(-) create mode 100644 meta/conf/wic-helper-tools.inc -- 2.50.0.173.g8b6f19ccfc3a
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#242446): https://lists.openembedded.org/g/openembedded-core/message/242446 Mute This Topic: https://lists.openembedded.org/mt/120536428/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
