libdevuansdk

common library for devuan's simple distro kits
git clone https://git.parazyd.org/libdevuansdk
Log | Files | Refs | Submodules | README | LICENSE

commit 4e7a9971cf2d2a536a8f3230e4083615fd4ba293
parent 084f7a8f70f816ff53c6d8922a35e75e147a336a
Author: parazyd <parazyd@dyne.org>
Date:   Thu,  9 Jun 2016 16:59:18 +0200

add option to install qemu, fix bootstrap mount calls

Diffstat:
Mlibdevuansdk | 2+-
Mzlibs/debootstrap | 7++++---
Mzlibs/helpers | 10++++++++++
3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/libdevuansdk b/libdevuansdk @@ -24,7 +24,7 @@ devuan_sdk_version=0.1 setopt pushdsilent -export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" +# export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" SDK_PREFIX=`pwd` SDK_HOME=`pwd` diff --git a/zlibs/debootstrap b/zlibs/debootstrap @@ -43,6 +43,8 @@ bootstrap() { # Debootstrap stage 1 sudo debootstrap --foreign --arch ${arch} ${release} ${strapdir} ${mirror} + install-qemu + # Debootstrap stage 2 sudo chroot ${strapdir} /debootstrap/debootstrap --second-stage @@ -66,12 +68,12 @@ bootstrap() { export LC_ALL=C export DEBIAN_FRONTEND=noninteractive - mountdevproc ${strapdir} + mountdevprocsys ${strapdir} sudo chroot ${strapdir} /thirdstage.sh sudo chroot ${strapdir} /cleanup.sh - umountdevproc ${strapdir} + umountdevprocsys ${strapdir} bootstrap_tar_pack fi @@ -88,7 +90,6 @@ rm -f /thirdstage.sh rm -f /etc/ssh/*key rm -f /etc/ssh/*.pub rm -f /root/.bash_history -rm -f /usr/bin/qemu* # our file for which we check the bootstrap is complete echo "1" > .done EOF diff --git a/zlibs/helpers b/zlibs/helpers @@ -37,6 +37,16 @@ escalate() { fi } +install-qemu() { + fn install-qemu + + [[ -n $enable_qemu ]] && { + sudo cp $qemu_bin $strapdir/usr/bin/ + act "installed qemu-user-static" + } + return 0 +} + findloopmapp() { fn findloopmapp req=(imgpath imgname workdir)