Skip to main content

arch-mirror-receiver

Builds and serves a verified Arch Linux mirror from the chunks arch-mirror-downloader ships.

The service polls an inbox (polling, not inotify, so it works on a read-only network share) and only ever reads it. For each new chunk it checks the magic, extracts it, and checks every file against the chunk's message.json; a damaged chunk is rejected whole. Files join a hardlinked copy of the current snapshot. Once a snapshot's last chunk is in, it drops files the new state no longer has, verifies every package against its repo database, writes index.html, style.css and snapshot.json, and only then switches root/current. Clients never see a half-updated mirror. Chunks can come in any order; one made for a snapshot that isn't here yet waits.

Which chunks were applied is kept in root/receiver.db (by name, size and mtime), along with a checksum cache keyed by inode, so no file is hashed twice. A chunk that is still being copied in (modified less than settle_seconds ago) is left for the next poll.

Install

sudo useradd --system --home-dir /srv/arch-mirror arch-mirror
sudo UV_TOOL_DIR=/opt/uv-tools UV_TOOL_BIN_DIR=/usr/local/bin uv tool install arch-mirror-receiver
arch-mirror-receiver default-config | sudo install -Dm644 /dev/stdin /etc/arch-mirror-receiver/config.yaml   # then edit
sudo install -d -o arch-mirror -g arch-mirror /srv/arch-mirror
sudo install -m644 systemd/arch-mirror-receiver.service /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now arch-mirror-receiver

default-config prints every setting with its default and what it does. The units in systemd/ are in the repository.

Serve root/current/ with any web server. Its index.html shows the snapshot, when upstream reached that state and when it was published here, each repo's size, what changed, the packages built from the AUR, and a pacman.conf snippet. Clients:

[core]
Server = http://mirror.example/$repo/os/$arch
# likewise extra, multilib, the -debug repos
[aur]
SigLevel = Optional TrustAll   # built by the downloader, unsigned
Server = http://mirror.example/$repo/os/$arch

Use

arch-mirror-receiver watch           # the service
arch-mirror-receiver apply           # one pass
arch-mirror-receiver status          # current snapshot, recent chunks and their state
arch-mirror-receiver default-config  # commented default config (YAML) on stdout

Metadata

Release files for arch-mirror-receiver 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arch-mirror-receiver 0.1.0
File Size Uploaded Provenance Actions
arch_mirror_receiver-0.1.0.tar.gz 11.8 kB Without provenance Details for arch_mirror_receiver-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arch-mirror-receiver 0.1.0
File Interpreter ABI Platform Actions
arch_mirror_receiver-0.1.0-py3-none-any.whl Python 3 none any Details for arch_mirror_receiver-0.1.0-py3-none-any.whl

Total release size: 26.7 kB

Release files / arch_mirror_receiver-0.1.0.tar.gz

Download URL arch_mirror_receiver-0.1.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7bfc6dcd67d49b5fbd7e9c7c2703709d72e960e9fe3e2ff5eb89fbe20942b6b0
BLAKE2b-256 checksum
How to use checksums
64f4339ceb0026161818cd4fb2282feedf4c067eb8772cf37fb4b0fa8dcec5fb
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_receiver-0.1.0-py3-none-any.whl

Download URL arch_mirror_receiver-0.1.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e97ccd95415506c8951499fbec40f402c4971796abdb0694dbaeb02287c25917
BLAKE2b-256 checksum
How to use checksums
aebb398db04f9c41e108a637b8a4c9b8aeca5b695cb4415cd9f27f7fd01189c2
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-receiver 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page