Jump to content

Pmbootstrap: Difference between revisions

From postmarketOS Wiki
Uclydde (talk | contribs)
m typo
No edit summary
Line 34: Line 34:
Development happens [https://gitlab.com/postmarketOS/pmbootstrap here]. You'll find information on parts of the code in [[pmbootstrap_development_guide|the pmbootstrap development guide]].
Development happens [https://gitlab.com/postmarketOS/pmbootstrap here]. You'll find information on parts of the code in [[pmbootstrap_development_guide|the pmbootstrap development guide]].


== Warning ==
The Bash shell works nicely, and the fish shell also seem to work. However, the Korn Shell (KSH93 / KSH88) doesn't work properly. Although some functions of pmbootstrap works, you would not be able to use some functions such as envkernel.sh and may get unexpected errors. If you are using ksh or another shell, you may need to install bash or fish to use pmbootstrap properly.
Pmbootstrap needs sudo to work, otherwise you would not be able to use it at all, since pmbootstrap uses sudo to run root commands. If you are using an alternative such as doas, you would need to install sudo.


== Useful Links ==
== Useful Links ==


* [https://gitlab.com/postmarketOS/pmbootstrap The git repository].
* [https://gitlab.com/postmarketOS/pmbootstrap The git repository].

Revision as of 11:58, 4 July 2021

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.


Warning

The Bash shell works nicely, and the fish shell also seem to work. However, the Korn Shell (KSH93 / KSH88) doesn't work properly. Although some functions of pmbootstrap works, you would not be able to use some functions such as envkernel.sh and may get unexpected errors. If you are using ksh or another shell, you may need to install bash or fish to use pmbootstrap properly.

Pmbootstrap needs sudo to work, otherwise you would not be able to use it at all, since pmbootstrap uses sudo to run root commands. If you are using an alternative such as doas, you would need to install sudo.

Useful Links