tenku/docker/gitian-host/gitian.patch

23 lines
737 B
Diff

diff --git a/bin/make-base-vm b/bin/make-base-vm
index a7c182b..8dc4091 100755
--- a/bin/make-base-vm
+++ b/bin/make-base-vm
@@ -227,5 +227,17 @@ else
mv $OUT/*.qcow2 $OUT.qcow2
rm -rf $OUT
# bootstrap-fixup is done on first boot
+
+ if [ $LXC = "1" ]; then
+ #sudo debootstrap --include=$addpkg --arch=$ARCH $SUITE $OUT-root $MIRROR
+ echo Extracting partition for lxc
+ qemu-img convert $OUT.qcow2 $OUT.raw
+ loop=`sudo kpartx -av $OUT.raw|sed -n '/loop.p1/{s/.*loop\(.\)p1.*/\1/;p}'`
+ sudo cp --sparse=always /dev/mapper/loop${loop}p1 $OUT
+ sudo chown $USER $OUT
+ sudo kpartx -d /dev/loop$loop
+ rm -f $OUT.raw
+ # bootstrap-fixup is done in libexec/make-clean-vm
+ fi
fi