From d7cb7b8b1144544b5c3ba0777f02c6e97209b7ba Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Sat, 3 Sep 2005 21:44:16 +0000 Subject: [PATCH] Solve the bootstrap problem by including any just built packages in the yum configuration. This cooperates with the PlanetLab build system. --- build.sh | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..d270807 --- /dev/null +++ b/build.sh @@ -0,0 +1,129 @@ +#!/bin/bash +# +# Builds VServer reference image. Requires the web and boot servers to +# be up, which complicates bootstrap. Alternatively, we could require +# the build server to host a local yum repository. Already, it is +# required to run the same major version of yum as the nodes. +# +# Mark Huang +# Copyright (C) 2004-2005 The Trustees of Princeton University +# +# $Id: vserver-reference.init,v 1.17 2005/09/02 19:46:37 mlhuang Exp $ +# + +# Get the production /etc/yum.conf file. XXX When MAs begin deploying +# their own boot servers and/or code, this will have to change. +curl --silent http://boot.planet-lab.org/$(curl --silent --insecure --form node_id=0 --form file=/etc/yum.conf https://boot.planet-lab.org/db/plnodeconf/getsinglefile.php) > yum.conf + +# Solve the bootstrap problem by including any just built packages in +# the yum configuration. This cooperates with the PlanetLab build +# system. +if [ -n "$RPM_BUILD_DIR" ] ; then + # Remove any [PlanetLab*] sections + sed -i -f - yum.conf <> yum.conf < $VROOT/etc/fstab < $VROOT/etc/rpm/macros <