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.
* 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>
* 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
* 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>
* 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>
* 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>
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
* 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: 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>
* 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>