summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Flyckt <marcus.flyckt@gmail.com>2024-05-31 11:13:16 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-05-31 16:20:17 +0000
commite8214becb94e7bc786bcde59b00a5ee7c4de389e (patch)
tree9560ea293c396d119ae9d9b499a28ae606c3434e
parent6ab94f2c680f271d4767b158c91fdc633a157a6f (diff)
downloadmeta-virtualization-e8214becb94e7bc786bcde59b00a5ee7c4de389e.tar.gz
podman: Use slirp4netns instead of pasta
podman uses pasta as the default rootless network command since 5.0.0, but only slirp4netns is available when building for Yocto. This commit adds a containers.conf file setting slirp4netns as default rootless command if 'rootless' is set in PACKAGECONFIG Signed-off-by: Marcus Flyckt <mafl@kvaser.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/podman/podman_git.bb5
1 files changed, 5 insertions, 0 deletions
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb
index 55bfede9..441f1fc8 100644
--- a/recipes-containers/podman/podman_git.bb
+++ b/recipes-containers/podman/podman_git.bb
@@ -118,6 +118,11 @@ do_install() {
118 if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then 118 if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then
119 install -d "${D}${sysconfdir}/sysctl.d" 119 install -d "${D}${sysconfdir}/sysctl.d"
120 install -m 0644 "${UNPACKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d" 120 install -m 0644 "${UNPACKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d"
121 install -d "${D}${sysconfdir}/containers"
122 cat <<-EOF >> "${D}${sysconfdir}/containers/containers.conf"
123 [NETWORK]
124 default_rootless_network_cmd="slirp4netns"
125 EOF
121 fi 126 fi
122} 127}
123 128