* [PATCH 1/3] ci: build & store windows installer
2021-06-23 9:11 [PATCH 0/3] [RfC] build windows installers in ci Gerd Hoffmann
@ 2021-06-23 9:11 ` Gerd Hoffmann
2021-07-05 7:28 ` Thomas Huth
2021-07-05 14:44 ` Willian Rampazzo
2021-06-23 9:11 ` [PATCH 2/3] [hack] scripts/copy-dlls Gerd Hoffmann
2021-06-23 9:11 ` [PATCH 3/3] ci: build & store guest agent msi Gerd Hoffmann
2 siblings, 2 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2021-06-23 9:11 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta, Willian Rampazzo, Gerd Hoffmann,
Alex Bennée
Build windows installer for qemu in gitlab CI,
store the result as artifact.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
.gitlab-ci.d/crossbuild-template.yml | 5 +++++
.gitlab-ci.d/crossbuilds.yml | 6 ++++++
tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
3 files changed, 12 insertions(+)
diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
index 1be541174c91..7d3ad00a1eb9 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -11,6 +11,11 @@
i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
mips64-softmmu ppc-softmmu sh4-softmmu xtensa-softmmu"
- make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+ - if grep -q "EXESUF=.exe" config-host.mak;
+ then make installer;
+ version="$(git describe --match v[0-9]*)";
+ mv -v qemu-setup*.exe qemu-setup-${version}.exe;
+ fi
# Job to cross-build specific accelerators.
#
diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
index 6b3865c9e83e..4ff3aa3cfcdd 100644
--- a/.gitlab-ci.d/crossbuilds.yml
+++ b/.gitlab-ci.d/crossbuilds.yml
@@ -160,6 +160,9 @@ cross-win32-system:
job: win32-fedora-cross-container
variables:
IMAGE: fedora-win32-cross
+ artifacts:
+ paths:
+ - build/qemu-setup*.exe
cross-win64-system:
extends: .cross_system_build_job
@@ -167,6 +170,9 @@ cross-win64-system:
job: win64-fedora-cross-container
variables:
IMAGE: fedora-win64-cross
+ artifacts:
+ paths:
+ - build/qemu-setup*.exe
cross-amd64-xen-only:
extends: .cross_accel_build_job
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index f53007ac865e..5fbfe8892896 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -13,6 +13,7 @@ ENV PACKAGES \
hostname \
make \
meson \
+ mingw32-nsis \
mingw64-bzip2 \
mingw64-curl \
mingw64-glib2 \
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] ci: build & store windows installer
2021-06-23 9:11 ` [PATCH 1/3] ci: build & store windows installer Gerd Hoffmann
@ 2021-07-05 7:28 ` Thomas Huth
2021-07-05 14:44 ` Willian Rampazzo
1 sibling, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2021-07-05 7:28 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Cc: Willian Rampazzo, Alex Bennée, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta
On 23/06/2021 11.11, Gerd Hoffmann wrote:
> Build windows installer for qemu in gitlab CI,
> store the result as artifact.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> .gitlab-ci.d/crossbuild-template.yml | 5 +++++
> .gitlab-ci.d/crossbuilds.yml | 6 ++++++
> tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
> 3 files changed, 12 insertions(+)
>
> diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
> index 1be541174c91..7d3ad00a1eb9 100644
> --- a/.gitlab-ci.d/crossbuild-template.yml
> +++ b/.gitlab-ci.d/crossbuild-template.yml
> @@ -11,6 +11,11 @@
> i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
> mips64-softmmu ppc-softmmu sh4-softmmu xtensa-softmmu"
> - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
> + - if grep -q "EXESUF=.exe" config-host.mak;
> + then make installer;
> + version="$(git describe --match v[0-9]*)";
> + mv -v qemu-setup*.exe qemu-setup-${version}.exe;
> + fi
>
> # Job to cross-build specific accelerators.
> #
> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
> index 6b3865c9e83e..4ff3aa3cfcdd 100644
> --- a/.gitlab-ci.d/crossbuilds.yml
> +++ b/.gitlab-ci.d/crossbuilds.yml
> @@ -160,6 +160,9 @@ cross-win32-system:
> job: win32-fedora-cross-container
> variables:
> IMAGE: fedora-win32-cross
> + artifacts:
> + paths:
> + - build/qemu-setup*.exe
>
> cross-win64-system:
> extends: .cross_system_build_job
> @@ -167,6 +170,9 @@ cross-win64-system:
> job: win64-fedora-cross-container
> variables:
> IMAGE: fedora-win64-cross
> + artifacts:
> + paths:
> + - build/qemu-setup*.exe
>
> cross-amd64-xen-only:
> extends: .cross_accel_build_job
> diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
> index f53007ac865e..5fbfe8892896 100644
> --- a/tests/docker/dockerfiles/fedora-win64-cross.docker
> +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
> @@ -13,6 +13,7 @@ ENV PACKAGES \
> hostname \
> make \
> meson \
> + mingw32-nsis \
> mingw64-bzip2 \
> mingw64-curl \
> mingw64-glib2 \
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] ci: build & store windows installer
2021-06-23 9:11 ` [PATCH 1/3] ci: build & store windows installer Gerd Hoffmann
2021-07-05 7:28 ` Thomas Huth
@ 2021-07-05 14:44 ` Willian Rampazzo
1 sibling, 0 replies; 8+ messages in thread
From: Willian Rampazzo @ 2021-07-05 14:44 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: Thomas Huth, Alex Bennée, qemu-devel,
Wainer dos Santos Moschetta, Philippe Mathieu-Daudé
On Wed, Jun 23, 2021 at 6:11 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Build windows installer for qemu in gitlab CI,
> store the result as artifact.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> .gitlab-ci.d/crossbuild-template.yml | 5 +++++
> .gitlab-ci.d/crossbuilds.yml | 6 ++++++
> tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
> 3 files changed, 12 insertions(+)
>
> diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
> index 1be541174c91..7d3ad00a1eb9 100644
> --- a/.gitlab-ci.d/crossbuild-template.yml
> +++ b/.gitlab-ci.d/crossbuild-template.yml
> @@ -11,6 +11,11 @@
> i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
> mips64-softmmu ppc-softmmu sh4-softmmu xtensa-softmmu"
> - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
> + - if grep -q "EXESUF=.exe" config-host.mak;
> + then make installer;
> + version="$(git describe --match v[0-9]*)";
> + mv -v qemu-setup*.exe qemu-setup-${version}.exe;
> + fi
>
> # Job to cross-build specific accelerators.
> #
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] [hack] scripts/copy-dlls
2021-06-23 9:11 [PATCH 0/3] [RfC] build windows installers in ci Gerd Hoffmann
2021-06-23 9:11 ` [PATCH 1/3] ci: build & store windows installer Gerd Hoffmann
@ 2021-06-23 9:11 ` Gerd Hoffmann
2021-06-23 9:11 ` [PATCH 3/3] ci: build & store guest agent msi Gerd Hoffmann
2 siblings, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2021-06-23 9:11 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta, Willian Rampazzo, Gerd Hoffmann,
Alex Bennée
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
.gitlab-ci.d/crossbuild-template.yml | 3 +-
scripts/copy-dlls | 56 ++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 1 deletion(-)
create mode 100755 scripts/copy-dlls
diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
index 7d3ad00a1eb9..5411177935fc 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -12,7 +12,8 @@
mips64-softmmu ppc-softmmu sh4-softmmu xtensa-softmmu"
- make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
- if grep -q "EXESUF=.exe" config-host.mak;
- then make installer;
+ then scripts/copy-dlls;
+ make installer;
version="$(git describe --match v[0-9]*)";
mv -v qemu-setup*.exe qemu-setup-${version}.exe;
fi
diff --git a/scripts/copy-dlls b/scripts/copy-dlls
new file mode 100755
index 000000000000..0a84cd004c87
--- /dev/null
+++ b/scripts/copy-dlls
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# copy dlls needed by windows binaries to $srcdir/dll/{w32,w64}
+# the nsis installer scripts expects them there
+#
+# TODO: rewrite in python and integrate into scripts/nsis.py
+#
+
+if test ! -f config-host.mak; then
+ echo "must be started in builddir"
+ exit 1
+fi
+
+eval $(egrep '(CONFIG_WIN32|QEMU_GA_MSI_MINGW_DLL_PATH|SRC_PATH)' config-host.mak)
+
+if test "$CONFIG_WIN32" != "y"; then
+ echo "not a windows build"
+ exit 1
+fi
+
+if test "$QEMU_GA_MSI_MINGW_DLL_PATH" = ""; then
+ echo "unknown dll path"
+ exit 1
+fi
+
+case "$QEMU_GA_MSI_MINGW_DLL_PATH" in
+ *-w32-*)
+ DESTDIR="$SRC_PATH/dll/w32"
+ ;;
+ *-w64-*)
+ DESTDIR="$SRC_PATH/dll/w64"
+ ;;
+ *)
+ echo "can't figure w32 vs. w64"
+ exit 1
+ ;;
+esac
+
+function check_windows_binary_deps() {
+ local file="$1"
+ local dlls dll
+
+ dlls=$(objdump -p "$file" | awk '/DLL Name/ { print $3 }')
+ for dll in $dlls; do
+ test -f "$QEMU_GA_MSI_MINGW_DLL_PATH/$dll" || continue
+ test -f "$DESTDIR/$dll" && continue
+ echo "copy $dll"
+ cp "$QEMU_GA_MSI_MINGW_DLL_PATH/$dll" "$DESTDIR/$dll"
+ check_windows_binary_deps "$DESTDIR/$dll"
+ done
+}
+
+mkdir -p "$DESTDIR"
+for file in *.exe; do
+ check_windows_binary_deps $file
+done
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] ci: build & store guest agent msi
2021-06-23 9:11 [PATCH 0/3] [RfC] build windows installers in ci Gerd Hoffmann
2021-06-23 9:11 ` [PATCH 1/3] ci: build & store windows installer Gerd Hoffmann
2021-06-23 9:11 ` [PATCH 2/3] [hack] scripts/copy-dlls Gerd Hoffmann
@ 2021-06-23 9:11 ` Gerd Hoffmann
2021-07-05 7:31 ` Thomas Huth
2021-07-05 14:47 ` Willian Rampazzo
2 siblings, 2 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2021-06-23 9:11 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta, Willian Rampazzo, Gerd Hoffmann,
Alex Bennée
Build guest agent windows msi install package in gitlab CI,
store the result as artifact.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
.gitlab-ci.d/crossbuild-template.yml | 3 ++-
.gitlab-ci.d/crossbuilds.yml | 2 ++
tests/docker/dockerfiles/fedora-win32-cross.docker | 1 +
tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
index 5411177935fc..507440af0f4e 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -13,9 +13,10 @@
- make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
- if grep -q "EXESUF=.exe" config-host.mak;
then scripts/copy-dlls;
- make installer;
+ make installer msi;
version="$(git describe --match v[0-9]*)";
mv -v qemu-setup*.exe qemu-setup-${version}.exe;
+ mv -v qga/*.msi $(basename qga/*.msi .msi)-${version}.msi;
fi
# Job to cross-build specific accelerators.
diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
index 4ff3aa3cfcdd..fc14a1cf5c10 100644
--- a/.gitlab-ci.d/crossbuilds.yml
+++ b/.gitlab-ci.d/crossbuilds.yml
@@ -163,6 +163,7 @@ cross-win32-system:
artifacts:
paths:
- build/qemu-setup*.exe
+ - build/qemu-ga*.msi
cross-win64-system:
extends: .cross_system_build_job
@@ -173,6 +174,7 @@ cross-win64-system:
artifacts:
paths:
- build/qemu-setup*.exe
+ - build/qemu-ga*.msi
cross-amd64-xen-only:
extends: .cross_accel_build_job
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index a638afb525ce..9fffc8e73881 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -28,6 +28,7 @@ ENV PACKAGES \
mingw32-pixman \
mingw32-pkg-config \
mingw32-SDL2 \
+ msitools \
perl \
perl-Test-Harness \
python3 \
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index 5fbfe8892896..d748c37c4aa4 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -25,6 +25,7 @@ ENV PACKAGES \
mingw64-libtasn1 \
mingw64-pixman \
mingw64-pkg-config \
+ msitools \
perl \
perl-Test-Harness \
python3 \
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ci: build & store guest agent msi
2021-06-23 9:11 ` [PATCH 3/3] ci: build & store guest agent msi Gerd Hoffmann
@ 2021-07-05 7:31 ` Thomas Huth
2021-07-05 14:47 ` Willian Rampazzo
1 sibling, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2021-07-05 7:31 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Cc: Willian Rampazzo, Alex Bennée, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta
On 23/06/2021 11.11, Gerd Hoffmann wrote:
> Build guest agent windows msi install package in gitlab CI,
> store the result as artifact.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> .gitlab-ci.d/crossbuild-template.yml | 3 ++-
> .gitlab-ci.d/crossbuilds.yml | 2 ++
> tests/docker/dockerfiles/fedora-win32-cross.docker | 1 +
> tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
> 4 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
> index 5411177935fc..507440af0f4e 100644
> --- a/.gitlab-ci.d/crossbuild-template.yml
> +++ b/.gitlab-ci.d/crossbuild-template.yml
> @@ -13,9 +13,10 @@
> - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
> - if grep -q "EXESUF=.exe" config-host.mak;
> then scripts/copy-dlls;
> - make installer;
> + make installer msi;
> version="$(git describe --match v[0-9]*)";
> mv -v qemu-setup*.exe qemu-setup-${version}.exe;
> + mv -v qga/*.msi $(basename qga/*.msi .msi)-${version}.msi;
> fi
>
> # Job to cross-build specific accelerators.
> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
> index 4ff3aa3cfcdd..fc14a1cf5c10 100644
> --- a/.gitlab-ci.d/crossbuilds.yml
> +++ b/.gitlab-ci.d/crossbuilds.yml
> @@ -163,6 +163,7 @@ cross-win32-system:
> artifacts:
> paths:
> - build/qemu-setup*.exe
> + - build/qemu-ga*.msi
>
> cross-win64-system:
> extends: .cross_system_build_job
> @@ -173,6 +174,7 @@ cross-win64-system:
> artifacts:
> paths:
> - build/qemu-setup*.exe
> + - build/qemu-ga*.msi
>
> cross-amd64-xen-only:
> extends: .cross_accel_build_job
> diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
> index a638afb525ce..9fffc8e73881 100644
> --- a/tests/docker/dockerfiles/fedora-win32-cross.docker
> +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
> @@ -28,6 +28,7 @@ ENV PACKAGES \
> mingw32-pixman \
> mingw32-pkg-config \
> mingw32-SDL2 \
> + msitools \
> perl \
> perl-Test-Harness \
> python3 \
> diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
> index 5fbfe8892896..d748c37c4aa4 100644
> --- a/tests/docker/dockerfiles/fedora-win64-cross.docker
> +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
> @@ -25,6 +25,7 @@ ENV PACKAGES \
> mingw64-libtasn1 \
> mingw64-pixman \
> mingw64-pkg-config \
> + msitools \
> perl \
> perl-Test-Harness \
> python3 \
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ci: build & store guest agent msi
2021-06-23 9:11 ` [PATCH 3/3] ci: build & store guest agent msi Gerd Hoffmann
2021-07-05 7:31 ` Thomas Huth
@ 2021-07-05 14:47 ` Willian Rampazzo
1 sibling, 0 replies; 8+ messages in thread
From: Willian Rampazzo @ 2021-07-05 14:47 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: Thomas Huth, Alex Bennée, qemu-devel,
Wainer dos Santos Moschetta, Philippe Mathieu-Daudé
On Wed, Jun 23, 2021 at 6:12 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Build guest agent windows msi install package in gitlab CI,
> store the result as artifact.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> .gitlab-ci.d/crossbuild-template.yml | 3 ++-
> .gitlab-ci.d/crossbuilds.yml | 2 ++
> tests/docker/dockerfiles/fedora-win32-cross.docker | 1 +
> tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
> 4 files changed, 6 insertions(+), 1 deletion(-)
>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread