From 65ce682547ff70e7bb112ef5cf8aff765af316db 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 disables user namespaces by default. We want podman be able to override it (re-enable 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