From d1707eed0f2569d8a20335eec172a4ab56417cd0 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 21 Dec 2018 04:07:50 +0000 Subject: [PATCH] scripts/wireguard: Limit connection time to 30 seconds If infra fails, this will make sure we don't block people's builds. Suggested-by: Francisco Franco Signed-off-by: khusika --- scripts/fetch-latest-wireguard.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fetch-latest-wireguard.sh b/scripts/fetch-latest-wireguard.sh index dd6ed4db3ce8..9730f2e6eacf 100755 --- a/scripts/fetch-latest-wireguard.sh +++ b/scripts/fetch-latest-wireguard.sh @@ -12,7 +12,7 @@ while read -r distro package version _; do VERSION="$version" break fi -done < <(curl -A "$USER_AGENT" -LSs https://build.wireguard.com/distros.txt) +done < <(curl -A "$USER_AGENT" -LSs --connect-timeout 30 https://build.wireguard.com/distros.txt) [[ -n $VERSION ]] @@ -23,6 +23,6 @@ fi rm -rf net/wireguard mkdir -p net/wireguard -curl -A "$USER_AGENT" -LsS "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$VERSION.tar.xz" | tar -C "net/wireguard" -xJf - --strip-components=2 "WireGuard-$VERSION/src" +curl -A "$USER_AGENT" -LsS --connect-timeout 30 "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$VERSION.tar.xz" | tar -C "net/wireguard" -xJf - --strip-components=2 "WireGuard-$VERSION/src" sed -i 's/tristate/bool/;s/default m/default y/;' net/wireguard/Kconfig touch net/wireguard/.check