From 9f80ef7c72f069da4e8080f87fb57cd2d78e0a65 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 21 Nov 2007 09:31:37 +0000 Subject: [PATCH] naming .lst files after pldistro - including the -filesystems directory --- bootstrapfs.spec | 4 ++-- build.sh | 20 +++++++++++-------- base.lst => planetlab-base.lst | 0 .../production.lst | 0 4 files changed, 14 insertions(+), 10 deletions(-) rename base.lst => planetlab-base.lst (100%) rename {bootstrap-filesystems => planetlab-filesystems}/production.lst (100%) diff --git a/bootstrapfs.spec b/bootstrapfs.spec index 51c084b..0283ee0 100644 --- a/bootstrapfs.spec +++ b/bootstrapfs.spec @@ -31,7 +31,7 @@ BootManager to instantiate a node with a new filesystem. %build pushd BootstrapFS -./build.sh +./build.sh %{pldistro} popd BootstrapFS %install @@ -44,7 +44,7 @@ install -D -m 644 PlanetLab-Bootstrap.tar.bz2 \ for bootstrapfs in $(ls bootstrap-filesystems/*.lst) ; do NAME=$(basename $bootstrapfs .lst) - install -D -m 644 bootstrap-filesystems/PlanetLab-Bootstrap-${NAME}.tar.bz2 \ + install -D -m 644 %{pldistro}-filesystems/PlanetLab-Bootstrap-${NAME}.tar.bz2 \ $RPM_BUILD_ROOT/var/www/html/boot/PlanetLab-Bootstrap-${NAME}.tar.bz2 done diff --git a/build.sh b/build.sh index 4ccb8f3..8537636 100755 --- a/build.sh +++ b/build.sh @@ -31,6 +31,10 @@ pl_process_fedora_options $@ shiftcount=$? shift $shiftcount +# pldistro expected as $1 - defaults to planetlab +pldistro=planetlab +[ -n "$@" ] && pldistro=$1 + # Do not tolerate errors set -e @@ -42,11 +46,11 @@ export PL_BOOTCD=1 # "Parse" out the packages and groups into the options passed to mkfedora # -k = exclude kernel* packages options="-k" -lst="base.lst" -packages=$(pl_getPackages $lst) -groups=$(pl_getGroups $lst) -for package in ${packages} ; do options="$options -p $package"; done -for group in ${groups} ; do options="$options -g $group"; done +lst="${pldistro}-base.lst" +popts=$(pl_getPackagesOptions2 ${pl_DISTRO_NAME} $lst) +gopts=$(pl_getGroupsOptions2 ${pl_DISTRO_NAME} $lst) + +options="${popts} ${gopts}" echo "+++++++++++++OPTIONS = ${options}" @@ -55,7 +59,7 @@ vref=${PWD}/base install -d -m 755 ${vref} pl_mkfedora ${vref} ${options} -for lst in bootstrap-filesystems/*.lst ; do +for lst in ${pldistro}-filesystems/*.lst ; do NAME=$(basename $lst .lst) echo "--------START BUILDING PlanetLab-Bootstrap-${NAME}: $(date)" @@ -65,7 +69,7 @@ for lst in bootstrap-filesystems/*.lst ; do groups=$(pl_getGroups $lst) echo "${NAME} has the following packages and groups: ${packages} ${groups}" - vdir=${PWD}/bootstrap-filesystems/${NAME} + vdir=${PWD}/${pldistro}-filesystems/${NAME} rm -rf ${vdir}/* install -d -m 755 ${vdir} @@ -111,7 +115,7 @@ for lst in bootstrap-filesystems/*.lst ; do mv ${vdir}-tmp ${vdir} echo "--------STARTING tar'ing PlanetLab-Bootstrap-${NAME}.tar.bz2: $(date)" - tar -cpjf bootstrap-filesystems/PlanetLab-Bootstrap-${NAME}.tar.bz2 -C ${vdir} . + tar -cpjf ${pldistro}-filesystems/PlanetLab-Bootstrap-${NAME}.tar.bz2 -C ${vdir} . echo "--------FINISHED tar'ing PlanetLab-Bootstrap-${NAME}.tar.bz2: $(date)" echo "--------DONE BUILDING PlanetLab-Bootstrap-${NAME}: $(date)" done diff --git a/base.lst b/planetlab-base.lst similarity index 100% rename from base.lst rename to planetlab-base.lst diff --git a/bootstrap-filesystems/production.lst b/planetlab-filesystems/production.lst similarity index 100% rename from bootstrap-filesystems/production.lst rename to planetlab-filesystems/production.lst -- 2.43.0