Skip to content

make-file-list: exclude vim and nano from MinGit#686

Merged
dscho merged 3 commits intomainfrom
fix-git-artifacts-failures
Mar 25, 2026
Merged

make-file-list: exclude vim and nano from MinGit#686
dscho merged 3 commits intomainfrom
fix-git-artifacts-failures

Conversation

@dscho
Copy link
Copy Markdown
Member

@dscho dscho commented Mar 25, 2026

The recent change in 304b5f8 (please.sh build-mingw-w64-git: configure the editor explicitly, 2026-03-24) sets _DEFAULT_EDITOR=vim when building the mingw-w64-git package. The MINGW-packages PKGBUILD uses this variable for two purposes: configuring Git's default editor at build time, and adding the corresponding package as a hard dependency.

As a consequence, pactree now resolves vim as a transitive dependency of mingw-w64-x86_64-git. The vim package contributes 2,312 files (mostly syntax highlighting under usr/share/vim/), adding roughly 93 KB to the argument string that release.sh passes to 7z on line 176. The total command line reaches about 104 KB, far exceeding the ~32 KB ARG_MAX limit on MSYS2, and 7z fails with "Argument list too long", as seen in https://github.com/git-for-windows/git-sdk-64/actions/runs/23514237228/job/68444863860.

MinGit is intentionally minimal and has no use for an interactive editor. This excludes both vim and nano (the MSYS2 default editor) from the MINIMAL_GIT package set so that neither can inflate the file list, regardless of which _DEFAULT_EDITOR value is configured.

The recent change in 304b5f8 (please.sh build-mingw-w64-git:
configure the editor explicitly, 2026-03-24) sets `_DEFAULT_EDITOR=vim`
when building the `mingw-w64-git` package. The MINGW-packages PKGBUILD
uses this variable for two purposes: configuring Git's default editor at
build time, and adding the corresponding package as a hard dependency.

As a consequence, `pactree` now resolves `vim` as a transitive
dependency of `mingw-w64-x86_64-git`. The `vim` package contributes
2,312 files (mostly syntax highlighting under `usr/share/vim/`),
adding roughly 93 KB to the argument string that `release.sh` passes
to `7z` on line 176. The total command line reaches about 104 KB,
far exceeding the approximately 32 KB `ARG_MAX` limit on MSYS2, and
`7z` fails with "Argument list too long", as seen in
https://github.com/git-for-windows/git-sdk-64/actions/runs/23514237228/job/68444863860.

MinGit is intentionally minimal and has no use for an interactive
editor. Exclude both `vim` and `nano` (the MSYS2 default editor) from
the `MINIMAL_GIT` package set so that neither can inflate the file
list, regardless of which `_DEFAULT_EDITOR` value is configured.

Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho marked this pull request as draft March 25, 2026 11:07
dscho added 2 commits March 25, 2026 15:01
In June 2020, the MSYS2 project removed `msys2-runtime` from the
explicit dependency lists of all MSYS2 packages in
msys2/MSYS2-packages@19bd06b1 ("Remove
msys2-runtime dependencies"), treating it as an implicit dependency
that is always present. This affected `bash`, `coreutils`, `perl`,
and dozens of other packages.

Git for Windows was insulated from this change because it maintained
its own fork of the `perl` package (version 5.38.x), which still
declared `msys2-runtime` in its depends. Since `pactree` resolves
transitive dependencies, and perl was always in the file list, the
`msys2-runtime` files (including `cygpath.exe` and `msys-2.0.dll`)
continued to be included.

Yesterday's "Update 20 packages" commit in git-sdk-64 dropped the
Git for Windows fork of perl and unshadowed MSYS2's upstream perl
5.40.3-1, which naturally lacks the `msys2-runtime` dependency (it
was removed upstream in 2020). Since no other MSYS2 package in the
installer set declares `msys2-runtime` as an explicit dependency
either, `pactree` no longer includes it at all, and `pacman -Ql`
never queries its file list.

As a result, `cygpath.exe` and `msys-2.0.dll` are missing from the
generated file list. In the build-extra CI's `sdk-artifacts` job for
i686, the resulting `build-installers` artifact lacks `cygpath`, so
`installer/release.sh` picks up the runner's `cygpath` (which has a
different MSYS2 root), producing an absolute `etc_gitconfig` path
that gets doubled inside the generated InnoSetup `file-list.iss`:
https://github.com/git-for-windows/build-extra/actions/runs/23534669556/job/68506763078

Fix this by adding `msys2-runtime` explicitly to the base package
list in `make-file-list.sh`. It is fundamental to every MSYS2 binary
and should not rely on transitive dependency declarations that
upstream may remove at any time.

Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Commit 36ed69a (Restore the availability of 'iconv' executable,
2026-02-17) added the `iconv` package to the full installer's package
list so that `iconv.exe` would be available again for use with the
`working-tree-encoding` gitattribute. However, the `iconv` package
was split out of `libiconv` by the MSYS2 project, and MSYS2 no longer
builds i686 packages. Consequently the `iconv` package simply does
not exist for i686, and `pacman -Q` emits "error: package 'iconv' not
found" during the i686 installer build. While this error was not fatal
(pacman continues), it is confusing and will become fatal if error
handling is ever tightened.

Guard the `iconv` addition so it is only requested on architectures
where the package actually exists.

Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho marked this pull request as ready for review March 25, 2026 14:29
@dscho dscho merged commit bbe37ee into main Mar 25, 2026
21 checks passed
@dscho dscho deleted the fix-git-artifacts-failures branch March 25, 2026 14:35
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