Commit Graph

2126 Commits

Author SHA1 Message Date
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
Martijn Braam ed0bbf6069
install: don't try to embed firmware in split images (MR 2033)
Split images have /dev/installp1 and /dev/installp2 but no
/dev/install to place the firmware, so it will actually create that file
in devfs where it might run out of space since it's only 1MB big
2021-03-12 16:52:15 +01:00
Oliver Smith af2b2b5933
install: output empty line before flash/sshd info (MR 2030)
Leave some visual space before the flashing and ssh daemon information
blocks, so they don't get overlooked by the user:

[12:50:31] *** (4/4) FILL INSTALL BLOCKDEVICE ***
[12:50:31] (native) copy rootfs_qemu-amd64 to /mnt/install/
[12:50:36]
[12:50:36] *** FLASHING INFORMATION ***
[12:50:36] Refer to the installation instructions of your device, or the generic install instructions in the wiki.
[12:50:36] https://wiki.postmarketos.org/wiki/Installation_guide#pmbootstrap_flash
[12:50:36]
[12:50:36] *** SSH DAEMON INFORMATION ***
[12:50:36] SSH daemon is disabled (--no-sshd).
[12:50:36]
[12:50:36] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[12:50:36] Done
2021-02-17 02:06:36 +01:00
Oliver Smith 2b2ede95e5
install: get rid of redundant suffix line (MR 2030)
It is already filled with the same value at the beginning of the
function.
2021-02-17 02:06:35 +01:00
Oliver Smith 5b01a18cba
install: add --no-sshd argument (MR 2030)
Allow to disable the sshd service in the target OS, and note at the end
of the installation whether sshd is enabled or not.
2021-02-17 02:06:35 +01:00
Michael Kupfer 94544b8435
Prevent RuntimeError if there is no module binfmt_misc (MR 2029)
In case the kernel is compiled with CONFIG_BINFMT_MISC=y,
there is no module but binfmt_misc is still mountable.
2021-02-13 21:58:42 +01:00
Oliver Smith 748d9ce2c7
pmb install: make invalid kernel message clear (MR 2027)
Change "configured" to "valid" in the error message:
  Selected kernel (mainline_modem) is not configured for device bq-paella.
  Please run 'pmbootstrap init' to select a valid kernel.

"configured" makes one think of "pmbootstrap init", but the valid
kernels are defined in the APKBUILD. Therefore I think "not valid" fits
better here.
2021-02-12 11:33:06 +01:00
Oliver Smith 1b67c11396
install --ondev: run setup_login for installer OS (MR 2026)
Run setup_login() while creating the installer OS too, in order to
disable passwordless root login.

Note that this may sound like a security flaw, but it isn't.
* setup_login already ran for the target OS, meaning after the
  installation is done, one is not be able to login as root without
  password
* root login without password was only possible via serial console (or by
  attaching a keyboard), not via SSH
* getting root rights via serial in the installer OS is actually desired
  for debugging, we add a debug user with sudo set up by default:
  https://wiki.postmarketos.org/wiki/On-device_installer#Debug_user

So even though this isn't a problem, disable it to avoid confusion.
2021-02-12 11:15:25 +01:00
Oliver Smith 7320caead0
test_parse_depends: adjust to hello-world bump (MR 2028)
Adjust to pkgrel bump of the hello-world package in pmaports. Of course
it would be best if the tests did not depend on specific versions in
pmaports.git, but as long as they do, we need to keep them in sync.
This fixes the currently failing CI.
2021-02-11 23:36:46 +01:00
nybbled 5f485b8ad3
pmb.aportgen: put dependencies on separate lines (MR 2024)
Generate APKBUILDs with dependencies sorted and placed one per line.
The dependency lists changed are
 - depends in pmb/aportgen/device.py
 - makedepends in pmb/aportgen/linux.py

Sort dependency lists in test/test_aportgen_device_wizard.py
assertions.
2021-02-10 00:08:22 +01:00
Luca Weiss df58d35e27
kconfig check: require TMPFS_POSIX_ACL (MR 2025)
See pmaports!1939 and pmaports#904.
2021-02-09 23:11:31 +01:00
Minecrell 7dc2e197d3
pmb: Introduce support for "unmaintained" devices (MR 2018)
Unmaintained devices are device packages that:
  - Are known to be broken in some way without an active maintainer
    who can investigate how to fix it, or
  - Have not received any updates for a very long time, or
  - Are discouraged from using because they are just intended for testing.
    An example for this are ports using the downstream kernel for devices
    which have a mainline port that is working quite well.

Unmaintained devices are still built by bpo (otherwise it would not make
sense to keep them), but they do not show up in "pmbootstrap init".
However, it is possible to manually select them by entering the name.
pmbootstrap will warn in that case.

Unmaintained packages should have a # Unmaintained: <reason> comment
in the APKBUILD, this comment is displayed in "pmbootstrap init"
so that the user knows why the device should not be used unless they
know what they are doing.
2021-02-05 00:39:16 +01:00
Minecrell 03b3b250a5
pmb.parse._apkbuild: Add function to parse maintainers of APKBUILD (MR 2018)
This can be used for CI checks in pmaports to ensure that:
  - Devices in main have >= 2 maintainers
  - Devices in community have at least one maintainer
2021-02-05 00:39:12 +01:00
Oliver Smith 552246b228
Prepare 1.29.2 release 2021-02-04 23:16:40 +01:00
Shubham Naik 684cb3e1fb
Enforce E501: Limit the line length to 79 for files in pmb/parse - part 2 (MR 2020)
Made changes to limit the line length in following files,
 - pmb/parse/bootimg.py
 - pmb/parse/depends.py
 - pmb/parse/kconfig.py
 - test/test_parse_depends.py

Added the above files in E501 flake8 command list.
Substitute f-string for string concatenation.
2021-02-04 22:54:00 +01:00
Shubham Naik d1fadba5b4
Enforce E501: Limit the line length to 79 for files in pmb/parse - part 1 (MR 2019)
Made changes to limit the line length in following files,
 - pmb/parse/_apkbuild.py
 - pmb/parse/apkindex.py
 - pmb/parse/binfmt_info.py
 - pmb/parse/deviceinfo.py
 - test/test_parse_apkbuild.py

Added the above files in E501 flake8 command list.
Substitute f-string for string concatenation.
2021-02-04 22:32:35 +01:00
Clayton Craft 4474927141
pmb/config: use uuu package from Alpine (MR 2021) 2021-02-03 09:03:01 -08:00
Alexey Min 69b7543243
pmb.chroot.shutdown: be more user friendly when unmounting SD card (MR 2012)
When unmounting SD card after `pmbootstrap install --sdcard=...`
it takes a lot of time for kernel to sync filesystem cache
before actual umounting happehs. This looks like pmbootstrap is
stuck, so before doing unmount print a message to inform user of
what's happening, in case `--sdcard` was used.
2021-01-30 23:13:26 -08:00
Oliver Smith bc51a1c605
pmb.config.mirror_alpine: use CDN again (MR 2016)
The CDN was disabled, as packages from there often resulted in 'BAD
signature' after Alpine's big musl-1.2 rebuild for 32-bit arches. This
was almost half a year ago, so the CDN should have recovered.

This reverts commit 78f43d254e.
2021-01-27 23:55:33 +01:00
Oliver Smith 34d6b3edb3
Prepare 1.29.1 release 2021-01-27 23:02:24 +01:00
Oliver Smith 69cd7895e2
pmb.config.apk_tools_min_version: support branches (MR 2015)
Support branches, so pmbootstrap won't fail if v20.05 is selected:
  ERROR: You have an outdated version of the 'apk' package manager installed
  (your version: 2.10.5-r1, expected at least: 2.12.1-r0).

Move the logic for this check to pmb.helpers.apk.check_outdated and
adjust the test.

This fixes the CI failure in test_crossdirect_rust, which uses the
stable channel. (My bad for not creating this patch earlier, while at
the same time explaining in the creating pmbootstrap release instructions,
that this minimum apk version should be adjusted.)
2021-01-27 22:05:25 +01:00
Oliver Smith e9947f42de
pmb.config.apk_tools_static_min_version: rename (MR 2015)
Remove "_static" from the variable name, as this version isn't just
used to compare apk-tools-static's version (used to set up chroot), but
also for regular apk-tools before entering chroots.
2021-01-27 22:05:20 +01:00
Martijn Braam 9d6e0ec4d8
Prepare 1.29.0 release 2021-01-27 15:14:51 +01:00
Oliver Smith 51c01f384f
pmb/install/format.py: fix too long line (MR 2008) 2021-01-27 15:01:57 +01:00
Oliver Smith 39ad7246f7
install: add comments: logic in postmarketos-ondev (MR 2008)
Add comments to two functions, that if they are changed, the logic also
needs to be updated in ondev-preapre-internal-storage.sh of
postmarketos-ondev.git.
2021-01-27 15:01:56 +01:00
Oliver Smith d9682be771
install --ondev: set boot label: pmOS_inst_boot (MR 2008)
With postmarketos-ondev >= 0.4.0, have a different label for the boot
partition in the installer OS, so the postmarketOS initramfs can find
the proper partition to boot. Even if the boot partition is available
twice (once installed on eMMC, once as part of installer OS on SD card).

pmOS_inst_boot instead of pmOS_install_boot because of character limit.
2021-01-27 15:01:55 +01:00
Oliver Smith 34f5a12c21
pmb.install: split get_ondev_pkgver to own func (MR 2008) 2021-01-27 15:01:54 +01:00
Oliver Smith b07ff9444c
pmb.install: add boot label arg to several funcs (MR 2008)
Allow to set a different label for the boot partition than "pmOS_boot".
2021-01-27 15:01:54 +01:00
Oliver Smith 7d1c8d29df
pmbootstrap qemu: add --second-storage (MR 2008)
Create a second storage to test installing from SD card to eMMC with the
on-device installer.
2021-01-27 15:01:53 +01:00
Oliver Smith 61f5c20ebb
pmbootstrap qemu: tweak resize_image messages (MR 2008)
Replace "rootfs" with generic image, because the function will be used
for a second storage too. Refer to IMAGE_SIZE, as it is shown in the
help output.
2021-01-27 15:01:52 +01:00
Dylan Van Assche dd61d57b0e
pmbootstrap install: support _pmb_groups (MR 2010) 2021-01-27 08:38:53 +03:00
Dylan Van Assche e357ee885e
install: create groups regardless of existing user (MR 2010) 2021-01-24 16:18:38 +01:00
Dylan Van Assche 8455c82eee
install.ui: move get_recommends to new file (MR 2010) 2021-01-24 16:18:33 +01:00
Oliver Smith 10abb10dcf
Prepare 1.28.0 release 2021-01-07 23:30:51 +01:00
Oliver Smith 1c791da482
treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
Martijn Braam 3d00888f2e
pmb.install.file: remove in favor of packaged os-release (MR 1970)
Don't install /etc/os-release with pmbootstrap, this is handled by
postmarketos-base instead.
2021-01-07 15:28:50 +01:00