From ffeb05bb96dc787129d016e56d81bdd6e3031747 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan <andrei.gherzan@huawei.com> Date: Thu, 28 Jul 2022 16:53:33 +0200 Subject: [PATCH] podman: Order rootless sysctl configuration Oniro comes with a default configuration for user namespaces (disabling it). We want podman be able to override it when rootless mode is enabled. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> --- .../recipes-containers/podman/podman_%.bbappend | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-oniro-core/recipes-containers/podman/podman_%.bbappend b/meta-oniro-core/recipes-containers/podman/podman_%.bbappend index 469490a9..351bdb96 100644 --- a/meta-oniro-core/recipes-containers/podman/podman_%.bbappend +++ b/meta-oniro-core/recipes-containers/podman/podman_%.bbappend @@ -6,3 +6,11 @@ inherit writables WRITABLES = "rootuser-netconfig" WRITABLE_PATH[rootuser-netconfig] = "/etc/cni/net.d" + +do_install:append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then + # Make sure that the Oniro defaults gets overridden by this. + mv "${D}${sysconfdir}/sysctl.d/00-podman-rootless.conf" \ + "${D}${sysconfdir}/sysctl.d/50-podman-rootless.conf" + fi +} -- GitLab