diff --git a/internal/cmd/init.go b/internal/cmd/init.go index 8001aa5..a5a0c4e 100644 --- a/internal/cmd/init.go +++ b/internal/cmd/init.go @@ -17,7 +17,7 @@ func newInitCmd() *initCmd { cmd := &cobra.Command{ Use: "init", Aliases: []string{"i"}, - Short: "Creates a sample nfpm.yaml config file", + Short: "Creates a sample nfpm.yaml configuration file", SilenceUsage: true, SilenceErrors: true, Args: cobra.NoArgs, @@ -35,7 +35,7 @@ func newInitCmd() *initCmd { return root } -const example = `# nfpm example config file +const example = `# nfpm example configuration file # # check https://nfpm.goreleaser.com/configuration for detailed usage # diff --git a/www/docs/configuration.md b/www/docs/configuration.md index 0f7b0c3..8324bfa 100644 --- a/www/docs/configuration.md +++ b/www/docs/configuration.md @@ -177,7 +177,8 @@ contents: dst: /usr/bin/foo type: symlink - # Corresponds to `%config(noreplace)` if the packager is rpm, otherwise it is just a config file + # Corresponds to `%config(noreplace)` if the packager is rpm, otherwise it + # is just a config file - src: path/to/local/bar.conf dst: /etc/bar.conf type: config|noreplace @@ -199,7 +200,8 @@ contents: - dst: /var/log/boo.log type: ghost - # You can use the packager field to add files that are unique to a specific packager + # You can use the packager field to add files that are unique to a specific + # packager - src: path/to/rpm/file.conf dst: /etc/file.conf type: config|noreplace @@ -245,10 +247,12 @@ scripts: preremove: ./scripts/preremove.sh postremove: ./scripts/postremove.sh -# All fields above marked as `overridable` can be overridden for a given package format in this section. +# All fields above marked as `overridable` can be overridden for a given +# package format in this section. overrides: - # 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. + # 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. deb: depends: - baz (>= 1.2.3-0) @@ -268,7 +272,8 @@ overrides: # Custom configuration applied only to the RPM packager. rpm: - # rpm specific architecture name that overrides "arch" without performing any replacements. + # rpm specific architecture name that overrides "arch" without performing any + # replacements. rpm_arch: ia64 # RPM specific scripts. @@ -302,6 +307,7 @@ rpm: # to $NFPM_PASSPHRASE. # This will expand any env var you set in the field, e.g. key_file: ${SIGNING_KEY_FILE} key_file: key.gpg + # 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 @@ -317,8 +323,10 @@ deb: scripts: # Deb rules script. rules: foo.sh + # Deb templates file, when using debconf. templates: templates + # Deb config maintainer script for asking questions when using debconf. config: config @@ -328,6 +336,7 @@ deb: # (also available: interest_await, interest_noawait) interest: - some-trigger-name + # activate a trigger for another package # (also available: activate_await, activate_noawait) activate: @@ -347,14 +356,17 @@ deb: # Signature method, either "dpkg-sig" or "debsign". # Defaults to "debsign" method: dpkg-sig + # PGP secret key (can also be ASCII-armored). The passphrase is taken # from the environment variable $NFPM_DEB_PASSPHRASE with a fallback # to $NFPM_PASSPHRASE. # This will expand any env var you set in the field, e.g. key_file: ${SIGNING_KEY_FILE} 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 + # 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, e.g. key_id: ${DEB_SIGNING_KEY_ID} @@ -375,10 +387,12 @@ apk: # to $NFPM_PASSPHRASE. # This will expand any env var you set in the field, e.g. key_file: ${SIGNING_KEY_FILE} 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/.rsa.pub. # If unset, it defaults to the maintainer email address. key_name: origin + # APK does not use pgp keys, so the key_id field is ignored. key_id: ignored @@ -387,6 +401,7 @@ archlinux: # 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 @@ -395,10 +410,9 @@ archlinux: scripts: # The preupgrade script runs before pacman upgrades the package preupgrade: ./scripts/preupgrade.sh + # The postupgrade script runs after pacman upgrades the package postupgrade: ./scripts/postupgrade.sh - - ``` ## Templating @@ -410,13 +424,15 @@ or apply some other templating on top of it. ## JSON Schema -nFPM also has a [jsonschema][] file which you can use to have better editor support: +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. +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! diff --git a/www/docs/index.md b/www/docs/index.md index c5ac7c3..76ff64b 100644 --- a/www/docs/index.md +++ b/www/docs/index.md @@ -17,8 +17,8 @@ So I decided to create nFPM: a **simpler**, **0-dependency**, ## nFPM is not FPM -This is a subtle way of saying it wont have all features, nor all -formats that fpm has: it is supposed to be simpler. +This is a subtle way of saying it won't have all features, nor all +formats that `fpm` has: it is supposed to be simpler. And that's OK!, most of us don't need all those features most of the time. diff --git a/www/docs/install.md b/www/docs/install.md index 8dd78f1..d586d45 100644 --- a/www/docs/install.md +++ b/www/docs/install.md @@ -1,6 +1,7 @@ # Install -You can install the pre-compiled binary (in several different ways), use Docker or compile from source. +You can install the pre-compiled binary (in several ways), use Docker +or compile from source. Bellow you can find the steps for each of them. @@ -50,7 +51,8 @@ sudo yum install nfpm ### deb, apk and rpm packages -Download the `.deb`, `.rpm` or `.apk` from the [releases page][releases] and install them with the appropriate tools. +Download the `.deb`, `.rpm` or `.apk` from the [releases page][releases] and +install them with the appropriate tools. ### go install @@ -60,15 +62,17 @@ go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest ### manually -Download the pre-compiled binaries from the [releases page][releases] and copy them to the desired location. +Download the pre-compiled binaries from the [releases page][releases] and copy +them to the desired location. ## Verifying the artifacts ### binaries -All artifacts are checksummed and the checksum is signed with [cosign][]. +All artifacts are checksummed, and the checksum is signed with [cosign][]. -1. Download the files you want, the `checksums.txt` and `checksums.txt.sig` files from the [releases][releases] page: +1. Download the files you want, the `checksums.txt` and `checksums.txt.sig` + files from the [releases][releases] page: ```sh wget https://github.com/goreleaser/nfpm/releases/download/__VERSION__/checksums.txt wget https://github.com/goreleaser/nfpm/releases/download/__VERSION__/checksums.txt.sig @@ -80,7 +84,8 @@ All artifacts are checksummed and the checksum is signed with [cosign][]. --signature checksums.txt.sig \ checksums.txt ``` -1. If the signature is valid, you can then verify the SHA256 sums match with the downloaded binary: +1. If the signature is valid, you can then verify the SHA256 sums match with the + downloaded binary: ```sh sha256sum --ignore-missing -c checksums.txt ``` @@ -108,11 +113,16 @@ docker run --rm -v $PWD:/tmp -w /tmp goreleaser/nfpm package \ --packager deb ``` +## Packaging status + +[![Packaging status](https://repology.org/badge/vertical-allrepos/nfpm.svg)](https://repology.org/project/nfpm/versions) + ## Compiling from source Here you have two options: -If you want to contribute to the project, please follow the steps on our [contributing guide](/contributing). +If you want to contribute to the project, please follow the steps on our +[contributing guide](/contributing). If you just want to build from source for whatever reason, follow these steps: diff --git a/www/docs/sponsors.md b/www/docs/sponsors.md index 1d40fa2..eecbe7b 100644 --- a/www/docs/sponsors.md +++ b/www/docs/sponsors.md @@ -1,25 +1,32 @@ # Sponsoring the Project Does you or your company use nFPM? -You can help keep the project bug-free and feature rich by sponsoring the project and the maintainers. +You can help keep the project bug-free and feature rich by sponsoring the +project and the maintainers. ## GitHub Sponsors -GitHub Sponsors is a great way to contribute directly to the main maintainer, [caarlos0](https://github.com/caarlos0). +GitHub Sponsors is a great way to contribute directly to the main maintainer, +[caarlos0](https://github.com/caarlos0). This money usually goes to buying coffee, beer, better hardware and such. -You can sponsor and see who's sponsoring Carlos [here](https://github.com/sponsors/caarlos0). +You can sponsor and see who's sponsoring Carlos +[here](https://github.com/sponsors/caarlos0). ## OpenCollective -OpenCollective is a great way to send some money towards the GoReleaser organization. +OpenCollective is a great way to send some money towards the GoReleaser +organization. -This ultimately is used to buy/renew domains, keep servers up (although right now we're on free plans), print and send stickers to other contributors among other things. +This ultimately is used to buy/renew domains, keep servers up (although right +now we're on free plans), print and send stickers to other contributors among +other things. -You can start sponsoring at the [OpenCollective website](https://opencollective.com/goreleaser). +You can start sponsoring at the +[OpenCollective website](https://opencollective.com/goreleaser). Bellow you can see a list of the current sponsors and backers on OpenCollective: diff --git a/www/docs/usage.md b/www/docs/usage.md index 3eda163..1644cf8 100644 --- a/www/docs/usage.md +++ b/www/docs/usage.md @@ -4,7 +4,7 @@ nFPM can be used both as command line tool or as a library. ## Command Line -To create a sample config file, run: +To create a sample configuration file, run: ```sh nfpm init @@ -17,7 +17,8 @@ nfpm pkg --packager deb --target /tmp/ nfpm pkg --packager rpm --target /tmp/ ``` -You can learn about it in more detail in the [command line reference section](/cmd/nfpm/). +You can learn about it in more detail in the +[command line reference section](/cmd/nfpm/). ## Go Library