Jump to content

Pmbootstrap

From postmarketOS Wiki
Revision as of 20:37, 9 May 2021 by Uclydde (talk | contribs) (typo)

pmboootstrap is the central tool to develop and install postmarketOS. It works using Alpine chroots to avoid installing software on the host's machine. It works well on any Linux distribution, but performs poorly on WSL. If you are using Windows, you should set up a dual boot or use a VM.

Installation

refer to the installation page.


Example Development Workflows

This doesn't concern installation for an existing device. For that refer to the installation guide. It will be useful for working on postmarketOS packages and when one want to port postmarketOS to a new device (along with the porting guide).

TODO TODO: add more typical uses of pmbootstrap

Developing packages with pmbootstrap

When developing postmarketOS packages, you will want to keep the package definition at hand. For that, you can move the pmaports repository to an accessible location, using for example:

$ olddir="$(pmbootstrap config aports)"
$ newdir="$HOME/pmaports"
$ mv "$olddir" "$newdir"
$ pmbootstrap config aports "$newdir"

or just the last command, if you don't have something to save yet.


When you are editing packages and want to test the modifications, you will maybe notice that pmbootstrap doesn't rebuild the package, as it already built a package with the same version number and revision. To force a rebuild, don't increment the pkgrel. Instead, use pmbootstrap build --force package-name.


Before uploading a package you just created, you may use pmbootstrap build --force --strict to check that the dependencies you specified are sufficient to build the package.


Developing pmbootstrap itself

Development happens here. You'll find information on parts of the code in the pmbootstrap development guide.


Useful Links