pacman in the middle

Current version: 1.0

A simple pacman caching server.

Rationale

This small utility sets up a small caching server for pacman. It was created to reduce the download times on local Arch Linux machines by preloading the updates during the night.

It is intended to run on a host that does not match the client e.g. Arch Linux ARM server with regular Arch Linux clients.

Pitm maintains it's own database, keystore and cache isolated from the host's.

The host running pitm does not have to use pacman itself but needs to have pacman installed. On how to install pacman see your distributions package repository:

Arch Linux ARM
included
Debian
pacman-package-manager

This program assumes familiarity with pacman.

Dependencies

Setup and Installation

Run pitm_init from the source directory. This sets up the correct directory structure and initializes the pacman keyring.

The configuration files are stored in /etc/pitm/ and the packages are downloaded to /var/cache/pitm/pkg/ .

If your /var/cache is too volatile you need to change the paths accordingly. You also need to set up a web server to serve these files to the target clients. See their relavent documentation pages for the correct setup.

A systemd service (pitm.service) and timer (pitm.timer) are included. Copy them to their respective destinations. The default configuration downloads the packages every Friday night, adjust this service file for your needs.

The downloader reads the package names from *.paclist files in the configuration directory. They need to contain the package names to be downloaded. You can generate them using pacman, see utils for more.

On the client you can then use the CacheServer directive.

Configuration

All configuration is done through the pacman.conf in the configuration directory. Check the pacman manpage for more information.

Mirror list

The default mirrorlist is located in the configuration directory. An up-to-date (Arch Linux) mirrorlist can be found at https://archlinux.org/mirrorlist/ or the upstream pacman-mirrorlist package.

Utils

non_aur_packages
create a package list without AUR packages

Troubleshooting

The downloader can be run in manual intervention mode:

pitm_download -m

When a package is not found the downloader will fail and manual intervention is required. In this case you need to check your host system and update the paclist file accordingly.