From 4fdb048cc17d22d90664c3cac076516b771f4d30 Mon Sep 17 00:00:00 2001 From: unitexe Date: Sat, 3 Jan 2026 15:20:53 -0600 Subject: Podman (rootful & rootless) support - Rootless support for unitexe user specifically --- .../recipes-users/useradd/add-user-unitexe.bbappend | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 meta-unit-core/dynamic-layers/virtualization-layer/recipes-users/useradd/add-user-unitexe.bbappend (limited to 'meta-unit-core/dynamic-layers/virtualization-layer/recipes-users') diff --git a/meta-unit-core/dynamic-layers/virtualization-layer/recipes-users/useradd/add-user-unitexe.bbappend b/meta-unit-core/dynamic-layers/virtualization-layer/recipes-users/useradd/add-user-unitexe.bbappend new file mode 100644 index 0000000..922b0c8 --- /dev/null +++ b/meta-unit-core/dynamic-layers/virtualization-layer/recipes-users/useradd/add-user-unitexe.bbappend @@ -0,0 +1,18 @@ +do_install:append() { + # If linger is not enabled then rootless podman + # commands will complain with number of warnings. + install -d ${D}${localstatedir}/lib/systemd/linger + touch ${D}${localstatedir}/lib/systemd/linger/${USER_TO_ADD_NAME} + + # Note: Use of .profile here assumes busybox shell. + # Podman uses these (if defined) for overriding + # default configuration file locations. This is + # explained here: + # https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#user-configuration-files + cat > ${D}/home/${USER_TO_ADD_NAME}/.profile << 'EOF' +export XDG_RUNTIME_DIR=/run/user/$(id -u) +export XDG_CONFIG_HOME=$HOME/.config +EOF +} + +FILES:${PN}:append = " ${localstatedir}/lib/systemd/linger/${USER_TO_ADD_NAME}" -- cgit v1.2.3