Skip to main content

Native packages

AURCache ships as AUR packages — they live in the AUR, not the official repositories, so install them with an AUR helper (paru, yay, …):

paru -S aurcache-server # the build server and web UI
paru -S aurcache-worker # a build machine

They are separate because their dependencies are: the server needs no devtools, base-devel or sudo, and most build machines do not want a server. Both may be installed together on one host; they share the aurcache user.

Building the packages yourself​

git submodule update --init # the packaging/ dirs are submodules of the AUR repos
cd packaging/aurcache-server && makepkg -si
cd ../aurcache-worker && makepkg -si

Two PKGBUILDs rather than one split package: the roles share almost no dependencies, and makepkg cannot build one half of a split — which the container images need, since a worker image has no reason to carry the server.

makepkg -si installs the build dependencies itself. The server's web UI is compiled to wasm during its build, and its JavaScript glue is generated by a pinned build dependency, so the build needs nothing from the system beyond Rust's wasm32 target (rust-wasm). The worker does not carry the web UI.

Both PKGBUILDs set options=(!lto). makepkg's LTO adds -flto=auto to CFLAGS, and the cc crate hands that to the vendored C in aws-lc-sys and ring; their static archives then hold GCC LTO bytecode, which ld.lld — the linker rustc drives — cannot read. The build fails at link with undefined aws_lc_* symbols and no error from the build script, which is an unpleasant thing to diagnose from scratch. Rust's own LTO is cargo's business and is unaffected.

Cross-compiling​

Arch has no cross-compilation mode — no --target, and nothing in devtools — but CARCH is a plain shell variable makepkg uses to label the package, so exporting it and cross-compiling inside build() produces a correctly labelled result:

pacman -S aarch64-linux-gnu-gcc
cd packaging/aurcache-worker
CARCH=aarch64 makepkg --nodeps --nocheck

--nodeps because dependency resolution would consult the host's repositories, and --nocheck because the tests cannot run binaries built for another architecture. This is what the container images do.

Only x86_64 and aarch64 are supported. The aarch64 toolchain is in extra; armv7's is not packaged officially, and Arch Linux ARM ships no x86_64 cross toolchain at all — so the images must be built on an x86_64 host.