Skip to content

ci(windows): pre-populate msys2 pkgconf 1~2.2.0-1 for vcpkg 2024.10.21#5943

Merged
Fedr merged 1 commit intomasterfrom
ci/prepopulate-msys2-pkgconf
Apr 20, 2026
Merged

ci(windows): pre-populate msys2 pkgconf 1~2.2.0-1 for vcpkg 2024.10.21#5943
Fedr merged 1 commit intomasterfrom
ci/prepopulate-msys2-pkgconf

Conversation

@Fedr
Copy link
Copy Markdown
Contributor

@Fedr Fedr commented Apr 20, 2026

What

Adds one file under thirdparty/vcpkg/downloads/:

msys2-mingw-w64-x86_64-pkgconf-1~2.2.0-1-any.pkg.tar.zst
SHA512  eb6ba49d56b0edc4f605ad896ac9deb2202c853c821f1c28a26e3c71a5083e893c8697d174b141da9dc6561620ea218166bd041664d54a0ab51b93bad246ed7a

This is the exact file that the Windows vcpkg 2024.10.21 matrix entry tries to fetch inside vcpkg_fixup_pkgconfig() and currently 404s on every msys2 mirror. The SHA512 matches what vcpkg pins in scripts/cmake/vcpkg_find_acquire_program(PKGCONFIG).cmake.

How the mechanism works

thirdparty/install.bat already does this before the first vcpkg install:

if exist "%~dp0vcpkg\downloads\" (
    xcopy "%~dp0vcpkg\downloads\*" "!vcpkg_path!downloads" /Y /E 2>/dev/null
)

So any file placed under thirdparty/vcpkg/downloads/ ends up in C:\vcpkg\downloads\ at install time. When vcpkg later needs to acquire a package by URL, vcpkg_download_distfile() checks the local downloads directory first: if a file with the expected filename exists and its SHA512 matches, the network fetch is skipped entirely.

Same mechanism is already in use — there are 7 pre-committed msys-*.pkg.tar.* files in that directory today, put there for the same reason (older msys2 pins that have been pruned from mirrors).

Scope

  • Affects: Windows msvc-2019 Release CMake 2024.10.21 matrix entry. Fresh vcpkg builds of blosc, freetype, libharu, and any other port that calls vcpkg_fixup_pkgconfig() will now succeed instead of hitting the 404.
  • Unaffected: msvc-2022 Debug MSBuild 2026.03.18 and msvc-2022 Release CMake 2026.03.18 matrix entries. Those use vcpkg 2026.03.18, which pins a completely different URL (pkgconf-2.5.1-1 from the msys/x86_64/ directory, still live on mirrors).
  • No Linux / macOS / emscripten impact — those don't use msys2.

Verification I did before committing

  1. Ran sha512sum against the file and confirmed it's byte-identical to the hash vcpkg pins.
  2. Confirmed the filename matches what vcpkg writes to its local downloads dir (msys2--prefixed, not msys-; vcpkg changed the prefix convention at some point, which is why the pre-existing files in the folder use the old naming).
  3. Read vcpkg 2024.10.21's vcpkg_find_acquire_program(PKGCONFIG).cmake to confirm this is the exact URL/hash pair that the failing build stack would reach.
  4. Read vcpkg 2026.03.18's equivalent to confirm it targets a different URL entirely — this PR does not help or hurt that path.

Limitations / future work

  • This is a point fix for one specific pin. If vcpkg bumps to a version that changes the pin again, a new pre-populated file will be needed (or the pin will land on a URL that's still live).
  • A cleaner long-term fix is to bump matrix.vcpkg-version in build-test-windows.yml off 2024.10.21 to a release whose pkgconf pin is still on msys2 mirrors. That's a larger change because the 2024.10.21 entry is wired to msvc-2019 and possibly to specific downstream-compatibility expectations; out of scope here.
  • If other matrix entries later start hitting similar 404s on newly-retired msys2 pins, the same pattern — commit the file, same directory — applies.

thirdparty/vcpkg/downloads/ is already used by thirdparty/install.bat
to pre-seed C:\vcpkg\downloads\ with msys2 .pkg.tar.zst archives
that vcpkg pins by SHA512 but msys2 mirrors have rotated out of
their live repos. This adds one more entry:

    msys2-mingw-w64-x86_64-pkgconf-1~2.2.0-1-any.pkg.tar.zst
    SHA512  eb6ba49d56b0edc4f605ad896ac9deb2202c853c821f1c28a26e3c71a5083e893c
            8697d174b141da9dc6561620ea218166bd041664d54a0ab51b93bad246ed7a

Pinned by vcpkg 2024.10.21's
scripts/cmake/vcpkg_find_acquire_program(PKGCONFIG).cmake. vcpkg
checks local downloads/ first: if the file exists and its SHA512
matches, the network fetch is skipped. msys2 mirrors currently serve
a newer -N suffix build of the same 2.2.0 upstream, so every pinned
URL returns 404; this workaround unblocks any port that rebuilds
from source and calls vcpkg_fixup_pkgconfig() (blosc, freetype,
libharu, ...).

Note: vcpkg 2026.03.18 (used by the msvc-2022 matrix entries) pins
a completely different URL (pkgconf-2.5.1-1 from the msys repo,
still available); that matrix entry is not affected and no file is
needed for it. This fix is scoped to the 2024.10.21 / msvc-2019
path.

Alternative long-term fix is to bump matrix.vcpkg-version off
2024.10.21. That's a bigger change with wider blast radius; this
PR is the minimal targeted workaround.
@Fedr Fedr merged commit 2c1304b into master Apr 20, 2026
4 of 15 checks passed
@Fedr Fedr deleted the ci/prepopulate-msys2-pkgconf branch April 20, 2026 13:49
Fedr added a commit that referenced this pull request Apr 20, 2026
Run 24670365594 on this branch hit the same msys2 mirror-404 class
of failure we saw before, this time on a different pinned package:

  error: Missing msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst
  and downloads are blocked by x-block-origin
  ...404 from all 6 mirrors
  error: building zlib:x64-windows-meshlib failed with: BUILD_FAILED

Same mechanism, different file. vcpkg_acquire_msys() downloads an
entire msys2 environment (bash, coreutils, file, gawk, grep, gzip,
diffutils, make, pkgconf, sed — plus transitive deps like
msys2-runtime), each pinned by SHA512 to a specific build. msys2
mirrors rotate old builds out of their live repos. We already
pre-staged pkgconf in #5943; this commit adds the msys2-runtime
file that failed next.

File: msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst
  SHA512: 35fd12556a53aa57d8f9500c5c98d5e1fc64c6fbba34cc97e2ff78893e5b1b63c
          417bc1c8d1e62b26b2a93aef120fa1f9f82aad67dff4cc44af169d0d29d68f7

Matches the pin in vcpkg 2024.10.21's
scripts/cmake/vcpkg_acquire_msys.cmake (line 444-445).

thirdparty/install.bat copies thirdparty/vcpkg/downloads/ into
C:\vcpkg\downloads\ before vcpkg install; vcpkg_download_distfile()
checks the local file first and skips the network fetch if the
SHA matches.

Same caveat as with the pkgconf pre-staging: this is a point fix.
vcpkg_acquire_msys() pulls several more packages that are equally
exposed to msys2's retention policy; if any of those also fail in
a future run, they will need the same treatment. A bigger fix
(bump matrix.vcpkg-version off 2024.10.21 onto a release with
still-live msys2 pins) is out of scope for this branch.
MaxRayskiy pushed a commit that referenced this pull request Apr 21, 2026
Run 24670365594 on this branch hit the same msys2 mirror-404 class
of failure we saw before, this time on a different pinned package:

  error: Missing msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst
  and downloads are blocked by x-block-origin
  ...404 from all 6 mirrors
  error: building zlib:x64-windows-meshlib failed with: BUILD_FAILED

Same mechanism, different file. vcpkg_acquire_msys() downloads an
entire msys2 environment (bash, coreutils, file, gawk, grep, gzip,
diffutils, make, pkgconf, sed — plus transitive deps like
msys2-runtime), each pinned by SHA512 to a specific build. msys2
mirrors rotate old builds out of their live repos. We already
pre-staged pkgconf in #5943; this commit adds the msys2-runtime
file that failed next.

File: msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst
  SHA512: 35fd12556a53aa57d8f9500c5c98d5e1fc64c6fbba34cc97e2ff78893e5b1b63c
          417bc1c8d1e62b26b2a93aef120fa1f9f82aad67dff4cc44af169d0d29d68f7

Matches the pin in vcpkg 2024.10.21's
scripts/cmake/vcpkg_acquire_msys.cmake (line 444-445).

thirdparty/install.bat copies thirdparty/vcpkg/downloads/ into
C:\vcpkg\downloads\ before vcpkg install; vcpkg_download_distfile()
checks the local file first and skips the network fetch if the
SHA matches.

Same caveat as with the pkgconf pre-staging: this is a point fix.
vcpkg_acquire_msys() pulls several more packages that are equally
exposed to msys2's retention policy; if any of those also fail in
a future run, they will need the same treatment. A bigger fix
(bump matrix.vcpkg-version off 2024.10.21 onto a release with
still-live msys2 pins) is out of scope for this branch.
MaxRayskiy pushed a commit that referenced this pull request Apr 21, 2026
Run 24670365594 on this branch hit the same msys2 mirror-404 class
of failure we saw before, this time on a different pinned package:

  error: Missing msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst
  and downloads are blocked by x-block-origin
  ...404 from all 6 mirrors
  error: building zlib:x64-windows-meshlib failed with: BUILD_FAILED

Same mechanism, different file. vcpkg_acquire_msys() downloads an
entire msys2 environment (bash, coreutils, file, gawk, grep, gzip,
diffutils, make, pkgconf, sed — plus transitive deps like
msys2-runtime), each pinned by SHA512 to a specific build. msys2
mirrors rotate old builds out of their live repos. We already
pre-staged pkgconf in #5943; this commit adds the msys2-runtime
file that failed next.

File: msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst
  SHA512: 35fd12556a53aa57d8f9500c5c98d5e1fc64c6fbba34cc97e2ff78893e5b1b63c
          417bc1c8d1e62b26b2a93aef120fa1f9f82aad67dff4cc44af169d0d29d68f7

Matches the pin in vcpkg 2024.10.21's
scripts/cmake/vcpkg_acquire_msys.cmake (line 444-445).

thirdparty/install.bat copies thirdparty/vcpkg/downloads/ into
C:\vcpkg\downloads\ before vcpkg install; vcpkg_download_distfile()
checks the local file first and skips the network fetch if the
SHA matches.

Same caveat as with the pkgconf pre-staging: this is a point fix.
vcpkg_acquire_msys() pulls several more packages that are equally
exposed to msys2's retention policy; if any of those also fail in
a future run, they will need the same treatment. A bigger fix
(bump matrix.vcpkg-version off 2024.10.21 onto a release with
still-live msys2 pins) is out of scope for this branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant