1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-06-18 17:50:02 +02:00
Commit Graph

134 Commits

Author SHA1 Message Date
Carlos Alexandro Becker 409b51628a
feat(rpm): properly handle optional fields (#809)
closes  #619

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-15 08:02:58 -03:00
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 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 bb6d0b9839
fix(rpm): conventionalfilename (#715)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-21 23:48:09 -03:00
Carlos Alexandro Becker cb2d7bd5d5
fix(rpm): conventional file name should always have the release (#701)
* fix(rpm): conventional file name should always have the release

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

* test: fix acceptance test

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-12 09:59:28 -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 d309eb6015
fix: windows issues (#690)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-12 22:09:28 -03:00
Carlos Alexandro Becker 741acf8bcc
feat(rpm): support relocatable packages (#691)
closes #640
2023-07-11 01:39:08 -03:00
Yaron de Leeuw 10d777660e
feat: unfork rpmpack. (#688)
Go back to using upstream github.com/google/rpmpack instead of nfpm's
forked version.

See #640
2023-07-10 09:25:05 -03:00
Carlos Alexandro Becker aff8ca31e9
feat: update protonmail/crypto (#680)
* feat: update protonmail/crypto

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

* chore: update

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

* fix: actually run the centos tests

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

* chore: improve test ordering

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

* fix: signing rpms

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

* feat: rpm.signature.format

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

* test: improvements

* Revert "feat: rpm.signature.format"

This reverts commit 9c46a58fff.

* fix: revert unneeded changes

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

* fix: use my fork

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

* revert: some unneeded changes

* test: fix order

* chore: finally fixed

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

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-26 10:19:35 -03:00
Carlos Alexandro Becker 9524bb8a26
fix: mips softfloat/hardfloat handling 2023-05-24 02:34:03 +00:00
Carlos Alexandro Becker 312fd85338
fix: improve goarch to pkg conversion
also added tests

refs https://github.com/goreleaser/goreleaser/issues/3998
2023-05-18 01:24:50 +00:00
Carlos Alexandro Becker c20618cdd3
fix: mips architecture
refs https://github.com/goreleaser/goreleaser/issues/3998
2023-05-18 01:16:50 +00:00
Carlos A Becker 5d251398b5
fix: lint issues
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-06 01:37:13 +00:00
Carlos Alexandro Becker 38f9376d59
refactor: stricter golangci-lint ruleset (#631)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-09 10:02:20 -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
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
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 437d9ef31a
feat: upgrade to go 1.19 (#542)
* refactor: remove usage of ioutil

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

* fix(ci): actually use go 1.19

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-22 09:39:40 -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
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
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
Carlos A Becker 1846234a11
fix: deb and rpm armv5 2021-11-13 21:06:51 -03:00
Carlos A Becker e009224359
fix: rpm on arm 2021-11-13 18:10:55 -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
Carlos Alexandro Becker e05fb50648
fix: added more arches (#398)
* fix: added more arches

* fix: code review
2021-11-07 22:57:56 -03:00
Carlos A Becker 43d46e2767
refactor: improve if a bit 2021-11-06 23:53:32 -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 Alexandro Becker 8230209c40
feat: bump most deps (#374)
* feat: bump all deps

closes #368
closes #370

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

* fix: tests

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

* fix: fmt

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

* fix: renamed

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

* fix: downgrade gopenpgp/v2 for now

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

* fix: merge issues

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

* chore: trigger build

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

* fix: downgrade deps

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-12 21:01:32 -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
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
Dj Gilcrease a61de3bb05
fix: switch to use gopenpgp (#315)
With Googles anouncement that x/crypto/openpgp is depreciated https://github.com/golang/go/issues/44226 we have decided to switch to github.com/ProtonMail/gopenpgp & github.com/ProtonMail/go-crypto/openpgp
2021-04-08 11:15:11 -07:00
Carlos Alexandro Becker bf4f92763d
feat(ci): lint action, gocenter, tools (#304)
* feat(ci): lint action, gocenter, tools

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

* fix: fmt

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

* fix: lint issues

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

* fix: go generate

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-02-27 17:15:05 +00:00
Carlos Alexandro Becker 62357a65e2
feat: version as v2 (#268)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-12-23 13:25:57 +00:00
Dj Gilcrease c4ae30d749
feat: try to clean up and simplify the file adding interface (#255)
* feat: cleanup and simplify the file adding interface

* docs: update the configuration docs to focus on the new contents format for specifying files

* docs: correct spelling

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

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2020-12-15 13:47:00 -03:00
dependabot-preview[bot] 8dc2e90ae1
chore(deps): bump github.com/golangci/golangci-lint from 1.32.2 to 1.33.0 (#257)
* chore(deps): bump github.com/golangci/golangci-lint

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.32.2 to 1.33.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.32.2...v1.33.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* fix: lint

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-11-27 02:17:14 +00:00
Erik G 7839385b21
feat: add an option to disable globbing (#248)
* feat: Add option to disable globbing.

* test: Fix failing tests.

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2020-11-10 09:37:29 -03:00
Carlos Alexandro Becker 2e41d957e5
refactor: simplify rpm add file (#247)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-11-09 03:54:37 +00:00
wwade 8c19c6a283
feat: Support RPM ghost files (#245)
From the [Maximum RPM] guide:

    The %ghost Directive

    As we mentioned in the Section called The %files List, if a file
    is specified in the %files list, that file will automatically be
    included in the package. 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.

Ghost files are specified using `Type: rpmpack.GhostFile` when
constructing the output package.

The test ensures that we have:
 - The target file present in the RPM.
 - The specified mode attributes (although not really important,
 either).
 - An empty file *[1]* in the RPM for the named ghost,
see [google/rpmpack #51].

*[1] Instead of an empty file, no file should be created, but this is
not possible until the upstream issue is resolved.*

[Maximum RPM]:
http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html
[google/rpmpack #51]: https://github.com/google/rpmpack/issues/51

Co-authored-by: wwade <wwade@users.noreply.github.com>
2020-11-08 17:10:27 -03:00
wwade 13335ee883
feat: allow explicit summary from RPM packages (#246)
The previous behaviour was to use only the first line of the
description as the summary. In some cases, it is desirable to have a
separate summary. Since only RPM packages have a summary field, I've
put this inside the RPM configuration.

    description: This is my description
    rpm:
      summary: This is my summary

By default, just use the first line of the description.

Co-authored-by: wwade <wwade@users.noreply.github.com>
2020-11-08 14:49:40 -03:00
Carlos Alexandro Becker 3d7580ade2
refactor: remove pkg/errors (#226)
* refactor: remove pkg/errors

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

* fix: tests

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

* fix: lint

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-09-19 17:06:07 -03:00
Erik G 285a6bcaea
feat: Package Signing (#224)
* feat: Add initial openpgp signing capability.

* refactor: Rename signatures to sigs and expose verify method.

* feat: Add debsigs support.

* test: Add debsigs acceptance test.

* feat: Add RSA signing capability.

* feat: Add RPM signature support.

* test: Add RPM signature acceptance test.

* test: Move acceptance test keys in dedicated folder.

* feat: Add APK signature support.

* test: Add APK signature acceptance test.

* feat: Expose deb signature type in config.

* fix: Fix typo and superfluous explicit error check

* fix: Fix password env extraction and add tests.

* fix: Redirect rpmpack to temporary goreleaser vendoring.

* fix: Catch missing maintainer email if no apk key name is set.

* refactor: Put signature info in a dedicated struct.

* doc: Add signing documentation.

* fix: Add trailing newlines to some files and remove unnecessary comment.

* fix: Change wrong references from SHA256 to SHA1 in the sign package.

* fix: Improve error wording when no passphrase was provided.

* fix: Remove another SHA256 reference.

* fix: Fix signature errors.

* test: Split up environment variable test.

* fix: Don't parse passphrase from YAML.

* deps: Update redirected rpmpack.

* fix: Export and use signature related error type.

* doc: Document ErrSigningFailure.

* test: Fix apk signature error test.

* test: Add rpm signature error test.
2020-09-17 09:18:44 -03:00
Erik G 0c25629af7
feat: Introduce version_metadata for all packagers and deprecate deb.metadata. (#215) 2020-08-20 01:00:17 -03:00
Erik G 3c4244d700
fix: correctly handle version, release and prerelease for RPMs (#214) 2020-08-19 10:20:02 -03:00
Erik G 6f3927324e
fix: Remove RPM group default. (#197) 2020-08-04 18:41:54 +00:00
Erik G 6d8f3f4a44
feat: Support RPM %config(noreplace) files. (#186) 2020-08-04 14:44:13 -03:00
Carlos Alexandro Becker a80e10dea3
refactor: internal/files (#191)
* refactor: internal/files

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

* fix: lint issues

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-04 10:11:03 -03:00