From 167bef28c57e60650d1abb42f856b8d1dedff794 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Tue, 20 Feb 2024 15:52:00 +0000 Subject: [PATCH 1/5] Ensure ALSA GPG works for long pwd path length on linux riscv64 Signed-off-by: Andrew Leonard --- sbin/prepareWorkspace.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 0f7e736cb..2177b11b4 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -324,6 +324,9 @@ checkingAndDownloadingAlsa() { # 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 GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" + elif [ "${BUILD_CONFIG[TARGET_OS]}" == "linux" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "riscv64" ] && [ "$(pwd | wc -c)" -gt 83 ]; then + # linux riscv64 also has gpg pathlength issue + GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" else GNUPGHOME="${BUILD_CONFIG[WORKSPACE_DIR]:-$PWD}/.gpg-temp" fi From c2124990b42e84a68932c5fd930faf7da4aa8f0d Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Tue, 20 Feb 2024 15:58:46 +0000 Subject: [PATCH 2/5] Ensure ALSA GPG works for long pwd path length on linux riscv64 Signed-off-by: Andrew Leonard --- sbin/prepareWorkspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 2177b11b4..d0123a8ee 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -324,7 +324,7 @@ checkingAndDownloadingAlsa() { # 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 GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" - elif [ "${BUILD_CONFIG[TARGET_OS]}" == "linux" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "riscv64" ] && [ "$(pwd | wc -c)" -gt 83 ]; then + elif [[ "${BUILD_CONFIG[TARGET_OS]}" == "linux" ]] && [[ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "riscv64" ]] && [[ "$(pwd | wc -c)" -gt 83 ]]; then # linux riscv64 also has gpg pathlength issue GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" else From ddbc2af59a1e4ad2ac0e3210654847ac658ec671 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Tue, 20 Feb 2024 16:02:06 +0000 Subject: [PATCH 3/5] Ensure ALSA GPG works for long pwd path length on linux riscv64 Signed-off-by: Andrew Leonard --- sbin/prepareWorkspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index d0123a8ee..f3d434bad 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -324,7 +324,7 @@ checkingAndDownloadingAlsa() { # 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 GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" - elif [[ "${BUILD_CONFIG[TARGET_OS]}" == "linux" ]] && [[ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "riscv64" ]] && [[ "$(pwd | wc -c)" -gt 83 ]]; then + elif [ "${BUILD_CONFIG[OS_KERNEL_NAME]}" == "linux" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "riscv64" ] && [ "$(pwd | wc -c)" -gt 83 ]; then # linux riscv64 also has gpg pathlength issue GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" else From da77690110048995b156bbbed7bfc6efa05733f5 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 21 Feb 2024 14:04:21 +0000 Subject: [PATCH 4/5] Ensure ALSA GPG works for long pwd path length on linux riscv64 Signed-off-by: Andrew Leonard --- sbin/prepareWorkspace.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index f3d434bad..e8757b301 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -319,13 +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 - GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" - elif [ "${BUILD_CONFIG[OS_KERNEL_NAME]}" == "linux" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "riscv64" ] && [ "$(pwd | wc -c)" -gt 83 ]; then - # linux riscv64 also has gpg pathlength issue + ## 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" From 319c536de673ac89505f19f1a382fa0c56c4b24e Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 21 Feb 2024 14:10:31 +0000 Subject: [PATCH 5/5] Ensure ALSA GPG works for long pwd path length on linux riscv64 Signed-off-by: Andrew Leonard --- sbin/prepareWorkspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index e8757b301..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");