pmbootstrap-meow/docs/mirrors.md
Oliver Smith ebfda16d6d
args: remove -m and -mp (MR 2371)
Remove arguments to set postmarketOS and Alpine mirrors.

The current implementation is broken with the way the mirrors are now
configured: The current implementation fills a list, but the mirror
configuration code expects a string. It is not longer possible to set
an arbitrary amount of mirrors for the postmarketOS mirror. The benefit
is that we don't have comma separated values in the config file anymore
but instead just simple strings. Now it is possible to have one proper
mirror for aports, pmaports and pmaports_systemd, and one _custom one
to override each of these.

We already have too many options in "pmbootstrap -h", and changing a
mirror is more of a base configuration that you do once and maybe change
a few times, but don't need to be able to set it with each pmbootstrap
run. Users are not going to write this out manually on their
command-lines, it only makes sense in scripts and wrappers for
pmbootstrap, and there you could as well use another method (as now
described in docs/mirrors.md) to set the mirrors.

Less important, but another reason is that using "-mp" (two letters as
short argument) isn't really elegant.
2024-07-22 11:54:45 +02:00

1.9 KiB

Mirror Configuration

A typical postmarketOS installation has one Alpine Linux mirror configured as well as one postmarketOS mirror. As Alpine's CDN mirror is used by default, it should be suitable for most users. The postmarketOS mirror can be configured interactively with pmbootstrap init, under "additional options".

Find the currently selected mirrors in the output of pmbootstrap status, as well as in /etc/apk/repositories for initialized chroots and finished installations.

Advanced

Some advanced use cases are supported by configuring the mirrors directly, either by running the non-interactive pmbootstrap config command or by editing pmbootstrap_v3.cfg. Find the lists of mirrors at mirrors.alpinelinux.org and mirrors.postmarketos.org.

Change the mirrors non-interactively

$ pmbootstrap config mirrors.alpine http://uk.alpinelinux.org/alpine/
$ pmbootstrap config mirrors.pmaports http://postmarketos.craftyguy.net/

Reset to default works as with all config options:

$ pmbootstrap config -r mirrors.alpine
$ pmbootstrap config -r mirrors.pmaports

Disable the postmarketOS mirror

This is useful to test bootstrapping from pure Alpine:

$ pmbootstrap config mirrors.pmaports none
$ pmbootstrap config mirrors.systemd none

Use _custom mirrors

For all repositories, it is possible to add _custom entries, for example pmaports_custom in addition to pmaports. If these are set, then pmbootstrap creates addition entries infront of the real mirrors in /etc/apk/repositories. This is used by BPO to build packages with a WIP repository enabled in addition to the final repository, but could also be used if you have another custom repository that you want to use in addition to the postmarketOS binary package repository.

$ pmbootstrap config mirrors.pmaports_custom http://custom-repository-here