[release/v7.6] Replace fpm with native macOS packaging tools (pkgbuild/productbuild)#26501
Conversation
…PowerShell#26268) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
There was a problem hiding this comment.
Pull Request Overview
This PR backports the macOS packaging infrastructure change from master to the release/v7.6 branch, replacing the Ruby gem fpm with Apple's native packaging tools (pkgbuild and productbuild). This eliminates the Ruby dependency for macOS package creation and uses Apple-maintained tooling instead. The change includes a new New-MacOSPackage function, refactored distribution package creation, comprehensive Pester tests, updated CI workflows, and enhanced documentation.
Key Changes:
- Replaces fpm-based macOS packaging with native pkgbuild/productbuild tooling
- Adds comprehensive package validation tests in
macOSPackage.tests.ps1 - Updates macOS CI workflow to build, package, and test in a single integrated job
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tools/packaging/releaseTests/macOSPackage.tests.ps1 |
New comprehensive Pester test suite validating macOS package structure, required files, permissions, and launcher app contents |
tools/packaging/packaging.psm1 |
Adds New-MacOSPackage function using native tools, refactors New-MacOsDistributionPackage for reusability, updates dependency checks to require pkgbuild/productbuild instead of fpm on macOS |
.github/workflows/macos-ci.yml |
Enhances macOS packaging job to build PowerShell, create packages, run validation tests, and upload artifacts with proper fetch-depth and NuGet configuration |
docs/maintainers/releasing.md |
Updates documentation to reflect native macOS packaging tools instead of fpm, clarifies different packaging approaches per platform |
.github/instructions/start-native-execution.instructions.md |
New instruction file documenting proper usage of Start-NativeExecution for native command execution |
.github/instructions/build-configuration-guide.md |
Adds documentation for Switch-PSNugetConfig usage in CI/CD environments to use public NuGet feeds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Backport of #26268 to release/v7.6
Triggered by @TravisEz13 on behalf of @app/copilot-swe-agent
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Replaces Ruby gem fpm with native macOS packaging tools (pkgbuild/productbuild) from Xcode Command Line Tools. Eliminates Ruby dependency for macOS packaging, uses Apple's official tools, and adds comprehensive CI validation with Pester tests. Required for maintaining macOS package builds without external Ruby dependencies.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Original PR added comprehensive Pester tests in tools/packaging/releaseTests/macOSPackage.tests.ps1. macOS CI workflow validates package creation and contents. Tests verify package structure, required files, permissions, and launcher app. Package creation tested in CI with proper NuGet feed configuration.
Risk
REQUIRED: Check exactly one box.
High risk as it fundamentally changes the macOS packaging approach from fpm to native tools. However, necessary to eliminate Ruby dependency and use Apple-maintained tools. Changes have been validated in master for several weeks with comprehensive CI testing. Not taking this change creates technical debt for macOS releases.