Skip to content

Use latest compression for macOS installer packages - #10751

Merged
akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:akoeplinger-macos-package-compression
Nov 6, 2026
Merged

akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:akoeplinger-macos-package-compression

Conversation

@akoeplinger

@akoeplinger akoeplinger commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Enable pkgbuild --compression latest using the existing minimum supported macOS versions, reducing installer payload sizes without raising OS requirements.

  • Add an optional MacOSMinimumVersion property to Arcade's installer targets; retain existing compression when it is unset.
  • Pass runtime's existing macOSVersionMin and reuse the SDK installer's existing minimum version.
  • Support gzip and pbzx payload extraction with pkgutil --expand-full, and preserve minimum-version metadata and latest compression when repacking packages for signing.
  • Add regression coverage for legacy gzip, pbzx, and nested installer/app-bundle round trips.

Validation

  • All 9 Microsoft.DotNet.MacOsPkg tests passed locally.
  • Official macOS x64 and arm64 build with real signing succeeded: build 3127459.
  • Both resulting SDK installers are Microsoft Developer ID signed, notarized, and accepted by Gatekeeper. All six component payloads retain pbzx compression after signing; all 28 native binaries per architecture have valid code signatures.
  • Verified archive checksums, full extraction, BOM paths and permissions, installer scripts, expected contents, architectures, and symlinks. No installers were installed or executed.
  • Final signed SDK installer sizes: 124.57 MiB arm64, 136.48 MiB x64.

Pass existing minimum macOS versions to pkgbuild and preserve pbzx payloads through signing unpack/repack operations.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 21:27
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the macOS installer compression changes.

No open issues 🎉

What changed in this PR

This PR enables newer macOS installer compression across the SDK, runtime, and Arcade packaging tools, using existing minimum OS versions without raising requirements.

Changes:

  • Enable pkgbuild --compression latest using the SDK and runtime minimum macOS versions, while retaining default behavior for Arcade callers that leave the property unset.
  • Support gzip and pbzx extraction and preserve minimum-version metadata and latest compression when repacking for signing.
  • Add regression coverage for legacy gzip, pbzx, and nested installer/app-bundle round trips.
File Description
src/​sdk/​src/​Layout/​redist/​targets/​GeneratePKG.targets Reuses the SDK minimum macOS version for distribution metadata and compression.
src/​runtime/​src/​installer/​pkg/​sfx/​Directory.Build.props Passes the runtime minimum macOS version to installer targets.
src/​arcade/​src/​Microsoft.DotNet.MacOsPkg/​Core/​Package.cs Fully expands compressed payloads and preserves minimum-version metadata when repacking.
src/​arcade/​src/​Microsoft.DotNet.MacOsPkg.Tests/​UnpackPackTests.cs Tests compression, metadata, and content preservation through package round trips.
src/​arcade/​src/​Microsoft.DotNet.Build.Tasks.Installers/​README.md Documents the optional minimum-version property and compression behavior.
src/​arcade/​src/​Microsoft.DotNet.Build.Tasks.Installers/​build/​installer.build.targets Adds compression flags when a minimum macOS version is supplied.

Review effort: Balanced

@akoeplinger
akoeplinger merged commit 9bf33d0 into dotnet:main Nov 6, 2026
11 checks passed
@akoeplinger
akoeplinger deleted the akoeplinger-macos-package-compression branch November 6, 2026 09:15
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.

3 participants