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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2892>
This commit is contained in:
Florian Müllner 2023-08-15 01:55:47 +02:00 committed by Marge Bot
parent ae86b58d59
commit d353f2d367

View File

@ -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