* 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>
* 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>
* 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>
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>
* 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>
* test: pkg dependencies
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: typo
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: flag
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: remove rpm.Prefix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: remove rpm.Release
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: broken test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* add stricter linting
* As part of this it changes the API slightly changing all uses of the `nfpm.Info` object to accept a pointer to reduce memory usage as pointed out by `hugeParam: info is heavy (568 bytes); consider passing it by pointer (gocritic)`
* 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
* 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>
* 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>
* 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>