summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2019-10-03 00:25:15 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-10-03 00:25:15 -0400
commit9e7345d8ecd7b55f3af614dbd31d52973c919b93 (patch)
tree99d3eb84005ebff5bba4df174d8d91a71bf27199
parent14f14957c90ed0a3c998ca676e943774b0d4d849 (diff)
downloadmeta-virtualization-9e7345d8ecd7b55f3af614dbd31d52973c919b93.tar.gz
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 <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/podman/podman_git.bb11
1 files changed, 10 insertions, 1 deletions
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 = " \
66 SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \ 66 SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \
67" 67"
68 68
69# remove 'docker' from the packageconfig if you don't want podman to
70# build and install the docker wrapper. If docker is enabled in the
71# packageconfig, the podman package will rconfict with docker.
72PACKAGECONFIG ?= "docker"
73
69do_compile() { 74do_compile() {
70 cd ${S}/src 75 cd ${S}/src
71 rm -rf .gopath 76 rm -rf .gopath
@@ -95,7 +100,10 @@ do_compile() {
95do_install() { 100do_install() {
96 cd ${S}/src/.gopath/src/"${PODMAN_PKG}" 101 cd ${S}/src/.gopath/src/"${PODMAN_PKG}"
97 102
98 oe_runmake install install.docker DESTDIR="${D}" 103 oe_runmake install DESTDIR="${D}"
104 if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then
105 oe_runmake install.docker DESTDIR="${D}"
106 fi
99} 107}
100 108
101FILES_${PN} += " \ 109FILES_${PN} += " \
@@ -109,3 +117,4 @@ FILES_${PN} += " \
109# runc provider. 117# runc provider.
110RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo" 118RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo"
111RRECOMMENDS_${PN} += "slirp4netns" 119RRECOMMENDS_${PN} += "slirp4netns"
120RCONFLICTS_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}"