2013-01-25 08:06:20 +00:00
|
|
|
#!/bin/sh
|
2015-02-14 17:45:00 +00:00
|
|
|
|
2013-01-25 08:06:20 +00:00
|
|
|
echo "--> Preparing environment..."
|
2013-02-16 21:48:39 +00:00
|
|
|
mount -t proc proc $PWD/mnt/proc
|
2013-01-25 08:06:20 +00:00
|
|
|
|
2014-05-21 16:58:58 +00:00
|
|
|
trap "umount $PWD/mnt/proc" EXIT
|
|
|
|
|
|
|
|
export YUM0=$PWD/yum_repo_qubes
|
2014-05-13 02:49:13 +00:00
|
|
|
if [ "$TEMPLATE_FLAVOR" == "minimal" ]; then
|
2014-05-21 17:23:36 +00:00
|
|
|
YUM_OPTS="$YUM_OPTS --setopt=group_package_types=mandatory"
|
|
|
|
rpmbuild -bb --define "_rpmdir $CACHEDIR" $SCRIPTSDIR/qubes-template-minimal-stub.spec || exit 1
|
|
|
|
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt $CACHEDIR/*/qubes-template-minimal-stub*rpm || exit 1
|
|
|
|
else
|
|
|
|
YUM_OPTS="$YUM_OPTS --setopt=group_package_types=mandatory,default,optional"
|
2014-05-13 02:49:13 +00:00
|
|
|
fi
|
|
|
|
|
2013-01-25 08:06:20 +00:00
|
|
|
echo "--> Installing RPMs..."
|
2013-12-13 03:29:29 +00:00
|
|
|
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt @qubes-vm || RETCODE=1
|
2013-01-25 08:06:20 +00:00
|
|
|
|
2014-03-21 02:26:21 +00:00
|
|
|
rpm --root=$PWD/mnt --import $PWD/mnt/etc/pki/rpm-gpg/RPM-GPG-KEY-qubes-*
|
|
|
|
|
2014-05-13 02:49:13 +00:00
|
|
|
if [ "$TEMPLATE_FLAVOR" != "minimal" ]; then
|
|
|
|
echo "--> Installing 3rd party apps"
|
|
|
|
$SCRIPTSDIR/add_3rd_party_software.sh || RETCODE=1
|
|
|
|
fi
|
2013-01-25 08:06:20 +00:00
|
|
|
|
2015-02-14 17:45:00 +00:00
|
|
|
# Distribution specific steps
|
|
|
|
source ./functions.sh
|
|
|
|
buildStep "${0}" "${DIST}"
|
|
|
|
|
2013-12-13 03:29:29 +00:00
|
|
|
exit $RETCODE
|