Skip to content

build-installers: include /etc/msystem.d when available #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

dscho
Copy link
Member

@dscho dscho commented Jun 3, 2025

In #622, I fixed the NuGet package build, but that fix re-broke the aarch64 installer (and my testing on x64 -- as I have no Windows/ARM64 hardware -- was fooled by an unrelated fix that hid the bug).

@dscho dscho self-assigned this Jun 3, 2025
@dscho dscho marked this pull request as draft June 3, 2025 13:48
In 8316103 (make-file-list: unbreak `nuget/release.sh`, 2025-06-03), I
introduced a check for that directory; Contingent on this, its contents
are included in the file list that is used to build the installers.

However, we need to imitate 2141a50 (make-file-list: do not expect
/etc/bash.bash_logout to exist, 2025-02-26). That commit guarantees that
the `bash_logout` file is checked out if it exists in the HEAD revision
(so that the check for its presence in `make-file-list.sh` will not fail
by mistake). Likewise, we need to ensure that `/etc/msystem.d/` is
checked out (if it exists in HEAD).

This bug prevented the Windows/ARM64 variant of Git for Windows'
installer from containing the `/etc/msystem.d/` directory, which
results in the annoying error message "bash: /etc/msystem.d/MSYS: No
such file or directory" when running a Git Bash. Thanks to the extra
special `/clangarm64` logic in the Git wrapper, it is merely an
annoyance but does not break anything.

This bug was hidden in the x64 build due to an unrelated change that
fixed the build of the i686 `mingw-w64-git` package in `git-sdk-64`:
git-for-windows/git-sdk-64@c3dc3a1bdcc9. This
commit was done in reaction to the `git-artifacts` build failure at
https://github.com/git-for-windows/git-sdk-64/actions/runs/15236505205/job/42851060773#step:10:207
where the `PATH` variable was not set up in accordance with
`MSYSTEM=MINGW32` and therefore built the x64 variant by mistake when
it should have built the x86 variant. The fix was to ensure that
`/etc/msystem.d/` is included in `build-installers`, which kind of
worked around the problem with the x64 build, but in a fragile way:
Once we stop building the x86 MINGW packages in git-sdk-64, we can drop
all of the x86 bits in git-sdk-64, including `makepkg-git-i686`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the let-build-installers-include-msystem.d-when-available branch from aa0ae0e to 5957537 Compare June 3, 2025 15:24
@dscho dscho marked this pull request as ready for review June 3, 2025 15:33
@dscho dscho merged commit 97906c1 into main Jun 5, 2025
17 checks passed
@dscho dscho deleted the let-build-installers-include-msystem.d-when-available branch June 5, 2025 13:50
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