Disable release LTO (`options=('!debug' '!lto')`) so the final link no
longer gets OOM-killed on low-memory AUR build hosts, and pin CARGO_HOME
to the registry that build() already populated before check() repoints
HOME at an empty test home, so the --frozen test run can resolve the
packages it fetched instead of failing offline.
Guarded by a packaging test that asserts both properties.
Closes #677
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MDbhmszrjG9s5MrPrTuNtm
AUR Packaging
This directory contains the package definitions for two Arch User Repository packages:
ai-memory-bin: installs the prebuilt Linux x86_64/aarch64 binary and bundled files from GitHub Releases.ai-memory: builds from the GitHub source tag with the local Rust toolchain.
The files here are the source of truth for the AUR repos, but AUR still requires
each package to be pushed to its own Git repository with a generated .SRCINFO.
User Install
Use an AUR helper:
yay -S ai-memory-bin # prebuilt binary, fastest on x86_64/aarch64
yay -S ai-memory # builds from source, supports x86_64/aarch64
Then follow the native Linux service instructions in docs/install.md.
Local Integration Test
Before publishing package updates, run the manual distrobox harness from the repository root:
scripts/test-native-arch-systemd-distrobox.sh
It creates a disposable Arch distrobox, builds the current working tree,
installs the native filesystem layout, verifies the AUR metadata shape, starts
the packaged system service with real systemctl, smoke-tests the user profile
runner under transient systemd supervision, and confirms packaged hook sources
stage correctly.
Routine CI runs scripts/check-native-packaging.sh for non-destructive coverage
against a temporary alternate root. The distrobox script is the final real
service-start smoke before publishing.
Maintainer Release Checklist
The GitHub release workflow publishes these AUR repos automatically on v*.*.*
tags when AUR_SSH_PRIVATE_KEY is configured. It validates that the tag version
matches Cargo.toml, computes fresh checksums, generates .SRCINFO, and pushes
both ai-memory and ai-memory-bin.
For every new upstream release:
- Bump
[workspace.package].versioninCargo.tomland all workspace crate dependency versions as usual. - Run the local gate, including
scripts/check-native-packaging.shand the disposable distrobox integration test. - Push a matching version tag, for example
v0.3.0. - Confirm the
releaseworkflow created the GitHub release, pushed Docker if Docker Hub secrets are configured, and pushed AUR ifAUR_SSH_PRIVATE_KEYis configured.
Manual fallback if the AUR job is disabled or needs repair:
- Update
pkgverin bothPKGBUILDfiles and resetpkgrel=1. - Update source checksums. Replace any temporary
SKIPvalues before pushing to AUR. - Validate both package variants with
makepkg --verifysourceandmakepkg -Ccf. - Generate
.SRCINFOin each AUR checkout withmakepkg --printsrcinfo > .SRCINFO. - Commit and push to the separate AUR repos:
ai-memoryandai-memory-bin.
Checksum helpers for version X.Y.Z:
version=X.Y.Z
# Source package tarball
curl -fsSL "https://github.com/akitaonrails/ai-memory/archive/refs/tags/v${version}.tar.gz" | sha256sum
# Binary package release artifacts
curl -fsSL "https://github.com/akitaonrails/ai-memory/releases/download/v${version}/ai-memory-linux-x86_64.tar.gz.sha256"
curl -fsSL "https://github.com/akitaonrails/ai-memory/releases/download/v${version}/ai-memory-linux-aarch64.tar.gz.sha256"