mirror of
https://github.com/brl/mutter.git
synced 2025-04-10 20:29:38 +00:00
ci: Selectively start mutter images as user by default
Setting up the image with a custom default user broke gnome-shell's toolbox images. While running tests as non-root user seems like a good idea, keeping people's development environment working should be figured out first. This partially reverts commit 69cc65d15f6f1320f02d0f. Keep the image to have a local user and use it to run tests so that we can ensure that permissions are respected Co-authored-by: Florian Müllner <fmuellner@gnome.org> Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3083>
This commit is contained in:
parent
60ef069aa8
commit
86b77f65e7
@ -64,13 +64,27 @@ variables:
|
|||||||
variables:
|
variables:
|
||||||
MUTTER_CLONE_PATH: ''
|
MUTTER_CLONE_PATH: ''
|
||||||
|
|
||||||
|
.mutter.run-as-user:
|
||||||
|
image:
|
||||||
|
name: ${FDO_DISTRIBUTION_IMAGE}
|
||||||
|
entrypoint:
|
||||||
|
- 'runuser'
|
||||||
|
- '-u'
|
||||||
|
- !reference [.mutter.fedora@common, variables, MUTTER_USER]
|
||||||
|
- '--'
|
||||||
|
|
||||||
|
.mutter.distribution-image:
|
||||||
|
extends:
|
||||||
|
- .fdo.distribution-image@fedora
|
||||||
|
- .mutter.run-as-user
|
||||||
|
|
||||||
.mutter.fedora@common:
|
.mutter.fedora@common:
|
||||||
extends:
|
extends:
|
||||||
- .skip-git-clone
|
- .skip-git-clone
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: 38
|
FDO_DISTRIBUTION_VERSION: 38
|
||||||
BASE_TAG: '2023-06-19.1'
|
BASE_TAG: '2023-06-20.2'
|
||||||
FDO_USER: 'meta-user'
|
MUTTER_USER: 'meta-user'
|
||||||
FDO_DISTRIBUTION_PACKAGES:
|
FDO_DISTRIBUTION_PACKAGES:
|
||||||
asciidoc
|
asciidoc
|
||||||
clang
|
clang
|
||||||
@ -92,8 +106,12 @@ variables:
|
|||||||
|
|
||||||
FDO_DISTRIBUTION_EXEC: |
|
FDO_DISTRIBUTION_EXEC: |
|
||||||
set -e
|
set -e
|
||||||
# Enable sudo for $FDO_USER
|
|
||||||
echo "%$FDO_USER ALL = (ALL) NOPASSWD: ALL" > /etc/sudoers.d/99_fdo-user
|
# Create $MUTTER_USER
|
||||||
|
useradd -ms /bin/bash $MUTTER_USER
|
||||||
|
|
||||||
|
# Enable sudo for $MUTTER_USER
|
||||||
|
echo "%$MUTTER_USER ALL = (ALL) NOPASSWD: ALL" > /etc/sudoers.d/99_mutter-user
|
||||||
|
|
||||||
dnf install -y 'dnf-command(builddep)'
|
dnf install -y 'dnf-command(builddep)'
|
||||||
|
|
||||||
@ -280,7 +298,7 @@ build-fedora-container@aarch64:
|
|||||||
|
|
||||||
check-code-style:
|
check-code-style:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
variables:
|
variables:
|
||||||
MUTTER_CLONE_DEPTH: 200
|
MUTTER_CLONE_DEPTH: 200
|
||||||
@ -306,7 +324,7 @@ check-code-style:
|
|||||||
|
|
||||||
.build-mutter:
|
.build-mutter:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .build-mutter-base
|
- .build-mutter-base
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
@ -348,7 +366,7 @@ build-mutter@aarch64:
|
|||||||
|
|
||||||
build-without-opengl-and-glx@x86_64:
|
build-without-opengl-and-glx@x86_64:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
stage: build
|
stage: build
|
||||||
needs:
|
needs:
|
||||||
@ -370,7 +388,7 @@ build-without-opengl-and-glx@x86_64:
|
|||||||
|
|
||||||
build-without-native-backend-and-wayland@x86_64:
|
build-without-native-backend-and-wayland@x86_64:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
stage: build
|
stage: build
|
||||||
needs:
|
needs:
|
||||||
@ -394,7 +412,7 @@ build-without-native-backend-and-wayland@x86_64:
|
|||||||
|
|
||||||
build-wayland-only@x86_64:
|
build-wayland-only@x86_64:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
stage: build
|
stage: build
|
||||||
needs:
|
needs:
|
||||||
@ -434,7 +452,7 @@ build-wayland-only@x86_64:
|
|||||||
|
|
||||||
.test-mutter-base:
|
.test-mutter-base:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .test-setup
|
- .test-setup
|
||||||
stage: test
|
stage: test
|
||||||
after_script:
|
after_script:
|
||||||
@ -454,7 +472,7 @@ build-wayland-only@x86_64:
|
|||||||
|
|
||||||
.test-mutter:
|
.test-mutter:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .test-mutter-base
|
- .test-mutter-base
|
||||||
script:
|
script:
|
||||||
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR
|
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR
|
||||||
@ -488,7 +506,7 @@ test-mutter-kvm@x86_64:
|
|||||||
tags:
|
tags:
|
||||||
- kvm
|
- kvm
|
||||||
script:
|
script:
|
||||||
- sudo chgrp $FDO_USER /dev/kvm
|
- sudo chgrp $MUTTER_USER /dev/kvm
|
||||||
- meson test -C build
|
- meson test -C build
|
||||||
--no-rebuild
|
--no-rebuild
|
||||||
--timeout-multiplier 10
|
--timeout-multiplier 10
|
||||||
@ -512,7 +530,7 @@ test-mutter@aarch64:
|
|||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
stage: analyze
|
stage: analyze
|
||||||
script:
|
script:
|
||||||
@ -541,7 +559,7 @@ coverage:
|
|||||||
|
|
||||||
can-build-gnome-shell@x86_64:
|
can-build-gnome-shell@x86_64:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
stage: test
|
stage: test
|
||||||
needs:
|
needs:
|
||||||
@ -561,7 +579,7 @@ test-mutter-coverity:
|
|||||||
- if: '$CI_COMMIT_BRANCH'
|
- if: '$CI_COMMIT_BRANCH'
|
||||||
when: 'manual'
|
when: 'manual'
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
needs:
|
needs:
|
||||||
- job: build-fedora-container@x86_64
|
- job: build-fedora-container@x86_64
|
||||||
@ -584,7 +602,7 @@ test-mutter-coverity:
|
|||||||
|
|
||||||
dist-mutter:
|
dist-mutter:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
- .build-mutter-base
|
- .build-mutter-base
|
||||||
- .test-setup
|
- .test-setup
|
||||||
@ -624,7 +642,7 @@ dist-mutter-tarball:
|
|||||||
|
|
||||||
reference:
|
reference:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .mutter.distribution-image
|
||||||
- .mutter.fedora@x86_64
|
- .mutter.fedora@x86_64
|
||||||
stage: docs
|
stage: docs
|
||||||
needs:
|
needs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user