update gitian version and patch, fix make vms
This commit is contained in:
parent
9c1b649eb4
commit
1415b9208f
@ -55,7 +55,7 @@ COPY bash_profile /home/debian/.bash_profile
|
|||||||
## script used to build base VMs
|
## script used to build base VMs
|
||||||
COPY bin/build-base-vms.sh /home/debian/
|
COPY bin/build-base-vms.sh /home/debian/
|
||||||
|
|
||||||
RUN git clone https://github.com/devrandom/gitian-builder.git && cd gitian-builder && git checkout 2bcc06e6b75b3f7a0167cde7237331757dd559c6
|
RUN git clone https://github.com/devrandom/gitian-builder.git && cd gitian-builder && git checkout ad3f9cc4c2c8c0899961a366f5b9fbd1483b0ee3
|
||||||
|
|
||||||
COPY gitian.patch /home/debian/
|
COPY gitian.patch /home/debian/
|
||||||
|
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
diff --git a/bin/make-base-vm b/bin/make-base-vm
|
diff --git a/bin/make-base-vm b/bin/make-base-vm
|
||||||
index d82b3d6..a5935fb 100755
|
index a7c182b..8dc4091 100755
|
||||||
--- a/bin/make-base-vm
|
--- a/bin/make-base-vm
|
||||||
+++ b/bin/make-base-vm
|
+++ b/bin/make-base-vm
|
||||||
@@ -109,16 +109,3 @@ rm -rf $OUT
|
@@ -227,5 +227,17 @@ else
|
||||||
env -i LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 sudo vmbuilder kvm ubuntu --rootsize 10240 --arch=$ARCH --suite=$SUITE --addpkg=$addpkg --removepkg=$removepkg --ssh-key=var/id_dsa.pub --ssh-user-key=var/id_dsa.pub --mirror=$MIRROR --security-mirror=$SECURITY_MIRROR --dest=$OUT --flavour=$FLAVOUR --firstboot=`pwd`/target-bin/bootstrap-fixup
|
mv $OUT/*.qcow2 $OUT.qcow2
|
||||||
mv $OUT/*.qcow2 $OUT.qcow2
|
rm -rf $OUT
|
||||||
rm -rf $OUT
|
# bootstrap-fixup is done on first boot
|
||||||
-
|
+
|
||||||
-if [ $LXC = "1" ]; then
|
+ if [ $LXC = "1" ]; then
|
||||||
- #sudo debootstrap --include=$addpkg --arch=$ARCH $SUITE $OUT-root $MIRROR
|
+ #sudo debootstrap --include=$addpkg --arch=$ARCH $SUITE $OUT-root $MIRROR
|
||||||
- echo Extracting partition for lxc
|
+ echo Extracting partition for lxc
|
||||||
- qemu-img convert $OUT.qcow2 $OUT.raw
|
+ qemu-img convert $OUT.qcow2 $OUT.raw
|
||||||
- loop=`sudo kpartx -av $OUT.raw|sed -n '/loop.p1/{s/.*loop\(.\)p1.*/\1/;p}'`
|
+ 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 cp --sparse=always /dev/mapper/loop${loop}p1 $OUT
|
||||||
- sudo chown $USER $OUT
|
+ sudo chown $USER $OUT
|
||||||
- sudo kpartx -d /dev/loop$loop
|
+ sudo kpartx -d /dev/loop$loop
|
||||||
- rm -f $OUT.raw
|
+ rm -f $OUT.raw
|
||||||
- # bootstrap-fixup is done in libexec/make-clean-vm
|
+ # bootstrap-fixup is done in libexec/make-clean-vm
|
||||||
-fi
|
+ fi
|
||||||
-
|
fi
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ fi
|
|||||||
##NOTE: can leave behind a running container of gitian-host
|
##NOTE: can leave behind a running container of gitian-host
|
||||||
docker build --tag=gdm85/gitian-host . && \
|
docker build --tag=gdm85/gitian-host . && \
|
||||||
CID=$(docker run -d --privileged gdm85/gitian-host) && \
|
CID=$(docker run -d --privileged gdm85/gitian-host) && \
|
||||||
IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CID) && \
|
IP=$(docker exec $CID cat /etc/hosts | tail -n1 | awk '{ print $1 }') && \
|
||||||
wait_for_ssh "$IP" 10 && \
|
wait_for_ssh "$IP" 10 && \
|
||||||
echo "$CID is now online ($IP), building base VMs on it" && \
|
echo "$CID is now online ($IP), building base VMs on it" && \
|
||||||
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no debian@$IP bash -c 'cd /home/debian && source ./.bash_profile && ./build-base-vms.sh amd64' && \
|
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no debian@$IP bash -c 'cd /home/debian && source ./.bash_profile && ./build-base-vms.sh amd64' && \
|
||||||
|
Loading…
Reference in New Issue
Block a user