2013-01-25 08:07:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-02-16 16:17:42 +00:00
|
|
|
echo "Mounting archlinux install system into mnt_archlinux_dvd..."
|
|
|
|
sudo mount $CACHEDIR/root-image.fs mnt_archlinux_dvd
|
2013-01-25 08:07:01 +00:00
|
|
|
|
2013-02-08 14:32:38 +00:00
|
|
|
echo "--> Installing make dependencies..."
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c 'pacman -S --asdeps --needed --noconfirm binutils yajl gcc make'
|
2013-01-25 08:07:01 +00:00
|
|
|
|
2013-02-08 14:32:38 +00:00
|
|
|
#echo "--> Installing yaourt..."
|
2013-02-16 16:17:42 +00:00
|
|
|
#sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c 'cd tmp && wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz && tar xzvf package-query.tar.gz && cd package-query && makepkg --asroot && pacman --noconfirm -U package-query-*.pkg.tar.xz'
|
|
|
|
#sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c 'cd tmp && wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz && tar xzvf yaourt.tar.gz && cd yaourt && makepkg --asroot && pacman --noconfirm -U yaourt-*.pkg.tar.xz'
|
2013-01-25 08:07:01 +00:00
|
|
|
|
|
|
|
echo "--> Preparing build environment inside the chroot..."
|
|
|
|
# Notes for qubes-vm-xen
|
|
|
|
# Note: we need more ram for /tmp (at least 700M of disk space for compiling XEN because of the sources...)
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo sed 's:-t tmpfs -o mode=1777,strictatime,nodev,:-t tmpfs -o size=700M,mode=1777,strictatime,nodev,:' -i ./mnt_archlinux_dvd/usr/bin/arch-chroot
|
2013-02-08 14:32:38 +00:00
|
|
|
sudo cp ./scripts_archlinux/build_package.sh $INSTALLDIR/etc/
|
|
|
|
sudo cp ./scripts_archlinux/CF8D4BBE.pub $INSTALLDIR/etc/
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "gpg --import /etc/CF8D4BBE.pub"
|
2013-01-25 08:07:01 +00:00
|
|
|
|
|
|
|
# Note: Enable x86 repos
|
|
|
|
su -c "echo '[multilib]' >> $INSTALLDIR/etc/pacman.conf"
|
|
|
|
su -c "echo 'SigLevel = PackageRequired' >> $INSTALLDIR/etc/pacman.conf"
|
|
|
|
su -c "echo 'Include = /etc/pacman.d/mirrorlist' >> $INSTALLDIR/etc/pacman.conf"
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -Sy"
|
2013-01-25 08:07:01 +00:00
|
|
|
|
|
|
|
echo "--> Compiling and installing qubes-packages..."
|
2013-02-08 14:32:38 +00:00
|
|
|
sudo cp ./scripts_archlinux/qubes-vm-xen.tar.gz.sig $INSTALLDIR/etc/package.sig
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-xen
|
2013-02-08 14:32:38 +00:00
|
|
|
sudo cp ./scripts_archlinux/qubes-vm-core.tar.gz.sig $INSTALLDIR/etc/package.sig
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-core
|
2013-02-08 14:32:38 +00:00
|
|
|
sudo cp ./scripts_archlinux/qubes-vm-gui.tar.gz.sig $INSTALLDIR/etc/package.sig
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-gui
|
2013-02-08 14:32:38 +00:00
|
|
|
sudo cp ./scripts_archlinux/qubes-vm-kernel-modules.tar.gz.sig $INSTALLDIR/etc/package.sig
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-kernel-modules
|
2013-02-08 14:32:38 +00:00
|
|
|
|
|
|
|
echo "--> Updating template fstab file..."
|
|
|
|
sudo su -c "echo '/dev/mapper/dmroot / ext4 defaults,noatime 1 1' >> $INSTALLDIR/etc/fstab"
|
|
|
|
sudo su -c "echo '/dev/xvdb /rw ext4 defaults,noatime 1 2' >> $INSTALLDIR/etc/fstab"
|
|
|
|
sudo su -c "echo '/dev/xvdc1 swap swap defaults 0 0' >> $INSTALLDIR/etc/fstab"
|
|
|
|
sudo su -c "echo '/rw/home /home none noauto,bind,defaults 0 0' >> $INSTALLDIR/etc/fstab"
|
|
|
|
sudo su -c "echo '/dev/xvdd /usr/lib/modules ext3 defaults,noatime 0 0' >> $INSTALLDIR/etc/fstab"
|
2013-01-25 08:07:01 +00:00
|
|
|
|
2013-02-16 16:17:42 +00:00
|
|
|
sudo umount mnt_archlinux_dvd
|