1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 11:29:46 +03:00
Commit graph

20 commits

Author SHA1 Message Date
Hugo Osvaldo Barrera
5a152aebae
test: move all tests into separate module (MR 2551)
When installing pmboostrap, all tests are installed alongside it. There
doesn't seem to be any way to selectively exclude some files inside
python modules, so move all test into a separate module instead.

This is the typical convention in python projects.

See: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/79862
Fixes: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2541
2025-02-13 01:28:20 +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
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
Caleb Connolly
a5617cb110
pmb/data/merge-usr: relative symlink targets (MR 2402)
Make sure the symlinks are correct when not inside the chroot, they
should be relative!

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-09-18 13:34:13 +02:00
Oliver Smith
94d917681e
pmb/data/merge-usr: fix cannot overwrite error (MR 2388)
Don't just run one "mv" command to move everything from source to
target. This fails if the same directory already exists in target.
Instead, go into each directory in source, and move all files inside
that directory into the target directory structure.

Fix the following error:
  mv: cannot overwrite '/home/user/.local/var/pmbootstrap/chroot_native/usr/lib/sysctl.d': Directory not empty
2024-09-17 02:27:45 +02:00
Oliver Smith
9a50d3398d
pmb/data/merge-usr: deduplicate code (MR 2388)
Create a common merge() function that can be adjusted in the next patch,
because the logic for merging needs to be more complicated now.
2024-09-17 02:27:45 +02:00
fossdd
b65d677d34
pmb.{aportgen,parse}: deprecate deviceinfo_keyboard (MR 2396)
See https://gitlab.com/postmarketOS/pmaports/-/issues/3145
2024-09-07 18:04:10 +02:00
Oliver Smith
9dfa89c58c
Use pmbootstrap_v3.cfg as config file (MR 2350)
Using pmbootstrap v3 with the old config can cause problems, for example
when having $WORK in the pmaports dir instead of the actual work path.
This is not supported anymore by v3 to reduce complexity. The format of
how mirrors are stored in the config also has changed.

Use a separate config file, so users can go back from v3 to 2.3.x if
they need to (for figuring out a regression) and so users won't run into
bugs when moving from 2.3.x to v3.
2024-07-10 20:06:25 +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
Caleb Connolly
4a52f46bf0
build: fail if remote checksums mismatch (MR 2252)
This is a potential security risk. Tighten things up so we only allow
local checksums to mismatch but remote ones must be correct.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:42 +02:00
Caleb Connolly
7d85bb31d5
build: ignore invalid checksums unless --strict (MR 2252)
We can fairly easily patch abuild by appending anything we want to the
APKBUILD file after copying it to the chroot.

Leverage this to override the verify() function so that it doesn't die
when checksums don't match.

Instead let's build the package anyway, but set a flag and print a
warning with instructions on how to generate the checksums.

We should continue to require APKBUILDs in pmaports to have valid
checksums.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:41 +02:00
Caleb Connolly
3f11fa2500
tests: basic pkgrepo tests, clone pmaports (MR 2252)
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:41 +02:00
Caleb Connolly
ca722b499e
tests: add tests for Arch and Chroot types (MR 2252)
Add some exhaustive unit testing to validate that these types behave as
expected.

And fix a few bugs uncovered by the tests.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:41 +02:00
Oliver Smith
6f3ed45d49
systemd installs: merge /usr on chroot init (MR 2273) 2024-03-12 23:53:47 +00:00
Oliver Smith
197b8d3521
init: allow all locales
Replace the (outdated) list of locales supported in musl with a list
from all locales supported by glibc. The list of locales is taken from
the patch that is applied to musl-locales in alpine.

Related: 2dc905dc77
Closes: pmbootstrap issue 1997
Reviewed-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230603160540.18732-1-ollieparanoid@postmarketos.org%3E
2023-06-12 08:46:22 +02:00
Martijn Braam
896879e89a
pmb: data: keys: sync with Alpine (MR 2131)
Alpine has new keys for the riscv64 builder and new 4096 bit
builder keys. This fixes CI again.
2021-10-19 01:44:35 +02:00
Oliver Smith
8806a464b2
pmb/data/keys/pmos-5a03a13a.rsa.pub: remove (!1835)
Delete the old binary package repository key from pmbootstrap.
2019-11-21 23:52:25 +01:00
Oliver Smith
e1286c38a5
config: switch to new binary package repository (!1835)
This change has been in the works for about a year now. We have a new
binary repository, that is completely automated and always online.
Powered by builds.sr.ht and our very own build.postmarketos.org code.
The days of yours truly manually triggering to build and upload the
binary package repository at home are finally over! Also this will pave
the way to have multiple branches, and to base on Alpine stable.

Related: https://postmarketos.org/blog/2019/01/16/600-days-of-postmarketOS/#new-srht-based-binary-repository
Related: https://postmarketos.org/blog/2019/06/23/two-years/#sourcehut-srht
Related: https://gitlab.com/postmarketOS/build.postmarketos.org
2019-11-21 23:52:25 +01:00
Oliver Smith
a0a3a591da
keys: add build.postmarketos.org.rsa.pub (!1829)
The public key for the new binary repository. Once we can build all
packages with that (for all arches), we'll switch to it.

See also: https://gitlab.com/postmarketOS/build.postmarketos.org/
2019-10-30 21:45:33 +01:00
Oliver Smith
1f8832c4cc install apk keys and binfmt data with setup.py 2018-09-17 10:06:57 +00:00