From e4aa0c7d98f9d50db76bd810ac078a3ec7c91283 Mon Sep 17 00:00:00 2001 From: Andrew Leonard <31470007+andrew-m-leonard@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:25:04 +0000 Subject: [PATCH] Alpine BusyBox mktemp does not support --directory (#3638) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Alpine BusyBox mktemp does not support --directory Signed-off-by: Andrew Leonard * Alpine BusyBox mktemp does not support --directory Signed-off-by: Andrew Leonard * “Trigger” * “Trigger” * “Trigger” * GNUPGHOME dir not created Signed-off-by: Andrew Leonard * GNUPGHOME dir not created Signed-off-by: Andrew Leonard * GNUPGHOME dir not created Signed-off-by: Andrew Leonard --------- Signed-off-by: Andrew Leonard --- build-farm/platform-specific-configurations/alpine-linux.sh | 5 ++++- build-farm/platform-specific-configurations/linux.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build-farm/platform-specific-configurations/alpine-linux.sh b/build-farm/platform-specific-configurations/alpine-linux.sh index 1c9342879..db614226a 100644 --- a/build-farm/platform-specific-configurations/alpine-linux.sh +++ b/build-farm/platform-specific-configurations/alpine-linux.sh @@ -40,10 +40,13 @@ fi if [ "$(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 --directory /tmp/.gpg-temp.XXXXX)" + GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" else GNUPGHOME="${WORKSPACE:-$PWD}/.gpg-temp" fi +if [ ! -d "$GNUPGHOME" ]; then + mkdir -m 700 "$GNUPGHOME" +fi export GNUPGHOME BOOT_JDK_VARIABLE="JDK${JDK_BOOT_VERSION}_BOOT_DIR" diff --git a/build-farm/platform-specific-configurations/linux.sh b/build-farm/platform-specific-configurations/linux.sh index a6bb6c5bb..cb3d957de 100755 --- a/build-farm/platform-specific-configurations/linux.sh +++ b/build-farm/platform-specific-configurations/linux.sh @@ -31,10 +31,13 @@ fi if [ "$(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 --directory /tmp/.gpg-temp.XXXXX)" + GNUPGHOME="$(mktemp -d /tmp/.gpg-temp.XXXXXX)" else GNUPGHOME="${WORKSPACE:-$PWD}/.gpg-temp" fi +if [ ! -d "$GNUPGHOME" ]; then + mkdir -m 700 "$GNUPGHOME" +fi export GNUPGHOME NATIVE_API_ARCH=$(uname -m)