diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 0f7e736cb..fa3dd4f4a 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck disable=SC2155,SC1091,SC2196 +# shellcheck disable=SC2155,SC1091,SC2196,SC2235 ################################################################################ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -319,10 +319,11 @@ checkingAndDownloadingAlsa() { curl -o "alsa-lib.tar.bz2" "$ALSA_BUILD_URL" curl -o "alsa-lib.tar.bz2.sig" "https://www.alsa-project.org/files/pub/lib/alsa-lib-${ALSA_LIB_VERSION}.tar.bz2.sig" - ## This affects Alpine docker images and also evaluation pipelines - if [ -r /etc/alpine-release ] && [ "$(pwd | wc -c)" -gt 83 ]; then - # Use /tmp for alpine in preference to $HOME as Alpine fails gpg operation if PWD > 83 characters - # Alpine also cannot create ~/.gpg-temp within a docker context + ## This affects riscv64 & Alpine docker images and also evaluation pipelines + if ( [ -r /etc/alpine-release ] && [ "$(pwd | wc -c)" -gt 83 ] ) || \ + ( [ "${BUILD_CONFIG[OS_KERNEL_NAME]}" == "linux" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "riscv64" ] && [ "$(pwd | wc -c)" -gt 83 ] ); then + # Use /tmp in preference to $HOME as fails gpg operation if PWD > 83 characters + # Also cannot create ~/.gpg-temp within a docker context GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" else GNUPGHOME="${BUILD_CONFIG[WORKSPACE_DIR]:-$PWD}/.gpg-temp"