Commit Graph

1449 Commits

Author SHA1 Message Date
Marti Raudsepp b380323769 Add initramfs error message when charging-sdl fails to run
There are devices where charging-sdl/directfb fails (osk-sdl#77).

It's nicer to give an error message than display "Loading..." forever.
2018-08-14 02:02:13 +00:00
Bart Ribbers ee4db11e2c Update KDE Frameworks to 5.49 2018-08-14 01:29:10 +00:00
Martijn Braam 3069b96745 aports: Updated busybox-static-aarch64 to 1.28.4-r2 for upstream compatability 2018-08-13 02:23:00 +02:00
Martijn Braam 474ccef18b aports: Updated busybox-static to 1.28.4-r2 for upstream compatability 2018-08-12 22:07:17 +02:00
Martin Rys da2b0f7c55 [Samsung-kminilte] Fix orange screen in FDE
Fixes #1639
2018-08-11 14:33:48 +02:00
Oliver Smith 68e1feef17 pmb: qemu-user-static from aport, not from Debian
Overview:
In order to execute foreign arch binaries on the host system, we are
using the Linux kernel's binfmt_misc feature in combination with
static builds of QEMU. Before this patch, the statically compiled
QEMU binaries were taken from Debian (mostly because I did not realize
that Alpine ships them as well). Now we can use the ones from the aport.

Benefits:
This allows us to easily update and patch the QEMU executables, we
don't need to be in sync with Debian's versions anymore.

Alpine's package is more modular, so we can save some download,
install, zap time, as well as disk space: setting up an armhf chroot
with pmbootstrap took ~102 MB before, now it's ~18 MB.

Detailed changes:
* Remove `cross/qemu-user-static-repack` aport
* Add `data/qemu-user-binfmt.txt` with the binfmt_misc flags for ELF
  binaries of various arches (extracted from Debian's packaging)
* When parsing that file, don't write verbose messages to
  `pmbootstrap log` anymore, only to the verbose log (can be enabled
  with `pmbootstrap -v`)
* Rename `pmb.parse.arch.alpine_to_debian()` to ...`alpine_to_qemu()`
* Rename `arch_debian` to `arch_qemu`
2018-08-10 15:11:21 +00:00
Kieran Elmes 8643198a04 Xiaomi Cancro support 2018-08-02 22:14:59 +00:00
Oliver Smith 7cb471cb42 aports/kde: test case for framework versions
This commit adds a test case, which makes sure that the KDE framework
and plasma framework version are always the same.

Additional changes:
* APKBUILD parser parses the URL now (that's the best way I found to
  categorize the KDE aports in frameworks and other)
* Changed single quotes to double quotes in KDE APKBUILDs, so the
  parser doesn't include the single quotes in the parsed result
* Added the test case to the gitlab CI config
2018-08-02 20:33:20 +00:00
Bart Ribbers a4b56c748d
Update Plasma to 5.13.4 [skip ci] 2018-08-02 22:24:18 +02:00
NotKit e22ba8caea Change default user uid to 10000 2018-08-02 20:10:56 +00:00
ryang e82b7e427d qemu: Don't use chroot based env variables when running spice client
We are running the Spice client installed on the host system. It doesn't
need to be run with env variables that point to chroot libraries.
2018-08-01 22:24:34 +00:00
Marti Raudsepp 7a569ca3dc Migrate remaining GitHub URLs to GitLab 2018-08-01 14:13:23 +03:00
Grant Miller 2eaccb8bbb Update CONTRIBUTING.md 2018-08-01 09:30:24 +00:00
Magnus Gulin 9944ffd0c5 Add initial support for nokia-rm885 / Nokia Lumia 720 2018-07-30 23:30:21 +00:00
Grant Miller 1c79944603 Detect androidboot.bootchg=true
Observed on Samsung Galaxy S4
2018-07-29 17:54:16 -05:00
Bart Ribbers 9a55962ae0 Upgrade Plasma to 5.13.3 2018-07-29 18:04:52 +00:00
joshas 17c9912455 osk-sdl support for semc-smultron 2018-07-28 22:06:50 +00:00
joshas b827196887 Copy directfbrc config to initfs-extra image 2018-07-28 15:25:47 +03:00
Oliver Smith f75586208f pmb: unsupported arch: link to wiki page
The old message was outdated and incomplete, added a link to this wiki
page instead: <https://postmarketos.org/newarch>
2018-07-26 22:00:25 +00:00
Xinayder bc7f6ba7e6 motorola-ghost: Fix rendering and add touchscreen support 2018-07-26 20:31:58 +00:00
Oliver Smith b0d4244b38 pmb: flasher: require action argument
With this patch, "pmbootstrap flasher" will fail with "the following
arguments are required: action_flasher". Without it, it just prints
"Done" and quits.
2018-07-26 10:09:35 +00:00
Oliver Smith 4844719b1d pmb: adjust to distcc 3.3 and wrap it with sshd
Overview:
Since Alpine updated to distcc 3.3 last week, pmbootstrap wasn't able to use
distcc for cross compilation anymore. It always falled back to running the
compiler in QEMU (which works, but is a lot slower). The reason for that is,
that distcc requires all compilers that are being used in a whitelist now.

This partially fixes CVE-2004-2687 in distccd, which allowed trivial remote
code execution by any process connecting to the distccd server. We only run
distccd on localhost, but still this can be used for privilege escalation of
sandboxed processes running on the host system (not part of pmbootstrap
chroots).

Because the CVE is only partially fixed (see the comment in
`pmb/chroot/distccd.py` for details), we make sure that only the building
chroots can talk to the distcc server by running distcc over ssh.

Details:
* Completely refactored `pmb/chroot/distccd.py` to run distcc over ssh
  * Store the running distcc server's arguments as JSON now, not as INI
* Make debugging distcc issues easy:
  * Set DISTCC_BACKOFF_PERIOD=0, so the distcc client will not ignore the
    server after errors happened (this masks the original error!)
  * New pmbootstrap parameters:
    * `--distcc-nofallback`: avoids falling back to compiling with QEMU and not
	   throwing an error
	* `--ccache-disable`: avoid ccache (when the compiler output is cached,
	  distcc does not get used)
  * `--verbose` prints verbose output of the distcc too
  * New test case, that uses the new pmbootstrap parameters to force
	compilation through distcc, and shows the output of distcc and distccd in
	verbose mode on error (as well as the log of sshd)
2018-07-26 09:47:23 +00:00
Oliver Smith d648794f7a test/aports: detect linux-firmware-* in depends
All firmware packages go into subpackages nowadays, so we have them
optional. The `test/test_aports.py` file has a test case, that makes
sure that there are no firmware packages in the `depends` of a device
package. So far we have only checked for `firmware-*` and
`linux-firmware`, this commit makes it check for `linux-firmware*` as
well.

In addition, the URL displayed in the "Please use kernel subpackages"
message has been fixed (points to devicepkg instead of deviceinfo now).
2018-07-25 20:13:37 +00:00
Oliver Smith 2399cbb373 Don't uninstall depends when build --strict fails
Alpine's `abuild` will uninstall all dependencies by default, when a
package build fails.

Leaving this configuration unchanged leads to unexpected behavior with
pmbootstrap: when executing `pmbootstrap build --strict` and pressing
`^C` during the build, pmbootstrap will stop, but an `apk` process
will be started in the background to remove the dependency packages.

Running `pmbootstrap shutdown` at this time will not work, because the
`apk` process is still running.

With this commit, dependencies don't get cleaned up from the chroots.
2018-07-25 19:52:46 +00:00
Ashymad 4d770cee85 Add support for Samsung SIII mini VE (gt-i8200) 2018-07-25 13:30:06 +00:00
Xinayder 838a17b84b Add new device: motorola-ghost (Moto X) 2018-07-24 23:41:06 +00:00
Oliver Smith ed59e38e62
pmb: fix kconfig edit
Using the default UI (menuconfig) was broken since 8268dc0e, where
logging was rewritten. The wrong output mode has been used, "tui" is
the right one.
2018-07-25 00:46:22 +02:00
Oliver Smith 74bf43cf5f
main/kernel-scripts,temp/weston: don't build x86
They don't build for x86 (in case of weston, because the dependency
libunwind does not exist for x86).
2018-07-22 23:57:39 +02:00
Oliver Smith 0e2c7507cd
Wiki CI: require all devices to be booting
In gitlab, there is no extra CI job running for commits in a merge
request (MR). This means, we can't run different code in a MR against
"master".

So instead of only checking whether all devices are booting if there's
a MR against master, always perform this check.

I've edited the message slightly, so it's clear that it's only required
to have the devices booting when making a merge request against master.
2018-07-22 23:19:02 +02:00
Oliver Smith dfbcd31a44
cross/busybox-static-*: update to 1.28.4-r1 2018-07-22 23:17:19 +02:00
joshas 30f1419d10 Update linux-semc-smultron APKBUILD 2018-07-22 13:21:05 +03:00
Michael Orishich dae02067c6 Initial work on Sony Ericsson Xperia mini 2018-07-22 13:17:29 +03:00
Bart Ribbers f91fb322b2
Upgrade KDE-frameworks to 5.48 (!1638) [skip ci]
Skipping CI, because it wouldn't get done with building all the changed
KDE packages anyway.
2018-07-17 19:25:41 +02:00
Oliver Smith 0d7802d7ef
s/system partition/rootfs: fix remaining mentions
Follow-up to !1373, where `pmbootstrap flasher flash_system` was
replaced with `pmbootstrap flasher flash_rootfs`. We still had used
terms like "system partition" in a lot of places.

This commit replaces it everywhere, so it's clear that we're talking
about the pmOS rootfs (which may or may not be installed to Android's
system partition).
2018-07-15 23:41:31 +02:00
Oliver Smith cca5c9aa30 pmb: fix test suite not running through twice
The test suite needed a `pmbootstrap shutdown` after running through,
before it could successfully run again.

Explanation:
This was caused by `test/test_pkgrel_bump.py`, which creates a
temporary work folder with every subfolder ("chroot_native",
"cache_apk_x86_64", ...) linked to the original work folder except for
the "packages" folder. At the end of the test case,
`pmbootstrap shutdown` gets executed and is expected to umount
everything as usual. But it does not umount anything because of the
symlinks, so `work/chroot_native/mnt/pmbootstrap-packages` points to
the fake packages folder of that test case, even after it is finished.

As a result, any test case that tries to access the packages folder in
the native chroot, will fail until `pmbootstrap shutdown` gets called.

Detailed Changes:
* Umount all folders inside the work folder, even if these are symlinks
* Remove obsolete reference to "disable timestamp based rebuilds" in a
  comment in `test/test_pkgrel_bump.py`
* Run `pmbootstrap work_migrate` and `pmbootstrap shutdown` at the
  beginning of `test/testcases_fast.sh`, in case the pkgrel_bump test
  case was aborted before it could properly shutdown and to make it
  more robust in general (user may have changed the mountpoints, work
  folder may need to be migrated)
2018-07-15 20:52:41 +00:00
Oliver Smith 0adc6a1f4b Testsuite: fail after first error
This makes debugging much easier, because the relevant log messages
before the crash can always be found at the bottom of the log files,
and not somewhere in the middle.
2018-07-15 20:37:02 +00:00
Oliver Smith f121dce59b pmb: bump version to 0.8.0 2018-07-14 01:16:04 +00:00
Oliver Smith 8268dc0e3d pmbootstrap: kill process if silent for 5 minutes (rewrite logging) 2018-07-14 01:13:28 +00:00
Oliver Smith a9f149153a Allow dot and plus sign again in the regex 2018-07-13 05:28:17 +00:00
Oliver Smith 2c5cbbb954 Don't allow trailing comma in additional packages
Prior to this commit, it was possible to type in packages with a
trailing comma in `pmbootstrap init` when asked for extra packages.

This leads to problems during `pmbootstrap install`, so now we disallow
it. Fixes #1540.
2018-07-13 05:28:17 +00:00
Oliver Smith 796668d7df More obvious test failure messages for QEMU test
If the test case couldn't connect to the VM with SSH, it used to fail
with a Python error of accessing the 'missing' variable without having
it defined.

With this commit, it prints out 'Could not connect to the VM via SSH'
instead.
2018-07-11 19:37:06 +00:00
Oliver Smith bbae995be8 APKBUILD parser: replace $pkgname in *depends*
Fixes #1613
2018-07-11 19:24:40 +00:00
Oliver Smith b56e5cf281 pmb qemu: Properly escape kernel commandline 2018-07-11 19:09:34 +00:00
Oliver Smith 74e103d1f2 static code analysis: make it pass flake8 3.5.0
This commit adds two new ignores to the flake8 call:
* W504 line break after binary operator
* W605 invalid escape sequence 'x'

Without these, newer flake8 versions, such as the one shipped by Arch
Linux, don't run through on the code base (which leads to not running
it at all locally, only in CI).

Additional changes:
* Don't give the exception instance of subprocess.CalledProcessError a
  name, so it does not trigger F841
* Dont' advise to run "autopep8" anymore, because that will likely
  touch unrelated code.

For reference, here is the list of error codes:
https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
2018-07-11 18:58:29 +00:00
Oliver Smith 3631d314d4 pmb: display note when chroot is still active
It is unexpected for quite a lot of people, that the chroot folders are
still mounted when a pmbootstrap command has finished. With this commit,
it will let the user know explicitly:

> NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)

Close #1524
2018-07-11 18:39:32 +00:00
Oliver Smith 2b062a1272 pmb: use UTF-8 in pmb.helpers.file.replace()
Without this fix, `pmbootstrap pkgrel_bump` does not work with some
APKBUILDs with special characters.
2018-07-11 18:26:01 +00:00
Oliver Smith 614e7f3511 Merge branch 'master' into 'master'
Added device: Samsung Galaxy Trend Plus (s7580)

See merge request postmarketOS/pmbootstrap!1607
2018-07-09 21:54:15 +00:00
Oliver Smith 39e5060c62
Remove .github folder
Issue and merge request templates have been adjusted in the gitlab
settings to contain roughly the same information.
2018-07-09 22:15:08 +02:00
Oliver Smith 0f151015fa Merge branch 'patch-1' into 'master'
Update README.md after move to gitlab

See merge request postmarketOS/pmbootstrap!1624
2018-07-08 23:21:30 +00:00
Oliver Smith 4c8d4815af README.md: slightly adjust URLs [skip ci]
* add .git at the end of the clone URL
* add `osk-sdl` in file name
2018-07-08 23:20:13 +00:00