Open
Milestone
Investigate modernizing pmbootstrap
(Originally https://gitlab.com/groups/postmarketOS/-/epics/4 by @caleb)
It's becoming increasingly difficult to contribute new features to pmbootstrap, and there are a lot of modern features like user namespaces, as well as modern ideas for how tooling like pmbootstrap could work that we should investigate and consider adopting.
A list of "calebs complaints and wants":
- maintaining multiple work directories is not really feasible, I've tried having multiple
pmbootstrap.cfg
files and multiple copies of pmaports but it's difficult to keep track of. - doing anything custom on top of pmaports is hard, you have to check out your own branch and add stuff, or maybe use a "custom-blah" subdir in pmaports which is in the pmaports gitignore. This lets you have additional packages, but you can't use this to overwrite packages that are already defined in pmaports.
- we rely on qemu-user for way too much,
apk
has chroot support, we should not be usingapk
under qemu to install packages in the build/target chroot's. This is REALLY SLOW compared to native (seriously, the difference between waiting 2 seconds vs 10 is significant) - the "pmbootstrap build --src" and "--envkernel" options are pretty unintuitive, and could stand to benefit from various optimisations (like cross compiling meson projects for example, see 3)
- we should support incrementally building packages, if you're debugging an issue in the
package()
function, it sucks to have to build everything over again... - we should more strictly reset the buildroot, if you just build one package and then go to build another,
/etc/apk/world
should reflect only the base tools + deps for the package currently being built. Not random other deps. We should also consider usingapk audit
to check if the buildroot was modified. Having alpine move more OS configuration stuff out of/etc
and into/usr
would also help here (as apk will overwrite those). This gets us extremely close to the "ideal" hygiene of nuking the buildroot between every build, without having to actually do it. - we should support multiple copies of pmaports, i should be able to have edge and 23.12 checked out in different git worktrees and work on them separately. running
pmbootstrap
while in the pmaports git dir should make pmbootstrap operate on that copy of pmaports by default. All the chroots and other stuff in the work dir should be specific to that repository. Ideally apk cache is shared, I think that's possible due to how the APKINDEX caching works. In the same vein, being able to switch between a pmaports worktree with some WIP stuff for one device, to another worktree with just upstream, and not have to deal with weird issues due to existing chroots/local binary repo would be really nice. - should be using bwrap, we should not run sudo except to build the disk image... user namespaces can do everything we need.
This epic should be used to track the current cleanup efforts, with the aim of creating a concrete list of features to implement.
Loading
Loading
Loading
Loading