summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2023-02-06 13:13:04 +0000
committerSimon McVittie <smcv@collabora.com>2023-02-06 13:13:04 +0000
commit88dd9d5cc79e4ac37de6b7bf2c9ef8f61f657362 (patch)
tree81dbfb2eade8f70236dd7ff77dbbe07918c1d94b
parentcca6c046374a2e6a849cc73c809b17b32a26dd30 (diff)
downloaddbus-88dd9d5cc79e4ac37de6b7bf2c9ef8f61f657362.tar.gz
CI: Don't change ownership of source directory
These CI scripts were originally used on Travis-CI, which starts all builds as an ordinary user that has the ability to become root via `sudo`. On Gitlab-CI, we don't need that: we start as uid 0, and can do the whole CI run like that. This also means we get somewhat better test coverage, because some of our unit tests benefit from being run as uid 0. The only test coverage we lose by being uid 0 is that test_pending_fd_timeout() in test/dbus-daemon.c is skipped, because uid 0 bypasses the limit that's under test there.
-rw-r--r--.gitlab-ci.yml3
-rwxr-xr-xtools/ci-install.sh5
2 files changed, 1 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2fd5a04e..10e77758 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -142,8 +142,7 @@ windows amd64 image:
# compilers
- export PATH="/usr/lib/ccache:$PATH"
script:
- - chown -R user .
- - runuser -u user ./tools/ci-build.sh
+ - ./tools/ci-build.sh
debian image:
extends:
diff --git a/tools/ci-install.sh b/tools/ci-install.sh
index b259a58e..f0bcf656 100755
--- a/tools/ci-install.sh
+++ b/tools/ci-install.sh
@@ -406,11 +406,6 @@ if [ "$ci_local_packages" = yes ]; then
wget ${mirror}/${filename}
tar -C ${dep_prefix} --strip-components=1 -xvf ${filename}
done
-
- # limit access rights
- if [ "$ci_in_docker" = yes ]; then
- chown -R user "${dep_prefix}"
- fi
;;
esac
fi