Skip to contentSkip to conversation

docker: Base Fedora MinGW cross containers on the base Fedora image

PATCH In review Philippe Mathieu-Daudé 2 participants 5 messages Mar 3, 2021 – Mar 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docker: Base Fedora MinGW cross containers on the base Fedora image

The only difference between fedora-winXX-cross.docker and fedora.docker is the specific QEMU_CONFIGURE_OPTS environment variable. All the rest can be inherited from the generic Fedora image.
Basing the cross containers on the generic Fedora allows us to
- save registry/local storage
- use more tools in the cross container (ccache for example).

---
 .gitlab-ci.d/containers.yml                   |  4 ++
 tests/docker/Makefile.include                 |  2 +
 .../dockerfiles/fedora-win32-cross.docker     | 41 +------------------
 .../dockerfiles/fedora-win64-cross.docker     | 37 +----------------
 4 files changed, 10 insertions(+), 74 deletions(-)
.gitlab-ci.d/containers.yml +4 -0
index 33e4046e233..1f7f82ece65 100644
@@ -222,11 +222,15 @@ i386-fedora-cross-container:
 
 win32-fedora-cross-container:
   <<: *container_job_definition
+  stage: containers-layer2
+  needs: ['amd64-fedora-container']
   variables:
     NAME: fedora-win32-cross
 
 win64-fedora-cross-container:
   <<: *container_job_definition
+  stage: containers-layer2
+  needs: ['amd64-fedora-container']
   variables:
     NAME: fedora-win64-cross
 
tests/docker/Makefile.include +2 -0
index 7cab761bf5b..5aa99df32ad 100644
@@ -144,6 +144,8 @@ docker-image-debian-riscv64-cross: docker-image-debian10
 docker-image-debian-s390x-cross: docker-image-debian10
 docker-image-debian-sh4-cross: docker-image-debian10
 docker-image-debian-sparc64-cross: docker-image-debian10
+docker-image-fedora-win32-cross: docker-image-fedora
+docker-image-fedora-win64-cross: docker-image-fedora
 
 # Specialist build images, sometimes very limited tools
 docker-image-debian-tricore-cross: docker-image-debian10
tests/docker/dockerfiles/fedora-win32-cross.docker +2 -39

43 lines not on this page · raw message

tests/docker/dockerfiles/fedora-win64-cross.docker +2 -35
index bcb428e7242..abdbce2a145 100644
@@ -1,37 +1,4 @@
-FROM fedora:33
-
-# 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 \
-    tar \
-    which
-
-RUN dnf install -y $PACKAGES
-RUN rpm -q $PACKAGES | sort > /packages.txt
-ENV FEATURES mingw
+FROM qemu/fedora
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
-ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32- --disable-capstone
+ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32- --disable-capstone
Signature · 1 line
2.26.2
#1 lore raw
Quoted 4 lines · Philippe Mathieu-Daudé

The only difference between fedora-winXX-cross.docker and fedora.docker is the specific QEMU_CONFIGURE_OPTS environment variable. All the rest can be inherited from the generic Fedora image.

This is relying on the base Fedora image already having the mingw packages installed. My series to automate creation of the container dockerfiles removes those entirely, so we have strictly separate native and mingw images for Fedora:

https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg03123.html

Quoted 11 lines

Basing the cross containers on the generic Fedora allows us to
- save registry/local storage
- use more tools in the cross container (ccache for example).

---
 .gitlab-ci.d/containers.yml                   |  4 ++
 tests/docker/Makefile.include                 |  2 +
 .../dockerfiles/fedora-win32-cross.docker     | 41 +------------------
 .../dockerfiles/fedora-win64-cross.docker     | 37 +----------------
 4 files changed, 10 insertions(+), 74 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#2 lore raw
Quoted 6 lines · Daniel P. Berrangé
Quoted 4 lines · Philippe Mathieu-Daudé

The only difference between fedora-winXX-cross.docker and fedora.docker is the specific QEMU_CONFIGURE_OPTS environment variable. All the rest can be inherited from the generic Fedora image.

Quoted 6 lines

This is relying on the base Fedora image already having the mingw packages installed. My series to automate creation of the container dockerfiles removes those entirely, so we have strictly separate native and mingw images for Fedora:

https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg03123.html

I'm a bit confused. So instead of having one single big image, you prefer to have multiple ones.

I stopped using the fedora-winXX-cross because they lacks ccache, and the "big" fedora image contains the mingwXX toolchains.

I'll wait you respin your series and test the new created containers to see if they fit my needs.

Thanks,

Phil.

#3 lore raw
Quoted 14 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Daniel P. Berrangé
Quoted 4 lines · Philippe Mathieu-Daudé

The only difference between fedora-winXX-cross.docker and fedora.docker is the specific QEMU_CONFIGURE_OPTS environment variable. All the rest can be inherited from the generic Fedora image.

Quoted 6 lines

This is relying on the base Fedora image already having the mingw packages installed. My series to automate creation of the container dockerfiles removes those entirely, so we have strictly separate native and mingw images for Fedora:

https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg03123.html

Quoted 8 lines

I'm a bit confused. So instead of having one single big image, you prefer to have multiple ones.

I stopped using the fedora-winXX-cross because they lacks ccache, and the "big" fedora image contains the mingwXX toolchains.

I'll wait you respin your series and test the new created containers to see if they fit my needs.

ccache will be present in any of the containers I auto-generate for QEMU using lcitool, as I agree its a very useful part o fthe toolchain. So when i convert the winXXX-cross containers, they'll gain ccache (and alot of other missing mingw pieces)

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#4 lore raw
Quoted 21 lines · Daniel P. Berrangé
Quoted 20 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Daniel P. Berrangé
Quoted 4 lines · Philippe Mathieu-Daudé

The only difference between fedora-winXX-cross.docker and fedora.docker is the specific QEMU_CONFIGURE_OPTS environment variable. All the rest can be inherited from the generic Fedora image.

Quoted 6 lines

This is relying on the base Fedora image already having the mingw packages installed. My series to automate creation of the container dockerfiles removes those entirely, so we have strictly separate native and mingw images for Fedora:

https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg03123.html

I'm a bit confused. So instead of having one single big image, you prefer to have multiple ones.

I stopped using the fedora-winXX-cross because they lacks ccache, and the "big" fedora image contains the mingwXX toolchains.

Quoted 7 lines
Quoted 2 lines

I'll wait you respin your series and test the new created containers to see if they fit my needs.

ccache will be present in any of the containers I auto-generate for QEMU using lcitool, as I agree its a very useful part o fthe toolchain. So when i convert the winXXX-cross containers, they'll gain ccache (and alot of other missing mingw pieces)

Cool, looking forward to QEMU using lcitool :)