From ab7afb6747c5e5357de2b64a1bc47dc85df21771 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 25 Jun 2008 08:26:01 +0000 Subject: [PATCH] remove now obsolete install targets --- Makefile | 9 ----- onelab-install.mk | 78 -------------------------------------------- planetlab-install.mk | 72 ---------------------------------------- 3 files changed, 159 deletions(-) delete mode 100644 onelab-install.mk delete mode 100644 planetlab-install.mk diff --git a/Makefile b/Makefile index 4ddedc80..7250115d 100644 --- a/Makefile +++ b/Makefile @@ -650,15 +650,6 @@ $(foreach package,$(sort $(ALL)), $(eval $(call rpm_version_target,$(package)))) versions: myplc-release version-build version-svns version-rpms .PHONY: versions version-build version-rpms version-svns -#################### include install Makefile -# the default is to use the distro-dependent install file -# however the main distro file can redefine PLDISTROINSTALL -ifndef PLDISTROINSTALL -PLDISTROINSTALL := $(PLDISTRO)-install.mk -endif -# only if present --include $(PLDISTROINSTALL) - #################### package info PKGKEYS := tarballs source codebase srpm rpms rpmnames rpm-release rpm-name rpm-version rpm-subversion %-pkginfo: package=$(subst -pkginfo,,$@) diff --git a/onelab-install.mk b/onelab-install.mk deleted file mode 100644 index 0d54a306..00000000 --- a/onelab-install.mk +++ /dev/null @@ -1,78 +0,0 @@ -# -# Thierry Parmentelat - INRIA Sophia Antipolis -# -### $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, -# and then renames it into planetlab - -# Upload packages to boot server - -# use PLCHOST if set -ifdef PLCHOST -PLCSSH:=root@$(PLCHOST) -endif -# if nothing's defined : use this default -ifndef PLCSSH -PLCSSH := root@private.one-lab.org -endif - -RPMSAREA := /var/www/html/install-rpms/ - -BUILD_BASE := $(shell cat .base 2> /dev/null || echo base-undefined) -BASENEW := build-$(BUILD_BASE) -BASEBAK := planetlab-bak -BASE := planetlab - -########## -# if make is invoked with -n, run rsync, but with --dry-run -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-obsolete: $(INSTALL-TARGETS) -.PHONY: install install-obsolete $(INSTALL-TARGETS) - -install-help: - @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 $(node_rpms) $(PLCSSH):/plc/data/$(RPMSAREA)/$(BASENEW)/ - -install-index: - # sign and index new repository - ssh $(PLCSSH) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log - -install-clean-index: - # sign and index new repository - ssh $(PLCSSH) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log - -install-adopt: - # cleanup former bak - ssh $(PLCSSH) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK) - # bak previous repo - ssh $(PLCSSH) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK) - # install new repo - ssh $(PLCSSH) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE) - -install-bootstrap: - # install node image - ssh $(PLCSSH) chroot /plc/root yum -y update bootstrapfs diff --git a/planetlab-install.mk b/planetlab-install.mk deleted file mode 100644 index d1a289a4..00000000 --- a/planetlab-install.mk +++ /dev/null @@ -1,72 +0,0 @@ -#XXX We need to rethink this installation support for several reasons: -# 1) it is pldistro specific -# 2) may involve installing files for different node groups (e.g., alpha, beta, etc.) -# 3) may involve N rpm repositories to where it should be uploaded -# -# Not clear to me at all that this should be incorporated into a -# Makefile at all. Instead it should be something that gets wrapped -# into a myplc (sub) rpm package and then is installed by that way. - -# -# Installation rules -# - -# Upload packages to boot server -SERVERA := build@boot1.planet-lab.org -SERVERB := build@boot2.planet-lab.org -ARCHIVE := /plc/data/var/www/html/install-rpms/archive - -# Put nightly alpha builds in a subdirectory -ifeq ($(TAG),HEAD) -ARCHIVE := $(ARCHIVE)/planetlab-alpha -REPOS := /plc/data/var/www/html/install-rpms/planetlab-alpha -endif - -install: -ifeq ($(BASE),) - @echo make install is only meant to be called from ./build.sh -else -ifneq ($(wildcard /etc/planetlab/secring.gpg),) - # Sign all RPMS. setsid detaches rpm from the terminal, - # allowing the (hopefully blank) GPG password to be entered - # from stdin instead of /dev/tty. Obviously, the build server - # should be secure. - echo | setsid rpm \ - --define "_signature gpg" \ - --define "_gpg_path /etc/planetlab" \ - --define "_gpg_name PlanetLab " \ - --resign RPMS/*/*.rpm -endif -ifneq ($(BUILDS),) - # Remove old runs - echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERA) /bin/bash -s - echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERB) /bin/bash -s -endif - # Create package manifest - sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml - # Update yum metadata - yum-arch RPMS >/dev/null - createrepo -g yumgroups.xml RPMS >/dev/null - # Populate repository - rsync \ - --exclude '*-debuginfo-*' \ - --recursive --links --perms --times --group --compress --rsh=ssh \ - RPMS/ $(SERVERA):$(ARCHIVE)/$(BASE) - rsync \ - --exclude '*-debuginfo-*' \ - --recursive --links --perms --times --group --compress --rsh=ssh \ - RPMS/ $(SERVERB):$(ARCHIVE)/$(BASE) -ifeq ($(TAG),HEAD) - # Update nightly alpha symlink if it does not exist or is broken, or it is Monday - if ! ssh $(SERVERA) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \ - ssh $(SERVERA) ln -nsf archive/$(BASE) $(REPOS) ; \ - fi - # Update nightly alpha symlink if it does not exist or is broken, or it is Monday - if ! ssh $(SERVERB) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \ - ssh $(SERVERB) ln -nsf archive/$(BASE) $(REPOS) ; \ - fi - -endif -endif - -.PHONY: install -- 2.43.0