pmbootstrap/pmb/build
Oliver Smith 4844719b1d pmb: adjust to distcc 3.3 and wrap it with sshd
Overview:
Since Alpine updated to distcc 3.3 last week, pmbootstrap wasn't able to use
distcc for cross compilation anymore. It always falled back to running the
compiler in QEMU (which works, but is a lot slower). The reason for that is,
that distcc requires all compilers that are being used in a whitelist now.

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

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

Details:
* Completely refactored `pmb/chroot/distccd.py` to run distcc over ssh
  * Store the running distcc server's arguments as JSON now, not as INI
* Make debugging distcc issues easy:
  * Set DISTCC_BACKOFF_PERIOD=0, so the distcc client will not ignore the
    server after errors happened (this masks the original error!)
  * New pmbootstrap parameters:
    * `--distcc-nofallback`: avoids falling back to compiling with QEMU and not
	   throwing an error
	* `--ccache-disable`: avoid ccache (when the compiler output is cached,
	  distcc does not get used)
  * `--verbose` prints verbose output of the distcc too
  * New test case, that uses the new pmbootstrap parameters to force
	compilation through distcc, and shows the output of distcc and distccd in
	verbose mode on error (as well as the log of sshd)
2018-07-26 09:47:23 +00:00
..
__init__.py Wrap Alpine's newapkbuild (#894) 2018-01-15 22:00:11 +00:00
_package.py pmb: adjust to distcc 3.3 and wrap it with sshd 2018-07-26 09:47:23 +00:00
autodetect.py Always prefer native/device arch when building (#1277) 2018-03-01 20:04:51 +00:00
checksum.py Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
init.py Don't uninstall depends when build --strict fails 2018-07-25 19:52:46 +00:00
menuconfig.py pmb: fix kconfig edit 2018-07-25 00:46:22 +02:00
newapkbuild.py pmbootstrap newapkbuild: Properly parse arguments (#1320) 2018-03-15 21:42:34 +00:00
other.py pmbootstrap: kill process if silent for 5 minutes (rewrite logging) 2018-07-14 01:13:28 +00:00
qemu_workaround_aarch64.py Remove github.com references 2018-06-30 09:00:48 +02:00