+
+ # XXX Should download yum.conf from the boot server?
+ echo "generate yum.conf"
+cat >yum.conf <<EOF
+[main]
+cachedir=/var/cache/yum
+debuglevel=2
+logfile=/var/log/yum.log
+pkgpolicy=newest
+### for yum-2.4 in fc4 (this will be ignored by yum-2.0)
+### everything in here, do not scan /etc/yum.repos.d/
+reposdir=/dev/null
+
+[FedoraCore2Base]
+name=Fedora Core 2 Base -- PlanetLab Central
+baseurl=http://$PRIMARY_SERVER/install-rpms/stock-fc2/
+
+[FedoraCore2Updates]
+name=Fedora Core 2 Updates -- PlanetLab Central
+baseurl=http://$PRIMARY_SERVER/install-rpms/updates-fc2/
+
+[PlanetLab]
+name=PlanetLab RPMS -- PlanetLab Central
+baseurl=http://$PRIMARY_SERVER/install-rpms/planetlab-rollout/
+EOF
+ # XXX Temporary hack until the 3.2 rollout is complete and the
+ # /planetlab/yumgroups.xml file contains the BootCD group.
+ yumgroups="http://$PRIMARY_SERVER/install-rpms/planetlab-rollout/yumgroups.xml"
+
+ # 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
+ yum-arch $(dirname $RPM_BUILD_DIR)/RPMS
+ createrepo -g yumgroups.xml $(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
+ yumgroups="file://$(dirname $RPM_BUILD_DIR)/RPMS/yumgroups.xml"
+ fi