Skip to content

packaging/aur/cordial-bin: make the source filename release-unique ($pkgver alias) - #120

Open
taxin-404 wants to merge 2 commits into
luohoa97:mainfrom
taxin-404:aur-cordial-bin-source-alias
Open

taxin-404 wants to merge 2 commits into
luohoa97:mainfrom
taxin-404:aur-cordial-bin-source-alias

Conversation

@taxin-404

Copy link
Copy Markdown
Contributor

Problem: a release-shared source filename defeats AUR helpers' source cache

cordial-bin's source entry pins the URL correctly, but the left side — the filename makepkg and AUR helpers key on in $SRCDEST — was identical across releases:

cordial.pkg.tar.zst::https://github.com/luohoa97/cordial/releases/download/v0.34.0/cordial-0.34.0.r0.gfe20025-1-x86_64.pkg.tar.zst

AUR helpers keep $SRCDEST between releases. Whoever has built cordial-bin once has the previous release's file sitting there under that same name; on the next release makepkg reports Found cordial.pkg.tar.zst, skips re-downloading, and fails the new release's pinned checksum with a bare:

==> Validating source files with sha256sums...
    cordial.pkg.tar.zst ... FAILED
==> ERROR: One or more files did not pass the validity check!

…which reads like an upstream problem but is just the old release being found under the new release's name. Observed 2026-10-19 during the 0.34.0 AUR update: the cached file was the v0.17.0 artifact, sha256 0835b7ed… — matching that era's pin verbatim.

Fix

Make the local filename release-unique by embedding $pkgver:

cordial-${pkgver}.pkg.tar.zst::…
  • Every release downloads under its own name, so a cached previous release can never be presented for a new one — regardless of which helper or SRCDEST policy the user has.
  • The per-release bump checklist grows from three spots to four on the same line: pkgver, the alias, the pinned URL and the checksum (noted in PUBLISHING.md too).
  • The generated .SRCINFO's only change is the same source = line — nothing else can drift. Useful roundtrip: the hand-maintained .SRCINFO in this directory matched makepkg --printsrcinfo output exactly, except that one line.

Testing

Full makepkg --nodeps -f against this exact file at v0.34.0 on Arch:

==> Validating source files with sha256sums...
    cordial-0.34.0.pkg.tar.zst ... Passed
…
==> Finished making: cordial-bin 0.34.0-1

namcap clean on the PKGBUILD (exit 0); on the package only the usual notes for CI-pre-stripped binaries. The repack is a straight copy of the CI artifact by design — no compilation involved.

Second commit: PUBLISHING.md

  1. cordial-bin's bump paragraph now lists four things (adds the release-unique alias).
  2. The dated AUR-status paragraph moves from "on 2026-09-30 all three were at 0.17.0" to the current state — re-synced to 0.34.0 on 2026-10-19 by taxin-404 after a file-by-file diff against main; the remaining differences are the maintainer line, cordial-git's pinned snapshot version, this alias change, and the root-level 0BSD packaging-license file.

The same alias fix is already live in the AUR package's own repository (aur.archlinux.org/cordial-bin, commit 76516c5, where the download → validate → repack cycle has run since this morning), so this PR restores agreement between upstream and what the AUR ships.

AUR helpers keep $SRCDEST between releases; with the release-shared name cordial.pkg.tar.zst, makepkg finds the previous release download there and fails the new release checksum. Seen 2026-10-19: a v0.17.0-era cache file (0835b7ed..., the old AUR pin) failed the 0.34.0 pin (d1a72ea8...). Embedding $pkgver in the file alias gives every release its own cached name; a bump now touches pkgver, the alias, the URL and the checksum together.
cordial-bin bumps also touch the now version-embedded source alias, and the recorded AUR state moves from the 2026-09-30 0.17.0 snapshot to the 2026-10-19 re-sync at 0.34.0.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant