1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-26 20:26:14 +02:00
Commit Graph

567 Commits

Author SHA1 Message Date
Carlos Alexandro Becker 44adf8b27e
fix: auto-commit go mod tidy (#230)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-09-21 14:07: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
github-actions[bot] 1666d2e168
chore(deps): go mod tidy (#228)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-19 10:13:25 -03:00
Erik G c9bc9c6cd4
chore: Use upstream rpmpack. (#227) 2020-09-19 10:02:15 -03:00
github-actions[bot] 98376ea1dc
chore(deps): go mod tidy (#225)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-17 09:40:10 -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 e3d6f8344d
fix: Change upgrade to update in changelog dockerfile (#223) 2020-09-13 11:51:00 -03:00
github-actions[bot] 730f13d2e6
chore(deps): go mod tidy (#222)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-11 15:43:26 -03:00
dependabot-preview[bot] 7efe0c452b
chore(deps): bump github.com/golangci/golangci-lint (#221)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.30.0 to 1.31.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.30.0...v1.31.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-08 10:15:32 -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
Erik G 59de11a9e4
fix: deb file path prefixes and md5sums file (#218)
* fix: Ensure relative path prefix for deb packages

This patch ensures that all items contained in tar.gz files in Debian
packages have a relative path prefix, so the names all start with "./".
While this is not strictly required for a Debian package to function,
detecting a changed config file fails with an error messages similar to
the following:

    tar: ./etc/default/conffilename: Not found in archive

It seems to fail extracting config files for checking if they have been
modified by the system administrator.

All reference documentation that I was able to find (e.g. in the Debian
Handbook[1]) shows that all paths contained in either data.tar.gz and
control.tar.gz have the prefix "./".

I've verified that with this change, config files works as expected.

[1] https://debian-handbook.info/browse/stable/packaging-system.html#sect.binary-package-structure

* fix: Remove dpkg filters for changelog acceptance test.

* fix: Fix broken md5sums file when a changelog is added.

Co-authored-by: Alexander Neumann <alexander.neumann@redteam-pentesting.de>
2020-08-24 16:34:28 -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 5014c66146
docs: Give overrides examples for depends with version constraints. (#213) 2020-08-18 16:14:13 -03:00
Carlos Alexandro Becker 46bd304182 feat: allow cli to create apks
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-17 17:54:03 -03:00
Carlos Alexandro Becker 6aa03b0237 docs: fix overridables docs
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-17 17:53:49 -03:00
Carlos Alexandro Becker 4630d75b83 docs: apk
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-17 17:44:04 -03: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
Erik G bb9a3c8c88
fix: Fix build badge and coverage format. (#211) 2020-08-17 15:42:19 -03:00
Erik G 62c61a56bd
fix: Remove leading slashes from files in .tag.gz files in deb. (#209)
* fix: Remove leading slashes from symlinks and changelog in deb.

* test: Test that deb .tar.gz files don't contain leading slashes.

* fix: Fix acceptance tests by removing slashes globally.
2020-08-17 14:12:23 -03:00
Erik G b76edbd93c
test: Speed up tests by using smaller testdata. (#210) 2020-08-17 13:47:16 -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
github-actions[bot] 511a167ede
chore(deps): go mod tidy (#206)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-12 09:14:11 -03:00
dependabot-preview[bot] be82ba473b
chore(deps): bump github.com/imdario/mergo from 0.3.10 to 0.3.11 (#204)
Bumps [github.com/imdario/mergo](https://github.com/imdario/mergo) from 0.3.10 to 0.3.11.
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](https://github.com/imdario/mergo/compare/v0.3.10...v0.3.11)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-12 09:12:47 -03:00
Carlos Alexandro Becker bcab51df2f refactor: move glob to internal
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-05 13:51:04 -03:00
Carlos Alexandro Becker 1c35d796c0 fix(ci): codecov
refs #198

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-05 09:49:13 -03:00
Erik G 6f3927324e
fix: Remove RPM group default. (#197) 2020-08-04 18:41:54 +00:00
Erik G 3cc1ea4186
test: Changed some asserts to requires for early out in tests. (#195)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-04 17:55:52 +00:00
github-actions[bot] 0b887c9f58
chore(deps): go mod tidy (#196)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-04 14:46:03 -03:00
Erik G 6d8f3f4a44
feat: Support RPM %config(noreplace) files. (#186) 2020-08-04 14:44:13 -03:00
github-actions[bot] c5ca9a5d26
chore(deps): go mod tidy (#194)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-04 10:13:25 -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
github-actions[bot] 78049027c1
chore(deps): go mod tidy (#192)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-04 00:57:45 -03:00
dependabot-preview[bot] c98d9bc176
chore(deps): bump github.com/golangci/golangci-lint from 1.29.0 to 1.30.0 (#190)
* chore(deps): bump github.com/golangci/golangci-lint

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.29.0 to 1.30.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.29.0...v1.30.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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-04 03:18:44 +00:00
Erik G 46cd8d9dda
fix: Avoid panic if target is blank/dir and no packager is specified. (#179)
* fix: Avoid panic if target is blank/dir and no packager is specified.

* fix: Streamline insufficient parameter error.
2020-08-03 23:34:58 -03:00
Erik G 3a60553d97
test: Reuse rpm tag constants from rpmutils. (#188) 2020-07-31 15:29:07 -03:00
Erik G 005a6f885d
fix: Don't propagate semver metadata into deb metadata. (#187)
* fix: Don't propagate semver metadata into deb metadata.

* doc: Add documentation for new metadata behaviour.
2020-07-30 11:02:55 -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 468bc138a6
test: Add tests with symlinked files. (#180)
* test(#132): Add tests with symlinked files.

* fix: Fix file name comparison in extractFileFromTarGz().


refs #132
2020-07-27 11:11:33 -03:00
github-actions[bot] 7f548c9442
chore(deps): go mod tidy (#177)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-21 09:47:05 -03:00
Carlos Alexandro Becker f4f48fc1f9 chore(deps): update rpmpack and chglog
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-07-21 09:45:29 -03:00
github-actions[bot] b73a91d680
chore(deps): go mod tidy (#176)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-21 09:39:27 -03:00
github-actions[bot] 544f998313
chore(deps): go mod tidy (#175)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-21 09:38:53 -03:00
dependabot-preview[bot] c0e2a5544b
chore(deps): bump github.com/golangci/golangci-lint (#173)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.28.3 to 1.29.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.28.3...v1.29.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-21 09:24:23 -03:00
dependabot-preview[bot] 234662956a
chore(deps): bump github.com/mattn/go-zglob from 0.0.2 to 0.0.3 (#174)
Bumps [github.com/mattn/go-zglob](https://github.com/mattn/go-zglob) from 0.0.2 to 0.0.3.
- [Release notes](https://github.com/mattn/go-zglob/releases)
- [Commits](https://github.com/mattn/go-zglob/compare/v0.0.2...v0.0.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-21 09:24:14 -03:00
github-actions[bot] 8ac27fcf4e
chore(deps): go mod tidy (#172)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-20 11:22:40 -03:00
dependabot-preview[bot] 75c7222d4f
chore(deps): bump github.com/imdario/mergo from 0.3.9 to 0.3.10 (#171)
Bumps [github.com/imdario/mergo](https://github.com/imdario/mergo) from 0.3.9 to 0.3.10.
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](https://github.com/imdario/mergo/compare/v0.3.9...v0.3.10)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-20 10:41:08 -03:00
Erik G 8920a77b95
fix: Reflect (pre)release in conventional file names. (#170)
* fix: Reflect (pre)release in conventional file names.

* test: Add tests for conventional file names.

* test: Make test case variables consistent.

Co-authored-by: Erik Geiser <erik.geiser@redteam-pentesting.de>
2020-07-15 10:10:29 -03:00