* 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>
* 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>
* 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
* 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>
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>
* feat: remove empty_folders for good
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: build
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.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>
* 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>
* feat: jsonschema
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: gitattr
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: schema
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: schema
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: improvements
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
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
* 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>
* refactor: small code improvements
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: small code improvements
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: race condition
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: race
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix invalid file
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* docs: fix synlinks/indent
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* feat: more deprecated things to remove
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: more deprecated things to remove
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: format
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: remove deprecated options
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fixing
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: configs
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: tempdir
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: fmt
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: go 1.15
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: import
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: symlink
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* 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>
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>
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>
* 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>