[PATCH] tests/docker: use stable URLs for zlib tarballs

Stefan Hajnoczi posted 1 patch 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260803174735.362574-1-stefanha@redhat.com
Maintainers: Kohei Tokunaga <ktokunaga.mail@gmail.com>, "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
There is a newer version of this series
tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] tests/docker: use stable URLs for zlib tarballs
Posted by Stefan Hajnoczi 2 weeks ago
The tarballs at https://zlib.net/zlib-X.Y.Z.tar.xz become unavailable
when a new release is made. This breaks the emsdk-wasm64-cross.docker
file that fetches the tarball and builds zlib from source.

There is actually an archive available with a stable URL. Use that
instead. This does require switching from bzip2 to gzip since bzip2
tarballs are not available in the archive.

The upshot is that the emsdk-wasm64-cross Docker image build will
continue working into the future without causing CI breakage when the
zlib project makes a new release.

Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
index c04a741b0e5..4f26ce7a269 100644
--- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
+++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
@@ -56,8 +56,8 @@ EOF
 FROM build-base AS zlib-dev
 ARG ZLIB_VERSION
 RUN mkdir -p /zlib
-RUN curl -Ls https://zlib.net/zlib-$ZLIB_VERSION.tar.xz | \
-    tar xJC /zlib --strip-components=1
+RUN curl -Ls https://zlib.net/fossils/zlib-$ZLIB_VERSION.tar.gz | \
+    tar xzC /zlib --strip-components=1
 WORKDIR /zlib
 RUN emconfigure ./configure --prefix=$TARGET --static
 RUN emmake make install -j$(nproc)
-- 
2.55.0


Re: [PATCH] tests/docker: use stable URLs for zlib tarballs
Posted by Daniel P. Berrangé 2 weeks ago
On Mon, Aug 03, 2026 at 01:47:35PM -0400, Stefan Hajnoczi wrote:
> The tarballs at https://zlib.net/zlib-X.Y.Z.tar.xz become unavailable
> when a new release is made. This breaks the emsdk-wasm64-cross.docker
> file that fetches the tarball and builds zlib from source.
> 
> There is actually an archive available with a stable URL. Use that
> instead. This does require switching from bzip2 to gzip since bzip2
> tarballs are not available in the archive.

"...from  xz to gzip since xz tarballs...."

> 
> The upshot is that the emsdk-wasm64-cross Docker image build will
> continue working into the future without causing CI breakage when the
> zlib project makes a new release.
> 
> Reported-by: Michael Tokarev <mjt@tls.msk.ru>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Re: [PATCH] tests/docker: use stable URLs for zlib tarballs
Posted by Stefan Hajnoczi 2 weeks ago
On Mon, Aug 3, 2026 at 1:54 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Mon, Aug 03, 2026 at 01:47:35PM -0400, Stefan Hajnoczi wrote:
> > The tarballs at https://zlib.net/zlib-X.Y.Z.tar.xz become unavailable
> > when a new release is made. This breaks the emsdk-wasm64-cross.docker
> > file that fetches the tarball and builds zlib from source.
> >
> > There is actually an archive available with a stable URL. Use that
> > instead. This does require switching from bzip2 to gzip since bzip2
> > tarballs are not available in the archive.
>
> "...from  xz to gzip since xz tarballs...."

Thanks for spotting this. I'll send a v2.

Stefan