Merge branch 'wip/hadess/add-sudo-fedora-docker' into 'master'

Add sudo to Fedora docker image

See merge request GNOME/glib!1235
This commit is contained in:
Philip Withnall 2019-11-27 14:19:19 +00:00
commit 8c68e30eb8
2 changed files with 12 additions and 10 deletions

View File

@ -32,7 +32,7 @@ style-check-diff:
fedora-x86_64: fedora-x86_64:
<<: *only-default <<: *only-default
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4 image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
stage: build stage: build
variables: variables:
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs" CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
@ -100,7 +100,7 @@ debian-stable-x86_64:
G_DISABLE_ASSERT: G_DISABLE_ASSERT:
<<: *only-default <<: *only-default
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4 image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
stage: build stage: build
variables: variables:
CPPFLAGS: "-DG_DISABLE_ASSERT" CPPFLAGS: "-DG_DISABLE_ASSERT"
@ -127,7 +127,7 @@ G_DISABLE_ASSERT:
valgrind: valgrind:
<<: *only-default <<: *only-default
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4 image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
stage: analysis stage: analysis
variables: variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 10 MESON_TEST_TIMEOUT_MULTIPLIER: 10
@ -298,7 +298,7 @@ freebsd-12-x86_64:
coverage: coverage:
<<: *only-default <<: *only-default
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4 image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
stage: coverage stage: coverage
artifacts: artifacts:
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
@ -310,7 +310,7 @@ coverage:
scan-build: scan-build:
<<: *only-default <<: *only-default
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4 image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
stage: analysis stage: analysis
script: script:
- meson ${MESON_COMMON_OPTIONS} - meson ${MESON_COMMON_OPTIONS}
@ -341,7 +341,7 @@ pages:
- public - public
dist-job: dist-job:
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4 image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
stage: build stage: build
only: only:
- tags - tags

View File

@ -1,4 +1,4 @@
FROM fedora:29 FROM fedora:30
RUN dnf -y install \ RUN dnf -y install \
bindfs \ bindfs \
@ -31,6 +31,7 @@ RUN dnf -y install \
glibc-langpack-pl \ glibc-langpack-pl \
glibc-langpack-ru \ glibc-langpack-ru \
glibc-langpack-tr \ glibc-langpack-tr \
gnome-desktop-testing \
gtk-doc \ gtk-doc \
itstool \ itstool \
lcov \ lcov \
@ -42,8 +43,6 @@ RUN dnf -y install \
ncurses-compat-libs \ ncurses-compat-libs \
ninja-build \ ninja-build \
pcre-devel \ pcre-devel \
python3 \
python3-pip \
python3-wheel \ python3-wheel \
shared-mime-info \ shared-mime-info \
systemtap-sdt-devel \ systemtap-sdt-devel \
@ -56,9 +55,12 @@ RUN dnf -y install \
RUN pip3 install meson==0.49.2 RUN pip3 install meson==0.49.2
# Enable sudo for wheel users
RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' /etc/sudoers
ARG HOST_USER_ID=5555 ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID} ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user RUN useradd -u $HOST_USER_ID -G wheel -ms /bin/bash user
USER user USER user
WORKDIR /home/user WORKDIR /home/user