I've been poking a bit at the MSYS2 builds that <@...
# sig-release
c
I've been poking a bit at the MSYS2 builds that @Sebastian Spritzgebaeck Rakel started a few weeks ago, and I've gotten to the point where building
puppet-runtime
runs all the way through, although there's likely some missing libraries and other issues: https://github.com/Sharpie/puppet-runtime/actions/runs/26782841316/job/78951396849 The two main patch sets are for `shared-actions`: https://github.com/Sharpie/shared-actions/compare/27eb341...1f0d7eb And `puppet-runtime`: https://github.com/Sharpie/puppet-runtime/compare/b1956b1...003a5fa Key things I've figured out: • Vanagon needs to run under the
ruby
package, not
mingw-w64-ucrt-x86_64-ruby
. The UCRT package is Windows-native, which means it tries to do stuff like shell out using
cmd.exe
instead of
bash.exe
. The
ruby
package is built to run in the POSIX environment that the MSYS2 shell provides, so it behaves similar to the Cygwin
ruby
that the existing
windows-all-x64
build uses. • When using the
msys2/setup-msys
GitHub action, you end up with TWO copies of MSYS2 installed. The Windows runner image comes with one at
C:\msys64
, and the action creates a separate one at
D:\a\_temp\msys64
. This can cause a lot of confusion. For example, packages installed using
C:\msys64\usr\bin\pacman
won't show up when
vanagon
is running inside of the
msys2
shell spawned from
D:\a\_temp\msys2
. Solution is to always use UNIX paths from inside a MSYS2 shell. Some steps to get the build going on a Windows workstation: • Install MSYS2:
winget install MSYS2.MSYS2
• Launch MSYS2 with UCRT64 mode set:
C:\msys64\msys2_shell.cmd -ucrt64
• Install MSYS packages required to run `vanagon`:
pacman -S ruby make gcc git libyaml-devel
• Disable Bundler parallelism as it seems to deadlock when running under MSYS:
bundle config set --global jobs 1
• Clone my fork of the
puppet-runtime
repo, and run a build from the
msys2
branch:
Copy code
git clone <https://github.com/Sharpie/puppet-runtime>
cd puppet-runtime
git checkout msys2
bundle install
bundle exec rake vox:build[agent-runtime-main,windows-msys2-x64]
💪 2