Commit 4bea505
authored
Prepare for upstreaming
This PR represents step 1 of what is likely the most important part of
msys2#16383: splitting up
Git for Windows' `mingw-w64-git` into smaller, much more manageable
chunks. Step 2 will be to open a PR to add `mingw-w64-git/*` to the
upstream `MINGW-packages` repository, and step 3 will be to automate the
synchronization between MSYS2's and Git for Windows' `MINGW-packages`
repositories' `mingw-w64-git/` folders.
As far as MSYS2 is concerned, the "new", slightly trimmed-down
`mingw-w64-git` package contains exactly what I'd imagine regular MSYS2
users would want in that package: The canonical Git commands. Users who
wish to use more
As far as Git for Windows is concerned, this changes a few things:
- There is now a `mingw-w64-git-for-windows-addons` package, which
contains the Git for Windows-specific stuff like the Git wrapper and
`/git-bash.exe`; It depends on `mingw-w64-git` as well as on some other,
likewise newly-split-off packages and is meant to take on
`mingw-w64-git`'s role in Git for Windows (e.g. in
[`make-file-list.sh`](https://github.com/git-for-windows/build-extra/blob/main/make-file-list.sh),
the central script defining what goes into Git for Windows' installers).
- While some commands (e.g. `archimport`) were already excluded from Git
for Windows' installers, their documentation were still included, which
is fixed via this new split.
- This unfortunately opens Git for Windows up to be susceptible to
upstream changes like the "somewhat interestingly-executed" `.txt` ->
`.adoc` change. If there are similar upstream changes, the `PKGBUILD`
will need to be adjusted (and it is even possible to miss the need for
those adjustments, as was the case for the missing `git-bash` manual
page which necessitated the quite belated fix in #171).
I verified that the resulting packages are complete via comparing the
output of `for f in *.pkg.tar.zst; do tar tvf $f; done | cut -c 49- |
grep -ve '^\.' -e '/$' | sort | uniq` for the generated artifacts of a
local build vs those of Git for Windows v2.51.2. I also verified that no
file is included in multiple packages by appending a `-d` option to the
`uniq` invocation (which came up empty, as expected).
Note: There is a good chance that the MSYS2 project will want to have a
few changes before accepting this package definition. For example, I
could imagine that they do _not_ want to carry
`mingw-w64-git-for-windows-addons` in their Pacman repository (in which
case we'd need to guard it via an environment variable that Git for
Windows' automation then sets so that it this package gets built). Or,
they would potentially want to skip generating `.pdb` files, in which
case we'd need to flip the `WITHOUT_PDBS` logic into a `WITH_PDBS` one.
Or, they might want the `SIGNTOOL` guard to live in the `PKGBUILD` file
instead of the `mingw-w64-git.mak` file. I am prepared to make all of
those changes if asked.
Note also: I used GitHub Copilot to develop this PR in an AI-assisted
way. It was moderately successful; A large part of the changes was done
correctly, and it saved me time in the sense that I would probably have
taken about 20-40% longer (it still took me about 3x more time to clean
up the changes than it took me to develop the first iteration, but at
least that first part was kinda fun).mingw-w64-git to MSYS2 (#172)3 files changed
+385
-224
lines changed
0 commit comments