#
# Thierry Parmentelat - INRIA Sophia Antipolis
#
-### $Id: onelab-install.mk 685 2007-07-19 09:01:41Z thierry $
+### $Id$
#
# Installation rules
#
+install:
+ @echo WARNING: this target is deprecated
+ @echo you might siwh to use the noderepo rpm instead
+ @echo former behaviour is available throuhg make install-obsolete
+
# make install :
# uses $(PLCSSH) as an ssh address for the destination host
# first copies everything on a separate rpm repo, prepares it,
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
RSYNC := rsync $(RSYNC_COND_DRY_RUN)
INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
-install: $(INSTALL-TARGETS)
-.PHONY: install $(INSTALL-TARGETS)
+install-obsolete: $(INSTALL-TARGETS)
+.PHONY: install install-obsolete $(INSTALL-TARGETS)
install-help:
- @echo install: $(INSTALL-TARGETS)
+ @echo install-obsolete: $(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
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