[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: docker: support mxe-based mingw builds
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] tests: docker: support mxe-based mingw builds |
Date: |
Wed, 19 Aug 2020 12:09:54 +0100 |
User-agent: |
Mutt/1.14.5 (2020-06-23) |
On Wed, Aug 19, 2020 at 12:42:44PM +0200, Paolo Bonzini wrote:
> On 19/08/20 10:20, Daniel P. Berrangé wrote:
> > We already have docker containers with MXE based on Debian:
> >
> > debian-win32-cross.docker
> > debian-win64-cross.docker
> >
> > your image uses a different naming convention, and puts both
> > 32 and 64 bit in the same image.
>
> Yeah, that's what test-mingw expects.
Ah, I missed that.
>
> > I feel like we should have the Ubuntu variant follow the same
> > structure and naming as the Debian variant for consistency.
>
> My patch follows the Fedora variant, so that test-mingw runs. That
> ensures that NSIS is covered as well. One possibility could be:
>
> - create fedora-win*-cross dockerfiles
Yeah, I think that'd make sense, as it'd enable a simple trick we
do in libvirt.
In all the dockerfile recipe we set an env
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw32.meson"
And in other linux-cross builds, we do similar
ENV MESON_OPTS "--cross-file=i686-linux-gnu"
So now from host side can just invoke "meson $MESON_OPTS" and it will
do the right thing according to whatever the container image was
installed with, regardless of whether it is a cross, or native build.
This obviously only works if you have separate images for win32
and win64.
> - add ENV FEATURES $FEATURES mingw to the win*-cross dockerfiles
>
> - look for the feature in test-full and test-quick, and run "make
> installer" if so.
I'd suggest that "make installer" should be a part of "make" not
a separate thing that needs running manually.
eg if we're configure'ing for mingw, configure should check whether
we have the NSIS tools available and if so, then enable NSIS as a
standard build output. We could have a configure option to enable/disable
NSIS explicitly.
This eliminates the second bit of special casing for mingw
> - drop test-mingw completely, and adjust Patchew to use
> docker-test-quick@fedora-win{32,64}-cross instead
Yes, dropping test-mingw would be better, but I'm not sure you can
use 'test-quick' as that runs unit tests which would require wine
to be present. 'test-build' would be closer to what test-mingw
does.
Anyway, if the images and make rules are created & setup in a suitable
way, there should be no need to do anything special in the host side
for cross-builds - just pick the image you want and it should "just work".
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|