oops, wrong name
[build.git] / onelab-install.mk
index 688cc0c..b5422d9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Thierry Parmentelat - INRIA Sophia Antipolis 
 #
-### $Id: onelab-install.mk 685 2007-07-19 09:01:41Z thierry $
+### $Id$
 # 
 # Installation rules
 # 
@@ -23,10 +23,9 @@ PLCSSH               := root@private.one-lab.org
 endif
 
 RPMSAREA       := /var/www/html/install-rpms/
-BOOTAREA       := /var/www/html/boot/
 
-#BASE          := onelab
-BASENEW                := build-$(notdir $(shell pwd))
+BUILD_BASE     := $(shell cat .base 2> /dev/null || echo base-undefined)
+BASENEW                := build-$(BUILD_BASE)
 BASEBAK                := planetlab-bak
 BASE           := planetlab
 
@@ -42,12 +41,16 @@ install: $(INSTALL-TARGETS)
 install-help:
        @echo install: $(INSTALL-TARGETS)
 
+# compute the exact set of rpms to install - we do not need bootstrapfs nor myplc here
+node_packages=$(sort $(IN_VSERVER) $(IN_BOOTSTRAPFS))
+node_rpms=$(foreach package,$(node_packages),$($(package).rpms))
+
 install-rpms:RPMS/yumgroups.xml
         # create repository
        ssh $(PLCSSH) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
        # populate
        +$(RSYNC) -v --perms --times --group --compress --rsh=ssh \
-          RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(PLCSSH):/plc/data/$(RPMSAREA)/$(BASENEW)/
+          RPMS/yumgroups.xml $(node_rpms) $(PLCSSH):/plc/data/$(RPMSAREA)/$(BASENEW)/
 
 install-index:
        # sign and index new repository
@@ -67,7 +70,4 @@ install-adopt:
 
 install-bootstrap:
        # install node image
-       install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
-         if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(PLCSSH):/plc/data/$(BOOTAREA) ; fi
-
-
+       ssh $(PLCSSH) chroot /plc/root yum -y update bootstrapfs