hack until i can get /etc/sysconfig/iptables.d into the iptables package.
[nodeconfig.git] / yum.conf.php
index de03958..71af098 100755 (executable)
@@ -5,7 +5,7 @@
 // Mark Huang <mlhuang@cs.princeton.edu>
 // Copyright (C) 2004-2006 The Trustees of Princeton University
 //
-// $Id: yum.conf.php,v 1.2 2007/02/06 15:52:26 mlhuang Exp $
+// $Id$
 //
 
 // For PLC_NAME and PLC_BOOT_HOST
@@ -14,10 +14,13 @@ include('plc_config.php');
 $PLC_NAME = PLC_NAME;
 $PLC_BOOT_HOST = PLC_BOOT_HOST;
 
-$repos = array(array('FedoraCore2Base', 'Fedora Core 2 Base', 'stock-fc2'),
+$oldrepos = array(array('FedoraCore2Base', 'Fedora Core 2 Base', 'stock-fc2'),
               array('FedoraCore2Updates', 'Fedora Core 2 Updates', 'updates-fc2'),
               array('ThirdParty', 'Third Party RPMS', '3rdparty'));
 
+$repos = array(array('ThirdParty', 'Third Party RPMS', '3rdparty'));
+
+
 if (isset($_REQUEST['alpha'])) {
   $repos[] = array('PlanetLabAlpha', 'PlanetLab Alpha RPMS', 'planetlab-alpha');
 } elseif (isset($_REQUEST['beta'])) {
@@ -44,29 +47,40 @@ if (isset($_REQUEST['mirrorlist']) &&
   $mirrors = array("http://coblitz.planet-lab.org/pub/fedora/linux",
                   "http://fedora.gtlib.cc.gatech.edu/pub/fedora.redhat/linux",
                   "http://download.fedoraproject.org/pub/fedora/linux",
-                  "ftp://rpmfind.net/linux/fedora",
                   "http://mirrors.kernel.org/fedora");
+                  #"ftp://rpmfind.net/linux/fedora",  still uses the old style of directory hierarchy
   $releasever = $_REQUEST['releasever'];
   switch ($_REQUEST['repo']) {
   case "base":
-    foreach ($mirrors as $mirror) {
-      echo "$mirror/core/$releasever/\$ARCH/os/\n";
-    }
+       if ( intval($releasever) >= 7 )
+       {
+               foreach ($mirrors as $mirror) {
+                 echo "$mirror/releases/$releasever/Everything/\$ARCH/os/\n";
+               }
+
+       } else {
+               foreach ($mirrors as $mirror) {
+                 echo "$mirror/core/$releasever/\$ARCH/os/\n";
+               }
+       }
     break;
   case "updates":
-    foreach ($mirrors as $mirror) {
-      echo "$mirror/core/updates/$releasever/\$ARCH/\n";
-    }
-    break;
-  case "extras":
-    foreach ($mirrors as $mirror) {
-      echo "$mirror/extras/$releasever/\$ARCH/\n";
-    }
+       if ( intval($releasever) >= 7 )
+       {
+               foreach ($mirrors as $mirror) {
+                 echo "$mirror/updates/$releasever/\$ARCH/\n";
+               }
+
+       } else {
+               foreach ($mirrors as $mirror) {
+                 echo "$mirror/core/updates/$releasever/\$ARCH/\n";
+               }
+       }
     break;
   }
 
   // Always list ourselves last
-  echo "http://$PLC_BOOT_HOST/install-rpms/planetlab/\n";
+  echo "https://$PLC_BOOT_HOST/install-rpms/planetlab/\n";
   exit;
 }
 
@@ -83,19 +97,17 @@ gpgcheck=$gpgcheck
 
 [base]
 name=Fedora Core \$releasever - \$basearch - Base
-mirrorlist=http://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=base&releasever=\$releasever
+mirrorlist=https://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=base&releasever=\$releasever
 gpgcheck=$gpgcheck
+# PlanetLab builds its own versions of these tools
+exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
 
 [updates]
 name=Fedora Core \$releasever - \$basearch - Released Updates
-mirrorlist=http://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=updates&releasever=\$releasever
+mirrorlist=https://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=updates&releasever=\$releasever
 gpgcheck=$gpgcheck
-
-[extras]
-name=Fedora Extras \$releasever - \$basearch
-mirrorlist=http://$PLC_BOOT_HOST/PlanetLabConf/yum.conf.php?mirrorlist&repo=extras&releasever=\$releasever
-gpgcheck=$gpgcheck
-
+# PlanetLab builds its own versions of these tools
+exclude=iptables kernel kernel kernel-devel kernel-smp kernel-smp-devel kernel-xen0 kernel-xen0-devel kernel-xenU kernel-xenU-devel mysql ulogd
 
 EOF;
 
@@ -106,7 +118,7 @@ foreach ($repos as $repo) {
   $id = $repo[0];
   $name = $repo[1] . " -- " . "$PLC_NAME Central";
   $dir = "/install-rpms/" . $repo[2];
-  $baseurl = "http://$PLC_BOOT_HOST" . $dir . "/";
+  $baseurl = "https://$PLC_BOOT_HOST" . $dir . "/";
 
   if (is_dir(realpath($_SERVER['DOCUMENT_ROOT'] . $dir))) {
     echo <<<EOF
@@ -120,4 +132,4 @@ EOF;
   }
 }
 
-?>
\ No newline at end of file
+?>