plc.d/packages part of nodeyum
[bootstrapfs.git] / bootstrapfs.spec
index 90d07d3..4861868 100644 (file)
@@ -56,8 +56,6 @@ 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
@@ -65,19 +63,16 @@ Requires: httpd
 %build
 pushd BootstrapFS
 ./build.sh %{pldistro} 
-popd BootstrapFS
+popd
 
 # 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
+    # get kexcludes for that distro
     KEXCLUDE="exclude=$(../../../build/getkexcludes.sh -f $fcdistro)"
     pushd $fcdistro/yum.myplc.d
     echo "* Handling KEXCLUDE in yum repo for $fcdistro ($KEXCLUDE)"
@@ -89,7 +84,6 @@ for fcdistro in $(ls); do
     cat *.repo > stock.repo
     popd
 done
-
 popd
 
 %install
@@ -112,25 +106,32 @@ for pkgs in $(ls ../build/config.%{pldistro}/bootstrapfs-*.pkgs) ; do
 done
 popd
 
-pushd BootstrapFS/nodeconfig/yum
-echo "* Installing MyPLC-side yum stuff"
+pushd BootstrapFS
+echo "* Installing MyPLC-side nodes yum config utilities"
 # 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
+install -D -m 644 ./nodeconfig/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
+install -D -m 644 ./nodeconfig/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 -D -m 644 ./nodeconfig/yum/%{distroname}/yum.myplc.d/stock.repo            $RPM_BUILD_ROOT/var/www/html/yum/stock.repo
+
+# Install initscripts
+echo "* Installing plc.d initscripts"
+find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/
+chmod 755 ${RPM_BUILD_ROOT}/etc/plc.d/*
+
+popd
+
+pushd BootstrapFS
+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 -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,-)
@@ -143,6 +144,8 @@ chmod 700 /var/log/bm
 %files -n nodeyum
 %defattr(-,root,root,-)
 /var/www/html/yum
+/etc/planetlab/db-config.d
+/etc/plc.d
 
 %changelog
 * Mon Jan 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-11