install-deps: pre-seed bzip2 tarball for vcpkg under 1ES network isolation - #910
Merged
Merged
Conversation
…ation The delta-library dependency install (`do_install_delta`) builds a set of vcpkg ports in classic mode. Every port fetches its sources from github.com except bzip2, whose vcpkg portfile downloads bzip2-1.0.8.tar.gz from sourceware.org (with a www.mirrorservice.org fallback). Under 1ES network isolation the amd64 build pool only reaches an allowlist of package mirrors; neither sourceware host is on it, so the download times out and `vcpkg install bzip2` fails with BUILD_FAILED, breaking the whole dependency install and every amd64 leg of the platform build. Pre-seed vcpkg's download cache with the byte-for-byte identical tarball, fetched from an allowlisted distro archive pool (deb.debian.org for Debian containers, azure.archive.ubuntu.com for Ubuntu containers) under the exact filename the port expects (bzip2-1.0.8.tar.gz). vcpkg validates the SHA512 and skips its upstream download. The pre-seed is SHA512-verified, idempotent, and soft-fails (warns and lets vcpkg try upstream) if no mirror is reachable, so it is a no-op on non-isolated pools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f9dea48f-3bbf-423c-b8cd-4c78631b2d76
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f9dea48f-3bbf-423c-b8cd-4c78631b2d76
chgennar
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The platform build's amd64 legs (
debian11/12/13-amd64,ubuntu2204/2404-amd64) fail in Install additional dependencies because of 1ES network isolation on the amd64 build pool.do_install_delta()inscripts/install-deps.shbuilds a set of vcpkg ports in classic mode (zlib,zstd,bzip2,gtest,openssl,e2fsprogs,jsoncpp,libconfig,fmt,bsdiff). Every one of those ports fetches its sources from github.com — which the pipeline reaches fine — exceptbzip2, whose vcpkg portfile downloadsbzip2-1.0.8.tar.gzfromsourceware.org(with awww.mirrorservice.orgfallback).Under 1ES isolation the amd64 pool only reaches an allowlist of package mirrors. Neither sourceware host is on it, so the download times out and
vcpkg install bzip2fails withBUILD_FAILED, which aborts the entire dependency install and fails every amd64 leg.Fix
Pre-seed vcpkg's download cache with the byte-for-byte identical tarball fetched from an allowlisted distro archive pool before running the vcpkg installs:
deb.debian.org; Ubuntu containers reachazure.archive.ubuntu.com— both carrybzip2_1.0.8.orig.tar.gz, which is identical to sourceware'sbzip2-1.0.8.tar.gz(verified: 810029 bytes, same SHA512).$VCPKG_ROOT/downloads/bzip2-1.0.8.tar.gz— the exact filename the port'svcpkg_download_distfile(... FILENAME "bzip2-${VERSION}.tar.gz")expects. vcpkg then validates the SHA512 and skips its upstream download.Properties:
e0edebd, bzip21.0.8port-version 6) —083f5e67…a30b9f3. A mismatch discards the file.Only
bzip2is affected because it is the only delta dependency whose vcpkg port pulls from a non-github, non-allowlisted host.Validation
bash -n scripts/install-deps.shpasses.VCPKG_ROOT: cold cache downloads fromdeb.debian.org, SHA512 verifies, warm cache skips, no leftover.tmp.e0edebd1dc2d03cf7d02349df91de74ef4d0c00e) resolves bzip2 to1.0.8withFILENAME "bzip2-1.0.8.tar.gz"and SHA512083f5e67…a30b9f3, matching the pre-seed exactly./cc @adu-client