Skip to content

COR-181 - Take zlib from the mailcore2 release instead of S3 - #3

Closed
dbezverkhnii wants to merge 1 commit into
masterfrom
feature/COR-181-drop-aws-zlib
Closed

COR-181 - Take zlib from the mailcore2 release instead of S3#3
dbezverkhnii wants to merge 1 commit into
masterfrom
feature/COR-181-drop-aws-zlib

Conversation

@dbezverkhnii

@dbezverkhnii dbezverkhnii commented Sep 1, 2026

Copy link
Copy Markdown

Build-Zip.ps1 fetched zlib.zip from the spark-prebuilt-binaries S3 bucket, authenticating with SPARK_PREBUILT_KEY and throwing when it was unset. That was the last thing in the Spark Windows build still reaching for AWS: mailcore2 moved off it in readdle/mailcore2#104, and removing the secret from the spark-core-mono workflows made this script fail.

The same zlib binary now travels as a public asset on the mailcore2 windows-prebuilt release — mailcore2-windows-deps-1.zip, the very archive mailcore2 itself builds against. Downloading it takes no credential.

Why the swap is exact

Zip/minizip/CMakeLists.txt consumes zlib_DIR as ${zlib_DIR}/include, ${zlib_DIR}/lib, and ${zlib_DIR}/lib64/zlib.{dll,pdb,lib,exp}. The archive carries all four under mailcore2-windows-deps/zlib/, the same layout zlib-win32-1 always had — mailcore2 reads include and lib64 from that exact directory. Only the path changes; the bytes and the CMake contract do not.

Notes

  • Both copies of the script are updated — build-scripts/Windows-5.10/ and the legacy build-scripts/Windows/ — so nothing in this repository reads SPARK_PREBUILT_KEY any more.
  • The unpack clears any tree a previous archive left, so stale files cannot be picked up.
  • Consumers pin this repository by tag (spark-core-mono pins 2.1.1.5), so nothing changes for anyone until a new tag is cut and that pin is bumped.

Verification

Confirmed by inspection and by downloading the asset anonymously; the archive contains the four required paths. Not yet run on a Windows machine — the real check is a spark-core-mono CD run against a new tag, which needs this merged and tagged first.


Note

Low Risk
Build-script-only change for Windows Zip dependencies; removes a secret requirement but relies on a public third-party release URL and correct archive layout.

Overview
Windows Zip builds no longer download zlib.zip from Spark’s S3 bucket or require SPARK_PREBUILT_KEY. Both build-scripts/Windows-5.10/Build-Zip.ps1 and build-scripts/Windows/Build-Zip.ps1 now pull the public mailcore2-windows-deps-1.zip from the mailcore2 windows-prebuilt GitHub release and point zlib_DIR at mailcore2-windows-deps/zlib (same include/lib/lib64 layout minizip’s CMake already expects).

The setup step downloads the new archive, removes any prior mailcore2-windows-deps tree before unpacking (so stale files aren’t reused), then expands into the dependencies folder. Only the source URL and paths change; the zlib binary and CMake contract stay aligned with mailcore2.

Reviewed by Cursor Bugbot for commit 9189dfe. Bugbot is set up for automated code reviews on this repo. Configure here.

zlib was fetched from the spark-prebuilt-binaries S3 bucket behind
SPARK_PREBUILT_KEY. The same binary is now a public asset on the mailcore2
windows-prebuilt release, so the download needs no credential.

Both copies of Build-Zip.ps1 are changed, so nothing here reads the key any
more. The layout minizip expects - include, lib, and lib64/zlib.{dll,pdb,lib,exp}
- is what the archive carries under zlib/, so zlib_DIR is a drop-in swap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dbezverkhnii

Copy link
Copy Markdown
Author

Closing: we decided to keep SPARK_PREBUILT_KEY for Zip and leave zlib on S3 for now. COR-181 scoped the AWS removal to mailcore2 only.

Leaving the branch in place — the swap is verified (the zlib in mailcore2-windows-deps-1.zip is byte-identical to the one the MailCore prebuilt ships), so this can be reopened as is if we revisit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant