From d353f2d3670c2b7c6c2a77f53fafd6cb463f31a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 15 Aug 2023 01:55:47 +0200 Subject: [PATCH] ci: Use sudo to run meson install Meson stopped using polkit for automatic privilege elevation, and will no longer attempt any priviledge elevation when not running interactively. Running the entire install command as root used to be problematic in the past, as it could result in ownership changes of files in the build directory that would result in build failures later, but the aforementioned change leaves us with little choice. Apparently `meson install` will spawn `ninja` with dropped privileges when a rebuild is needed, so hopefully this will no longer be an issue. Part-of: --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2bfdc136..b00ad77de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -175,11 +175,11 @@ build: before_script: - .gitlab-ci/checkout-mutter.sh - meson mutter mutter/build --prefix=/usr - - meson install -C mutter/build + - sudo meson install -C mutter/build script: - meson setup . build -Dbuildtype=debugoptimized -Dman=false --werror --fatal-meson-warnings - meson compile -C build - - meson install -C build + - sudo meson install -C build artifacts: expire_in: 1 day paths: @@ -194,7 +194,7 @@ test: XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir" NO_AT_BRIDGE: "1" before_script: - - meson install -C mutter/build + - sudo meson install -C mutter/build - mkdir -m 700 $XDG_RUNTIME_DIR script: - dbus-run-session -- xvfb-run meson test -C build --no-rebuild @@ -217,7 +217,7 @@ test-coverity: variables: GIT_SUBMODULE_STRATEGY: normal before_script: - - meson install -C mutter/build + - sudo meson install -C mutter/build script: - .gitlab-ci/download-coverity-tarball.sh - CC=clang meson coverity-build -Dman=false @@ -255,7 +255,7 @@ dist: stage: deploy needs: ["build"] before_script: - - meson install -C mutter/build + - sudo meson install -C mutter/build - mkdir -m 700 $XDG_RUNTIME_DIR script: - dbus-run-session xvfb-run meson dist -C build