Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add an HTTP fallback for the Ubuntu toolchain PPA (#65944)

Jakub Konka544780422aff
diff --git a/script/linux b/script/linux
index 9a945dca9b4..df95f90eaf4 100755
--- a/script/linux
+++ b/script/linux
@@ -71,7 +71,14 @@ if [[ -n $apt ]]; then
# keyserver lookups (port 11371) frequently time out in CI.
$maysudo "$apt" install -y curl gnupg
codename=$(lsb_release -cs)
- echo "deb https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu $codename main" | \
+ # Launchpad's HTTPS frontend can return 503 while HTTP still works. APT's
+ # mirror transport falls back for both indexes and packages, preserving
+ # signature and hash verification.
+ printf '%s\tpriority:%s\n' \
+ 'https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu' 1 \
+ 'http://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu' 2 | \
+ $maysudo tee /etc/apt/ubuntu-toolchain-r-test.mirrors > /dev/null
+ echo "deb mirror+file:/etc/apt/ubuntu-toolchain-r-test.mirrors $codename main" | \
$maysudo tee /etc/apt/sources.list.d/ubuntu-toolchain-r-test.list > /dev/null
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | \
sed -n '/-----BEGIN PGP PUBLIC KEY BLOCK-----/,/-----END PGP PUBLIC KEY BLOCK-----/p' | \