3 // /etc/yum.conf for production nodes
5 // Mark Huang <mlhuang@cs.princeton.edu>
6 // Copyright (C) 2004-2006 The Trustees of Princeton University
8 // $Id: yum.conf.php,v 1.3 2007/02/06 19:00:57 mlhuang Exp $
11 // For PLC_NAME and PLC_BOOT_HOST
12 include('plc_config.php');
15 $PLC_BOOT_HOST = PLC_BOOT_HOST;
17 $repos = array(array('FedoraCore2Base', 'Fedora Core 2 Base', 'stock-fc2'),
18 array('FedoraCore2Updates', 'Fedora Core 2 Updates', 'updates-fc2'),
19 array('ThirdParty', 'Third Party RPMS', '3rdparty'));
21 if (isset($_REQUEST['alpha'])) {
22 $repos[] = array('PlanetLabAlpha', 'PlanetLab Alpha RPMS', 'planetlab-alpha');
23 } elseif (isset($_REQUEST['beta'])) {
24 $repos[] = array('PlanetLabBeta', 'PlanetLab Beta RPMS', 'planetlab-beta');
25 } elseif (isset($_REQUEST['rollout'])) {
26 $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab-rollout');
28 $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab');
31 if (isset($_REQUEST['gpgcheck'])) {
32 $gpgcheck = $_REQUEST['gpgcheck'];
37 // Requesting a mirror list. Yum bombs out completely if a repository
38 // is (even temporarily) unavailable, so if CoBlitz is down, provide a
39 // few more options. Make sure that gpgcheck remains enabled. Last
40 // chance option is ourselves so that yum never fails.
41 if (isset($_REQUEST['mirrorlist']) &&
42 isset($_REQUEST['repo']) &&
43 isset($_REQUEST['releasever'])) {
44 $mirrors = array("http://coblitz.planet-lab.org/pub/fedora/linux",
45 "http://fedora.gtlib.cc.gatech.edu/pub/fedora.redhat/linux",
46 "http://download.fedoraproject.org/pub/fedora/linux",
47 "ftp://rpmfind.net/linux/fedora",
48 "http://mirrors.kernel.org/fedora");
49 $releasever = $_REQUEST['releasever'];
50 switch ($_REQUEST['repo']) {
52 foreach ($mirrors as $mirror) {
53 echo "$mirror/core/$releasever/\$ARCH/os/\n";
57 foreach ($mirrors as $mirror) {
58 echo "$mirror/core/updates/$releasever/\$ARCH/\n";
62 foreach ($mirrors as $mirror) {
63 echo "$mirror/extras/$releasever/\$ARCH/\n";
68 // Always list ourselves last
69 echo "http://$PLC_BOOT_HOST/install-rpms/planetlab/\n";
73 // Requesting yum.conf. See above for the mirrorlist definition.
76 # Do not scan /etc/yum.repos.d/
78 cachedir=/var/cache/yum
80 logfile=/var/log/yum.log
85 name=Fedora Core \$releasever - \$basearch - Base
86 mirrorlist=http://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=base&releasever=\$releasever
88 # PlanetLab builds its own versions of these tools
89 exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
92 name=Fedora Core \$releasever - \$basearch - Released Updates
93 mirrorlist=http://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=updates&releasever=\$releasever
95 # PlanetLab builds its own versions of these tools
96 exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
99 name=Fedora Extras \$releasever - \$basearch
100 mirrorlist=http://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=extras&releasever=\$releasever
102 # PlanetLab builds its own versions of these tools
103 exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
108 // Figure out which repositories we actually have on this
109 // machine. MyPLC installations, for instance, generally only have
110 // PlanetLab RPMS installed.
111 foreach ($repos as $repo) {
113 $name = $repo[1] . " -- " . "$PLC_NAME Central";
114 $dir = "/install-rpms/" . $repo[2];
115 $baseurl = "http://$PLC_BOOT_HOST" . $dir . "/";
117 if (is_dir(realpath($_SERVER['DOCUMENT_ROOT'] . $dir))) {