All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH] podman: Use slirp4netns instead of pasta
@ 2024-05-31  9:13 Marcus Flyckt
  2024-05-31 15:04 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Marcus Flyckt @ 2024-05-31  9:13 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Marcus Flyckt

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>
---
 recipes-containers/podman/podman_git.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb
index 32de3f0c..b8e90406 100644
--- a/recipes-containers/podman/podman_git.bb
+++ b/recipes-containers/podman/podman_git.bb
@@ -117,6 +117,11 @@ do_install() {
 	if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then
 		install -d "${D}${sysconfdir}/sysctl.d"
 		install -m 0644 "${WORKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d"
+		install -d "${D}${sysconfdir}/containers"
+		cat <<-EOF >> "${D}${sysconfdir}/containers/containers.conf"
+		[NETWORK]
+		default_rootless_network_cmd="slirp4netns"
+		EOF
 	fi
 }
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-31 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31  9:13 [meta-virtualization][PATCH] podman: Use slirp4netns instead of pasta Marcus Flyckt
2024-05-31 15:04 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.