Skip to content

pacman-helper: stop deploying to the Azure Blobs-backed Pacman repository#709

Merged
dscho merged 3 commits into
mainfrom
stop-deploying-pacman-packages-to-azure-blobs
Jun 9, 2026
Merged

pacman-helper: stop deploying to the Azure Blobs-backed Pacman repository#709
dscho merged 3 commits into
mainfrom
stop-deploying-pacman-packages-to-azure-blobs

Conversation

@dscho

@dscho dscho commented Jun 7, 2026

Copy link
Copy Markdown
Member

The Pacman packages that Git for Windows distributes have, for many years, been served from a storage location tied to my personal Azure account. That was always uncomfortable: if ever I decided that I want to do become a goat farmer, the project would be in a bind.

So I set out to find a better home for the Pacman repository, one that the Git for Windows project could properly own. The natural answer was the Git for Windows organization on GitHub itself. The new home is git-for-windows/pacman-repo, and for quite a while every package release has been published to both the old and the new location in parallel, so that the new one could prove itself. The default in Git for Windows' SDK has been the new location for a bit, too.

It has, and it is time to retire the old one.

This PR is the switch-over: from now on, package deployments go only to the GitHub-hosted Pacman repository. The first commit is the change to the release tooling; the second removes the small helper that knew how to talk to Azure storage and now has no remaining callers.

Note: While the Azure backend allowed us to sort of lock deployments via acquired leases to avoid having two concurrent deployments fall over each other's paws, the GitHub-hosted backend cannot offer that, so we rely on replaying the entire "add packages to the Pacman database, then commit and push" dance on conflict instead, i.e. using the fact that git push is all or nothing as an "optimistic lock". That fallback has been in place for a long time, so one might claim that it has held up well in practice, but in reality it has never been exercised because of the lease-acquiring "lock" on Azure Blobs.

Retiring the Azure side is also a somewhat of a prerequisite for picking up the upcoming UCRT64 packaging work: I'd really like to avoid dragging the legacy backend along for the ride.

dscho added 2 commits June 6, 2026 23:40
The Pacman repository at https://wingit.blob.core.windows.net is tied
to my personal Azure account, and I have long wanted to decouple Git
for Windows from that. The replacement, git-for-windows/pacman-repo,
has been growing into a fully featured backend for a while: ebff2ea
(pacman-helper quick_add: mirror deployments to GitHub Releases) began
mirroring every deployment there, 56b46e6 (pacman-helper quick_add:
use new-style database filenames locally) introduced the new naming
scheme, 3fca5c7 (pacman-helper quick_add: start transitioning
deployments to GitHub) and 94dde8c (pacman-helper quick_add: verify
that the old/new Pacman repos are in sync) hooked the new backend into
the script alongside Azure, and fd28d50 (pacman-helper: maintain
per-package .versions.json index files) was the final missing piece:
present and past package versions' locations can now be determined
from the per-package `.versions.json` files and the git history of
pacman-repo, matching the one thing for which the Azure container
listing was still preferable.

Both backends have been running in parallel long enough that I am
confident the new one is reliable. Retiring the Azure side is also a
prerequisite for starting to build UCRT64 packages, which I would
rather not deploy to the legacy backend at all.

Drop every code path that touched Azure Blobs: the `base_url`,
`map_arch` and `arch_url` helpers, the `azure_blobs_token` plumbing,
the inner loop that downloaded the old-naming-scheme `.db`/`.files`
files from Azure, the cross-backend "are the databases in sync?"
verification, the upload-to-Azure block at the end of `quick_action`,
and the `lock`/`unlock`/`break_lock` subcommands that drove Azure Blob
leases via `wingit-snapshot-helper.sh`. That helper script is now
unused and will be removed in a follow-up commit.

The `sanitize_db` helper used to run on each freshly-downloaded Azure
copy of the database, but the duplicate-package-versions failure mode
it defends against is intrinsic to the Pacman database format, not to
the Azure backend (we have been bitten by it before). Keep the
function and run it on the freshly-pulled pacman-repo database
instead.

The Azure lease was previously the only locking mechanism. The new
backend has no equivalent, so the best we can do is what we already
do: detect a non-fast-forward push and re-apply the database updates
on top of the concurrent change. That loop, introduced in 80a77f4
(pacman-helper quick_add: allow for concurrent deployments), is left
in place as the sole concurrency safeguard.

Discussed in
git-for-windows/git#6018 (reply in thread)
and
#706 (comment).

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This script was the only interface between pacman-helper.sh and the
Azure Blobs-backed Pacman repository at wingit.blob.core.windows.net:
it implemented the REST request signing for upload, remove, list,
lock, unlock and break-lock against an Azure storage container. With
the preceding commit removing every call site in pacman-helper.sh,
nothing in this repository references it any longer (verified via
`git grep wingit-snapshot-helper`).

There is no replacement and none is needed: the new
git-for-windows/pacman-repo backend speaks plain git over HTTPS, so
the bespoke HMAC-SHA256 signing logic, the lease bookkeeping, and the
content-type-by-extension table all become dead code together. Delete
the file rather than leave it sitting as a maintenance hazard whose
only remaining purpose would be to confuse a future reader looking
for "how does this script reach the Pacman repository?".

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho requested review from mjcheetham and rimrul June 7, 2026 00:19
@dscho dscho self-assigned this Jun 7, 2026
@dscho dscho marked this pull request as ready for review June 7, 2026 00:19
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho merged commit 7c95c66 into main Jun 9, 2026
6 checks passed
@dscho dscho deleted the stop-deploying-pacman-packages-to-azure-blobs branch June 9, 2026 12:32
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.

2 participants