1 #XXX We need to rethink this installation support for several reasons:
2 # 1) it is pldistro specific
3 # 2) may involve installing files for different node groups (e.g., alpha, beta, etc.)
4 # 3) may involve N rpm repositories to where it should be uploaded
6 # Not clear to me at all that this should be incorporated into a
7 # Makefile at all. Instead it should be something that gets wrapped
8 # into a myplc (sub) rpm package and then is installed by that way.
14 # Upload packages to boot server
15 SERVERA := build@boot1.planet-lab.org
16 SERVERB := build@boot2.planet-lab.org
17 ARCHIVE := /plc/data/var/www/html/install-rpms/archive
19 # Put nightly alpha builds in a subdirectory
21 ARCHIVE := $(ARCHIVE)/planetlab-alpha
22 REPOS := /plc/data/var/www/html/install-rpms/planetlab-alpha
27 @echo make install is only meant to be called from ./build.sh
29 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
30 # Sign all RPMS. setsid detaches rpm from the terminal,
31 # allowing the (hopefully blank) GPG password to be entered
32 # from stdin instead of /dev/tty. Obviously, the build server
35 --define "_signature gpg" \
36 --define "_gpg_path /etc/planetlab" \
37 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
42 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERA) /bin/bash -s
43 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERB) /bin/bash -s
45 # Create package manifest
46 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
48 yum-arch RPMS >/dev/null
49 createrepo -g yumgroups.xml RPMS >/dev/null
52 --exclude '*-debuginfo-*' \
53 --recursive --links --perms --times --group --compress --rsh=ssh \
54 RPMS/ $(SERVERA):$(ARCHIVE)/$(BASE)
56 --exclude '*-debuginfo-*' \
57 --recursive --links --perms --times --group --compress --rsh=ssh \
58 RPMS/ $(SERVERB):$(ARCHIVE)/$(BASE)
60 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
61 if ! ssh $(SERVERA) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
62 ssh $(SERVERA) ln -nsf archive/$(BASE) $(REPOS) ; \
64 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
65 if ! ssh $(SERVERB) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
66 ssh $(SERVERB) ln -nsf archive/$(BASE) $(REPOS) ; \