There are different release cycles, that make sense for aports and pmbootstrap.
aports: always up-to-date
we could provide different branches like edge, 3.6, 3.5 which follow Alpine's branching model
but these branches need to be always up to date
for pmbootstrap we could have a stable release every now and then
that way we could package it for pip and for some Linux distributions (AUR, Gentoo overlay, ...)
it would be a better experience for new users (install pmbootstrap through their distribution/pip, more stability)
A great benefit, that @MartijnBraam pointed out:
if you ship pmbootstrap seperately, then you can make pmbootstrap init manage the aports git repo and make it selectable between "edge", which is the latest master or a specific tag
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
I'd be interested to start working on this packaging task. Would love to hear your thoughts on how we should handle this. Specifically the biggest pain point is the assumption that aports is under the working directory.
In this future split, where would be the right place to have aports? Within .var/local/pmbootstrap perhaps? Should pmbootstrap handle the loading of aports?
Note that currently in the setup.py proposed in #443 the use of the -p aports flag is required when running the installed executable entry point.
Tough question and I'm almost out of postmarketOS time for today :/
I would like pmbootstrap to assist the user in getting the aports repository, so that no manual step is involved. It would need to happen before the first question in init, because that shows the list of devices, which we can only do when the aports folder is available.
The work path seems to be suitable for aports, so we would need to ask for that first.
Here's a rough draft from a user's point of view.
pmbootstrap init
ask for work folder
aports not found (specify with -p)! do you wish to download it to: $work/aports? [y]
pulls it with git
display instructions how to update them (make that convenient with a pmbootstrap shortcut?)
It has a future label already :) But if @yuvadm or someone else wants to work at this right now, why not? It is a blocker for getting pmbootstrap into pypi#327 (closed) after all and making the development more robust #382 (closed).
Thanks for working on this @marmistrz! Since moving the aports to a dedicated git repository is a big change, there would be some tasks that need to be done beforehand:
set up the aports repository (for testing, this doesn't need to be done in the postmarketOS organization on GitHub)
start with the pmbootstrap repository
delete everything from pmbootstrap, except for the testing code
adjust Travis CI testing code
only run the tests relevant for the aports
make sure building changed packages is still working (we will need to clone pmbootstrap for that!)
adjust the pmbootstrap repository (can be done in pull requests)
rewrite test cases depending on the aports folder to work without that folder (or disable them if they still run in the "aports" repository)
provide a good upgrade path for users (we are already versioning the work folder structure and have migration code, so we could add a new version and add migration code that requires the user to clone the aports folder)
I'm not sure if that covers everything, but that would be a good start from where we could do the first tests and fix whatever else comes up. So all this is quite some work, and while it would be nice if you could look into this, I don't think we should make such a big change in master at least until the next blog post is out at end of May (because preparing for that eats up a lot of resources already).
Now we're moving to Gitlab and thus changing our infrastructure a bit, is it maybe a good time to split the two up? It seems like the perfect opportunity to me.
The hard part are the code changes (see above), so I would advise against mixing that up with the gitlab migration, because it would make the migration way more complex.
First of all: my apologies, that we did not really get anywhere with this issue
yet, despite that you and others have asked quite a few times over the course
of the last months about it. Let's finally give this a big push!
we can base the aports on Alpine releases (3.7, 3.8, edge, etc)
This is what I want to have as well, but keep in mind that this requires big
infrastructure changes. Packages need to be compiled and hosted for all
supported branches then (which means changes in the pmOS-repo-scripts and
folder structure in the binary repo mirror), and we need to copy everything
from Alpine's aports/testing, which we are using to our aports/temp,
because aports/testing is only built against edge in Alpine.
Having #383 (closed) fixed first would make it easier.
This sounds reasonable, so let's approach it from that angle first. After thinking about how to implement this in detail (below), I think I can do it within the next week (the separate aports repository without support for multiple branches).
Implementation ideas
pmaports repository
naming it "pmaports" instead of "aports" to avoid conflicts with Alpine's aports
has a pmaports.cfg file with compatibility information:
pmaports version (pmbootstrap will have a minimum pmaports version stored and check against this value)
minimum pmbootstrap version (again, for a check in pmbootstrap)
compatible Alpine aports branch (to be used in the future for generating the appropriate mirror URL in /etc/apk/repositories)
pmOS aports branch name (also used to generate the right mirror URL in the future - this value can be different from the git branch we're on inside this repository, if we are preparing a merge request in an extra branch for example)
ask for the work dir as usually (we already do this as first question nowadays, but this was not always the case before)
initialize the work folder and start logging to it, so pmbootstrap log is already working (right now this only works after the first run of pmbootstrap init)
if $work/cache_git/pmaports does not exist:
explain that sudo will be used to set up the chroot (because this is the first time for new users that it will happen)
set up the native alpine chroot
install git inside it
clone the repository with git (note that we already have code to clone git repositoried with pmbootstrap, we use that to clone Alpine's aports for pmbootstrap aportgen gcc-armhf etc)
if pmbootstrap/aports does not exist:
note: pmbootstrap/aports will not exist after cloning pmbootstrap, and be added to .gitignore
try to create a symlink to pmbootstrap/aports, which points to the clone path from above
that way the workflow doesn't change much for the user, they can find the aports in the same place
creating the symlink will fail if pmbootstrap was installed system wide with a package manager - in that case, just display the path where the aports have been cloned
now continue as usually by asking for the device etc.
before executing any pmbootstrap action besides init:
check if the aports folder exists, raise an error that asks the user to run pmbootstrap init otherwise
check if the current pmbootstrap version is compatible with the checked out aports folder (by comparing pmaports.cfg with values in pmb/config/__init__.py) and show a helpful error otherwise that explains how to update the outdated component
sanity check: chroots should be zapped after switching branches (at least display a warning)