Skip to content

Conversation

@TravisEz13
Copy link
Member

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

  • Required tooling change
  • Optional tooling change (include reasoning)

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

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

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
  • Medium
  • Low

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.

…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>
Copilot AI review requested due to automatic review settings November 20, 2025 17:59
@TravisEz13 TravisEz13 requested a review from a team as a code owner November 20, 2025 17:59
@TravisEz13 TravisEz13 added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Nov 20, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@TravisEz13
Copy link
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

@TravisEz13 TravisEz13 enabled auto-merge (squash) November 20, 2025 19:39
@TravisEz13 TravisEz13 merged commit ce725ce into PowerShell:release/v7.6 Nov 20, 2025
44 checks passed
@TravisEz13 TravisEz13 deleted the backport/release/v7.6/26268-47e8e900a branch November 21, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants