Skip to content

Commit 570e43f

Browse files
committed
guix: Print build params inside/outside of container
1 parent 2f9d1fd commit 570e43f

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

contrib/guix/guix-build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,19 @@ for host in $HOSTS; do
172172
# for the particular $HOST we're building for
173173
export HOST="$host"
174174

175+
# shellcheck disable=SC2030
176+
cat << EOF
177+
INFO: Building commit ${GIT_COMMIT:?not set} for platform triple ${HOST:?not set}:
178+
...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set}
179+
...running at most ${MAX_JOBS:?not set} jobs
180+
...from worktree directory: '${PWD}'
181+
...bind-mounted in container to: '/bitcoin'
182+
...in build directory: '$(distsrc_for_host "$HOST")'
183+
...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")'
184+
...outputting in: '${OUTDIR:?not set}'
185+
...bind-mounted in container to: '/outdir'
186+
EOF
187+
175188
# Run the build script 'contrib/guix/libexec/build.sh' in the build
176189
# container specified by 'contrib/guix/manifest.scm'.
177190
#

contrib/guix/libexec/build.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ if [ -n "$V" ]; then
1111
export VERBOSE="$V"
1212
fi
1313

14-
# Check that environment variables assumed to be set by the environment are set
15-
echo "Building for platform triple ${HOST:?not set} with reference timestamp ${SOURCE_DATE_EPOCH:?not set}..."
16-
echo "At most ${MAX_JOBS:?not set} jobs will run at once..."
14+
# Check that required environment variables are set
15+
cat << EOF
16+
Required environment variables as seen inside the container:
17+
HOST: ${HOST:?not set}
18+
SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:?not set}
19+
MAX_JOBS: ${MAX_JOBS:?not set}
20+
DISTSRC: ${DISTSRC:?not set}
21+
OUTDIR: ${OUTDIR:?not set}
22+
EOF
1723

1824
#####################
1925
# Environment Setup #

0 commit comments

Comments
 (0)