diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-05-10 20:15:50 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-05-10 20:15:50 +0000 |
| commit | 18c7f71383d650a97e28c95e3b61445cb6849bd4 (patch) | |
| tree | 81fddf8d97431eda64c8b2b1dd5c7b9737beb078 /conf/distro | |
| parent | cbe004439cae170ad5455fbb881495795e42bf5a (diff) | |
| download | meta-virtualization-18c7f71383d650a97e28c95e3b61445cb6849bd4.tar.gz | |
vcontainer: add BBMASK for parse savings and suppress layer warnings
The initial vcontainer distro had no BBMASK at all, making it
effectively poky with fewer DISTRO_FEATURES. Every multiconfig parsed
the entire recipe universe even though container image builds only
need a small subset. With 4+ multiconfigs, the parse overhead is
significant.
Add vcontainer-bbmask.inc as a lighter alternative to vruntime's
aggressive BBMASK. It masks the same categories irrelevant to any
container/VM build (graphics, multimedia, desktop, virtualization
platforms, orchestration tools, meta-python, meta-filesystems,
meta-webserver) but keeps the OCI tooling that vruntime blocks:
umoci, container-registry, image recipes, sloci, oci-image-tools.
Masking entire layers (meta-python, meta-filesystems, meta-webserver)
produces BBFILE_PATTERN warnings because the layers are registered in
bblayers.conf (shared with the main build) but have zero recipes after
masking. BitBake provides BBFILE_PATTERN_IGNORE_EMPTY_<collection>
to suppress this, but checks it on self.data (the base datastore),
not per-multiconfig datastores. Setting it in the distro config has
no effect. Move the suppression to meta-virt-host.conf which is
included by the main build's local.conf and therefore visible to
the base datastore.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'conf/distro')
| -rw-r--r-- | conf/distro/include/meta-virt-host.conf | 9 | ||||
| -rw-r--r-- | conf/distro/include/vcontainer-bbmask.inc | 122 | ||||
| -rw-r--r-- | conf/distro/include/vruntime-bbmask-meta-oe.inc | 17 | ||||
| -rw-r--r-- | conf/distro/vcontainer.conf | 11 |
4 files changed, 147 insertions, 12 deletions
diff --git a/conf/distro/include/meta-virt-host.conf b/conf/distro/include/meta-virt-host.conf index 36fcc09f..8c898f48 100644 --- a/conf/distro/include/meta-virt-host.conf +++ b/conf/distro/include/meta-virt-host.conf | |||
| @@ -20,3 +20,12 @@ PREFERRED_PROVIDER_virtual/runc ?= "runc" | |||
| 20 | # vruntime-* : minimal VM rootfs (vdkr/vpdmn blobs) | 20 | # vruntime-* : minimal VM rootfs (vdkr/vpdmn blobs) |
| 21 | # container-* : OCI container images (multi-arch) | 21 | # container-* : OCI container images (multi-arch) |
| 22 | BBMULTICONFIG ?= "vruntime-aarch64 vruntime-x86-64 container-aarch64 container-x86-64" | 22 | BBMULTICONFIG ?= "vruntime-aarch64 vruntime-x86-64 container-aarch64 container-x86-64" |
| 23 | |||
| 24 | # Suppress warnings for layers fully masked in vruntime/vcontainer multiconfigs. | ||
| 25 | # These layers are in bblayers.conf (needed by the main build) but their | ||
| 26 | # recipes are irrelevant to container/VM multiconfigs. BitBake checks | ||
| 27 | # BBFILE_PATTERN_IGNORE_EMPTY on self.data (the base datastore), not | ||
| 28 | # per-multiconfig, so this must be set here rather than in the distro config. | ||
| 29 | BBFILE_PATTERN_IGNORE_EMPTY_filesystems-layer = "1" | ||
| 30 | BBFILE_PATTERN_IGNORE_EMPTY_meta-python = "1" | ||
| 31 | BBFILE_PATTERN_IGNORE_EMPTY_webserver = "1" | ||
diff --git a/conf/distro/include/vcontainer-bbmask.inc b/conf/distro/include/vcontainer-bbmask.inc new file mode 100644 index 00000000..ac74464f --- /dev/null +++ b/conf/distro/include/vcontainer-bbmask.inc | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | # SPDX-FileCopyrightText: Copyright (C) 2025 Bruce Ashfield | ||
| 2 | # | ||
| 3 | # SPDX-License-Identifier: MIT | ||
| 4 | # | ||
| 5 | # BBMASK for vcontainer OCI image builder multiconfig builds. | ||
| 6 | # | ||
| 7 | # Lighter than vruntime's BBMASK: masks recipes irrelevant to container | ||
| 8 | # image construction (virtualization platforms, graphics, multimedia, | ||
| 9 | # desktop, orchestration) but keeps OCI tooling (umoci, skopeo), | ||
| 10 | # container image recipes, and the full container stack available. | ||
| 11 | # | ||
| 12 | # The vruntime BBMASK cannot be reused directly because it masks umoci, | ||
| 13 | # container-registry, recipes-extended/images/, and other recipes needed | ||
| 14 | # for OCI image building. BitBake BBMASK is append-only (no removal), | ||
| 15 | # so a separate lighter mask is required. | ||
| 16 | |||
| 17 | # --------------------------------------------------------------------------- | ||
| 18 | # oe-core: same masks as vruntime (graphics, multimedia, sato, rt) | ||
| 19 | # These are irrelevant to container image building. | ||
| 20 | # --------------------------------------------------------------------------- | ||
| 21 | BBMASK += "/meta/recipes-graphics/(?!wayland|libsdl2|virglrenderer|libepoxy|drm|mesa|spir|xorg-lib|xorg-proto|xorg-app|xorg-util)" | ||
| 22 | BBMASK += "/meta/recipes-multimedia/(?!alsa|libpng)" | ||
| 23 | BBMASK += "/meta/recipes-sato/" | ||
| 24 | BBMASK += "/meta/recipes-rt/" | ||
| 25 | BBMASK += "meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config" | ||
| 26 | BBMASK += "meta-erlang/recipes-graphics/mesa/libglu" | ||
| 27 | |||
| 28 | # --------------------------------------------------------------------------- | ||
| 29 | # meta-virtualization: virtualization platforms (not containers) | ||
| 30 | # Same as vruntime — Xen, libvirt, etc. are irrelevant for OCI images. | ||
| 31 | # --------------------------------------------------------------------------- | ||
| 32 | BBMASK += "meta-virtualization/recipes-extended/xen/" | ||
| 33 | BBMASK += "meta-virtualization/recipes-extended/xvisor/" | ||
| 34 | BBMASK += "meta-virtualization/recipes-extended/kvmtool/" | ||
| 35 | BBMASK += "meta-virtualization/recipes-extended/libvirt/" | ||
| 36 | BBMASK += "meta-virtualization/recipes-extended/libvmi/" | ||
| 37 | BBMASK += "meta-virtualization/recipes-extended/virt-manager/" | ||
| 38 | BBMASK += "meta-virtualization/recipes-extended/virt-viewer/" | ||
| 39 | BBMASK += "meta-virtualization/recipes-extended/virt-what/" | ||
| 40 | BBMASK += "meta-virtualization/recipes-extended/vhost-device/" | ||
| 41 | BBMASK += "meta-virtualization/recipes-extended/dev86/" | ||
| 42 | BBMASK += "meta-virtualization/recipes-extended/seabios/" | ||
| 43 | BBMASK += "meta-virtualization/recipes-extended/vgabios/" | ||
| 44 | BBMASK += "meta-virtualization/recipes-extended/upx/" | ||
| 45 | BBMASK += "meta-virtualization/recipes-extended/uxen/" | ||
| 46 | BBMASK += "meta-virtualization/recipes-extended/ipxe/" | ||
| 47 | BBMASK += "meta-virtualization/recipes-extended/diod/" | ||
| 48 | BBMASK += "meta-virtualization/recipes-extended/virtiofsd/" | ||
| 49 | |||
| 50 | # --------------------------------------------------------------------------- | ||
| 51 | # meta-virtualization: infrastructure / monitoring | ||
| 52 | # --------------------------------------------------------------------------- | ||
| 53 | BBMASK += "meta-virtualization/recipes-extended/ceph/" | ||
| 54 | BBMASK += "meta-virtualization/recipes-extended/cloud-init/" | ||
| 55 | BBMASK += "meta-virtualization/recipes-extended/cockpit-machines/" | ||
| 56 | BBMASK += "meta-virtualization/recipes-extended/nagios/" | ||
| 57 | BBMASK += "meta-virtualization/recipes-extended/oath/" | ||
| 58 | BBMASK += "meta-virtualization/recipes-extended/irqbalance/" | ||
| 59 | |||
| 60 | # --------------------------------------------------------------------------- | ||
| 61 | # meta-virtualization: container orchestration / tools not needed for images | ||
| 62 | # --------------------------------------------------------------------------- | ||
| 63 | BBMASK += "meta-virtualization/recipes-containers/kubernetes/" | ||
| 64 | BBMASK += "meta-virtualization/recipes-containers/k3s/" | ||
| 65 | BBMASK += "meta-virtualization/recipes-containers/cri-o/" | ||
| 66 | BBMASK += "meta-virtualization/recipes-containers/cri-tools/" | ||
| 67 | BBMASK += "meta-virtualization/recipes-containers/docker-compose/" | ||
| 68 | BBMASK += "meta-virtualization/recipes-containers/podman-compose/" | ||
| 69 | BBMASK += "meta-virtualization/recipes-containers/podman-tui/" | ||
| 70 | BBMASK += "meta-virtualization/recipes-containers/nerdctl/" | ||
| 71 | BBMASK += "meta-virtualization/recipes-containers/buildah/" | ||
| 72 | BBMASK += "meta-virtualization/recipes-containers/singularity/" | ||
| 73 | BBMASK += "meta-virtualization/recipes-containers/lxc/" | ||
| 74 | BBMASK += "meta-virtualization/recipes-containers/lxcfs/" | ||
| 75 | BBMASK += "meta-virtualization/recipes-containers/criu/" | ||
| 76 | |||
| 77 | # --------------------------------------------------------------------------- | ||
| 78 | # meta-virtualization: other categories not needed for container images | ||
| 79 | # --------------------------------------------------------------------------- | ||
| 80 | BBMASK += "meta-virtualization/recipes-demo/" | ||
| 81 | BBMASK += "meta-virtualization/recipes-graphics/" | ||
| 82 | BBMASK += "meta-virtualization/recipes-core/kata-containers/" | ||
| 83 | BBMASK += "meta-virtualization/recipes-core/runx/" | ||
| 84 | BBMASK += "meta-virtualization/recipes-networking/openvswitch/" | ||
| 85 | BBMASK += "meta-virtualization/recipes-networking/netns/" | ||
| 86 | BBMASK += "meta-virtualization/recipes-networking/passt/" | ||
| 87 | |||
| 88 | # --------------------------------------------------------------------------- | ||
| 89 | # meta-oe / meta-networking: mask heavyweight categories | ||
| 90 | # --------------------------------------------------------------------------- | ||
| 91 | BBMASK += "meta-oe/recipes-(?!devtools|extended|support)" | ||
| 92 | BBMASK += "meta-networking/recipes-(?!filter|support)" | ||
| 93 | BBMASK += "meta-openstack/recipes-dbs/postgresql/" | ||
| 94 | BBMASK += "meta-oe/dynamic-layers/networking-layer/recipes-core/" | ||
| 95 | BBMASK += "meta-openstack/recipes-extended/libvirt/" | ||
| 96 | |||
| 97 | # --------------------------------------------------------------------------- | ||
| 98 | # Entire layers with 0 recipes in the container image dependency graph. | ||
| 99 | # Clear BBFILE_COLLECTIONS entries for fully-masked layers so BitBake | ||
| 100 | # does not warn about zero files matching BBFILE_PATTERN. | ||
| 101 | # --------------------------------------------------------------------------- | ||
| 102 | BBMASK += "meta-filesystems/" | ||
| 103 | BBMASK += "meta-python/" | ||
| 104 | BBMASK += "meta-webserver/" | ||
| 105 | # Warning suppression for these fully-masked layers is in meta-virt-host.conf | ||
| 106 | # (BBFILE_PATTERN_IGNORE_EMPTY) because BitBake checks the base datastore, | ||
| 107 | # not per-multiconfig datastores. | ||
| 108 | |||
| 109 | # --------------------------------------------------------------------------- | ||
| 110 | # NOT MASKED (differs from vruntime): | ||
| 111 | # recipes-extended/images/ - container image recipes | ||
| 112 | # recipes-containers/umoci/ - OCI image manipulation | ||
| 113 | # recipes-containers/container-registry/ - registry push | ||
| 114 | # recipes-containers/oci-image-tools/ - OCI tooling | ||
| 115 | # recipes-containers/oci-image-spec/ - OCI spec | ||
| 116 | # recipes-containers/sloci-image/ - simple OCI image builder | ||
| 117 | # recipes-containers/oci-base-images/ - external base images | ||
| 118 | # recipes-extended/container-bundles/ - container bundling | ||
| 119 | # recipes-extended/container-cross-deploy/ - cross-install | ||
| 120 | # recipes-extended/fuse-overlayfs/ - overlay support | ||
| 121 | # recipes-extended/rootlesskit/ - rootless containers | ||
| 122 | # --------------------------------------------------------------------------- | ||
diff --git a/conf/distro/include/vruntime-bbmask-meta-oe.inc b/conf/distro/include/vruntime-bbmask-meta-oe.inc index a2e2e77f..bb3b88a6 100644 --- a/conf/distro/include/vruntime-bbmask-meta-oe.inc +++ b/conf/distro/include/vruntime-bbmask-meta-oe.inc | |||
| @@ -30,19 +30,18 @@ BBMASK += "meta-oe/recipes-(?!devtools|extended|support)" | |||
| 30 | BBMASK += "meta-networking/recipes-(?!filter|support)" | 30 | BBMASK += "meta-networking/recipes-(?!filter|support)" |
| 31 | 31 | ||
| 32 | # --------------------------------------------------------------------------- | 32 | # --------------------------------------------------------------------------- |
| 33 | # meta-filesystems: entire layer (0 recipes in dependency graph) | 33 | # Entire layers with 0 recipes in the dependency graph. |
| 34 | # Clear BBFILE_COLLECTIONS entries for fully-masked layers so BitBake | ||
| 35 | # does not warn about zero files matching BBFILE_PATTERN. | ||
| 36 | # The layers remain in bblayers.conf (shared with main build) but | ||
| 37 | # contribute no recipes to vruntime/vcontainer multiconfigs. | ||
| 34 | # --------------------------------------------------------------------------- | 38 | # --------------------------------------------------------------------------- |
| 35 | BBMASK += "meta-filesystems/" | 39 | BBMASK += "meta-filesystems/" |
| 36 | |||
| 37 | # --------------------------------------------------------------------------- | ||
| 38 | # meta-python: entire layer (0 recipes in dependency graph) | ||
| 39 | # --------------------------------------------------------------------------- | ||
| 40 | BBMASK += "meta-python/" | 40 | BBMASK += "meta-python/" |
| 41 | |||
| 42 | # --------------------------------------------------------------------------- | ||
| 43 | # meta-webserver: entire layer (0 recipes in dependency graph) | ||
| 44 | # --------------------------------------------------------------------------- | ||
| 45 | BBMASK += "meta-webserver/" | 41 | BBMASK += "meta-webserver/" |
| 42 | # Warning suppression for these fully-masked layers is in meta-virt-host.conf | ||
| 43 | # (BBFILE_PATTERN_IGNORE_EMPTY) because BitBake checks the base datastore, | ||
| 44 | # not per-multiconfig datastores. | ||
| 46 | 45 | ||
| 47 | # --------------------------------------------------------------------------- | 46 | # --------------------------------------------------------------------------- |
| 48 | # Orphaned bbappends in other layers (base recipes masked above) | 47 | # Orphaned bbappends in other layers (base recipes masked above) |
diff --git a/conf/distro/vcontainer.conf b/conf/distro/vcontainer.conf index 3b81a46c..97d4bc96 100644 --- a/conf/distro/vcontainer.conf +++ b/conf/distro/vcontainer.conf | |||
| @@ -4,15 +4,20 @@ | |||
| 4 | # | 4 | # |
| 5 | # VContainer - OCI container image builder distro | 5 | # VContainer - OCI container image builder distro |
| 6 | # | 6 | # |
| 7 | # Shares the same stripped DISTRO_FEATURES as vruntime but without BBMASK, | 7 | # Shares the same stripped DISTRO_FEATURES as vruntime (via vruntime-base.inc) |
| 8 | # so OCI tooling (umoci, jq, skopeo) and the full package set are available. | 8 | # but uses a lighter BBMASK that keeps OCI tooling available while still |
| 9 | # masking irrelevant recipes (graphics, multimedia, virtualization platforms, | ||
| 10 | # orchestration tools). | ||
| 9 | # | 11 | # |
| 10 | # Used by container-aarch64 / container-x86-64 multiconfigs to build | 12 | # Used by container-aarch64 / container-x86-64 multiconfigs to build |
| 11 | # single-arch OCI images that are then combined into multi-arch indexes. | 13 | # single-arch OCI images that are then combined into multi-arch indexes. |
| 12 | 14 | ||
| 13 | require conf/distro/include/vruntime-base.inc | 15 | require conf/distro/include/vruntime-base.inc |
| 14 | 16 | ||
| 15 | # No BBMASK -- OCI image building needs umoci, jq, and full package set. | 17 | # Lighter BBMASK than vruntime: masks graphics, multimedia, desktop, |
| 18 | # virtualization platforms, and orchestration tools, but keeps OCI tooling | ||
| 19 | # (umoci, container-registry, image recipes) that vruntime blocks. | ||
| 20 | require conf/distro/include/vcontainer-bbmask.inc | ||
| 16 | 21 | ||
| 17 | DISTRO = "vcontainer" | 22 | DISTRO = "vcontainer" |
| 18 | DISTRO_NAME = "VContainer OCI Builder" | 23 | DISTRO_NAME = "VContainer OCI Builder" |
