Skip to content

fix: follow redirects and add fallback for zlib download in pyinstaller build#9104

Merged
roger-zhangg merged 5 commits into
developfrom
fix/pyinstaller-zlib-download
Jul 1, 2026
Merged

fix: follow redirects and add fallback for zlib download in pyinstaller build#9104
roger-zhangg merged 5 commits into
developfrom
fix/pyinstaller-zlib-download

Conversation

@roger-zhangg

Copy link
Copy Markdown
Member

Summary

  • Add -L flag to the curl command for zlib download so redirects are followed (matching the existing OpenSSL curl call)
  • Add GitHub releases (github.com/madler/zlib) as a fallback mirror if zlib.net is unavailable
  • Change tar xvf to tar xzf to match the gzip format explicitly

Root Cause

The build-pyinstaller-linux job is failing because https://www.zlib.net/zlib-1.3.2.tar.gz now returns an HTTP redirect. Without -L, curl saves the 185-byte redirect page instead of the ~1.5 MB tarball, causing tar to fail with "not in gzip format". This cascades into the build artifact not being produced.

Test plan

  • Verified both URLs return valid tarballs with -L flag locally
  • Confirmed the downloaded file extracts successfully with tar xzf
  • CI build-pyinstaller-linux job should pass on this PR

… 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.
@roger-zhangg roger-zhangg requested a review from a team as a code owner June 30, 2026 17:48

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: 11ed1fb..0d57d5f
Files: 1
Comments: 1

Comment thread installer/pyinstaller/build-linux.sh Outdated
@roger-zhangg roger-zhangg enabled auto-merge June 30, 2026 18:43
@roger-zhangg roger-zhangg added this pull request to the merge queue Jul 1, 2026
Merged via the queue into develop with commit d12e123 Jul 1, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants