Arch Linux
- class
- AlpmRegistry
- purl type
- pkg:alpm
- api
- archlinux.org, aur.archlinux.org
- version status
- deprecated when flagged out of date
Address it
await fetchPackageFromPURL("pkg:alpm/arch/pacman"); // official repos
await fetchPackageFromPURL("pkg:alpm/pacman"); // the same, arch is the default
await fetchPackageFromPURL("pkg:alpm/aur/paru"); // AUR, namespace required
The namespace picks the backend. arch and a missing namespace go to archlinux.org; aur goes to aur.archlinux.org; anything else is a NotFoundError. Names are lowercased.
What it reads
| Call | Official | AUR |
|---|---|---|
| all four | GET /packages/search/json/?name={name}, the x86_64 result preferred | GET /rpc/v5/info/{name} |
The AUR host is fixed at https://aur.archlinux.org; repository_url only overrides the official host.
Package
Official packages carry the repo, architecture, pkgbase, sizes, build and update dates, packager, provides, conflicts and replaces in metadata; keywords are the package groups; namespace is arch. AUR packages carry votes, popularity, the out of date stamp, pkgbase and the submission and modification dates; namespace is aur. Neither has a repository or documentation field on the registry.
latestVersion is epoch:pkgver-pkgrel for official packages, without the epoch when it is zero, and Version for the AUR.
Versions
Exactly one: the current one. Arch keeps no version history in either API. publishedAt is the last update or modification date, integrity is empty, and status is deprecated when the package is flagged out of date.
Dependencies
Both backends list depends, makedepends, checkdepends and optdepends:
| Field | scope | optional |
|---|---|---|
depends | runtime | false |
makedepends | build | false |
checkdepends | test | false |
optdepends | optional | true |
Requirements are split from the entry (glibc>=2.38). An optional dependency's description after the colon is kept in requirements' place when there is no constraint. Because there is only one version, fetchDependencies requires the version to match the current one and throws NotFoundError otherwise.
Maintainers
Official packages list their maintainers by username; the AUR lists the single Maintainer, or nobody for an orphan. Every entry has role: "maintainer".
URLs
urls.registry("pacman"); // https://archlinux.org/packages/?name=pacman
urls.registry("aur/paru"); // https://aur.archlinux.org/packages/paru
urls.download("pacman", "7.1.0-2"); // https://archive.archlinux.org/packages/p/pacman/
urls.download("aur/paru", "2.0.4-1"); // https://aur.archlinux.org/cgit/aur.git/snapshot/paru.tar.gz
urls.documentation("pacman"); // https://wiki.archlinux.org/title/pacman
Gotchas
- The official search endpoint matches by exact name but returns one result per architecture; the adapter prefers
x86_64. - Split packages share a
pkgbase; ask for the package name, not the base. - The AUR RPC rate limits by IP at a few thousand requests a day. Cache lookups if you sweep.
Where it lives
src/registries/alpm.ts, the one adapter that routes to two APIs.