X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=onelab-install.mk;h=0d54a3060dd912dfb25a11e2cfcc190e8d23de20;hb=634bec7f5fef0f85ee37a0a4f4f2daf5c3fc8dfd;hp=238104fa5ac410ee55389fcf33e5070bc36bcdfd;hpb=1e0179dbedc1b50d514f64a4821b354b14c93ba9;p=build.git diff --git a/onelab-install.mk b/onelab-install.mk index 238104fa..0d54a306 100644 --- a/onelab-install.mk +++ b/onelab-install.mk @@ -1,11 +1,16 @@ # # 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, @@ -24,8 +29,8 @@ endif RPMSAREA := /var/www/html/install-rpms/ -#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 @@ -35,18 +40,22 @@ RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,) 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 @@ -67,5 +76,3 @@ install-adopt: install-bootstrap: # install node image ssh $(PLCSSH) chroot /plc/root yum -y update bootstrapfs - -