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.5 2007/03/22 17:57:23 faiyaza Exp $
11 // For PLC_NAME and PLC_BOOT_HOST
12 include('plc_config.php');
15 $PLC_BOOT_HOST = PLC_BOOT_HOST;
17 $oldrepos = 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 $repos = array(array('ThirdParty', 'Third Party RPMS', '3rdparty'));
24 if (isset($_REQUEST['alpha'])) {
25 $repos[] = array('PlanetLabAlpha', 'PlanetLab Alpha RPMS', 'planetlab-alpha');
26 } elseif (isset($_REQUEST['beta'])) {
27 $repos[] = array('PlanetLabBeta', 'PlanetLab Beta RPMS', 'planetlab-beta');
28 } elseif (isset($_REQUEST['rollout'])) {
29 $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab-rollout');
31 $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab');
34 if (isset($_REQUEST['gpgcheck'])) {
35 $gpgcheck = $_REQUEST['gpgcheck'];
40 // Requesting a mirror list. Yum bombs out completely if a repository
41 // is (even temporarily) unavailable, so if CoBlitz is down, provide a
42 // few more options. Make sure that gpgcheck remains enabled. Last
43 // chance option is ourselves so that yum never fails.
44 if (isset($_REQUEST['mirrorlist']) &&
45 isset($_REQUEST['repo']) &&
46 isset($_REQUEST['releasever'])) {
47 $mirrors = array("http://coblitz.planet-lab.org/pub/fedora/linux",
48 "http://fedora.gtlib.cc.gatech.edu/pub/fedora.redhat/linux",
49 "http://download.fedoraproject.org/pub/fedora/linux",
50 "ftp://rpmfind.net/linux/fedora",
51 "http://mirrors.kernel.org/fedora");
52 $releasever = $_REQUEST['releasever'];
53 switch ($_REQUEST['repo']) {
55 foreach ($mirrors as $mirror) {
56 echo "$mirror/core/$releasever/\$ARCH/os/\n";
60 foreach ($mirrors as $mirror) {
61 echo "$mirror/core/updates/$releasever/\$ARCH/\n";
65 foreach ($mirrors as $mirror) {
66 echo "$mirror/extras/$releasever/\$ARCH/\n";
71 // Always list ourselves last
72 echo "https://$PLC_BOOT_HOST/install-rpms/planetlab/\n";
76 // Requesting yum.conf. See above for the mirrorlist definition.
79 # Do not scan /etc/yum.repos.d/
81 cachedir=/var/cache/yum
83 logfile=/var/log/yum.log
88 name=Fedora Core \$releasever - \$basearch - Base
89 mirrorlist=https://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=base&releasever=\$releasever
91 # PlanetLab builds its own versions of these tools
92 exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
95 name=Fedora Core \$releasever - \$basearch - Released Updates
96 mirrorlist=https://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=updates&releasever=\$releasever
98 # PlanetLab builds its own versions of these tools
99 exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
102 name=Fedora Extras \$releasever - \$basearch
103 mirrorlist=https://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=extras&releasever=\$releasever
105 # PlanetLab builds its own versions of these tools
106 exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
111 // Figure out which repositories we actually have on this
112 // machine. MyPLC installations, for instance, generally only have
113 // PlanetLab RPMS installed.
114 foreach ($repos as $repo) {
116 $name = $repo[1] . " -- " . "$PLC_NAME Central";
117 $dir = "/install-rpms/" . $repo[2];
118 $baseurl = "https://$PLC_BOOT_HOST" . $dir . "/";
120 if (is_dir(realpath($_SERVER['DOCUMENT_ROOT'] . $dir))) {