Replace fpm with native rpmbuild for RPM package generation#26233
Merged
TravisEz13 merged 27 commits intomasterfrom Oct 20, 2025
Merged
Replace fpm with native rpmbuild for RPM package generation#26233TravisEz13 merged 27 commits intomasterfrom
TravisEz13 merged 27 commits intomasterfrom
Conversation
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.
Summary
Successfully replaced the Ruby gem
fpmwith nativerpmbuildfor generating RPM packages, eliminating the need for Ruby and associated gems when building RPM packages on RHEL, CentOS, Fedora, SUSE, and Azure Linux systems.Changes Made
Modified Files
build.psm1- Updated bootstrap logic to install fpm on Debian/macOS/Mariner, added Azure Linux supporttools/packaging/packaging.psm1- Implemented native rpmbuild support with well-documented cross-architecture build fixestools/ci.psm1- Fixed package artifacts handling for GitHub Actions.github/actions/test/linux-packaging/action.yml- Updated to explicitly import packaging modules and run validation tests.github/workflows/linux-ci.yml- Updated to trigger packaging job for packaging changesCreated Files
test/packaging/linux/package-validation.tests.ps1- Added Pester tests for package name validationKey Features
1. New-RpmSpec Function
2. Updated New-UnixPackage Function
SPECS,RPMS,BUILDROOT)3. Updated Test-Dependencies Function
4. Updated Start-PSBootstrap Function
5. Updated Linux Packaging Workflow
6. Updated Linux CI Workflow
packagingChangedoutput to changes detection joblinux_packagingjob to trigger on packaging-related changesci_builddependency to ensure build artifacts are available7. Updated New-LinuxPackage Function
8. Added Package Validation Tests
Benefits
✅ Eliminates Ruby dependency - No need for Ruby or gems on RPM-based systems (except Mariner which also builds DEBs)
✅ Native tooling - Uses standard Linux packaging tools (rpmbuild)
✅ Reduced complexity - Simpler build requirements on RHEL/CentOS/Fedora/SUSE
✅ Faster builds - No Ruby environment setup needed for pure RPM systems
✅ Backward compatible - DEB and macOS packaging unchanged
✅ Well tested - Comprehensive tests validate spec generation and RPM building
✅ CI/CD ready - Workflows updated to properly detect and run packaging jobs
✅ RPM compliant - Follows RPM spec file conventions for version formatting
✅ Cross-architecture support - Supports building arm64 RPMs on x86_64 systems without strip errors
✅ Multi-CI support - Works with both GitHub Actions and Azure DevOps
✅ Package validation - Automated Pester tests ensure package names meet requirements
✅ Better debugging - Spec file logging with collapsible GitHub Actions groups
✅ Accurate release field - Distribution appears in both release field and filename
✅ Azure Linux ready - Full support for CBL-Mariner systems for both DEB and RPM builds
✅ Well documented - Clear comments with links to RPM documentation
Testing
Created and executed comprehensive tests:
rpm -qipandrpm -qlpCode Statistics
Security Summary
No security vulnerabilities introduced:
Ready for Review ✅
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.