2020-07-10 07:06:39 +02:00
|
|
|
# Configuration
|
|
|
|
|
2020-07-10 07:16:16 +02:00
|
|
|
## Reference
|
|
|
|
|
2022-11-24 14:12:00 +01:00
|
|
|
A commented `nfpm.yaml` config file example:
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
```yaml
|
|
|
|
# Name. (required)
|
|
|
|
name: foo
|
|
|
|
|
|
|
|
# Architecture. (required)
|
2021-10-13 02:05:28 +02:00
|
|
|
# This will expand any env var you set in the field, eg version: ${GOARCH}
|
2021-11-06 18:04:50 +01:00
|
|
|
# The architecture is specified using Go nomenclature (GOARCH) and translated
|
|
|
|
# to the platform specific equivalent. In order to manually set the architecture
|
|
|
|
# to a platform specific value, use deb_arch, rpm_arch and apk_arch.
|
2022-11-24 14:12:00 +01:00
|
|
|
# Examples: `all`, `amd64`, `386`, `arm5`, `arm6`, `arm7`, `arm64`, `mips`,
|
|
|
|
# `mipsle`, `mips64le`, `ppc64le`, `s390`
|
2020-07-10 07:06:39 +02:00
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
# Platform.
|
2022-11-24 14:12:00 +01:00
|
|
|
# This is only used by the rpm packager.
|
|
|
|
# Examples: `linux` (default), `darwin`
|
2020-07-10 07:06:39 +02:00
|
|
|
platform: linux
|
|
|
|
|
|
|
|
# Version. (required)
|
2021-01-14 19:32:10 +01:00
|
|
|
# This will expand any env var you set in the field, eg version: v${SEMVER}
|
2020-07-10 07:06:39 +02:00
|
|
|
version: v1.2.3
|
|
|
|
|
2021-04-23 02:36:16 +02:00
|
|
|
# Version Schema allows you to specify how to parse the version String.
|
|
|
|
# Default is `semver`
|
2022-11-24 14:12:00 +01:00
|
|
|
# `semver` attempt to parse the version string as a valid semver version.
|
|
|
|
# The parser is lenient; it will strip a `v` prefix and will accept
|
|
|
|
# versions with fewer than 3 components, like `v1.2`.
|
|
|
|
# If parsing succeeds, then the version will be molded into a format
|
|
|
|
# compatible with the specific packager used.
|
|
|
|
# If parsing fails, then the version is used as-is.
|
2021-04-23 02:36:16 +02:00
|
|
|
# `none` skip trying to parse the version string and just use what is passed in
|
|
|
|
version_schema: semver
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Version Epoch.
|
2022-11-24 14:12:00 +01:00
|
|
|
# A package with a higher version epoch will always be considered newer.
|
|
|
|
# See: https://www.debian.org/doc/debian-policy/ch-controlfields.html#epochs-should-be-used-sparingly
|
2020-07-10 07:06:39 +02:00
|
|
|
epoch: 2
|
|
|
|
|
|
|
|
# Version Prerelease.
|
|
|
|
# Default is extracted from `version` if it is semver compatible.
|
2022-11-24 14:12:00 +01:00
|
|
|
# This is appended to the `version`, e.g. `1.2.3+beta1`. If the `version` is
|
|
|
|
# semver compatible, then this replaces the prerelease component of the semver.
|
2020-07-10 07:06:39 +02:00
|
|
|
prerelease: beta1
|
|
|
|
|
2020-08-20 06:00:17 +02:00
|
|
|
# Version Metadata (previously deb.metadata).
|
|
|
|
# Default is extracted from `version` if it is semver compatible.
|
2022-11-24 14:12:00 +01:00
|
|
|
# Setting metadata might interfere with version comparisons depending on the
|
|
|
|
# packager. If the `version` is semver compatible, then this replaces the
|
|
|
|
# version metadata component of the semver.
|
2020-08-20 06:00:17 +02:00
|
|
|
version_metadata: git
|
|
|
|
|
2022-11-24 14:12:00 +01:00
|
|
|
# Version Release, aka revision.
|
2021-01-14 19:32:10 +01:00
|
|
|
# This will expand any env var you set in the field, eg release: ${VERSION_RELEASE}
|
2022-11-24 14:12:00 +01:00
|
|
|
# This is appended to the `version` after `prerelease`. This should be
|
|
|
|
# incremented if you release an updated package of the same upstream version,
|
|
|
|
# and it should reset to 1 when bumping the version.
|
2020-08-20 06:00:17 +02:00
|
|
|
release: 1
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Section.
|
2022-11-24 14:12:00 +01:00
|
|
|
# This is only used by the deb packager.
|
|
|
|
# See: https://www.debian.org/doc/debian-policy/ch-archive.html#sections
|
2020-07-10 07:06:39 +02:00
|
|
|
section: default
|
|
|
|
|
|
|
|
# Priority.
|
2021-10-11 14:50:43 +02:00
|
|
|
# Defaults to `optional` on deb
|
|
|
|
# Defaults to empty on rpm and apk
|
2022-11-24 14:12:00 +01:00
|
|
|
# See: https://www.debian.org/doc/debian-policy/ch-archive.html#priorities
|
2020-07-10 07:06:39 +02:00
|
|
|
priority: extra
|
|
|
|
|
2022-11-24 14:12:00 +01:00
|
|
|
# Maintainer. (required)
|
2022-03-18 04:07:12 +01:00
|
|
|
# This will expand any env var you set in the field, eg maintainer: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}>
|
2021-10-11 14:50:43 +02:00
|
|
|
# Defaults to empty on rpm and apk
|
2021-11-12 02:58:59 +01:00
|
|
|
# Leaving the 'maintainer' field unset will not be allowed in a future version
|
2020-07-10 07:06:39 +02:00
|
|
|
maintainer: Carlos Alexandro Becker <root@carlosbecker.com>
|
|
|
|
|
|
|
|
# Description.
|
|
|
|
# Defaults to `no description given`.
|
2022-11-24 14:12:00 +01:00
|
|
|
# Most packagers call for a one-line synopsis of the package. Some (like deb)
|
|
|
|
# also call for a multi-line description starting on the second line.
|
2020-07-10 07:06:39 +02:00
|
|
|
description: Sample package
|
|
|
|
|
|
|
|
# Vendor.
|
2021-11-19 18:08:38 +01:00
|
|
|
# This will expand any env var you set in the field, eg vendor: ${VENDOR}
|
2022-11-24 14:12:00 +01:00
|
|
|
# This is only used by the rpm packager.
|
2020-07-10 07:06:39 +02:00
|
|
|
vendor: GoReleaser
|
|
|
|
|
|
|
|
# Package's homepage.
|
|
|
|
homepage: https://nfpm.goreleaser.com
|
|
|
|
|
|
|
|
# License.
|
|
|
|
license: MIT
|
|
|
|
|
2020-07-13 17:10:03 +02:00
|
|
|
# Changelog YAML file, see: https://github.com/goreleaser/chglog
|
|
|
|
changelog: "changelog.yaml"
|
|
|
|
|
2020-11-10 13:37:29 +01:00
|
|
|
# Disables globbing for files, config_files, etc.
|
|
|
|
disable_globbing: false
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Packages it replaces. (overridable)
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
# This will expand any env var you set in the field, eg ${REPLACE_BLA}
|
|
|
|
# the env var approach can be used to account for differences in platforms
|
2020-07-10 07:06:39 +02:00
|
|
|
replaces:
|
2020-09-01 21:27:29 +02:00
|
|
|
- foobar
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
- ${REPLACE_BLA}
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Packages it provides. (overridable)
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
# This will expand any env var you set in the field, eg ${PROVIDES_BLA}
|
|
|
|
# the env var approach can be used to account for differences in platforms
|
2020-07-10 07:06:39 +02:00
|
|
|
provides:
|
2020-09-01 21:27:29 +02:00
|
|
|
- bar
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
- ${PROVIDES_BLA}
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Dependencies. (overridable)
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
# This will expand any env var you set in the field, eg ${DEPENDS_NGINX}
|
|
|
|
# the env var approach can be used to account for differences in platforms
|
|
|
|
# eg rhel needs nginx >= 1:1.18 and deb needs nginx (>= 1.18.0)
|
2020-07-10 07:06:39 +02:00
|
|
|
depends:
|
2020-09-01 21:27:29 +02:00
|
|
|
- git
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
- ${DEPENDS_NGINX}
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Recommended packages. (overridable)
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
# This will expand any env var you set in the field, eg ${RECOMMENDS_BLA}
|
|
|
|
# the env var approach can be used to account for differences in platforms
|
2020-07-10 07:06:39 +02:00
|
|
|
recommends:
|
2020-09-01 21:27:29 +02:00
|
|
|
- golang
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
- ${RECOMMENDS_BLA}
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Suggested packages. (overridable)
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
# This will expand any env var you set in the field, eg ${SUGGESTS_BLA}
|
|
|
|
# the env var approach can be used to account for differences in platforms
|
2020-07-10 07:06:39 +02:00
|
|
|
suggests:
|
2020-09-01 21:27:29 +02:00
|
|
|
- bzr
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Packages it conflicts with. (overridable)
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
# This will expand any env var you set in the field, eg ${CONFLICTS_BLA}
|
|
|
|
# the env var approach can be used to account for differences in platforms
|
2020-07-10 07:06:39 +02:00
|
|
|
conflicts:
|
2020-09-01 21:27:29 +02:00
|
|
|
- mercurial
|
feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* feat: allow env expansion in conflicts, suggests, recommends, depends, provides, and replaces. Ensuring empty env vars get stripped to not cause issues
* added test for boolean dependencies for rpm, deb, and apk.
* fix: fork rpmpack to make it easier to add features and adapt it
* test: fix linter issues
* test: fix ruleguard issues
2022-09-24 19:07:11 +02:00
|
|
|
- ${CONFLICTS_BLA}
|
2020-12-30 20:15:16 +01:00
|
|
|
|
2020-12-15 17:47:00 +01:00
|
|
|
# Contents to add to the package
|
2020-07-10 07:06:39 +02:00
|
|
|
# This can be binaries or any other files.
|
2020-12-15 17:47:00 +01:00
|
|
|
contents:
|
2020-12-30 20:15:16 +01:00
|
|
|
# Basic file that applies to all packagers
|
2020-12-15 17:47:00 +01:00
|
|
|
- src: path/to/local/foo
|
|
|
|
dst: /usr/local/bin/foo
|
2020-12-30 20:15:16 +01:00
|
|
|
|
|
|
|
# Simple config file
|
2020-12-15 17:47:00 +01:00
|
|
|
- src: path/to/local/foo.conf
|
|
|
|
dst: /etc/foo.conf
|
|
|
|
type: config
|
2020-12-30 20:15:16 +01:00
|
|
|
|
2022-11-24 14:12:00 +01:00
|
|
|
# Select files with a glob (doesn't work if you set disable_globbing: true).
|
|
|
|
# If `src` is a glob, then the `dst` will be treated like a directory - even
|
|
|
|
# if it doesn't end with `/`, and even if the glob only matches one file.
|
|
|
|
- src: path/to/local/*.1.gz
|
|
|
|
dst: /usr/share/man/man1/
|
|
|
|
|
2021-01-30 16:47:01 +01:00
|
|
|
# Simple symlink at /usr/local/bin/foo which points to /sbin/foo, which is
|
|
|
|
# the same behaviour as `ln -s /sbin/foo /usr/local/bin/foo`.
|
|
|
|
#
|
|
|
|
# This also means that both "src" and "dst" are paths inside the package (or
|
|
|
|
# rather paths in the file system where the package will be installed) and
|
|
|
|
# not in the build environment. This is different from regular files where
|
|
|
|
# "src" is a path in the build environment. However, this convention results
|
|
|
|
# in "dst" always being the file that is created when installing the
|
|
|
|
# package.
|
|
|
|
- src: /actual/path/to/foo
|
|
|
|
dst: /usr/bin/foo
|
2020-12-30 20:15:16 +01:00
|
|
|
type: symlink
|
|
|
|
|
|
|
|
# Corresponds to `%config(noreplace)` if the packager is rpm, otherwise it is just a config file
|
2020-12-15 17:47:00 +01:00
|
|
|
- src: path/to/local/bar.conf
|
|
|
|
dst: /etc/bar.conf
|
2020-12-30 20:15:16 +01:00
|
|
|
type: config|noreplace
|
|
|
|
|
|
|
|
# These files are not actually present in the package, but the file names
|
|
|
|
# are added to the package header. From the RPM directives documentation:
|
|
|
|
#
|
|
|
|
# "There are times when a file should be owned by the package but not
|
|
|
|
# installed - log files and state files are good examples of cases you might
|
|
|
|
# desire this to happen."
|
|
|
|
#
|
|
|
|
# "The way to achieve this, is to use the %ghost directive. By adding this
|
|
|
|
# directive to the line containing a file, RPM will know about the ghosted
|
|
|
|
# file, but will not add it to the package."
|
|
|
|
#
|
|
|
|
# For non rpm packages ghost files are ignored at this time.
|
2020-12-15 17:47:00 +01:00
|
|
|
- dst: /etc/casper.conf
|
|
|
|
type: ghost
|
|
|
|
- dst: /var/log/boo.log
|
|
|
|
type: ghost
|
2020-12-30 20:15:16 +01:00
|
|
|
|
|
|
|
# You can user the packager field to add files that are unique to a specific packager
|
2020-12-15 17:47:00 +01:00
|
|
|
- src: path/to/rpm/file.conf
|
|
|
|
dst: /etc/file.conf
|
2020-12-30 20:15:16 +01:00
|
|
|
type: config|noreplace
|
2020-12-15 17:47:00 +01:00
|
|
|
packager: rpm
|
|
|
|
- src: path/to/deb/file.conf
|
|
|
|
dst: /etc/file.conf
|
2020-12-30 20:15:16 +01:00
|
|
|
type: config|noreplace
|
2020-12-15 17:47:00 +01:00
|
|
|
packager: deb
|
|
|
|
- src: path/to/apk/file.conf
|
|
|
|
dst: /etc/file.conf
|
2020-12-30 20:15:16 +01:00
|
|
|
type: config|noreplace
|
2020-12-15 17:47:00 +01:00
|
|
|
packager: apk
|
2020-12-30 20:15:16 +01:00
|
|
|
|
|
|
|
# Sometimes it is important to be able to set the mtime, mode, owner, or group for a file
|
2021-11-12 02:58:59 +01:00
|
|
|
# that differs from what is on the local build system at build time. The owner (if different
|
|
|
|
# than 'root') has to be always specified manually in 'file_info' as it will not be copied
|
|
|
|
# from the 'src' file.
|
2020-12-15 17:47:00 +01:00
|
|
|
- src: path/to/foo
|
|
|
|
dst: /usr/local/foo
|
|
|
|
file_info:
|
2021-11-06 18:07:18 +01:00
|
|
|
# Make sure that the mode is specified in octal, e.g. 0644 instead of 644.
|
2020-12-15 17:47:00 +01:00
|
|
|
mode: 0644
|
|
|
|
mtime: 2008-01-02T15:04:05Z
|
|
|
|
owner: notRoot
|
|
|
|
group: notRoot
|
|
|
|
|
2021-11-12 02:58:59 +01:00
|
|
|
# Using the type 'dir', empty directories can be created. When building RPMs, however, this
|
|
|
|
# type has another important purpose: Claiming ownership of that folder. This is important
|
|
|
|
# because when upgrading or removing an RPM package, only the directories for which it has
|
|
|
|
# claimed ownership are removed. However, you should not claim ownership of a folder that
|
|
|
|
# is created by the distro or a dependency of your package.
|
|
|
|
# A directory in the build environment can optionally be provided in the 'src' field in
|
2021-11-14 03:21:22 +01:00
|
|
|
# order copy mtime and mode from that directory without having to specify it manually.
|
2021-11-12 02:58:59 +01:00
|
|
|
- dst: /some/dir
|
|
|
|
type: dir
|
|
|
|
file_info:
|
|
|
|
mode: 0700
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Scripts to run at specific stages. (overridable)
|
|
|
|
scripts:
|
|
|
|
preinstall: ./scripts/preinstall.sh
|
|
|
|
postinstall: ./scripts/postinstall.sh
|
|
|
|
preremove: ./scripts/preremove.sh
|
|
|
|
postremove: ./scripts/postremove.sh
|
|
|
|
|
2022-02-21 19:53:33 +01:00
|
|
|
# All fields above marked as `overridable` can be overridden for a given package format in this section.
|
2020-08-17 22:53:49 +02:00
|
|
|
overrides:
|
2020-08-18 21:14:13 +02:00
|
|
|
# The depends override can for example be used to provide version constraints for dependencies where
|
|
|
|
# different package formats use different versions or for dependencies that are named differently.
|
2020-08-17 22:53:49 +02:00
|
|
|
deb:
|
2020-08-18 21:14:13 +02:00
|
|
|
depends:
|
|
|
|
- baz (>= 1.2.3-0)
|
|
|
|
- some-lib-dev
|
2020-08-17 22:53:49 +02:00
|
|
|
# ...
|
|
|
|
rpm:
|
2020-08-18 21:14:13 +02:00
|
|
|
depends:
|
|
|
|
- baz >= 1.2.3-0
|
|
|
|
- some-lib-devel
|
2020-08-17 22:53:49 +02:00
|
|
|
# ...
|
|
|
|
apk:
|
|
|
|
# ...
|
2022-10-15 19:54:36 +02:00
|
|
|
archlinux:
|
|
|
|
depends:
|
|
|
|
- baz
|
|
|
|
- some-lib
|
2020-08-17 22:53:49 +02:00
|
|
|
|
2020-11-08 21:10:27 +01:00
|
|
|
# Custom configuration applied only to the RPM packager.
|
2020-07-10 07:06:39 +02:00
|
|
|
rpm:
|
2021-11-06 18:04:50 +01:00
|
|
|
# rpm specific architecture name that overrides "arch" without performing any replacements.
|
|
|
|
rpm_arch: ia64
|
|
|
|
|
2021-04-22 20:48:06 +02:00
|
|
|
# RPM specific scripts.
|
|
|
|
scripts:
|
|
|
|
# The pretrans script runs before all RPM package transactions / stages.
|
|
|
|
pretrans: ./scripts/pretrans.sh
|
|
|
|
# The posttrans script runs after all RPM package transactions / stages.
|
|
|
|
posttrans: ./scripts/posttrans.sh
|
|
|
|
|
2020-08-04 20:41:54 +02:00
|
|
|
# The package group. This option is deprecated by most distros
|
|
|
|
# but required by old distros like CentOS 5 / EL 5 and earlier.
|
|
|
|
group: Unspecified
|
2020-07-10 07:06:39 +02:00
|
|
|
|
2020-11-08 18:49:40 +01:00
|
|
|
# The package summary. This is, by default, the first line of the
|
|
|
|
# description, but can be explicitly provided here.
|
|
|
|
summary: Explicit Summary for Sample Package
|
|
|
|
|
2021-11-30 19:56:10 +01:00
|
|
|
# The packager is used to identify the organization that actually packaged
|
|
|
|
# the software, as opposed to the author of the software.
|
|
|
|
# `maintainer` will be used as fallback if not specified.
|
|
|
|
# This will expand any env var you set in the field, eg packager: ${PACKAGER}
|
|
|
|
packager: GoReleaser <staff@goreleaser.com>
|
|
|
|
|
2021-09-04 15:24:52 +02:00
|
|
|
# Compression algorithm (gzip (default), lzma or xz).
|
2020-07-10 07:06:39 +02:00
|
|
|
compression: lzma
|
|
|
|
|
2020-09-17 14:18:44 +02:00
|
|
|
# The package is signed if a key_file is set
|
|
|
|
signature:
|
|
|
|
# PGP secret key (can also be ASCII-armored), the passphrase is taken
|
|
|
|
# from the environment variable $NFPM_RPM_PASSPHRASE with a fallback
|
2021-04-08 20:15:11 +02:00
|
|
|
# to $NFPM_PASSPHRASE.
|
2021-01-14 19:32:10 +01:00
|
|
|
# This will expand any env var you set in the field, eg key_file: ${SIGNING_KEY_FILE}
|
2020-09-17 14:18:44 +02:00
|
|
|
key_file: key.gpg
|
2021-04-08 20:15:11 +02:00
|
|
|
# PGP secret key id in hex format, if it is not set it will select the first subkey
|
|
|
|
# that has the signing flag set. You may need to set this if you want to use the primary key as the signing key
|
|
|
|
# or to support older versions of RPM < 4.13.0 which cannot validate a signed RPM that used a subkey to sign
|
|
|
|
# This will expand any env var you set in the field, eg key_id: ${RPM_SIGNING_KEY_ID}
|
|
|
|
key_id: bc8acdd415bd80b3
|
2020-09-17 14:18:44 +02:00
|
|
|
|
2020-11-03 13:44:59 +01:00
|
|
|
# Custom configuration applied only to the Deb packager.
|
2020-07-10 07:06:39 +02:00
|
|
|
deb:
|
2021-11-06 18:04:50 +01:00
|
|
|
# deb specific architecture name that overrides "arch" without performing any replacements.
|
|
|
|
deb_arch: arm
|
|
|
|
|
2020-11-03 13:44:59 +01:00
|
|
|
# Custom deb special files.
|
2020-07-10 07:06:39 +02:00
|
|
|
scripts:
|
2020-11-03 13:44:59 +01:00
|
|
|
# Deb rules script.
|
2020-07-10 07:06:39 +02:00
|
|
|
rules: foo.sh
|
2020-11-03 13:44:59 +01:00
|
|
|
# Deb templates file, when using debconf.
|
|
|
|
templates: templates
|
2021-04-14 16:43:42 +02:00
|
|
|
# Deb config maintainer script for asking questions when using debconf.
|
|
|
|
config: config
|
2020-07-27 18:22:06 +02:00
|
|
|
|
|
|
|
# Custom deb triggers
|
|
|
|
triggers:
|
2022-02-21 19:53:33 +01:00
|
|
|
# register interest on a trigger activated by another package
|
2020-07-27 18:22:06 +02:00
|
|
|
# (also available: interest_await, interest_noawait)
|
|
|
|
interest:
|
|
|
|
- some-trigger-name
|
|
|
|
# activate a trigger for another package
|
|
|
|
# (also available: activate_await, activate_noawait)
|
|
|
|
activate:
|
|
|
|
- another-trigger-name
|
2020-09-01 21:27:29 +02:00
|
|
|
|
|
|
|
# Packages which would break if this package would be installed.
|
|
|
|
# The installation of this package is blocked if `some-package`
|
|
|
|
# is already installed.
|
|
|
|
breaks:
|
|
|
|
- some-package
|
2020-09-17 14:18:44 +02:00
|
|
|
|
2021-09-04 15:24:52 +02:00
|
|
|
# Compression algorithm (gzip (default), xz or none).
|
|
|
|
compression: xz
|
|
|
|
|
2020-09-17 14:18:44 +02:00
|
|
|
# The package is signed if a key_file is set
|
|
|
|
signature:
|
2022-06-12 04:32:07 +02:00
|
|
|
# Signature method, either "dpkg-sig" or "debsign".
|
|
|
|
# Defaults to "debsign"
|
|
|
|
method: dpkg-sig
|
2020-09-17 14:18:44 +02:00
|
|
|
# PGP secret key (can also be ASCII-armored). The passphrase is taken
|
|
|
|
# from the environment variable $NFPM_DEB_PASSPHRASE with a fallback
|
2021-04-08 20:15:11 +02:00
|
|
|
# to $NFPM_PASSPHRASE.
|
2021-01-14 19:32:10 +01:00
|
|
|
# This will expand any env var you set in the field, eg key_file: ${SIGNING_KEY_FILE}
|
2020-09-17 14:18:44 +02:00
|
|
|
key_file: key.gpg
|
|
|
|
# The type describes the signers role, possible values are "origin",
|
|
|
|
# "maint" and "archive". If unset, the type defaults to "origin".
|
|
|
|
type: origin
|
2021-04-08 20:15:11 +02:00
|
|
|
# PGP secret key id in hex format, if it is not set it will select the first subkey
|
|
|
|
# that has the signing flag set. You may need to set this if you want to use the primary key as the signing key
|
|
|
|
# This will expand any env var you set in the field, eg key_id: ${DEB_SIGNING_KEY_ID}
|
|
|
|
key_id: bc8acdd415bd80b3
|
2020-09-17 14:18:44 +02:00
|
|
|
|
2022-04-06 19:38:10 +02:00
|
|
|
# Additional fields for the control file. Empty fields are ignored.
|
|
|
|
fields:
|
|
|
|
Bugs: https://github.com/goreleaser/nfpm/issues
|
|
|
|
|
2020-09-17 14:18:44 +02:00
|
|
|
apk:
|
2021-11-06 18:04:50 +01:00
|
|
|
# apk specific architecture name that overrides "arch" without performing any replacements.
|
|
|
|
apk_arch: armhf
|
|
|
|
|
2020-09-17 14:18:44 +02:00
|
|
|
# The package is signed if a key_file is set
|
|
|
|
signature:
|
|
|
|
# RSA private key in the PEM format. The passphrase is taken from
|
|
|
|
# the environment variable $NFPM_APK_PASSPHRASE with a fallback
|
2021-04-08 20:15:11 +02:00
|
|
|
# to $NFPM_PASSPHRASE.
|
2021-01-14 19:32:10 +01:00
|
|
|
# This will expand any env var you set in the field, eg key_file: ${SIGNING_KEY_FILE}
|
2020-09-17 14:18:44 +02:00
|
|
|
key_file: key.gpg
|
|
|
|
# The name of the signing key. When verifying a package, the signature
|
|
|
|
# is matched to the public key store in /etc/apk/keys/<key_name>.rsa.pub.
|
|
|
|
# If unset, it defaults to the maintainer email address.
|
|
|
|
key_name: origin
|
2021-04-08 20:15:11 +02:00
|
|
|
# APK does not use pgp keys, so the key_id field is ignored.
|
|
|
|
key_id: ignored
|
2022-10-15 19:54:36 +02:00
|
|
|
|
|
|
|
archlinux:
|
|
|
|
# This value is used to specify the name used to refer to a group
|
|
|
|
# of packages when building a split package. Defaults to name
|
|
|
|
# See: https://wiki.archlinux.org/title/PKGBUILD#pkgbase
|
|
|
|
pkgbase: bar
|
|
|
|
# The packager identifies the organization packaging the software
|
|
|
|
# rather than the developer. Defaults to "Unknown Packager".
|
|
|
|
packager: GoReleaser <staff@goreleaser.com>
|
|
|
|
|
|
|
|
# Arch Linux specific scripts.
|
|
|
|
scripts:
|
|
|
|
# The postupgrade script runs before pacman upgrades the package
|
|
|
|
preupgrade: ./scripts/preupgrade.sh
|
|
|
|
# The postupgrade script runs after pacman upgrades the package
|
|
|
|
postupgrade: ./scripts/postupgrade.sh
|
|
|
|
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Templating
|
|
|
|
|
|
|
|
Templating is not and will not be supported.
|
|
|
|
|
2021-06-27 03:01:53 +02:00
|
|
|
If you really need it, you can build on top of nFPM, use `envsubst`, `jsonnet`
|
2020-07-10 07:16:16 +02:00
|
|
|
or apply some other templating on top of it.
|
2021-07-07 19:20:34 +02:00
|
|
|
|
|
|
|
## JSON Schema
|
|
|
|
|
|
|
|
nFPM also has a [jsonschema][] file which you can use to have better editor support:
|
|
|
|
|
|
|
|
```
|
|
|
|
https://nfpm.goreleaser.com/schema.json
|
|
|
|
```
|
|
|
|
|
|
|
|
You can also generate it for your specific version using the [`nfpm jsonschema`][schema] command.
|
|
|
|
|
|
|
|
Note that it is in early stages.
|
|
|
|
Any help and/or feedback is greatly appreciated!
|
|
|
|
|
|
|
|
[jsonschema]: http://json-schema.org/draft/2020-12/json-schema-validation.html
|
|
|
|
[schema]: /cmd/nfpm_jsonschema/
|