Skip to main content

apt-mirror2

apt-mirror2 is the Python/asyncio reimplementation of the apt-mirror developed as drop-in replacement for the latest.
This project should be suitable as general apt-mirror replacement.

Requirements

Python 3.10 is the minimum supported version.
For additional dependencies look to the pyproject.yml and/or requirements.txt.

Installation

Docker

Docker image is available in the Docker Hub under aptmirror/apt-mirror2 repository. You can try it using

docker run -it --rm aptmirror/apt-mirror2 --help

PyPi

PyPi package is available with the name apt-mirror:

pip install apt-mirror
apt-mirror --help

Build from source with virtualenv

It's possible to use apt-mirror2 from a virtualenv:

# Let's work in the home folder
cd

# Create virtualenv
virtualenv ~/venv/apt-mirror2
source ~/venv/apt-mirror2/bin/activate

# Clone apt-mirror2 source code
git clone https://gitlab.com/apt-mirror2/apt-mirror2
cd apt-mirror2

# Install requirements
pip install -r requirements.txt

# Install apt-mirror2 into virtualenv
python setup.py install

apt-mirror --help

Usage

As the drop-in replacement for the apt-mirror this project supports same CLI syntax.

usage: apt-mirror [-h] [--version] [configfile]

positional arguments:
  configfile  Path to config file. Default /etc/apt/mirror.list

options:
  -h, --help  show this help message and exit
  --version   Show version

apt-mirror configuration compatibility

Most of apt-mirror configuration directives are supported.
As of now proxy for FTP repositories is not supported.

In addition there are some enhancements available:

  • Standard source.list [ arch=arch1,arch2 ] can be used to specify multiple repository architectures for mirroring.
  • mirror_path URL PATH option may be used to specify PATH to use for saving mirror files instead of path that is generated from URL.
  • Additional configuration is loaded from the *.list files in the directory named same as configfile with the .d suffix. Eg /etc/apt/mirror.list.d/*.list.
  • Rate limit is enforced for overall download rate

License

GNU General Public License v3.0 or later

Metadata

Release files for apt-mirror 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 apt-mirror 1
File Size Uploaded Provenance Actions
apt-mirror-1.tar.gz 55.8 kB Without provenance Details for apt-mirror-1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apt-mirror 1
File Interpreter ABI Platform Actions
apt_mirror-1-py3-none-any.whl Python 3 none any Details for apt_mirror-1-py3-none-any.whl

Total release size: 100.4 kB

Release files / apt-mirror-1.tar.gz

Download URL apt-mirror-1.tar.gz
Size 55.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6755384d042ab25c87b252b181f604e3269d688abb5db62785d11a21b8440cbe
BLAKE2b-256 checksum
How to use checksums
493b8fd9d73aeb2abcfde225ae6c26ee71e12959bb09ac1ec90d2138ec47b941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / apt_mirror-1-py3-none-any.whl

Download URL apt_mirror-1-py3-none-any.whl
Size 44.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
774bd91d26bc44c83edaad64b7af7bb93ea1e7f6b1532fb34dc75f800cc13ef5
BLAKE2b-256 checksum
How to use checksums
f64777d23b8acbb26ef4e0d03321d0f24a07ee3875fb9588d17d5a6a8d5bf788
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Security for apt-mirror 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.

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