Files
codex/patches/rules_rs_zlib_snapshot_urls.patch
T
jif ede589336e Prefer Launchpad for Linux zlib downloads in rules_rs (#59448)
## What changed

Update the `rules_rs` patch to try Launchpad first for the Linux `aarch64`
and `x86_64` zlib packages, retaining the dated Ubuntu snapshot URLs as
fallbacks. Keep the pinned package versions and SHA-256 hashes unchanged.

GitOrigin-RevId: 2582fb2db50eb8fd652ffd02b11e226d106561d4
2026-11-04 16:48:44 +00:00

28 lines
1.5 KiB
Diff

# Fetch Linux zlib from Launchpad with the pinned Ubuntu snapshot as a fallback.
# Follow https://github.com/hermeticbuild/rules_rs/commit/ee9a99d0a8e7784b3104dd188123750443cf2c26
# while keeping this rules_rs version's package versions and SHA-256 hashes.
diff --git a/rs/private/rustc_repository.bzl b/rs/private/rustc_repository.bzl
--- a/rs/private/rustc_repository.bzl
+++ b/rs/private/rustc_repository.bzl
@@ -11,11 +11,17 @@ _LINUX_ZLIB = {
"aarch64": struct(
libdir = "usr/lib/aarch64-linux-gnu",
sha256 = "cbe3d39ec32d3cc27c021ae4af11e7c67bdf9d700d573207e0941d4038056278",
- url = "https://ports.ubuntu.com/ubuntu-ports/pool/main/z/zlib/zlib1g_1.3.dfsg-3.1ubuntu2.1_arm64.deb",
+ url = [
+ "https://launchpad.net/ubuntu/+archive/primary/+files/zlib1g_1.3.dfsg-3.1ubuntu2.1_arm64.deb",
+ "https://snapshot.ubuntu.com/ubuntu/20260801T000000Z/pool/main/z/zlib/zlib1g_1.3.dfsg-3.1ubuntu2.1_arm64.deb",
+ ],
),
"x86_64": struct(
libdir = "usr/lib/x86_64-linux-gnu",
sha256 = "7074b6a2f6367a10d280c00a1cb02e74277709180bab4f2491a2f355ab2d6c20",
- url = "https://archive.ubuntu.com/ubuntu/pool/main/z/zlib/zlib1g_1.3.dfsg-3.1ubuntu2.1_amd64.deb",
+ url = [
+ "https://launchpad.net/ubuntu/+archive/primary/+files/zlib1g_1.3.dfsg-3.1ubuntu2.1_amd64.deb",
+ "https://snapshot.ubuntu.com/ubuntu/20260801T000000Z/pool/main/z/zlib/zlib1g_1.3.dfsg-3.1ubuntu2.1_amd64.deb",
+ ],
),
}