Commit graph

37 commits

Author SHA1 Message Date
Newbyte
9987d61158
docs: Add automodule for pmb.commands.test
This was missed as the docs check needlessly ignores all modules that
start with "test".

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2619
2025-07-06 21:26:19 +02:00
Oliver Smith
47be020c7a
Remove "pmbootstrap repo_bootstrap"
The repo bootstrap logic has worked well enough in the initial systemd
bringup. But we have decided to replace the approach of building
packages multiple times during the repo_bootstrap with building each
package only once and adding -stage0 packages where necessary (currently
only a systemd-stage0 package).

Advantages:
* Replace the often breaking repo_bootstrap logic with something less
  fragile (repo_bootstrap is currently broken again).
* Can get rid of the whole bootstrap logic in pmaports.cfg, pmbootstrap,
  build.postmarketos.org. This will make pmbootstrap and bpo easier to
  maintain.
* Fix problems we have seen when upgrading two or more of (systemd,
  dbus, linux-pam-pmos) at once: it doesn't pass in CI and it doesn't
  pass in BPO
* You don't need to do a whole bootstrap at once, it is again broken
  down by package. This means if building one package fails (locally or
  in bpo), we don't need to do the whole thing again, just start at the
  package that failed. This also means it is much easier to optimize
  e.g. the stage0 packages to build faster.
* Fixes some specific bugs we currently have (abuild twice in pmaports,
  bpo tests disabled because of that, ...)

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2588
2025-06-03 17:25:41 +02:00
Alexey Andreyev
8f564edd78
docs/mirrors: mention env variables example
Mention Environment Variables section too

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2598
2025-05-25 11:44:14 +02:00
Alexey Andreyev
383266a7a8
docs/index: update local deploy example with pmb.ci
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2599
2025-05-25 11:42:01 +02:00
Alexey Andreyev
a61fd50d6f
docs/index: introduce local deploy example
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2599
2025-05-25 11:42:01 +02:00
Oliver Smith
4bf3f11b78
pmb.helpers.apk: support PMB_APK_NO_CACHE
Add a new environment variable that disables apk's caching feature for
space constrained environments such as the bpo image build jobs.

Currently we have a workaround in place in bpo: the apk cache is moved
to a tmpfs. But this is fragile and just disabling the apk cache is a
more elegant solution.

I've decided to make this an env var instead of a full pmbootstrap
option since this option is not relevant for normal users, only for CI
jobs in space constrained environments. Also we already have another
`PMB_APK_` env var.

Related: bpo issue 136
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2553
2025-03-17 07:09:10 +01:00
Oliver Smith
58119697fd
docs/cross_compiling: fix makedeps host/build desc
* makedepends_build is for the native chroot
* makedepends_host is for the foreign chroot

I had it the other way around in the documentation. The variables are so
far not documented here yet:
* https://gitlab.alpinelinux.org/alpine/abuild/-/blob/master/APKBUILD.5.scd
* https://wiki.alpinelinux.org/wiki/APKBUILD_Reference

But it now matches the comments Caleb had written for the cross-native2
implementation, and also what can be found in e.g. the abuild APKBUILD
in aports.git:

  makedepends_build="pkgconfig scdoc"
  makedepends_host="openssl-dev>3 zlib-dev"

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2566
[ci:skip-build]: already built successfully in CI
2025-03-14 21:28:37 +00:00
Clayton Craft
7f886967d1
docs/env_variables: document PMB_FDE_PASSWORD
Co-authored-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2538
2025-03-14 09:45:04 -07:00
Oliver Smith
7510e80b7b
docs/cross_compiling: new page (MR 2562)
Add the cross compiling documentation to the pmbootstrap docs.

This is based on the following wiki pages, but updated to reflect new
changes with cross-native2 and to make it more readable:
* https://wiki.postmarketos.org/wiki/Pmbootstrap/Cross_Compiling
* https://wiki.postmarketos.org/wiki/Build_internals#Cross-compile_types

Co-authored-by: Caleb Connolly <caleb@postmarketos.org>
2025-03-02 17:07:41 +01:00
Caleb Connolly
65419c2bbe
treewide: lint markdown files (MR 2485)
lint all the markdown files so they pass markdownlint.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2025-02-17 00:20:03 +01:00
Oliver Smith
eb34843f4b
Update systemd repo URL
Now that systemd was merged into master, it is extra-repos/systemd
instead of staging/systemd.

As of writing, the repository is not published yet but this will happen
soon.

Related: https://postmarketos.org/edge/2025/01/09/systemd-soon/
2025-01-10 19:59:50 +01:00
magdesign
62e32e15a9
docs: use pmOS green color in html output (MR 2520)
Tweaked-By: Oliver Smith <ollieparanoid@postmarketos.org>
2025-01-06 14:00:58 +01:00
Newbyte
871a3128d8
docs, pmb: Add missing copyright headers (MR 2516)
I tried my best to get the right author based on git commit history, but
in the case of code being moved from one file to make another I might
have gotten something wrong.
2025-01-02 16:45:03 +01:00
Robert Eckelmann
b87ae17414
docs: fix typos (MR 2510)
this fixes the typos found in #2524

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
2024-12-19 16:36:21 +01:00
Oliver Smith
47984a8722
Fix spelling "infront" -> "in front"
Make codespell CI check pass again. This is trivial, so directly pushing
to master.
2024-12-10 17:20:24 +01:00
Anri Dellal
556160b200
pmb.helpers.locale: new module (MR 2497)
Add module that provides utilities and information related to localization.

Initial implementation includes code to generate keyboard configs
for locale set by user.
2024-12-03 13:17:14 +01:00
Oliver Smith
3e18183aed
docs: document PMB_APK_FORCE_MISSING_REPOSITORIES (MR 2506) 2024-12-03 10:08:56 +01:00
Oliver Smith
1dcb68bdca
docs: add env vars page with PMB_SUDO (MR 2506)
Move the description of PMB_SUDO from the README to docs.
2024-12-03 10:08:43 +01:00
Oliver Smith
77125ff9fb
docs: fix 'WARNING: Title underline too short' (MR 2506) 2024-12-03 10:08:43 +01:00
Oliver Smith
268478a202
docs/api/pmb.commands: fix "failed to import" (MR 2506)
Fix the following:

  WARNING: Failed to import pmb.commands.kconfig_check.
  WARNING: Failed to import pmb.commands.kconfig_edit.
  WARNING: Failed to import pmb.core.crosstool.

Crosstool has been dropped and kconfig_check/_edit code has been merged
into a kconfig module.
2024-12-03 10:08:43 +01:00
Robert Eckelmann
07592b2ab6
.ci/docs.sh: add py3-sphinxcontrib-jquery to fix the failing search (MR 2500)
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
2024-11-24 18:30:06 +09:00
Robert Eckelmann
4ecd45749d
docs: add section on ssh-key handling (MR 2251)
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
2024-11-07 01:14:29 +01:00
magdesign
d59a60acca
docs: update chroot/debugging/usage (MR 2469)
Add the content from README.md to these files.

Tweaked-by: Oliver Smith <ollieparanoid@postmarketos.org>
2024-11-05 00:17:58 +01:00
Caleb Connolly
26ec1631ca
helpers: apk_static: move from pmb.chroot (MR 2463)
Move the apk_static module from pmb/chroot to pmb/helpers which is a
more suitable location.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-11-02 18:15:38 +01:00
Newbyte
37ec73c07c
pmb.flasher: Remove use of args (MR 2441)
Also adapt pmb/install/recovery.py to new API for variables.py.

[ci:skip-build]: already built successfully in CI
2024-10-22 15:12:40 +02:00
Luca Weiss
35cd64086f
Improvements to documentation (MR 2440)
* Make sure all Python modules are documented by adding a bit of shell
  to .ci/docs.sh
* Remove non-existing module references from .rst
* Fix various warnings from sphinx by adjusting Python docstrings
* Add class member docs to ApkindexBlock
2024-10-21 21:46:26 +02:00
Luca Weiss
3df0be358f
Replace gitlab.com with gitlab.postmarketos.org (MR 2443)
Try to finish the migration by changing various links and texts to point
to the new GitLab instance.
2024-10-21 18:12:21 +02:00
Oliver Smith
ebfda16d6d
args: remove -m and -mp (MR 2371)
Remove arguments to set postmarketOS and Alpine mirrors.

The current implementation is broken with the way the mirrors are now
configured: The current implementation fills a list, but the mirror
configuration code expects a string. It is not longer possible to set
an arbitrary amount of mirrors for the postmarketOS mirror. The benefit
is that we don't have comma separated values in the config file anymore
but instead just simple strings. Now it is possible to have one proper
mirror for aports, pmaports and pmaports_systemd, and one _custom one
to override each of these.

We already have too many options in "pmbootstrap -h", and changing a
mirror is more of a base configuration that you do once and maybe change
a few times, but don't need to be able to set it with each pmbootstrap
run. Users are not going to write this out manually on their
command-lines, it only makes sense in scripts and wrappers for
pmbootstrap, and there you could as well use another method (as now
described in docs/mirrors.md) to set the mirrors.

Less important, but another reason is that using "-mp" (two letters as
short argument) isn't really elegant.
2024-07-22 11:54:45 +02:00
Oliver Smith
37244e1c0e
docs/mirrors: new document (MR 2361) 2024-07-16 00:34:06 +02:00
Oliver Smith
89a3136f08
docs: support markdown (MR 2361)
Let's write all new documentation in markdown, and convert existing ones
at some point. I think we are all much more familiar with markdown than
with the rst format.
2024-07-16 00:34:06 +02:00
Oliver Smith
9fd45fb334
Bump minimum python3 version to 3.10 (MR 2357) 2024-07-16 00:26:35 +02:00
Oliver Smith
1dfaafe577
kconfig check: move rules to kconfigcheck.toml (MR 2333)
Move all kconfig rules from pmb.config to a separate toml file
pmb/data/kconfigcheck.toml. This is a fallback, pmbootstrap now prefers
loading kconfigcheck.toml from the currently checked out pmaports branch
if it exists.

This finally allows having separate kconfig check rules per pmaports
branch and makes the workflow of adjusting these rules much more
pleasant as the rules and kernel configs can just be adjusted at the
same time in pmaports!

This patch also moves the definition of what rules should be checked for
community and main devices, those that have pmb:kconfigcheck-community
in their linux APKBUILD, to the new kconfigcheck.toml. This should make
it much more intuitive, previously one needed to find the place in the
pmbootstrap source and edit it there.

Furthermore the "enforce_check" logic is removed. Previously pmbootstrap
would print warnings for failed config checks in some cases, but not
exit with error which was very confusing. Now exit 0 means all checks
passed and exit 1 means, that there is at least one error.

Use toml for the file, as discussed in pmbootstrap issue 2165. Python
3.11 has a native toml reader, use tomli for previous Python versions
for compatibility.
2024-06-30 18:04:31 +02:00
Oliver Smith
18fa4e58a3
Ruff: fix typing.Xxx is deprecated, use xxx instead (MR 2327) 2024-06-23 19:13:57 +02:00
Hugo Osvaldo Barrera
e421bb2d41
Auto-format codebase with ruff (MR 2325)
See: https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2324
Closes: https://gitlab.com/postmarketOS/pmbootstrap/-/merge_requests/2278
2024-06-23 15:40:13 +02:00
Hugo Osvaldo Barrera
5a8e2c6cad
Converge supported Python onto 3.9 (MR 2326)
Python 3.9 was required in pmb/__init__.py already, but some references
still said 3.8 and 3.7.

Co-Developed-By: Oliver Smith <ollieparanoid@postmarketos.org>
2024-06-23 15:37:19 +02:00
Caleb Connolly
0365438134
make mypy happy (MR 2252)
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:41 +02:00
Robert Eckelmann
974b76c00a
docs: add new configuration for generating docs using sphinx (MR 2266) 2024-05-14 14:36:23 +02:00