Commit Graph

1961 Commits

Author SHA1 Message Date
Dylan Van Assche 63acc8ddcd
install: add option to disable overlap detection
Some devices such as ODROID XU3/XU4/HC1/HC2/MC1 have
boot binaries which overlap when flasing them to
uboot partition. This is not allowed by pmbootstrap.
Add a deviceinfo option to disable this check.
2021-06-13 20:49:29 +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
Alexander Stillich caeb991af6
Fix abuild-keygen aborting because pmbootstrap does not supply a packager email to it (MR 2052)
[ci:skip-build] already built successfully in CI
2021-05-01 15:50:25 -07:00
Caio Fontes 5144195091
fix long lines (E501) in pmb/build (MR 2050) 2021-04-26 23:56:42 -03:00
Alexey Min 2b620a0fdd
pmb.sideload: support non-standard SSH port (!2046)
This can be used for example to sideload packages to
pmbootstrap's QEMU which is running on the port 2222
by default, as follows:

  pmbootstrap sideload --host localhost --port 2222 --user user <pkg>

This adds a `--port` parameter to sideload subcommand.
If not specified, port defaults to 22.
2021-04-25 21:04:49 +03:00
Mark Hargreaves 57c830c410
pmbootstrap qemu: change default frontend to GTK (MR 2044)
Fix issues occurring when using pmbootstrap qemu with proprietary
Nvidia drivers as well as mouse misalignment issues on Phosh UI.

Signed-off-by: Mark Hargreaves <clashclanacc2602@gmail.coM>
2021-04-25 13:28:45 +02:00
Oliver Smith 303e7cd648
Prepare 1.31.0 release
Require latest apk-tools, which fixes CVE-2021-30139.

Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12606
2021-04-14 20:50:53 +02:00
Oliver Smith 8df7514b8e
install: verify pmaports branch supporting fs (MR 2011)
Do not attempt to install with a filesystem that is not supported by the
initramfs code in the checked out pmaports branch.

Previously we would have increased the pmaports.cfg version and require
that new version by pmbootstrap, however this will break compatibility
with release branches where we won't roll out this feature (v20.05).
Therefore don't change the version, but add a new
"supported_root_filesystems" key to pmaports.cfg, which defaults to
"ext4".

Related: https://postmarketos.org/pmaports.cfg
2021-04-11 20:10:28 +02:00
Bobby The Builder 807d7019f8
install: add --filesystem to handle ext4 or f2fs (MR 2011)
Co-Authored-By: Oliver Smith <ollieparanoid@postmarketos.org>
2021-04-11 20:10:28 +02:00
Bobby The Builder 958ecc6c72
install: add install_fsprogs (MR 2011)
Install specific filesystem tools right before they are needed, instead
of installing all filesystem tools that we might need beforehand. This
is in preparation to support f2fs.

Co-Authored-By: Oliver Smith <ollieparanoid@postmarketos.org>
2021-04-11 20:10:24 +02:00
Mark Hargreaves f758812f64
pmbootstrap qemu: fix on systems with more than 8 CPUs (MR 2045)
Fix error when CPU count is more than 8 while emulating a non-native
platform:
  qemu-system-aarch64: Number of SMP CPUs requested (12) exceeds max CPUs supported by machine 'mach-virt' (8)

Signed-off-by: Mark Hargreaves <clashclanacc2602@gmail.coM>
2021-04-04 20:43:40 +02:00
Oliver Smith a440556a0a
pmb.build.menuconfig: fix for native arch case (MR 2041)
Don't try to install and use a cross compiler if none is needed.

Fixes: 2406597f ("menuconfig: use cross-compiler for configuration (MR 2023)")
2021-03-30 16:47:23 +02:00
Anri Dellal 88ec1d1106
pmb.chroot: fix E501, switch to f-strings (MR 2040) 2021-03-30 15:13:26 +02:00
Shubham Naik 87c7859b40
Enforce E501: Limit the line length to 79 for files in pmb/install (MR 2031)
Made changes to limit the line length in following files for #1986,
 - pmb/install/_install.py
 - pmb/install/blockdevice.py
 - pmb/install/losetup.py
 - pmb/install/partition.py

Added the above files in E501 flake8 command list.
Substitute f-string for string concatenation.
2021-03-30 14:51:53 +02:00
Oliver Smith a9e100ebcc
Prepare 1.30.0 release 2021-03-30 14:26:14 +02:00
Oliver Smith 03e9fb0570
pmb.config.init.boot_size: set to 256 MiB (MR 2037)
Increase the boot partition size from 128 MiB to 256 MiB, as we are
already close to reaching the current limit. By having twice the size,
it should be possible to have atomic replacements of all initramfs
related files.
2021-03-23 22:14:29 +01:00
MightyM17 c3526f3271
envkernel.sh: Add yaml-dev and g++ dependency. (MR 2039) 2021-03-23 12:41:32 +03:00
Luca Weiss 2406597f3c
menuconfig: use cross-compiler for configuration (MR 2023)
Not using the cross compiler for kconfig leads to some differences to
the actual compilation later.
2021-03-19 17:54:28 -07:00
Luca Weiss 29823eec3e
pmb.build._package: split out init_compiler function (MR 2023)
In preparation for using it outside of init_buildenv
2021-03-19 17:54:19 -07:00
Luca Weiss 485b81e96e
menuconfig: remove unused variable assignment (MR 2023)
The variable is set further down anyways.
2021-03-19 17:54:02 -07:00
Oliver Smith 278dfced61
Replace pmaports channels stable, stable-next (MR 2032)
Translate the pmaports channels "stable" to "v20.05" and "stable-next"
to "v21.03", so these have the same channel name as the pmaports.git
branch name.

The original plan was to switch the "stable" channel from the "v20.05"
branch to the "v21.03" branch when the release is done. However, now
that we are close to that, I'm realizing that this would not be useful.
It would lead to conflicts in the dir with locally built packages
(default: ~/.local/var/pmbootstrap/packages/$CHANNEL). And it would make
it awkward to go back to a previous branch (we may name it old-stable
for the time being, but what after that, old-old-stable?).
2021-03-18 18:58:13 +01:00
JuniorJPDJ 5c1c126647
kconfig edit: removed gconfig support (MR 2034)
alpine removed [1] support for libglade, which is needed for gconfig to work
[1] a2d7250043
2021-03-13 19:10:46 +01:00
JuniorJPDJ 2b17e6ab71
kconfig edit: nconfig support (MR 2034) 2021-03-13 15:31:19 +01:00
JuniorJPDJ 8db2ab71b2
kconfig edit: fix xconfig dependencies (MR 2034) 2021-03-13 15:05:15 +01:00