Skip to content

Stop mingw-w64-git from depending on OpenSSL - #235

Merged
dscho merged 3 commits into
mainfrom
stop-git-from-depending-on-openssl
Nov 12, 2026
Merged

dscho merged 3 commits into
mainfrom
stop-git-from-depending-on-openssl

Conversation

@dscho

@dscho dscho commented Nov 7, 2026

Copy link
Copy Markdown
Member

To allow for easy upgrading OpenSSL between major versions (or, in the current instance, switching to MSYS2's version), we need to stop mingw-w64-git from depending on mingw-w64-openssl. This will fix the failure of git-sdk-arm64's check-for-missing-dlls that is caused by a naming difference between Git for Windows' and MSYS2's DLLs:

c:/a/git-sdk-arm64/git-sdk-arm64/build-installers/clangarm64/libexec/git-core/git-imap-send.exe is missing libssl-3.dll
c:/a/git-sdk-arm64/git-sdk-arm64/build-installers/clangarm64/libexec/git-core/git-imap-send.exe is missing libcrypto-3.dll

For all practical purposes, this does not change anything: The default libcurl already uses Secure Channel as SSL backend, and git imap-send is compiled to prefer using libcurl, anyway.

dscho added 2 commits November 7, 2026 10:45
In git-for-windows/git#4410, I worked around a
recurring problem where Git for Windows' automation requires `git push`
to keep working across OpenSSL updates, which at the time was a problem
because `git push` hands off to `git-remote-https.exe`, which links to
libcurl, which at the time depended directly on OpenSSL, and hence an
OpenSSL upgrade that changed the DLL file name would prevent
`git-remote-https.exe` from loading altogether!

By loading `libcurl` dynamically, and by changing the default libcurl to
depend only on Secure Channel, this problem was worked around
efficiently.

A similar problem now surfaced, however, as part of
git-for-windows/git#6452: By "unshadowing"
OpenSSL (i.e. no longer building it in Git for Windows and deploying it
to Git for Windows' Pacman repository, but instead consuming upstream
MSYS2's version directly), the inadvertent linkage of
`git-imap-send.exe` to OpenSSL is now surfaced via git-sdk-arm64's
`check-for-missing-dlls`, for details, see
https://github.com/git-for-windows/git-sdk-arm64/actions/runs/42351679729:

  c:/a/git-sdk-arm64/git-sdk-arm64/build-installers/clangarm64/libexec/git-core/git-imap-send.exe is missing libssl-3.dll
  c:/a/git-sdk-arm64/git-sdk-arm64/build-installers/clangarm64/libexec/git-core/git-imap-send.exe is missing libcrypto-3.dll

The reason is 9eaa78b0b0379 ("Makefile: link libcurl before zlib", Remi
Pommarel, 2015-10-21, which claims to be a mere refactoring, but instead
always links `git-imap-send` to OpenSSL, unconditionally. I had missed
that, and as a consequence every `git-imap-send.exe` since v2.20.0 has
linked to OpenSSL, totally unnecessarily so because they are built with
the not because it had to.

So let's just build with `NO_OPENSSL` instead; That allows us to drop
depending on `mingw-w64-openssl`.

Signed-off-by: Johannes Schindelin <[email protected]>
We need to deploy the `mingw-w64-git` package with the `NO_OPENSSL` fix,
so that git-sdk-arm64's `check-for-missing-dlls` check has a chance of
succeeding again.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho self-assigned this Nov 7, 2026
@dscho

This comment was marked as outdated.

dscho added a commit to git-for-windows/git-for-windows-automation that referenced this pull request Nov 7, 2026
Just like 5ed2273 (git-artifacts: opt out of Rust until after v2.55,
2026-06-12) edited the `git-artifacts` workflow, we need to edit
`build-and-deploy` to let the Git package be built without Rust.

It is a bit unfortunate, really, because we are _so close_ to building
_with_ Rust, but we have to rebuild one last time before that so that we
can let git-sdk-arm64's `check-for-missing-dlls` pass; for full details,
see git-for-windows/MINGW-packages#235.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho

This comment has been minimized.

This has the v2.56.1 update.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho

dscho commented Nov 12, 2026 •

Copy link
Copy Markdown
Member Author

/deploy mingw-w64-git

The i686, the x86_64, the mingw64 and the arm64 workflow runs were started.

@dscho
dscho merged commit 560c0dc into main Nov 12, 2026
5 checks passed
@dscho
dscho deleted the stop-git-from-depending-on-openssl branch November 12, 2026 13:28
dscho added a commit to git-for-windows/git-for-windows-automation that referenced this pull request Nov 26, 2026
This covers the remaining checkbox of git-for-windows/git#6276 ("Build
with the Rust bits by default") for the release builds. All the
prerequisites are now merged: git-for-windows/MINGW-packages#235 on
2026-11-12, and git-for-windows/git-sdk-64#132 and
git-for-windows/git-sdk-arm64#67 earlier today, which add the Rust
toolchain to the SDK artifacts these workflows use.

The `git-artifacts` workflows in git-sdk-64 and git-sdk-arm64 have
opt-outs of their own; those are reverted in separate PRs in those
repositories. git-sdk-32 keeps its opt-out, as there is no usable i686
Rust.
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