3 // /etc/yum.conf for production nodes
5 // Mark Huang <mlhuang@cs.princeton.edu>
6 // Copyright (C) 2004-2006 The Trustees of Princeton University
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.codeen.org/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 "http://mirrors.kernel.org/fedora");
51 #"ftp://rpmfind.net/linux/fedora", still uses the old style of directory hierarchy
52 $releasever = $_REQUEST['releasever'];
53 switch ($_REQUEST['repo']) {
55 if ( intval($releasever) >= 7 )
57 foreach ($mirrors as $mirror) {
58 echo "$mirror/releases/$releasever/Everything/\$ARCH/os/\n";
62 foreach ($mirrors as $mirror) {
63 echo "$mirror/core/$releasever/\$ARCH/os/\n";
68 if ( intval($releasever) >= 7 )
70 foreach ($mirrors as $mirror) {
71 echo "$mirror/updates/$releasever/\$ARCH/\n";
75 foreach ($mirrors as $mirror) {
76 echo "$mirror/core/updates/$releasever/\$ARCH/\n";
82 // Always list ourselves last
83 echo "https://$PLC_BOOT_HOST/install-rpms/planetlab/\n";
87 // Requesting yum.conf. See above for the mirrorlist definition.
90 # Do not scan /etc/yum.repos.d/
92 cachedir=/var/cache/yum
94 logfile=/var/log/yum.log
99 name=Fedora Core \$releasever - \$basearch - Base
100 mirrorlist=https://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=base&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
106 name=Fedora Core \$releasever - \$basearch - Released Updates
107 mirrorlist=https://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=updates&releasever=\$releasever
109 # PlanetLab builds its own versions of these tools
110 exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
114 // Figure out which repositories we actually have on this
115 // machine. MyPLC installations, for instance, generally only have
116 // PlanetLab RPMS installed.
117 foreach ($repos as $repo) {
119 $name = $repo[1] . " -- " . "$PLC_NAME Central";
120 $dir = "/install-rpms/" . $repo[2];
121 $baseurl = "https://$PLC_BOOT_HOST" . $dir . "/";
123 if (is_dir(realpath($_SERVER['DOCUMENT_ROOT'] . $dir))) {