podman: conditionally add cni build tag

We should ensure that cni is built as part of podman if
that's the configured virtual runtime.

Although cni is not a primary networking backend for
podman, this also allows it to be skipped if netavark is
used.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2024-03-22 16:28:01 +00:00
parent 4666b2a2d8
commit 3fbc1ae7ca

View File

@ -39,9 +39,11 @@ CVE_STATUS[CVE-2023-0778] = "fixed-version: fixed since v4.5.0"
PACKAGES =+ "${PN}-contrib" PACKAGES =+ "${PN}-contrib"
PODMAN_PKG = "github.com/containers/libpod" PODMAN_PKG = "github.com/containers/libpod"
BUILDTAGS_EXTRA ?= "${@bb.utils.contains('VIRTUAL-RUNTIME_container_networking','cni','cni','',d)}"
BUILDTAGS ?= "seccomp varlink \ BUILDTAGS ?= "seccomp varlink \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" exclude_graphdriver_btrfs exclude_graphdriver_devicemapper ${BUILDTAGS_EXTRA}"
# overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1 # overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1
export LDFLAGS="" export LDFLAGS=""