summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2023-01-20 13:46:45 +0000
committerSimon McVittie <smcv@collabora.com>2023-01-20 13:46:45 +0000
commit27e1cbc158bdd29ad0ca81a9377caeafed9d6dad (patch)
treeba40b7b04546ad9c2a434039d703e9d62b692416
parent4dcd5d38c4d9dc169234e308049a3bebcf01c0de (diff)
downloaddbus-python-27e1cbc158bdd29ad0ca81a9377caeafed9d6dad.tar.gz
CI: Stop switching privilege levels, just do the build as uid 0
This avoids git complaining that the git repo's ownership was changed. Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--.gitlab-ci.yml5
-rwxr-xr-xtools/ci-install.sh21
2 files changed, 4 insertions, 22 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2d8d8ae..4817047 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,16 +31,13 @@ before_script:
variables:
dbus_ci_configure_flags: ''
- ci_in_docker: "yes"
ci_parallel: "2"
- ci_sudo: "yes"
ci_distro: "debian"
ci_suite: "bookworm"
.common:
script: &script
- - chown -R user .
- - runuser -u user -- env PATH="/home/user/.local/bin:/usr/lib/ccache:$PATH" ./tools/ci-build.sh $dbus_ci_configure_flags
+ - env PATH="$HOME/.local/bin:/usr/lib/ccache:$PATH" ./tools/ci-build.sh $dbus_ci_configure_flags
artifacts: &artifacts
paths:
- _autotools/*.log
diff --git a/tools/ci-install.sh b/tools/ci-install.sh
index c3b34a3..45db3b4 100755
--- a/tools/ci-install.sh
+++ b/tools/ci-install.sh
@@ -39,11 +39,6 @@ NULL=
# the package (not currently supported for dbus-python)
: "${ci_host:=native}"
-# ci_in_docker:
-# Used internally by ci-install.sh. If yes, we are inside the Docker image
-# (ci_docker is empty in this case).
-: "${ci_in_docker:=no}"
-
# ci_suite:
# OS suite (release, branch) in which we are testing.
# Typical values for ci_distro=debian: sid, buster
@@ -84,7 +79,6 @@ case "$ci_distro" in
$sudo apt-get -qq -y update
$sudo apt-get -qq -y install --no-install-recommends \
- adduser \
autoconf \
autoconf-archive \
automake \
@@ -120,14 +114,6 @@ case "$ci_distro" in
${NULL}
fi
- 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
- echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopasswd
- chmod 0440 /etc/sudoers.d/nopasswd
- fi
-
case "$ci_suite" in
(buster|focal|bullseye)
$sudo apt-get -qq -y install dbus
@@ -151,8 +137,7 @@ case "$ci_distro" in
# Needed for distcheck
case "$ci_suite" in
(buster|focal|bullseye)
- runuser -u user -- \
- "${dbus_ci_system_python-python3}" -m pip install --user \
+ "${dbus_ci_system_python-python3}" -m pip install --user \
pyproject_metadata \
tomli \
${NULL}
@@ -176,9 +161,9 @@ esac
if [ -n "$have_system_meson" ]; then
:
elif [ -n "${dbus_ci_system_python-}" ]; then
- runuser -u user -- "$dbus_ci_system_python" -m pip install --user meson ninja
+ "$dbus_ci_system_python" -m pip install --user meson ninja
else
- runuser -u user -- pip install meson ninja
+ pip install meson ninja
fi
# vim:set sw=4 sts=4 et: