libstdc++.a from gcc-armhf was not reproducible on Travis (it was, when built locally!). These .a files are just archives of object files .o, and in this case it was caused by a random order of the .o files in the archive. This PR patches the package() function of the APKBUILD when running pmbootstrap aportgen gcc-armhf (same for aarch64 of course), to extract all .a files, and repack them to be reproducible (by sorting the files before packing them). As usually, we can still inherit everything from the upstream gcc aport from Alpine, and apply our changes on top of that. Travis without the patch: https://api.travis-ci.org/jobs/260402679/log.txt?deansi=true > CHALLENGE FAILED for usr/armv6-alpine-linux-muslgnueabihf/lib/libstdc++.a:File 'usr/armv6-alpine-linux-muslgnueabihf/lib/libstdc++.a' is different! Travis with the patch (I've instructed Travis to run off this branch to test it): https://api.travis-ci.org/jobs/260806203/log.txt?deansi=true > Done. Your build exited with 0. |
||
---|---|---|
aports | ||
keys | ||
pmb | ||
test | ||
.gitignore | ||
.travis.yml | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
pmbootstrap.py |
README.md
pmbootstrap
Sophisticated chroot/build/flash tool to develop and install postmarketOS.
Static code analysis status:
Requirements
- Linux distribution
- Python 3
- OpenSSL
Important links
Usage
Check out the porting guide for a practical start!
Run ./pmbootstrap.py init
first, to select a target device and the work folder, which will contain all the chroots and other data.
After that, you can run any command. All dependencies (e.g. chroots) will be installed automatically, if they are not available yet.
Here are some examples:
./pmbootstrap.py --help
:
List all available commands
./pmbootstrap.py log
:
Run tail -f on the logfile, which contains detailed output. Do this in a second terminal, while executing another pmbootstrap
command to get all the details.
./pmbootstrap.py chroot
:
Open a shell inside a native Alpine Linux chroot (~6 MB install size).
./pmbootstrap.py chroot -- ls -l /home/user
Execute ls -l /home/user
inside the chroot. Make sure, that you use --
before the command, so all following options (e.g. -l
) do not get interpreted by pmbootstrap, but passed correctly to your command.
./pmbootstrap.py chroot --suffix=buildroot_armhf
:
Open a shell inside an armhf
Alpine Linux chroot, with qemu user mode emulation and binfmt support automatically set up.
./pmbootstrap.py build hello-world
:
Build the "hello-world" package (specify any package from the aports
-folder here).
./pmbootstrap.py build hello-world --arch=armhf
:
Build the "hello-world" package for armhf
inside the armhf
chroot, with the cross-compiler installed in the native chroot (chroots are connected via distcc).
./pmbootstrap.py install
:
Generate a system image file with a full postmarketOS installation. All required packages get built first, if they do not exist yet. You will get asked for the "user" password and the root partition password.
./pmbootstrap.py install --sdcard=/dev/mmcblk0
:
Format and partition the SD card /dev/mmcblk0
, and put a full postmarketOS installation on it
Testsuite
Simply install pytest
(via your package manager or via pip) and run it inside the pmbootstrap folder.