Commit Graph

1983 Commits

Author SHA1 Message Date
Oliver Smith d38bd6be2b
CI: drop support for cached venv + ci runner (MR 2080)
CI started failing with:
/builds/ollieparanoid/pmbootstrap/venv/bin/python3: No module named pytest

I've briefly tried to fix this with the existing scripts. However,
instead of investing more time into that, do the long overdue
refactoring of the scripts that involve dropping the venv logic and
support for a custon gitlab-ci-runner using some python docker image as
base. This configuration hasn't been used for a long time and is
probably broken anyway.

Refactor the logic to skip the qemu test case in gitlab CI by using
pytest markers. The new script is now similar to bpo's .ci/pytest.py.
2021-07-04 22:51:53 +02:00
Maxim Karasev 3d651af763
README: update requirements (MR 2077)
Alpine no longer provides linux-hardened, and also no additional
packages are required to run pmbootstrap on Alpine.
2021-07-02 04:06:49 +03:00
Maxim Karasev 90529a0518
CI: don't install procps (MR 2077)
After MR 2074 it's not a hard-dependency anymore.
2021-07-02 04:06:13 +03:00
Maxim Karasev 479b51cfb6
CI: use Alpine for testing (MR 2074) 2021-06-28 02:07:55 +03:00
Maxim Karasev 1bb15765ed
pmb.helpers.run_core.kill_commands: use minimal subset of ps parameters (MR 2074)
again, busybox ps supports only -o option (-e is ignored, because
busybox always shows all processes).
2021-06-28 02:07:55 +03:00
Maxim Karasev 31e7a0006d
pmb.helpers.other.folder_size: use kilobytes (MR 2074)
busybox du doesn't support bytes or custom block sizes.
2021-06-28 02:07:55 +03:00
Anri Dellal 5c1da79634
pmbootstrap init: Add mirror choice (MR 2035)
Allows user to choose one of the mirrors from
https://mirrors.postmarketos.org.

Example:
[1] Mirror 1 (Location 1)
[2] Mirror 2 (Location 2)
[3] Mirror 3 (Location 3)
Select a mirror [1]: 2

Co-Authored-By: Alexey Min <alexey.min@gmail.com>
2021-06-27 18:38:01 +02:00
Alexey Min c5bd07e3ae
pmb.helpers.http: add missing parameter doc (MR 2035) 2021-06-27 18:37:57 +02:00
Dylan Van Assche 834cc7f877
install: allow to use last block for embedding (MR 2069)
Devices such as ODROIDs have binaries use which every single block for
embedding. Do not raise an error when binaries are touching, but not
overlapping, each other when embedding these binaries during installation.

Add a test for this scenario, which fails when reverting the change.

Co-Authored-By: Oliver Smith <ollieparanoid@postmarketos.org>
2021-06-26 20:11:42 +02:00
Dylan Van Assche e900ee169a
install: refactor embed_firmware and add test (MR 2069) 2021-06-26 20:11:36 +02:00
Clayton Craft 31e36e195c
install: explicitly install osk-sdl when needed (MR 2066)
This adds osk-sdl to the rootfs when --fde is set, or when building a
rootfs for the ondev installer. Ideally the ondev installer would
selectively install osk-sdl if the user opted for fde at runtime, but
I haven't found a straight forward way to enable that yet, and this
behavior here is no different than the current behavior (where osk-sdl
is always installed in the rootfs by way of depends= in pmos-mkinitfs).

For images that are built without --fde, osk-sdl won't be installed at
all in the rootfs, once the dependency is dropped from pmos-mkinitfs.
Instead, a dummy package postmarketos-base-nofde will be installed
instead to satisfy the dependency that postmarketos-mkinitfs has on the
virtual package "postmarketos-fde-unlocker"
2021-06-25 12:28:36 -07:00
Clayton Craft 6afd35eb11
kconfig check: add support for checking zram options (MR 2075)
Device kernels that enable zram support can use `pmb:kconfigcheck-zram`
to protect against kconfig regressions that disable support for zram.
2021-06-23 21:17:41 -07:00
Alexey Min 687807fa73
Add kconfig check for containers (MR 2060)
Usage: pmbootstrap kconfig check --containers linux-postmarketos-qcom-msm8974
2021-06-23 01:12:47 +02:00
Oliver Smith 716336e30b
kconfig check: allow range of kernel versions (MR 2060)
Make it possible to specify rules as range, e.g. ">=4.0 <5.0".
2021-06-23 01:12:43 +02:00
Martijn Braam 475377fbfc
Prepare 1.34.0 release
* Update so v21.06 can be built
2021-06-20 11:02:04 +02:00
Clayton Craft 76489653df
helpers/envkernel.sh: fix shellcheck disabled tests (MR 2072)
Shellcheck 0.7.2 has a change that gives many error conditions their own
SC30** codes, instead of including them in SC2039. This updates the
scripts in this package that "disable SC2039" to disable the new code.

New codes added in shellcheck: cfd68ee0c2ebfd0ab08a1d4bf628162b454dc207

[ci:skip-build] already built successfully in CI
2021-06-18 20:22:31 -07:00
Oliver Smith 5afc2e626f
pmb.config.apk_tools_min_version: add alpine v3.14 2021-06-16 22:15:49 +02:00
Oliver Smith 53dfe85956
Prepare 1.33.0 release 2021-06-15 00:09:42 +02:00
Alexey Min fbffee3645
test: fix crossdirect rust test (MR 2071)
Currently running test_crossdirect locally may fail if selected device
does not exist on stable branch. Fix it by switching to qemu-amd64 before
running this test.

While at it, switch to more recent stable branch, v20.05 is now
unmaintained.
2021-06-14 23:07:03 +02:00
Clayton Craft f8fa80e20e
install: add --no-firewall / print firewall status (MR 2042)
The option, --no-firewall, will disable nftables on boot in the image,
and print a warning message if it's being disabled in a device image
where the device's kernel should support running the firewall.

Co-Authored-By: Oliver Smith <ollieparanoid@postmarketos.org>
2021-06-14 21:51:36 +02:00
Anri Dellal 21c9e38162
kconfig: Refactor check_config (MR 2042)
Support force-checking multiple components. Fixes #2034.

Co-Authored-By: Clayton Craft <clayton@craftyguy.net>
2021-06-14 21:50:56 +02:00
Clayton Craft 599d74ec25
kconfig check: add support for nftables (MR 2042) 2021-06-14 21:50:45 +02:00
Alexey Min df9c61a868
pmb.config.aportgen_mirror_alpine: use working mirror (MR 2067)
The dl-2 mirror is missing required .apk files now.
Use dl-4 instead.
2021-06-13 23:49:55 +02:00
Antoine Fontaine c30540d13c
README: add some documentation on how to run tests (MR 1973) 2021-06-13 17:43:51 +02:00
Luca Weiss b18281ab26
pmb.aportgen: fix architecture autocomplete (MR 2054)
Previously hitting the tab key wouldn't actually complete the
architecture field.
2021-06-13 15:05:27 +03:00
Luca Weiss edf43916a5
pmb.aportgen: don't suggest armhf (MR 2054)
New ports shouldn't use that architecture; and devices whose CPU only
supports armhf aren't really useful for anything anyways.

This will also make the suggested/default architecture be armv7
(architectures[0]).
2021-06-13 15:05:27 +03:00
Alexey Min 21b9449813
test/test_helpers_package: use armv7 instead of armhf (MR 2054) 2021-06-13 15:05:27 +03:00
Clayton Craft 80cc09a84d
test/aportgen_device_wizard: use armv7 in test instead of armhf (MR 2054)
armhf isn't valid for new devices anymore
2021-06-13 15:05:24 +03:00
Alexey Min 4a8fac6c6e
pmb.aportgen: use correct arch for gcc aportgen (MR 2068)
Previously it always used native (x84_64) arch for apkindex
version check.

As pmb.aportgen.core.alpine_apkindex_path() already has arch
parameter, use it to look up correct APKINDEX.

Also fixup test.
2021-06-13 02:17:28 +03:00
Clayton Craft aa2c740810
config: fix config file path when XDG_CONFIG_HOME is set (MR 2065)
fixes a regression from f3b3fe906 where the file name was not being
appended to the path in the case where `XDG_CONFIG_HOME` was set.
2021-06-06 23:41:40 -07:00
Caio Fontes 1704851468
test/static_code_analysis.sh: update E501 check (MR 2058)
Change from checking some files for E501 to excluding some files from
checking.
2021-06-06 19:21:31 +02:00
Caio Fontes 27746db188
enforce E501 in test/ (MR 2058) 2021-06-06 19:21:31 +02:00
Caio Fontes f3b3fe906b
enforce E501 in pmb/config (MR 2058) 2021-06-06 19:21:31 +02:00
Caio Fontes fb98ad5329
enforce E501 partially in pmb/aportgen (MR 2058) 2021-06-06 19:21:31 +02:00
Caio Fontes cfa5bc2cf7
enforce E501 in pmb/flasher (MR 2058) 2021-06-06 19:21:30 +02:00
Caio Fontes aaece05bb7
enforce E501 in pmb/__init__.py and pmb/qemu (MR 2058) 2021-06-06 19:21:30 +02:00
Caio Fontes 039552f5b7
enforce E501 in pmb/helpers (MR 2058) 2021-06-06 19:21:30 +02:00
Caio Fontes 2b8efb996b
enforce E501 in setup.py (MR 2058) 2021-06-06 19:21:25 +02:00
Caleb Connolly e27bb82252
allow detecting when in chroot (MR 2063)
Touch the file /in-pmbootstrap in chroots so that we can avoid
performing automated actions that should only happen on a real device
(like flashing the kernel).
2021-06-04 15:01:00 -07:00
Caleb Connolly 7145ab2e50
config: add deviceinfo_flash_kernel_on_update (MR 2061)
Add new deviceinfo variable to explicitly support flashing the new
kernel when updated on Android devices.
2021-06-03 01:32:36 +02:00
Oliver Smith b0a49a72b7
pmb.parse.bootimg: adjust to new mkbootimg-osm0sis (MR 2062)
Adjust to mkbootimg-osm0sis 2021.04.27, where the output files have been
renamed:
	"use correct output names matching mkbootimg args
	 (zImage=Image.gz=kernel, ramdisk.gz=ramdisk)"

Related: 5a01ae54a9
2021-06-03 01:13:55 +02:00
Oliver Smith 0e2c3a853e
envkernel.sh: fix integer compare used for string (MR 2059)
Prevent stricter shells from crashing there if
$POSTMARKETOS_ENVKERNEL_ENBALED is an empty string. It was reported that
it crashes in ksh93, and busybox sh also complains about it.
2021-05-29 12:23:38 +02:00
Robin de Rooij 1ea0ce6ef4
Remove unnecessary symlink (MR 2057)
In the new initramfs creation for Nvidia blob files, we
move the newly created blob to be the normal boot image.
Therefore, no seperate boot image exists, it just overwrites
the old one and does not need a seperate symlink.
2021-05-19 23:57:32 +02:00
Oliver Smith 1481e69981
pmb.aportgen.binutils: adjust to subpackages in if (MR 2048)
Adjust the code so subpackages="" stays empty even with the latest
version of Alpine's APKBUILD.
2021-05-19 22:15:36 +02:00
Oliver Smith 2a0128d48a
test/testdata/aportgen: update binutils APKBUILD (MR 2048)
Put Alpine's current binutils APKBUILD there, with the subpackages line
that currently breaks the generated pmaport.
2021-05-19 22:15:31 +02:00
Ignacy Kuchciński 4eba7f62b1
kconfig check: require DEVPTS_MULTIPLE_INSTANCES (MR 2051)
Check for CONFIG_DEVPTS_MULTIPLE_INSTANCES, as it's required by bwrap
and therefore flatpak and epiphany.

See pmaports!2145
2021-05-09 19:42:01 +02:00
Oliver Smith 0ea0ced7fd
build: make warning about rebuilt pkgs a -v msg (MR 2047)
Let warnings like the following not get displayed in the regular
pmbootstrap output anymore, only in 'pmbootstrap log' if -v / --verbose
was used. This message informs the user that a package's dependencies
are newer than the package itself. But the WARNING makes it sound like
this is something to be concerned about, whereas in reality this is
fine. In this example, postmarketos-mkinitfs has gotten a new feature /
fix after postmarketos-base and there's no need to rebuild
postmarketos-base.

  [18:02:59] WARNING: postmarketos-base depends on rebuilt package(s)
  postmarketos-mkinitfs (use 'pmbootstrap build postmarketos-base --force'
  if necessary!)

[skip ci] already built in CI, change is trivial
2021-05-09 01:05:33 -07:00
Luca Weiss c42cd93610
pmb.helpers.cli: set empty completer for no completion (MR 2055)
The default completer suggests files from the file system which we
really don't want here.
This can be tested with the 'Manufacturer' field for new devices.

Setting it to a custom lambda instead of None disables the completion
instead of using the default completer.
2021-05-09 00:52:50 -07:00
Oliver Smith 81dbabc1ed
Prepare 1.32.0 release 2021-05-02 20:48:32 +02:00
Oliver Smith 59736b601f
pmb.qemu.run: get rid of -show-cursor (MR 2053)
Qemu has been upgraded to 6.0.0 in Alpine edge. This version doesn't
only warn about -show-cursor, it refuses to start up with the option
set.

Fixes: issue 1995
2021-05-02 19:13:35 +02:00