|
|
@@ -74,7 +74,7 @@ if [ $ARCH = "amd64" -a $SUITE = "hardy" ]; then |
|
|
|
FLAVOUR=server |
|
|
|
fi |
|
|
|
|
|
|
|
addpkg=pciutils,build-essential,git-core,subversion |
|
|
|
addpkg=pciutils,build-essential,git-core,subversion,language-pack-en |
|
|
|
|
|
|
|
if [ $LXC = "1" ]; then |
|
|
|
addpkg=$addpkg,lxc |
|
|
@@ -108,37 +108,33 @@ fi |
|
|
|
if [ $LXC = "1" ]; then |
|
|
|
if [ -e $OUT ]; then |
|
|
|
echo $OUT already exists, please remove it first |
|
|
|
#exit 1 |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
sudo rm -rf $OUT-bootstrap |
|
|
|
# Need universe for lxc in lucid |
|
|
|
env -i LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 sudo debootstrap --arch=$ARCH --include=$addpkg --exclude=$removepkg --components=main,universe $SUITE $OUT-bootstrap $MIRROR |
|
|
|
dd if=/dev/zero of=$OUT-lxc bs=1M count=1 seek=10240 |
|
|
|
mkfs.ext4 -F $OUT-lxc |
|
|
|
t=`mktemp -d gitian.XXXXXXXX` |
|
|
|
sudo mount $OUT-lxc $t |
|
|
|
sudo cp -a $OUT-bootstrap/* $t |
|
|
|
sudo umount $t |
|
|
|
rmdir $t |
|
|
|
|
|
|
|
sudo rm -rf $OUT-bootstrap |
|
|
|
mv $OUT-lxc $OUT |
|
|
|
# bootstrap-fixup is done in libexec/make-clean-vm |
|
|
|
else |
|
|
|
if [ -e $OUT.qcow2 ]; then |
|
|
|
echo $OUT.qcow2 already exists, please remove it first |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
if [ $LXC = "1" ]; then |
|
|
|
sudo rm -rf $OUT-bootstrap |
|
|
|
# Need universe for lxc in lucid |
|
|
|
env -i LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 sudo debootstrap --arch=$ARCH --include=$addpkg --exclude=$removepkg --components=main,universe $SUITE $OUT-bootstrap $MIRROR |
|
|
|
dd if=/dev/zero of=$OUT-lxc bs=1M count=1 seek=10240 |
|
|
|
mkfs.ext4 $OUT-lxc |
|
|
|
t=`mktemp -d gitian.XXXXXXXX` |
|
|
|
sudo mount $OUT-lxc $t |
|
|
|
sudo cp -a $OUT-bootstrap/* $t |
|
|
|
sudo umount $t |
|
|
|
rmdir $t |
|
|
|
|
|
|
|
sudo rm -rf $OUT-bootstrap |
|
|
|
mv $OUT-lxc $OUT |
|
|
|
# bootstrap-fixup is done in libexec/make-clean-vm |
|
|
|
else |
|
|
|
libexec/config-bootstrap-fixup |
|
|
|
libexec/config-bootstrap-fixup |
|
|
|
|
|
|
|
rm -rf $OUT |
|
|
|
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 |
|
|
|
rm -rf $OUT |
|
|
|
# bootstrap-fixup is done on first boot |
|
|
|
rm -rf $OUT |
|
|
|
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 |
|
|
|
rm -rf $OUT |
|
|
|
# bootstrap-fixup is done on first boot |
|
|
|
fi |
|
|
|
|