Commit Graph

1813 Commits

Author SHA1 Message Date
Luca Weiss d69669a953 pmb.qemu.run: set serial to mon:stdio
This makes QEMU trap signals like Ctrl-C and send it to the guest
instead of terminating QEMU.

To quit QEMU with this option you can use [Ctrl-A] [x]
  or
[Ctrl-A] [c] and type 'quit' at the prompt.
2020-10-07 13:56:19 +02:00
Oliver Smith 496be6f593
Prepare 1.23.0 release 2020-09-24 11:20:42 +02:00
Oliver Smith 0dfe489b78
pmbootstrap aportgen: replace arch=all with native (MR 1965)
Packages like binutils-*, busybox-static-*, gcc-*, grub-efi-*, musl-*
are only needed for the native architecture during cross compilation.
Don't bother with trying to build them for other arches to save time and
to avoid getting stuck frequently at "armv7/binutils-aarch64" etc.

A few people like to use pmbootstrap on aarch64 hosts (e.g. PineBook
Pro), so let's make it available for aarch64 again when we can build
aarch64 packages natively in CI and bpo. (They do get stuck there right
now, because of qemu user emulation.)

Related: https://gitlab.com/postmarketOS/build.postmarketos.org/-/issues/75
2020-09-21 17:48:34 +02:00
Oliver Smith 5b55abd4d2
pmbootstrap aportgen: don't use CDN alpine mirror (MR 1963)
Use a deterministic mirror URL instead of CDN for aportgen. Otherwise we
may generate a pmaport that wraps an apk from Alpine (e.g. musl-armv7)
locally with one up-to-date mirror given by the CDN. But then the build
will fail if CDN picks an outdated mirror for CI or BPO.
2020-09-18 03:20:25 +03:00
Oliver Smith a870a69151
pmbootstrap kconfig edit: list all arches in error (MR 1957)
If a kernel is available for multiple architectures, let the user know
which architectures are available in the error message.
2020-09-16 21:38:16 +02:00
Luca Weiss 9815f81742
aportupgrade: use f-strings (MR 1964) 2020-09-16 20:31:31 +03:00
Luca Weiss 93f13277b9
aportupgrade: add support for specifying git ref (MR 1964)
This adds support for specifying an arbitrary git ref (e.g. commits,
tags, branches) to upgrade to. This can be useful if a specific commit
needs to be packaged instead of the latest available. Alternatively you
can also specify a branch to be used if the default branch is 'stable'
but 'develop' should be packaged.

This also removes old code to use the 'bionic' branch for UBports Lomiri
(formerly Unity 8) packages.
2020-09-16 20:31:04 +03:00
Henrik Grimler efd64f7714
Check if workpath/ is empty and in that case create workpath/version (MR 1975)
Fixes https://gitlab.com/postmarketOS/pmbootstrap/-/issues/1965
2020-09-14 19:01:19 +02:00
Antoine Fontaine 1b5120e24f
test/testcases_fast.sh: correct pmaports location (MR 1974)
This makes the script ask pmbootstrap what is the correct directory
instead of hardcoding the default value.
2020-09-12 10:35:37 +02:00
Linus Walleij be41c94c57
pmb.install.setup_keymap: Fix up keymaps for Nokia n900 (MR 1972)
The Nokia n900 XkbLayout is a bit peculiar and sometimes
join two keymaps into one, for example:

    Option "XkbLayout" "fise"

For the combined finnish/swedish layout. Add the common
joined keymaps, even if not all of these countries are
yet supported.

For details see:
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/symbols/nokia_vndr/rx-51

I also include this link in the code so no-one gets confused.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2020-08-31 16:02:04 +02:00
Martijn Braam 5d540ad4fb
pmb/install: warn if the target disk is larger than expected (MR 1956) 2020-08-31 13:05:20 +02:00
Ralf Rachinger 72e24f7f96
Use $XDG_CONFIG_HOME instead of hardcoded path (MR 1969) 2020-08-23 13:51:42 +02:00
Luca Weiss 86d61b8012
pmb.parse.bootimg: detect mediatek header (MR 1955)
Some Mediatek devices have a special 512-byte header around the zImage
which must be generated so the device boots.

Support for that exists for a while in postmarketOS but detection was
missing. Add that.
2020-08-21 18:33:30 +02:00
Oliver Smith 9718fd294a
pmb.install.setup_keymap: fix fail on X11 setup (MR 1968)
Do not fail in "pmbootstrap setup" if a keymap was selected, but no
/etc/X11/xorg.conf.d path exists in the rootfs chroot. The grep output
is not empty in that case (it would be empty if the directory exists and
there are no matches), so we need to add this extra check:

	(rootfs_nokia-n900) % grep -rl XkbLayout /etc/X11/xorg.conf.d/
	grep: /etc/X11/xorg.conf.d/: No such file or directory
2020-08-12 01:16:09 +02:00
Oliver Smith e233b73949
pmb.config.mirrors_postmarketos: update URL (MR 1967)
Official pmOS binary package mirror is now mirror.postmarketos.org. The
old URL will stay functional as redirect.
2020-08-08 21:16:39 +02:00
Oliver Smith a498c3afab
Prepare 1.22.2 release 2020-08-05 11:02:08 +02:00
Oliver Smith 7c26c1e9e5
test_crossdirect_rust: run on stable channel (MR 1966)
This test is failing with Alpine edge, because x86_64 has a different
rustc version than armv7:
	found crate `std` compiled by an incompatible version of rustc

Run the test with the latest Alpine stable version instead, where it is
more likely that rustc has the same version across all arches.
2020-08-05 10:38:23 +02:00
Oliver Smith 554dbd73ba
pmb.chroot.apk_static.download: fix mirrordir (MR 1966)
When selecting the stable channel in "pmbootstrap init", do not attempt
to download apk-tools-static from the "edge" mirrordir. This stopped
working, because the version in the APKINDEX of v3.12 is different than
the one in edge now.

Fixes:
	Download http://dl-2.alpinelinux.org/alpine/edge/main/x86_64/apk-tools-static-2.10.5-r1.apk
	ERROR: HTTP Error 404: Not Found

Related: https://builds.sr.ht/~postmarketos/job/272760#task-pmbootstrap_build-123
2020-08-05 10:04:48 +02:00
Oliver Smith 505425491f
Prepare 1.22.1 release 2020-08-03 11:37:08 +02:00
Oliver Smith 78f43d254e
pmb.config.mirror_alpine: don't use CDN
Replace dl-cdn mirror with dl-2 temporarily to avoid "BAD signature"
errors.

This is related to the rebuild of Alpine edge x86, armhf, armv7 packages
against musl-1.2, that is currently going on. The packages are rebuilt
without a version change and therefore have the same resulting file
name, but a different checksum. Due to caching of the CDN and due to the
same file name, users may get an old package from before the rebuild.
The APKINDEX has a checksum of the new package, and so the download will
fail with a "BAD signature" error.

Alpine developers clear the cache every now and then, but this issue
will happen over and over again, until all packages are rebuilt (some
packages are still not rebuilt and have been disabled).

Let's switch back in two months or so.
2020-08-03 11:23:04 +02:00
Alexey Min aa88721b75
pmb.helpers.cli: fix TAB-completion of items with '-' (MR 1960)
Before this fix tab completion of names with hyphens were not done:
try for example to complete UI package name in 'pmbootstrap init' with
hyphen, like "plasma-mobile" / "plasma-desktop". Now this is handled
correctly (hyphen is not considered as delimeter).
2020-07-20 16:47:33 +02:00
Oliver Smith 44e099acc7
Prepare 1.22.0 release 2020-07-20 14:44:00 +02:00
Oliver Smith d8615a9cae
pmbootstrap install: support _pmb_recommends (MR 1962)
Let UI meta-packages specify apps in "pmb_recommends" to be explicitly
installed by default, and not implicitly as dependency of the UI
meta-package ("depends"). Therefore make these apps uninstallable,
without removing the meta-package.

Add pmbootstrap install --no-recommends to disable this feature.
2020-07-20 14:29:06 +02:00
Oliver Smith c8d581e749
pmbootstrap install --no-local-pkgs: new option (MR 1951)
Don't install locally compiled packages and package signing keys. This
will be used for the official images generated with pmbootstrap.
2020-07-15 16:47:51 +03:00
Oliver Smith 05849a9f80
pmbootstrap install: make building pkgs optional (MR 1951)
Add a question at the end of "pmbootstrap init", to ask if the user
wants to build outdated packages during "pmbootstrap install". Store the
result in the new pmbootstrap.cfg key "build_pkgs_on_install". I've put it at
the end, because it is a rather complicated question compared to the rest.

This is useful to speed up the installation for casual users who can now
avoid compiling packages. But also for the official images where we only
want to ship the official binary packages and not build anything
on-the-fly.
2020-07-15 16:47:43 +03:00
Mark Hargreaves 0aed64d661
pmb/helpers/frontend.py: fix pmbootstrap kconfig check --file (MR 1961) 2020-07-15 16:30:57 +03:00
Oliver Smith f9c74277ca
cpu_emulation_required: not for armv7 -> armhf (MR 1952)
Make it possible to build armhf packages on armv7 devices, e.g. to help
with stuck build-edge-armhf packages that won't build with qemu.
2020-07-14 22:42:55 +02:00
Pellegrino Prevete 95762a229a
pmb/config/__init__.py: add CONFIG_USER_NS (for bubblewrap/flatpak) (MR 1943)
Also fix tests
2020-07-14 23:19:50 +03:00
Oliver Smith ae21bc8615
Prepare 1.21.0 release 2020-07-11 16:24:15 +02:00
Oliver Smith 9bbe78328f
setup.py: change devel status: alpha -> stable
pmbootstrap is fairly stable now, time to let setup.py and pypi.org
reflect it.
2020-07-11 16:19:52 +02:00
Oliver Smith 1d6c382cf7
install --ondev: pass cipher to ondev-prepare (MR 1958)
Let postmarketos-ondev honor the cryptsetup cipher from pmbootstrap.
2020-07-11 13:25:15 +02:00
Oliver Smith 3b02d35f1d
install --fde --android-recovery-zip: show warning (MR 1958)
This is likely to fail with the new default cryptsetup cipher of
aes-xts-plain64, as many downstream kernels used in recovery OS (like
TWRP) do not have CRYPTO_XTS set.
2020-07-11 13:25:09 +02:00
Oliver Smith 05c013536d
pmb.config.cipher: set default to aes-xts-plain64 (MR 1958)
Replace aes-cbc-plain64 with the stronger cipher aes-xts-plain64.
CONFIG_CRYPTO_XTS is necessary for this, so require it in
"pmbootstrap kconfig check".

Related: https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuestions#5-security-aspects
2020-07-11 13:24:21 +02:00
Oliver Smith ec71670f20
pmb.config.necessary_kconfig_options: sort keys (MR 1958)
Sort keys alphabetically.
2020-07-11 13:24:09 +02:00
Oliver Smith b366b5004f
CI: disable pmbootstrap-qemu-tests
The machine that was running them is currently broken.

Related: #1943
2020-07-11 00:08:57 +02:00
Mark Hargreaves 4312160c96
pmb/parse/bootimg.py: fix file names after mkbootimg-osm0sis update (MR 1959) 2020-07-10 22:53:00 +03:00
Oliver Smith 324ea788ba
install --ondev: don't ask for user password (MR 1954)
With postmarketos-ondev 0.2.0, the password is set in the on-device
installer.
2020-07-01 00:19:49 +02:00
Oliver Smith 90f57bbbcc
install --ondev: set username to "user" (MR 1953) 2020-06-30 21:50:49 +02:00
Oliver Smith ea60aaa08c
install --ondev: add ondev_min_version (MR 1953)
Put a minimum version check for postmarketos-ondev in the pmbootstrap
install code and verify it before starting the installation. This avoids
using incompatible versions, similar to the pmaports.cfg version check
we already have. Set the minimum required version to 0.2.0.
2020-06-30 21:50:43 +02:00
Oliver Smith e089d05a55
install --ondev: ondev-prepare: fix log msg (MR 1953) 2020-06-30 21:50:39 +02:00
Oliver Smith 6fb194795a
install --ondev: ondev-prepare: pass pmb ver, ui (MR 1953)
Pass the pmbootstrap version and user interface, so it can be checked /
displayed in postmarketos-ondev.
2020-06-30 21:50:35 +02:00
Oliver Smith f9f5640d82
install --ondev: ondev-prepare: use env vars (MR 1953)
Do not pass the arguments to ondev-prepare as command-line arguments in
a specific order, but instead as environment variables. New arguments
will be added in a follow-up patch.
2020-06-30 21:50:19 +02:00
Oliver Smith 8a02187a1a
pmb/aportgen/grub_efi.py: fix distfile collisions (MR 1950)
Same fix as MR 1947, but for grub_efi.py instead of musl.py. While at
it, order the imports alphabetically.
2020-06-24 21:08:44 +03:00
Oliver Smith 460d2c0eb4
pmb/aportgen/grub_efi.py: alpine mirrordir (MR 1950)
On branch stable, we would use Alpine's mirrordir "v3.11" for example.
2020-06-24 21:08:44 +03:00
Oliver Smith a74aafb978
pmb/aportgen/grub_efi.py: pass apkbuild-lint (MR 1950) 2020-06-24 21:08:44 +03:00
Oliver Smith 2bb96184d0
pmb/aportgen/grub_efi.py: use f-string in APKBUILD (MR 1950) 2020-06-24 21:08:44 +03:00
Oliver Smith b4a205d4db
pmb/aportgen/busybox_static.py: fix distfile collisions (MR 1949)
Same fix as MR 1947, but for busybox_static.py instead of musl.py. While
at it, order the imports alphabetically.
2020-06-24 20:40:45 +03:00
Oliver Smith 178931f992
pmb/aportgen/busybox_static.py: alpine mirrordir (MR 1949)
On branch stable, we would use Alpine's mirrordir "v3.11" for example.
2020-06-24 20:40:38 +03:00
Oliver Smith f9f9e19a4c
pmb/aportgen/busybox_static.py: pass lint (MR 1949) 2020-06-24 20:40:26 +03:00
Oliver Smith 9639da22c9
pmb/aportgen/busybox_static.py: use f-string (MR 1949) 2020-06-24 20:40:18 +03:00