feat(aur): add AUR packaging with auto-publish on release#23
Conversation
Three packages maintained in-tree under packaging/aur/ as the source of truth: claudex-bin (repackages release tarball), claudex (builds from source tarball), claudex-git (tracks main HEAD). PKGBUILDs install shell completions (bash, zsh, fish) into the canonical Arch dirs. Release flow: a publish-aur matrix job in release.yml refreshes pkgver + sha256sums via scripts/aur/update-pkgbuild.sh and pushes to the AUR via KSXGitHub/github-actions-deploy-aur. Gated on AUR_SSH_PRIVATE_KEY so the job skips cleanly until bootstrap is done. Local verification: scripts/aur/test-in-docker.sh boots a headless Arch container (packaging/aur/test/Dockerfile) that builds + installs a PKGBUILD and runs claudex --version. Works under Rosetta / qemu-user on macOS / Windows. claudex update now recognizes pacman/AUR installs at /usr/bin/claudex (or /usr/sbin/claudex via Arch's usrmerge symlink) and prints the paru -Syu recipe instead of attempting to overwrite a pacman-owned file with sudo.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
==========================================
+ Coverage 80.00% 80.05% +0.05%
==========================================
Files 24 24
Lines 6312 6334 +22
==========================================
+ Hits 5050 5071 +21
- Misses 1262 1263 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds Arch User Repository (AUR) packaging for claudex with three packages — claudex-bin (binary), claudex (source), and claudex-git (VCS) — plus CI automation to auto-publish PKGBUILDs to the AUR on tagged releases. Also teaches claudex update to recognize pacman-managed install paths so it points users at paru -Syu instead of attempting to overwrite a package-owned file.
Changes:
- Add three in-tree AUR PKGBUILDs +
.SRCINFOseeds underpackaging/aur/, with a headless Arch Docker test harness and anupdate-pkgbuild.shhelper that refreshespkgver+sha256sums. - Wire a
publish-aurmatrix job intorelease.yml(gated onAUR_SSH_PRIVATE_KEY) that usesKSXGitHub/github-actions-deploy-aurto push to the AUR on everyv*tag. - Add
InstallKind::Pacmantoclaudex update, classify/usr/bin/claudexand/usr/sbin/claudexas pacman-managed on Linux, surface a paru/yay/pacman hint, and update docs/README/CHANGELOG/CLAUDE.md accordingly.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/commands/update.rs |
Adds Pacman install kind, Linux-only /usr/bin + /usr/sbin detection, upgrade hint, and tests. |
src/main.rs |
Extends update --help text to mention pacman/AUR. |
tests/cli_tests.rs |
Asserts pacman appears in update help output. |
packaging/aur/claudex-bin/PKGBUILD + .SRCINFO |
Binary AUR package using release tarballs. |
packaging/aur/claudex/PKGBUILD + .SRCINFO |
Source-build AUR package from release tarball with cargo --frozen. |
packaging/aur/claudex-git/PKGBUILD + .SRCINFO |
VCS package tracking main, with conventional git describe pkgver. |
packaging/aur/README.md |
Documents release flow, bootstrap, and local smoke-test workflow. |
packaging/aur/test/Dockerfile |
Headless Arch container for makepkg smoke tests on non-Arch hosts. |
packaging/aur/.gitignore |
Ignores makepkg build artifacts. |
scripts/aur/update-pkgbuild.sh |
Rewrites pkgver/sha256sums against a release tag; portable across GNU/BSD sed and sha256sum/shasum. |
scripts/aur/test-in-docker.sh |
Driver for the Arch container smoke test (docker/podman, --rebuild/--shell flags). |
.github/workflows/release.yml |
Adds publish-aur matrix job gated on AUR_SSH_PRIVATE_KEY. |
README.md, website/guide/installation.md, CHANGELOG.md, CLAUDE.md |
Documentation updates covering the new install path and release-process invariants. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
claudex-bin(repackages release tarball),claudex(builds from source tarball),claudex-git(tracks main HEAD). PKGBUILDs install bash/zsh/fish completions out of the box.publish-aurmatrix job intorelease.ymlthat auto-refreshespkgver+sha256sumsand pushes to AUR on every tag push, gated onAUR_SSH_PRIVATE_KEY.packaging/aur/test/Dockerfile) andscripts/aur/test-in-docker.shfor local PKGBUILD smoke tests on non-Arch hosts.claudex updateto recognize pacman/AUR installs (/usr/bin/claudex,/usr/sbin/claudex) so it points atparu -Syuinstead of attempting to overwrite a pacman-owned file. Addresses the one P1 from the Codex peer review.Test plan
ci-localgreen — 222 tests pass, fmt + clippy + build clean.claudex-bin 0.4.0-1builds, installs via pacman,claudex --versionruns.$pkgdir//tmpleaks in installed completion files (clap-dynamic argv[0] gotcha fixed by invoking via PATH).update-pkgbuild.shpopulates real v0.4.0 SHA256s for bothclaudex-binandclaudexagainst the live GitHub release.makepkg --printsrcinfoparses all three PKGBUILDs cleanly →.SRCINFOseeds committed.release.ymlparses;publish-aurjob declared with correctneeds,if, matrix.InstallKind::Pacmantests cover/usr/bin/claudex+/usr/sbin/claudexon Linux, and the off-Linux fallback.-binand the source package on the next tag push.Notes
claudex-gitis intentionally excluded from the CI matrix — it tracksmainHEAD and is hand-bumped only when the build recipe changes.AUR_SSH_PRIVATE_KEYis already set on the repo (maintainer's primary ed25519 key, registered with the AUR account).codex review --base main(high reasoning); one P1 raised and addressed.See
packaging/aur/README.mdfor the full release flow and bootstrap.