Easy switch of base distro for template ($DIST env var)

This commit is contained in:
Marek Marczykowski 2011-09-24 11:58:14 +02:00
parent 44a9f5a1d5
commit 179c658348
11 changed files with 16 additions and 7 deletions

1
base_rpms Symbolic link
View File

@ -0,0 +1 @@
base_rpms_fc14

View File

@ -3,15 +3,17 @@
SRC_ROOT=../..
[ -n "$1" ] && SRC_ROOT=$1
: DIST=fc14
rm -fr rpms_to_install/*
VERSION_CORE=$(cat version_core)
VERSION_CORE=$(cat version_core | sed "s/DIST/$DIST/")
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-appvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-appvm
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-appvm-libs-$VERSION_CORE.rpm rpms_to_install/qubes-core-appvm-libs
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-commonvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-commonvm
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-netvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-netvm
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-proxyvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-proxyvm
VERSION_GUI=$(cat version_gui)
VERSION_GUI=$(cat version_gui | sed "s/DIST/$DIST/")
ln -s $SRC_ROOT/gui/rpm/x86_64/qubes-gui-vm-$VERSION_GUI.rpm rpms_to_install/qubes-gui-vm
VERSION_XEN=$(cat version_xen)

View File

@ -3,6 +3,8 @@
IMG=$1
PKGLISTFILE=$2
: ${DIST=fc14}
if ! [ $# -eq 2 ]; then
echo "usage $0 <img_file_name> <package_list>"
exit
@ -15,6 +17,11 @@ if [ -f $IMG ]; then
INSTALLDIR=`pwd`/mnt/
else
echo "-> Preparing instalation of $DIST template..."
rm -f keys base_rpms
ln -sf keys_$DIST keys
ln -sf base_rpms_$DIST base_rpms
echo "-> Initializing empty image..."
truncate -s 10G $IMG || exit 1
@ -31,9 +38,7 @@ else
rpm --import --root=$INSTALLDIR keys/*
echo "-> Installing core RPM packages..."
rpm -i --root=$INSTALLDIR base_rpms/setup-*.rpm
rpm -i --root=$INSTALLDIR base_rpms/filesystem-*.rpm
rpm -i --root=$INSTALLDIR base_rpms/fedora-release-*.rpm
rpm -i --root=$INSTALLDIR base_rpms/*.rpm
cp clean_images/network $INSTALLDIR/etc/sysconfig
cp clean_images/resolv.conf $INSTALLDIR/etc

1
keys Symbolic link
View File

@ -0,0 +1 @@
keys_fc14

View File

@ -1 +1 @@
1.6.29-1.fc14.x86_64
1.6.29-1.DIST.x86_64

View File

@ -1 +1 @@
1.3.6-1.fc14.x86_64
1.3.6-1.DIST.x86_64