diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-29 16:22:48 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-29 16:57:14 +0000 |
| commit | 3106e77f8146a8e48c1948d00354218e2b19b819 (patch) | |
| tree | 627a0cae2642e31e2cceddbc6e58a562dae13cb9 /recipes-containers/podman | |
| parent | 751b99dc32d7d439031df42730a8ed65e82b3e95 (diff) | |
| download | meta-virtualization-3106e77f8146a8e48c1948d00354218e2b19b819.tar.gz | |
podman: fix CNI build tag for non-netavark networking configurations
BUILDTAGS_EXTRA was gated on VIRTUAL-RUNTIME_container_networking == "cni",
which excluded the cni build tag in vruntime builds where that variable is
intentionally blank (vpdmn-rootfs-image installs cni packages directly).
This caused podman to be compiled with netavark-only support, failing at
runtime with "cni support is not enabled in this build" when containers.conf
sets network_backend = "cni".
Include the cni build tag unless the distro explicitly selects netavark.
This respects the podman profile's upstream preference for netavark-only
while ensuring all other configurations (containerd, default, docker, k3s,
vruntime) retain CNI support.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'recipes-containers/podman')
| -rw-r--r-- | recipes-containers/podman/podman_git.bb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb index 45ddec1a..886d6e90 100644 --- a/recipes-containers/podman/podman_git.bb +++ b/recipes-containers/podman/podman_git.bb | |||
| @@ -36,7 +36,13 @@ PACKAGES =+ "${PN}-contrib" | |||
| 36 | 36 | ||
| 37 | PODMAN_PKG = "github.com/containers/podman" | 37 | PODMAN_PKG = "github.com/containers/podman" |
| 38 | 38 | ||
| 39 | BUILDTAGS_EXTRA ?= "${@bb.utils.contains('VIRTUAL-RUNTIME_container_networking','cni','cni','',d)}" | 39 | # Include the cni build tag unless the distro explicitly selects netavark-only. |
| 40 | # The runtime backend is selected via containers.conf (network_backend), | ||
| 41 | # but podman must be compiled with the cni tag to support it at all. | ||
| 42 | # Previously this was gated on VIRTUAL-RUNTIME_container_networking == "cni", | ||
| 43 | # which excluded cni in vruntime builds where that variable is intentionally | ||
| 44 | # blank (vpdmn-rootfs-image installs cni packages directly in IMAGE_INSTALL). | ||
| 45 | BUILDTAGS_EXTRA ?= "${@'' if d.getVar('VIRTUAL-RUNTIME_container_networking') == 'netavark' else 'cni'}" | ||
| 40 | BUILDTAGS ?= "seccomp varlink \ | 46 | BUILDTAGS ?= "seccomp varlink \ |
| 41 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | 47 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ |
| 42 | exclude_graphdriver_btrfs exclude_graphdriver_devicemapper ${BUILDTAGS_EXTRA}" | 48 | exclude_graphdriver_btrfs exclude_graphdriver_devicemapper ${BUILDTAGS_EXTRA}" |
