Thoughts on clojure, linux, security and Bitcoin's 0.1v (Satoshi Nakamoto's Design) in an era of artificial intelligence
Arch Linux and its performance-optimized sibling, CachyOS, have one of the most powerful and elegant packaging systems in the entire Linux ecosystem. However, for newcomers and developers transitioning from other distributions, concepts like PKGBUILDs, the AUR, AUR helpers (like paru/yay), and custom repository forks can quickly become confusing.
If you have ever wondered:
This guide breaks it down with clear diagrams, comparisons, and technical details.
To understand this system, let's look at a quick analogy:
.pkg.tar.zst file). This is what you actually consume (install).paru) is your automated personal chef. It visits the recipe site, fetches the instructions, downloads the ingredients, cooks it, and serves it to you.Here is how source code on the internet eventually becomes a running application on your machine:
flowchart TD
%% Custom Styling
classDef source fill:#1e1e2e,stroke:#f38ba8,stroke-width:2px,color:#cdd6f4;
classDef recipe fill:#1e1e2e,stroke:#f9e2af,stroke-width:2px,color:#cdd6f4;
classDef repository fill:#1e1e2e,stroke:#a6e3a1,stroke-width:2px,color:#cdd6f4;
classDef build fill:#1e1e2e,stroke:#89b4fa,stroke-width:2px,color:#cdd6f4;
classDef final fill:#11111b,stroke:#a6e3a1,stroke-width:3px,color:#a6e3a1;
%% Elements
A["π Upstream Source Code<br/>(GitHub, GitLab, tar.gz)"]:::source
subgraph AUR_Directory ["π Arch User Repository (AUR)"]
B["π PKGBUILD Script<br/>(Text instructions)"]:::recipe
end
C["π οΈ AUR Helper (paru / yay)"]:::build
D["βοΈ makepkg Tool<br/>(Local Compilation)"]:::build
E["π¦ Built Arch Package<br/>(*.pkg.tar.zst)"]:::build
F["π₯οΈ Target System<br/>(Installed via pacman)"]:::final
%% Flow
B -->|1. paru pulls recipe| C
A -->|2. Downloads code| C
C -->|3. Feeds code & recipe| D
D -->|4. Compiles & packages| E
E -->|5. Installs binary| F
A PKGBUILD is a plain-text shell script containing variables and functions (like prepare(), build(), and package()).
Here is a simplified look at what a PKGBUILD does:
pkgname=freebuff-bin
pkgver=0.0.106
arch=('x86_64')
depends=('glibc')
source=("https://github.com/CodebuffAI/codebuff/releases/download/v${pkgver}/freebuff-linux")
package() {
# Install the precompiled binary into the system binary path
install -Dm755 "${srcdir}/freebuff-linux" "${pkgdir}/usr/bin/freebuff"
}
No. The AUR website only hosts text-based PKGBUILD scripts (along with occasional helper configuration files). It does not store .exe, .bin, or .pkg.tar.zst packages.
However, some package names on the AUR end with -bin (e.g., freebuff-bin). This is a naming convention:
freebuff (Source package): The PKGBUILD downloads the raw C/Rust/Go source code, compiles it on your machine (which can take minutes or hours), and packages the result.freebuff-bin (Binary package): The PKGBUILD skips compilation by downloading a pre-built binary compiled by the original developers (e.g., from their GitHub Releases page) and packages it instantly.CachyOS is a downstream distribution focused on squeezing out every drop of performance from modern hardware. Instead of fetching generic packages from Arch Linux or compilation scripts from the AUR, they maintain a fork called CachyOS-PKGBUILDS.
They do this to implement three key enhancements:
x86-64 CPUs (compatible with older computers). CachyOS rebuilds these packages targeting x86-64-v3 (which requires AVX2) and x86-64-v4 (AVX-512). This makes CPU-bound software significantly faster.linux-cachyos), CPU scheduler configurations (scx for sched-ext), and custom compiler flags (-O3, LTO).If you are coming from a Debian-based (Ubuntu, Mint) or Red Hat-based (Fedora, RHEL) background, the Arch approach feels very different. Traditional distributions handle packaging and third-party software using different philosophies:
.deb).deb files) hosted in large central repositories..deb package requires a complex file structure (including a debian/control file, debian/rules file, etc.) and utilities like dpkg-buildpackage. It is significantly more difficult to write than a single PKGBUILD script..rpm).rpm files)..rpm package requires writing an RPM .spec file. While structured, spec files are notoriously verbose and complex compared to the clean, Bash-like syntax of PKGBUILDs.PKGBUILD is a single, readable Bash script. Debian and Red Hat packages require complex build directories and specialized spec/rule syntaxes.x86-64 hardware. CachyOS rebuilds everything specifically to leverage modern CPU instructions.flowchart TD
%% Custom Styling
classDef arch fill:#1e1e2e,stroke:#89b4fa,stroke-width:2px,color:#cdd6f4;
classDef debian fill:#1e1e2e,stroke:#f38ba8,stroke-width:2px,color:#cdd6f4;
classDef compile fill:#1e1e2e,stroke:#f9e2af,stroke-width:2px,color:#cdd6f4;
classDef system fill:#11111b,stroke:#a6e3a1,stroke-width:3px,color:#cdd6f4;
subgraph Arch_Model ["Arch Linux (AUR) Model"]
A1["π AUR Server<br/>(Hosts PKGBUILD Script)"]:::arch
A2["π Upstream Source Code<br/>(GitHub / Tarball)"]:::arch
A3["βοΈ User's Machine<br/>(Compiles & Packages)"]:::compile
A4["π₯οΈ Installed Program"]:::system
A1 -->|1. Downloads script| A3
A2 -->|2. Downloads code| A3
A3 -->|3. Install package| A4
end
subgraph Debian_RedHat_Model ["Debian (PPA) / RedHat (COPR) Model"]
B1["π Recipe / Spec File"]:::debian
B2["π Upstream Source Code"]:::debian
B3["βοΈ Build Servers<br/>(Canonical/RedHat Cloud)"]:::compile
B4["π¦ Hosted Binary Repository<br/>(.deb / .rpm)"]:::debian
B5["βοΈ User's Machine<br/>(Apt / DNF Download)"]:::compile
B6["π₯οΈ Installed Program"]:::system
B1 -->|1. Build trigger| B3
B2 -->|2. Upload code| B3
B3 -->|3. Compile & store| B4
B4 -->|4. Download binary| B5
B5 -->|5. Install| B6
end
| Feature | Upstream Code / Release | PKGBUILD Script | AUR (Arch User Repo) | CachyOS PKGBUILD Repo |
|---|---|---|---|---|
| What is it? | Raw application source code or generic binary releases. | A text file containing build instructions. | A community directory of PKGBUILD scripts. | A curated collection of CachyOS-specific PKGBUILDs. |
| Host Location | GitHub, GitLab, official websites. | Local filesystem (e.g., /tmp). | aur.archlinux.org | github.com/CachyOS/CachyOS-PKGBUILDS |
| Content Type | .tar.gz, .zip, .rs, .cpp, .go | Plain text shell script (bash syntax). | Git repositories containing only PKGBUILD files. | Git repository containing CachyOS package build scripts. |
| Compilation | N/A (unbuilt source). | Happens when you run makepkg on it. | User compiles it locally (unless it's a -bin package). | Pre-compiled on CachyOS servers; distributed via pacman mirrors. |
| Optimizations | Generic. | Up to the user's local configuration. | Generic. | Highly optimized (AVX2, AVX-512, -O3, LTO). |
When you want to run new software like Freebuff (a terminal-based AI coding assistant):
CachyOS-PKGBUILDS.paru (e.g., paru -S freebuff-bin).paru reads the recipe from the AUR, downloads the binary release from upstream, and installs it cleanly on your system.Published: 2026-06-14