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

15 files changed:
bootstrapfs.spec
nodeconfig/yum/centos5/yum.conf [new file with mode: 0644]
nodeconfig/yum/centos5/yum.myplc.d/CentOS-Base.repo.in [new file with mode: 0644]
nodeconfig/yum/centos5/yum.myplc.d/epel.repo.in [new file with mode: 0644]
nodeconfig/yum/f10/yum.conf [new file with mode: 0644]
nodeconfig/yum/f10/yum.myplc.d/fedora-updates.repo.in [new file with mode: 0644]
nodeconfig/yum/f10/yum.myplc.d/fedora.repo.in [new file with mode: 0644]
nodeconfig/yum/f12/yum.conf [new file with mode: 0644]
nodeconfig/yum/f12/yum.myplc.d/fedora-updates.repo.in [new file with mode: 0644]
nodeconfig/yum/f12/yum.myplc.d/fedora.repo.in [new file with mode: 0644]
nodeconfig/yum/f8/yum.conf [new file with mode: 0644]
nodeconfig/yum/f8/yum.myplc.d/fedora-updates.repo.in [new file with mode: 0644]
nodeconfig/yum/f8/yum.myplc.d/fedora.repo.in [new file with mode: 0644]
nodeconfig/yum/myplc.repo.php [new file with mode: 0644]
noderepo.spec

index fb9515a..90d07d3 100644 (file)
@@ -32,6 +32,10 @@ BuildArch: noarch
 
 Requires: tar, gnupg, sharutils, bzip2
 
+# 5.0 now has 3-fold nodefamily
+%define obsolete_nodefamily %{pldistro}-%{_arch}
+Obsoletes: bootstrapfs-%{obsolete_nodefamily}
+
 AutoReqProv: no
 %define debug_package %{nil}
 
@@ -46,6 +50,15 @@ Group: System Environment/Base
 %description plain
 This package provides the same functions as %{name} but with uncompressed tarball for faster tests.
 
+%package -n nodeyum
+Summary: the MyPLC-side utilities for tweaking nodes yum configs
+Group: System Environment/Base
+%description -n nodeyum 
+Utility scripts for configuring node updates. This package is designed
+for the MyPLC side.
+# need the apache user at install-time
+Requires: httpd 
+
 %prep
 %setup -q
 
@@ -54,6 +67,31 @@ pushd BootstrapFS
 ./build.sh %{pldistro} 
 popd BootstrapFS
 
+# xxx in a multi-flavour myplc, we should ship for all fcdistros
+# and let the php scripts do the right thing
+
+pushd BootstrapFS/nodeconfig/yum
+
+# expand list of kexcludes
+
+# scan fcdistros and catenate all repos in 'stock.repo' so db-config can be distro-independant
+
+for fcdistro in $(ls); do
+    [ -d $fcdistro ] || continue
+    KEXCLUDE="exclude=$(../../../build/getkexcludes.sh -f $fcdistro)"
+    pushd $fcdistro/yum.myplc.d
+    echo "* Handling KEXCLUDE in yum repo for $fcdistro ($KEXCLUDE)"
+    for filein in $(find . -name '*.in') ; do
+       file=$(echo $filein | sed -e "s,\.in$,,")
+       sed -e "s,@KEXCLUDE@,$KEXCLUDE,g" $filein > $file
+    done
+    rm -f stock.repo
+    cat *.repo > stock.repo
+    popd
+done
+
+popd
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -72,12 +110,28 @@ for pkgs in $(ls ../build/config.%{pldistro}/bootstrapfs-*.pkgs) ; do
     install -D -m 644 %{pldistro}-filesystems/bootstrapfs-${NAME}-%{extensionfamily}.tar \
                $RPM_BUILD_ROOT/var/www/html/boot/bootstrapfs-${NAME}-%{extensionfamily}.tar 
 done
+popd
 
+pushd BootstrapFS/nodeconfig/yum
+echo "* Installing MyPLC-side yum stuff"
+# 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
 popd
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post -n nodeyum
+# 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/boot/bootstrapfs*.tar.bz2
@@ -86,6 +140,10 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 /var/www/html/boot/bootstrapfs*.tar
 
+%files -n nodeyum
+%defattr(-,root,root,-)
+/var/www/html/yum
+
 %changelog
 * Mon Jan 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-11
 - for building on fedora12
diff --git a/nodeconfig/yum/centos5/yum.conf b/nodeconfig/yum/centos5/yum.conf
new file mode 100644 (file)
index 0000000..bfff95d
--- /dev/null
@@ -0,0 +1,22 @@
+[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/nodeconfig/yum/centos5/yum.myplc.d/CentOS-Base.repo.in b/nodeconfig/yum/centos5/yum.myplc.d/CentOS-Base.repo.in
new file mode 100644 (file)
index 0000000..be1e9c2
--- /dev/null
@@ -0,0 +1,62 @@
+# 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/nodeconfig/yum/centos5/yum.myplc.d/epel.repo.in b/nodeconfig/yum/centos5/yum.myplc.d/epel.repo.in
new file mode 100644 (file)
index 0000000..1a844c1
--- /dev/null
@@ -0,0 +1,29 @@
+[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/nodeconfig/yum/f10/yum.conf b/nodeconfig/yum/f10/yum.conf
new file mode 100644 (file)
index 0000000..13046c8
--- /dev/null
@@ -0,0 +1,10 @@
+[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/nodeconfig/yum/f10/yum.myplc.d/fedora-updates.repo.in b/nodeconfig/yum/f10/yum.myplc.d/fedora-updates.repo.in
new file mode 100644 (file)
index 0000000..2323288
--- /dev/null
@@ -0,0 +1,29 @@
+[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/nodeconfig/yum/f10/yum.myplc.d/fedora.repo.in b/nodeconfig/yum/f10/yum.myplc.d/fedora.repo.in
new file mode 100644 (file)
index 0000000..b7cea58
--- /dev/null
@@ -0,0 +1,29 @@
+[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/nodeconfig/yum/f12/yum.conf b/nodeconfig/yum/f12/yum.conf
new file mode 100644 (file)
index 0000000..13046c8
--- /dev/null
@@ -0,0 +1,10 @@
+[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/nodeconfig/yum/f12/yum.myplc.d/fedora-updates.repo.in b/nodeconfig/yum/f12/yum.myplc.d/fedora-updates.repo.in
new file mode 100644 (file)
index 0000000..2323288
--- /dev/null
@@ -0,0 +1,29 @@
+[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/nodeconfig/yum/f12/yum.myplc.d/fedora.repo.in b/nodeconfig/yum/f12/yum.myplc.d/fedora.repo.in
new file mode 100644 (file)
index 0000000..b7cea58
--- /dev/null
@@ -0,0 +1,29 @@
+[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/nodeconfig/yum/f8/yum.conf b/nodeconfig/yum/f8/yum.conf
new file mode 100644 (file)
index 0000000..13046c8
--- /dev/null
@@ -0,0 +1,10 @@
+[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/nodeconfig/yum/f8/yum.myplc.d/fedora-updates.repo.in b/nodeconfig/yum/f8/yum.myplc.d/fedora-updates.repo.in
new file mode 100644 (file)
index 0000000..9f9b7f6
--- /dev/null
@@ -0,0 +1,59 @@
+[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/nodeconfig/yum/f8/yum.myplc.d/fedora.repo.in b/nodeconfig/yum/f8/yum.myplc.d/fedora.repo.in
new file mode 100644 (file)
index 0000000..b7cea58
--- /dev/null
@@ -0,0 +1,29 @@
+[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/nodeconfig/yum/myplc.repo.php b/nodeconfig/yum/myplc.repo.php
new file mode 100644 (file)
index 0000000..a0e8d28
--- /dev/null
@@ -0,0 +1,55 @@
+<?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;
+}
+
+# we assume the node is not so old that it would not send node_id
+# get node family
+if ( ! isset($_REQUEST['node_id'])) {
+  echo "# myplc.repo.php: node_id is needed";
+  echo "# looks like you're running a very old NodeManager...";
+  echo "# bailing out..";
+  exit;
+ }
+
+$node_id = intval($_REQUEST['node_id']);
+$nodeflavour=$adm->GetNodeFlavour($node_id);
+$nodefamily=$nodeflavour['nodefamily'];
+
+$topdir=$_SERVER['DOCUMENT_ROOT'] . "/install-rpms/" . $nodefamily;
+$topurl="https://$PLC_BOOT_HOST" . "/install-rpms/" . $nodefamily;
+
+if (! is_dir (realpath($topdir))) {
+  echo "# WARNING: plc-side yum repo $topdir NOT FOUND !!";
+ }
+
+echo <<< __PLC_REPO__
+[$id]
+name=$name
+baseurl=$topurl
+gpgcheck=$gpgcheck
+
+__PLC_REPO__;
+
+?>
index dcf9ab6..f213061 100644 (file)
@@ -9,6 +9,7 @@
 # %{node_rpms_plus} : as a +++ separated list of rpms from the build dir
 
 %define nodefamily %{pldistro}-%{distroname}-%{_arch}
+%define obsolete_nodefamily %{pldistro}-%{_arch}
 
 %define name noderepo-%{nodefamily}
 %define version 2.0
@@ -37,6 +38,10 @@ BuildArch: noarch
 BuildRequires: rsync 
 Requires: myplc
 
+# 5.0 now has 3-fold nodefamily
+%define obsolete_nodefamily %{pldistro}-%{_arch}
+Obsoletes: noderepo-%{obsolete_nodefamily}
+
 %define debug_package %{nil}
 
 %description