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

174 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 99bf0d0cf9
test: testifylint fixes (#753)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-17 15:46:28 -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 e7812cdaff
test: close temp file 2023-07-12 19:07:34 +00: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 7d6a77bee6
test: fix arch tests 2023-05-24 02:42:13 +00:00
Carlos Alexandro Becker 9524bb8a26
fix: mips softfloat/hardfloat handling 2023-05-24 02:34:03 +00:00
Carlos Alexandro Becker 6dc5db365b
test: fix deb/rpm tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-21 23:05:10 +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
Carlos Alexandro Becker c816571b14
test: improve test code (#602)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 16:51:49 -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
Carlos Alexandro Becker dedee6d6b1
fix: do not encourage using /usr/local/bin (#596)
* fix: do not encourage using /usr/local/bin

Examples, tests and docs often refer to /usr/local/bin, which should
only be used for things compiled locally, which is not the case of
installed packages.

Changed that to /usr/bin, and also some usages of things like
/usr/something to /usr/share/something.

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

* fix: complex test

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-29 22:19:38 -03:00
Carlos Alexandro Becker 5c3cc38943
fix: archlinux globs (#574)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-12 00:50:16 -03:00
Carlos A Becker 46d2a44a13
test: improve coverage a bit 2022-10-15 14:58:33 -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
Mikhail f. Shiryaev c049e1c2f9
fix: processing symlinks in directories (#453)
* fix: proceed symlinks in contents as is

* Remove dead code

* fix: make OS independent test
2022-02-11 22:47:18 -03:00
Carlos Alexandro Becker d16adac8c3
fix: create tree of dir content types (#431)
* fix(apk): create tree of dir types

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

* fix: create tree of dir contents

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

* test: fixes

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-12-28 14:24:49 -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
Carlos A Becker b909114591
fix: remove replace from go.mod
closes #384
2021-11-11 23:04:40 -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 2e30111d86
chore: user require instead of assert 2021-11-07 10:51:13 -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 273b612558
feat: upgrade fileglob (#306)
* feat: upgrade fileglob

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

* fix: tests

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

* fix: update

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

* fix: quotemeta opt

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

* fix: quotemeta

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

* fix: fmt

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-03-01 11:27:05 -03: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