From a126af685777c37f12863d44a162a237a7d70cdf Mon Sep 17 00:00:00 2001 From: Olivier Medoc Date: Thu, 18 Apr 2013 18:34:39 +0200 Subject: [PATCH] archlinux: use package built by qubes-builder --- scripts_archlinux/04_install_qubes.sh | 45 +++++++++++++-------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/scripts_archlinux/04_install_qubes.sh b/scripts_archlinux/04_install_qubes.sh index 6933c90..28d2fc2 100755 --- a/scripts_archlinux/04_install_qubes.sh +++ b/scripts_archlinux/04_install_qubes.sh @@ -3,36 +3,31 @@ echo "Mounting archlinux install system into mnt_archlinux_dvd..." sudo mount $CACHEDIR/root-image.fs mnt_archlinux_dvd -echo "--> Installing make dependencies..." -sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c 'pacman -S --asdeps --needed --noconfirm binutils yajl gcc make' - -#echo "--> Installing yaourt..." -#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' - -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...) -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 -sudo cp ./scripts_archlinux/build_package.sh $INSTALLDIR/etc/ -sudo cp ./scripts_archlinux/CF8D4BBE.pub $INSTALLDIR/etc/ -sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "gpg --import /etc/CF8D4BBE.pub" - # 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" + +echo "--> Registering Qubes custom repository" + +sudo tee -a $INSTALLDIR/etc/pacman.conf < Compiling and installing qubes-packages..." -sudo cp ./scripts_archlinux/qubes-vm-xen.tar.gz.sig $INSTALLDIR/etc/package.sig -sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-xen -sudo cp ./scripts_archlinux/qubes-vm-core.tar.gz.sig $INSTALLDIR/etc/package.sig -sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-core -sudo cp ./scripts_archlinux/qubes-vm-gui.tar.gz.sig $INSTALLDIR/etc/package.sig -sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-gui -sudo cp ./scripts_archlinux/qubes-vm-kernel-modules.tar.gz.sig $INSTALLDIR/etc/package.sig -sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR bash /etc/build_package.sh qubes-vm-kernel-modules +echo "--> Installing qubes-packages..." +sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -S --noconfirm qubes-vm-xen" +sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -S --noconfirm qubes-vm-core" +sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -S --noconfirm qubes-vm-gui" echo "--> Updating template fstab file..." sudo su -c "echo '/dev/mapper/dmroot / ext4 defaults,noatime 1 1' >> $INSTALLDIR/etc/fstab" @@ -41,4 +36,6 @@ 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" +echo "--> Cleaning up..." +sudo umount $INSTALLDIR/mnt/qubes-rpms-mirror-repo sudo umount mnt_archlinux_dvd