[obs-commits] [openSUSE/obs-build] d1e027: Fix support for building inside LXC containers.
Branch: refs/heads/master Home: https://github.com/openSUSE/obs-build Commit: d1e02793051c728d0263511601200485f15423fc https://github.com/openSUSE/obs-build/commit/d1e02793051c728d026351160120048... Author: Oleg Girko <ol@infoserver.lv> Date: 2015-03-09 (Mon, 09 Mar 2015) Changed paths: M build M build-vm-lxc M lxc.conf Log Message: ----------- Fix support for building inside LXC containers. This change adds proper support for building inside lightweight LXC containers, improving security without using heavyweight virtual machine. Now LXC container is properly created on startup and destroyed on cleanup. No need to destroy container when killing build process, cleanup is following anyway. Now LXC container has its private rootfs distinct from buld root. Build root is bind mounted on LXC container's rootfs inside container's namespace during container startup (and unmounted automatically when build inside container finished). This is needed to prevent destruction of build root by lxc-destroy which removes container's rootfs recursively. Logging has been fixed for LXC. LXC is a special case because virtualised process shares its build root and log file with host system, so a check has been added to prevent re-creating log file by second stage. Also, LXC container had to be specially configured to log its console output to stdout of lxc-start process. Also, container name is now prefixed with "obsbuild:" to prevent name clashes with other LXC containers on the same host. Signed-off-by: Oleg Girko <ol@infoserver.lv>
participants (1)
-
GitHub