new(winehq.org): headless wine for Windows-binary CI testing#12986
new(winehq.org): headless wine for Windows-binary CI testing#12986tannevaled wants to merge 4 commits into
Conversation
Minimal headless wine build — no X11, no OpenGL, no audio, 64-bit only, no wine tests. Aimed at the use case described in pkgxdev#12985 and the brewkit#346 RFC: run cross-compiled .exe files inside brewkit's Linux test sandbox to validate native-Windows pantry recipes. What it provides: - bin/wine, bin/wine64 (the runtime) - bin/winepath (path-translation helper) - bin/wineserver (the wine background service) - bin/winecfg (mostly stub-useful, included for completeness) What it does NOT support: - GUI apps (no X11) - 3D / Vulkan / OpenGL - Audio (ALSA, Pulse, OSS all disabled) - Multimedia (SDL, gstreamer disabled) - Peripherals (USB, CUPS, gphoto, V4L2, SANE all disabled) - 32-bit Win binaries (--enable-archs=x86_64 only) - Wine's own test suite (--disable-tests) Pilot platform: linux/x86-64 only. linux/aarch64 + darwin/* are follow-ups (wine-side complications: aarch64 needs qemu-user or hangover for x86-64 Win binaries; darwin needs the macOS-32-bit dance). Test step: `wine64 --version` returns "wine-X.Y" — proves the binary loads + can run a basic console command. Recipes that depend on wine (starting with pkgxdev#12984's llvm-mingw test step) get the full runtime check for free. Refs: pkgxdev#12985 (this issue), pkgxdev/brewkit#346 (RFC).
… .../X.x/, broke URL template
Brewkit's github: codepath silently ignores match:, so my previous regex didn't filter anything — pantry picked wine-11.9 (dev release) which lives in dl.winehq.org/source/11.x/, not /11.0/, so the URL template 404'd. Switch to url: mode (same shape as gnu.org/glibc): url: https://dl.winehq.org/wine/source/ match: /\d{2,}\.0\// # only stable major-version directories strip: /\// Picks the latest stable (currently wine-11.0). Excludes 11.x/ dev release dirs because match looks for an exact \d.0/ pattern.
CI surface: `configure: error: x86_64 PE cross-compiler not found` because --enable-archs=x86_64 implicitly requires a mingw cross- compiler on PATH (to build wine's Windows-side DLLs from source). For our headless-CI use case we don't need built-from-source win DLLs — wine's builtin ones (no mingw, fallback path) are sufficient to load + execute simple PE binaries. Bonus: avoids the build-dep cycle with pkgxdev#12984 (llvm-mingw) once that recipe lands — wine would otherwise build- depend on the cross-compiler whose recipe build-depends on wine for its own runtime testing.
|
Round 3 finding: wine is also blocked on #12968.
That makes sense: wine MUST build its own Windows-side DLLs (kernel32, ntdll, …) for the requested target arch, because those DLLs interpose Windows API calls into Linux syscalls. There's no "ship without Windows-side DLLs" path. So wine builds need a mingw cross-compiler. Adding So this PR's full unblock chain is #12968 → #12984 → this. For now: leaving the recipe with the current (Side note: |
Closes #12985.
What
Adds a
winehq.orgrecipe — a minimal headless build of Wine sufficient to run console-only Windows binaries on a Linux host. Pilot scope: linux/x86-64 only.Why
Unblocks #12984 (
llvm.org/mingw-w64) — that recipe's test step is already wired with a soft-dep onwinehq.org, so once this lands the cross-compile pilot upgrades from "PE magic-byte check" to "actually run the .exe and assert stdout". More broadly: any future Windows-targeting pantry recipe gets real runtime tests in the existing Linux CI infra (no GitHub Windows runners needed).Architecture context: pkgxdev/brewkit#346 RFC.
Build configuration
Stripped down to the minimum needed for CLI tool execution:
--enable-archs=x86_64--disable-tests--without-x--without-opengl --without-osmesa --without-vulkan--without-alsa --without-pulse --without-oss--without-sdl --without-gstreamer--without-cups --without-gphoto --without-usb --without-v4l2 --without-sane --without-udev --without-pcap--without-fontconfig --without-krb5 --without-capi --without-cmsBuild deps from pantry:
gnu.org/bison,github.com/westes/flex,perl.org,gnu.org/gettext,freetype.org,gnutls.org,zlib.net, plus the toolchain (gnu.org/{make,gcc,binutils}).Test
wine64 --version # expects "wine-X.Y"That's all. Anything more substantive belongs in consumer recipes (e.g.,
llvm-mingwruns hello.exe through wine).Limitations / future work
--with-mingwproduces wine with better Windows compat for the win-side DLLs, but requires a Linux-hosted mingw toolchain present at wine build time (which we now have via new(llvm.org/mingw-w64): LLVM-based mingw-w64 cross-compiler (Windows-target toolchain) #12984). Possible follow-up to unlock harder-to-emulate APIs.Test plan
wine64 --versionreturnswine-11.0(or whatever stable is at build time)hello.exethrough this wine when both PRs are mergedRefs: #12985 (this issue), pkgxdev/brewkit#346 (Windows port RFC), pkgxdev/pkgx#607 (platform megaticket).