Skip to contentSkip to conversation

tests/docker: Debian & MXE fixes

PATCH In review Philippe Mathieu-Daudé 3 participants 15 messages Jul 15, 2019 – Sep 19, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

v2 cover tests/docker: Debian & MXE fixes

Few more patches to be able to MXE-build the NSIS installers.

The Fedora kludge is not meant for merge, but might be useful to test this series.

Based-on: [email protected]
https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg03014.html

Philippe Mathieu-Daudé (9):
tests/docker: Kludge to build the Fedora image tests/docker: Install Sphinx in the Debian images tests/docker: Install the NSIS tools in the MinGW capable images tests/docker: Set the correct cross-PKG_CONFIG_PATH in the MXE images tests/docker: Install texinfo in the Fedora image
buildsys: The NSIS Windows build requires the documentation installed
buildsys: The NSIS Windows build requires qemu-nsis.bmp installed tests/docker: Let the test-mingw test generate a NSIS installer
NSIS: Add missing firmware blobs

 Makefile                                           | 3 ++-
 qemu.nsi                                           | 3 +++
 tests/docker/dockerfiles/debian-win32-cross.docker | 6 ++++++
 tests/docker/dockerfiles/debian-win64-cross.docker | 6 ++++++
 tests/docker/dockerfiles/debian10.docker           | 1 +
 tests/docker/dockerfiles/debian9.docker            | 1 +
 tests/docker/dockerfiles/fedora.docker             | 5 ++++-
 tests/docker/test-mingw                            | 1 +
 8 files changed, 24 insertions(+), 2 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/9 tests/docker: Kludge to build the Fedora image

Rebuilding the Fedora image is failing:

  $ make docker-image-fedora V=1
  [...]
  Step 4/8 : RUN dnf install -y $PACKAGES
   ---> Running in cef9615efafb
  Fedora Modular 30 - x86_64                      2.0 MB/s | 2.7 MB     00:01
  Fedora Modular 30 - x86_64 - Updates            1.6 MB/s | 2.3 MB     00:01
  Fedora 30 - x86_64 - Updates                    6.1 MB/s |  17 MB     00:02
  Failed to synchronize cache for repo 'updates'
  Error: Failed to synchronize cache for repo 'updates'
  The command '/bin/sh -c dnf install -y $PACKAGES' returned a non-zero code: 1
  Traceback (most recent call last):
    File "./tests/docker/docker.py", line 615, in <module>
      sys.exit(main())
    File "./tests/docker/docker.py", line 611, in main
      return args.cmdobj.run(args, argv)
    File "./tests/docker/docker.py", line 413, in run
      extra_files_cksum=cksum)
    File "./tests/docker/docker.py", line 280, in build_image
      quiet=quiet)
    File "./tests/docker/docker.py", line 207, in _do_check
      return subprocess.check_call(self._command + cmd, **kwargs)
    File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'qemu:fedora', '-f', '/tmp/docker_buildbKtWAa/tmpIctHw2.docker', '/tmp/docker_buildbKtWAa']' returned non-zero exit status 1
  make: *** [tests/docker/Makefile.include:53: docker-image-fedora] Error 1

The fix found in one of the comment from this thread helped to have it working again: https://bugzilla.redhat.com/show_bug.cgi?id=1706627

---
I have no idea what it does, it just works (TM).

---
 tests/docker/dockerfiles/fedora.docker | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/fedora.docker +2 -1
index e6d39e14cb..f6be5e2dd7 100644
@@ -94,6 +94,7 @@ ENV PACKAGES \
     zlib-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 
-RUN dnf install -y $PACKAGES
+RUN echo zchunk=False >> /etc/dnf/dnf.conf
+RUN dnf clean metadata && dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
 ENV FEATURES mingw clang pyyaml asan
Signature · 1 line
2.20.1
#2 lore raw

Re: [Qemu-devel] [NOTFORMERGE PATCH v2 1/9] tests/docker: Kludge to build the Fedora image

Quoted 3 lines · Philippe Mathieu-Daudé

Rebuilding the Fedora image is failing:

  $ make docker-image-fedora V=1

Broken build state? Just do:

make docker-image-fedora V=1 NOCACHE=1

Quoted 40 lines

[...]
Step 4/8 : RUN dnf install -y $PACKAGES
---> Running in cef9615efafb

  Fedora Modular 30 - x86_64                      2.0 MB/s | 2.7 MB     00:01
  Fedora Modular 30 - x86_64 - Updates            1.6 MB/s | 2.3 MB     00:01
  Fedora 30 - x86_64 - Updates                    6.1 MB/s |  17 MB     00:02

Failed to synchronize cache for repo 'updates'
Error: Failed to synchronize cache for repo 'updates'
The command '/bin/sh -c dnf install -y $PACKAGES' returned a non-zero code: 1
Traceback (most recent call last):
File "./tests/docker/docker.py", line 615, in <module>
sys.exit(main())
File "./tests/docker/docker.py", line 611, in main
return args.cmdobj.run(args, argv)
File "./tests/docker/docker.py", line 413, in run
extra_files_cksum=cksum)
File "./tests/docker/docker.py", line 280, in build_image
quiet=quiet)
File "./tests/docker/docker.py", line 207, in _do_check
return subprocess.check_call(self._command + cmd, **kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'qemu:fedora', '-f', '/tmp/docker_buildbKtWAa/tmpIctHw2.docker', '/tmp/docker_buildbKtWAa']' returned non-zero exit status 1
make: *** [tests/docker/Makefile.include:53: docker-image-fedora] Error 1

The fix found in one of the comment from this thread helped to have it working again: https://bugzilla.redhat.com/show_bug.cgi?id=1706627

---
I have no idea what it does, it just works (TM).

---
 tests/docker/dockerfiles/fedora.docker | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/fedora.docker +0 -0
index e6d39e14cb..f6be5e2dd7 100644

tests/docker/dockerfiles/fedora.docker ENV PACKAGES \ · line 100

Quoted 8 lines
tests/docker/dockerfiles/fedora.docker +2 -1
@@ -94,6 +94,7 @@ ENV PACKAGES \
     zlib-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 
-RUN dnf install -y $PACKAGES
+RUN echo zchunk=False >> /etc/dnf/dnf.conf
+RUN dnf clean metadata && dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
 ENV FEATURES mingw clang pyyaml asan

--
Alex Bennée

#3 lore raw

Re: [Qemu-devel] [NOTFORMERGE PATCH v2 1/9] tests/docker: Kludge to build the Fedora image

Quoted 10 lines · Alex Bennée
Quoted 3 lines · Philippe Mathieu-Daudé

Rebuilding the Fedora image is failing:

  $ make docker-image-fedora V=1

Broken build state? Just do:

make docker-image-fedora V=1 NOCACHE=1

No, this doesn't help:

$ make docker-image-fedora V=1 NOCACHE=1
./tests/docker/docker.py build qemu:fedora
tests/docker/dockerfiles/fedora.docker  --no-cache --add-current-user
Sending build context to Docker daemon  4.096kB
Step 1/8 : FROM fedora:30
 ---> 9754ce14641d
Step 2/8 : ENV PACKAGES     bc     bison     bluez-libs-devel
brlapi-devel     bzip2     bzip2-devel     ccache     clang
cyrus-sasl-devel     device-mapper-multipath-devel     findutils
flex     gcc     gcc-c++     gettext     git     glib2-devel
glusterfs-api-devel     gnutls-devel     gtk3-devel     hostname
libaio-devel     libasan     libattr-devel     libblockdev-mpath-devel
   libcap-devel     libcap-ng-devel     libcurl-devel     libfdt-devel
   libiscsi-devel     libjpeg-devel     libpmem-devel     libpng-devel
   librbd-devel     libseccomp-devel     libssh-devel     libubsan
libusbx-devel     libxml2-devel     llvm     lzo-devel     make
mingw32-bzip2     mingw32-curl     mingw32-glib2     mingw32-gmp
mingw32-gnutls     mingw32-gtk3     mingw32-libjpeg-turbo
mingw32-libpng     mingw32-libtasn1     mingw32-nettle
mingw32-pixman     mingw32-pkg-config     mingw32-SDL2     mingw64-bzip2
    mingw64-curl     mingw64-glib2     mingw64-gmp     mingw64-gnutls
  mingw64-gtk3     mingw64-libjpeg-turbo     mingw64-libpng
mingw64-libtasn1     mingw64-nettle     mingw64-pixman
mingw64-pkg-config     mingw64-SDL2     ncurses-devel     nettle-devel
   nss-devel     numactl-devel     perl     perl-Test-Harness
pixman-devel     python3     python3-sphinx     PyYAML
rdma-core-devel     SDL2-devel     snappy-devel     sparse
spice-server-devel     systemd-devel     systemtap-sdt-devel     tar
 usbredir-devel     virglrenderer-devel     vte291-devel     which
xen-devel     zlib-devel
 ---> Running in dfeaaaa6bd31
Removing intermediate container dfeaaaa6bd31
 ---> 853735cf32a1
Step 3/8 : ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 ---> Running in 64af2877181d
Removing intermediate container 64af2877181d
 ---> 2cb74a994b35
Step 4/8 : RUN dnf install -y $PACKAGES
 ---> Running in 106e7fcb2900
Fedora Modular 30 - x86_64                      2.1 MB/s | 2.7 MB
00:01
Fedora Modular 30 - x86_64 - Updates            1.6 MB/s | 2.3 MB
00:01
Fedora 30 - x86_64 - Updates                    6.3 MB/s |  17 MB
00:02
Failed to synchronize cache for repo 'updates'
Error: Failed to synchronize cache for repo 'updates'
The command '/bin/sh -c dnf install -y $PACKAGES' returned a non-zero
code: 1
Quoted 53 lines
Quoted 40 lines

[...]
Step 4/8 : RUN dnf install -y $PACKAGES
---> Running in cef9615efafb

  Fedora Modular 30 - x86_64                      2.0 MB/s | 2.7 MB     00:01
  Fedora Modular 30 - x86_64 - Updates            1.6 MB/s | 2.3 MB     00:01
  Fedora 30 - x86_64 - Updates                    6.1 MB/s |  17 MB     00:02

Failed to synchronize cache for repo 'updates'
Error: Failed to synchronize cache for repo 'updates'
The command '/bin/sh -c dnf install -y $PACKAGES' returned a non-zero code: 1
Traceback (most recent call last):
File "./tests/docker/docker.py", line 615, in <module>
sys.exit(main())
File "./tests/docker/docker.py", line 611, in main
return args.cmdobj.run(args, argv)
File "./tests/docker/docker.py", line 413, in run
extra_files_cksum=cksum)
File "./tests/docker/docker.py", line 280, in build_image
quiet=quiet)
File "./tests/docker/docker.py", line 207, in _do_check
return subprocess.check_call(self._command + cmd, **kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'qemu:fedora', '-f', '/tmp/docker_buildbKtWAa/tmpIctHw2.docker', '/tmp/docker_buildbKtWAa']' returned non-zero exit status 1
make: *** [tests/docker/Makefile.include:53: docker-image-fedora] Error 1

The fix found in one of the comment from this thread helped to have it working again: https://bugzilla.redhat.com/show_bug.cgi?id=1706627

---
I have no idea what it does, it just works (TM).

---
 tests/docker/dockerfiles/fedora.docker | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/fedora.docker +0 -0
index e6d39e14cb..f6be5e2dd7 100644

tests/docker/dockerfiles/fedora.docker ENV PACKAGES \ · line 100

Quoted 8 lines
tests/docker/dockerfiles/fedora.docker +2 -1
@@ -94,6 +94,7 @@ ENV PACKAGES \
     zlib-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 
-RUN dnf install -y $PACKAGES
+RUN echo zchunk=False >> /etc/dnf/dnf.conf
+RUN dnf clean metadata && dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
 ENV FEATURES mingw clang pyyaml asan

--
Alex Bennée

#4 lore raw

Re: [NOTFORMERGE PATCH v2 1/9] tests/docker: Kludge to build the Fedora image

Quoted 107 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Alex Bennée
Quoted 3 lines · Philippe Mathieu-Daudé

Rebuilding the Fedora image is failing:

  $ make docker-image-fedora V=1

Broken build state? Just do:

make docker-image-fedora V=1 NOCACHE=1

No, this doesn't help:

$ make docker-image-fedora V=1 NOCACHE=1
./tests/docker/docker.py build qemu:fedora
tests/docker/dockerfiles/fedora.docker  --no-cache --add-current-user
Sending build context to Docker daemon  4.096kB
Step 1/8 : FROM fedora:30
 ---> 9754ce14641d
Step 2/8 : ENV PACKAGES     bc     bison     bluez-libs-devel
brlapi-devel     bzip2     bzip2-devel     ccache     clang
cyrus-sasl-devel     device-mapper-multipath-devel     findutils
flex     gcc     gcc-c++     gettext     git     glib2-devel
glusterfs-api-devel     gnutls-devel     gtk3-devel     hostname
libaio-devel     libasan     libattr-devel     libblockdev-mpath-devel
   libcap-devel     libcap-ng-devel     libcurl-devel     libfdt-devel
   libiscsi-devel     libjpeg-devel     libpmem-devel     libpng-devel
   librbd-devel     libseccomp-devel     libssh-devel     libubsan
libusbx-devel     libxml2-devel     llvm     lzo-devel     make
mingw32-bzip2     mingw32-curl     mingw32-glib2     mingw32-gmp
mingw32-gnutls     mingw32-gtk3     mingw32-libjpeg-turbo
mingw32-libpng     mingw32-libtasn1     mingw32-nettle
mingw32-pixman     mingw32-pkg-config     mingw32-SDL2     mingw64-bzip2
    mingw64-curl     mingw64-glib2     mingw64-gmp     mingw64-gnutls
  mingw64-gtk3     mingw64-libjpeg-turbo     mingw64-libpng
mingw64-libtasn1     mingw64-nettle     mingw64-pixman
mingw64-pkg-config     mingw64-SDL2     ncurses-devel     nettle-devel
   nss-devel     numactl-devel     perl     perl-Test-Harness
pixman-devel     python3     python3-sphinx     PyYAML
rdma-core-devel     SDL2-devel     snappy-devel     sparse
spice-server-devel     systemd-devel     systemtap-sdt-devel     tar
 usbredir-devel     virglrenderer-devel     vte291-devel     which
xen-devel     zlib-devel
 ---> Running in dfeaaaa6bd31
Removing intermediate container dfeaaaa6bd31
 ---> 853735cf32a1
Step 3/8 : ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 ---> Running in 64af2877181d
Removing intermediate container 64af2877181d
 ---> 2cb74a994b35
Step 4/8 : RUN dnf install -y $PACKAGES
 ---> Running in 106e7fcb2900
Fedora Modular 30 - x86_64                      2.1 MB/s | 2.7 MB
00:01
Fedora Modular 30 - x86_64 - Updates            1.6 MB/s | 2.3 MB
00:01
Fedora 30 - x86_64 - Updates                    6.3 MB/s |  17 MB
00:02
Failed to synchronize cache for repo 'updates'
Error: Failed to synchronize cache for repo 'updates'
The command '/bin/sh -c dnf install -y $PACKAGES' returned a non-zero
code: 1
Quoted 43 lines
Quoted 43 lines

[...]
Step 4/8 : RUN dnf install -y $PACKAGES
---> Running in cef9615efafb

  Fedora Modular 30 - x86_64                      2.0 MB/s | 2.7 MB     00:01
  Fedora Modular 30 - x86_64 - Updates            1.6 MB/s | 2.3 MB     00:01
  Fedora 30 - x86_64 - Updates                    6.1 MB/s |  17 MB     00:02

Failed to synchronize cache for repo 'updates'
Error: Failed to synchronize cache for repo 'updates'
The command '/bin/sh -c dnf install -y $PACKAGES' returned a non-zero code: 1
Traceback (most recent call last):
File "./tests/docker/docker.py", line 615, in <module>
sys.exit(main())
File "./tests/docker/docker.py", line 611, in main
return args.cmdobj.run(args, argv)
File "./tests/docker/docker.py", line 413, in run
extra_files_cksum=cksum)
File "./tests/docker/docker.py", line 280, in build_image
quiet=quiet)
File "./tests/docker/docker.py", line 207, in _do_check
return subprocess.check_call(self._command + cmd, **kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'qemu:fedora', '-f', '/tmp/docker_buildbKtWAa/tmpIctHw2.docker', '/tmp/docker_buildbKtWAa']' returned non-zero exit status 1
make: *** [tests/docker/Makefile.include:53: docker-image-fedora] Error 1

The fix found in one of the comment from this thread helped to have it working again: https://bugzilla.redhat.com/show_bug.cgi?id=1706627

---
I have no idea what it does, it just works (TM).

---
 tests/docker/dockerfiles/fedora.docker | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/fedora.docker +0 -0
index e6d39e14cb..f6be5e2dd7 100644
@@ -94,6 +94,7 @@ ENV PACKAGES \
     zlib-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 
Quoted 5 lines
Quoted 5 lines

tests/docker/dockerfiles/fedora.docker ENV PACKAGES \ · line 100

Quoted 5 lines
tests/docker/dockerfiles/fedora.docker +2 -1
-RUN dnf install -y $PACKAGES
+RUN echo zchunk=False >> /etc/dnf/dnf.conf
+RUN dnf clean metadata && dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
 ENV FEATURES mingw clang pyyaml asan

Bouh this issue is back, and using the same kludge I can build the Fedora image. Might be related to my ISP, no idea.

#5 lore raw

PATCH v2 2/9 tests/docker: Install Sphinx in the Debian images

In reply to Philippe Mathieu-Daudé

Since commit 5f71eac06e the Sphinx tool is required to build the rST documentation.

This fixes:

 $ ./configure --enable-docs

ERROR: User requested feature docs
configure was not able to find it.
Install texinfo, Perl/perl-podlators and python-sphinx

---
v2: Only include base image (the ones to cross-build qemu,
not the ones to cross-build user-space tests) (Alex)

---
 tests/docker/dockerfiles/debian10.docker | 1 +
 tests/docker/dockerfiles/debian9.docker  | 1 +
 2 files changed, 2 insertions(+)
tests/docker/dockerfiles/debian10.docker +1 -0
index aeeb151b52..cf57d8218f 100644
@@ -27,5 +27,6 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         pkg-config \
         psmisc \
         python \
+        python3-sphinx \
         texinfo \
         $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\  -f2)
tests/docker/dockerfiles/debian9.docker +1 -0
index 5f23a35404..52c589a7d6 100644
@@ -27,5 +27,6 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         pkg-config \
         psmisc \
         python \
+        python3-sphinx \
         texinfo \
         $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\  -f2)
Signature · 1 line
2.20.1
#6 lore raw

PATCH v2 3/9 tests/docker: Install the NSIS tools in the MinGW capable images

In reply to Philippe Mathieu-Daudé

This fixes:

  $ make installer
  (cd /tmp/qemu-nsis; \
           for i in qemu-system-*.exe; do \
             arch=${i%.exe}; \
             arch=${arch#qemu-system-}; \
             echo Section \"$arch\" Section_$arch; \
             echo SetOutPath \"\$INSTDIR\"; \
             echo File \"\${BINDIR}\\$i\"; \
             echo SectionEnd; \
           done \
          ) >/tmp/qemu-nsis/system-emulations.nsh
  makensis -V2 -NOCD \
                  -DCONFIG_DOCUMENTATION="y" \
                   \
                  -DBINDIR="/tmp/qemu-nsis" \
                   \
                  -DSRCDIR="/home/phil/source/qemu" \
                  -DOUTFILE="qemu-setup-4.0.90.exe" \
                  -DDISPLAYVERSION="4.0.90" \
                  /home/phil/source/qemu/qemu.nsi
  /bin/sh: 1: makensis: not found
  Makefile:1077: recipe for target 'qemu-setup-4.0.90.exe' failed
  make: *** [qemu-setup-4.0.90.exe] Error 127
---
 tests/docker/dockerfiles/debian-win32-cross.docker | 3 +++
 tests/docker/dockerfiles/debian-win64-cross.docker | 3 +++
 tests/docker/dockerfiles/fedora.docker             | 1 +
 3 files changed, 7 insertions(+)
tests/docker/dockerfiles/debian-win32-cross.docker +3 -0
index c787e43245..77f5cc45e9 100644
@@ -9,6 +9,8 @@ MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
 ENV TARGET i686
 
+ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
@@ -19,6 +21,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         mxe-$TARGET-w64-mingw32.shared-lzo \
         mxe-$TARGET-w64-mingw32.shared-nettle \
         mxe-$TARGET-w64-mingw32.shared-ncurses \
+        mxe-$TARGET-w64-mingw32.shared-nsis \
         mxe-$TARGET-w64-mingw32.shared-pixman \
         mxe-$TARGET-w64-mingw32.shared-pkgconf \
         mxe-$TARGET-w64-mingw32.shared-pthreads \
tests/docker/dockerfiles/debian-win64-cross.docker +3 -0
index a7068ed6ac..3908c5abc4 100644
@@ -9,6 +9,8 @@ MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
 ENV TARGET x86-64
 
+ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
@@ -19,6 +21,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         mxe-$TARGET-w64-mingw32.shared-lzo \
         mxe-$TARGET-w64-mingw32.shared-nettle \
         mxe-$TARGET-w64-mingw32.shared-ncurses \
+        mxe-$TARGET-w64-mingw32.shared-nsis \
         mxe-$TARGET-w64-mingw32.shared-pixman \
         mxe-$TARGET-w64-mingw32.shared-pkgconf \
         mxe-$TARGET-w64-mingw32.shared-pthreads \
tests/docker/dockerfiles/fedora.docker +1 -0
index f6be5e2dd7..cc9bef189a 100644
@@ -52,6 +52,7 @@ ENV PACKAGES \
     mingw32-libpng \
     mingw32-libtasn1 \
     mingw32-nettle \
+    mingw32-nsis \
     mingw32-pixman \
     mingw32-pkg-config \
     mingw32-SDL2 \
Signature · 1 line
2.20.1
#7 lore raw

PATCH v2 4/9 tests/docker: Set the correct cross-PKG_CONFIG_PATH in the MXE images

In reply to Philippe Mathieu-Daudé

This silents a bunch of warnings while compiling the Slirp objects:

 $ make
 [...]
   CC      slirp/src/tftp.o
 Package glib-2.0 was not found in the pkg-config search path.
 Perhaps you should add the directory containing `glib-2.0.pc'
 to the PKG_CONFIG_PATH environment variable
 No package 'glib-2.0' found
   CC      slirp/src/udp6.o
 Package glib-2.0 was not found in the pkg-config search path.
 Perhaps you should add the directory containing `glib-2.0.pc'
 to the PKG_CONFIG_PATH environment variable
 No package 'glib-2.0' found
 [...]
---
 tests/docker/dockerfiles/debian-win32-cross.docker | 3 +++
 tests/docker/dockerfiles/debian-win64-cross.docker | 3 +++
 2 files changed, 6 insertions(+)
tests/docker/dockerfiles/debian-win32-cross.docker +3 -0
index 77f5cc45e9..dc74ce7e0e 100644
@@ -11,6 +11,9 @@ ENV TARGET i686
 
 ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
 
+ENV PKG_CONFIG_PATH \
+    $PKG_CONFIG_PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/lib/pkgconfig
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
tests/docker/dockerfiles/debian-win64-cross.docker +3 -0
index 3908c5abc4..df7bfce7ea 100644
@@ -11,6 +11,9 @@ ENV TARGET x86-64
 
 ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
 
+ENV PKG_CONFIG_PATH \
+    $PKG_CONFIG_PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/lib/pkgconfig
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
Signature · 1 line
2.20.1
#8 lore raw

PATCH v2 5/9 tests/docker: Install texinfo in the Fedora image

In reply to Philippe Mathieu-Daudé

The 'makeinfo' is required to generate the documentation from the 'html' Makefile rule (called by 'install-doc'). The NSIS installer uses these files.

---
 tests/docker/dockerfiles/fedora.docker | 1 +
 1 file changed, 1 insertion(+)
tests/docker/dockerfiles/fedora.docker +1 -0
index cc9bef189a..bb4e6f1c12 100644
@@ -87,6 +87,7 @@ ENV PACKAGES \
     systemd-devel \
     systemtap-sdt-devel \
     tar \
+    texinfo \
     usbredir-devel \
     virglrenderer-devel \
     vte291-devel \
Signature · 1 line
2.20.1
#9 lore raw

RFC v2 6/9 buildsys: The NSIS Windows build requires the documentation installed

In reply to Philippe Mathieu-Daudé

This fixes:

  $ make installer
  [...]
  (cd /tmp/qemu-nsis; \
           for i in qemu-system-*.exe; do \
             arch=${i%.exe}; \
             arch=${arch#qemu-system-}; \
             echo Section \"$arch\" Section_$arch; \
             echo SetOutPath \"\$INSTDIR\"; \
             echo File \"\${BINDIR}\\$i\"; \
             echo SectionEnd; \
           done \
          ) >/tmp/qemu-nsis/system-emulations.nsh
  makensis -V2 -NOCD \
                   \
                  -DCONFIG_GTK="y" \
                  -DBINDIR="/tmp/qemu-nsis" \
                   \
                  -DSRCDIR="/source/qemu" \
                  -DOUTFILE="qemu-setup-4.0.90.exe" \
                  -DDISPLAYVERSION="4.0.90" \
                  /source/qemu/qemu.nsi
  File: "/tmp/qemu-nsis\qemu-doc.html" -> no files found.
  Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
     /oname=outfile one_file_only)
  Error in script "/source/qemu/qemu.nsi" on line 173 -- aborting creation process
  make: *** [Makefile:1080: qemu-setup-4.0.90.exe] Error 1

---
Not sure is this the only dependency missing, or this is the correct fix...

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 1fcbaed62c..f8dac48981 100644
@@ -1073,7 +1073,7 @@ installer: $(INSTALLER)
 
 INSTDIR=/tmp/qemu-nsis
 
-$(INSTALLER): $(SRC_PATH)/qemu.nsi
+$(INSTALLER): install-doc $(SRC_PATH)/qemu.nsi
 	$(MAKE) install prefix=${INSTDIR}
 ifdef SIGNCODE
 	(cd ${INSTDIR}; \
Signature · 1 line
2.20.1
#10 lore raw

PATCH v2 7/9 buildsys: The NSIS Windows build requires qemu-nsis.bmp installed

In reply to Philippe Mathieu-Daudé

The qemu-nsis.bmp file was not listed with the other blobs, thus not installed in the ${BINDIR} location.

This fixes:

  $ make installer
  [...]
  (cd /tmp/qemu-nsis; \
           for i in qemu-system-*.exe; do \
             arch=${i%.exe}; \
             arch=${arch#qemu-system-}; \
             echo Section \"$arch\" Section_$arch; \
             echo SetOutPath \"\$INSTDIR\"; \
             echo File \"\${BINDIR}\\$i\"; \
             echo SectionEnd; \
           done \
          ) >/tmp/qemu-nsis/system-emulations.nsh
  makensis -V2 -NOCD \
                  -DCONFIG_DOCUMENTATION="y" \
                   \
                  -DBINDIR="/tmp/qemu-nsis" \
                   \
                  -DSRCDIR="/home/phil/source/qemu" \
                  -DOUTFILE="qemu-setup-4.0.90.exe" \
                  -DDISPLAYVERSION="4.0.90" \
                  /home/phil/source/qemu/qemu.nsi
  File: "/tmp/qemu-nsis\*.bmp" -> no files found.
  Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
     /oname=outfile one_file_only)
  Error in script "/home/phil/source/qemu/qemu.nsi" on line 122 -- aborting creation process
  Makefile:1077: recipe for target 'qemu-setup-4.0.90.exe' failed
  make: *** [qemu-setup-4.0.90.exe] Error 1

---

$ file qemu-setup-4.0.90.exe
qemu-setup-4.0.90.exe: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for MS Windows, Nullsoft Installer self-extracting archive
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index f8dac48981..f2e5fd3316 100644
@@ -761,6 +761,7 @@ pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
 efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \
 efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
 efi-e1000e.rom efi-vmxnet3.rom \
+qemu-nsis.bmp \
 bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
 multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin \
 s390-ccw.img s390-netboot.img \
Signature · 1 line
2.20.1
#11 lore raw

PATCH v2 8/9 tests/docker: Let the test-mingw test generate a NSIS installer

In reply to Philippe Mathieu-Daudé

The NSIS installer generates an executable suitable to install QEMU on Windows.

---
 tests/docker/test-mingw | 1 +
 1 file changed, 1 insertion(+)
tests/docker/test-mingw +1 -0
index 4b84cfe120..72660bb14d 100755
@@ -29,6 +29,7 @@ for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
         --enable-bzip2 \
         --enable-guest-agent
     install_qemu
+    make installer
     make clean
 
 done
Signature · 1 line
2.20.1
#12 lore raw

PATCH v2 9/9 NSIS: Add missing firmware blobs

In reply to Philippe Mathieu-Daudé

Various firmwares has been added in the pc-bios/ directory:

- CCW (since commit 0c1fecdd523)
- Skiboot (since commit bcad45de6a0)
- EDK2 (since commit f7fa38b74c3)

Since we install qemu-system able to run the architectures targetted by these firmware, include them in the NSIS exe.

---
 qemu.nsi | 3 +++
 1 file changed, 3 insertions(+)
qemu.nsi +3 -0
index 75f1608b9e..89c7c04f95 100644
@@ -122,6 +122,9 @@ Section "${PRODUCT} (required)"
     File "${BINDIR}\*.bmp"
     File "${BINDIR}\*.bin"
     File "${BINDIR}\*.dtb"
+    File "${BINDIR}\*.fd"
+    File "${BINDIR}\*.img"
+    File "${BINDIR}\*.lid"
     File "${BINDIR}\*.rom"
     File "${BINDIR}\openbios-*"
 
Signature · 1 line
2.20.1
Acked-by on v2 9/9
#13 lore raw

Re: [Qemu-devel] [PATCH-for-4.1 v2 9/9] NSIS: Add missing firmware blobs

Quoted 20 lines · Philippe Mathieu-Daudé

Various firmwares has been added in the pc-bios/ directory:

- CCW (since commit 0c1fecdd523)
- Skiboot (since commit bcad45de6a0)
- EDK2 (since commit f7fa38b74c3)

Since we install qemu-system able to run the architectures targetted by these firmware, include them in the NSIS exe.

---
 qemu.nsi | 3 +++
 1 file changed, 3 insertions(+)
qemu.nsi +0 -0
index 75f1608b9e..89c7c04f95 100644

qemu.nsi Section "${PRODUCT} (required)" · line 130

Quoted 9 lines
qemu.nsi +3 -0
@@ -122,6 +122,9 @@ Section "${PRODUCT} (required)"
     File "${BINDIR}\*.bmp"
     File "${BINDIR}\*.bin"
     File "${BINDIR}\*.dtb"
+    File "${BINDIR}\*.fd"
+    File "${BINDIR}\*.img"
+    File "${BINDIR}\*.lid"
     File "${BINDIR}\*.rom"
     File "${BINDIR}\openbios-*"
 

This is the only patch I can (remotely) comment on... So I guess, from another patch, NSIS stands for "Nullsoft Installer".

I guess :)

Laszlo

#14 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 4 lines · Philippe Mathieu-Daudé

Few more patches to be able to MXE-build the NSIS installers.

The Fedora kludge is not meant for merge, but might be useful to test this series.

Queued to 2-9 to testing/next, thanks.

Quoted 15 lines

Based-on: [email protected]
https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg03014.html

Philippe Mathieu-Daudé (9):
tests/docker: Kludge to build the Fedora image tests/docker: Install Sphinx in the Debian images tests/docker: Install the NSIS tools in the MinGW capable images tests/docker: Set the correct cross-PKG_CONFIG_PATH in the MXE images tests/docker: Install texinfo in the Fedora image
buildsys: The NSIS Windows build requires the documentation installed
buildsys: The NSIS Windows build requires qemu-nsis.bmp installed tests/docker: Let the test-mingw test generate a NSIS installer
NSIS: Add missing firmware blobs

Quoted 9 lines
 Makefile                                           | 3 ++-
 qemu.nsi                                           | 3 +++
 tests/docker/dockerfiles/debian-win32-cross.docker | 6 ++++++
 tests/docker/dockerfiles/debian-win64-cross.docker | 6 ++++++
 tests/docker/dockerfiles/debian10.docker           | 1 +
 tests/docker/dockerfiles/debian9.docker            | 1 +
 tests/docker/dockerfiles/fedora.docker             | 5 ++++-
 tests/docker/test-mingw                            | 1 +
 8 files changed, 24 insertions(+), 2 deletions(-)

--
Alex Bennée