diff mbox series

[1/7] tests/docker: Use Fedora containers for MinGW cross-builds in the gitlab-CI

Message ID 20200921174320.46062-2-thuth@redhat.com
State New
Headers show
Series Do not support Debian 9 and Python 3.5 anymore | expand

Commit Message

Thomas Huth Sept. 21, 2020, 5:43 p.m. UTC
According to our support policy, we do not support Debian 9 in QEMU
anymore, and we only support building the Windows binaries with a
very recent version of the MinGW toolchain. So we should not test
the MinGW cross-compilation with Debian 9 anymore, but switch to
something newer like Fedora. To do this, we need a separate Fedora
container for each build that provides the QEMU_CONFIGURE_OPTS
environment variable.
Unfortunately, the MinGW 64-bit compiler seems to be a little bit
slow, so we also have to disable some features like "capstone" in the
build here to make sure that the CI pipelines still finish within a
reasonable amount of time.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitlab-ci.d/containers.yml                   | 10 +++++
 .gitlab-ci.d/crossbuilds.yml                  |  4 +-
 .../dockerfiles/fedora-win32-cross.docker     | 42 +++++++++++++++++++
 .../dockerfiles/fedora-win64-cross.docker     | 38 +++++++++++++++++
 4 files changed, 92 insertions(+), 2 deletions(-)
 create mode 100644 tests/docker/dockerfiles/fedora-win32-cross.docker
 create mode 100644 tests/docker/dockerfiles/fedora-win64-cross.docker

Comments

Daniel P. Berrangé Sept. 21, 2020, 6:03 p.m. UTC | #1
On Mon, Sep 21, 2020 at 07:43:14PM +0200, Thomas Huth wrote:
> According to our support policy, we do not support Debian 9 in QEMU

> anymore, and we only support building the Windows binaries with a

> very recent version of the MinGW toolchain. So we should not test

> the MinGW cross-compilation with Debian 9 anymore, but switch to

> something newer like Fedora. To do this, we need a separate Fedora

> container for each build that provides the QEMU_CONFIGURE_OPTS

> environment variable.

> Unfortunately, the MinGW 64-bit compiler seems to be a little bit

> slow, so we also have to disable some features like "capstone" in the

> build here to make sure that the CI pipelines still finish within a

> reasonable amount of time.

> 

> Signed-off-by: Thomas Huth <thuth@redhat.com>

> ---

>  .gitlab-ci.d/containers.yml                   | 10 +++++

>  .gitlab-ci.d/crossbuilds.yml                  |  4 +-

>  .../dockerfiles/fedora-win32-cross.docker     | 42 +++++++++++++++++++

>  .../dockerfiles/fedora-win64-cross.docker     | 38 +++++++++++++++++

>  4 files changed, 92 insertions(+), 2 deletions(-)

>  create mode 100644 tests/docker/dockerfiles/fedora-win32-cross.docker

>  create mode 100644 tests/docker/dockerfiles/fedora-win64-cross.docker

> 

> diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml

> index 8c89efeb6d..15e7b564f9 100644

> --- a/.gitlab-ci.d/containers.yml

> +++ b/.gitlab-ci.d/containers.yml

> @@ -248,6 +248,16 @@ i386-fedora-cross-container:

>    variables:

>      NAME: fedora-i386-cross

>  

> +win32-fedora-cross-container:

> +  <<: *container_job_definition

> +  variables:

> +    NAME: fedora-win32-cross

> +

> +win64-fedora-cross-container:

> +  <<: *container_job_definition

> +  variables:

> +    NAME: fedora-win64-cross

> +

>  amd64-ubuntu1804-container:

>    <<: *container_job_definition

>    variables:

> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml

> index 4ec7226b5c..510cfec03b 100644

> --- a/.gitlab-ci.d/crossbuilds.yml

> +++ b/.gitlab-ci.d/crossbuilds.yml

> @@ -105,9 +105,9 @@ cross-s390x-user:

>  cross-win32-system:

>    <<: *cross_system_build_job_definition

>    variables:

> -    IMAGE: debian-win32-cross

> +    IMAGE: fedora-win32-cross

>  

>  cross-win64-system:

>    <<: *cross_system_build_job_definition

>    variables:

> -    IMAGE: debian-win64-cross

> +    IMAGE: fedora-win64-cross

> diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker

> new file mode 100644

> index 0000000000..5903e1b0b4

> --- /dev/null

> +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker

> @@ -0,0 +1,42 @@

> +FROM fedora:32

> +

> +# Please keep this list sorted alphabetically

> +ENV PACKAGES \

> +    bc \

> +    bzip2 \

> +    diffutils \

> +    findutils \

> +    gcc \

> +    gettext \

> +    git \

> +    hostname \

> +    make \

> +    meson \

> +    mingw32-bzip2 \

> +    mingw32-curl \

> +    mingw32-glib2 \

> +    mingw32-gmp \

> +    mingw32-gnutls \

> +    mingw32-gtk3 \

> +    mingw32-libjpeg-turbo \

> +    mingw32-libpng \

> +    mingw32-libtasn1 \

> +    mingw32-nettle \

> +    mingw32-nsis \

> +    mingw32-pixman \

> +    mingw32-pkg-config \

> +    mingw32-SDL2 \


It feels like we could be removing the mingw packages from the
main fedora.docker now, so it results in smaller images.


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 :|
Thomas Huth Sept. 21, 2020, 6:07 p.m. UTC | #2
On 21/09/2020 20.03, Daniel P. Berrangé wrote:
> On Mon, Sep 21, 2020 at 07:43:14PM +0200, Thomas Huth wrote:

>> According to our support policy, we do not support Debian 9 in QEMU

>> anymore, and we only support building the Windows binaries with a

>> very recent version of the MinGW toolchain. So we should not test

>> the MinGW cross-compilation with Debian 9 anymore, but switch to

>> something newer like Fedora. To do this, we need a separate Fedora

>> container for each build that provides the QEMU_CONFIGURE_OPTS

>> environment variable.

>> Unfortunately, the MinGW 64-bit compiler seems to be a little bit

>> slow, so we also have to disable some features like "capstone" in the

>> build here to make sure that the CI pipelines still finish within a

>> reasonable amount of time.

>>

>> Signed-off-by: Thomas Huth <thuth@redhat.com>

>> ---

>>  .gitlab-ci.d/containers.yml                   | 10 +++++

>>  .gitlab-ci.d/crossbuilds.yml                  |  4 +-

>>  .../dockerfiles/fedora-win32-cross.docker     | 42 +++++++++++++++++++

>>  .../dockerfiles/fedora-win64-cross.docker     | 38 +++++++++++++++++

>>  4 files changed, 92 insertions(+), 2 deletions(-)

>>  create mode 100644 tests/docker/dockerfiles/fedora-win32-cross.docker

>>  create mode 100644 tests/docker/dockerfiles/fedora-win64-cross.docker

>>

>> diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml

>> index 8c89efeb6d..15e7b564f9 100644

>> --- a/.gitlab-ci.d/containers.yml

>> +++ b/.gitlab-ci.d/containers.yml

>> @@ -248,6 +248,16 @@ i386-fedora-cross-container:

>>    variables:

>>      NAME: fedora-i386-cross

>>  

>> +win32-fedora-cross-container:

>> +  <<: *container_job_definition

>> +  variables:

>> +    NAME: fedora-win32-cross

>> +

>> +win64-fedora-cross-container:

>> +  <<: *container_job_definition

>> +  variables:

>> +    NAME: fedora-win64-cross

>> +

>>  amd64-ubuntu1804-container:

>>    <<: *container_job_definition

>>    variables:

>> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml

>> index 4ec7226b5c..510cfec03b 100644

>> --- a/.gitlab-ci.d/crossbuilds.yml

>> +++ b/.gitlab-ci.d/crossbuilds.yml

>> @@ -105,9 +105,9 @@ cross-s390x-user:

>>  cross-win32-system:

>>    <<: *cross_system_build_job_definition

>>    variables:

>> -    IMAGE: debian-win32-cross

>> +    IMAGE: fedora-win32-cross

>>  

>>  cross-win64-system:

>>    <<: *cross_system_build_job_definition

>>    variables:

>> -    IMAGE: debian-win64-cross

>> +    IMAGE: fedora-win64-cross

>> diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker

>> new file mode 100644

>> index 0000000000..5903e1b0b4

>> --- /dev/null

>> +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker

>> @@ -0,0 +1,42 @@

>> +FROM fedora:32

>> +

>> +# Please keep this list sorted alphabetically

>> +ENV PACKAGES \

>> +    bc \

>> +    bzip2 \

>> +    diffutils \

>> +    findutils \

>> +    gcc \

>> +    gettext \

>> +    git \

>> +    hostname \

>> +    make \

>> +    meson \

>> +    mingw32-bzip2 \

>> +    mingw32-curl \

>> +    mingw32-glib2 \

>> +    mingw32-gmp \

>> +    mingw32-gnutls \

>> +    mingw32-gtk3 \

>> +    mingw32-libjpeg-turbo \

>> +    mingw32-libpng \

>> +    mingw32-libtasn1 \

>> +    mingw32-nettle \

>> +    mingw32-nsis \

>> +    mingw32-pixman \

>> +    mingw32-pkg-config \

>> +    mingw32-SDL2 \

> 

> It feels like we could be removing the mingw packages from the

> main fedora.docker now, so it results in smaller images.


I wasn't quite sure whether anybody uses the mingw packages in that main
fedora docker image ... Philippe, do you know?

 Thomas
Daniel P. Berrangé Sept. 22, 2020, 8:21 a.m. UTC | #3
On Mon, Sep 21, 2020 at 08:07:42PM +0200, Thomas Huth wrote:
> On 21/09/2020 20.03, Daniel P. Berrangé wrote:

> > On Mon, Sep 21, 2020 at 07:43:14PM +0200, Thomas Huth wrote:

> >> According to our support policy, we do not support Debian 9 in QEMU

> >> anymore, and we only support building the Windows binaries with a

> >> very recent version of the MinGW toolchain. So we should not test

> >> the MinGW cross-compilation with Debian 9 anymore, but switch to

> >> something newer like Fedora. To do this, we need a separate Fedora

> >> container for each build that provides the QEMU_CONFIGURE_OPTS

> >> environment variable.

> >> Unfortunately, the MinGW 64-bit compiler seems to be a little bit

> >> slow, so we also have to disable some features like "capstone" in the

> >> build here to make sure that the CI pipelines still finish within a

> >> reasonable amount of time.

> >>

> >> Signed-off-by: Thomas Huth <thuth@redhat.com>

> >> ---

> >>  .gitlab-ci.d/containers.yml                   | 10 +++++

> >>  .gitlab-ci.d/crossbuilds.yml                  |  4 +-

> >>  .../dockerfiles/fedora-win32-cross.docker     | 42 +++++++++++++++++++

> >>  .../dockerfiles/fedora-win64-cross.docker     | 38 +++++++++++++++++

> >>  4 files changed, 92 insertions(+), 2 deletions(-)

> >>  create mode 100644 tests/docker/dockerfiles/fedora-win32-cross.docker

> >>  create mode 100644 tests/docker/dockerfiles/fedora-win64-cross.docker

> >>

> >> diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml

> >> index 8c89efeb6d..15e7b564f9 100644

> >> --- a/.gitlab-ci.d/containers.yml

> >> +++ b/.gitlab-ci.d/containers.yml

> >> @@ -248,6 +248,16 @@ i386-fedora-cross-container:

> >>    variables:

> >>      NAME: fedora-i386-cross

> >>  

> >> +win32-fedora-cross-container:

> >> +  <<: *container_job_definition

> >> +  variables:

> >> +    NAME: fedora-win32-cross

> >> +

> >> +win64-fedora-cross-container:

> >> +  <<: *container_job_definition

> >> +  variables:

> >> +    NAME: fedora-win64-cross

> >> +

> >>  amd64-ubuntu1804-container:

> >>    <<: *container_job_definition

> >>    variables:

> >> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml

> >> index 4ec7226b5c..510cfec03b 100644

> >> --- a/.gitlab-ci.d/crossbuilds.yml

> >> +++ b/.gitlab-ci.d/crossbuilds.yml

> >> @@ -105,9 +105,9 @@ cross-s390x-user:

> >>  cross-win32-system:

> >>    <<: *cross_system_build_job_definition

> >>    variables:

> >> -    IMAGE: debian-win32-cross

> >> +    IMAGE: fedora-win32-cross

> >>  

> >>  cross-win64-system:

> >>    <<: *cross_system_build_job_definition

> >>    variables:

> >> -    IMAGE: debian-win64-cross

> >> +    IMAGE: fedora-win64-cross

> >> diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker

> >> new file mode 100644

> >> index 0000000000..5903e1b0b4

> >> --- /dev/null

> >> +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker

> >> @@ -0,0 +1,42 @@

> >> +FROM fedora:32

> >> +

> >> +# Please keep this list sorted alphabetically

> >> +ENV PACKAGES \

> >> +    bc \

> >> +    bzip2 \

> >> +    diffutils \

> >> +    findutils \

> >> +    gcc \

> >> +    gettext \

> >> +    git \

> >> +    hostname \

> >> +    make \

> >> +    meson \

> >> +    mingw32-bzip2 \

> >> +    mingw32-curl \

> >> +    mingw32-glib2 \

> >> +    mingw32-gmp \

> >> +    mingw32-gnutls \

> >> +    mingw32-gtk3 \

> >> +    mingw32-libjpeg-turbo \

> >> +    mingw32-libpng \

> >> +    mingw32-libtasn1 \

> >> +    mingw32-nettle \

> >> +    mingw32-nsis \

> >> +    mingw32-pixman \

> >> +    mingw32-pkg-config \

> >> +    mingw32-SDL2 \

> > 

> > It feels like we could be removing the mingw packages from the

> > main fedora.docker now, so it results in smaller images.

> 

> I wasn't quite sure whether anybody uses the mingw packages in that main

> fedora docker image ... Philippe, do you know?


A actually patchew uses this  "docker-mingw@fedora".

So I guess we merge this one. Then update patchew, then delete the
mingw stuff from @fedora.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>



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 :|
diff mbox series

Patch

diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index 8c89efeb6d..15e7b564f9 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -248,6 +248,16 @@  i386-fedora-cross-container:
   variables:
     NAME: fedora-i386-cross
 
+win32-fedora-cross-container:
+  <<: *container_job_definition
+  variables:
+    NAME: fedora-win32-cross
+
+win64-fedora-cross-container:
+  <<: *container_job_definition
+  variables:
+    NAME: fedora-win64-cross
+
 amd64-ubuntu1804-container:
   <<: *container_job_definition
   variables:
diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
index 4ec7226b5c..510cfec03b 100644
--- a/.gitlab-ci.d/crossbuilds.yml
+++ b/.gitlab-ci.d/crossbuilds.yml
@@ -105,9 +105,9 @@  cross-s390x-user:
 cross-win32-system:
   <<: *cross_system_build_job_definition
   variables:
-    IMAGE: debian-win32-cross
+    IMAGE: fedora-win32-cross
 
 cross-win64-system:
   <<: *cross_system_build_job_definition
   variables:
-    IMAGE: debian-win64-cross
+    IMAGE: fedora-win64-cross
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
new file mode 100644
index 0000000000..5903e1b0b4
--- /dev/null
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -0,0 +1,42 @@ 
+FROM fedora:32
+
+# Please keep this list sorted alphabetically
+ENV PACKAGES \
+    bc \
+    bzip2 \
+    diffutils \
+    findutils \
+    gcc \
+    gettext \
+    git \
+    hostname \
+    make \
+    meson \
+    mingw32-bzip2 \
+    mingw32-curl \
+    mingw32-glib2 \
+    mingw32-gmp \
+    mingw32-gnutls \
+    mingw32-gtk3 \
+    mingw32-libjpeg-turbo \
+    mingw32-libpng \
+    mingw32-libtasn1 \
+    mingw32-nettle \
+    mingw32-nsis \
+    mingw32-pixman \
+    mingw32-pkg-config \
+    mingw32-SDL2 \
+    perl \
+    perl-Test-Harness \
+    python3 \
+    python3-PyYAML \
+    python3-setuptools \
+    tar \
+    which
+
+RUN dnf install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
+ENV FEATURES mingw
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=i686-w64-mingw32-
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
new file mode 100644
index 0000000000..7f03cd8ffc
--- /dev/null
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -0,0 +1,38 @@ 
+FROM fedora:32
+
+# Please keep this list sorted alphabetically
+ENV PACKAGES \
+    bc \
+    bzip2 \
+    diffutils \
+    findutils \
+    gcc \
+    gettext \
+    git \
+    hostname \
+    make \
+    meson \
+    mingw64-bzip2 \
+    mingw64-curl \
+    mingw64-glib2 \
+    mingw64-gmp \
+    mingw64-gtk3 \
+    mingw64-libjpeg-turbo \
+    mingw64-libpng \
+    mingw64-libtasn1 \
+    mingw64-pixman \
+    mingw64-pkg-config \
+    perl \
+    perl-Test-Harness \
+    python3 \
+    python3-PyYAML \
+    python3-setuptools \
+    tar \
+    which
+
+RUN dnf install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
+ENV FEATURES mingw
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32- --disable-capstone