]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
CI: Don't change ownership of source directory
authorSimon McVittie <smcv@collabora.com>
Mon, 6 Feb 2023 13:13:04 +0000 (13:13 +0000)
committerSimon McVittie <smcv@collabora.com>
Mon, 6 Feb 2023 13:13:04 +0000 (13:13 +0000)
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.

.gitlab-ci.yml
tools/ci-install.sh

index 2fd5a04e834903c85ad00aabb735ab55a5cbc57d..10e7775891c4492d2dc9fefa6662b6a552b28f3f 100644 (file)
@@ -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:
index b259a58ec4a076218bf10e7745df61e29db4c32f..f0bcf65641639c3ee3b72b4a47ba55a5980cc682 100755 (executable)
@@ -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