diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-10-02 22:27:17 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-10-02 22:27:17 -0400 |
commit | 14f14957c90ed0a3c998ca676e943774b0d4d849 (patch) | |
tree | 81ce058914bbe77b047104be4cf8ef8b60d7a5a7 | |
parent | 805c77a518acf378ab0ce662bc5d4213b0f3f548 (diff) | |
download | meta-virtualization-14f14957c90ed0a3c998ca676e943774b0d4d849.tar.gz |
podman: add build flexibility to dependencies
In a similar manner to cri-o, we don't want to make meta-selinux
or meta-security a hard dependency to meta-virtualization. So we
implement a similar anonymous python check that allows the recipe
to be skipped if the dependent layers are not present (and hence
we are yocto compatible). If we get more than two recipes doing
layer checks (this is the 2nd), we can move the functionality to
a class.
We also make the runc dependency be virtual/runc versus picking
a specific provider (even if only runc-opencontainers has been
tested).
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/podman/podman_git.bb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb index 09c3ce05..cad48f48 100644 --- a/recipes-containers/podman/podman_git.bb +++ b/recipes-containers/podman/podman_git.bb | |||
@@ -14,6 +14,22 @@ DEPENDS = " \ | |||
14 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | 14 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ |
15 | " | 15 | " |
16 | 16 | ||
17 | python __anonymous() { | ||
18 | msg = "" | ||
19 | # ERROR: Nothing PROVIDES 'libseccomp' (but /buildarea/layers/meta-virtualization/recipes-containers/cri-o/cri-o_git.bb DEPENDS on or otherwise requires it). | ||
20 | # ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. | ||
21 | # Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'cri-o', 'libseccomp'] | ||
22 | if 'security' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
23 | msg += "Make sure meta-security should be present as it provides 'libseccomp'" | ||
24 | raise bb.parse.SkipRecipe(msg) | ||
25 | # ERROR: Nothing PROVIDES 'libselinux' (but /buildarea/layers/meta-virtualization/recipes-containers/cri-o/cri-o_git.bb DEPENDS on or otherwise requires it). | ||
26 | # ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. | ||
27 | # Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'cri-o', 'libselinux'] | ||
28 | elif 'selinux' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
29 | msg += "Make sure meta-selinux should be present as it provides 'libselinux'" | ||
30 | raise bb.parse.SkipRecipe(msg) | ||
31 | } | ||
32 | |||
17 | SRCREV = "00057929f5acfd98341964d85722383363376d52" | 33 | SRCREV = "00057929f5acfd98341964d85722383363376d52" |
18 | SRC_URI = " \ | 34 | SRC_URI = " \ |
19 | git://github.com/containers/libpod.git;branch=master \ | 35 | git://github.com/containers/libpod.git;branch=master \ |
@@ -89,5 +105,7 @@ FILES_${PN} += " \ | |||
89 | ${sysconfdir}/cni \ | 105 | ${sysconfdir}/cni \ |
90 | " | 106 | " |
91 | 107 | ||
92 | RDEPENDS_${PN} += "conmon runc-opencontainers iptables cni skopeo" | 108 | # Note that runc-opencontainers is the only currently tested |
109 | # runc provider. | ||
110 | RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo" | ||
93 | RRECOMMENDS_${PN} += "slirp4netns" | 111 | RRECOMMENDS_${PN} += "slirp4netns" |