fixed and moved the server-side yum scripts, from nodeconfig/yum to BootstrapFS/nodec...
Thierry Parmentelat [Wed, 27 Jan 2010 18:44:46 +0000 (18:44 +0000)]
  now known as the nodeyum package
  (might need some moer work for properly handling kexcludes in multi-fc plcs)
cleaned up all uses of /etc/planetlab/{node,slice}family
nodeconfig now does not need the build/ module anymore at build time

14 files changed:
nodeconfig.spec
yum/centos5/yum.conf [deleted file]
yum/centos5/yum.myplc.d/CentOS-Base.repo.in [deleted file]
yum/centos5/yum.myplc.d/epel.repo.in [deleted file]
yum/f10/yum.conf [deleted file]
yum/f10/yum.myplc.d/fedora-updates.repo.in [deleted file]
yum/f10/yum.myplc.d/fedora.repo.in [deleted file]
yum/f12/yum.conf [deleted file]
yum/f12/yum.myplc.d/fedora-updates.repo.in [deleted file]
yum/f12/yum.myplc.d/fedora.repo.in [deleted file]
yum/f8/yum.conf [deleted file]
yum/f8/yum.myplc.d/fedora-updates.repo.in [deleted file]
yum/f8/yum.myplc.d/fedora.repo.in [deleted file]
yum/myplc.repo.php [deleted file]

index 49ddcef..ffe20c4 100644 (file)
@@ -28,8 +28,6 @@ URL: %(echo %{url} | cut -d ' ' -f 2)
 # We use set everywhere
 Requires: php >= 5.0
 Requires: PLCAPI >= 4.3
-# need the apache user at install-time
-Requires: httpd 
 
 %description
 
@@ -43,33 +41,10 @@ reasons these scripts get installed in /var/www/html/PlanetLabConf.
 %setup -q
 
 %build
-pushd nodeconfig/yum
-
-KEXCLUDE="exclude=$(../../build/getkexcludes.sh)"
-
-# expand list of kexcludes
-for filein in $(find . -name '*.in') ; do
-    file=$(echo $filein | sed -e "s,\.in$,,")
-    sed -e "s,@KEXCLUDE@,$KEXCLUDE,g" $filein > $file
-done
-
-# scan fcdistros and catenate all repos in 'stock.repo' so db-config can be distro-independant
-
-for fcdistro in $(ls); do
-    [ -d $fcdistro ] || continue
-    pushd $fcdistro/yum.myplc.d
-    rm -f stock.repo
-    cat *.repo > stock.repo
-    popd
-done
-
-popd
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-pushd nodeconfig
-
 echo "* nodeconfig: Installing PlanetLabConf pages"
 
 for dir in PlanetLabConf PLCAPI ; do
@@ -77,36 +52,21 @@ for dir in PlanetLabConf PLCAPI ; do
     rsync -a --exclude .svn ./$dir/ $RPM_BUILD_ROOT/var/www/html/$dir/
 done
 
-# the yum area -- see db-config
-# expose (fixed) myplc.repo.php as                                         https://<plc>/yum/myplc.repo.php
-install -D -m 644 ./yum/myplc.repo.php                      $RPM_BUILD_ROOT/var/www/html/yum/myplc.repo.php
-# expose the fcdistro-dependant yum.conf as                                https://<plc>/yum/yum.conf
-install -D -m 644 ./yum/%{distroname}/yum.conf              $RPM_BUILD_ROOT/var/www/html/yum/yum.conf
-# expose the (fcdistro-dependant) stock.repo as                                    https://<plc>/yum/stock.repo
-install -D -m 644 ./yum/%{distroname}/yum.myplc.d/stock.repo $RPM_BUILD_ROOT/var/www/html/yum/stock.repo
-
 # Install db-config.d files
 echo "* Installing db-config.d files"
 mkdir -p ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
 cp db-config.d/* ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d/*
 
-popd
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-# the boot manager upload area
-mkdir -p /var/log/bm
-chown apache:apache /var/log/bm
-chmod 700 /var/log/bm
 
 %files
 %defattr(-,root,root,-)
 /var/www/html/PlanetLabConf
 /var/www/html/PLCAPI
-/var/www/html/yum
 /etc/planetlab/db-config.d
 
 %changelog
diff --git a/yum/centos5/yum.conf b/yum/centos5/yum.conf
deleted file mode 100644 (file)
index bfff95d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-[main]
-reposdir=/etc/yum.myplc.d
-pkgpolicy=newest
-exactarch=0
-keepcache=0
-cachedir=/var/cache/yum
-debuglevel=1
-logfile=/var/log/yum.log
-distroverpkg=redhat-release
-tolerant=1
-obsoletes=1
-gpgcheck=1
-plugins=0
-
-# Note: yum-RHN-plugin doesn't honor this.
-metadata_expire=1h
-
-# Default.
-# installonly_limit = 3
-
-# PUT YOUR REPOS HERE OR IN separate files named file.repo
-# in /etc/yum.repos.d
diff --git a/yum/centos5/yum.myplc.d/CentOS-Base.repo.in b/yum/centos5/yum.myplc.d/CentOS-Base.repo.in
deleted file mode 100644 (file)
index be1e9c2..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# CentOS-Base.repo
-#
-# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
-# The mirror system uses the connecting IP address of the client and the
-# update status of each mirror to pick mirrors that are updated to and
-# geographically close to the client.  You should use this for CentOS updates
-# unless you are manually picking other mirrors.
-#
-# If the mirrorlist= does not work for you, as a fall back you can try the 
-# remarked out baseurl= line instead.
-#
-#
-
-[base]
-name=CentOS-$releasever - Base
-mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
-#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
-@KEXCLUDE@
-gpgcheck=1
-enabled=1
-gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
-
-#released updates 
-[updates]
-name=CentOS-$releasever - Updates
-mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
-#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
-@KEXCLUDE@
-gpgcheck=1
-enabled=1
-gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
-
-#packages used/produced in the build but not released
-[addons]
-name=CentOS-$releasever - Addons
-mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
-#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
-@KEXCLUDE@
-gpgcheck=1
-enabled=0
-gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
-
-#additional packages that may be useful
-[extras]
-name=CentOS-$releasever - Extras
-mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
-#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
-@KEXCLUDE@
-gpgcheck=1
-enabled=0
-gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
-
-#additional packages that extend functionality of existing packages
-[centosplus]
-name=CentOS-$releasever - Plus
-mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
-#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
-@KEXCLUDE@
-gpgcheck=1
-enabled=0
-gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
-
diff --git a/yum/centos5/yum.myplc.d/epel.repo.in b/yum/centos5/yum.myplc.d/epel.repo.in
deleted file mode 100644 (file)
index 1a844c1..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[epel]
-name=Extra Packages for Enterprise Linux 5 - $basearch
-#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
-failovermethod=priority
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
-
-[epel-debuginfo]
-name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
-#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
-failovermethod=priority
-@KEXCLUDE@
-enabled=0
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
-gpgcheck=1
-
-[epel-source]
-name=Extra Packages for Enterprise Linux 5 - $basearch - Source
-#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
-failovermethod=priority
-@KEXCLUDE@
-enabled=0
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
-gpgcheck=1
diff --git a/yum/f10/yum.conf b/yum/f10/yum.conf
deleted file mode 100644 (file)
index 13046c8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[main]
-reposdir=/etc/yum.myplc.d
-cachedir=/var/cache/yum
-debuglevel=1
-logfile=/var/log/yum.log
-lockfile=/var/lock/yum.pid
-pkgpolicy=newest
-distroverpkg=fedora-release
-installonlypkgs=
-exactarch=0
diff --git a/yum/f10/yum.myplc.d/fedora-updates.repo.in b/yum/f10/yum.myplc.d/fedora-updates.repo.in
deleted file mode 100644 (file)
index 2323288..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[updates]
-name=Fedora $releasever - $basearch - Updates
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-debuginfo]
-name=Fedora $releasever - $basearch - Updates - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-source]
-name=Fedora $releasever - Updates Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
diff --git a/yum/f10/yum.myplc.d/fedora.repo.in b/yum/f10/yum.myplc.d/fedora.repo.in
deleted file mode 100644 (file)
index b7cea58..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[fedora]
-name=Fedora $releasever - $basearch
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-debuginfo]
-name=Fedora $releasever - $basearch - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-source]
-name=Fedora $releasever - Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
diff --git a/yum/f12/yum.conf b/yum/f12/yum.conf
deleted file mode 100644 (file)
index 13046c8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[main]
-reposdir=/etc/yum.myplc.d
-cachedir=/var/cache/yum
-debuglevel=1
-logfile=/var/log/yum.log
-lockfile=/var/lock/yum.pid
-pkgpolicy=newest
-distroverpkg=fedora-release
-installonlypkgs=
-exactarch=0
diff --git a/yum/f12/yum.myplc.d/fedora-updates.repo.in b/yum/f12/yum.myplc.d/fedora-updates.repo.in
deleted file mode 100644 (file)
index 2323288..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[updates]
-name=Fedora $releasever - $basearch - Updates
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-debuginfo]
-name=Fedora $releasever - $basearch - Updates - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-source]
-name=Fedora $releasever - Updates Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
diff --git a/yum/f12/yum.myplc.d/fedora.repo.in b/yum/f12/yum.myplc.d/fedora.repo.in
deleted file mode 100644 (file)
index b7cea58..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[fedora]
-name=Fedora $releasever - $basearch
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-debuginfo]
-name=Fedora $releasever - $basearch - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-source]
-name=Fedora $releasever - Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
diff --git a/yum/f8/yum.conf b/yum/f8/yum.conf
deleted file mode 100644 (file)
index 13046c8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[main]
-reposdir=/etc/yum.myplc.d
-cachedir=/var/cache/yum
-debuglevel=1
-logfile=/var/log/yum.log
-lockfile=/var/lock/yum.pid
-pkgpolicy=newest
-distroverpkg=fedora-release
-installonlypkgs=
-exactarch=0
diff --git a/yum/f8/yum.myplc.d/fedora-updates.repo.in b/yum/f8/yum.myplc.d/fedora-updates.repo.in
deleted file mode 100644 (file)
index 9f9b7f6..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-[updates]
-name=Fedora $releasever - $basearch - Updates
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-debuginfo]
-name=Fedora $releasever - $basearch - Updates - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-source]
-name=Fedora $releasever - Updates Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-newkey]
-name=Fedora $releasever - $basearch - Updates Newkey
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch.newkey/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever.newkey&arch=$basearch
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-8-and-9
-
-[updates-newkey-debuginfo]
-name=Fedora $releasever - $basearch - Updates - Debug Newkey
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch.newkey/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f$releasever.newkey&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-8-and-9
-
-[updates-newkey-source]
-name=Fedora $releasever - Updates Source Newkey
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/SRPMS.newkey/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f$releasever.newkey&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-8-and-9
diff --git a/yum/f8/yum.myplc.d/fedora.repo.in b/yum/f8/yum.myplc.d/fedora.repo.in
deleted file mode 100644 (file)
index b7cea58..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[fedora]
-name=Fedora $releasever - $basearch
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=1
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-debuginfo]
-name=Fedora $releasever - $basearch - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-source]
-name=Fedora $releasever - Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
-@KEXCLUDE@
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
diff --git a/yum/myplc.repo.php b/yum/myplc.repo.php
deleted file mode 100644 (file)
index e76be48..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-//
-// part of yum config on nodes
-//
-// Thierry Parmentelat 
-// Copyright (C) 2008 INRIA
-//
-// $Id: myplc.repo.php 9818 2008-07-04 07:54:06Z thierry $
-//
-
-// For PLC_NAME and PLC_BOOT_HOST
-include('plc_config.php');
-
-$PLC_NAME = PLC_NAME;
-$PLC_BOOT_HOST = PLC_BOOT_HOST;
-
-// Get admin API handle
-require_once 'plc_api.php';
-global $adm;
-
-if (isset($_REQUEST['gpgcheck'])) {
-  $gpgcheck = $_REQUEST['gpgcheck'];
-} else {
-  $gpgcheck = 0;
-}
-
-# get node family
-if ( ! isset($_REQUEST['slicefamily'])) {
-  # legacy : use the old naming scheme
-  $nodefamily="planetlab";
-  $pldistro="planetlab";
- } else {
-  $slicefamily = $_REQUEST['slicefamily'];
-  echo "# slicefamily $slicefamily \n" ;
-  list( $pldistro, $fcdistro, $arch) = split ("-", $slicefamily);
-  $nodefamily = "$pldistro-$arch";
-  echo "# nodefamily $nodefamily \n" ;
- }
-
-# the nodegroups the node is part of
-$nodegroup_names=array();
-
-if ( ! isset($_REQUEST['node_id'])) {
-  print "# Warning : node_id not set\n";
- } else {
-  $node_id=intval($_REQUEST['node_id']);
-  echo "# node_id $node_id \n";
-  # compute nodegroups
-  $nodes = $adm->GetNodes(array('node_id'=>$node_id));
-  $nodegroup_ids = $nodes[0]['nodegroup_ids'];
-  $nodegroups = $adm->GetNodeGroups($nodegroup_ids);
-  foreach ($nodegroups as $nodegroup) {
-    $nodegroup_name = $nodegroup['groupname'];
-    $nodegroup_names [] = $nodegroup_name;
-    echo "# in nodegroup $nodegroup_name \n" ;
-  }
- }
-
-$topdir=$_SERVER['DOCUMENT_ROOT'] . "/install-rpms/";
-$topurl="https://$PLC_BOOT_HOST" . "/install-rpms/";
-
-
-# locate the planetlab repo for this node family & nodegroup
-$repo=NULL;
-foreach ($nodegroup_names as $nodegroup_name) {
-  $groupdir = "$nodefamily-$nodegroup_name";
-  # have we got a repo like /install-rpms/planetlab-i386-alpha ?
-  echo "# trying " . $topdir . $groupdir . "\n";
-  if (is_dir (realpath($topdir . $groupdir))) {
-    $repo=array($pldistro, $groupdir, "$PLC_NAME $nodefamily $nodegroup_name");
-    break;
-  }
-}
-
-# if not found yet
-if ( ! $repo) {
-  echo "# trying default " . $topdir . $nodefamily . "\n";
-  if (is_dir (realpath($topdir . $nodefamily))) {
-    $repo = array($pldistro, $nodefamily, "$PLC_NAME $nodefamily regular");
-  }
- }
-
-# default: if we're here it's probably very wrong
-if ( ! $repo) {
-  echo "# WARNING: could not find a decent planetlab repo for this node\n";
-  $repo = array ($pldistro, "planetlab", "default probably wrong");
-  # don't define the repo in this case
-  exit;
- }
-
-list( $id, $dir, $name) = $repo;
-
-echo <<< __PLC_REPO__
-[$id]
-name=$name
-baseurl=$topurl/$dir
-gpgcheck=$gpgcheck
-
-__PLC_REPO__;
-
-?>