Repository navigation
Conversation
Add a publish-aur workflow that runs when a stable cap-v release is published (or on manual dispatch with a tag). It downloads the release's linux-deb asset from DOWNLOADS_JSON, builds it with the existing Arch package builder in the pinned offline Arch container, and pushes the resulting PKGBUILD and .SRCINFO to ssh://aur@aur.archlinux.org/cap-bin.git using the AUR_SSH_PRIVATE_KEY secret. Without the secret it only builds and uploads the files as an artifact. The builder takes an optional download URL. With one, it sources the versioned DEB from that URL and also writes the PKGBUILD and .SRCINFO, so the AUR package is built from the same recipe as the release's own pacman package. The DEB file name is now versioned, because AUR helpers reuse build directories and would otherwise find a stale Cap.deb.
Contributor
|
@Wraient is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
|
Thanks! Can you get Greptile to 5/5? Then we'll take a look. |
Re-running publish-aur for an already published version with a corrected recipe pushed the new files under the same pkgver-pkgrel, so installed users never saw an upgrade. When the upstream version matches the AUR's and the PKGBUILD differs, carry the AUR pkgrel forward by one in both the PKGBUILD and .SRCINFO before pushing.
The AUR clone is not Cap-controlled, and bash re-evaluates command substitutions inside $(( )), so a crafted pkgrel in the cloned .SRCINFO could execute commands with AUR_SSH_PRIVATE_KEY in scope. Read it into a variable, reject anything but digits, and fail closed.
Member
|
Thanks! Can you get Greptile to 5/5 on the latest commit? Then we'll take a look. |
Contributor
Author
|
@greptile review |
Contributor
Author
|
@greptile review |
Contributor
Author
|
@greptile review |
Contributor
Author
|
@greptile review |
Contributor
Author
|
@greptile review |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since 0.6.0, every release has shipped an Arch package (
cap-bin-*.pkg.tar.zst), but only as a direct download. Arch users install it withpacman -Uand never get updates throughyayorparu. This PR adds a workflow that publishes each stable release to the AUR ascap-bin.How it works
publish-aur.ymlruns when acap-v{x.y.z}release is published, skipping prereleases. It can also be dispatched manually with a tag.linux-deblink fromDOWNLOADS_JSON, the same data/download/versionsuses, and downloads the DEB.scripts/build-linux-arch-package.shwith that URL, in the pinned Arch containerdesktop-release.ymlalready uses, with--network none.PKGBUILDit built from and its.SRCINFO, with the source pointed at the CDN asset. The AUR package therefore uses the official package's recipe, dependencies andpackage-formatmarker, and later changes to the builder carry over.ssh://aur@aur.archlinux.org/cap-bin.git, with the AUR host key pinned. It skips the push if the AUR already has a newer version or identical files. If the upstream version matches the AUR's but the recipe changed, it carries the AURpkgrelforward by one, so the fix reaches installed users as an upgrade instead of a same-version file swap.Builder changes (without a URL, the output is the same as before):
Cap_0.6.1_x86_64.deb). AUR helpers reuse build directories, and makepkg uses an existing file of the same name, so a fixedCap.debwould fail the checksum on every upgrade.# Maintainer:line the AUR guidelines ask for.Cap Software <hello at cap dot so>is a placeholder; change it to whatever you prefer.Setup needed from maintainers
AUR_SSH_PRIVATE_KEYrepository secret. Until it exists, the workflow builds and uploads the files, then ends with a warning instead of pushing.mainwithtag: cap-v0.6.1(or the latest release) to create the package. A release event runs the workflow from the tagged commit, so tags that predate this PR need this manual run.The AUR guidelines warn that automated updates don't replace a maintainer's attention. Because this PKGBUILD comes from the same builder as the official package, dependency changes only need to be made once. The account should still watch the package's comments and out-of-date flags.
Verification
cap-bin-0.6.1-1.PKGINFOidentical apart from build date and packager. Every payload file is identical: paths, modes, sizes, sha256.--network nonePKGBUILDand.SRCINFO.SRCINFOmatchesmakepkg --printsrcinfo.namcap PKGBUILDrun:blocks run locally againstcap-v0.6.1(resolve, download, build)v0.6.1,cap-v0.6, a nightly tag,cap-v0.5.9(nolinux-deblink) and a tag with no release.epoch = 1, the version check compares onlypkgver, and the downgrade check includes the epoch.Not tested: the real SSH push to
aur.archlinux.org, which needs an AUR account. The pinned ed25519 host key matches the fingerprint published on aur.archlinux.org and the one in archlinux/infrastructure'sdocs/ssh-known_hosts.txt. The release trigger also assumes the GitHub release is published by a maintainer or the Discord bot, not by a workflow'sGITHUB_TOKEN, because releases published with that token don't start other workflows. Nothing in this repo publishes them that way. If the next release doesn't start publish-aur, a manual dispatch with its tag does the same job.namcapon the package also reportshicolor-icon-themeas a missing dependency. The current builder already has that gap, so this PR leaves it; it can be added todependsin a follow-up.

Confidence Score: 5/5
No new issue was found that blocks merging.Summary
Adds stable-release publishing to the AUR as
cap-bin.cap-bin.Reviews (108) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile