From 7fdc88c93f3876b6aa68d662c0160c73121ad37d Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 19 Nov 2021 09:43:34 -0500 Subject: gitlab-ci: Set HOME to plausible but still non-existent location We have been seeing numerous CI failures on aarch64/Darwin of the form: CI_COMMIT_BRANCH: CI_PROJECT_PATH: ghc/ghc error: creating directory '/nonexistent': Read-only file system Clearly *something* is attempting to create `$HOME`. A bit of sleuthing by @int-e found that the culprit is likely `nix`, although it's not clear why. For now we avoid the issue by setting `HOME` to a fresh directory in the working tree. --- .gitlab/ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index b3ac97aff4..1eef2143fe 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -599,7 +599,9 @@ setup_locale # Platform-specific environment initialization if [ -n "${HERMETIC:-}" ]; then export CABAL_DIR="$TOP/cabal" - export HOME="/nonexistent" + # We previously set HOME=/nonexistent but apparently nix wants $HOME to exist + # so sadly we must settle for someplace writable. + export HOME="$TOP/tmp-home" else BIN_DIST_NAME="${BIN_DIST_NAME:-}" case "$(uname)" in -- cgit v1.2.1