-# 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=1 --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 <<EOF
-# Match lines between [PlanetLab*] and the next [*
-/\[PlanetLab.*\]/I,/^\[/{
-# Delete [PlanetLab*]
-/\[PlanetLab.*\]/Id
-# Done when we see [*
-/^\[/b
-# Otherwise delete
-d
-}
-EOF
-
- # And replace them with a section for the RPMS that were just built
- yum-arch $(dirname $RPM_BUILD_DIR)/RPMS
- createrepo $(dirname $RPM_BUILD_DIR)/RPMS || :
- # If run under sudo, allow user to delete the headers/ and
- # repodata/ directories.
- if [ -n "$SUDO_USER" ] ; then
- chown -R $SUDO_USER $(dirname $RPM_BUILD_DIR)/RPMS
- fi
- cat >> yum.conf <<EOF
-[Bootstrap]
-name=Bootstrap RPMS -- $(dirname $RPM_BUILD_DIR)/RPMS/
-baseurl=file://$(dirname $RPM_BUILD_DIR)/RPMS/
-EOF
+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