Commit Graph

1023 Commits

Author SHA1 Message Date
BK d79e13d226 Add helpers/envsetup.sh (#1390)
Usage:
$ source helpers/envsetup.sh
It sets up the aliases `pmbootstrap` and `pmbroot`.
The latter changes the directory to the pmbootstrap folder.
2018-04-08 12:58:10 +00:00
Lionel Duboeuf 002993b324 update oneplus2 kernel (#1399) 2018-04-06 18:37:23 +00:00
Daniele Debernardi b7b1fe9ef7 flasher: install depends of the method specified in the arguments (#1393) 2018-04-04 23:48:39 +00:00
Oliver Smith 82b9ea5af6
Remove sdl2 aport again (fix is merged in Alpine) 2018-04-05 00:08:19 +02:00
Michael Hamann ae846a1cff
Add SDL2 from Alpine Linux, force-enable directFB 2018-04-04 23:30:12 +02:00
Alexandroid99 c52ba8852e New device: htc-flounder (#1309) 2018-04-04 00:27:11 +00:00
Oliver Smith b66b5dcc34
pmbootstrap init: kernel selection / remove linux-pmos-lts (#1363)
* As discussed in IRC/matrix, we're removing `linux-postmarketos-lts`
  for now. The kernel isn't used right now, and we save lots of
  maintenance effort with not updating it every week or so.
* new config option `"kernel"` with possible values:
  `"downstream", "mainline", "stable"` (downstream is always
  `linux-$devicename`)
* ask for the kernel during `pmbootstrap init` if the device package
  has kernel subpackages and install it in `_install.py`
* postmarketos-mkinitfs: display note instead of exit with error when
  the `deviceinfo_dtb` file is missing (because we expect it to be
  missing for downstream kernels)
* device-sony-amami:
  * add kernel subpackages for downstream, mainline
  * set `deviceinfo_dtb`
* device-qemu-amd64: add kernel subpackages for stable, lts, mainline
* test cases and test data for new functions
* test case that checks all aports for right usage of the feature:
  * don't mix specifying kernels in depends *and* subpackages
  * 1 kernel in depends is maximum
  * kernel subpackages must have a valid name
  * Test if devices packages reference at least one kernel
* Remove `_build_device_depends_note()` which informs the user that
  `--ignore-depends` can be used with device packages to avoid building
  the kernel. The idea was to make the transition easier after a change
  we did months ago, and now the kernel doesn't always get built before
  building the device package so it's not relevant anymore.
* pmb/chroot/other.py:
  * Add autoinstall=True to kernel_flavors_installed(). When the flag
    is set, the function makes sure that at least one kernel for the
    device is installed.
  * Remove kernel_flavor_autodetect() function, wherever it was used,
    it has been replaced with kernel_flavors_installed()[0].
* pmb.helpers.frontend.py: remove code to install at least one kernel,
  kernel_flavors_installed() takes care of that now.
2018-04-03 23:50:09 +00:00
Decatf b7d4e2c11e Update linux-samsung-p4wifi to kernel 4.16 (#1386)
* Specify a device tree binary file for p4wifi kernel
Previously the p4wifi kernel was using Android patches which append the
dtb to zImage in the kernel makefile.

Now follow mainline kernel convention of leaving the zImage and dtb
separate. Follow postmarketOS convention of specifying dtb file in
deviceinfo.
* Use linux-postmarketos-mainline APKBUILD build functions for p4wifi
* Update linux-samsung-p4wifi to kernel 4.16
- Use mainline broadcom bluetooth hci driver
- Use mainline atmel_mxt_ts driver
- Use mainline stmpe811 mfd driver and add stmpe811 ADC block
2018-04-03 23:29:11 +00:00
Decatf ed449f8faf Update busybox-static-* to upstream (1.28.2-r3) (#1387) 2018-04-02 23:33:34 +02:00
Daniele Debernardi 9cfda8a7e9 apk-file: Update to version 0.3.0 and new repository (#1382) 2018-04-02 00:02:12 +00:00
Oliver Smith 7e93691e27
qt5-qtbase: bump pkgrel because of soname bump
This doesn't exist anymore:
so:libmysqlclient.so.18
2018-04-01 01:38:23 +02:00
Oliver Smith cf2b482838
musl-*: use default Alpine mirror
Otherwise the test/test_aportgen.py case fails.
2018-03-31 20:46:39 +02:00
Oliver Smith fa1c47e7bb
Update musl-* to upstream (1.1.19-r4) 2018-03-31 17:27:49 +02:00
Oliver Smith 37f0b6910f
Update musl-* to upstream (1.1.19-r3) 2018-03-30 23:46:45 +02:00
Oliver Smith 4d8afc4aa5
Fix: /var/cache/distfiles writable by everyone (#1329)
As noted in commit 255c715624
`/var/cache/distfiles` is writable by everyone. It is supposed to be
writable only by `root` and by the `abuild` group (in which we put the
`pmos` user already for building packages).

Changes:
* `pmb.build.init()`: make `/var/cache/distfiles` writable only by
  members of the `abuild` group (and root)
* Increase workfolder version to 2
* Add migration code that fixes the permissions for existing work
  folders
* Refactor the migration code a bit to make this possible
2018-03-30 21:46:31 +00:00
Aerotinge 40db17d775 New device: hTC Desire 816 (htc-a5ul) (#1378)
Signed-off-by: Aerotinge <wang.wander@gmail.com>
2018-03-30 19:28:45 +00:00
Oliver Smith f08bc39e8b
Update busybox-static-* to upstream (1.28.2-r1) 2018-03-30 18:48:51 +02:00
Lionel Duboeuf 7455eb1d2e re-enable RDP for weston (#1377)
RDP is the Remote Desktop Protocol. Usage information:
https://wiki.postmarketos.org/wiki/Weston
2018-03-30 16:44:40 +00:00
Oliver Smith cab753b984
Update musl-* to upstream (1.1.19-r2) 2018-03-30 18:07:04 +02:00
Oliver Smith 6bb8444fef
"...flasher flash_rootfs" instead of "..._system" (#1373)
* Change `pmbootstrap flasher flash_system` command to
  `pmbootstrap flasher flash_rootfs`
* The old command still works, but all references have been changed to
  the new command
* Remove obsolete `pmbootstrap flasher export` (that was changed to
  `pmbootstrap export` a few months ago)
* Update `README.md` and ZSH auto completion
* Change the description of the generated rootfs image (not talking
  about a system image anymore, mention that it has subpartitions)
* Better description of `pmbootstrap flasher flash_rootfs --partition`
2018-03-30 01:11:20 +00:00
Lionel Duboeuf b0c05436a9 pmbootstrap install: print 'flash_system' before 'flash_kernel' (#1372) 2018-03-30 00:52:38 +00:00
Aerotinge ae9efa0338 New device: hTC Incredible S (htc-vivo) (#1365) 2018-03-30 00:05:41 +00:00
Oliver Smith 03f74565fb
Travis: Check for device documentation (#1369)
Add a simple script, that checks whether all device's codenames can be
found in the device overview in the wiki. This way we're always sure
that every device is documented in the wiki's device table.
2018-03-28 21:28:26 +00:00
Lionel Duboeuf b65c04b3ce New device: oneplus oneplus2 (#1366)
Based on work by @NotKit, thanks!
2018-03-28 21:10:12 +00:00
Oliver Smith 491ee6b1c1
Disable metadata_csum when generating ext4 rootfs (#1367)
Some downstream kernels don't support this, and this recently became
the default in e2fsprogs.
2018-03-28 18:00:18 +00:00
Oliver Smith 941cb4d44f
Bump pkgrels for soname bump: libboost_filesystem
This doesn't exist anymore: so:libboost_filesystem.so.1.62.0
Affected packages are all from LuneOS UI:
* activitymanager
* mojoservicelauncher
* nodejs-module-webos-dynaload
2018-03-28 19:37:29 +02:00
Oliver Smith 6c4d7cf25c
Update busybox-static-* to upstream (1.28.2-r0) 2018-03-28 19:35:33 +02:00
Daniele Debernardi a7afd519ef Add additional files into initramfs when debug-shell is installed (#1358) 2018-03-26 18:12:58 +00:00
racer123 7fec589ed4 Add support for GT-S756x (kylessopen, Galaxy Trend/S Duos/Ace II x) (#1361) 2018-03-25 19:00:40 +00:00
Oliver Smith 33a09ea1c7
Fix dependency resolver being stuck after reboot (#1359)
When the native arch (e.g. `x86_64`) `APKINDEX` files are outdated, and
`pmbootstrap` gets instructed to build a linux package for a foreign
arch, then the `APKINDEX` cache did not get used anymore for the
current session. This means that every lookup of a package in an
`APKINDEX` caused the whole `APKINDEX` file to get parsed again instead
of using the cached version. This slowed it down so much that it felt
like `pmbootstrap` was looping forever.

How this happens in detail:
* Whenever pmbootstrap parses an `APKINDEX`, it fills up the
  `args.cache["apkindex"]` dict with the parsed information and the
  last modified date of the file.
* `pmbootstrap` checks the last modified date of the `APKINDEX` files
  and updates them if they are older than 4 hours.
* When the bug appeared, then the cache was already filled up, then an
  update happened and then `pmbootstrap` tried to read from the cache.
* So when reading from the `APKINDEX`, the cache gets ignored because
  the last modified date is different.
* Up to this commit, the cache does not get deleted and filled up
  again!

How to test:
Try these commands once without this commit, and then with this commit
applied:
```
$ sudo touch -m -t 201801010000 \
    ~/.local/var/pmbootstrap/cache_apk_x86_64/APKINDEX.*
$ pmbootstrap -v build linux-postmarketos-mainline --arch=armhf
```

Without the patch, you can see in `pmbootstrap log` that it is
resolving the dependencies properly, but very slowly. With the patch
the resolving happens almost instantly.
2018-03-24 16:31:31 +00:00
Oliver Smith 1ed51f83f1
Package resolving: Don't fail on fuzzy versions (#1355)
When parsing the depends of entries in the APKINDEX file, we ignore
all operators (<, =, >). (This is enough for our use case, was we only
do the dependency resolving to check which packages need to be built
and `apk` does the dependency resolving again before installing
anything).

We did not ignore the ~ character for fuzzy version compares, this is
fixed with this commit.
2018-03-24 16:29:32 +00:00
Oliver Smith f4674abee6
Update busybox-static-* to upstream (1.28.1-r1) 2018-03-24 12:16:23 +01:00
Luca Weiss 7ef0177dbb Kernel updates (#1357)
* linux-postmarketos-mainline 4.16_rc6 [skip ci]
* linux-postmarketos-lts 4.14.29 [skip ci]
* linux-postmarketos-stable 4.15.12 [skip ci]
2018-03-21 21:59:35 +00:00
Oliver Smith 1251c3810e
README: Update with lots of usage examples [skip ci] (#1340)
Details:
* renamed "supported devices" to "devices"
* fix coverage button to URL suggested by coveralls.io
* link to postmarketOS.org
* lots of usage examples
* use `pmbootstrap` alias
* Persistent alias note, initfs extract, debugging
2018-03-20 22:00:14 +00:00
Luca Weiss 29d62deef0 Kernel updates (#1348)
* linux-postmarketos-stable 4.15.11 [skip ci]
* linux-postmarketos-lts 4.14.28 [skip ci]

NOTE: linux-postmarketos-mainline 4.16_rc6
has a regression, not updated yet (#1352)
2018-03-20 21:02:12 +00:00
cybermonkey 8570aed36e New device: Xiaomi Redmi 4X (xiaomi-santoni) (#1346) 2018-03-20 18:46:01 +00:00
Daniele Debernardi 147082ec58 pmbootstrap init: Ask for hostname, default: device name (#1327)
* Save "" (empty string) in the user's config as hostname if the user
  let it default to the name of the device. That way, when the device
  gets changed, the user won't get the old device's name as hostname
  by accident.
* Add a test case
2018-03-17 18:41:41 +00:00
Attila Szöllősi 16af241e5e Fix regex in recovery installer (#1339)
Fixes #1322.
2018-03-17 18:25:39 +00:00
NotKit 960ae07618 Motorola Droid 4 (maserati) (#1039)
Note about PMOS_NO_SAFESTRAP kernel cmdline:
This can be used to forcefully skip SafeStrap partition mount in device
initramfs hook, for example when booting with droid4-kexecboot on device with
SafeStrap configured as well.
2018-03-16 20:26:20 +00:00
Bhushan Shah ab47a29b7d Export some environment variables when starting plasma (#1341)
This environnment variables provides better integration and themeing to
various components and is inline with what reference Plasma Mobile
images is doing

Signed-off-by: Bhushan Shah <bhush94@gmail.com>
2018-03-16 19:42:48 +00:00
alive4ever c05ddc6824 recovery-installer: include tar inside recovery.zip (#1337)
busybox tar applet is messing with symbolic link extraction. Include GNU
tar binary to handle tarball extraction correctly.
2018-03-15 22:16:50 +00:00
Oliver Smith 5ea00e0862
pmbootstrap newapkbuild: Properly parse arguments (#1320)
* pmbootstrap newapkbuild: Properly parse arguments

The `pmbootstrap newapkbuild` action wraps Alpine's `newapkbuild`. We
used to directly pass all arguments to `newapkbuild` without verifying
in Python whether they make sense or not. However, as `newpakbuild`
doesn't do strict sanity checks on the arguments, it is easy to end up
with unexpected behavior when using the command for the first time.

For example, `newapkbuild` allows either specifying a PKGNAME or SRCURL
as last parameter, and also allows setting a PKGNAME with the `-n`
parameter. It only makes sense to use that option when passing a
SRCURL.

With this commit, we duplicate the optins that should be passed through
to `newapkbuild` and use argparse to fully sanitize the options and
display a help page (`pmbootstrap newapkbuild -h`) that is consistent
with the other help pages.

Details:
* The `-f` (force) flag does not get passed through anymore. Instead we
  use it in Python to skip asking if an existing aport should be
  overwritten (the aports are outside of the chroot, so `newapkbuild`
  can't handle it in a way that makes sense for pmbootstrap).
* Output of `newapkbuild` gets redirected to the log file now, as we
  don't need it to display a help page.
* Don't verify the pkgver while creating the new APKBUILD. When passing
  a SRCURL, the pkgver gets extracted from the end of the URL and may
  not have a valid format yet (but we want the APKBUILD anyway).
* Stored options passed through in `pmb/config/__init__.py` and use it
  in both `pmb/parse/arguments.py` and `pmb/helpers/frontend.py`.
* Only allow `-n` with SRCURL
* The postmarketOS aports folder gets specified with `--folder` now.
  That way the generated help page is much closer to the original one
  from `newapkbuild`. The default is `main`.
* Made the package type flags (CMake, autotools, ...) exclusive so only
  one of them can be specified
2018-03-15 21:42:34 +00:00
Bhushan Shah e7c18f6c48 Add kwayland-integration to plasma-mobile dep (#1338)
* Add kwayland-integration packaging
* Make postmarketos-ui-plasma-mobile depend on kwayland-integration
2018-03-15 21:40:52 +00:00
Oliver Smith 2a096e6a56
Qemu test case: wait dynamically until booted (#1330)
We have a test case, that performs full installations with with XFCE4
and Plasma Mobile. After each installation is through, we run
"pmbootstrap qemu" and connect to the VM via SSH to check for specific
running processes.

Before this commit, we assumed that the boot takes 90 seconds at most
and then the processes should exist. But sometimes the boot is faster
(so Travis waits just doing nothing) and sometimes it is slower (which
causes the test case to fail), all depending on the current workload
of the Travis CI servers. Now we try to find the processes we're
interested in each second for 3 minutes until we either succeed or
reach the time limit.
2018-03-14 21:24:13 +00:00
alive4ever e5e5fdd512 linux-xiaomi-armani: disable kgsl 3d driver (#1334)
The kgsl 3d driver causes the device to boot loop, so disable this for
now.

The device boots ok after removing the kgsl driver, although continuing
boot from debug-shell via `pmos_continue_boot` does not work (seems to
be a bug in msm_fb driver). So, one has to reflash the boot partition
generated with no intfs debug shell to enjoy this improvement.
2018-03-14 21:15:06 +00:00
Oliver Smith f75ac13a4f
Travis CI: folded output/default tracebacks (#1331)
* Moved the `script` and `after_failure` sections of `.travis.yml`
  to extra files in a new `.travis/` folder
* Copy paste `.travis/common.sh` from Alpine's aport. They have neat
  formatting functions in there for folding
* Add a folding block around each script that gets called
* Use native tracebacks in pytest. These are the same as we see when
  pmbootstrap crashes usually, instead of printing out the entire
  function that causes an error. I think this makes the error output
  easier to read.
2018-03-14 20:32:47 +00:00
Decatf 49e15b322c samsung-p4wifi: Load wifi modules, add audio output, remove touch screen calibration (#1328)
* [samsung-p4wifi] Include modules in kernel package
* [samsung-p4wifi] Load wifi modules at boot
* [samsung-p4wifi] Use mainline wm8994 sound driver
* [samsung-p4wifi] Add ALSA UCM config
Generated from xml2ucm tool.
* [samsung-p4wifi] Add headphone jack detect udev rules
* [samsung-p4wifi] Remove touchscreen calibration
It is not a resistive touchscreen. The default calibration works.
2018-03-13 19:39:07 +00:00
Oliver Smith d3818cd2e7
device-zte-kis3: Fix sdcard installation
There was a space at the end of the line, which the deviceinfo
parser couldn't handle. Fixes #1325.
2018-03-12 21:17:32 +01:00
Daniele Debernardi 0aaa19a612 postmarketos-ui-xfce: Update to 0.2 (#1326)
* Add default icon theme
* Set pmOS wallpaper
* Add battery icon in top panel
* Use builddir (so --src works)
2018-03-12 19:17:36 +00:00
Oliver Smith 255c715624
Fix aportgen without initializing buildenv
After initializing the build environment, the cache_distfiles folder
currently is writable by everyone (which is not ideal, fix following
soon). The aportgen code for `busybox-static-*` and `musl-*` copies
the foreign arch `.apk` file to the distfiles, but it executes this
action as regular user and not as root. This only works as long as
build initialization ran before (which may not be the case on Travis
and expecting this to run before is a bug in general).

With this commit, the copy action gets executed as root, so it works
in any case. I'm commiting this directly (without a PR), because it
is a super simple fix and it unblocks our continuous integration.

Local testing:
$ pmbootstrap -y zap
$ sudo rm -r ~/.local/var/pmbootstrap/cache_distfiles
$ pmbootstrap aportgen musl-armhf
2018-03-12 17:17:32 +01:00