]> 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>
Wed, 8 Feb 2023 10:03:47 +0000 (10:03 +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.

(cherry picked from commit 88dd9d5cc79e4ac37de6b7bf2c9ef8f61f657362)

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

index a21b3f0f428edb8550a89fb18a11aa587fe44e40..f5507a212de27ba582c1781f46783344052bccfa 100644 (file)
@@ -86,8 +86,7 @@ windows amd64 docker:
     # compilers
     - export PATH="/usr/lib/ccache:$PATH"
   script:
-    - chown -R user .
-    - runuser -u user ./tools/ci-build.sh
+    - ./tools/ci-build.sh
 
 production:
   extends: .debian-build
index 7325e4f234300d3e5f86a26e42745b665f091642..05155184b2321d3382835b056c219b4147c4dba9 100755 (executable)
@@ -228,11 +228,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