diff --git a/scripts_fc17/00_prepare.sh b/scripts_fc17/00_prepare.sh new file mode 100755 index 0000000..a6634bd --- /dev/null +++ b/scripts_fc17/00_prepare.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +rm -f keys base_rpms +ln -sf keys_$DIST keys +ln -sf base_rpms_$DIST base_rpms diff --git a/scripts_fc17/01_install_core.sh b/scripts_fc17/01_install_core.sh new file mode 100755 index 0000000..a42d30a --- /dev/null +++ b/scripts_fc17/01_install_core.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +echo "-> Initializing RPM database..." +rpm --initdb --root=$INSTALLDIR +rpm --import --root=$INSTALLDIR keys/* + +echo "-> Installing core RPM packages..." +rpm -i --root=$INSTALLDIR base_rpms/*.rpm || exit 1 + +cp scripts_"${DIST}"/resolv.conf $INSTALLDIR/etc +cp scripts_"${DIST}"/network $INSTALLDIR/etc/sysconfig +cp -a /dev/null /dev/zero /dev/random /dev/urandom $INSTALLDIR/dev/ diff --git a/scripts_fc17/02_install_groups.sh b/scripts_fc17/02_install_groups.sh new file mode 100755 index 0000000..86ceade --- /dev/null +++ b/scripts_fc17/02_install_groups.sh @@ -0,0 +1,10 @@ +#!/bin/sh +echo "--> Preparing environment..." +mount -t proc proc mnt/proc + +export YUM0=$PWD/yum_repo_qubes +yum clean all -c $PWD/yum.conf $YUM_OPTS -y --installroot=$PWD/mnt +yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR $PKGGROUPS || RETCODE=1 +yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1 + +umount mnt/proc mnt diff --git a/scripts_fc17/04_install_qubes.sh b/scripts_fc17/04_install_qubes.sh new file mode 100755 index 0000000..2cba51b --- /dev/null +++ b/scripts_fc17/04_install_qubes.sh @@ -0,0 +1,12 @@ +#!/bin/sh +echo "--> Preparing environment..." +mount -t proc proc $PWD/proc + +echo "--> Installing RPMs..." +export YUM0=$PWD/yum_repo_qubes +yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt @qubes-vm + +echo "--> Installing 3rd party apps" +./add_3rd_party_software.sh + +sudo umount $PWD/proc diff --git a/scripts_fc17/09_cleanup.sh b/scripts_fc17/09_cleanup.sh new file mode 100755 index 0000000..bf60eec --- /dev/null +++ b/scripts_fc17/09_cleanup.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +rm -f $INSTALLDIR/var/lib/rpm/__db.00* $INSTALLDIR/var/lib/rpm/.rpm.lock +yum -c $PWD/yum.conf $YUM_OPTS clean packages --installroot=$INSTALLDIR + +# Make sure that rpm database has right format (for rpm version in template, not host) +echo "--> Rebuilding rpm database..." +chroot `pwd`/mnt /bin/rpm --rebuilddb 2> /dev/null