-
Notifications
You must be signed in to change notification settings - Fork 8.1k
[release/v7.6] Replace fpm with native rpmbuild for RPM package generation #26441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/v7.6] Replace fpm with native rpmbuild for RPM package generation #26441
Conversation
There was a problem hiding this 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-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.
…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
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.