Skip to content

Commit

Permalink
Extending keyserver timeout to make alpine build more forgiving (#3520)
Browse files Browse the repository at this point in the history
* Extending keyserver timeout to make alpine build more forgiving

Right now, about 10% of alpine linux x64 builds fail due to
timeouts when requesting keys from the keyserver.

The hope is that these timeouts are just temporary slowness due
to server load, and that an extended timeout is the correct fix.

Also includes removing a line of code duplication. If our problem
is indeed caused by server load, then halving the number of
server requests can only improve matters.

Signed-off-by: Adam Farley <[email protected]>
  • Loading branch information
adamfarley authored Nov 9, 2023
1 parent ebfa8a2 commit ff9bcd1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,13 @@ checkingAndDownloadingAlsa() {

echo "GNUPGHOME=$GNUPGHOME"
mkdir -p "$GNUPGHOME" && chmod og-rwx "$GNUPGHOME"
gpg --keyserver keyserver.ubuntu.com --recv-keys "${ALSA_LIB_GPGKEYID}"
# Should we clear this directory up after checking?
# Would this risk removing anyone's existing dir with that name?
# Erring on the side of caution for now
gpg --keyserver keyserver.ubuntu.com --recv-keys "${ALSA_LIB_GPGKEYID}"
# Note: the uptime command below is to aid diagnostics for this issue:
# https://github.com/adoptium/temurin-build/issues/3518#issuecomment-1792606345
uptime
gpg --keyserver keyserver.ubuntu.com --keyserver-options timeout=300 --recv-keys "${ALSA_LIB_GPGKEYID}"
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key "${ALSA_LIB_GPGKEYID}" trust;
gpg --verify alsa-lib.tar.bz2.sig alsa-lib.tar.bz2 || exit 1

Expand Down

0 comments on commit ff9bcd1

Please sign in to comment.