1
1
mirror of https://github.com/goreleaser/nfpm synced 2024-10-01 02:21:49 +02:00
Commit Graph

28 Commits

Author SHA1 Message Date
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
fd176b36f6
feat: Support DEB Breaks field (#220)
* feat: Support DEB Breaks option.

* doc: Add docs for breaks relationship.

* fix: Increase test timeout.
2020-09-01 19:27:29 +00:00
Carlos Alexandro Becker
2e97c8de26
feat: apk support (#207)
* first attempt at apk, built from Issue #39

* inspector cleanups

* read the contrib note, ran linter, fixes made. Noice!

* linter went wonky

* linter went wonky

* fix some lint issues

* fix some lint issues

* lightweight file validation, while I try to refactor method into smaller chunks

* refactorings to get `make ci` to pass. ain't pretty, but hopefully doesn't make things worse.

* add ignore file to get workdir created in CI

* try to get a successful test run on CI (file sizes differ on CI).

* must remember to run liner (make ci) before pushing

* Doh! Detect CI via correct env var name

* tweak CI expected file sizes

* blech. try to get a range of values for CI

* better message if value fails conditions

* better message if value fails conditions

* initial impl of Package interface - just hoping I don't already have the arch mapping backwards.

* missed non-altered arch case

* ci failures

* refactor io.File to Writer

* add note about command to test apk install in docker

* remove absolute paths from test (prep for replacement with info.Files).

* rename test files folder

* get ci file size ranges happy after path changes

* get ci file size ranges happy after path changes

* move COPY towards end, allowing more caching of layers - feedback from @tcurdt

* remove Gz from function name

* rename combine function

* add skipVerify flag to preserve generated .apk file for use in dockerfile manual test. Thanks @tcurdt

* make ci is my friend

* remove useless comment

* start conversion to nfpm.Info

* use base64 encoded string for private signing key

* remove old runit() method, as we can now test using Default.Package.
add some tests lifted from deb_test.go.

* duck and cover: register the apk packager

* use the metadata from nfpm (does not handle scripts/pre/post, etc)

* getting closer to removing size assertions, but not just yet

* getting closer to removing size assertions, but not just yet

* add niffty import for init - Blank identifier comes to the rescue. Thanks @tcurdt.
add apk to overrides parse test.

* I will very much enjoy deleting this assertion...soon, soon.

* add PrivateKeyFile option, which is subordinate to PrivateKey

* move PrivateKey configs to root config struct. expand PrivateKey configs from env vars if set.

* provide the user a hint if privatekey config is missing for .apk packager

* lovin' the linter now. learning language from linter loudness. didn't know switch could work like that.

* add support for 'scripts' in control file

* fix control metadata

* make signing keyname configurable

* goofy size fix

* remove temporary test and related files

* fix template copy/pasta error

* remove old print statements

* first take at integration tests. should remove need for --allow-untrusted in `apk add` command.

* fix: merge issues, remove signature support

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

* fix: tests

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

* fix: lint issues

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

* fix: tests

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

* test: meta

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

* fix: datahash seems unused

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

* fix: improve test code

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

* fix: unused params

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

* fix: tests

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

* test: changelog test

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

* test: fix

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

* fix: img

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

* test: symlink

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

* fix: uneeded deletes

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

* feat: symlinks

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

Co-authored-by: Dan Rollo <danrollo@gmail.com>
2020-08-17 17:28:38 -03:00
Carlos Alexandro Becker
abb576b359
ci: make acceptance test logs more readable (#208)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-16 13:13:00 -03:00
Erik G
6d8f3f4a44
feat: Support RPM %config(noreplace) files. (#186) 2020-08-04 14:44:13 -03:00
Erik G
0000a2fe8d
feat: support symlinks for deb and rpm. (#185)
* feat: Support symlinks.

* fix: Fix symlink creation for deb.

* fix: Remove magic number in rpm symlink creation.

* test: Add symlink unit tests.

* test: Add symlink acceptance tests.

* doc: Add documentation for symlinks.

* fix: Fix acceptance test name.

* fix: Make symlink headers more consistent.
2020-07-29 23:20:50 -03:00
Carlos Alexandro Becker
42f29b9d7a
chore(ci): run fast tests first (#182)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-07-29 23:12:40 -03:00
Erik G
0b4025a8f2
feat: Add support for DEB triggers. (#178)
* feat: Add support for DEB triggers.

* fix: Fix trigger test package description.

* fix: Use correct trigger keys in configuration documentation.
2020-07-27 13:22:06 -03:00
Erik G
d2e9097ac5
feat(#42): Support Changelogs (#158)
Co-authored-by: Dj Gilcrease <d.gilcrease@f5.com>

Co-authored-by: Dj Gilcrease <d.gilcrease@f5.com>
Co-authored-by: Erik Geiser <erik.geiser@redteam-pentesting.de>
2020-07-13 15:10:03 +00:00
Carlos Alexandro Becker
397d266f18
feat: allow creating meta packages (#159)
* feat: allow creating meta packages

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

* fix: rpm pack meta

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

* test: added acceptance tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-07-10 02:05:33 -03:00
Dj Gilcrease
2eb4016806
fix(#103): ensure the package is not included in itself (#104)
* fix(#103): ensure the package is not included in itself when using globs to match files

* chore: switch strings.Contains to strings.HasSuffix
2019-11-11 13:57:10 -08:00
Dj Gilcrease
b47eac0b54
Merge pull request #85 from djgilcrease/bugfix/issue-50
fix: parse the version as a semver
2019-10-09 18:11:58 -07:00
Dj Gilcrease
03193b2ab0 feat: provide more field support for rpms (#79)
* fix: properly add the PostRemove script, not the PostInstall script

* feat: provide more field support for rpms

New RPM fields
---
* Description
* OS <= info.Platform
* Licence
* URL <= info.Homepage
* Vendor
* Packager <= info.Maintainer
* Provides
* Require <= info.Depends
* Obsolete <= info.Replaces
* Suggests
* Conflicts

Fixes
---
* RPM Compression types are supported again
* RPM Config files are supported again
  * `rpmpack` will support all the rpm file types, so we could extend this more latter

* chore: disable wsl (a new linter in 1.20.x got golangci-lint) until we decide to enable it

* chore: address PR comments
2019-10-09 16:10:05 -03:00
Carlos Alexandro Becker
33156b2b19
fix: rules tests, overridables (#66)
* fix: rules tests, overridables

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

* doc: gogoc

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

* fix: rpm template

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

* fix: rpm template

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-08-31 10:21:28 -03:00
Carlos Alexandro Becker
214d773fe2
fix: improve rpm release config (#64)
* fix: improve rpm release config

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

* fix: template

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-08-25 12:12:38 -03:00
Adrian Wennberg
c17636c028 feat: Add option for RPM compression type (#63)
* feat: Add option for RPM compression type

See #62

* test: acceptance test for rpm compression types
2019-08-23 10:49:04 -03:00
Christoph Hartmann
793979844f add support for build rpm packages for aarch64 (#56)
* add support for build rpm packages for aarch64

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>

* add unit test to verify the manipulation of the arch field

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>

* add acceptance test for arm64 builds

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>

* use newer travis ubuntu distro

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>

* enable binfmt in docker

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2019-06-28 14:14:45 -03:00
Carlos Alexandro Becker
3e79ba0a5b
fix: skip ppc64le tests 2019-03-19 21:54:42 -03:00
Carlos Alexandro Becker
26a86166dc
feat: test os ppc64le too 2019-03-19 21:34:06 -03:00
Carlos Alexandro Becker
32909dea74
fix: lint issues 2019-03-04 10:14:05 -03:00
Carlos Alexandro Becker
e9205e74c0
fix: lint issues 2018-09-12 13:17:59 -03:00
Carlos Alexandro Becker
2615d25f99 refactor: accept params struct on ITs 2018-07-08 19:49:15 -07:00
Carlos Alexandro Becker
a0f04ab682
test: fix duplicated code and other issues 2018-06-04 09:08:27 -03:00
Carlos Alexandro Becker
09991ab785 test: empty managed dirs acceptance tests 2018-05-16 21:42:34 -03:00
Carlos Alexandro Becker
03334d1cf3
chore: faster it test by not sending too much context to docker daemon 2018-05-16 20:36:03 -03:00
Carlos Alexandro Becker
e8abe2ac61
test: added acceptance tests for overrides 2018-04-18 22:15:58 -03:00
Carlos Alexandro Becker
672aa2bd65 fix: better validations 2018-04-05 09:51:01 -03:00
Carlos Alexandro Becker
637518df29
test: renamed file 2018-03-11 15:32:22 -03:00