Skip to content

Evaluate goreleaser as the single packaging definition (blocked: rpm key_id, two sources of truth) #502

Closed

Description

@scttfrdmn

Ask

"I use goreleaser and it takes care of creating things for me"

Sibling repo scttfrdmn/lith does deb + rpm + checksums + SBOMs + a multi-arch image + keyless cosign from one ~110-line .goreleaser.yaml. objectfs hand-rolls the same surface across release.yml + nfpm.yaml in ~700 lines. Worth doing — but not in one PR yet, for reasons that were measured, not argued: goreleaser 2.18.1 installed, a candidate config written, goreleaser check and goreleaser release --snapshot actually run.

What already works (proven, so a future PR need not re-derive it)

The naming half — which is the part everyone assumes is the blocker — is fully expressible:

  • All 5 archive names reproduce exactly via name_template, including the platform matrix in full.
  • The inner binary name objectfs-linux-armv7 reproduces exactly. scripts/install.sh hard-requires it.
  • Per-asset .sha256 siblings are available via checksum.split: true.
  • .deb / .rpm names reproduce exactly on a real tag via {{ .ConventionalFileName }} plus release: "1".

Blockers, in the order they matter

  1. rpm signing regresses. goreleaser check fails with field key_id not found in type config.NFPMRPMSignature, and the schema confirms that struct accepts key_file only. nfpm's rpm signing needs the 16-hex-digit key_id. This is a correctness capability, so per the project thesis it must fail closed rather than quietly degrade — and "the rpm is no longer signed" is exactly the silent degradation the rule exists to prevent.
  2. Split .sha256 files contain a bare hash with no filename, so the sha256sum -c <asset>.sha256 instruction the release notes publish today stops working. Fixable by post-processing, but it is a change to a published verification instruction and must be deliberate.
  3. files: [] did not take effect in the snapshot run — LICENSE, README and CHANGELOG leaked into the archives. Cosmetic, but it means archive contents are not yet under control.
  4. Extra packages appear. goreleaser emitted _armhf.deb and .armv7hl.rpm in addition, giving 3 debs + 3 rpms where the release publishes 2 + 2. internal/config/release_packages_test.go asserts [ "$rpms" -eq 2 ], so the test and the reality would have to move together.
  5. Two sources of truth for packaging. nfpm.yaml is driven by make package-linux, which runs on every PR via ci.yml's packaging and repo-install jobs, and is also consumed by the dormant apt/yum machinery that is explicitly being held as-is. A goreleaser config that duplicates it is the precise failure CHANGELOG.md:5624 records: two previous goreleaser configs were deleted for exactly this, and the stated condition for returning is "one file, wired to a workflow".
  6. It cannot be verified without cutting a real release. Snapshot mode does not exercise the tag-dependent naming or the upload.

What a viable PR looks like

Land it as a replacement, not an addition: make package-linux and the packaging/repo-install jobs invoke goreleaser, nfpm.yaml is deleted in the same commit, release_packages_test.go moves with the package count, and the rpm-signing question has an answer (either goreleaser gains key_id, or an explicit post-goreleaser rpmsign step, or a recorded decision that the embedded rpm signature is dropped in favour of repository-metadata signing only). Anything less leaves two definitions of the packages, which is how the last two attempts ended.

Note that keyless cosign — the other half of the original ask — has already landed standalone in #501 and does not depend on this.

Activity

  1. added this to the Future Work milestone on Sep 15, 2026
  2. added
    type: ci-cd
    priority: medium
    area: build
    area: ci-cd
    on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: buildarea: ci-cdpriority: mediumtype: ci-cd

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions