From 8d14293458c99856bc5f3931e3e46a0c82884680 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 1 Aug 2023 18:30:14 +0100 Subject: [PATCH 1/2] CI: Make user creation idempotent adduser --system exits successfully if the user already exists, but ordinary adduser doesn't. Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/468 Signed-off-by: Simon McVittie --- tools/ci-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/ci-install.sh b/tools/ci-install.sh index 2afcd789..8abbc6d0 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -173,7 +173,9 @@ case "$ci_distro" in if [ "$ci_in_docker" = yes ]; then # Add the user that we will use to do the build inside the # Docker container, and let them use sudo - adduser --disabled-password --gecos "" user + if ! getent passwd user > /dev/null; then + adduser --disabled-password --gecos "" user + fi echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopasswd chmod 0440 /etc/sudoers.d/nopasswd fi From 0f902faa3893ca80b33106c2d43909eeb793616b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 1 Aug 2023 18:48:30 +0100 Subject: [PATCH 2/2] CI: Only run "opensuse mingw64 meson debug" if triggered manually Mitigates: dbus/dbus#469 Signed-off-by: Simon McVittie --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ab79757..048b3718 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -314,6 +314,7 @@ opensuse mingw64 meson debug: extends: - .meson-common - .suse-build + when: manual variables: ci_host: "x86_64-w64-mingw32" ci_local_packages: "no"