Commit Graph

443 Commits

Author SHA1 Message Date
Oliver Smith 74344a36c2
Bump version to 0.4.0 2017-11-26 19:01:36 +01:00
Oliver Smith d3c77c39ac
Fix #824: Refactor pmb/build/package.py (make depends work like in abuild) (#935)
* Rename pmb/build/package.py to pmb/build/_package.py, so we can
  access the functions it contains in testcases, and still use
  pmb.build.package()
* Refactor the entire file. Instead of one big function that does
  too many things, we have many small ones now, that are tested
  in the testsuite and easier to modify
* Whenever building a package, pmbootstrap does not only build and
  install the "makedepends" (like we did before), now it does the
  same for the "depends". That's required to be compatible with
  abuild. The old behavior can still be used with 'pmbootstrap
  build --ignore-depends'.
* Because of that change, noarch packages can no longer be built in
  the native chroot if we need them for a foreign chroot. A device-
  package depending on a kernel would pull in the same kernel for
  the native architecture otherwise.
* Running 'pmbootstrap build device-...' without '--ignore-depends'
  and without a matching '--arch' displays a note that explains
  this change to the user and tells how to use it instead.
* Noarch packages no longer get symlinked. That was only
  implemented for packages built in the native chroot, and now that
  is not always the case anymore. Symlinking these packages creates
  packages with broken dependencies anyway (e.g.
  device-samsung-i9100 can't be installed in x86_64, because
  linux-samsung-i9100 is armhf only).
* Rename "carch" to "arch" wherever used. Naming it "carch"
  sometimes is confusing with no benefit.
* Add a testcase for the aarch64 qemu workaround (because it failed
  first and I needed to know for sure if it is working again).
* Improved some verbose logging, which helped with development of
  this feature.
* Removed the old "build" test case (which was disabled in
  testcases_fast.sh) as the new "build_package" test case covers its
  functionallity.
* Only build indexes if the packages folder exists for that arch (Travis
  couldn't run a test case otherwise)
2017-11-26 14:32:02 +00:00
drebrez 948f4ef224 Close #929: Add flash method "none" (#934) 2017-11-25 02:57:58 +00:00
drebrez 0cca286aba Move flash_methods variable to __init__.py (#919) 2017-11-20 16:40:16 +00:00
Oliver Smith a7b881e4cc
Close #871: Enable binary repository (#887)
* add my own build key
* enable the repo in the config
* update the README file
* Adjust testcase, that validates the keys and enable it in testcases_fast.sh
* Only save/load keys to/from the config file, which we ask for during
  'pmbootstrap init', so the binary repo gets used even if a config file
  already exists (this also removes a workaround, that deletes the work
  folder path from the config dictionary before writing it)
* Download missing APKINDEX.tar.gz files with Python code, before
  attempting to build packages (so we know which ones aleady exist in
  the binary packages repository)
* Consider APKINDEX files older than 4 hours as outdated and download
  them again (also in Python code)
* Provide 'pmbootstrap update' to force-update the APKINDEX files
* Travis: more logging output on failure
* Only allow keys from config_keys to be used by "pmbootstrap config"
2017-11-19 15:04:08 +00:00
drebrez 94e2387af5 Add `pmbootstrap bootimg_analyze` / prompt during new device wizard (#905) 2017-11-19 14:35:23 +00:00
Pablo Castellano 99d7b58ee5 init: Add manufacturer to pkgdesc when creating new device (#913) 2017-11-18 11:02:19 +00:00
Attila Szöllősi d9e7a3d7de Run recovery installer in chroot (#901)
The recovery installer now has as few dependencies on the
Android recovery system as possible.
2017-11-16 22:20:57 +00:00
Oliver Smith 4c7793e766
Workaround for Qemu aarch64 abuild-tar bug (#907)
See also: <https://github.com/postmarketOS/pmbootstrap/issues/546>
2017-11-15 22:28:10 +00:00
Jochen Sprickerhof c50ecd7c5a Unset restrictive umask before creating files (#908)
If a user has a restrictive umask (for example 0077) set, it will be
inherited to sudo and thus files created with sudo where not readable by
the normal user. In that case, when setting up a new chroot, the
etc/apk/repositories file would have umask 600 and a os.path.exists()
(in update_repository_list) would return false. Setting the umask to 022
(octal) first, results in world readable files and directories, so the
user running `./pmbootstrap.py install` can read them.
2017-11-14 21:02:56 +00:00
Oliver Smith 90f89ef18c
Fix #722: don't use a HTTPS package mirror by default (#896)
* Fix #722: don't use a HTTPS package mirror by default
* Use load balancing mirror http://dl-cdn.alpinelinux.org/alpine/
2017-11-14 19:02:27 +00:00
clayton craft 0eb856a2f6 Close #897: Add max size option for fastboot (#899)
This adds a new deviceinfo 'flash_fastboot_max_size' used for
preventing fastboot from flashing a system partition that is too
large. Some devices do not support flashing over a certain size
(e.g. 500MB).
2017-11-11 22:00:22 +00:00
Oliver Smith c96da8cd37
Fix: package gets rebuilt, even if it exists, when using default arch (#881)
When not specifying an architecture for `pmbootstrap build`, and the `APKBUILD`
says that it can't be built for the native arch, it gets built for the right
foreign arch. `pmbootstrap` did not properly detect if packages were already
built in that case, and tried to build them again.

(I've noticed that while building packages for the binary repo #871.)

Use any `linux-` package, that is not available for `x86_64` on a `x86_64` PC
and build it twice. It should get properly detected now:

```shell
pmbootstrap build linux-amazon-thor
pmbootstrap build linux-amazon-thor # should not get built again
```
2017-11-07 23:23:55 +00:00
Oliver Smith 1bf892f5eb
Close #453: Support mesa-dri-virtio in Qemu (#861)
The mesa driver, which ends up in the installation image, needs to be known
before the installation is done (in other words: when running the qemu action,
it is to late as the image has already been generated). That's why one can
choose the Qemu mesa driver in `pmbootstrap init` now:

```
Device [qemu-amd64]:
Which mesa driver do you prefer for your Qemu device? Only select something other
than the default if you are having graphical problems (such as glitches).
Mesa driver (dri-swrast/dri-virtio) [dri-virtio]:
```

It is still possible to select `dri-swrast`, because `dri-virtio` may not work
in all cases, and that way we could easily debug it or experiment with other
mesa drivers (e.g. the "vmware" one, which is supported by mesa and Qemu).

Other changes:
* `pmbootstrap qemu` accepts a `--display` variable now, which passes the value
  directly to `qemu`'s `display` option. It defaults to `sdl,gl=on` (@PureTryOut
  reported that to work best with plasma mobile on his PC). `--display` and
  `--spice` (which is still working) are mutually exclusive.
* Removed obsolete telnet port pass-through: We only use the debug telnet port
  since osk-sdl has been merged.
* Add show-cursor to the Qemu command line, so it shows a cursor in X11
* Refactored the spice code (`command_spice` only returns the spice command,
  because it has all necessary information already) and the spice port can be
  specified on the commandline now (previously it was hardcoded in one place and
  then always looked up from there).
* Start comments with capital letters.
* Keep the log on the screen a bit shorter (e.g. Qemu command is written to the
  "pmbootstrap log" anyway, so there's no need to display it again).
* linux-postmarketos-stable: Adjust kernel configs
x86_64, armhf: enable as modules:
CONFIG_DRM_VIRTIO_GPU, CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_BALLOON
aarch64: all 3 options were already enabled as built-in (no change)
* Set '-vga virtio' for mesa-dri-virtio
2017-11-05 13:48:49 +00:00
Oliver Smith 50faf5fe22
Close #865: Check line endings in APKBUILDs (#868) 2017-11-04 16:12:33 +00:00
clayton craft cacb05e7e6 Fix #818: Clean up updated repo list after zapping chroots (#867) 2017-11-04 02:43:06 +00:00
clayton craft 2987294ea6 Remove existing apk cache symlink before creating link (#866)
This removes any existing symlinks (which always seem to be broken when
this is encountered) to <workdir>/chroot_native/etc/apk/cache before
creating the symlink.
2017-11-04 02:19:23 +00:00
Oliver Smith 6962803fbb
Fix #831: Disallow work dir being inside the pmbootstrap dir (#852) 2017-11-04 02:04:55 +00:00
drebrez 6fb5b28e2f Add "flash_fastboot_vendor_id" deviceinfo variable for fastboot flash method (#857) 2017-11-03 23:20:55 +00:00
drebrez ba3e2f6d26 Add argument to zap (-o) older versions of packages from all chroots (#841)
- also moved the mismatch clean (-m) before zapping the chroots
- added confirmation questions to -o and -m
2017-11-02 17:33:14 +00:00
Oliver Smith 6627599cf0
pmbootstrap init: Wizard for new port device- and linux-packages (#821)
* pmbootstrap init: Generate new port device- and linux-package
* adds `pmbootstrap aportgen device-*` and
  `pmbootstrap aportgen linux-*`
* ask for confirmation when selecting a non-existing device
* generate the packages directly from init
* refactor aportgen code
* fixed some easy things in the linux- APKBUILD (more to come in
  follow-up PRs!)

Testing:
* Test all questions to the user from pmb.config.init and pmb.aportgen.device
  (except for the timezone question, because we would need to monkeypatch the
  os.path.exists() function, which messes up pytest, so we'd need to refactor
  the timezone function to be more testsuite friendly first)
* Run the device wizard in a testcase a few times and check the output, that
  pmbootstrap.aportgen.device and pmbootstrap.aportgen.linux create by parsing
  the resulting APKBUILDs and deviceinfo and checking its contents.
* Build the generated device package once in the same testcase

Thanks a lot to @drebrez for all the help with this one:
<https://github.com/postmarketOS/pmbootstrap/pull/821>

See also the updated porting guide:
<https://wiki.postmarketos.org/wiki/Porting_to_a_new_device>
2017-10-30 19:56:38 +00:00
drebrez 9c1ef821b3 Add architecture argument for the buildroot chroot (#832)
* Add architecture argument for the buildroot chroot, defaults to device architecture
* Output pmbootstrap log file after failure to debug Travis failure
* Travis: disable timestamp based rebuilds
2017-10-28 00:45:15 +00:00
Oliver Smith a3c1e22dd9
kconfig_check: disable CONFIG_PFT (#830)
This caused builds to fail with a modern GCC at least once, and while it originally was meant as
security feature by Qualcomm, "it is unsupported by Qualcomm, and opens up to a wide range
of potential attack surfaces that has not been audited by anyone."
2017-10-27 20:41:44 +00:00
Attila Szöllősi ee2bbf8385 Don't hardcode kernel flavor when launching qemu (#827)
This makes qemu work again with linux-postmarketos-stable (we renamed it recently).
2017-10-26 19:19:42 +00:00
drebrez 732a94fd45 Unregister all binfmt architectures during `pmbootstrap shutdown` (#822)
* Unregister all binfmt architectures during `pmbootstrap shutdown`
* Remove `-r, --rootfs` argument from `pmbootstrap build_init` command
2017-10-25 22:54:17 +00:00
drebrez 459f97ef1d Support multiple architectures in `pmbootstrap menuconfig` command (#814) 2017-10-24 16:18:42 +00:00
Oliver Smith ed94ab7449 Run fast testcases in Travis CI, remove obsolete testcase (#760)
* Removed obsolete apkindex_files cache testcase (the corresponding
function has been removed in #345 already).
* Fix test_challenge_apk: It failed on Travis, because we're accessing
/etc/abuild.conf, which only exists after initializing the build environment.
It's a random dummy file anyway, so I've replaced it with another file.
* Fix test_folder_size: accept a tolerance in the result
2017-10-23 19:44:08 +00:00
drebrez b1c86d4586 Fix #808: Add SYSVIPC kernel config check (#809)
* Add SYSVIPC kernel config check
* Add SYSVIPC kernel config option to all linux-device packages
2017-10-23 19:25:40 +00:00
Oliver Smith 8ba2964b64 Fix #800: Menuconfig didn't build dependencies (#801) 2017-10-21 14:34:43 +00:00
clayton craft 05b271d2e3 Fix #708: Detect existing pmOS install on sd card, show different warning(#766)
The method of 'install detection' used here is to look for a partition with pmOS_boot in the partition label. It's not a guarantee, but it works when FDE is enabled without having to unlock the partition to read files within it.
2017-10-21 00:33:58 +00:00
Martijn Braam c6990d9e92 Fixed username in flasher output (#784) 2017-10-17 16:24:34 +00:00
Oliver Smith 92e55ae1cd pmbootstrap init: Show pkgdesc for each postmarketos-ui package (#763)
This way we could give the user a rough idea what will be installed,
and also use this to display a short warning about long compile times
(e.g. until the plasma mobile stuff is upstreamed).
2017-10-16 20:01:21 +00:00
clayton craft de84ec61a4 Add osk-sdl as default luks unlock mechanism on boot (#476)
More information: <https://postmarketos.org/osk-port>
2017-10-14 18:10:12 +00:00
drebrez 9f4522069a [android-recovery-zip] Add missing apk keys (#747) 2017-10-14 15:41:12 +00:00
clayton craft 816cc9f625 Fix #588: Add chrony ntp client & timezone config (#674)
This adds chrony as the ntp client (starting on boot), and also adds a
prompt in the init step for configuring the timezone.
2017-10-13 19:18:24 +00:00
clayton craft 9f0c884188 Generating rootfs image is now 110% less scary (#758)
This adds a check to make sure there is enough disk space for creating the device image.
One of the two proposed improvements of #708.
2017-10-13 18:52:43 +00:00
Oliver Smith a13623bbfb Fix #754: abuild keys did not get copied (#755) 2017-10-12 22:01:59 +00:00
drebrez 7679c3c819 Delete broken symbolic links during `pmbootstrap zap --mismatch-bins` (#746) 2017-10-12 20:40:25 +00:00
Pablo Castellano b4dd7a89d2 Close #709: Improve user creation (#725)
* Allow to specify a custom username in "pmbootstrap init"
* Build chroots have "pmos" instead of "user" as username now
* Installation user UID is 1000 now (as in all other Linux distributions)
* Adjust autologins
* postmarketos-base: enable wheel group for sudo, removed previous sudoers file
* Implement safe upgrade path:
We save the version of the work folder format now, in $WORK/version.
When this file does not exist, it defaults to 0.
In case it does not match the currently required version
(pmb.config.work_version), then ask the user if it should
automatically be upgraded.
2017-10-12 20:08:10 +00:00
Oliver Smith 75210b5cb5
Version bump to 0.3.0 2017-10-12 22:02:13 +02:00
Oliver Smith 1285f74c5f Fix #731: Create symlinks for noarch-subpackages (#740)
* apkindex:
  * Also parse the architecture field
* symlink_noarch_package:
  * Renamed to symlink_noarch_packages
  * Always work on all packages (so we don't need to guess which
    subpackages have been generated after a certain build)
  * Get invoked when running 'pmbootstrap index'
  * Use 'apk index' to generate one index, where the architecture
    does not get rewritten (abuild does that by default, due to
    Alpine's repos not having a 'noarch' folder and diverging from
    that doesn't make things easier for us). That goes super fast,
    and then we know which packages are noarch packages and can
    create the symlinks.
* Made output less verbose:
  * Use -q for 'apk index' when calling it directly (when it gets
    called by abuild we can't control that)
  * Output that the APKINDEXes get reindexed only to the 'pmbootstrap
    log'.
2017-10-11 15:11:25 +00:00
Luca Weiss 0cc7869576 Fix #737: Disable ANDROID_PARANOID_NETWORK for all devices (#742)
* Disable ANDROID_PARANOID_NETWORK for all devices
* Add APKBUILD comments
* Bump pkgrels

This was done with a script, see:
<https://github.com/postmarketOS/pmbootstrap/pull/742#issuecomment-335608932>
2017-10-11 15:11:05 +00:00
Pablo Castellano 42f88c2b32 Fix: crash when running running `zap -m` after `zap -p` (#726) 2017-10-09 19:03:07 +00:00
Pablo Castellano 3fb17225f6 Fix #436: Clean apkbuilds (#692)
* Remove empty build() functions
* Remove obsolete '|| return 1' statements
2017-10-04 15:05:00 +00:00
Pablo Castellano 7a519a911e Fix: cannot run 'pmbootstrap config' when specified device doesn't exist (#689) 2017-10-03 18:37:50 +00:00
Pavel Machek 4db27a2d91 Fix #669: Only do useradd via Python, properly install /etc/skel defaults (#685) 2017-10-03 18:10:28 +00:00
clayton craft d45c7d2d84 Add armv7l (armhf) as supported native arch. (#682) 2017-10-02 22:49:40 +00:00
clayton craft 4204a86992 Fix #673: Only load loop module if it is not already loaded in the kernel (#675)
This checks for /sys/modules/loop before modprobing the loop module. My
understanding is that if this module is built into the kernel, that this
directory is still created. For a kernel without loop built in,
losetup.py will try to load the module using modprobe.
2017-10-02 21:53:01 +00:00
Attila Szöllősi 8017a3b452 Fix typo in pmb/install/install.py (#658) 2017-09-30 20:01:20 +00:00
Attila Szöllősi 3cbd0d19c2 Add support for isorec flashing in recovery installer (#609) 2017-09-28 22:05:00 +00:00
Pablo Castellano c855ee095b Qemu support for the QXL driver and SPICE (#481)
* pmb.helpers.run: support running processes in background
* enable QXL driver support in the linux kernel configurations so
that we can also use SPICE to connect to the VM.

QXL is a paravirtual graphics driver with 2D support

The SPICE project aims to provide a complete open source solution for remote
access to virtual machines in a seamless way.

Both DRM_QXL and DRM_BOCHS are enabled as modules.
According to [1], on Linux guests, the qxl and bochs_drm kernel modules
must be loaded in order to gain a decent performance

* qemu: add new option --spice to connect to VM using a SPICE client

If specified, 'pmbootstrap qemu' will look for some SPICE client in the
user's PATH and run qemu using the QXL driver.

Currently supported spice clients are 'spicy' and 'remote-viewer' but
adding support for more clients can be easily done.

qemu with qxl support will run on port 8077/tcp, which doesn't belong to
any well-known service and represents 'PM' in decimal.

References:
[0] https://www.linux-kvm.org/page/SPICE
[1] https://wiki.archlinux.org/index.php/QEMU#qxl
[2] https://wiki.archlinux.org/index.php/QEMU#SPICE
[3] https://github.com/postmarketOS/pmbootstrap/issues/453 (partially fixed)
2017-09-26 20:52:00 +00:00
Oliver Smith e60eee7dfa Fix #151: git ambiguous argument error (#531)
We check if origin/HEAD is present. In case that reference is
missing, we show a meaningful error message now, with an explanation
on how to add it. Also moved find_out_of_sync_files_tracked() to
pmb.helpers.git
2017-09-25 22:05:29 +00:00
clayton craft d98cb50347 Improve message for SSH key copying during install (#624)
This only displays the ssh key note if no keys are found, since it's
confusing if a user has 1 key but not the other. In that case, the
message would be displayed despite copying one of the keys over.
2017-09-24 14:02:17 +00:00
Jean Lucas a8cdb455f3 Support for Ed25519 SSH keys (#571) 2017-09-21 17:11:20 +00:00
Oliver Smith bf6f5cb884 Fix confusing error message for invalid makedepends (#540)
This happens currently, when a makedepend is invalid:
ERROR: UnboundLocalError: local variable 'pkgname' referenced before assignment

With this patch, you get the meaning full error that should have been printed instead:
ERROR: Could not find package 'invalid-package' in the aports folder and could not find it in any APKINDEX
2017-09-19 19:51:43 +00:00
clayton craft 558cd40fbf Adjust luksFormat options to reduce time to open luks device on boot (#430)
This is a workaround for #429, until the iteration count can be
specified directly in cryptsetup.

* Add default iter-time option, and option to override
* set SHA1 default hash for luksFormat, add option to override
* [RX51] load omap-sham in initramfs for HW accel. sha1
2017-09-19 19:46:18 +00:00
Attila Szöllősi ae6a58b6ed Close #554: kernel config checking (#589)
* Check kernel config
* Allow specifying multiple kernel packages, and also no packages
  which defaults to scanning all kernel configs (it is super fast
  anyway)
* Add the check to Travis CI
* Adjust existing kernel configs, so they pass the kconfig_check.
(We've had to put in a lot of defaults in the aarch64
linux-postmarketos configs, that's why the diff is a bit unclean.)
* Increase modified kernel pkgrels
2017-09-18 21:36:54 +00:00
drebrez 82e6775c1d Take kernel config from "startdir" when copying back to aport folder (#594) 2017-09-18 18:38:52 +00:00
Brian Otto 19531d518d Added a new option that allows you to increase the system image size for qemu (#568) 2017-09-15 15:41:40 +00:00
drebrez 207c200229 zap: add `-d`/`--distfiles` argument to clear downloaded files cache (#576) 2017-09-14 18:28:10 +00:00
zhuowei a5174d5a33 Fix #562: `zap -m` on Python 3.4 (#566)
os.scandir was introduced in Python 3.5.
2017-09-13 19:25:40 +00:00
drebrez a31cd0897b flasher flash_system: add possibility to select partition (#565)
Usage example:
pmbootstrap flasher flash_system --partition=userdata
2017-09-13 17:50:06 +00:00
Brian Otto 20abe8e8ca Fix #548: Allow package names that have a + (plus sign) or . (period) in them (#550) 2017-09-10 10:25:23 +00:00
drebrez e421313632 Add possibility to specify the system partition name for heimdall flashing method (#537)
Also added default values for the others heimdall partitions:
 kernel => KERNEL
 initfs => RECOVERY
 system => SYSTEM
2017-09-09 13:53:06 +00:00
Oliver Smith bed1eacbb5 Close #256: Implement strict package building mode (#532)
Contrary to abuild, pmbootstrap only installs makedepends, and
keeps the installed packages around - both hacks save lots of time.

However, they may introduce missing makedepends in the APKBUILDs,
that the authors of the APKBUILDs do not notice because it works
for them.

This PR adss a strict mode, which will always clean the chroots
before building a package, and also remove all installed dependencies
after the package was built. You can use the following syntax to
only zap once, but build many packages at once:
`pmbootstrap build --strict hello-world 0xffff heimdall`

It also builds dependencies properly without leaving makedepends
behind.
2017-09-08 23:50:59 +00:00
Oliver Smith f7fa7ae1a9 Fix #524: Init zapped the previous work contents (#530)
Also add more comments to the zap function.
2017-09-07 19:58:19 +00:00
Brian Otto 41d6a002dd Fix #501: Always load the loop module so losetup can access the img file (#528) 2017-09-07 17:07:52 +00:00
Oliver Smith b29cc877a7 Alias: "pmbootstrap export" for "pmbootstrap flasher export" (#417)
* moved export code to pmb/export and split it up
* added deprecation notice to "pmbootstrap flasher export"
* made "pmbootstrap export" work
* adjusted the "pmbootstrap flasher export" hints in the code
2017-09-06 20:14:03 +00:00
Pablo Castellano 188382e04c qemu: improve networking (#482)
* qemu: network improvements (fixes #433)
- Use hostfwd instead of -redir, which is deprecated
- qemu devices: add interfaces configuration and virtio_net module
- redirect telnet ports 23 and 24 (debug)

* Added 'interfaces' files
* qemu: added aarch64 network device
* qemu: use default_ip
2017-09-03 14:01:21 +00:00
Yuval Adam b6003a2815 Close #327: Add initial setup.py (#443) 2017-09-02 19:30:40 +00:00
Attila Szöllősi c6fe6e134a Flavor instead of device name when creating recovery zip (#491)
* Flavor instead of device name when creating recovery zip.
* Move parse_flavor_arg function
2017-09-02 03:53:58 +00:00
Oliver Smith db6491c679 Fix #475: Retry finding the install partitions (#479) 2017-08-30 18:58:51 +00:00
clayton craft a9e5b362dc Implement zapping of apk packages with ver different than aports (466) (#474)
This adds a new option to `zap`: `-m / --mismatch-bins`

When set, any binary apks in the work directory packages folder will be
removed if their version differs from the version in the relevant
APKBUILD in aports.
2017-08-28 20:34:03 +00:00
Oliver Smith 25bad18830 Close #296: Add wiki links to repository warnings (#473)
Also update one wiki link, that pointed to the old wiki.
2017-08-27 14:00:53 +00:00
clayton craft 3942a06a2d Add -y/--assume-yes option to install (#450) (#467) 2017-08-26 15:50:04 +00:00
Oliver Smith c33db6315e Fix #463: Ignore exit code from parted (#465)
Parted often succeeds, but then returns a non-zero exit code, because
it can not inform the kernel of the changes.
In most cases this is not even necessary, so it really should not
fail there.
When the error was fatal, pmbootstrap will crash shortly afterwards
when it tried to mount or run mkfs on the partition anyway.
2017-08-25 17:39:52 +00:00
Attila Szöllősi fbe968f1ab Recovery installer zip (#404)
Supports flashing with TWRP and other Android recovery OS through adb sideload,
as well as exporting a generated recovery zip file.
See also:
https://github.com/postmarketOS/pmbootstrap/wiki/deviceinfo_flash_methods#recovery-mode-adb
2017-08-24 21:07:36 +00:00
Pablo Castellano 3954883547 Write custom os-release (closes #324) (#439)
* Write custom os-release (closes #324)
* Return empty string instead of crashing when the directory is not a git repository
* Use https in homepage URL
2017-08-23 16:40:16 +00:00
indefini a0ba9895c3 If there is no resolv.conf, create an empty file. (#423) 2017-08-20 12:34:31 +00:00
Martijn Braam c536e4ea58 Add setting for device keymap for devices with keymaps (#379)
* Added rx51_us keymap to nokia n900
* Added keymap option to init
* Made install command run setup-keymap when neccesary
* Validate keymap on install
2017-08-19 21:40:20 +00:00
clayton craft 2d6f9befca Disable zap on init for new devices (#418)
The device chroot shouldn't exist yet anyways. Also add a 'device_exists'
variable that can be used to determine if the device entered earlier in
the init has a deviceinfo under aports/device/device-*
2017-08-19 16:04:53 +00:00
Oliver Smith c323f21ca5 (binary repo reated) Don't specify pkgnames from "provides" as dependencies (#416)
* Don't specify pkgnames from "provides" as dependencies

Always use the regular pkgname. That way, we avoid listing all
kinds of so: files as dependencies (because Alpine automatically
adds them as depends= to the package database). This fixes building
weston, and reproducing the build with `pmbootstrap challenge`.

Additional changes.
* Clear the parsed APKINDEX cache for the current pmbootstrap
  session after building a package
* Avoid rebuilding a package, in case it was already built due to
  circular dependencies
2017-08-19 12:52:11 +00:00
NotKit 689eb5c3c9 Fix APKBUILD attribute parsing when opening quote is followed by line break (#415)
his adds a check to continue attribute parsing when end_char is found
in the end of first line, but is present only once. Found in gtk+2.0 APKBUILD:
https://git.alpinelinux.org/cgit/aports/plain/main/gtk+2.0/APKBUILD
2017-08-19 01:15:28 +00:00
Oliver Smith 1c13ca4fd9 Fix #363: Omit /home/user when calculating system image size (#389)
* The system image size is now calculated as: root size - home size.
* New function in `pmb/helpers/other.py`: `folder_size()`, with a
  testcase.
* Instead of copying everything to the system image folder, and
  deleting the home folder afterwards, do not copy the home folder
  in the first place.
* Added `pmbootstrap -s` to skip generating the initramfs for faster
  debugging.
* Set the default value in the "are you sure, that your partition has
  at least..." to "y", so we can run `yes '' | pmbootstrap install`
  to make it run through the whole installation process.
* Increase full size to 120%, boot partition gets 15 MB free space now
2017-08-18 19:19:48 +00:00
clayton craft d0f09ca0d0 Resolve #361 by zapping existing chroots after init (#385)
This extends zap() to add a 'no_confirm' option (False by default), and
zap() is now called by init with no_confirm=True to automatically zap
any existing chroots after the user runs init. This helps insure that
what is installed in the chroots is exactly what the user expects after
setting options in init.

Additionally, we create `cache_http` to verify write access to the work
folder instead of `chroot_native`. So we can ask for zapping only if
no chroot folder exists.
2017-08-18 16:25:58 +00:00
Anton Lazarev fa3c21c1c3 Now with 100% more `pmbootstrap log`! (#406) 2017-08-17 23:27:06 +00:00
clayton craft 5144323137 Allow users to copy ssh pubkey to device (#387) 2017-08-16 17:30:38 +00:00
clayton craft 3800cd09f4 Do not modprobe loop if /dev/loop* exists (#391) 2017-08-15 18:10:04 +00:00
Oliver Smith ff9f2d620f Fix #271: properly resolve symlinks in all paths (#329)
I've replaced all instances in the code of `os.path.abspath`
with `os.path.realpath`, as this does the same as `abspath`
plus resolving symlinks.
See also: https://stackoverflow.com/a/40311142
2017-08-15 14:08:48 +00:00
drebrez a1370bafe1 Always use generated boot.img for `fastboot boot` command (#370) 2017-08-14 23:03:27 +00:00
Pablo Castellano 401c29af76 Close #326: Implement command to retrieve and set configuration values (#359)
* Implement command to retrieve and set configuration values
* qemu: show advice to use "pmbootstrap config"
* Allow "pmbootstrap config" without positional arguments (prints the full config)
* Check valid variable names
2017-08-14 14:25:28 +00:00
Oliver Smith c904ffc751 Make gcc-aarch64 reproducible (#366)
This fixes https://github.com/postmarketOS/binary-package-repo/issues/1

GCC generates hardlinks between files `A` and `B` in its `make install` step. The problem is, that `tar` randomly packages `A` as full binary, and links `B` to `A`, or the other way around! I was able to reproduce this issue consistently when re-building `gcc-aarch64` on Travis CI (interestingly, this did not appear for `gcc-armhf`).

The fix is, to delete `B` and create a symlink `B` that points to `A` instead.
2017-08-12 14:06:02 +00:00
Oliver Smith f3f21d3152 Fix #342: don't use distutils.version.LooseVersion anymore (#364)
Previously, distutils.version.LooseVersion was used, because it was
sort of close enough to how Alpine parses versions.

This new version uses the exact same algorithm, as `apk` does, and
it passes *all* of `apk`'s testcases for version checking (previously
we simply skipped the ones, that did not pass).

* Remove pmb/helpers/version.py left-over (it is in parse now)
* Make asserts consistent, do not use unnecessary parenthesis
2017-08-12 14:03:40 +00:00
Pablo Castellano 8d358837ee Minor fixes (#360)
* aports: Use $install variable inside $source

So these files also get fingerprinted

* qemu: Use shutil.which instead of pmb.helpers.run.user

* Fix typo in comment
2017-08-10 23:58:28 +00:00
Pablo Castellano 49b35ad32d Close #226: Launch postmarketOS in a qemu virtual machine (#350)
Thanks to Pablo Castellano and Martijn Braam!
In postmarketOS we are now able to generate system images with the
correct configuration so that they can boot already using qemu

This commit brings the `pmbootstrap qemu` action.
This command is very handy because you don't have to set all the
qemu parameters, pmbootstrap does it for you.

* device-qemu-vexpress: Added kernel command line according to wiki
* qemu: Added workaround for image writing permissions
* qemu: Added support to launch postmarketOS in a QEMU virtual machine

- Support for emulating these architectures in QEMU: arm, aarch64, x86_84
- Generate QEMU command correctly depending no guest architecture (arm/x86)
- Run QEMU in the same architecture as the host by default
- Refactoring in pmb.parse.arch and pmb.qemu.run
- Raise exception if DTB file or system image are not present
- Display more useful information when something fails (e.g. image not found)
- Run qemu version depending on arch (host or argument), not device configured

* device-qemu-amd64: set deviceinfo_kernel_cmdline to "PMOS_NO_OUTPUT_REDIRECT"
* qemu: added --memory argument to specific guest RAM
* device-qemu-amd64: adjusted deviceinfo_kernel_cmdline (console=tty1)
* Added /etc/network/interfaces for qemu-amd64
* qemu: Added KVM support if /dev/kvm if present
* Specify separate machines for architecture
* qemu: Check if QEMU is installed instead of crashing
* Added graphics driver to qemu-aarch64

- Use arm (as used in qemu) instead of armhf (used in Alpine)
- qemu argument is -dtb
- Follow same style to build the command + arguments

* qemu: Added SSH port redirection: ./pmbootstrap.py qemu -p 2222
2017-08-09 20:26:40 +00:00
drebrez 96cb52847d Increase minimal system image size by 15% to have some free space (#336) 2017-08-09 19:16:04 +00:00
Oliver Smith 21c09b3b3c Fix various build issues (fix #189, fix #341) (#345)
Changes:
* Removed the apkindex_files cache. That particular cache caused
  bug #189 and didn't bring any real-world performance improvements
  (tested 3x with that cache and 3x without, no significant speed
  difference). I decided to remove it instead of keeping it/adding
  even more code to resolve the bug.
* Fix the check for already built packages: always use the architecture,
  that the package should be built for instead of the architecture of
  the build environment (e.g. use armhf, even when building a noarch
  package in the x86_64 chroot). This partially resolves #341.
* Make pmb.chroot.apk.install_is_necessary() more robust: If the binary
  package is missing, although it should be there, print a warning and
  build it with force.
2017-08-09 17:59:21 +00:00
Oliver Smith ae64894278
Fix #349: Verify pkgname against folder name after replacing vars
This fixes a regression introduced in 7fe2bc18c3.
Sorry for the inconvenience!
2017-08-08 15:03:17 +02:00
Oliver Smith 7fe2bc18c3 Close #334: Check if pkgname is the aport folder name (#347)
...and remove an redundant sentence with broken grammar in another
error message.
2017-08-07 22:53:54 +00:00
drebrez 257666799e Add `-c, --clear` argument for `log` and `log_distccd` actions to clear log files (#344) 2017-08-07 18:56:35 +00:00
Pablo Castellano b41e75e662 Minor fixes (#316)
* Fixed typo and specify list order

* Simplify code for jobs default value
2017-08-06 12:50:38 +00:00
Oliver Smith 5eb9b92e7b Fix: gcc-armhf not reproducible (#64) (#333)
libstdc++.a from gcc-armhf was not reproducible on Travis (it was, when built locally!). These .a files are just archives of object files .o, and in this case it was caused by a random order of the .o files in the archive.

This PR patches the package() function of the APKBUILD when running pmbootstrap aportgen gcc-armhf (same for aarch64 of course), to extract all .a files, and repack them to be reproducible (by sorting the files before packing them).

As usually, we can still inherit everything from the upstream gcc aport from Alpine, and apply our changes on top of that.

Travis without the patch:
https://api.travis-ci.org/jobs/260402679/log.txt?deansi=true

> CHALLENGE FAILED for usr/armv6-alpine-linux-muslgnueabihf/lib/libstdc++.a:File 'usr/armv6-alpine-linux-muslgnueabihf/lib/libstdc++.a' is different!

Travis with the patch (I've instructed Travis to run off this branch to test it):
https://api.travis-ci.org/jobs/260806203/log.txt?deansi=true

> Done. Your build exited with 0.
2017-08-04 20:38:27 +00:00
Oliver Smith 742e4624e8 Fix #319: pmbootstrap menuconfig didn't work for mainline kernel (#328)
Also did some minor refactoring.
2017-08-03 16:11:23 +00:00
drebrez 147863d98a Automatically compute the minimum size for the partition and resize it during the boot process (#127)
* Automatically compute the minimum size for the partitions
* Automatically resize the pmOS_root partition during the boot process
* Resize root partition only if there is unallocated space at the end of the device.
* Added more echos to make debugging easier while looking at the pmOS_init.log.
* Updated static_code_analysis.sh script to run shellcheck with `-x` option.
2017-08-03 16:01:00 +00:00
Oliver Smith 025d646e47 Close #314: Add --details-to-stdout parameter (#317)
When this parameter is set, `args.logfd` (the log file descriptor)
gets set to `sys.stdout`, so all logging gets directly sent to the
active pmbootstrap session, and not to a log file.

This will be used for Travis jobs, because they get killed after
10 minutes without any output (and builds may take longer).
2017-08-02 19:38:42 +00:00
Pablo Castellano 0e4017105d Implement sparse system images (fix #299) (#303)
* Packaged libsparse

libsparse from the Android project provides multiple tools like img2simg
and simg2img.
These are used to split a large image for the system partition into
separate smaller chunks with sparse headers

This is required for several devices (at least bullhead, fp2 and titan)
because it fixes the "Invalid sparse file format at header magi" error

https://github.com/postmarketOS/pmbootstrap/issues/299

* Added new variable deviceinfo_flash_sparse (fixes #299)

Right after the system image is generated, pmbootstrap checks this
variable. In case it is true, run img2simg on it

* motorola-titan: enable deviceinfo_flash_sparse

* libsparse: use source from github: anestisb/android-simg2img

It is not that easy to use the upstream archive because everytime
you download it, the files have the current date as creation date
and that makes the file have a different checksum every download
https://github.com/postmarketOS/pmbootstrap/pull/303#issuecomment-319017197
2017-08-02 16:21:50 +00:00
Pablo Castellano 8389448bfd init: Allow to specify extra packages that will be always installed to rootfs (#304) 2017-08-01 15:31:33 +00:00
Oliver Smith fe385cad6d Fix #300: Properly unset environment in chroot (#302) 2017-07-30 22:08:36 +00:00
drebrez 6cb663eb6e Add possibility to export Odin flashable tar (#297)
Add possibility to export Odin flashable tar for devices where the
flasher method is heimdall-isorec or heimdall-bootimg
2017-07-30 21:15:59 +00:00
Pablo Castellano 915da12dd1 Allow 'pmbootstrap menuconfig' without specifying "linux-" (#295)
We can allow both ways:
* pmbootstrap menuconfig linux-motorola-titan
* pmbootstrap menuconfig motorola-titan

The former will show a tip about the second
This also prevents users from running menuconfig on aports like
'device-motorola-titan' or 'mkbootimg'
2017-07-30 18:41:49 +00:00
clayton craft ed8fba54c3 pmb.helpers.ui scan for UIs in new aport structure (#290)
This fixes #289.
2017-07-30 00:34:34 +02:00
Pablo Castellano 2cbf56a4c4 Usability improvements, fix #278 (#279)
* Quote architecture in logging message for easier reading
* Added shortcut arguments for --rootfs, --buildroot and --suffix
* Simply remove beforehand link to nowhere if exists (fix #278)
Fixed crash when symlink already existed but pointed to a non-existing location
2017-07-29 15:16:43 +00:00
Oliver Smith af007250d4
Bump pmbootstrap version to 0.2.0 2017-07-29 01:09:07 +02:00
Oliver Smith 314c17e03c Close #194: Aports subfolders! See migration guide in the wiki (#227)
Migration guide:
https://github.com/postmarketOS/pmbootstrap/wiki/Migration-to-aports-subfolders
2017-07-28 22:34:40 +00:00
Oliver Smith 8b17ac05ea
Fix #282: '/bin/ash': Permission denied
This was a regression from the improved input validation PR, which
created the chroot_native folder with the wrong permissions (to test
if we have write access to the work folder).

sjamaan found out, that this was the cause of the issue, and also
explained how to fix it, thanks a lot!
2017-07-28 22:15:51 +02:00
drebrez 7283f03315 Split up initramfs to make it smaller (Close #211) (#257)
Huge thank you to @drebrez for his amazing work on this PR!

* Add generation of initramfs-extra with additional binaries
Extract both initramfs with `pmbootstrap initfs extract`
Add new splashscreens for missing partitions/files errors
Changes in init script:
 - use busybox findfs applet to find boot partition
 - mount boot partion
 - extract initramfs-extra
 - show error splashscreens accordingly and loop forever
 - start usb unlock directly from unlock_root_partition (hook removed)

* Print out a text message for serial debugging in case of errors
Add initramfs-extra files to `pmbootstrap initfs ls` output

* Fix trailing whitespace in comment...

* ls: Indicate which initramfs we're looking at / add wiki link

I've rewritten the initramfs-development article to reflect the
changes made in this PR. It will be a good read for someone who
extracted the initramfs and wants to know why we have two files.
2017-07-28 18:51:21 +00:00
Oliver Smith 0ae6a150e8 Fix #269: Always use truncate to create empty image file (#276)
I've realized that truncate is provided by busybox anyway, so no
need to install coreutils for this.

This should fix creating system image files on ZFS, where fallocate
is not implemented.
2017-07-28 17:41:35 +00:00
Oliver Smith 67867a9c6e Fix #226: Building busybox recurses forever. (#252)
If you really want to build busybox, I recommend turning the
"timestamp based rebuilds" feature off, otherwise it will build
for all architectures all the time whenever you change something,
even if you do not increase the version number (that's the idea
of that feature). This is, because busybox is a dependency for
basiscally everything, so it must get updated whenever you install
something, in case it was out of date.

It is easier to simply rename the package.
2017-07-28 17:40:27 +00:00
Oliver Smith 10bf08dca1 Fix #166: pmbootstrap shutdown: umount deep folder levels first (#274)
* Refactored `umount_all` to get the list of folders to be umounted from
  `umount_all_list`, so we can test that function in a test case.
* Adjusted `umount_all_list` to return the deep folder levels first
* Added a testcase for that
* Remove redundant calls to `umount_all()` (which were from a time before
  `pmbootstrap` was released, in which failing commands did not cause
  `pmbootstrap` to raise an exception)
2017-07-27 18:14:02 +00:00
Martijn Braam 3be2fce72f Merge pull request #267 from postmarketOS/fix/242-validate-input
Fix #242: Validate input in pmb.helpers.cli
2017-07-27 20:08:26 +02:00
Oliver Smith 6a034f1409 Various improvements for 'pmbootstrap export' (Fix #232) (#250)
* Various improvements for 'pmbootstrap export' (Fix #232)
* Do not try to generate the system image, but print a notice that
  it was not generated yet
* Display export path
* New default path: /tmp/postmarketOS-export (instead of current
  working dir)
* Create the export folder, if it does not exist yet
* Prettier output in the export message
* Adjust export message in install for consistency
2017-07-27 17:40:38 +00:00
Oliver Smith a9a6302233
Minor spelling fixes 2017-07-27 19:33:23 +02:00
Oliver Smith 7e4024be97 Fix #260, fix #87: Don't cross-compile when not necessary (#265) 2017-07-26 19:01:44 +00:00
Oliver Smith 2cabe1d51a Low hanging fruit basket (Close #220, Close #239) (#253)
* postmarketos-splash: change arch from "all" to "noarch"
* lg-mako: use .tar.gz instead of .zip (because that's the reference
  APKBUILD)
* #220: Allow specifying multiple packages for checksum, build,
  aportgen
* #239: Add chroot shortcuts (--rootfs and --buildroot)
* Show chroot and command before entering chroot
2017-07-26 18:59:11 +00:00
Oliver Smith a49187c6e4
Fix #242: Validate input in pmb.helpers.cli
* Validate all inputs from `pmbootstrap init`
* Add a new `confirm()` function, that validates input of yes/no
  questions properly
* All questions loop until they have a valid answer now
2017-07-26 19:05:06 +02:00
Martijn Braam 21228a14d1 Unified linux-postmarketos kernel for qemu and n900 (#228)
The creates the linux-postmarketos package which for now supports the n900 (and probably the other maemo devices) and qemu with the vexpress-a9 machine simulation.

I've put the generated dtbs in /usr/share/dtb for now and set the dtb field in the deviceinfo for the n900 and my new qemu device.

* Introduced linux-postmarketos-omap
* Unified kernel progress
* Created kernel bootable with qemu
* Updated n900 deviceinfo for generic kernel
* Changed qemu device to vexpress
* Updated APK comments and added linux-postmarketos-dev package
* Append dtb in mkinitfs
* Fixed bootscript on n900 for the generic kernel
* Don't detect double flavors with -dtb appending
* Added graphics drivers for vexpress (qemu)
* Added more drivers for qemu

This adds virtio network support in qemu for the vexpress-a9 machine.
The keyboard and mouse don't work yet.
You can boot into weston if --no-fde is specified
2017-07-25 20:08:35 +00:00
Oliver Smith e94ed7b03d Close #212: Split heimdall in heimdall-isorec and heimdall-bootimg (#254) 2017-07-25 18:56:10 +00:00
clayton craft 924546135c De-couple weston from postmarketos-base (#233)
Thanks, craftyguy!

- UI is selectable with `pmbootstrap init`. Currently only 'weston' and 'none' are options. It'll automatically pick up any new `postmarketos-ui-*` packages added at later dates.
- splits off weston packages install from postmarketos-base and puts
them into postmarketos-ui-weston. Also note that NO weston packages are
installed by "pmbootstrap install" by default unless the user selects a ui in the `init`
- configuration of weston is now in postmarketos-ui-weston.
- the demos have been spun off to `postmarketos-demos`, and `postmarketos-ui-weston` lists this package as a dependency.
2017-07-24 20:55:55 +00:00
clayton craft fcf593531c Do not store aports directory in config file (#247)
This addresses #246 by not storing the aports directory in the config
file. The default location is still available (from config/__init__.py),
and can be overridden.
2017-07-24 18:47:11 +00:00
cmdr2 b687ca70d5 Update runtime error message thrown for grsec/hardened kernels (#236)
* Update runtime error message thrown for grsec/hardened kernels, saying that they are not supported right now, #107

* Remove unnecessary check for grsec enable/disable status - the build will not work in either case
2017-07-23 12:29:13 +00:00
cmdr2 2afe205243 Ignore directories while searching for loop devices (#235)
Thanks, cmdr2! Here's the text from his PR:

Fixes an issue on alpine-vanilla, where `/dev/loop` is a directory (containing `/dev/loop/0`, `/dev/loop/1` ..etc), and causes `./pmbootstrap install` to fail.

Ignoring the `/dev/loop` directory works because `/dev/` also contains files named `/dev/loop0`, `/dev/loop1` ..etc, which the new code will still pick up.

The `install` command passes after this fix on my alpine-vanilla.
2017-07-23 12:24:56 +00:00
Martijn Braam 14f164b8a2 Merge pull request #218 from postmarketOS/fix/162-install-no-args.add
Install: Small improvements (Fix #162, Close #215)
2017-07-23 12:08:56 +02:00
Oliver Smith 13166f0f79
Fix #230: pmbootstrap flasher flash_system is broken
Regression from the cmdline argument feature.
2017-07-23 00:17:01 +02:00
drebrez 0e5808bed1 Close #198: Add possibility to override the kernel commandline during boot (#217)
Usage example:
pmbootstrap flasher boot --cmdline "PMOS_NO_OUTPUT_REDIRECT"

Thanks, drebrez!
2017-07-22 21:16:51 +00:00
Oliver Smith 66cda810c1
Improve the FDE hint, you need to type in the password twice. 2017-07-22 12:49:43 +02:00
Oliver Smith 4786516a22
Fix #219 for real!
100% tested. Assuming that you don't need to test an obvious change,
because it only changes one line is dangerous. I will learn from this,
sorry for the inconvenience.

`gcc-armhf` compiles fine again with that change, and it is able to
cross-compile packages as it used to.
2017-07-22 12:36:00 +02:00
Oliver Smith c730326d3c Close #195: Ignore parameters in dependencies (#225)
* Ignore `>`, `<`, `=` and `!` operators, when they are specified in
  the dependencies. This was the desired behavior before, but it was
  not implemented correctly (so it wouldn't ignore them everywhere).
  Of course the real fix would be to honor these operators like apk
  does. But this isn't feasible right now, and it should work for
  most, if not all, our use-cases. I have documented this in the wiki
  under build internals and if we happen to need correct operator
  handling, we should do it then.

Minor other changes:
* `pmbootstrap parse_apkindex`: support optional package parameter to
  only show the parsed content for one package.
* Support building most python APKBUILDs by replacing ${pkgname#py-}
  properly
2017-07-22 09:54:49 +00:00
Oliver Smith 177f6ea592
Fix PEP8 syntax
Spaces around a plus sign.
2017-07-22 11:07:05 +02:00
Oliver Smith 9e5683f151
Fix #219: pmbootstrap could not find g++-armhf/g++-aarch64 2017-07-22 09:49:24 +02:00
Oliver Smith 223f584e26
pmbootstrap shutdown: Make cryptsetup closing slightly more robust
I've had a strange case where `cryptsetup status` did not work
inside the chroot anymore, and only zapping it would resolve it.
But I couldn't zap, because the status check was preventing shutdown
(on which zap depends) from working. This commit works around that.
2017-07-21 23:44:28 +02:00
Oliver Smith 77d7ed1679
Close #215: Write explicity what passwords are for in install 2017-07-21 21:14:16 +02:00
Oliver Smith 5651c28b41
Fix #162: flash_system: meaningful error for missing image 2017-07-21 20:26:56 +02:00
Oliver Smith 56b34212f6 Various distccd related improvements, mostly respect --verbose (#216)
I've done some refactoring while debugging #209.
* Unused file `pmb/build/crosscompiler.py` removed (that was a
  left over from `_pmb_build_in_native_chroot` hack
* Do verbose logging in distccd, when `pmbootstrap --verbose` is
  being invoked
* Restart distccd, when the commandline has changed (e.g. when the
  currently running version was not verbose, and the new one is
  verbose.) Prior to this change, it only got restarted, when the
  architecture changed (so it did not allow changing the job count
  on the fly for example).
* Insert missing whitespace in arguments help.
2017-07-21 16:25:52 +00:00
Oliver Smith cf0dc2a989
Fix #209: Cross-compiling fails with C++ code 2017-07-21 17:21:32 +02:00
Oliver Smith 9677d89f84 Fix #145: add deviceinfo_flash_offset_base again (#175)
* Fix #145: add deviceinfo_flash_offset_base again

* Add default OFFSET_BASE value in flasher if deviceinfo_flash_offset_base variable is not set
...and set correct default base value in create_bootimg function
2017-07-19 20:44:12 +00:00
Oliver Smith ca5b8e3367
Fix #200: Parse depends_dev in APKBUILDs 2017-07-19 21:24:03 +02:00
Pablo Castellano 6be7d656ee Two trivial changes (typo + info message) (#179)
Thanks, Pablo Castellano!

* Fixed typo

* Guide user about what are the next steps after flashing kernel and password

* Increased postmarketos-mkinitfs' pkgver and rewording

Changes requested:
https://github.com/postmarketOS/pmbootstrap/pull/179
2017-07-19 18:05:34 +00:00
Oliver Smith 1aae094b50 Close #174: Put frontend functions in extra file (#185) 2017-07-18 19:01:11 +00:00
Clayton Craft 3ca54dc87b [RX51] Export u-boot kernel image with flasher
This properly exports the uImage kernel, which is used by u-boot, when
running 'flasher export'. Note the change to the uImage name to follow
the pattern "uImage-$flavor", which in the case of the RX 51 is
"uImage-nokia-rx51".
2017-07-17 12:14:05 -07:00
Oliver Smith ec57bd7df1 Merge pull request #144 from postmarketOS/heimdall-partitions-in-deviceinfo
Close #22: deviceinfo: add heimdall partitions / make flasher variables optional
2017-07-14 20:48:38 +00:00
Oliver Smith 69bb66cbd4
Challenge APK files: less output by default 2017-07-14 19:32:57 +02:00
Oliver Smith 50d23e2fd5
Fix #194: ismount() fails on symlinks 2017-07-14 07:05:45 +02:00
Oliver Smith 63aa1eae1b
AutoPEP8 1.3.2 slightly changed automatic formatting 2017-07-14 07:00:07 +02:00
Oliver Smith f37367c57c
Properly support specifying a local folder as --mirror-pmOS
This is required for developing and testing the binary repository
scripts (see #64). Changes:
* When specified, the local folder gets mounted inside the chroots
  as /mnt/postmarketos-mirror
* The apkindex_files() function outputs the correct path to the local
  repository (it does *not* hash the URL in that case, which would
  be wrong)
* /etc/apk/repositories: when the pmOS mirror is a local folder,
  the path "/mnt/postmarketos-mirror" gets added to that file instead
  of the outside path (so apk finds it properly inside the chroot)
2017-07-12 21:55:47 +02:00
Oliver Smith 8e3e296cbd
Depends parsing: Properly handle empty depends / buildinfo: strict depends 2017-07-12 21:01:40 +02:00
Oliver Smith 4f4588405f
Properly update /etc/apk/repositories when the mirrors change
This is important for the binary repository scripts, so it's feasible
to test the binary package build and challenge process locally without
setting up a new chroot whenever changing the repo URLs.

Also it behaves a bit more intuitively, because it really uses the
repo URL specified on the commandline, even when the chroot is already
set up.
2017-07-11 19:19:39 +02:00
Oliver Smith 34622368d9
Fix #107: Grsec check: read file in /proc as root 2017-07-11 18:50:40 +02:00
Oliver Smith d0ffe4879d
Challenge APKINDEX.tar.gz: allow .diff.md files in the repository 2017-07-11 18:39:28 +02:00
Oliver Smith c3a4446166
Challenge APKINDEX.tar.gz: add logging 2017-07-11 18:26:22 +02:00
Oliver Smith efab009a1f
deviceinfo: add heimdall partitions / make flasher variables optional 2017-07-10 20:27:06 +02:00
Oliver Smith 51bdc24315 Properly rebuild/install packages when something changed (Fix #120, #108, #131) (#129)
TLDR: Always rebuild/install packages when something changed when executing "pmbootstrap install/initfs/flash", more speed in dependency resolution.
---
pmbootstrap has already gotten some support for "timestamp based rebuilds", which modifies the logic for when packages should be rebuilt. It doesn't only consider packages outdated with old pkgver/pkgrel combinations, but also packages, where a source file has a newer timestamp, than the built package has.

I've found out, that this can lead to more rebuilds than expected. For example, when you check out the pmbootstrap git repository again into another folder, although you have already built packages. Then all files have the timestamp of the checkout, and the packages will appear to be outdated. While this is not largely a concern now, this will become a problem once we have a binary package repository, because then the packages from the binary repo will always seem to be outdated, if you just freshly checked out the repository.

To combat this, git gets asked if the files from the aport we're looking at are in sync with upstream, or not. Only when the files are not in sync with upstream and the timestamps of the sources are newer, a rebuild gets triggered from now on.

In case this logic should fail, I've added an option during "pmbootstrap init" where you can enable or disable the "timestamp based rebuilds" option.

In addition to that, this commit also works on fixing #120: packages do not get updated in "pmbootstrap install" after they have been rebuilt. For this to work, we specify all packages explicitly for abuild, instead of letting abuild do the resolving. This feature will also work with the "timestamp based rebuilds".

This commit also fixes the working_dir argument in pmb.helpers.run.user, which was simply ignored before.

Finally, the performance of the dependency resolution is faster again (when compared to the current version in master), because the parsed apkbuilds and finding the aport by pkgname gets cached during one pmbootstrap call (in args.cache, which also makes it easy to put fake data there in testcases).

The new dependency resolution code can output lots of verbose messages for debugging by specifying the `-v` parameter. The meaning of that changed, it used to output the file names where log messages come from, but no one seemed to use that anyway.
2017-07-10 15:23:43 +00:00
Oliver Smith 05e79c1d5c
Fix #107: Meaningful error for grsecurity/chroot_deny_chmod 2017-07-06 21:16:00 +02:00
Oliver Smith 6b08d31652 Merge pull request #136 from postmarketOS/build-all-kernels-natively
[i9070][i9100] Build kernels natively
2017-07-06 16:03:48 +00:00
Oliver Smith 5cd07c44fb
Display device count in 'pmbootstrap init' 2017-07-05 18:49:52 +02:00
Oliver Smith dede11657d
Get rid of the _pmb_build_in_native_chroot hack 2017-07-05 18:40:00 +02:00
Oliver Smith 4fd1420f09
Add 'pmbootstrap aportgen busybox-static-armhf' (and other archs) 2017-07-05 18:20:13 +02:00
Oliver Smith 9d9dc9e541 Merge pull request #134 from postmarketOS/fix-missing-flavor-variable
Added flavor to the flash_system command for consistency
2017-07-05 14:19:31 +00:00
Martijn Braam 4cdf51f94e Changed flasher.run()s flavor to an optional argument 2017-07-05 14:01:54 +02:00
Martijn Braam d16c90b39c Added flavor to the flash_system command for consistency, This fixes issue #133 2017-07-05 13:39:50 +02:00
Martijn Braam 2518627579 Fixed typo in new boot.img flasher 2017-07-05 00:48:19 +02:00
Oliver Smith 866333ef6c
Close #77: Implement 'pmbootstrap flasher export' 2017-07-04 23:03:51 +02:00
Oliver Smith 615880e161
pmbootstrap flasher: use boot.img file with fastboot 2017-07-04 22:47:03 +02:00
Pablo Castellano ba744abae0 Show path to boot.img and description of commands after pmbootstrap install
This change got lost in this PR merge:
https://github.com/postmarketOS/pmbootstrap/pull/125
2017-07-03 23:49:05 +02:00
Oliver Smith 4573863561
Rename args.no_fde to args.full_disk_encryption 2017-06-28 17:22:48 +02:00
Oliver Smith 86cb9f5ec8
Merge branch 'optional_full_disk_encryption' of https://github.com/PabloCastellano/pmbootstrap into optional-fde 2017-06-28 17:16:56 +02:00
Oliver Smith 28a0e10e56
pmb.chroot.apk.installed(): use apk's internal database
...instead of running apk every time to get the list of installed
packages and their versions. The internal package database from
apk has the same format, as the extracted APKINDEX file (except
that it has more key-value pairs, which we ignore/do not need
right now). So the APKINDEX code has been extended to parse both
tar-packed APKINDEX files and regular text files in the APKINDEX
format.

This is required for #108, for a better detection of outdated
packages (because the internal package database  saves the
package's timestamp, too). A nice benefit is, that this is faster
than calling apk every time and it doesn't fill up the log as much.

I've also used this improved function for determining the apk
version (for the outdated version check), and I've deleted
pmb.parse.other.package_split(), as it is not needed anymore.
2017-06-27 17:56:15 +02:00
Oliver Smith 19b93c2d04
Prepare for aarch64 host support, fix typo in arch mapping
Relates to #106.
2017-06-27 00:28:11 +02:00
Oliver Smith fcc5501a44
Slightly improve error handling
* Fix: Do not swallow traces when crashing before log init (e.g.
  during argument parsing)
* Show a link to the troubleshooting page, when an error happens
* (Formatting done by autopep8 in pmb/config/init.py)
2017-06-27 00:23:21 +02:00
Pablo Castellano 7e79d20a0b aportgen: Added end of file newline 2017-06-25 21:40:49 +02:00
Clayton Craft da9af8ee87 Support relative path for initializing config
Previously, if you passed something like ~/build to the init function
for work directory, it would create a directory, .\~/ in the current
working directory instead of resolving ~/ to the user's home directory.
This allow allows using ../ to specify a path.
2017-06-25 18:53:47 +00:00
Oliver Smith fb1e8ec73b
Update min apk version/add more apk version checks
* Minimum version: 2.7.2 (which fixes two CVEs)
* Check the minimum apk version before doing something with apk and
  before entering the chroot manually (previously, it has just checked
  the apk-tools-static version, which gets used to set up the chroot)
* Reword the message for an outdated APK version. Most likely it is
  just the outdated http cache, instead of a man-in-the-middle attack.

See also:
b849b481a0
2017-06-23 17:04:49 +02:00
Pablo Castellano 920d4c8198 Mount unencrypted root partition (close #86)
- Do not decrypt if not necessary
- Do not launch telnetd if partition is unencrypted
- Basic initramfs logging to /tmp/boot.log
2017-06-22 20:14:38 +02:00
Pablo Castellano efab93e4d0 Use variable in format.py and add labels to partitions 2017-06-22 19:58:28 +02:00
Pablo Castellano d4719f41c9 Added --no-fde parameter 2017-06-22 19:58:28 +02:00
Oliver Smith ed4275dd9b
Add support for the binary repository, inactive by default (#64)
* New commandline parameter --mirror-pmOS, where the binary repository
  URL for postmarketOS can be specified (empty by default as of now,
  this will be filled with the real URL once the repo works)
* Do not build packages, when they are in the binary repository and
  the version of the package in the binary repository is up-to-date.
* Add a testcase for pmb.build.is_necessary().
2017-06-20 20:13:05 +02:00
Oliver Smith 187bae1d1b
Fix commandline help wording 2017-06-20 19:12:41 +02:00
Oliver Smith 6751b2e8cb
Close #94: Always rebuild apks when aports change
...even if the pkgver and pkgrel have *not* changed. This should
make development much more intuitive. The detection works by looking
at the last modified timestamps, just like `make` does it.
2017-06-19 20:33:56 +02:00
Oliver Smith 328bed4ba2
Add testcases for pmbootstrap challenge.
* pmb/challenge/apk.py had to be renamed to pmb/challenge/apk_file.py,
  so the "internal" functions of that file could be accessed, while
  still providing the short notation pmb.challenge.apk().
* zap asks for each buildroot_* chroot, if you want to remove it, not
  only for the one with the device arch
* add new pmb.chroot.tempfolder() function, that creates a temporary
  folder, that belongs to "user" and deletes it, if it already exists.
  this function gets used in a few challenge testcases.
2017-06-19 20:07:51 +02:00
Oliver Smith e4df6c5d22
Fix #96: Check if build is necessary is broken.
When an APKINDEX contained a package with multiple versions,
pmbootstrap did not use the last version to determine if the
package is out of date (regression from af8c9fcf5b).
2017-06-18 22:15:36 +02:00
Oliver Smith 748bd43620
Implement challenge for APKINDEX.tar.gz (part of #64) 2017-06-18 01:45:41 +02:00
Oliver Smith ce147b0381
pmb.parse.apkindex.parse(): Use caching
Big speed improvement for buildinfo.json files, down from 30-60s to 1-5s.
2017-06-18 01:09:21 +02:00
Oliver Smith af8c9fcf5b
Rewrite pmb.parse.apkindex(): Can get the full index as dict now
Previously, it was only possible to get information about one
package inside the APKINDEX at a time.
This is needed for #64 to verify the APKINDEX.

Please note, that this implementation is actually slower, than
the previous one. But the code is more readable and it makes
caching possible (which will speed up the APKINDEX massively,
especially for the buildinfo.json file generation!)
2017-06-18 00:46:14 +02:00
Oliver Smith 112dc5e70c
Move challenge code to own folder (#64)
...and add a stub for 'pmbootstrap challenge APKINDEX.tar.gz'.
2017-06-17 17:42:28 +02:00
Oliver Smith 05c837c921
pmbootstrap challenge: Put buildinfo.json in changed files list.
...and some smaller fixes:
* make the diff output easier to read
* verify, that only .apk, .buildinfo.json and the APKINDEX have
  changed inside the local repository folder. Because the file
  names of these changes will be used to release files from
  staging to release.
2017-06-17 01:58:40 +02:00
Oliver Smith a1298cb114
Challenge/buildinfo: slightly improve output
Use "arch" instead of "carch", print "OK!" when a file has been verified
(which is much easier to recognize than "File has the same content").
2017-06-15 22:40:19 +02:00
Oliver Smith c250d65a9f
pmbootstrap challenge: Allow the signature filename to be different.
Also verify, that each apk contains exactly one signature file (a
file, that starts with .SIGN.RSA.).
2017-06-15 22:28:39 +02:00
Oliver Smith 906bda0e18
pmb.build.is_necessary(): Add optional apkindex_path parameter
This is necessary for pmbuilder (the componenet, that creates packages
in the upcoming binary package repository)
2017-06-15 19:53:48 +02:00
Oliver Smith 55e276053a
Meaningful error in aportgen musl*, when aports repo is outdated 2017-06-15 03:05:04 +02:00
Oliver Smith a9e28c9b8b
Fix #89: Meaningful error message for missing arch in APKBUILD
The following message will be printed out now, in case you attempt
to build a package for an architecture, that is not specified in
the "arch=..." line inside the APKBUILD:

ERROR: Architecture 'aarch64' is not supported for this package.
Please add it to the 'arch=' line inside the APKBUILD and try again:
/path/to/APKBUILD
2017-06-15 02:44:43 +02:00
Oliver Smith 1adeee70b6
Fix #90: noarch: create symlinks for all supported architectures
* The supported architectures are inside the config now
* Symlinks get created for that list of supported architectures now.
* During initialization, the architecture from the selected device
  gets checked against the list of supported architectures. When
  it is not included, a meaningful exception gets raised.
* the aportgen and (cross-compiler) build tests make use of the
  new variable now (they had armhf and aarch64 hardcoded previously).
2017-06-15 02:26:32 +02:00
Oliver Smith 90c3a67329
Fix syntax issues / unused import reported by static code analysis 2017-06-14 20:12:47 +02:00
Oliver Smith c0f90ee65a
pmb/helpers/repo.py: Diff ofthe package repo works properly now.
Previously, it would always report all files as new files, although
some of them may not have changed. I've added testcases for the
repo functions.
2017-06-14 19:48:23 +02:00
Oliver Smith 7543ae540b
Official support for aarch64 (#84)
* Fix hardcoded `armhf` in pmb/aportgen/binutils.py
* Generate aports: `binutils-aarch64`, `musl-aarch64`, `gcc-aarch64`
* Distccd: Remember the cross-compiler architecture (currently armhf
  or aarch64), that the current distccd is running as, and restart
  distccd with the correct architecture, in case a different arch
  is needed than what it is currently running as. (Depending on the
  cross-compiler arch, the PATH variable gets adjusted before
  starting distccd)
* Testcases: add aport generation for aarch64, add cross-compiling
  to aarch64
* pmb/parse/arch.py: Add aarch64 to the mapping
2017-06-14 19:10:21 +02:00
Oliver Smith 1274b8c26b
pmbootstrap challenge: subpackages, list of changed files
* Two new functions for getting a list of files and their timestamps
  in the repo, and diffing that information to get a list of changed
  files: pmb.helpers.repo.files() and pmb.helpers.repo.diff().
  (I've put it in the helpers folder, because it is not specific to
  one chroot, but to all chroots at once.)
* pmbootstrap challenge (new command introduced a few commits back to
  verify, that the contents of an APK file are deterministic) uses
  these functions to a) support subpackages and b) optionally
  output a list of changed files (this gets used in the pmbuilder
  script, which lives outside of this repository).

This commit is progress for #64 again.
2017-06-13 21:31:19 +02:00
Oliver Smith 6cbac208ba
Fix #83: Properly handle left over files when closing the cryptsetup device 2017-06-13 01:34:20 +02:00
Oliver Smith 7c0c813610
pmbootstrap challenge: Fix location of the "package_split()" function 2017-06-11 15:14:26 +02:00
Oliver Smith 5f747bedcd
pmb.build.is_necessary(): Remove unused 'suffix' parameter 2017-06-11 14:45:00 +02:00
Oliver Smith 3a3dd8063f
Merge branch 'lazy-reproducible-builds'
We have "lazy reproducible builds" now. What I mean by that is, that
the resulting "apk" archive is not fully reproducible, but all binaries
inside it are. This is necessary to kick-off the binary repo, which is
in turn required to get the testsuite going on Travis. Read #64 for more
information.

Usage:
```
pmbootstrap build hello-world --buildinfo
pmbootstrap challenge /tmp/path/to/hello-world-1-r2.apk
```

The "--buildinfo" parameter generates a "buildinfo.json", which contains
the versions of all dependencies. It is not very optimizied, so this
is a performance bottleneck and takes 10 seconds (which is quite much
considering that the hello-world package builds in less than a second).
This can be improved in the future, and then the buildinfo parameter
may become the default.
2017-06-11 14:19:57 +02:00
Oliver Smith 6999e6ea47
Fix #40: allow sdcard install, when the sdcard is mounted as /dev/sd* 2017-06-10 00:29:48 +02:00
Oliver Smith afa42ce0a3
pmbootstrap initfs: Make wording in --help more consistent 2017-06-09 19:49:01 +02:00
Oliver Smith 18339d0a14
Close #69: add 'pmbootstrap initfs' and improve initfs workflow
* allows to build/extract/list initramfs, add/del hook
* rebuild the initfs whenever running install or trying to flash/boot it
* flasher flash/boot: automatically set up a minimal rootfs with kernel and initfs,
  if it does not exist yet
2017-06-09 19:22:25 +02:00
Oliver Smith 32ad868cdc
apk.installed(): Retuns all packages and versions now
pmb.chroot.apk.installed() used to return only the explicitly installed
packages. This is not good enough for the initfs check functions (and
especially for the "lazy reproducible builds", from which branch this
commit was cherry picked).

This commit introduces more noise for the logfile - if this becomes
a problem, raise your voice in the issues tracker and we'll do something
about it.

(This commit also changes minor code styling in other files, I did
not run autopep8 last time, because flake8 didn't complain...)
2017-06-09 18:01:39 +02:00
Oliver Smith e55347315d
pmbootstrap index: Automatically set up abuild 2017-06-08 18:19:17 +02:00
Oliver Smith 50195a6af2
pmbootstrap log: Add a -n/--lines parameter (like tail has)
...also increase the default line count to 30, so it's easier to
spot an error if you didn't have the log open when it happened.

This parameter also works for 'pmbootstrap log_distccd', for consistency.
2017-06-08 18:15:38 +02:00
Oliver Smith 9515782f8d
Fix 67: New '--add' parameter for 'pmbootstrap install' to add custom packages.
Example usage:

./pmbootstrap install --add='vim,gcc'
2017-06-08 18:10:00 +02:00
Oliver Smith 5016c196ba
Fix two typos in the config 2017-06-08 18:02:00 +02:00
Oliver Smith f1ab344f09
Fix #68: properly update the device chroot in the install step
* build all dependencies, that have a newer version
* upgrade all packages inside the chroot
2017-06-08 17:54:53 +02:00
Oliver Smith 31b276eeb9
WIP #64: make gcc-armhf lazy-reproducible, properly compare symlinks 2017-06-06 22:21:59 +02:00
Oliver Smith 36527e548e
Fix #61: Check whether device nodes exist, after they have been created.
As reported in #53, it appears that older versions of eCryptfs don't
really create the device nodes, although `mknod` does not fail on
the commandline. That's fixed now with this extra check.
2017-06-06 16:36:57 +02:00
Oliver Smith eac1b69f0e
Fix #44: Do not clean up /home/build after successful build
This adjusts the /etc/abuild.conf automatically during build init.
Zap your build chroots now, to benefit from this commit.
2017-06-06 16:26:44 +02:00
Oliver Smith 63ac1f5f6c
WIP #64: "lazy reproducible builds" 2017-06-05 03:58:45 +02:00
Pablo Castellano 42473c89d6 Changed sha512 to sha256 to avoid "file name too long" error (issue #51) 2017-06-04 17:00:02 +02:00
Oliver Smith 64521b1435
Make static code analysis go through again 2017-06-04 04:27:49 +02:00
Oliver Smith 9d4bc61545
Fix #47: Support /dev/sd* as sdcard device
* The check for valid sdcard paths has been removed (because it
  doesn't make sense for /dev/sd*, this might as well be a real
  harddrive)
* New check: abort if any partition of the sdcard is mounted
* Automatically detect if the partitions are called "p1", "p2" etc.
  or just "1", "2" etc. (/dev/sda1 vs. /dev/mmcblk0p1)
* pmb.helpers.mount.ismount(): check the source (new) and the target
  path in /proc/mounts
2017-06-04 02:57:37 +02:00
Oliver Smith 42a8990594
Fix #28: fall back to truncate, when fallocate does not work 2017-06-02 23:00:52 +02:00
Oliver Smith 1cc0704bc0
Revert "Process stdout and stderr from subprocesses separately"
This reverts commit 04aabd7d70.

I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.
2017-06-02 21:36:12 +02:00
Oliver Smith 9d8fd984a0
Revert "Log exit codes to log file"
This reverts commit 2a39d9c091.

I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.
2017-06-02 21:36:03 +02:00
Oliver Smith 1b6f1d86ef
Revert "Removed debugging code"
This reverts commit c15bf48f77.

I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.
2017-06-02 21:35:40 +02:00
Oliver Smith 7d6365b473
Revert "Fixed menuconfig with new async runner"
I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.

This reverts commit f39c1dae69.
2017-06-02 21:33:29 +02:00
Martijn Braam f39c1dae69 Fixed menuconfig with new async runner 2017-06-02 15:19:08 +02:00
Martijn Braam c15bf48f77 Removed debugging code 2017-06-01 19:15:49 +02:00
Martijn Braam 2a39d9c091 Log exit codes to log file 2017-06-01 14:07:08 +02:00
Martijn Braam 04aabd7d70 Process stdout and stderr from subprocesses separately 2017-06-01 14:00:18 +02:00
Oliver Smith 9e9c5907ec
Make it easier to find the output of failed commands in the log
...by adding a ^^^^^^^^... line right below the failed command's output.
2017-05-31 18:30:00 +02:00
Oliver Smith 8a40c245da
Fix #19: gcc-armhf didn't compile anymore 2017-05-31 18:18:45 +02:00
Oliver Smith 3b5d5d8086
Debian Jessie/Python 3.4 support for the most part (#6)
* automatically find the chroot binary on Debian, even if it is not
  in the user's PATH
* don't use subprocess.run anymore (remove related testcase, that explicitly
  checked for subprocess.run usage, and used recursive globbing, another
  post 3.4 Python feature, for the checks. A similar case can be added in the
  future, but right now it's more important to get Debian 3.4 working and all
  PRs are reviewed anyway.)
* pytest fixtures: don't use the newer "yield" feature, as this is only
  supported in a newer version of pytest, than provided on Debian Jessie

From manually testing, most stuff works in Debian Jessie. However, the
testsuite does not run through - creating an empty .tar.gz with Python
fails for some reason (this is done in test_apk_static.py).
2017-05-29 20:38:11 +02:00
Samuel Dionne-Riel 41177a25de Fixes workdir lowercasing.
The `cli.ask` command would forcibly lowercase the whole string. This
made the script unusable on a non-FHS-compliant system, like mine, where
the users's directories are under `/Users/`.
2017-05-28 14:27:48 -04:00
Oliver Smith 15a495b7e2
Fix #5: proper error message, when chroot binary is not in PATH 2017-05-28 17:49:45 +02:00
Oliver Smith 75641f5fc7
Set up static code analysis, fix style issues reported by flake8 2017-05-28 02:44:53 +02:00
Oliver Smith 247a79a1ba
Fix #1: copying user's abuild keys failed 2017-05-27 15:38:04 +02:00
Oliver Smith bf387f0ef8
Add missing "build" folder (was gitignored before) 2017-05-26 22:35:21 +02:00
Oliver Smith ed9fc7f8b2
Put postmarketOS aports inside pmbootstrap repo
Later, the aports folder will probably get split up in its own repository.
But right now this is simply convenient.
2017-05-26 22:26:25 +02:00
Oliver Smith ae950fb9f7
Hello, there! 2017-05-26 22:08:45 +02:00