Skip to content

feat(aur): add AUR packaging with auto-publish on release#23

Merged
jamesbrink merged 2 commits into
mainfrom
feat/aur-packaging
May 16, 2026
Merged

feat(aur): add AUR packaging with auto-publish on release#23
jamesbrink merged 2 commits into
mainfrom
feat/aur-packaging

Conversation

@jamesbrink
Copy link
Copy Markdown
Member

Summary

  • Add three in-tree AUR packages — 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.
  • Wire a publish-aur matrix job into release.yml that auto-refreshes pkgver + sha256sums and pushes to AUR on every tag push, gated on AUR_SSH_PRIVATE_KEY.
  • Add a headless Arch container (packaging/aur/test/Dockerfile) and scripts/aur/test-in-docker.sh for local PKGBUILD smoke tests on non-Arch hosts.
  • Teach claudex update to recognize pacman/AUR installs (/usr/bin/claudex, /usr/sbin/claudex) so it points at paru -Syu instead of attempting to overwrite a pacman-owned file. Addresses the one P1 from the Codex peer review.

Test plan

  • ci-local green — 222 tests pass, fmt + clippy + build clean.
  • Docker smoke test: claudex-bin 0.4.0-1 builds, installs via pacman, claudex --version runs.
  • No $pkgdir / /tmp leaks in installed completion files (clap-dynamic argv[0] gotcha fixed by invoking via PATH).
  • update-pkgbuild.sh populates real v0.4.0 SHA256s for both claudex-bin and claudex against the live GitHub release.
  • makepkg --printsrcinfo parses all three PKGBUILDs cleanly → .SRCINFO seeds committed.
  • release.yml parses; publish-aur job declared with correct needs, if, matrix.
  • New InstallKind::Pacman tests cover /usr/bin/claudex + /usr/sbin/claudex on Linux, and the off-Linux fallback.
  • Maintainer one-time bootstrap (post-merge): clone each AUR git repo and push the initial PKGBUILD + .SRCINFO. After that, CI takes over for -bin and the source package on the next tag push.

Notes

  • claudex-git is intentionally excluded from the CI matrix — it tracks main HEAD and is hand-bumped only when the build recipe changes.
  • AUR_SSH_PRIVATE_KEY is already set on the repo (maintainer's primary ed25519 key, registered with the AUR account).
  • Peer-reviewed via codex review --base main (high reasoning); one P1 raised and addressed.

See packaging/aur/README.md for the full release flow and bootstrap.

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
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.05%. Comparing base (ef374bc) to head (6419cf1).

Files with missing lines Patch % Lines
src/commands/update.rs 95.45% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + .SRCINFO seeds under packaging/aur/, with a headless Arch Docker test harness and an update-pkgbuild.sh helper that refreshes pkgver + sha256sums.
  • Wire a publish-aur matrix job into release.yml (gated on AUR_SSH_PRIVATE_KEY) that uses KSXGitHub/github-actions-deploy-aur to push to the AUR on every v* tag.
  • Add InstallKind::Pacman to claudex update, classify /usr/bin/claudex and /usr/sbin/claudex as 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.

@jamesbrink jamesbrink merged commit 2b76be2 into main May 16, 2026
13 checks passed
@jamesbrink jamesbrink deleted the feat/aur-packaging branch May 16, 2026 05:04
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.

2 participants