aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-04-22 13:06:18 -0400
committerCarl Dong <contact@carldong.me>2020-04-28 10:36:37 -0400
commit14701604d0904bc5bbf1c67de08f8ee6d3215523 (patch)
tree258155f14fbd5ef15afae7fb555ad6acd3197ca1 /contrib/guix
parentf5a6ac4f48b18f93050d77bcb23f9cf45ec34647 (diff)
guix: Expose GIT_COMMON_DIR in container as readonly
When using worktrees or submodules, you'll see a `.git' plain text file at the root of your working tree instead of the usual `.git' directory. This plain text file will point to the real GIT_DIR, under the GIT_COMMON_DIR. From experimentation, the full GIT_COMMON_DIR is required to exist for operations such as git-archive(1), so we expose it as readonly inside the container.
Diffstat (limited to 'contrib/guix')
-rwxr-xr-xcontrib/guix/guix-build.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/guix/guix-build.sh b/contrib/guix/guix-build.sh
index e20b2a048d..11d2c8b867 100755
--- a/contrib/guix/guix-build.sh
+++ b/contrib/guix/guix-build.sh
@@ -105,6 +105,7 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv
--pure \
--no-cwd \
--share="$PWD"=/bitcoin \
+ --expose="$(git rev-parse --git-common-dir)" \
${SOURCES_PATH:+--share="$SOURCES_PATH"} \
${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
-- env HOST="$host" \