feat(packaging): add Arch Linux package (.pkg.tar.zst) and AUR publishing#265
feat(packaging): add Arch Linux package (.pkg.tar.zst) and AUR publishing#265cserby wants to merge 3 commits into
Conversation
Build a .pkg.tar.zst via nfpm alongside .deb/.rpm on every release. Ship it in the GitHub Release, include it in SHA256SUMS and minisign. Add a PKGBUILD template for the openlogi-bin AUR package, along with a post-publish CI job that updates the AUR repo when AUR_SSH_KEY is set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR extends the Linux packaging pipeline to produce Arch Linux
Confidence Score: 5/5Safe to merge — all blocking issues from prior review rounds are resolved and no new defects were found in the changed code. The Arch Linux packaging path is end-to-end correct: nfpm produces the archive, the release CI collects/checksums/signs it, the PKGBUILD template downloads from the published release and extracts with all metadata files (including .MTREE) properly excluded, and the AUR push is gated on a working pipefail-protected checksum step. The only findings are minor style nits. No files require special attention; packaging/aur/PKGBUILD.tmpl has a trivial missing-default-case nit in its case block. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[git tag pushed] --> B[linux-packages job\nnfpm: deb + rpm + archlinux]
A --> C[macos / windows jobs]
B --> D[Collect packages\ncopy .deb .rpm .pkg.tar.zst to dist/]
D --> E[upload-artifact\nOpenLogi-linux-packages-*]
C --> F[publish job]
E --> F
F --> G[Generate SHA256SUMS\n*.dmg *.exe *.msi *.deb *.rpm *.pkg.tar.zst]
G --> H[minisign all artifacts]
H --> I[R2 upload]
I --> J[GitHub Release\nwith all artifacts + SHA256SUMS]
J --> K[aur-check job\ncheck AUR_SSH_KEY secret]
K -->|enabled=false| L[skip aur-publish]
K -->|enabled=true| M[aur-publish job\narchlinux:base-devel container]
M --> N[curl .pkg.tar.zst from GH Release\ncompute sha256 with pipefail]
N --> O[sed PKGBUILD.tmpl\nstamp version + checksums]
O --> P[makepkg --printsrcinfo\ngenerate .SRCINFO as builder user]
P --> Q[git push to AUR\naur.archlinux.org/openlogi-bin.git]
Reviews (3): Last reviewed commit: "fix(ci): add pipefail to AUR checksum st..." | Re-trigger Greptile |
- Add .MTREE to bsdtar exclusion list in PKGBUILD.tmpl; nfpm includes .MTREE in .pkg.tar.zst and without exclusion it would land as /.MTREE on every user's machine - Replace secrets.AUR_SSH_KEY != '' in job-level if with a dedicated aur-check gate job that exposes an `enabled` output — avoids relying on the secrets context in job if expressions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closes #255
Summary
archlinuxpackager alongsidedeb/rpminxtask/src/linux.rs;cargo run -p xtask -- package-linuxnow produces a.pkg.tar.zstin addition to.deb/.rpmarchlinux:section (packager metadata); update header comment with thearchlinuxexample invocation.pkg.tar.zstin thelinux-packagesjob (fixes the compound-extension problem —ext="${pkg##*.}"was givingzst, notpkg.tar.zst); include in SHA256SUMS, minisign loop, R2 upload, and GitHub Release filespackaging/aur/PKGBUILD.tmpl: template for theopenlogi-binAUR package — downloads the nfpm-built.pkg.tar.zstfrom the GitHub Release for the matching architecture, extracts it (stripping pacman metadata files) intopkgdirpackaging/aur/openlogi.install: pacman install-script hooks (post_install/post_upgrade/post_remove) equivalent to the existingnfpm-scripts/aur-publishjob: runs inarchlinux:base-develcontainer afterpublish; skipped unlessAUR_SSH_KEYsecret is set; stamps version + SHA256 checksums into PKGBUILD, generates.SRCINFOviamakepkg --printsrcinfo, and pushes toaur.archlinux.org/openlogi-bin.gitSetup required
To activate AUR publishing, add a secret named
AUR_SSH_KEYto the repository containing an Ed25519 private key registered with an AUR account that has maintainer access toopenlogi-bin. The AUR package itself needs to be created once manually (clone the empty AUR repo, push the initial PKGBUILD).Test plan
cargo run -p xtask -- package-linux --no-build(with binaries already built) producestarget/release/openlogi-*.pkg.tar.zst.pkg.tar.zstinstalls cleanly on an Arch Linux system withpacman -Ulinux-packagesCI job artifact includes*.pkg.tar.zst🤖 Generated with Claude Code