Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GNUPGHOME variable more broadly #3630

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build-farm/platform-specific-configurations/alpine-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ else
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

## This affects Alpine docker images and also evaluation pipelines
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)"
else
GNUPGHOME="${WORKSPACE:-$PWD}/.gpg-temp"
fi
export GNUPGHOME

BOOT_JDK_VARIABLE="JDK${JDK_BOOT_VERSION}_BOOT_DIR"
if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
bootDir="$PWD/jdk-$JDK_BOOT_VERSION"
Expand Down
14 changes: 10 additions & 4 deletions build-farm/platform-specific-configurations/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ else
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

## This affects Alpine docker images and also evaluation pipelines
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)"
else
GNUPGHOME="${WORKSPACE:-$PWD}/.gpg-temp"
fi
export GNUPGHOME

NATIVE_API_ARCH=$(uname -m)
if [ "${NATIVE_API_ARCH}" = "x86_64" ]; then NATIVE_API_ARCH=x64; fi
if [ "${NATIVE_API_ARCH}" = "armv7l" ]; then NATIVE_API_ARCH=arm; fi
Expand Down Expand Up @@ -136,10 +146,6 @@ function downloadBootJDK()
{
ARCH=$1
VER=$2
export GNUPGHOME=$PWD/.gnupg-temp
if [ ! -d "$GNUPGHOME" ]; then
mkdir -m 700 "$GNUPGHOME"
fi
export downloadArch
case "$ARCH" in
"riscv64") downloadArch="$NATIVE_API_ARCH";;
Expand Down
9 changes: 0 additions & 9 deletions sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,6 @@ 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 [ "$(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
export GNUPGHOME="/tmp/.gpg-temp.$$"
else
export GNUPGHOME="${WORKSPACE:-$PWD}/.gpg-temp"
fi

echo "GNUPGHOME=$GNUPGHOME"
mkdir -p "$GNUPGHOME" && chmod og-rwx "$GNUPGHOME"
# Should we clear this directory up after checking?
Expand Down
Loading