Skip to content

Commit 0b40697

Browse files
committed
nfpm.native_libs: Include new backend in docs/notes
1 parent 1d2c8ee commit 0b40697

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/notes/2.31.x.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ Go now compiles with trimpath to strip sandbox paths from output, allowing for r
6666
Added a new experimental `pants.backend.experimental.nfpm.native_libs` backend to complement the [`nFPM`](https://nfpm.goreleaser.com/) backend (originally added in [pants 2.23](https://github.com/pantsbuild/pants/blob/main/docs/notes/2.23.x.md#new-nfpm)). `nFPM` builds system packages, but, unlike native packaging tools, does not inspect packaged binaries to automatically record package `depends` (aka `requires`). The nFPM Native Libs backend is meant to fill that feature gap, simplifying package dependency management.
6767

6868
Initially, this backend only supports:
69-
- `rpm` packages (by inspecting the dependencies of `nfpm_rpm_package` targets;
69+
- `deb` and `rpm` packages (by inspecting the dependencies of `nfpm_deb_package` and `nfpm_rpm_package` targets);
7070
- native libraries packaged as wheels in `pex_binary` targets;
7171
- native libraries and binaries in the [`ELF`](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) format (used on linux);
7272

7373
So, this backend provides a simplified set of features from these native packaging tools:
7474
- `rpm`: `elfdeps` analyzes ELF metadata and `rpmdeps` adds the requirements to the `.rpm` file.
75+
- `deb`: `${shlibs:Depends}` and similar debian control file substitutions are handled by `dh_shlibdeps` and `dpkg-shlibdeps` tooling.
7576

7677
This backend should be platform-agnostic, allowing it to run wherever `pants` can run. To do this, it relies on the [`elfdeps`](https://github.com/python-wheel-build/elfdeps) [📦](https://pypi.org/project/elfdeps/) pure-python package (a "Python implementation of RPM `elfdeps`" with its pure-python dep [`pyelftools`](https://github.com/eliben/pyelftools) [📦](https://pypi.org/project/pyelftools/)) for analyzing `ELF` libraries.
7778
Then, for `deb` packages, this backend queries official [`debian`](https://packages.debian.org/search) or [`ubuntu`](https://packages.ubuntu.com/search) API (over HTTPS) to lookup which package(s) contain required libraries. Using the package search API avoids the local package metadata stores that can only find dependency packages if they are installed (such stores are not just distribution-specific, they are specific to a single release of a distribution).

0 commit comments

Comments
 (0)