arch-mirror-downloader
Ships consistent snapshots of the Arch Linux repos, plus packages built from the AUR, local or git PKGBUILDs, to an airgapped mirror through a one-way path, from a host with a small disk. The other side is arch-mirror-receiver.
Each sync:
- Builds the AUR/local/git packages first, in throwaway docker containers, against live upstream.
- Fetches all repo databases until a round starts and ends on the same upstream
lastupdate. - Downloads (over http(s), as pacman, 5 at a time) every package version not moved before, checks each against its database sha256, and appends it to the chunk being filled.
- A full chunk (
chunk_limit) is closed and moved to the outbox; the last one adds the AUR repo, the databases and the snapshot's file list.
A chunk is chunk_magic (4 bytes) + a tar whose last member, message.json, lists every file
with its sha256. Files are named <chunk_prefix><YYYYmmdd-HHMMSS>-<seq><chunk_suffix> (UTC; unique even after a
reset). A sqlite db in root
records the newest version of each package that has left (written only after its chunk moved),
so reruns fetch only what's new, and an interrupted run continues the open chunk.
Local disk needed: chunk_limit + batch_size + about 1 GB of databases + docker storage for
the builds.
Install
sudo useradd --system --home-dir /var/lib/arch-mirror-downloader --groups docker arch-mirror
sudo UV_TOOL_DIR=/opt/uv-tools UV_TOOL_BIN_DIR=/usr/local/bin uv tool install arch-mirror-downloader
arch-mirror-downloader default-config | sudo install -Dm644 /dev/stdin /etc/arch-mirror-downloader/config.yaml # then edit
sudo install -m644 systemd/arch-mirror-downloader.{service,timer} /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now arch-mirror-downloader.timer
default-config prints every setting with its default and what it does. The units in systemd/
are in the repository.
The outbox must be writable by the arch-mirror user.
Use
arch-mirror-downloader sync # what the timer runs; progress bars on a terminal
arch-mirror-downloader status # last snapshot shipped, packages moved, open chunk
arch-mirror-downloader rank # which upstreams carry every repo, fastest first
arch-mirror-downloader reset # forget what was shipped; next sync sends everything
arch-mirror-downloader default-config # commented default config (YAML) on stdout
-c/--config (or ARCH_MIRROR_DOWNLOADER_CONFIG) picks another config. Exit status: 0 shipped
or nothing new, 2 shipped but an AUR build failed (that package keeps its previous build), 1 no
upstream could deliver.
arch-mirror-downloader reset forgets what was shipped: the next sync downloads and ships the
whole mirror again, and the receiver takes it as a fresh snapshot. Use it if a chunk was lost on
the way, or to test. --aur also drops the AUR builds, so all are rebuilt.
Metadata
Release files for arch-mirror-downloader 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arch_mirror_downloader-0.1.0.tar.gz | 19.6 kB | Without provenance | Details for arch_mirror_downloader-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arch_mirror_downloader-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for arch_mirror_downloader-0.1.0-py3-none-any.whl |
Total release size: 43.3 kB
Release files / arch_mirror_downloader-0.1.0.tar.gz
| Download URL | arch_mirror_downloader-0.1.0.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4f58707377426608142313414eb092d081b64340184528adcfc338770a29aac
|
|
BLAKE2b-256 checksum How to use checksums |
9399a1eecf0bb56a62c46ebf974f52f2839085360274d434fb2ffa04dfdea24a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / arch_mirror_downloader-0.1.0-py3-none-any.whl
| Download URL | arch_mirror_downloader-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad19833f233cb6812a17107f636ecd21fd379ecd685a62a927a555b6c3c7c6f7
|
|
BLAKE2b-256 checksum How to use checksums |
3c27c7c5c090c0693e2f062f87a66224d95acd62017d2c776f029d8c0603ae12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for arch-mirror-downloader 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.