Open main menu

postmarketOS β

BPO development

Various resources on (bpo) development, which will be our future binary repository infrastructure. This article is only relevant for people who wish to contribute to that effort, it has nothing to do with running postmarketOS or creating packages for it.


Local development environment

These steps set up a local copy of bpo in docker, that runs against your username's namespace on the official instance.


Store package signing key in

Run pmbootstrap build_init to generate a public and private key pair for signing packages. We will use the same private key on the bpo server. Open secrets and fill out the "add new secret" form on the left:

  • Name: "bpo test build key"
  • Secret: (put here the output of sudo cat ~/.local/var/pmbootstrap/config_abuild/pmos-*.rsa)
  • Secret Type: File
  • Path: ~/.secrets/
  • Mode: 644

Then click "Add secret". Note down the key it generated on the right (the string that looks like 46f739e5-4538-45dd-a79f-bf173b7a2ed9), you will need it in the next step.

Clone and configure

$ git clone
$ cd
$ cp .env.dist .env

Open .env in a text editor and change the following:

Run the development environment

Build the custom bpo docker container and run it, together with MariaDB and phpMyAdmin docker containers:

$ cd devel-env
$ ./

You can access bpo at http://localhost and phpMyAdmin at http://localhost:8080 (login with: root, devsetup).

Submitting a job

Open phpMyAdmin and open bpo / commit. Create a new entry:

INSERT INTO `commit` (`id`, `ref`, `branch`, `message`, `status`)
VALUES ('1', 'e8a7926eb6004ba57ae8b9a7250ce563188dd808', 'master', 'hello world', 'INDEXING');

Make sure that bpo is still running, and execute:

$ cd devel-env
$ ./ > /tmp/out.html && head /tmp/out.html

When something goes wrong, this will output a full html page. In that case, the error is in the <title> tag, and you can see the whole thing with a stack trace and links to browse the code by opening the HTML page.

$ firefox /tmp/out.html

When it went right, a new job should appear on top of your personal start page.

Submitting the same job again

  • Remove the entry that appeared in the queue table
  • Now you can run again

Clearing the database

$ cd devel-env
$ ./

Changing the pmbootstrap branch

Pass the branch as argument to ./ here, e.g. ./ mycoolbranch.

Creating a new test

$ cd devel-env
$ ./
~/bpo $ bin/console make:unit-test


Status values for the "commits" table

  • INDEXING not running yet
  • BUILDING currently building on
  • FAILED build failed on
  • SUPERSEDED a job for a newer version of the package has been submitted
  • DONE everything build successfully