Commit 08211018 authored by Carlo Landmeter's avatar Carlo Landmeter
Browse files

make distfiles named volume/bind configuable:

- set to true to enable named volume
- set to absolute path to enable bind mount
parent 314f30b4
......@@ -17,6 +17,11 @@
# acting as caches.
# DABUILD_CLEAN=false
# Use a bind mount or a named volume to store distfiles.
# to enable as a named volume set it to true
# to enable as a bind mount set it to an absolute path
# DABUILD_DISTFILES=false
# Output debug messages to stdout.
# DABUILD_DEBUG=false
......
......@@ -81,10 +81,6 @@ fi
ABUILD_VOLUMES="-v ${PWD%/aports/*}/aports:/home/builder/aports \
-v ${ABUILD_PACKAGES}:/home/builder/packages"
if [ -w "/var/cache/distfiles" ]; then
ABUILD_VOLUMES="$ABUILD_VOLUMES -v /var/cache/distfiles:/var/cache/distfiles"
fi
# pass over gitconfig for abuild-keygen
if [ -f "$HOME/.gitconfig" ]; then
ABUILD_VOLUMES="$ABUILD_VOLUMES -v $HOME/.gitconfig:/home/builder/.gitconfig"
......@@ -106,6 +102,14 @@ if [ "$DABUILD_CCACHE" = "true" ]; then
DABUILD_ENV="$DABUILD_ENV -e DABUILD_CCACHE=true"
fi
# use a bind or named volume for distfiles.
DABUILD_DISTFILES=${DABUILD_DISTFILES:-false}
case $DABUILD_DISTFILES in
*/*) ABUILD_VOLUMES="$ABUILD_VOLUMES -v $DABUILD_DISTFILES:/var/cache/distfiles";;
true) setup_named_volume distfiles "/var/cache/distfiles" true;;
*) ;;
esac
setup_named_volume config "/home/builder/.abuild" true
ABUILD_RM="--rm"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment