Skip to content

Commit

Permalink
Alpine BusyBox mktemp does not support --directory (#3638)
Browse files Browse the repository at this point in the history
* Alpine BusyBox mktemp does not support --directory

Signed-off-by: Andrew Leonard <[email protected]>

* Alpine BusyBox mktemp does not support --directory

Signed-off-by: Andrew Leonard <[email protected]>

* “Trigger”

* “Trigger”

* “Trigger”

* GNUPGHOME dir not created

Signed-off-by: Andrew Leonard <[email protected]>

* GNUPGHOME dir not created

Signed-off-by: Andrew Leonard <[email protected]>

* GNUPGHOME dir not created

Signed-off-by: Andrew Leonard <[email protected]>

---------

Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard authored Feb 7, 2024
1 parent 0106cc2 commit e4aa0c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion build-farm/platform-specific-configurations/alpine-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion build-farm/platform-specific-configurations/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e4aa0c7

Please sign in to comment.