now lives in the BootstrapFS package.
* Modified the InstallBootstrapRPM.py to download the following:
- base bootstrapfs tar ball -> PlanetLab-Bootstrap.tar.bz2
- node group specific tar ball -> PlanetLab-Bootstrap-$nodegroup.tar.bz2
* Removed some of the empty directories under the support-files/ directory.
%build
pushd BootManager
-
./build.sh
-pushd support-files
-./buildnode.sh -r $([ -f "/etc/fedora-release" ] && awk ' { if ($2=="Core") print $4; else print $3 } ' /etc/fedora-release || echo 4)
-popd
-
popd
%install
find build.sh source | cpio -p -d -u $RPM_BUILD_ROOT/%{_datadir}/%{name}/
install -D -m 755 bootmanager.sh $RPM_BUILD_ROOT/var/www/html/boot/bootmanager.sh
-for file in \
- uudecode.gz \
- PlanetLab-Bootstrap.tar.bz2 ; do
- install -D -m 644 support-files/$file $RPM_BUILD_ROOT/var/www/html/boot/$file
-done
+
+# This is only required for 2.x bootcds.
+install -D -m 644 support-files/uudecode.gz $RPM_BUILD_ROOT/var/www/html/boot/uudecode.gz
popd
%changelog
* Fri Sep 2 2005 Mark Huang <mlhuang@cotton.CS.Princeton.EDU> -
- Initial build.
-
#!/bin/bash
#
-# Builds bootmanager.sh[.sgn], the PlanetLab Boot Manager script, and
-# PlanetLab-Bootstrap.tar.bz2, the initial root filesystem of a new
-# PlanetLab node. For backward compatibility with old version 2.0 Boot
-# CDs, additional utilities are also built and packaged as
-# alpina-BootLVM.tar.gz and alpina-PartDisks.tar.gz.
+# Builds bootmanager.sh[.sgn], which is the PlanetLab Boot Manager script.
#
# The bootmanager.sh script contains in it a uuencoded tarball of the
# Boot Manager, customized for this PLC installation.
#
# Aaron Klingaman <alk@absarokasoft.com>
# Mark Huang <mlhuang@cs.princeton.edu>
-# Copyright (C) 2004-2006 The Trustees of Princeton University
+# Marc E. Fiuczynski <mef@cs.princeton.edu>
+# Copyright (C) 2004-2007 The Trustees of Princeton University
#
# $Id: build.sh,v 1.5 2006/04/03 19:40:55 mlhuang Exp $
#
# Copyright (c) 2003 Intel Corporation
# All rights reserved.
#
-# Copyright (c) 2004-2006 The Trustees of Princeton University
+# Copyright (c) 2004-2007 The Trustees of Princeton University
# All rights reserved.
# expected /proc/partitions format
vars['ROOT_MOUNTED']= 1
# check which nodegroups we are part of (>=4.0)
- tarballs = []
+ tarballs = ["PlanetLab-Bootstrap.tar.bz2"]
try:
nodes = BootAPI.call_api_function(vars, "GetNodes", ([NODE_ID], ['nodegroup_ids']))
node = nodes[0]
tarballs.append("PlanetLab-Bootstrap-%s.tar.bz2" % nodegroup['name'].lower())
except:
pass
- tarballs += ["PlanetLab-Bootstrap.tar.bz2", "alpina-BootstrapRPM.tar.bz2"]
- # download and extract support tarball for
- # this step, which has everything
- # we need to successfully run
+ # download and extract support tarball for this step, which has
+ # everything we need to successfully run
for step_support_file in tarballs:
source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file)
dest_file= "%s/%s" % (SYSIMG_PATH, step_support_file)
- # 30 is the connect timeout, 7200 is the max transfer time
- # in seconds (2 hours)
+ # 30 is the connect timeout, 14400 is the max transfer time in
+ # seconds (4 hours)
log.write( "downloading %s\n" % step_support_file )
result= bs_request.DownloadFile( source_file, None, None,
1, 1, dest_file,
- 30, 7200)
+ 30, 14400)
if result:
- # New bootstrap tarball contains everything necessary to
- # boot, no need to bootstrap further.
- vars['SKIP_INSTALL_BASE']= (step_support_file == "PlanetLab-Bootstrap.tar.bz2")
- break
-
- if not result:
- raise BootManagerException, "Unable to download %s from server." % \
- source_file
-
- log.write( "extracting %s in %s\n" % (dest_file,SYSIMG_PATH) )
- result= utils.sysexec( "tar -C %s -xpjf %s" % (SYSIMG_PATH,dest_file), log )
- utils.removefile( dest_file )
+ log.write( "extracting %s in %s\n" % (dest_file,SYSIMG_PATH) )
+ result= utils.sysexec( "tar -C %s -xpjf %s" % (SYSIMG_PATH,dest_file), log )
+ utils.removefile( dest_file )
+ else:
+ raise BootManagerException, "Unable to download %s from server." % \
+ source_file
# copy resolv.conf from the base system into our temp dir
# so DNS lookups work correctly while we are chrooted
/etc/resolv.conf (if applicable)
/etc/sysconfig/network
- It is assumed the caller mounted the root partition and the vserver partition
- starting on SYSIMG_PATH - it is not checked here.
-
The values to be used for the network settings are to be set in vars
in the variable 'NETWORK_SETTINGS', which is a dictionary
with keys:
+++ /dev/null
-#
-# Build bootstrap tarballs. The alpina-* files are deprecated and are
-# only included for historical purposes. Version 2 BootCDs still
-# require them; Version 3 BootCDs come with the tools pre-installed.
-#
-# Aaron Klingaman <alk@absarokasoft.com>
-# Mark Huang <mlhuang@cs.princeton.edu>
-# Copyright (C) 2005 The Trustees of Princeton University
-#
-# $Id: Makefile,v 1.6 2007/08/24 06:13:56 mef Exp $
-#
-
-all: PlanetLab-Bootstrap.tar.bz2
-
-PlanetLab-Bootstrap.tar.bz2:
- ./buildnode.sh -r $$([ -f "/etc/fedora-release" ] && awk ' { if ($2=="Core") print $4; else print $3 } ' /etc/fedora-release || echo 4)
-
-clean:
- rm -f PlanetLab-Bootstrap.tar.bz2
+++ /dev/null
-#!/bin/bash
-#
-# Build PlanetLab-Bootstrap.tar.bz2, the reference image for PlanetLab
-# nodes.
-#
-# Mark Huang <mlhuang@cs.princeton.edu>
-# Copyright (C) 2005-2006 The Trustees of Princeton University
-#
-# $Id: buildnode.sh,v 1.12.6.1 2007/08/30 20:09:20 mef Exp $
-#
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-# In both a normal CVS environment and a PlanetLab RPM
-# build environment, all of our dependencies are checked out into
-# directories at the same level as us.
-if [ -d ../../build ] ; then
- PATH=$PATH:../../build
- srcdir=../..
-else
- echo "Error: Could not find $(cd ../.. && pwd -P)/build/"
- exit 1
-fi
-
-export PATH
-
-. build.common
-
-pl_process_fedora_options $@
-shiftcount=$?
-shift $shiftcount
-
-# Do not tolerate errors
-set -e
-
-VROOT=$PWD/PlanetLab-Bootstrap
-install -d -m 755 $VROOT
-
-# Some of the PlanetLab RPMs attempt to (re)start themselves in %post,
-# unless the installation is running inside the BootCD environment. We
-# would like to pretend that we are.
-export PL_BOOTCD=1
-
-# Install the "PlanetLab" group. This requires that the PlanetLab
-# build system install the appropriate yumgroups.xml file (currently
-# build/groups/v3_yumgroups.xml) in $RPM_BUILD_DIR/../RPMS/ and that
-# mkfedora runs either yum-arch or createrepo on that directory. dev
-# is specified explicitly because of a stupid bug in its %post script
-# that causes its installation to fail; see the mkfedora script for a
-# full explanation. coreutils and python are specified explicitly
-# because groupinstall does not honor Requires(pre) dependencies
-# properly, most %pre scripts require coreutils to be installed first,
-# and some of our %post scripts require python.
-
-packagelist=(
-filesystem
-udev
-coreutils
-python
-)
-# vserver-reference packages used for reference image
-for package in "${packagelist[@]}" ; do
- packages="$packages -p $package"
-done
-
-# Populate VROOT with the files for the PlanetLab-Bootstrap content
-pl_setup_chroot $VROOT -k $packages -g PlanetLab
-
-# Disable additional unnecessary services
-echo "* Disabling unnecessary services"
-for service in netfs rawdevices cpuspeed smartd ; do
- if [ -x $VROOT/etc/init.d/$service ] ; then
- /usr/sbin/chroot $VROOT /sbin/chkconfig $service off
- fi
-done
-
-# Build tarball
-echo "* Building bootstrap tarball"
-tar -cpjf PlanetLab-Bootstrap.tar.bz2 -C $VROOT .
-
-exit 0