76 Commits

Author SHA1 Message Date
Ted Delin 64b788a887 feat: add Requires(Post) for RPMS (#1085)
* feat: add Requires(Post) for RPMS
https://rpm-software-management.github.io/rpm/manual/spec.html section Dependencies

* test: add acceptance test

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 00:51:31 -03:00
dependabot[bot] 071ae18361 fix(deps): bump alpine from 3.23.4 to 3.24.0 in /testdata/acceptance (#1099)
Bumps alpine from 3.23.4 to 3.24.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-17 12:54:01 -03:00
Drew Leske 3118ec19d5 fix: tolerate empty overrides packager clause (#1080)
* fix: Warn on empty `overrides.PACKAGER` stanza

Previously, if an overrides stanza contained an empty packager clause,
the user would get a segfault. This is now detected and a warning
issued.

Fixes #1079.

* test: Parse a test file with empty overrides

Tests that an empty overrides.packager clause is handled without
failure.

See: #1079

* update: Ignore empty overrides instead of warn
2026-05-01 13:28:22 -03:00
dependabot[bot] e3102b31f0 fix(deps): bump alpine from 3.23.3 to 3.23.4 in /testdata/acceptance (#1076)
Bumps alpine from 3.23.3 to 3.23.4.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.23.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 10:32:13 +00:00
Dj Gilcrease 432fb6710a feat: add alpha msix support (#1051) 2026-03-20 11:14:55 -03:00
dependabot[bot] 205b84c501 fix(deps): bump alpine from 3.23.2 to 3.23.3 in /testdata/acceptance (#1030)
Bumps alpine from 3.23.2 to 3.23.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.23.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 11:49:19 +00:00
Carlos Alexandro Becker 550e42704e test: fix rpm tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-12-22 19:46:49 -03:00
dependabot[bot] 6adfb55163 fix(deps): bump alpine from 3.23.0 to 3.23.2 in /testdata/acceptance (#1015)
Bumps alpine from 3.23.0 to 3.23.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.23.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-22 19:41:01 -03:00
Carlos Alexandro Becker 8ba0acdbe0 test: fix apk acceptance tests for newer alpine versions
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-12-15 10:14:03 -03:00
Anders Björklund 9518fe92fc test: debian image now supports zstd compression (#1000)
Old comment was from debian:11, supported since debian:12

Current test image is already based on debian:13 (trixie).
2025-11-21 10:27:56 -03:00
Carlos Alexandro Becker 2e47af64a3 feat: srpm (#935)
* feat: srpm

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: register as srpm, improve test

* fix: dockerfile syntax warnings

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-06-07 13:32:08 -03:00
Carlos Alexandro Becker f9d9d19266 test: test centos10, fedora 40+ (#899)
* test: test centos10, fedora 40+

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: typos

* fix: typo

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-01-11 15:45:12 -03:00
Carlos Alexandro Becker afeac6e542 ci: add back dpkg-signed tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-10 09:58:11 -03:00
Carlos Alexandro Becker 666ef77cd4 ci: update acceptance tests to debian:trixie, remove dpkg-sig from tests 2024-11-10 09:51:44 -03:00
Slawomir Figiel 632979ac05 feat: env var substitution in description (#848)
Co-authored-by: Slawek Figiel <4471997+fivitti@users.noreply.github.com>
2024-08-14 22:31:02 -03:00
Carlos Alexandro Becker f7e93efc2c test: centos8 mirrorlist has been down for a long time (#837)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-07-05 11:57:19 -03:00
Weston Schmidt bc5c3bd876 feat: support for ipk packages (#818)
Implements #507.

* Adds ipk support for keywords used by OpenWRT and Yocto.
* MD5sum is explicitly excluded due to insecurity.
* SHA256Sum excluded due packages not being individually signed,
  instead, the feed of packages is checksummed and signed externally.
* Adds code to nfpm package to automatically enumerate the supported
  packaging types where possible.
2024-05-08 16:02:39 -03:00
Carlos Alexandro Becker 2bfa63a13f test: fix apk integration test
refs #794
2024-03-19 10:20:45 -03:00
nickajacks1 d0d7c60d34 feat(rpm): add support for verify scriptlet (#788)
Co-authored-by: Nicholas Jackson <nicholas.jackson@zii.aero>
2024-02-21 20:13:30 -03:00
Carlos Alexandro Becker 2c8f9e0d70 fix: config merge
closes #750

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-10 12:35:57 -03:00
Carlos Alexandro Becker bb6d0b9839 fix(rpm): conventionalfilename (#715)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-21 23:48:09 -03:00
Carlos Alexandro Becker cb2d7bd5d5 fix(rpm): conventional file name should always have the release (#701)
* fix(rpm): conventional file name should always have the release

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: fix acceptance test

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-12 09:59:28 -03:00
Carlos Alexandro Becker b50fc3af8c test: deb.predepends integration test (#699)
* test: deb.predepends integration test

refs #696

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: test

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: typo

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-08-15 23:11:10 -03:00
Carlos Alexandro Becker 741acf8bcc feat(rpm): support relocatable packages (#691)
closes #640
2023-07-11 01:39:08 -03:00
Carlos Alexandro Becker aff8ca31e9 feat: update protonmail/crypto (#680)
* feat: update protonmail/crypto

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: update

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: actually run the centos tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: improve test ordering

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: signing rpms

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* feat: rpm.signature.format

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: improvements

* Revert "feat: rpm.signature.format"

This reverts commit 9c46a58fff.

* fix: revert unneeded changes

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: use my fork

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* revert: some unneeded changes

* test: fix order

* chore: finally fixed

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-26 10:19:35 -03:00
Carlos Alexandro Becker 907d1d4e39 build: test signing on fedora 34 and 36 2023-06-24 16:17:52 +00:00
Carlos Alexandro Becker 7f1f65a942 build: use correct centos9 image 2023-06-24 16:17:11 +00:00
Carlos Alexandro Becker 5181accf18 build: use better centos images
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-24 15:57:16 +00:00
Carlos Alexandro Becker fd63f71ad6 build: test on debian 11
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-21 22:17:59 +00:00
Carlos Alexandro Becker 3e892a7551 test: signatures on centos 7 and 8 (#678)
* test: signatures on centos 7 and 8

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: remove test for centos7, added for centos9

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: add back build tags

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: revert unneeded changes

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-21 19:11:51 -03:00
Stefan Schubert b1f3fef606 fix: md5sums entries and lintian errors/warnings (#656)
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.
2023-05-11 09:14:54 -03:00
Erik G d56fbe2958 feat: add zstd compression support for deb and rpm (#611) 2023-01-30 00:24:27 -03:00
Carlos Alexandro Becker f2e5d2a1e3 fix(deb): changelog fixes (#597)
* 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>
2022-12-29 22:25:49 -03:00
Carlos Alexandro Becker dedee6d6b1 fix: do not encourage using /usr/local/bin (#596)
* 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>
2022-12-29 22:19:38 -03:00
Carlos A Becker 66760061ee test: fix apk tests 2022-11-30 09:46:25 -03:00
Carlos A Becker 233ff4dcb2 fix: acceptance test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-17 14:21:30 -03:00
Arsen6331 b4bd7817cd fix: allow using directories as contents in archlinux packager (#568)
* fix: Recursively add files if content is directory

* fix: Skip contents with wrong packager value

* test: Add acceptance tests for directories
2022-10-27 09:28:47 -03:00
Arsen6331 a18661b627 feat: add support for Arch Linux packages (#543)
* 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>
2022-10-15 14:54:36 -03:00
Dj Gilcrease 4db80ebff3 feat: allow env expansion in conflicts, suggests, recommends, depends… (#548)
* 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
2022-09-24 10:07:11 -07:00
Carlos Alexandro Becker 1e0d944603 feat: remove empty_folders for good (#522)
* 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>
2022-06-14 14:01:31 -03:00
Carlos Alexandro Becker d1c1066609 feat: implement dpkg-sig Package signing (#515)
* 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>
2022-06-11 23:32:07 -03:00
Kyle Penfound eb26ce3682 fix: apk versioning (#514)
* Fix apk versioning

* Update acceptance test for apk
2022-05-30 09:27:31 -03:00
Carlos Alexandro Becker d16adac8c3 fix: create tree of dir content types (#431)
* 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>
2021-12-28 14:24:49 -03:00
Carlos A Becker a22624574d test: rollback to fedora 2021-11-13 21:25:34 -03:00
Carlos A Becker 02923463fd test: faster rpm/arm64 tests using centos 2021-11-13 21:06:16 -03:00
Carlos A Becker 1cbbf6afad test: deb changelog test 2021-11-13 18:42:15 -03:00
Carlos A Becker 97d7437c51 test: use debian as base img 2021-11-13 18:38:27 -03:00
Erik G 4f5362102c feat: directory content type with custom attributes (#390)
* 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>
2021-11-11 22:58:59 -03:00
Erik G 563d480677 fix: use full mode instead of permissions in tarball (#395) 2021-11-06 14:07:18 -03:00
Snyk bot df14bee98e fix: testdata/acceptance/deb.dockerfile to reduce vulnerabilities (#371)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-UBUNTU2004-BASH-581100
- https://snyk.io/vuln/SNYK-UBUNTU2004-LIBGCRYPT20-1297919
- https://snyk.io/vuln/SNYK-UBUNTU2004-LIBGCRYPT20-1583851
- https://snyk.io/vuln/SNYK-UBUNTU2004-SHADOW-577863
- https://snyk.io/vuln/SNYK-UBUNTU2004-SHADOW-577863
2021-10-07 14:43:25 -03:00