1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-05 07:46:15 +02:00
Commit Graph

115 Commits

Author SHA1 Message Date
nickajacks1 d0d7c60d34
feat(rpm): add support for verify scriptlet (#788)
Co-authored-by: Nicholas Jackson <nicholas.jackson@zii.aero>
2024-02-21 20:13:30 -03:00
Carlos Alexandro Becker c2fe69eec0
fix: modtime (#758)
closes #757
2023-12-26 08:51:38 -03:00
Carlos Alexandro Becker 2c8f9e0d70
fix: config merge
closes #750

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-10 12:35:57 -03:00
Carlos Alexandro Becker 9c4fc0e886
feat: reproducible packages (#748)
* feat: allow to set a build date

defaults to $SOURCE_DATE_EPOCH

closes #744
closes #734

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: rename to mtime

* docs: fix systemd note

closes #739

* fix: improve arch packager

* fix: arch test

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: improve apk packager

* fix: improve deb special files

* fix: reuse keys func

* fix: deps

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-07 13:58:36 -03:00
Carlos Alexandro Becker f1b22763a1
docs: fix jsonschema
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-10-17 17:44:54 +00:00
Carlos Alexandro Becker 61d7e9d67b
feat: env expand contents (#721)
* feat: env expand contents

closes #719

* fix: expand

* docs: update
2023-10-17 12:45:24 -03:00
Jeremy Gill 3aded351f4
feat: add minimal support for Debian pre-dependencies (#696)
* feat: add minimal support for Debian pre-dependencies

Basic support for adding 'Pre-Depends:' to Debian packages added.

* Make Predefined a debian-specific modification

Based on feedback from @caarlos0.

* Add some coverage of pre-depend Debian field in unit tests

* Update the configuration example to include Debian-specific predepends reference
2023-08-15 15:18:58 -03:00
Andrew Lytvynov 24a43c5ad7
feat: add support for remote signing keys (#695)
* feat: Add support for remote signing keys

When used as a library, `nfpm.PackageSignature.SignFn` can be set as an
alternative to `KeyFile`. This allows arbitrary signing key
implementations, like a remote signing server.

Updates https://github.com/tailscale/tailscale/issues/1882

* Update rpm/rpm_test.go

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-08-03 09:36:30 -03:00
Carlos Alexandro Becker 577ae45531
feat(deps): use mergo 1.0.0
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-31 16:35:07 +00:00
Ville Skyttä 562bc43c41
feat: expand env variables in homepage field (#675)
For example, GitLab CI has `CI_PROJECT_URL` which can be useful here.
2023-07-12 23:23:16 -03:00
Carlos Alexandro Becker 741acf8bcc
feat(rpm): support relocatable packages (#691)
closes #640
2023-07-11 01:39:08 -03:00
Ville Skyttä 5820ab17f6
feat: expand environment variables in deb fields values (#667) 2023-06-05 13:04:43 -03:00
Carlos Alexandro Becker 9524bb8a26
fix: mips softfloat/hardfloat handling 2023-05-24 02:34:03 +00:00
Carlos Alexandro Becker 66c3d277cf
test: fixes
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-24 02:14:30 +00:00
Carlos Alexandro Becker f64a311eef
fix: improve umask tests and documentation
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-24 01:48:56 +00:00
Carlos Alexandro Becker 8e517cca17
Merge pull request from GHSA-w7jw-q4fg-qc4c
* feat(security): adds the umask option

closes https://github.com/goreleaser/nfpm/security/advisories/GHSA-w7jw-q4fg-qc4c

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: correct bitwise op

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-23 22:45:48 -03:00
Erik G bc3e6973ea
feat: refactor contents handling and add tree content type (#618)
* feat: Refactor contents handling and add tree content type.

* fix:  Remove unnecessary deprecation warning.

* doc: Document tree type.

* fix: Remove superfluous error check.

* fix: Fix directory and symlink file info for tree content type.

* fix: Fix archlinux directories and file infos.

* fix: Early out in withChangelogIfRequested

* fix: Remove ExpandContentGlobs.
2023-02-19 10:16:51 -03:00
Anders Björklund c195d93dfb
feat: expand variables in platform field (#601)
* feat: expand variables in platform field

Surprising that GOARCH was expanded, but GOOS was not.

More consistent to expand both of them the same way ?

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>

* fix: check platform for all packagers

Implement platform for deb packager, goes into Architecture.

Validate that the platform is "linux", for Alpine and Arch.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2023-01-07 16:35:57 -03:00
Dj Gilcrease 0c2ef6b723
fix: add the non-overides package relation fields to allow env expansion (#593) 2022-12-29 21:07:34 -03:00
Carlos A Becker 38675f9a7e
docs: update schema
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-04 13:52:30 -03:00
Arsen6331 a18661b627
feat: add support for Arch Linux packages (#543)
* feat: add support for Arch Linux packages

* test: Add initial tests

* test: Increase coverage by modifying example info

* test: Add test for ArchLinux.ConventionalFileName()

* docs: Return error if package name is invalid

* fix: Make empty name invalid

* fix: Add replaces field to .PKGINFO generator

* test: Add additional tests

* test: Test for added replaces field

* docs: Add more comments

* style: Run gofumpt

* fix: Handle errors as recommended by linter

* fix: Allow changing the pkgbase

* style: Resolve semgrep findings

* docs: Change docs to reflect new Arch Linux packager

* docs: Fix spelling mistake in comment

Co-authored-by: Dj Gilcrease <digitalxero@gmail.com>

* docs: use aspell to fix all spelling mistakes

* feat: Handle packaging formats with non-distinct file extensions as described in #546

* fix: Add newline to generated .INSTALL file

* fix: Take into account provided info for non-symlink files

* docs: Fix names for arch-specific scripts in documentation

* fix: Only consider files with the correct packager field

* fix: Use correct scripts field for post_remove script

* test: Implement archlinux acceptance tests

* test: Add archlinux to acceptance_test.go

* test: Add archlinux to github test matrix

* test: Use updated build.yml from main branch

* Fix ConventionalExtension() for apk

* fix: Take epoch value into account

* fix: Add arm5 and arm6 architectures

Co-authored-by: Dj Gilcrease <digitalxero@gmail.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2022-10-15 14:54:36 -03:00
Carlos Alexandro Becker 7d7280d0fc
feat: allow to parse from stdin (#559)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-10-13 17:46:14 -03:00
Dj Gilcrease 8a1b1fcc04
fix: dont modify slices in a loop (#554) 2022-09-29 11:49:55 -03:00
Dj Gilcrease 4db80ebff3
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 10:07:11 -07:00
Carlos Alexandro Becker 92d4dc23ce
fix: govulncheck, semgrep & ruleguard scan/fixes (#544)
* chore: added some scan jobs

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: version

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* chore: dispatch

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: ruleguard and semgrep issues

* fix: syntax

* fix: skip-go-installation no longer a valid option

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-11 22:31:51 -03:00
Carlos A Becker 47d15255b0
Revert "feat: removing changelog generation"
This reverts commit 816dd05151.
2022-08-10 00:46:47 -03:00
Carlos A Becker 816dd05151
feat: removing changelog generation
breaking change: removing changelog generation from nfpm... users will now have to provide a changelog file/data according to the format they are using

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-10 00:45:33 -03:00
Carlos Alexandro Becker 51b893de9a
fix: json schema (#533)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-28 09:53:34 -03:00
Carlos Alexandro Becker 1e0d944603
feat: remove empty_folders for good (#522)
* feat: remove empty_folders for good

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: build

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-14 14:01:31 -03:00
Sas Swart 1eb3837edc
feat: implement dpkg-sig Package signing (#508)
* implement dpkg-sig Package signing

* Fix dpkgsig template syntax

* Fix dpkgsig template syntax

* Correctly handle template errors when reading dpkg-sig templates

* Fix dkpgsig signature templateing
2022-05-30 10:34:45 -03:00
Aaron Jacobs 98a59ec16d
feat: add support for additional fields in Debian control files (#491)
Debian control files (DCF) have a number of optional fields [0] --
including "Bugs" and "Tags" -- that are used by many existing packages.
The original fpm supports adding arbitrary fields to DCFs with the
--deb-field flag [1], but until now it was not possible to do so with
nfpm.

This commit introduces a new deb-specific override, "fields", that
simply translates key-value pairs from a map directly into the DCF.
Given the following nfpm config file entry:

    deb:
      fields:
        Bugs: https://github.com/goreleaser/nfpm/issues

The resulting DCF would contain the entry

    Bugs: https://github.com/goreleaser/nfpm/issues

To avoid generating malformed DCFs, we simply ignore empty entries.

This commit includes unit tests and updates to the website
documentation.

Closes #490.

[0]: https://man7.org/linux/man-pages/man5/deb-control.5.html
[1]: https://fpm.readthedocs.io/en/latest/packages/deb.html?highlight=changelog#deb-specific-command-line-flags

Signed-off-by: Aaron Jacobs <aaron.jacobs@rstudio.com>
2022-04-06 14:38:10 -03:00
Ville Skyttä 97486f15f8
feat: expand environment variables in maintainer (#463) 2022-03-18 00:07:12 -03:00
Ville Skyttä b684867299
style: spelling and grammar fixes (#462) 2022-02-21 15:53:33 -03:00
Mikhail f. Shiryaev 96c7b1f22f
fix: update rpmpack and change default compressor to gzip:-1 (a default level) instead of gzip:9 (#458)
* fix: use default compression level for rpm instead of 9

* test: add tests for different rpm compressors
2022-02-13 13:43:25 -03:00
Mikhail f. Shiryaev 1000d106c3
feat: expand ENV for dependencies versions (#454) 2022-02-09 20:49:37 -03:00
CrazyMax 9570f5234f
feat: custom packager configuration for rpm pkg (#409)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-30 15:56:10 -03:00
CrazyMax aee2dc4dd5
feat: expand-env support for vendor field (#406)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-19 14:08:38 -03:00
Carlos A Becker a8120c25ae
docs: remove empty_folders from docs 2021-11-14 11:21:33 -03:00
Carlos A Becker b62d6c4a54
fix: better fix for empty dirs
refs #403
2021-11-14 11:12:53 -03:00
Carlos A Becker 3730d6ec1c
fix: memory error when using empty_dirs
refs #403
2021-11-14 10:58:28 -03:00
Carlos Alexandro Becker 2a86957187
feat: add deprecation notice interface (#399)
* feat: add deprecation notice interface

* fix: use a simple writer

* fix: use println
2021-11-12 23:07:18 -03:00
Erik G 4f5362102c
feat: directory content type with custom attributes (#390)
* Deprecate EmptyFolders and introduce dir contents.

* Handle explicit dirs with attributes correctly for Debs.

* Handle explicit dirs with attributes correctly for Apks.

* Sort contents by fields that are most relevant for the package.

* Make deprecation warning for empty_folders consistent.

* Name RPM directory tag more consistently.

* Fix deprecation notice in docs.

* Fix directory normalization for Debs and Apks.

* Revert Apk builder size in tests.

* Fix file sorting.

* Fix deprecated EmptyFolders handling in info.Validate.

* Fix Apk builder size in tests.

* Only stat content source when necessary.

* Allow src on dir content.

* Small addition to file_info docs.

* Fix typo in comments.

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* Remove content type fallthrough case.

* Fix typo in apk tests.

* Fix more typos.

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2021-11-11 22:58:59 -03:00
Erik G 3f068f057c
fix: Improve performance of content destination collision detection (#388)
* Fix: Improve performance of content destination collision detection.

* Remove duplicate info.Validate call

* Fix tests.

* Remove another Validate call.
2021-11-06 14:10:46 -03:00
Erik G e5c7e17300
feat: allow platform specific arch overrides. (#396)
* Feat: Allow platform specific arch overrides.

* Fix typos and make arch handling more consistent.
2021-11-06 14:04:50 -03:00
Carlos A Becker fb0a007440
chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-12 14:42:00 -03:00
Erik G 2a331c5c7f
feat: compression option with xz support for deb (#363) 2021-09-04 10:24:52 -03:00
Carlos Alexandro Becker 5c895f6e80
feat: jsonschema (#350)
* feat: jsonschema

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: gitattr

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* docs: schema

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* docs: schema

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* docs: improvements

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-07-07 10:20:34 -07:00
Dmitri Muntean 5c1976b7cd
fix: remove semver parsing code before schema version detection (#333)
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2021-05-03 10:26:00 -03:00
Dj Gilcrease fe1413c7af
feat: add version_schema config option to allow controlling how the version string is parsed. (#324)
closes #283
2021-04-23 00:36:16 +00:00
Cristian Ciutea 39f5bf392d
feat: add %pretrans %posttrans scriptlets (#322)
* create branch

* added rpm pretrans and posttrans scriptlets

* update rpmpack dependency

* updated acceptance testdata

* docs: updated documentation to include %pretrans and %posttrans rpm scripts

* cleanup

* docs: cleanup
2021-04-22 18:48:06 +00:00