Skip to content

make-file-list: fail loudly when listing package files fails - #768

Merged
dscho merged 4 commits into
mainfrom
fix-make-file-list-abort
Nov 9, 2026
Merged

dscho merged 4 commits into
mainfrom
fix-make-file-list-abort

Conversation

@dscho

@dscho dscho commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

make-file-list.sh is the single source of truth for which files end up in each Git for Windows installer artifact. Under certain circumstances that should not happen, the script tries to install Pacman packages (see #767 for a recent example).

With Git for Windows' current automation (e.g. the ci-artifacts workflow that produces the build-installers artifact), that fails because the script is run in a highly-incomplete sparse checkout (its job in that setting is, after all, to make that incomplete sparse checkout complete). Therefore that pacman invocation had to fail. But the script continued as if everything were dandy, and produced an incomplete build-installers artifact.

Let's fix the script so that it fails when that pacman invocation failed, as was my original intention.

Since this PR build would fail otherwise, let's also adjust the check-for-missing-dlls script to accommodate for Git for Windows' switch from home-built libopenssl to the upstream MSYS2 version.

Finally, since zlib changed their DLL name (in a way where the current git.exe still links to zlib1.dll, and that works because it is still installed, but a newly-built git.exe will link to libz-1.dll, and that DLL is installed, too), which requires yet another patch to adapt the make-file-list and check-for-missing-dlls scripts.

`make-file-list.sh` is the single source of truth for which files end up
in each Git for Windows installer artifact. While every caller guards
the invocation with `|| die "Could not generate file list"`, the script
reports success even when it had failed executing `pacman`, so a
truncated file list was handed to the packaging steps as if it were
complete.

This is not theoretical. In the `build-installers` SDK artifact build, a
recent package replacement (`docx2txt` to `docx2txt-rs`) sent the script
down its `pacman -Sy` path for the first time in a long while. See
#767 for the fix that
makes that `pacman -Sy` call dormant again.

That code path path failed with `GPGME error: Invalid crypto engine`,
because the sparse checkout of the SDK is too incomplete to actually run
GPG. Instead of failing, the script produced a heavily incomplete list
and exited with status 0 (pretending success).

Let's check carefully when the `pacman` invocations fail.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
dscho force-pushed the fix-make-file-list-abort branch from 9db6c06 to 3c366c1 Compare November 7, 2026 10:17
dscho added 3 commits November 7, 2026 11:28
In 8b24519 (check-for-missing-dlls: expect OpenSSL modules not to be
linked to .exe files, 2023-06-23), I special-cased `mingw-w64-openssl`'s
legacy DLL that is meant to be loaded at runtime.

Now that Git for Windows switched to the upstream MSYS2 version of
OpenSSL, the same pattern surfaces for the MSYS `libopenssl` package.

So let's repeat that exercise.

Signed-off-by: Johannes Schindelin <[email protected]>
In 02e46d0 (please.sh bundle_pdb: skip the PDBs for OpenSSL,
2026-06-20), I special-cased the UCRT64 variant, which at the time
consumed the upstream MSYS2 `mingw-w64-openssl`.

As of git-for-windows/git#6452, Git for
Windows now _switched_ to that upstream `mingw-w64-openssl`, which means
that we no longer have any PDBs for that package.

Side note: Those PDBs were no longer all that useful ever since Git for
Windows switched its default SSL backend to Secure Channel, therefore
this change is not losing much of anything, practically speaking.

Signed-off-by: Johannes Schindelin <[email protected]>
One of the breaking changes of zlib 1.4 is that the library was renamed
from `zlib1.dll` to `libz-1.dll` (and, `libzlibwapi.dll` is now
installed, too, unmentioned in https://zlib.net/ChangeLog.txt).

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
dscho marked this pull request as ready for review November 9, 2026 09:43
@dscho
dscho merged commit b67001f into main Nov 9, 2026
22 checks passed
@dscho
dscho deleted the fix-make-file-list-abort branch November 9, 2026 09:58
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