* 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>
Each time building exaclty from the same source,
ensure exaclty the same size deb package is generated.
Signed-off-by: keliramu <ramunas.keliuotis@nordsec.com>
* 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
* 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>
Missing trailing ./ in md5sums for changelog.Debian.gz caused
md5sums-lists-nonexistent-file and file-missing-in-md5sums
and is fixed using files.AsExplicitRelativePath.
Adding copyright file fixes no-copyright-file.
Set file_info fixes executable-is-not-world-readable,
non-standard-executable-perm, non-standard-file-perm.
Adding section fixes unknown-section, empty-field.
Using standard compress/gzip module fixes
package-contains-timestamped-gzip,
because klauspost/pgzip does not support empty mod time.
Adding urgency and distribution in changelog fixes
syntax-error-in-debian-changelog.
Adding mail address to maintainer fixes malformed-contact.
Correcting description fixes description-starts-with-package-name
and description-starts-with-leading-spaces.
* 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>
* fix(deb): changelog fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Andrei Belov <defanator@users.noreply.github.com>
* fix: test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Andrei Belov <defanator@users.noreply.github.com>
* 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>
* fix: improve contents.type
improved jsonschema and added validations
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: config|noreplace
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* 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>
* 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>
* 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>
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>
* 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
* refactor: io.Copy
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactor: deb signature
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: acceptance test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: document new option
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: acceptance
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: acceptance
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* chore: typo
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Sas Swart <sas.swart@xneelo.com>
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>
* 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>