Skip to content

Commit d12e123

Browse files
authored
fix: follow redirects and add fallback for zlib download in pyinstaller build (#9104)
* test: trigger mirror sync verification * fix: add -L flag and GitHub fallback for zlib download in pyinstaller build The zlib.net URL now returns a redirect, causing curl to save a 185-byte redirect page instead of the tarball. This breaks tar extraction and causes the Linux pyinstaller build to fail. Add -L flag to follow redirects (matching the OpenSSL curl call) and add GitHub releases as a fallback mirror. * fix: add -f flag so HTTP errors trigger the GitHub fallback
1 parent 7e821f9 commit d12e123

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

installer/pyinstaller/build-linux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ ln -sf /opt/openssl/lib64 /opt/openssl/lib
5858
cd ../../
5959

6060
echo "Building zlib"
61-
curl https://www.zlib.net/zlib-${zlib_version}.tar.gz --output zlib.tar.gz
61+
curl -fL "https://www.zlib.net/zlib-${zlib_version}.tar.gz" --output zlib.tar.gz || \
62+
curl -fL "https://github.com/madler/zlib/releases/download/v${zlib_version}/zlib-${zlib_version}.tar.gz" --output zlib.tar.gz
6263
tar xvf zlib.tar.gz
6364
cd zlib-${zlib_version}
6465
./configure && make -j8 && make -j8 install

0 commit comments

Comments
 (0)