* 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>
* 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: 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>
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: 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>
* 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>
* 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>
* fix: ensure nfpm can run on windows and still build correct rpm, deb, and apk packages
fix: add windows test job
* fix: ensure file close happens in the correct order on windows
* fix: ensure eol is set to lf
* chore: update the go version to be consistent between windows and ubuntu
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* chore: update comments
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* chore: rerun make deps
* chore: fix .gitattributes to ensure images are not touched
* chore: run make fmt
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Bump github.com/google/rpmpack to integrate the ghost file handling
fix [google/rpmpack 52].
Updated the TestRPMGhostFiles fix to test the updated
functionality. Now, we expect that the files are listed in the RPM
header, but without any cpio content.
This is an extension of PR #246.
[google/rpmpack 52]: https://github.com/google/rpmpack/pull/52
Co-authored-by: wwade <wwade@users.noreply.github.com>
* chore(deps): bump github.com/golangci/golangci-lint from 1.31.0 to 1.32.2
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: errors.is
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: typo
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: typo
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.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>
* feat: replace glob library
BREAKING CHANGE: may have unintended side-effects.
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: delimiter and patterns starting with ./
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: use fileglob
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fixed some wrong tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.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>
* refactor: internal/files
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* 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>
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>