From 9e7345d8ecd7b55f3af614dbd31d52973c919b93 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 3 Oct 2019 00:25:15 -0400 Subject: podman: make docker wrapper configurable via packageconfig podman can behave as transparent drop in replacement for docker via a wrapper 'docker' script that simply calls podman when any docker command is issues. While this is an interesting feature, we want it to be optional .. since it is possible that podman and docker might want to be installed at the same time. So we introduce a 'podman' PACKAGECONFIG, that controls whether or not this wrapper is installed, and if it is installed it marks the podman package as conflicting with docker (which gets us a better message than a failed image assembly provides). Signed-off-by: Bruce Ashfield --- recipes-containers/podman/podman_git.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb index cad48f48..64e26723 100644 --- a/recipes-containers/podman/podman_git.bb +++ b/recipes-containers/podman/podman_git.bb @@ -66,6 +66,11 @@ EXTRA_OEMAKE = " \ SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \ " +# remove 'docker' from the packageconfig if you don't want podman to +# build and install the docker wrapper. If docker is enabled in the +# packageconfig, the podman package will rconfict with docker. +PACKAGECONFIG ?= "docker" + do_compile() { cd ${S}/src rm -rf .gopath @@ -95,7 +100,10 @@ do_compile() { do_install() { cd ${S}/src/.gopath/src/"${PODMAN_PKG}" - oe_runmake install install.docker DESTDIR="${D}" + oe_runmake install DESTDIR="${D}" + if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then + oe_runmake install.docker DESTDIR="${D}" + fi } FILES_${PN} += " \ @@ -109,3 +117,4 @@ FILES_${PN} += " \ # runc provider. RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo" RRECOMMENDS_${PN} += "slirp4netns" +RCONFLICTS_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" -- cgit v1.2.3-54-g00ecf