popd
############################## server-side
+# ship all fcdistros for multi-fcdistros myplc, and let the php scripts do the right thing
pushd BootstrapFS/nodeconfig/yum
# scan fcdistros and catenate all repos in 'stock.repo' so db-config can be distro-independant
for fcdistro in $(ls); do
############################## node-side
pushd BootstrapFS
-#arch=$(uname -i)
install -D -m 644 bootstrapfs-%{nodefamily}.tar.bz2 \
$RPM_BUILD_ROOT/var/www/html/boot/bootstrapfs-%{nodefamily}.tar.bz2
popd
############################## server-side
-# xxx unfinished business here
-# xxx in a multi-flavour myplc, we should ship for all fcdistros
-# and let the php scripts do the right thing
+# ship all fcdistros for multi-fcdistros myplc, and let the php scripts do the right thing
pushd BootstrapFS
-echo "* Installing MyPLC-side nodes yum config utilities"
-echo "* Multi-fcdistro yum stuff"
+echo "* Installing MyPLC-side nodes yum config utilities (support for multi-fcdistro)"
mkdir -p $RPM_BUILD_ROOT/var/www/html/yum/
-rsync -av ./nodeconfig/yum/ $RPM_BUILD_ROOT/var/www/html/yum/
-echo "* Legacy (single fcdistro) yum stuff"
-# expose (fixed) myplc.repo.php as https://<plc>/yum.legacy/myplc.repo.php
-install -D -m 644 ./nodeconfig/yum/myplc.repo.php $RPM_BUILD_ROOT/var/www/html/yum.legacy/myplc.repo.php
-# expose the fcdistro-dependant yum.conf as https://<plc>/yum.legacy/yum.conf
-install -D -m 644 ./nodeconfig/yum/%{distroname}/yum.conf $RPM_BUILD_ROOT/var/www/html/yum.legacy/yum.conf
-# expose the (fcdistro-dependant) stock.repo as https://<plc>/yum.legacy/stock.repo
-install -D -m 644 ./nodeconfig/yum/%{distroname}/yum.myplc.d/stock.repo $RPM_BUILD_ROOT/var/www/html/yum.legacy/stock.repo
+rsync -av ./nodeconfig/yum/ $RPM_BUILD_ROOT/var/www/html/yum/
# Install initscripts
echo "* Installing plc.d initscripts"
%files -n nodeyum
%defattr(-,root,root,-)
/var/www/html/yum
-/var/www/html/yum.legacy
/etc/planetlab/db-config.d
/etc/plc.d
# myplc/noderepo
# YUM configuration
{'enabled': True,
- 'source': 'yum.legacy/myplc.repo.php?gpgcheck=1',
+ 'source': 'yum/myplc.repo.php?gpgcheck=1',
'dest': '/etc/yum.myplc.d/myplc.repo',
'file_permissions': '644', 'file_owner': 'root', 'file_group': 'root',
'preinstall_cmd': '', 'postinstall_cmd': '', 'error_cmd': '',
'ignore_cmd_errors': False,
'always_update': False},
{'enabled': True,
- 'source': 'yum.legacy/yum.conf',
+ 'source': 'yum/yum.php?path=yum.conf',
'dest': '/etc/yum.conf',
'file_permissions': '644', 'file_owner': 'root', 'file_group': 'root',
'preinstall_cmd': '', 'postinstall_cmd': '', 'error_cmd': '',
'ignore_cmd_errors': False,
'always_update': False},
{'enabled': True,
- 'source': 'yum.legacy/stock.repo',
+ 'source': 'yum/yum.php?path=yum.myplc.d/stock.repo',
'dest': '/etc/yum.myplc.d/stock.repo',
'file_permissions': '644', 'file_owner': 'root', 'file_group': 'root',
'preinstall_cmd': '', 'postinstall_cmd': '', 'error_cmd': '',
+# CentOS 5
+# $URL$
[main]
+# Overwriting the default yum repos dir
reposdir=/etc/yum.myplc.d
pkgpolicy=newest
exactarch=0
# Default.
# installonly_limit = 3
-# PUT YOUR REPOS HERE OR IN separate files named file.repo
-# in /etc/yum.repos.d
+# $URL
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
+# $URL
[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
+# Fedora 10
+# $URL$
[main]
+# Overwriting the default yum repos dir
reposdir=/etc/yum.myplc.d
cachedir=/var/cache/yum
debuglevel=1
+# $URL
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
+# $URL
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
+# Fedora 12
+# $URL$
[main]
+# Overwriting the default yum repos dir
reposdir=/etc/yum.myplc.d
cachedir=/var/cache/yum
debuglevel=1
+# $URL
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
+# $URL
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
+# Fedora 8
+# $URL$
[main]
+# Overwriting the default yum repos dir
reposdir=/etc/yum.myplc.d
cachedir=/var/cache/yum
debuglevel=1
+# $URL
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
+# $URL
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
$gpgcheck = 0;
}
-echo "# Generated by stock.repo.php\n";
+echo "# Generated by yum.php\n";
echo '# $Id$' . "\n";
echo '# $URL$' . "\n";
# we assume the node is not so old that it would not send node_id
# get node family
if ( ! isset($_REQUEST['node_id'])) {
- echo "# node_id is needed\n";
+ echo "# yum.php expects node_id to be set\n";
echo "# looks like you're running a very old NodeManager...\n";
echo "# bailing out..\n";
exit;
}
-
$node_id = intval($_REQUEST['node_id']);
$nodeflavour=$adm->GetNodeFlavour($node_id);
-$nodefcdistro=$nodeflavour['fcdistro'];
+$fcdistro=$nodeflavour['fcdistro'];
+
+if ( ! isset($_REQUEST['path'])) {
+ echo "# yum.php expect path to be set - bailing out\n";
+ exit;
+ }
+$path = $_REQUEST['path'];
-# try to open /var/www/html/yum/<fcdistro>/yum.myplc.d/stock.repo
-# otherwise use the static version in
-# /var/www/html/yum.legacy/stock.repo
-$fc_name="/var/www/html/yum/" . $fcdistro . "/yum.myplc.d/stock.repo";
-$fb_name="/var/www/html/yum.legacy/stock.repo";
+# try to open /var/www/html/yum/<fcdistro>/<path>
+$fc_name="/var/www/html/yum/" . $fcdistro . "/" . $path;
$fc_contents=file_get_contents($fc_name);
if ($fc_contents) {
- echo "# retrieved " . $fc_name . "\n";
+ echo "#\n";
+ echo "# yum.php has retrieved " . $fc_name . "\n";
+ echo "#\n";
print $fc_contents;
exit;
}
-$fb_contents=file_get_contents($fb_name);
-if ($fb_contents) {
- echo "# retrieved fallback (fcdistro " . $fcdistro " unknown) " . $fb_name . "\n";
- print $fb_contents;
- exit;
- }
-echo "# Could not find any of the following\n";
+echo "#\n";
+echo "# yum.php could not find the following path\n";
echo "# " . $fc_name . "\n";
-echo "# " . $fb_name . "\n";
-echo "# bailing out";
+echo "# bailing out\n";