pmbootstrap init: release channel selection
Find the detailed changes in the commit messages. Please look at each commit on its own while reviewing, as there are quite a few. I have created a release/20.04
branch in pmaports.git
for testing purposes, currently it is almost the same as master
except that the channel in pmaports.cfg
was set to stable
.
Please start reviewing, even if potentially tests are still failing. The earlier we get this in, the earlier we can get the first postmarketOS release going
Closes: #1855 (closed)
Demo
After asking for the work dir and cloning pmaports.git...
$ pmbootstrap init
[15:29:26] Location of the 'work' path. Multiple chroots (native, device arch, device rootfs) will be created in there.
[15:29:26] Work path [/home/user/.local/var/pmbootstrap]:
[15:29:27] NOTE: pmaports path: /home/user/.local/var/pmbootstrap/cache_git/pmaports
...pmbootstrap will now ask for the release channel. The currently active channel is read from pmaports.cfg (unless this is the first run, then it suggests the recommended channel from channels.cfg).
[15:29:27] Choose the postmarketOS release channel.
[15:29:27] Available (2):
[15:29:27] * edge: Rolling release channel
[15:29:27] * stable: Upcoming beta release (WIP, DO NOT USE!)
[15:29:27] Channel [edge]:
If the user selects a different channel, pmbootstrap proceeds to change the pmaports branch to the branch specified for the channel in channels.cfg.
[15:29:27] Channel [edge]: stable
[15:29:30] Currently checked out branch 'master' of pmaports.git is on channel 'edge'.
[15:29:30] Switching to branch 'release/20.04' on channel 'stable'...
[15:29:31] Unregister qemu binfmt (arm)
[15:29:31] Unregister qemu binfmt (aarch64)
Switched to a new branch 'release/20.04'
Branch 'release/20.04' set up to track remote branch 'release/20.04' from 'origin'.
[15:29:31] Choose your target device vendor (either an existing one, or a new one for porting).
This is how it looks like, when switching the branch fails (git checkout
output is passed through):
[15:39:43] Channel [edge]: stable
[15:39:44] Currently checked out branch 'master' of pmaports.git is on channel 'edge'.
[15:39:44] Switching to branch 'release/20.04' on channel 'stable'...
error: Your local changes to the following files would be overwritten by checkout:
pmaports.cfg
Please commit your changes or stash them before you switch branches.
Aborting
[15:39:44] ERROR: Failed to switch branch. Go to your pmaports and fix what git complained about, then try again: /home/user/.local/var/pmbootstrap/cache_git/pmaports
[15:39:44] See also: <https://postmarketos.org/troubleshooting>
Run 'pmbootstrap log' for details.
Merge request reports
Activity
mentioned in issue pmaports#520 (closed)
- Resolved by Oliver Smith
added 12 commits
- 51b958ff - pmb/parse/arguments.py: --config: add help text (MR 1912)
- da6a9802 - pmb.helpers.git: parse channels.cfg (MR 1912)
- 57be3253 - pmb/config/__init__.py: bump pmaports_min_version (MR 1912)
- e783d5c0 - pmb.config.pmaports: don't add to args (MR 1912)
- dd2747ef - pmb.config.keys: sort / one entry per line (MR 1912)
- bab2fb68 - pmbootstrap init: ask for release channel (MR 1912)
- f218a4d6 - test/test_repo.py: rename to test_helpers_repo.py (MR 1912)
- 8d2e7a90 - pmb.helpers.repo.apkindex_files: deduplicate pmos urls (MR 1912)
- b7d5e8b0 - pmb.helpers.repo.urls: use channels.cfg mirrordirs (MR 1912)
- 7736140c - pmb.chroot.init: verify chroot channel (MR 1912)
- 81b1f41e - pmb.helpers.pkgrel_bump.auto_apkindex_files: remove (MR 1912)
- 38b908b1 - chroot: put built packages into channel subdir (MR 1912)
Toggle commit listadded 14 commits
-
38b908b1...34c6f886 - 2 commits from branch
master
- 8d5725fd - pmb/parse/arguments.py: --config: add help text (MR 1912)
- 7a117a5b - pmb.helpers.git: parse channels.cfg (MR 1912)
- 3bb7d5f8 - pmb/config/__init__.py: bump pmaports_min_version (MR 1912)
- 96218cca - pmb.config.pmaports: don't add to args (MR 1912)
- fbb3fbaa - pmb.config.keys: sort / one entry per line (MR 1912)
- bc6c3ca2 - pmbootstrap init: ask for release channel (MR 1912)
- e7c4b166 - test/test_repo.py: rename to test_helpers_repo.py (MR 1912)
- 1544dc63 - pmb.helpers.repo.apkindex_files: deduplicate pmos urls (MR 1912)
- 0a193fbb - pmb.helpers.repo.urls: use channels.cfg mirrordirs (MR 1912)
- 395babfe - pmb.chroot.init: verify chroot channel (MR 1912)
- f08ea02b - pmb.helpers.pkgrel_bump.auto_apkindex_files: remove (MR 1912)
- ea713554 - chroot: put built packages into channel subdir (MR 1912)
Toggle commit list-
38b908b1...34c6f886 - 2 commits from branch
If you guys have time, it would be great to get more reviews on this. Just using the branch and playing with it would also help.
As soon, as this is reviewed and merged, and the bpo related changes (build.postmarketos.org#63 (closed)) are done (which I should be able to do rather quickly), we can let bpo build the release/20.04 branch and start using it!
added 15 commits
-
ea713554...37101a80 - 3 commits from branch
master
- fe42f9fd - pmb/parse/arguments.py: --config: add help text (MR 1912)
- f41ee65b - pmb.helpers.git: parse channels.cfg (MR 1912)
- b2d40d1a - pmb/config/__init__.py: bump pmaports_min_version (MR 1912)
- dd5a7b11 - pmb.config.pmaports: don't add to args (MR 1912)
- 8284f32b - pmb.config.keys: sort / one entry per line (MR 1912)
- aeeb8df2 - pmbootstrap init: ask for release channel (MR 1912)
- 4aac3c74 - test/test_repo.py: rename to test_helpers_repo.py (MR 1912)
- d876aef1 - pmb.helpers.repo.apkindex_files: deduplicate pmos urls (MR 1912)
- 3ef83644 - pmb.helpers.repo.urls: use channels.cfg mirrordirs (MR 1912)
- f7827dbc - pmb.chroot.init: verify chroot channel (MR 1912)
- f6a2e1e3 - pmb.helpers.pkgrel_bump.auto_apkindex_files: remove (MR 1912)
- fc42ff41 - chroot: put built packages into channel subdir (MR 1912)
Toggle commit list-
ea713554...37101a80 - 3 commits from branch
While implementing the related bpo changes, I'm realizing that mirrordir_pmos in channels.cfg (current reference) is a terrible idea. The option was supposed to be an alias for the pmaports branch, that is used in the binary packages mirror. Because alpine has different names for both (e.g. 3.11-stable branch vs v3.11 mirrordir and master branch vs edge mirrordir). But if we used mirrordir_pmos as I proposed, with release/20.04 branch vs v20.04 mirrordir, then we would have needless confusion and tell people that "mirrordir is like branch but not quite the same" or something like that. Besides, this would require renaming everything "branch" to "mirrordir" in the existing bpo code (which I was half-way through in a WIP patch, but I don't think it's any use).
So with that realization, I will remove
mirrordir_pmos
from:- the channels.cfg reference
- this pmbootstrap patchset
- channels.cfg in pmaports.git master
This means, the branch name must be the same as the path in the mirror, so "release/20.04" isn't a good name anymore (mind the
/
). Besides, we're already on 20th of April, so I'll change the branch tov20.05
and adjust channels.cfg in master accordingly.EDIT: all changes applied.
Edited by Oliver Smithmentioned in commit wiki@ee4a3600
added 12 commits
- de567b1f - pmb/parse/arguments.py: --config: add help text (MR 1912)
- b8b75fed - pmb.helpers.git: parse channels.cfg (MR 1912)
- 2f450e53 - pmb/config/__init__.py: bump pmaports_min_version (MR 1912)
- 2d3ba33c - pmb.config.pmaports: don't add to args (MR 1912)
- 8edeb9a4 - pmb.config.keys: sort / one entry per line (MR 1912)
- 4c67a583 - pmbootstrap init: ask for release channel (MR 1912)
- 67da5c58 - test/test_repo.py: rename to test_helpers_repo.py (MR 1912)
- 2dc59b6e - pmb.helpers.repo.apkindex_files: deduplicate pmos urls (MR 1912)
- fd5b15e3 - pmb.helpers.repo.urls: use channels.cfg mirrordirs (MR 1912)
- 56bb2b76 - pmb.chroot.init: verify chroot channel (MR 1912)
- 7e6dba02 - pmb.helpers.pkgrel_bump.auto_apkindex_files: remove (MR 1912)
- b05a439c - chroot: put built packages into channel subdir (MR 1912)
Toggle commit listmentioned in commit pmaports@3f613360
I tried to use this branch for some time, and it seems to work fine.
One day is probably not enough though..
Edited by Alexey Min- Resolved by Oliver Smith
added 19 commits
-
b05a439c...90500100 - 7 commits from branch
master
- b45282fc - pmb/parse/arguments.py: --config: add help text (MR 1912)
- cfd60fa8 - pmb.helpers.git: parse channels.cfg (MR 1912)
- 76e1fb84 - pmb/config/__init__.py: bump pmaports_min_version (MR 1912)
- 21cd2b4b - pmb.config.pmaports: don't add to args (MR 1912)
- 4589e28d - pmb.config.keys: sort / one entry per line (MR 1912)
- 9c273ba5 - pmbootstrap init: ask for release channel (MR 1912)
- 137d3e48 - test/test_repo.py: rename to test_helpers_repo.py (MR 1912)
- 2bd31fb8 - pmb.helpers.repo.apkindex_files: deduplicate pmos urls (MR 1912)
- 5daa9ad5 - pmb.helpers.repo.urls: use channels.cfg mirrordirs (MR 1912)
- a25c3df7 - pmb.chroot.init: verify chroot channel (MR 1912)
- a2e7eaf3 - pmb.helpers.pkgrel_bump.auto_apkindex_files: remove (MR 1912)
- 47d98ef5 - chroot: put built packages into channel subdir (MR 1912)
Toggle commit list-
b05a439c...90500100 - 7 commits from branch