Commit Graph

1499 Commits

Author SHA1 Message Date
Daniele Debernardi 72424d1d03
aportgen: fix fork alpine package in foreign arch 2019-09-25 01:50:34 +02:00
Luca Weiss ff4965ddfc
Revert "envkernel.sh: fallback to old armhf hostspec (!1786)" (!1813)
The relevant packages have been rebuilt now so we can remove this
workaround.

This reverts commit 9cf3e741a1.
2019-09-18 22:16:39 +02:00
Oliver Smith 90c16aff78
Prepare 1.8.1 release 2019-09-18 22:03:01 +02:00
Oliver Smith 69aa7b73f2
timeout: change default from 300 to 900 seconds
Linking big libraries may take more than five minutes, so change the
default timeout to fifteen minutes to save users from frustration.
This is the same value that I'm using to build binary packages for the
repository.

Pushing directly to master without making a merge request, because this
is a trivial change.
2019-09-18 21:56:34 +02:00
Luca Weiss 0f7678f033
build: remove QEMU workaround for aarch64 (!1814)
QEMU is now at v4.0.0 and the issue was fixed upstream. Fixes #546.
2019-09-18 21:39:31 +02:00
Oliver Smith 5a97c60256
aportgen: fix fork_alpine related error (!1815)
Make sure, that "args.fork_alpine" is always present. Otherwise,
pmbootstrap will fail if the aportgen code is called by anything but
"pmbootstrap aportgen". For example, when the user is adding a new
device during "pmbootstrap init".

Fixes: 54e51759ad ("aportgen: add feature to fork upstream packages")
2019-09-18 20:59:14 +02:00
Luca Weiss f853c0da20
Update alpine_to_hostspec mappings (!1812)
The important part about this patch is the change for armhf, which
adjusts the hostspec to the one used by Alpine.

Fixes a part of postmarketOS/pmaports#363
2019-09-18 20:34:41 +02:00
Oliver Smith 1e00ce49b9
Prepare 1.8.0 release 2019-09-16 21:48:32 +02:00
Daniele Debernardi 54e51759ad
aportgen: add feature to fork upstream packages (!1811)
This MR add the --fork-alpine argument to the pmboostrap aportgen
command, which downloads the APKBUILD and related files and copies them
into the pmaports/temp folder.
2019-09-14 01:39:11 +02:00
Daniele Debernardi ff50a5e382
aportgen: fix extra newline (!1811) 2019-09-14 01:26:49 +02:00
Daniele Debernardi 3ce1ea277c
get_upstream_aport: change arg to pkgname (!1811) 2019-09-12 21:20:08 +02:00
lambdadroid c3a9452ccb
Skip sparse image generation when installing to SD card (!1809)
At the moment, attempting to install to SD card when
flash_sparse is set to "true" will always fail because
/home/pmos/rootfs does not exist in that case.

Sparse images are only useful to speed up Fastboot flashing.
Nothing will be able to read it from the SD card.
The problem can therefore be avoided by simply skipping the
generation of the sparse image when SD card installation is used.
2019-08-27 11:54:30 +02:00
Luca Weiss 896ec71dd9
pmb: remove u-boot from native_cross_compile list (!1808)
Remove u-boot from the native_cross_compile list as we now have
crossdirect. Compiling is not terribly slow anymore, and when not using
the "native" method, it is possible to depend on firmware packages like
arm-trusted-firmware-sun50i.

This reverts commit d7d7ccb672.
2019-08-24 00:25:12 +02:00
Luca Weiss 30384b9083
kconfig check: support passing a file directly (!1802)
This allows for example for me to call the kconfig check function on the
.config file in my Linux tree: $ pmbootstrap kconfig check --file
.config and it reports me which kconfig options I need to enable.
2019-08-24 00:10:02 +02:00
Steffen Pankratz 9dc326ecb8
CI: add 'merge request' settings check (!1805)
check_mr_settings.py taken from pmaports repository.

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
2019-08-06 10:22:13 +02:00
Steffen Pankratz 3b240e46f7
fix deprecation warnings in regular expressions (!1804)
From https://docs.python.org/3/library/re.html
"Backslashes are not handled in any special way
in a string literal prefixed with 'r'."

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
2019-07-28 12:26:15 +02:00
Oliver Smith 2c4dae736a
Prepare 1.7.0 release 2019-07-05 21:07:26 +02:00
Daniele Debernardi b33894c197
qemu/spice: use virt-viewer client directly from chroot (!1793) 2019-07-05 20:51:01 +02:00
Luca Weiss 2ad8b66ccc
Fix case sensitivity: Qemu => QEMU (!1800) 2019-07-05 20:27:12 +02:00
Idan Horo fd79a60383
pmbootstrap install: make --no-fde default (!1798)
Implement --fde, add deprecation warning to --no-fde, update related
help files and tests.
2019-07-05 20:04:10 +02:00
Oliver Smith f5db1b4306
apkbuild parser: support depends="$depends ..." (!1795)
Properly handle the following two cases in APKBUILDs:
* depends="$depends ..."
* depends="${depends} ..."

First I've attempted to refactor the parsing code to do this in a more
generic way. But I've realized that it would make more sense to retire
the python based APKBUILD parsing approach altogether and finally use a
shell script parser. Let's discuss this in #1801.
2019-07-03 23:55:21 +02:00
Martijn Braam 75411694ff
qemu: limit cores to 4 in qemu-vexpress (!1797)
qemu-system-vexpress supports 1-4 cores, this clamps the smp core count
to 4 on host machines with more cores.
2019-07-03 22:43:30 +02:00
Oliver Smith d604ebd8fe
test_qemu_running_processes: wait 5 min, not 3 (!1799)
Be more patient with waiting for processes to start up. From looking at
the logs, it seems that the only reason CI was failing is because we did
not wait long enough.
2019-07-03 22:22:59 +02:00
Oliver Smith d13997241c
kconfig check: properly test UEVENT_HELPER, LBDAF (!1796)
Add check for UEVENT_HELPER for kernels >= 4.0.0. Change LBDAF check to
be only required for kernels <5.2.0. Adjust the config format and
checking code to support such range specific checks.
2019-06-30 16:39:56 +02:00
Oliver Smith 22b49fe495
Add pmb.parse.version.check_string() (!1796)
Compare a version against a check string. This will be used in
"pmbootstrap kconfig check", to only require certain options if the
pkgver is in a specified range.
2019-06-30 16:39:56 +02:00
Oliver Smith 0c3dd46993
test_newapkbuild: enable full test again (!1792)
newapkbuild bug is fixed upstream.

This reverts commit 9bc7236857.
2019-06-26 23:52:23 +02:00
Luca Weiss 650ed4925e
Fix spelling mistakes (!1794)
codespell --skip="./.git,./aports*"
2019-06-25 09:20:05 +02:00
Alexey Min c0a8675079
build/menuconfig: fix kconfig_edit (!1791)
This fixes regression from commits 0431a519 and 4daf9916.

pmbootstrap kconfig_edit raised an error while trying to checksum a package.

Error was:
(028793) [16:13:22] ERROR: 'module' object is not callable
(028793) [16:13:22] See also: <https://postmarketos.org/troubleshooting>
(028793) [16:13:22] Traceback (most recent call last):
  File "/home/lexx/dev/pmos/pmbootstrap/pmb/__init__.py", line 63, in main
    getattr(frontend, args.action)(args)
  File "/home/lexx/dev/pmos/pmbootstrap/pmb/helpers/frontend.py", line 279, in kconfig
    pmb.build.menuconfig(args, args.package)
  File "/home/lexx/dev/pmos/pmbootstrap/pmb/build/menuconfig.py", line 158, in menuconfig
    pmb.build.checksum(args, pkgname)
TypeError: 'module' object is not callable

The function was renamed, call new function.
2019-06-11 21:59:30 +02:00
Luca Weiss fef10fd5ed
menuconfig: support mtk kernel directory style (!1790)
(Some?) Mediatek kernels don't have the kernel in the top-level
directory but in a subdirectory called 'kernel' next to a folder
'mediatek' containing most device-specific code.

Adjust the menuconfig code to be able to work with that.
2019-05-26 18:18:07 +02:00
Oliver Smith 4daf991640 Remove tests that were moved to pmaports.git (!1787)
Clean up some leftovers from the pmaports.git move.
2019-05-24 21:08:26 +00:00
Oliver Smith 0431a51932
pmb.build.checksum: rename .check() to .update()
Rename the function to .update(), so it is clear what it does, and it is
clear what the difference to .verify() in the same file is.
2019-05-24 22:41:31 +02:00
Oliver Smith b4c301974e
Add pmbootstrap checksum --verify (!1788)
Download all sources and verify their checksums.

This will be used in pmaports.git CI, if ci:skip-build is set in the
commit message (currently it just skips the build, and we don't test if
the source checksums are valid or not).
2019-05-19 22:07:20 +02:00
Oliver Smith 110b5821ac
Prepare 1.6.1 release 2019-05-19 19:46:43 +02:00
Oliver Smith 9cf3e741a1
envkernel.sh: fallback to old armhf hostspec (!1786)
The armhf hostspec triplet has changed during the Alpine 3.6 release
cylcle. It was recently adjusted in abuild's arch_to_hostspec()
function [1]. Cross compilers in postmarketOS that were built with a
previous version of abuild still have the old hostspec in the name.
Since we use the same function in envkernel.sh to get the cross compiler
name, it is currently failing here for armhf.

We can't simply bump the pkgrel to force a rebuild, because that would
make them go out of sync with the upstrem (non-cross) compiler packages.
That would break the workflow for fixing incompatibilities with Alpine
(see [2]).

Add a workaround to envkernel.sh, to detect if the installed armhf cross
compiler binaries still have the old name.

[1] https://github.com/alpinelinux/abuild/pull/56
[2] https://wiki.postmarketos.org/wiki/Repository_maintenance
2019-05-19 19:09:56 +02:00
Oliver Smith f26eb0d9b8
Qemu test: use pmbootstrap --details-to-stdout (!1785)
The qemu test executes a pmbootstrap instance with
pmb.helpers.run.user(). Use the --details-to-stdout flag from now on for
the started pmbootstrap process, so it is not silent when downloading
packages with apk, and will therefore not run into the timeout of the
parent process (which kills processes that are silent for more than five
minutes by default).

This fixes the test in our CI infrastructure.
2019-05-16 23:39:03 +02:00
Robert Yang 0c001567b6
Optionally store git hash in /etc/os-release (!1784)
When git isn't installed then the version is not appended with the git
hash of the pmaports repository.
2019-05-10 16:56:26 -04:00
Daniele Debernardi e8cba8b20a envkernel.sh: Add xz to the list of packages to install (!1783)
This is required when the kernel is configured to be compressed with
something different than gzip.
2019-05-09 22:14:15 +00:00
Oliver Smith de51912ae4
kconfig check: require BLK_DEV_INITRD (!1780)
Always needed for the initramfs, so let's enforce it.
2019-05-09 23:42:23 +02:00
Oliver Smith 8187c66825
Mount /dev/shm in chroots
Fix configure crash when building mozjs60 by mounting tmpfs as /dev/shm
in chroots. This is an important fix, because of this dependency chain,
that is currently broken in armhf and armv7 (see pmaports#244):

postmarketos-base -> networkmanager -> polkit -> mozjs60
2019-05-05 17:47:25 +02:00
Oliver Smith 9bc7236857
test_newapkbuild: disable half test, upstream bug
Half of this test is failing, because of a regression in newapkbuild.

This patch will fix it:
https://github.com/alpinelinux/abuild/pull/75

Until then, let's disable this test, so our testsuite runs through
again. If somebody is curious on how I've developed and tested this
patch with pmbootstrap, I've added a guide to the wiki:
https://wiki.postmarketos.org/wiki/Hacking_on_abuild
2019-05-02 22:37:05 +02:00
Oliver Smith a4733e94e1
pmbootstrap aportgen gcc{,4,6}*: fix depends (!1778)
Explicitly depend on mpc1. Our generated gcc aports use the !tracedeps
option, so we need to explicitly set the libraries it depends on.

This has mostly not been an issue, as we are installing our gcc
packages together with Alpine's gcc package, which causes the libraries
to get installed anyway.

Related: pmaports#236
2019-04-26 22:32:35 +02:00
Robert Yang 82fdf63711
build/envkernel: Fix packaging kernels that don't define a kbuild directory (!1779)
When a kernel APKBUILD doesn't define a kbuild directory then run_abuild
is passed an empty string and not a None value.
2019-04-24 21:07:31 -04:00
Robert Yang 14b68bd260
build/envkernel: Set CBUILD env variable for abuild rootpkg (!1779)
abuild depends on the gcc binary in order to define a default CBUILD value.
When using an alternative gcc version (e.g. envkernel.sh with gcc6), the
gcc binary is not installed by the envkernel.sh script.

This change sets the CBUILD env variable so that abuild doesn't need to
depend on the gcc package.
2019-04-24 21:07:31 -04:00
Oliver Smith 4ae3c4526a
Prepare 1.6.0 release 2019-04-24 15:56:02 +02:00
Luca Weiss c847dfde7c
Improve algorithm to pick package provider (!1775)
Pick the provider with the shortest name instead of always the first one
2019-04-22 20:33:03 +02:00
Oliver Smith 8b8a73e8dd
Fix crash from mixing 'sudo' with 'du' output (!1777)
Do not crash during "pmbootstrap zap" and other actions when the user
needs to type in the sudo password before running "du" to calculate the
work folder size. We're trying to parse the "du" output as integer, but
of course the 'Sorry, try again' message from sudo is not a valid
integer.

$ pmbootstrap --details-to-stdout zap
(008707) [14:00:57] Shutdown complete
(008707) [14:00:57] Calculate work folder size
(008707) [14:00:57] % sudo du --summarize --block-size=1 /home/luca/.local/var/pmbootstrap
[sudo] password for luca:
[sudo] password for luca: Sorry, try again.

12966293504     /home/luca/.local/var/pmbootstrap
(008707) [14:01:03] ERROR: invalid literal for int() with base 10: 'Sorry, try again.\n12966293504'

It would be a good idea to separate the sudo output from the process
output in general, see #1677 for a related proposal.
2019-04-22 00:00:58 +02:00
Oliver Smith fe731d7f5c
fixup! pmb.helpers.package.get: prefer right arch binary (!1776)
Check if ret_repo is None before trying to access it.
2019-04-21 23:22:49 +02:00
Oliver Smith 45c9eaa3ea
pmb.helpers.package.get: prefer right arch binary (!1776)
When the pmaport arch does not match, but there's a matching binary
package, return the binary package instead of the pmaport.

This is needed to fix "pmbootstrap repo_missing" for x86_64
networkmanager-qt, which indirectly depends on mesa (and mesa needs to
be taken from the binary packages for x86_64, not from the pmaports,
see #1741).
2019-04-20 01:58:31 +02:00
Oliver Smith 99e7ae3019
pmb.helpers.package.check_arch(): split (!1776)
Split the part that actually checks the arch against the arches list
into pmb.helpers.pmaports.check_arches(arches, arch), and call it
from pmb.helpers.package.check_arch(args, pkgname, arch, binary).

This will be used in a follow up commit, where we have already resolved
the package data and only need to check the architecture.
2019-04-20 01:58:20 +02:00
Oliver Smith 9241dbb35b
pmb.helpers.package.check_arch_recurse(): fix msg (!1776)
Fix the 'a: (indirectly) depends on b' message, a and b were swapped.
2019-04-20 01:18:58 +02:00