[release/v7.6] Replace fpm with native rpmbuild for RPM package generation#26441
Merged
TravisEz13 merged 1 commit intoPowerShell:release/v7.6from Nov 20, 2025
Conversation
Contributor
There was a problem hiding this comment.
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-RpmSpecfunction 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.
5 tasks
12 tasks
…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>
7be3d41 to
de7f155
Compare
SeeminglyScience
approved these changes
Nov 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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
Regression
REQUIRED: Check exactly one box.
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 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
.github/workflows/linux-ci.yml
All conflicts resolved by combining the RPM packaging functionality from this backport with the GitHub Actions infrastructure from prerequisite PR #26493.