Overview of nFPM
mainfpm for creating package formats. It is designed to be used both as a standalone binary and as a Go library, making as few assumptions as possible about the host environment.repository·main·Indexed 25 days ago
https://github.com/goreleaser/nfpmnFPM is a lightweight, zero-dependency tool and Go library for creating various package formats, serving as a modern alternative to fpm. It supports generating apk, arch linux, deb, ipk, msix, and rpm packages using a single YAML configuration file. The tool includes features for architecture mapping, package signing, and shell autocompletion for bash, fish, PowerShell, and zsh.
fpm for creating package formats. It is designed to be used both as a standalone binary and as a Go library, making as few assumptions as possible about the host environment.fpm. It is designed to be simpler and faster by being written in Go, allowing it to run on any platform Go supports without requiring external software like Ruby or tar.nFPM is a Go-based packager that creates application packages in several formats including apk, arch, deb, ipk, msix, and rpm using a YAML configuration file.
To use the CLI, you typically provide a configuration file and use the package command to generate the output files.
envsubst, jsonnet, or other templating engines to generate the final configuration file.When performing a package upgrade, scripts are executed in a specific sequence. Understanding this order is critical for managing state between the old and new versions of your package.
Upgrade Execution Order:
pretrans of new package (RPM only)preinstall of new packagepostinstall of new packagepreremove of old packagepostremove of old packageposttrans of new package (RPM only)GOARCH and GOARM) or standard uname -m outputs (like x86_64 or aarch64) and converts them into the specific value required by the target package format (Debian, RPM, APK, etc.).To begin using nFPM, refer to the following official resources:
Use the nfpm init command to generate a sample nfpm.yaml configuration file. This file serves as a template for defining how your application should be packaged into formats like RPM, Deb, APK, Arch Linux, ipk, or MSIX.
By default, the command creates a file named nfpm.yaml in the current directory.
nfpm initThe nfpm Docker images are signed with cosign. To verify them:
docker pull goreleaser/nfpm
# or
docker pull ghcr.io/goreleaser/nfpmcosign verify goreleaser/nfpm
cosign verify ghcr.io/goreleaser/nfpmcosign verify goreleaser/nfpmnfpm init command. This generates a nfpm.yaml file containing a commented example configuration that you can use as a template.nfpm initYou can generate an autocompletion script for the bash shell using the nfpm completion bash command. This script requires the bash-completion package to be installed on your system.
To load completions in your current shell session immediately, use:
source <(nfpm completion bash)You can contribute directly to the main maintainer, caarlos0, using GitHub Sponsors. Contributions help support the maintainer's work on the project.
https://github.com/sponsors/caarlos0