X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=ce7e399e07d933799ddf3eb9721bb020c5425611;hb=befac29d132ef957e2d564a6ace7ff0b0bb2b597;hp=8165fa58116f55add910137d553553711dffb319;hpb=c5588c0570a80bcc238e6a98f765a4e32c363a36;p=bootstrapfs.git diff --git a/build.sh b/build.sh index 8165fa5..ce7e399 100755 --- a/build.sh +++ b/build.sh @@ -42,21 +42,15 @@ export PL_BOOTCD=1 # "Parse" out the packages and groups into the options passed to mkfedora # -k = exclude kernel* packages options="-k" -packages=$(grep "^package:.*" base.lst | awk '{print $2}') -groups=$(grep "^group:.*" base.lst | awk '{print $2}') +packages=$(pl_getPackages base.lst) +groups=$(pl_getGroups base.lst) for package in ${packages} ; do options="$options -p $package"; done for group in ${groups} ; do options="$options -g $group"; done # Populate a minimal /dev and then the files for the base PlanetLab-Bootstrap content vref=${PWD}/base install -d -m 755 ${vref} -pl_makedevs ${vref} -pl_setup_chroot ${vref} -k ${options} - -# Build the base Bootstrap filesystem -echo "--------STARTING tar'ing PlanetLab-Bootstrap.tar.bz2: $(date)" -tar -cpjf PlanetLab-Bootstrap.tar.bz2 -C ${vref} . -echo "--------FINISHED tar'ing PlanetLab-Bootstrap.tar.bz2: $(date)" +pl_mkfedora ${vref} ${options} for bootstrapfs in bootstrap-filesystems/*.lst ; do NAME=$(basename $bootstrapfs .lst) @@ -64,8 +58,8 @@ for bootstrapfs in bootstrap-filesystems/*.lst ; do echo "--------START BUILDING PlanetLab-Bootstrap-${NAME}: $(date)" # "Parse" out the packages and groups for yum - packages=$(grep "^package:.*" $bootstrapfs | awk '{print $2}') - groups=$(grep "^group:.*" $bootstrapfs | awk '{print $2}') + packages=$(pl_getPackages $bootstrapfs) + groups=$(pl_getGroups $bootstrapfs) vdir=${PWD}/bootstrap-filesystems/${NAME} rm -rf ${vdir}/* @@ -112,4 +106,11 @@ for bootstrapfs in bootstrap-filesystems/*.lst ; do echo "--------DONE BUILDING PlanetLab-Bootstrap-${NAME}: $(date)" done +# Build the base Bootstrap filesystem +echo "--------STARTING tar'ing PlanetLab-Bootstrap.tar.bz2: $(date)" +# clean out yum cache to reduce space requirements +yum -c ${vref}/etc/yum.conf --installroot=${vdir} -y clean all +tar -cpjf PlanetLab-Bootstrap.tar.bz2 -C ${vref} . +echo "--------FINISHED tar'ing PlanetLab-Bootstrap.tar.bz2: $(date)" + exit 0