From cf3a5da1d511847a968227cb27ccfd25ccf53eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 19 Jul 2023 16:13:22 +0200 Subject: [PATCH] ci: *Really* fix using image in toolbox It turns out that gnome-shell's toolbox image is still broken after commit 86b77f65e7. Toolbox' entry point ensures that the calling user exists inside the container, and makes their home available inside the container. There are two ways the `useradd` command in our image may interfere with that: - by default, useradd uses the smallest available UID in the normal user range (usually 1000); this is highly likely to clash with the host user UID - if the host's /home is a symlink (for instance to /var/home on Silverblue), then toolbox recreates that layout inside the container; it cannot do that if /home is already a non-empty directory Luckily we can address both issues without affecting the ability to build and run tests as user: We can simply create the `meta-user` with a UID and home directory that are unlikely to clash. Part-of: --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59f9c063b..5359c931f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,7 +83,7 @@ variables: - .skip-git-clone variables: FDO_DISTRIBUTION_VERSION: 38 - BASE_TAG: '2023-06-27.0-libei' + BASE_TAG: '2023-07-22.0' MUTTER_USER: 'meta-user' FDO_DISTRIBUTION_PACKAGES: asciidoc @@ -109,7 +109,7 @@ variables: set -e # Create $MUTTER_USER - useradd -ms /bin/bash $MUTTER_USER + useradd -u 9999 -b /opt/mutter -ms /bin/bash $MUTTER_USER # Enable sudo for $MUTTER_USER echo "%$MUTTER_USER ALL = (ALL) NOPASSWD: ALL" > /etc/sudoers.d/99_mutter-user