pmaports.git
pmaports.git
(GitLab) holds the package build recipes of postmarketOS, in the APKBUILD format. It is automatically checked out by pmbootstrap during pmbootstrap init
(unless overridden with --aports
). The default location of the local checkout is ~/.local/var/pmbootstrap/cache_git/pmaports
:
$ pmbootstrap config aports
/home/user/.local/var/pmbootstrap/cache_git/pmaports
Remember the pmbootstrap status
command, it will print this path as well as the checked out branch and some other useful status information.
Naming
pmaports stands for postmarketOS aports, and aports in turn are the Alpine ports. The name pmaports was chosen when pmaports.git was split from pmbootstrap.git in 2018 (#383), to make obvious that this is not a fork of Alpine's aports.git repository. Before that, it was a subdirectory called aports
in the pmbootstrap.git repository. Therefore pmbootstrap sometimes refers to pmaports as "aports" (e.g. pmbootstrap config aports
and pmbootstrap --aports
are both about pmaports, not Alpine's aports).
Differences to Alpine's aports
- pmaports support an arbitrary amount of subdirectories. All packages created will end up in the same index file (
postmarketos/APKINDEX.tar.gz
), whereas in Alpine's aports, the contents of each directory (main
,community
, ...) will end up in a separate index (and deeper directory levels are not supported). This was chosen so users only need to download one additionalAPKINDEX.tar.gz
for all of the postmarketOS packages, while still having a flexible directory structure in the git repository. - pmaports has metadata about compatibility with pmbootstrap in pmaports.cfg
- pmaports has metadata about release channels in channels.cfg (master branch only)
Package auto-upgrade
Some packages in pmaports are upgraded automatically via a scheduled CI pipeline. See the auto-update:
job in .gitlab-ci.yml
and .ci/autoupdate.sh for the implementation. Right now the only package we auto-upgrade is linux-next but we expect to scale this up to support new packages in the future.
The pipeline is scheduled to run at 6:30am and 8:30PM UTC+1 (Berlin time).
Variables
There are several variables specific to this job:
$AUTOUPDATE_PACKAGES
This variable contains a space separated list of packages to upgrade (all stuff into a single argument??). This is not ideal and may be better implemented by adding a special flag file to packages that should be auto-updated.
$PMAPORTS_SSH_KEY
This variable contains the SSH private key used for signing commits authored by the bot. GitLab doesn't currently support adding signing keys to bot accounts so these show up as "unverified" in the UI, but can be checked manually. The public key fingerprint is ttyCwYtgtZizgC70AH9rDrt/69rA2GlIU5Bo+Abh8bs
.
$PMAPORTS_TOKEN_BOT
This variable contains the username of the bot account associated with the access token.
$PMAPORTS_PUSH_TOKEN
This variable contains the GitLab access token used by the auto-update CI. It's a "project access token" on pmaports and only has "write repository" access.