Skip to content

[release/v7.4] Remove usage of fpm for DEB package generation - #26382

Merged
Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:release/v7.4from
TravisEz13:backport-26281
Nov 5, 2025
Merged

Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:release/v7.4from
TravisEz13:backport-26281

Conversation

@TravisEz13

Copy link
Copy Markdown
Member

Backport of #26281 to release/v7.4

Triggered by Travis Plunk (@TravisEz13) on behalf of Copilot

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

Tooling Impact

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

This change removes the dependency on fpm (Ruby gem) for DEB package generation and replaces it with the native dpkg-deb tool. This simplifies the build tooling requirements and reduces external dependencies.

Regression

  • Yes
  • No

This is not a regression but an improvement to the packaging process. It removes the fpm dependency for DEB package generation and uses native Linux tooling (dpkg-deb) instead.

Testing

The fix was verified through packaging tests that validate DEB package names and structure. The change was tested in the CI pipeline to ensure DEB packages are built correctly using dpkg-deb instead of fpm. Previous tests relied on fpm being installed, but now use dpkg-deb which is pre-installed on Debian-based systems and Mariner.

Risk

  • High
  • Medium
  • Low

High risk because this changes the core packaging tooling for DEB packages. However, dpkg-deb is the native Debian packaging tool and is more reliable than fpm. The change has been tested in the main branch and reduces complexity by removing Ruby gem dependencies.

@TravisEz13
Travis Plunk (TravisEz13) requested a review from a team as a code owner November 5, 2025 00:59
Copilot AI review requested due to automatic review settings November 5, 2025 00:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes the dependency on fpm (Effing Package Manager) for creating DEB packages and instead implements native DEB package creation using dpkg-deb. The change aligns DEB packaging with the existing native approach used for RPM packages (via rpmbuild) and macOS packages (via pkgbuild/productbuild).

Key Changes:

  • Implemented New-NativeDeb function to build DEB packages using dpkg-deb directly
  • Removed fpm and its Ruby dependencies from bootstrap process
  • Removed the now-obsolete Get-FpmArguments and Install-GlobalGem functions
  • Added test coverage for DEB package naming validation
  • Updated dependency checking to ensure dpkg-deb is available on relevant platforms

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tools/packaging/packaging.psm1 Added New-NativeDeb function for native DEB creation; removed Get-FpmArguments function; updated New-UnixPackage to use native DEB builder; updated Test-Dependencies to check for dpkg-deb instead of fpm
test/packaging/linux/package-validation.tests.ps1 Added DEB package naming validation tests; made test expectations consistent across RPM, DEB, and tar.gz tests
build.psm1 Removed Install-GlobalGem function; removed fpm-related dependencies from bootstrap; added dpkg-deb installation logic for Debian-based and Mariner systems; expanded Scenario parameter validation

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

Comment thread tools/packaging/packaging.psm1 Resolved
Comment thread tools/packaging/packaging.psm1 Resolved
Comment thread tools/packaging/packaging.psm1 Resolved
Comment thread build.psm1 Resolved
@TravisEz13 Travis Plunk (TravisEz13) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Nov 5, 2025
@TravisEz13
Travis Plunk (TravisEz13) merged commit a659c79 into PowerShell:release/v7.4 Nov 5, 2025
@TravisEz13
Travis Plunk (TravisEz13) deleted the backport-26281 branch November 5, 2025 17:18
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.

4 participants