Skip to content

Commit

Permalink
Auto merge of rust-lang#95050 - ehuss:fix-cmake-build, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fix cmake build.

This is an attempt to fix the cmake build. For some reason, it has recently started failing with a permission denied trying to overwrite `/tmp/build.log`.  This file exists from the `build-toolchains.sh` step, which is owned by the rustbuild user. I think there is some behavior where a sticky `/tmp` directory doesn't allow overwriting files owned by other users even when running as root.  I do not know why this has suddenly started, and I can't reproduce locally with my own docker setup. However, this fix seems to work on CI.
  • Loading branch information
bors committed Mar 17, 2022
2 parents 461e807 + 8322cdb commit 58f1179
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ci/docker/scripts/cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ hide_output() {
set +x
on_err="
echo ERROR: An error was encountered with the build.
cat /tmp/build.log
cat /tmp/cmake_build.log
exit 1
"
trap "$on_err" ERR
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
PING_LOOP_PID=$!
"$@" &> /tmp/build.log
"$@" &> /tmp/cmake_build.log
trap - ERR
kill $PING_LOOP_PID
rm /tmp/build.log
rm /tmp/cmake_build.log
set -x
}

Expand Down

0 comments on commit 58f1179

Please sign in to comment.