From ff9bcd16d9a98a392a0a2c9f95722984c198e552 Mon Sep 17 00:00:00 2001 From: Adam Farley Date: Thu, 9 Nov 2023 16:02:49 +0000 Subject: [PATCH] Extending keyserver timeout to make alpine build more forgiving (#3520) * 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 --- sbin/prepareWorkspace.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 2c0c12e36..5f44dee93 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -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