Skip to content

Conversation

dscho
Copy link
Member

@dscho dscho commented Feb 5, 2025

The idea of having git-sdk-* repositories that track full MSYS2 environments is not only to have a convenient and fast way to bootstrap a build environment in which to build and release Git for Windows, it also enables straight-forward processes for embargoed builds, where we have to "time-travel" back to the state from which the preceding version was built and assembled.

To guarantee that this time traveling continues to work, the build process of a regular Git for Windows release must be prevented from "conveniently" installing missing dependencies; If they are not part of the git-sdk-* repository (or not in the build-installers sparse checkout), that needs to be changed before releasing, so that the embargoed release process can continue to work as intended.

…lled

The idea of having `git-sdk-*` repositories that track full MSYS2
environments is not only to have a convenient and fast way to bootstrap
a build environment in which to build and release Git for Windows, it
also enables straight-forward processes for embargoed builds, where we
have to "time-travel" back to the state from which the preceding version
was built and assembled.

To guarantee that this time traveling continues to work, the build
process of a regular Git for Windows release must be prevented from
"conveniently" installing missing dependencies; If they are not part of
the `git-sdk-*` repository (or not in the `build-installers` sparse
checkout), that needs to be changed before releasing, so that the
embargoed release process can continue to work as intended.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho self-assigned this Feb 5, 2025
dscho added a commit to dscho/git-sdk-64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-arm64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-32 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-arm64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-arm64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-arm64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-arm64 that referenced this pull request Feb 5, 2025
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho requested review from mjcheetham and rimrul February 5, 2025 15:24
@dscho
Copy link
Member Author

dscho commented Feb 5, 2025

I verified that this works in git-sdk-64, and in git-sdk-32, and in git-sdk-arm64 (for some reason, in git-sdk-arm64 the installer failed to overwrite the already-existing uninstaller, but the rest of the build worked).

@dscho dscho marked this pull request as ready for review February 5, 2025 15:24
Copy link
Member

@mjcheetham mjcheetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the new --maybe-sync option will be added in a related PR where necessary?

@dscho
Copy link
Member Author

dscho commented Feb 5, 2025

I assume the new --maybe-sync option will be added in a related PR where necessary?

It won't actually be necessary, I expect. I just added this option in case somebody relies on the -s --noconfirm stanza in any existing scenario (which I doubt).

@dscho dscho merged commit e8e15c2 into git-for-windows:main Feb 5, 2025
6 checks passed
@dscho dscho deleted the building-mingw-w64-git-should-not-need-to-install-dependencies branch February 5, 2025 18:20
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Feb 6, 2025
As described in commit 8d456a7 of
PR git-lfs#5879, we currently depend on the Git for Windows SDK to install
a version of the "prove" command from Perl Test::Harness distribution,
because we use that command to run our suite of shell tests.

However, in our CI jobs on Windows, the SDK does not at present install
the "prove" command into a location listed in the PATH environment variable,
so these CI jobs having begun failing.

This change may be related to the recent migration of the SDK's
release artifacts to GitHub from Azure Blobs, as outlined in
PR git-for-windows/git-for-windows-automation#109, and is possibly
a consequence of PR git-for-windows/build-extra#588.

Regardless, the "prove" command is fortunately still included in the
"minimal" flavour of the SDK, since it is listed in the manifest for
that flavour:

  https://github.com/git-for-windows/git-sdk-64/blob/f845bb725e56e058a0fbf93aba18c70906a1068e/.sparse/minimal-sdk#L188

We simply need to ensure that the directory in which the command is
now located, namely /usr/bin/core_perl, is added to the set of paths
in the PATH variable for the Git Bash environment.

Note that we only need to add this extra path to PATH when we are
running our script/cibuild script, as that runs the default recipe
from our t/Makefile file, which in turn executes the "test" recipe,
which uses the "prove" command to run and summarize all our shell
test scripts.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Feb 6, 2025
As described in commit 8d456a7 of
PR git-lfs#5879, we currently depend on the Git for Windows SDK to install a
version of the "prove" command from the Perl Test::Harness distribution,
because we use that command to run our suite of shell tests.

However, in our CI jobs on Windows, the SDK does not at present install
the "prove" command into a location listed in the PATH environment variable,
so these CI jobs having begun failing.

This change may be related to the recent migration of the SDK's
release artifacts to GitHub from Azure Blobs, as outlined in
PR git-for-windows/git-for-windows-automation#109, and is possibly
a consequence of PR git-for-windows/build-extra#588.

Regardless, the "prove" command is fortunately still included in the
"minimal" flavour of the SDK, since it is listed in the manifest for
that flavour:

  https://github.com/git-for-windows/git-sdk-64/blob/f845bb725e56e058a0fbf93aba18c70906a1068e/.sparse/minimal-sdk#L188

We simply need to ensure that the directory in which the command is
now located, namely /usr/bin/core_perl, is added to the set of paths
in the PATH variable for the Git Bash environment.

Note that we only need to add this extra path to PATH when we are
running our script/cibuild script, as that runs the default recipe
from our t/Makefile file, which in turn executes the "test" recipe,
which uses the "prove" command to run and summarize all our shell
test scripts.
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