aboutsummaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2023-12-05 19:03:35 +0000
committerBrooks Davis <brooks@FreeBSD.org>2023-12-05 19:03:35 +0000
commit663e4fa38fe835056b24058acc6e43e4a15a84c5 (patch)
tree361d246b8cd6fe178ac366bec986d5c5827ad3ba /.cirrus.yml
parent4c3aa00c0a0093c78f42d138bb9eef9b1a7cbb39 (diff)
downloadsrc-663e4fa38fe835056b24058acc6e43e4a15a84c5.tar.gz
src-663e4fa38fe835056b24058acc6e43e4a15a84c5.zip
Cirrus-CI: fix git usage by build user
The git checkout it owned by root, but builds are run as "user". git refuses to operate in such an environment unless the directory is trusted so make "user" trust it. Fixes CI after 99b8c0c35b0fcc633649209621243d678a13542a. Sponsored by: DARPA Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42903
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 18417b52e6c9..8e14dc9c0305 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -80,9 +80,10 @@ task:
- gpart show
- df -m
- pkg --version
- - pw useradd user
+ - pw useradd -n user -m
- mkdir -p /usr/obj/$(pwd -P)
- chown user:user /usr/obj/$(pwd -P)
+ - su user -c "git config --global --add safe.directory $(pwd -P)"
build_world_script:
- su user -c "make -j$(sysctl -n hw.ncpu) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld"