https://github.com/torxed/mirrortest
Test a given Arch Linux mirror against the Tier0 mirror
https://github.com/torxed/mirrortest
Last synced: about 2 months ago
JSON representation
Test a given Arch Linux mirror against the Tier0 mirror
- Host: GitHub
- URL: https://github.com/torxed/mirrortest
- Owner: Torxed
- License: agpl-3.0
- Created: 2023-03-04T13:32:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T18:16:30.000Z (over 1 year ago)
- Last Synced: 2025-02-12T08:39:14.906Z (3 months ago)
- Language: Python
- Size: 52.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mirrortest
Test a given Arch Linux mirror against the Tier0 mirror[](https://github.com/Torxed/mirrortest/actions/workflows/flake8.yaml)
[](https://github.com/Torxed/mirrortest/actions/workflows/mypy.yaml)
[](https://github.com/Torxed/mirrortest/actions/workflows/pytest.yaml)# Installing
```bash
$ pip install .
```This project depends only on pydantic.
# Running
The password is the one-time generated token for the tier0 access you get as a mirror admin.
```bash
$ python -m mirrortest --tier0 'https://torxed:@repos.archlinux.org/$repo/os/$arch' --mirror 'https://ftp.acc.umu.se/mirror/archlinux/'
````Once run, it creates a `~/.config/mirrortest/config.json` session.
After which `--tier0` is no longer a required parameter.Keep in mind that your password is stored in plain text in the session config.
# Default values
```python
MAX_TIER1_SYNC_DRIFT_SEC :int = 3600 * 2 # 2h
MAX_TIER2_SYNC_DRIFT_SEC :int = 3600 * 6 # 6h
CON_TIMEOUT :int = 5 # A reasonable HTTP connection timeout limit
DEFAULT_TIER_NR :int = 2 # Which is the default tier to assume without giving --tier
```# Development
If you wish to run it directly as you edit the source code, you can `cd` into the cloned directory and run
```bash
python -m mirrortest --mirror ''
```