Skip to content

Conversation

@TravisEz13
Copy link
Member

@TravisEz13 TravisEz13 commented Nov 13, 2025

Backport of #26233 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 rpmbuild for RPM package generation. Eliminates Ruby dependency for RPM-based systems (RHEL, CentOS, Fedora, SUSE, Azure Linux). Updates CI workflows to enable Linux packaging with proper module imports. Maintains backward compatibility for DEB and macOS packages.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified by running affected workflows. RPM packaging changes tested with rpmbuild. Package validation tests added to ensure naming conventions. Module imports ensure RPM packaging logic is properly loaded during CI builds.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

High risk as it modifies build infrastructure and packaging system, replacing fpm with native rpmbuild for RPM generation. However, this is necessary to eliminate Ruby dependency and improve RPM packaging reliability. Changes are well-tested with comprehensive validation.

Merge Conflicts

Note: This backport was initially created before prerequisite PR #26493 was merged to release/v7.6. The branch has been rebased on the latest upstream/release/v7.6 to include the prerequisite.

The following files had conflicts during rebase:

.github/actions/test/linux-packaging/action.yml

  • Conflict: Upload mechanism differences - prerequisite PR [release/v7.6] Convert Azure DevOps Linux Packaging pipeline to GitHub Actions workflow #26493 converted to GitHub Actions artifact uploads while original backport had Azure DevOps commands
  • Resolution: Kept module imports and package validation step from this backport, but used the new GitHub Actions artifact upload mechanism (separate upload-artifact actions for deb, rpm, and tar.gz packages)
  • Key changes preserved:
    • Module imports for RPM packaging (Import-Module ./build.psm1 and ./tools/packaging/packaging.psm1)
    • Package name validation step using Pester tests

.github/workflows/linux-ci.yml

  • Conflict: Packaging job trigger conditions and dependencies
  • Resolution: Used packagingChanged condition from this backport to properly trigger linux_packaging job when packaging-related files change
  • Key change preserved: The if: $${{ needs.changes.outputs.packagingChanged == 'true' }}$$ condition ensures packaging only runs when needed

All conflicts resolved by combining the RPM packaging functionality from this backport with the GitHub Actions infrastructure from prerequisite PR #26493.

@TravisEz13 TravisEz13 requested review from a team and jshigetomi as code owners November 13, 2025 17:37
Copilot AI review requested due to automatic review settings November 13, 2025 17:37
@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 13, 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 changes from #26233 to replace fpm with native rpmbuild for RPM package generation on release/v7.6. The change eliminates Ruby dependencies for RPM-based Linux systems (RHEL, CentOS, Fedora, SUSE, Azure Linux) while maintaining backward compatibility for DEB and macOS packages that still use fpm.

Key Changes:

  • Implements native rpmbuild-based RPM packaging with a new New-RpmSpec function that generates proper RPM spec files
  • Adds conditional dependency management to install fpm only on Debian-based systems and macOS, while ensuring rpmbuild is available on RPM-based systems
  • Enables Linux packaging workflow in GitHub Actions with package validation tests

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/packaging/packaging.psm1 Replaces fpm-based RPM packaging with native rpmbuild implementation; adds New-RpmSpec function; updates Test-Dependencies for conditional fpm requirement
tools/ci.psm1 Updates artifact directory handling to support both GitHub Actions and Azure DevOps environments
test/packaging/linux/package-validation.tests.ps1 Adds new Pester tests to validate RPM and tar.gz package naming conventions
build.psm1 Modifies bootstrap logic to conditionally install fpm (Debian/macOS only) and ensures rpmbuild is available on RPM-based systems
.github/workflows/linux-ci.yml Enables linux_packaging job with packagingChanged condition and removes commented-out code
.github/actions/test/linux-packaging/action.yml Adds module imports to load RPM packaging logic and integrates package validation tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TravisEz13 TravisEz13 marked this pull request as draft November 13, 2025 23:01
@microsoft-github-policy-service microsoft-github-policy-service bot added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Nov 16, 2025
…ll#26233)

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>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@TravisEz13 TravisEz13 force-pushed the backport/release/v7.6/26233-5661a5152 branch from 7be3d41 to de7f155 Compare November 20, 2025 02:04
@TravisEz13 TravisEz13 marked this pull request as ready for review November 20, 2025 02:04
@TravisEz13 TravisEz13 merged commit 3c51787 into PowerShell:release/v7.6 Nov 20, 2025
35 checks passed
@TravisEz13 TravisEz13 deleted the backport/release/v7.6/26233-5661a5152 branch November 20, 2025 17:54
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