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
arch-mirror-receiver --install-completion   # tab completion for your shell (bash, zsh, fish)

Metadata

Release files for arch-mirror-receiver 0.1.1

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.1
File Size Uploaded Provenance Actions
arch_mirror_receiver-0.1.1.tar.gz 11.9 kB Without provenance Details for arch_mirror_receiver-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 26.9 kB

Release files / arch_mirror_receiver-0.1.1.tar.gz

Download URL arch_mirror_receiver-0.1.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
522a6134076465ca11affc02c514df3e7ee4bec155ec7b3b8b36a95ca67d4317
BLAKE2b-256 checksum
How to use checksums
336528a2e8a66473095ef96b564374ed77e986ac0a5f004cdd33f65ca35adc39
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.1-py3-none-any.whl

Download URL arch_mirror_receiver-0.1.1-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0d94adc6e9f9593b59d3c74171ab463b2e5aa115f544b3734ea5de25f165135
BLAKE2b-256 checksum
How to use checksums
4fc92ff23c31f87d6d3d94c78ffcacb6383b9cbbab8e558972030c60dd4dc2c1
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.1

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.1 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