From 6eb94c00c63a2c7a2744ecd616ea5239b473e198 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 12:28:58 +0200 Subject: [PATCH 1/9] please.sh: support --only-ucrt64 in build_mingw_w64_git The git-artifacts workflow calls `please.sh build-mingw-w64-git --only-$ARCHITECTURE`, and for the new UCRT64 pseudo architecture that produces `--only-ucrt64`. Without a matching case in `build_mingw_w64_git`, the function falls through to the `*)` catch-all and fails. Add the missing `--only-ucrt64` case that sets `MINGW_ARCH=ucrt64`, mirroring the existing `--only-aarch64` -> `clangarm64` pattern. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- please.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/please.sh b/please.sh index 0577ab2532..4439a1e98b 100755 --- a/please.sh +++ b/please.sh @@ -796,7 +796,7 @@ find_mspdb_dll () { # return 1 } -build_mingw_w64_git () { # [--only-i686] [--only-x86_64] [--only-aarch64] [--skip-test-artifacts] [--skip-doc-man] [--skip-doc-html] [--force] [] +build_mingw_w64_git () { # [--only-i686] [--only-x86_64] [--only-aarch64] [--only-ucrt64] [--skip-test-artifacts] [--skip-doc-man] [--skip-doc-html] [--force] [] output_path= sed_makepkg_e= force= @@ -815,6 +815,10 @@ build_mingw_w64_git () { # [--only-i686] [--only-x86_64] [--only-aarch64] [--ski MINGW_ARCH=clangarm64 export MINGW_ARCH ;; + --only-ucrt64) + MINGW_ARCH=ucrt64 + export MINGW_ARCH + ;; --skip-test-artifacts) sed_makepkg_e="$sed_makepkg_e"' -e s/"\${MINGW_PACKAGE_PREFIX}-\${_realname}-test-artifacts"//' ;; From 62d121b473cafa784828c09a1f6a34737764fe95 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 17:32:30 +0200 Subject: [PATCH 2/9] installer: introduce MINGW_PACKAGE_PREFIX The `edit-git-bash` check used `mingw-w64-$ARCH` to construct the Pacman package name, which only works when the architecture name happens to match the Pacman package prefix (i686, x86_64). For CLANGARM64 the prefix is `mingw-w64-clang-aarch64`, not `mingw-w64-aarch64`, so the pattern was already subtly wrong (it does not really matter because `edit-git-bash.exe` lives in the `mingw-w64-git-for-windows-addons` package nowadays, therefore that file would be included in the installer even if the check failed erroneously). Introduce a `MINGW_PACKAGE_PREFIX` variable in the MSYSTEM case block, mirroring the convention used by MSYS2 itself, and use it for the Pacman local path glob. This is a no-op for all currently supported architectures and prepares for UCRT64 where the prefix is `mingw-w64-ucrt-x86_64`. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- installer/release.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/installer/release.sh b/installer/release.sh index aa9791f2d5..f37fc7c19d 100755 --- a/installer/release.sh +++ b/installer/release.sh @@ -119,14 +119,17 @@ case "$MSYSTEM" in MINGW32) BITNESS=32 ARCH=i686 + MINGW_PACKAGE_PREFIX=mingw-w64-i686 ;; MINGW64) BITNESS=64 ARCH=x86_64 + MINGW_PACKAGE_PREFIX=mingw-w64-x86_64 ;; CLANGARM64) BITNESS=64 ARCH=aarch64 + MINGW_PACKAGE_PREFIX=mingw-w64-clang-aarch64 inno_defines="$inno_defines$LF#define INSTALLER_FILENAME_SUFFIX 'arm64'$LF#define ARCHS_ALLOWED 'arm64 and x64compatible'" ;; *) @@ -145,7 +148,7 @@ fi || die "Could not generate release notes" test ! -d /var/lib/pacman/local/ || -if grep -q edit-git-bash /var/lib/pacman/local/mingw-w64-$ARCH-git-[1-9]*/files +if grep -q edit-git-bash /var/lib/pacman/local/$MINGW_PACKAGE_PREFIX-git-[1-9]*/files then INCLUDE_EDIT_GIT_BASH= else From 5f2b2f6f597e0f3007e2705b6480a4e129e3c9b9 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 19 Jun 2026 15:30:46 +0200 Subject: [PATCH 3/9] installer: avoid including `edit-git-bash.exe` twice There is logic to build and include `edit-git-bash.exe` in the installer if it is not already part of the `mingw-w64-git` package, so that the installer will always have a way to modify Git Bash according to the user's choices. However, these days that executable no longer lives in the `*-git` package but instead in the `*-git-for-windows-addons` one. Let's check for that one, too. Signed-off-by: Johannes Schindelin --- installer/release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installer/release.sh b/installer/release.sh index f37fc7c19d..39e7f14fb8 100755 --- a/installer/release.sh +++ b/installer/release.sh @@ -148,7 +148,8 @@ fi || die "Could not generate release notes" test ! -d /var/lib/pacman/local/ || -if grep -q edit-git-bash /var/lib/pacman/local/$MINGW_PACKAGE_PREFIX-git-[1-9]*/files +if grep -q edit-git-bash /var/lib/pacman/local/$MINGW_PACKAGE_PREFIX-git-for-windows-addons-[1-9]*/files || + grep -q edit-git-bash /var/lib/pacman/local/$MINGW_PACKAGE_PREFIX-git-[1-9]*/files then INCLUDE_EDIT_GIT_BASH= else From fdc5f121c6ae1f218317310fee69962828d6c992 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 17:34:03 +0200 Subject: [PATCH 4/9] mingit: rename PACMAN_ARCH to MINGW_PACKAGE_PREFIX For consistency with the MSYS2 convention and the installer script, rename the ad-hoc `PACMAN_ARCH` variable (which held only the architecture-specific infix, e.g. `clang-aarch64`) to the full `MINGW_PACKAGE_PREFIX` (e.g. `mingw-w64-clang-aarch64`). The two call sites that constructed `mingw-w64-$PACMAN_ARCH-` now simply use `$MINGW_PACKAGE_PREFIX-`. No functional change for any architecture. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- mingit/release.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mingit/release.sh b/mingit/release.sh index 567effdd83..885f0a33d4 100755 --- a/mingit/release.sh +++ b/mingit/release.sh @@ -35,17 +35,17 @@ case "$MSYSTEM" in MINGW32) ARCH=i686 ARTIFACT_SUFFIX="32-bit" - PACMAN_ARCH=i686 + MINGW_PACKAGE_PREFIX=mingw-w64-i686 ;; MINGW64) ARCH=x86_64 ARTIFACT_SUFFIX="64-bit" - PACMAN_ARCH=x86_64 + MINGW_PACKAGE_PREFIX=mingw-w64-x86_64 ;; CLANGARM64) ARCH=aarch64 ARTIFACT_SUFFIX=arm64 - PACMAN_ARCH=clang-aarch64 + MINGW_PACKAGE_PREFIX=mingw-w64-clang-aarch64 ;; *) die "Unhandled MSYSTEM: $MSYSTEM" @@ -115,11 +115,11 @@ die "Could not generate system config" # Make the archive type 7z || -pacman -Sy --noconfirm mingw-w64-$PACMAN_ARCH-7zip || +pacman -Sy --noconfirm $MINGW_PACKAGE_PREFIX-7zip || die "Could not install 7-Zip" echo "$LIST" | sort >"$SCRIPT_PATH"/sorted-all && -pacman -Ql mingw-w64-$PACMAN_ARCH-git | +pacman -Ql $MINGW_PACKAGE_PREFIX-git | sed 's|^[^ ]* /||' | grep "^$MSYSTEM_LOWER/libexec/git-core/.*\.exe$" | sort >"$SCRIPT_PATH"/sorted-libexec-exes && From c7294b162e9bfd595972a610548a455908e5b46a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 17:34:50 +0200 Subject: [PATCH 5/9] nuget: introduce MINGW_PACKAGE_PREFIX Same pattern as the installer and mingit scripts: introduce `MINGW_PACKAGE_PREFIX` and use it for the `pacman -Ql` call that discovers which executables live in `libexec/git-core/`. The nuget script only runs for x86_64, but the naming is now consistent with the rest of the release scripts. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- nuget/release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nuget/release.sh b/nuget/release.sh index 45429d2378..e06bcfc6b4 100755 --- a/nuget/release.sh +++ b/nuget/release.sh @@ -73,9 +73,11 @@ ARCH="$(uname -m)" case "$ARCH" in i686) BITNESS=32 + MINGW_PACKAGE_PREFIX=mingw-w64-i686 ;; x86_64) BITNESS=64 + MINGW_PACKAGE_PREFIX=mingw-w64-x86_64 ;; *) die "Unhandled architecture: $ARCH" @@ -117,7 +119,7 @@ test -z "$MINIMAL_GIT" || { mv "$SPEC" "$SPEC".unmoved && sed -e '/tools\\mingw..\\libexec\\git-core\\\(scalar\|git\(\|-upload-pack\)\).exe/d' \ -e 's%\( target="tools\\mingw[36][24]\\\)libexec\\git-core\\\('"$(\ - pacman -Ql mingw-w64-$ARCH-git | + pacman -Ql $MINGW_PACKAGE_PREFIX-git | sed -n 's|^[^ ]* /mingw../libexec/git-core/\(.*\.exe\)$|\1\\|p' | tr '\n' '|')"'\)"%\1bin\\\2"%' <"$SPEC".unmoved >"$SPEC" && git diff --no-index "$SPEC.unmoved" "$SPEC" | From 46930c7c7a07d2dc9514d07a86cc1225e9c9714c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 17:35:55 +0200 Subject: [PATCH 6/9] installer, portable, mingit, archive: support UCRT64 Add the `UCRT64` case arms to the MSYSTEM switch in the installer, portable, etc `release.sh` scripts. The installer gets a filename suffix of `ucrt64` via an Inno Setup define (following the same pattern as arm64). The archive and portable scripts derive the artifact suffix directly from the case block. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- archive/release.sh | 4 ++++ installer/release.sh | 6 ++++++ mingit/release.sh | 5 +++++ portable/release.sh | 7 +++++++ 4 files changed, 22 insertions(+) diff --git a/archive/release.sh b/archive/release.sh index 5200eb5552..64bc10911e 100755 --- a/archive/release.sh +++ b/archive/release.sh @@ -43,6 +43,10 @@ MINGW64) ARCH=x86_64 ARTIFACT_SUFFIX="64-bit" ;; +UCRT64) + ARCH=ucrt64 + ARTIFACT_SUFFIX="ucrt64" + ;; CLANGARM64) ARCH=aarch64 ARTIFACT_SUFFIX=arm64 diff --git a/installer/release.sh b/installer/release.sh index 39e7f14fb8..6f5cfdde20 100755 --- a/installer/release.sh +++ b/installer/release.sh @@ -126,6 +126,12 @@ MINGW64) ARCH=x86_64 MINGW_PACKAGE_PREFIX=mingw-w64-x86_64 ;; +UCRT64) + BITNESS=64 + ARCH=ucrt64 + MINGW_PACKAGE_PREFIX=mingw-w64-ucrt-x86_64 + inno_defines="$inno_defines$LF#define INSTALLER_FILENAME_SUFFIX 'ucrt64'" + ;; CLANGARM64) BITNESS=64 ARCH=aarch64 diff --git a/mingit/release.sh b/mingit/release.sh index 885f0a33d4..37319aa10f 100755 --- a/mingit/release.sh +++ b/mingit/release.sh @@ -47,6 +47,11 @@ CLANGARM64) ARTIFACT_SUFFIX=arm64 MINGW_PACKAGE_PREFIX=mingw-w64-clang-aarch64 ;; +UCRT64) + ARCH=ucrt64 + ARTIFACT_SUFFIX="ucrt64" + PACMAN_ARCH=ucrt-x86_64 + ;; *) die "Unhandled MSYSTEM: $MSYSTEM" ;; diff --git a/portable/release.sh b/portable/release.sh index 0b0248fa81..7acfa2b8aa 100755 --- a/portable/release.sh +++ b/portable/release.sh @@ -52,6 +52,13 @@ MINGW64) MD_ARG=256M MINGW_PREFIX=mingw-w64-x86_64- ;; +UCRT64) + BITNESS=64 + ARCH=ucrt64 + ARTIFACT_SUFFIX="ucrt64" + MD_ARG=256M + MINGW_PREFIX=mingw-w64-ucrt-x86_64- + ;; CLANGARM64) BITNESS=64 ARCH=aarch64 From 3948855f32cce819aa59c8af715fbd271f8dbf22 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 20 Jun 2026 09:48:12 +0200 Subject: [PATCH 7/9] please.sh: replace the made-up `pacman_arch` with a more standard naming In MSYS2 parlance, there is an architecture-specific $MINGW_PACKAGE_PREFIX, and we should use _that_ instead. Signed-off-by: Johannes Schindelin --- please.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/please.sh b/please.sh index 4439a1e98b..67323c7176 100755 --- a/please.sh +++ b/please.sh @@ -281,17 +281,17 @@ bundle_pdbs () { # [--directory=] [-- case $arch in x86_64) oarch=x86_64 - pacman_arch=x86_64 + mingw_package_prefix=mingw-w64-x86_64 artifact_suffix=64-bit ;; i686) oarch=i686 - pacman_arch=i686 + mingw_package_prefix=mingw-w64-i686 artifact_suffix=32-bit ;; aarch64) oarch=aarch64 - pacman_arch=clang-aarch64 + mingw_package_prefix=mingw-w64-clang-aarch64 artifact_suffix=arm64 ;; *) @@ -324,7 +324,7 @@ bundle_pdbs () { # [--directory=] [-- fi case "$package" in mingw-w64-*) - tar=mingw-w64-$pacman_arch-${package#mingw-w64-}-$version-any.pkg.tar.xz + tar=$mingw_package_prefix-${package#mingw-w64-}-$version-any.pkg.tar.xz dir2="/usr/src/MINGW-packages/$name" ;; *) From e5a24a4600694386d53eedb4fbe227657f191553 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 19 Jun 2026 20:57:39 +0200 Subject: [PATCH 8/9] please.sh: handle UCRT64 in bundle_pdbs The `bundle_pdbs` function strips the architecture-specific prefix from Pacman package names using sed to produce architecture-neutral names like `mingw-w64-git`. The existing alternation handled `-clang-` (for CLANGARM64) and `-` (for i686/x86_64), but not `-ucrt-` (for UCRT64). As a result, `mingw-w64-ucrt-x86_64-git` was not recognized and the function died with "Could not determine Git version". Add `-ucrt-[^-]*` to the alternation so that the two-segment `ucrt-x86_64` prefix is stripped correctly. Additionally, the `bundle_pdbs` function iterates over architectures and maps each to a `pacman_arch` and `artifact_suffix`. The previous commit fixed the package-name prefix stripping, but the architecture case block itself still lacked a `ucrt64` entry, causing "Unhandled architecture: ucrt64" when the function reached the per-architecture download loop. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- please.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/please.sh b/please.sh index 67323c7176..b0c6fd6b16 100755 --- a/please.sh +++ b/please.sh @@ -250,7 +250,7 @@ bundle_pdbs () { # [--directory=] [-- architectures="i686 x86_64 aarch64" versions="$(case $# in 0) pacman -Q;; 1) cat "$1";; esac | - sed 's/^\(mingw-w64\)\(-clang-[^-]*\|-[^-]*\)/\1/' | sort | uniq)" + sed 's/^\(mingw-w64\)\(-clang-[^-]*\|-ucrt-[^-]*\|-[^-]*\)/\1/' | sort | uniq)" test -n "$versions" || die 'Could not obtain package versions\n' @@ -294,6 +294,11 @@ bundle_pdbs () { # [--directory=] [-- mingw_package_prefix=mingw-w64-clang-aarch64 artifact_suffix=arm64 ;; + ucrt64) + oarch=x86_64 + mingw_package_prefix=mingw-w64-ucrt-x86_64 + artifact_suffix=ucrt64 + ;; *) die "Unhandled architecture: $arch" ;; From 02e46d0fd6addbc75cb1c134763d1d9f9ee45562 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 20 Jun 2026 10:18:37 +0200 Subject: [PATCH 9/9] please.sh bundle_pdb: skip the PDBs for OpenSSL In the UCRT64 variant of the Git for Windows SDK, the `openssl` package is inherited from MSYS2, and not shadowed by Git for Windows' own built versions. The reason that Git for Windows builds its own versions of OpenSSL is historical: In the early days of MSYS2, package updates were somewhat sporadic and came in spurts, whereas the Git for Windows project needed to pick up OpenSSL updates very swiftly when this addressed vulnerabilities. In the meantime, it is the other way round: Git for Windows often lags behind MSYS2 in updating OpenSSL packages to newer versions, and therefore there is now good reason to stop shadowing MSYS2's versions, see also https://github.com/git-for-windows/git/discussions/6243. Therefore, there's absolutely no reason for the Git for Windows project to start building OpenSSL for UCRT64 only to drop it almost immediately. As a consequence, no PDB files are available for OpenSSL, and we'll simply not even try to include them. Signed-off-by: Johannes Schindelin --- please.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/please.sh b/please.sh index b0c6fd6b16..8e34c27117 100755 --- a/please.sh +++ b/please.sh @@ -298,6 +298,7 @@ bundle_pdbs () { # [--directory=] [-- oarch=x86_64 mingw_package_prefix=mingw-w64-ucrt-x86_64 artifact_suffix=ucrt64 + packages="$(echo "$packages" | sed 's/ mingw-w64-openssl-pdb//')" ;; *) die "Unhandled architecture: $arch"