msys2.github.io icon indicating copy to clipboard operation
msys2.github.io copied to clipboard

Please improve packaging documentation (context, testing)

Open eudoxos opened this issue 4 years ago • 2 comments
trafficstars

The Creating Packages page is missing a few poins which would be worth documenting:

  • starting context: for those who have not packaged anything yet (e.g. how to obtain makepkg and makepkg-mingw, does it run under Windows, under Linux, or is it Arch-only?).
  • testing the package: can I test the packaging under Linux? Is there a docker image ready for that?

I am running the crossroad cross-build environment and would like to test a new PKGBUILD (before creating the PR for it) locally, running Ubuntu (or Docker or anything else).

eudoxos avatar Feb 27 '21 12:02 eudoxos

It never occurred to me that the context could be unobvious.

Unfortunately, unless you have a Windows VM, testing under Linux is AFAIK impossible. The Cygwin (and therefore MSYS2) under Wine combo has been broken for quite some time. Cross building is possible, but doesn't actually tell you much about how the build will behave natively (that's true in general, but even more so for Cygwin which is more of a POSIX system than a Linux one, and even more so for MSYS2 with its automagic).

elieux avatar Feb 28 '21 09:02 elieux

Although it's not a thorough explanation about PKGBUILD recipes, there is now a ready-to-use example in msys2/setup-msys2: examples. That shows how to test a PKGBUILD recipe in CI.

eine avatar Jul 19 '21 14:07 eine