podman: add rdepend on nsenter

Podman requires nsenter (for obvious reasons) .. and while this
dependency is normally satisfied on images (via busybox), it is
possible to build a minimal container image that excludes
busybox .. and hence will not have nsenter present.

Rather than making this a hard rdepends on util-linux-nsenter,
we use a variable: VIRTUAL-RUNTIME_base-utils-nsenter, which
can either be set to busybox or util-linux-nsenter (the current
default).

The VIRTUAL-RUNTIME_base-utils- format follows similarly named
OEcore providers and variables .. which the exception that there
is no entry in the preferred providers file there, and there's
no package created called busybox-nsenter (but perhaps there
could be in the future).

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2021-10-21 18:59:33 -04:00
parent abf248bd38
commit 0429ecbcd8

View File

@ -109,6 +109,10 @@ FILES:${PN} += " \
SYSTEMD_SERVICE:${PN} = "podman.service podman.socket"
RDEPENDS:${PN} += "conmon virtual-runc iptables cni skopeo"
# The other option for this is "busybox", since meta-virt ensures
# that busybox is configured with nsenter
VIRTUAL-RUNTIME_base-utils-nsenter ?= "util-linux-nsenter"
RDEPENDS:${PN} += "conmon virtual-runc iptables cni skopeo ${VIRTUAL-RUNTIME_base-utils-nsenter}"
RRECOMMENDS:${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment"
RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}"