2 # PlanetLab standard components list
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2003-2006 The Trustees of Princeton University
7 # $Id: planetlab.mk,v 1.21 2006/06/01 20:52:57 mlhuang Exp $
13 # CVSROOT or package-CVSROOT: CVSROOT to use
14 # TAG or package-TAG: CVS tag to use
15 # package-MODULE: CVS module name to use
16 # package-SPEC: RPM spec file template
20 # package-RPMFLAGS: Miscellaneous RPM flags
21 # package-RPMBUILD: If not rpmbuild
22 # package-CVS_RSH: If not ssh
24 # Add to ALL if you want the package built as part of the default set.
31 CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
38 kernel-MODULE := linux-2.6
39 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
47 vnet-SPEC := vnet/vnet.spec
50 # Build kernel first so we can bootstrap off of its build
57 util-vserver-MODULE := util-vserver
58 util-vserver-SPEC := util-vserver/util-vserver.spec
65 lkcdutils-MODULE := lkcdutils
66 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
69 # Build kernel first so we can bootstrap off of its build
77 yum-SPEC := yum/yum.spec
84 ksymoops-MODULE := ksymoops
85 ksymoops-SPEC := ksymoops/ksymoops.spec
92 PlanetLabAccounts-MODULE := PlanetLabAccounts
93 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
94 ALL += PlanetLabAccounts
100 NodeUpdate-MODULE := NodeUpdate
101 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
108 PlanetLabConf-MODULE := PlanetLabConf
109 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
117 ipod-SPEC := ipod/ipod.spec
125 sudo-SPEC := sudo/planetlab_sudo.spec
132 pycurl-MODULE := pycurl
133 pycurl-SPEC := pycurl/pycurl.spec
140 BootServerRequest-MODULE := BootServerRequest
141 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
142 ALL += BootServerRequest
148 PlanetLabID-MODULE := PlanetLabID
149 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
156 sidewinder-MODULE := sidewinder
157 sidewinder-SPEC := sidewinder/sidewinder.spec
164 pl_sshd-MODULE := pl_sshd
165 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
172 libhttpd++-MODULE := libhttpd++
173 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
177 # Proper: Privileged Operations Service
180 proper-MODULE := proper
181 proper-SPEC := proper/proper.spec
190 ulogd-MODULE := ulogd
191 ulogd-SPEC := ulogd/ulogd.spec
200 netflow-MODULE := netflow
201 netflow-SPEC := netflow/netflow.spec
205 # PlanetLab Mom: Cleans up your mess
208 pl_mom-MODULE := pl_mom
209 pl_mom-SPEC := pl_mom/pl_mom.spec
216 iptables-MODULE := iptables
217 iptables-SPEC := iptables/iptables.spec
226 iproute-MODULE := iproute2
227 iproute-SPEC := iproute2/iproute.spec
234 kexec-tools-MODULE := kexec-tools
235 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
243 dhcp-SPEC := dhcp/dhcp.spec
250 util-python-MODULE := util-python
251 util-python-SPEC := util-python/util-python.spec
254 # proper and util-vserver both use scripts in util-python for building
256 util-vserver: util-python
263 pl_auth-MODULE := pl_auth
264 pl_auth-SPEC := pl_auth/pl_auth.spec
271 plcapilib-MODULE := plcmdline
272 plcapilib-SPEC := plcmdline/plcapilib.spec
279 vserver-reference-MODULE := vserver-reference build
280 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
281 # Package must be built as root
282 vserver-reference-RPMBUILD := sudo rpmbuild
283 ALL += vserver-reference
285 # vserver-reference may require current packages
286 vserver-reference: $(filter-out vserver-reference,$(ALL))
292 bootmanager-MODULE := bootmanager build
293 bootmanager-SPEC := bootmanager/bootmanager.spec
294 bootmanager-RPMBUILD := sudo rpmbuild
297 # bootmanager requires current packages
298 bootmanager: $(filter-out bootmanager,$(ALL))
300 # ...and the yum manifest
301 bootmanager: RPMS/yumgroups.xml
307 bootcd-MODULE := bootcd build bootmanager
308 bootcd-SPEC := bootcd/bootcd.spec
309 bootcd-RPMBUILD := sudo rpmbuild
312 # bootcd requires current packages
313 bootcd: $(filter-out bootcd,$(ALL))
319 myplc-MODULE := myplc build pl_db plc_api plc_www plc/scripts
320 myplc-SPEC := myplc/myplc.spec
321 # Package must be built as root
322 myplc-RPMBUILD := sudo rpmbuild
325 # MyPLC may require current packages
326 myplc: $(filter-out myplc,$(ALL))
328 # ...and the yum manifest
329 myplc: RPMS/yumgroups.xml
335 # Upload packages to boot server
336 SERVER := build@boot.planet-lab.org
337 ARCHIVE := /var/www/html/install-rpms/archive
339 # Put nightly alpha builds in a subdirectory
341 ARCHIVE := $(ARCHIVE)/planetlab-alpha
342 REPOS := /var/www/html/install-rpms/planetlab-alpha
346 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
350 @echo make install is only meant to be called from ./build.sh
352 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
353 # Sign all RPMS. setsid detaches rpm from the terminal,
354 # allowing the (hopefully blank) GPG password to be entered
355 # from stdin instead of /dev/tty. Obviously, the build server
358 --define "_signature gpg" \
359 --define "_gpg_path /etc/planetlab" \
360 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
361 --resign RPMS/*/*.rpm SRPMS/*.rpm
365 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
367 # Create package manifest
368 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/SRPMS" SRPMS > SRPMS/packages.xml
369 # Populate repository
370 ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
371 rsync --delete --links --perms --times --group --compress --rsh=ssh \
372 $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*.rpm))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
373 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
374 ssh $(SERVER) createrepo -g yumgroups.xml $(ARCHIVE)/$(BASE)/RPMS >/dev/null
375 rsync --delete --links --perms --times --group --compress --rsh=ssh \
376 $(wildcard SRPMS/*.rpm) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
377 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
378 ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
380 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
381 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
382 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE)/RPMS/ $(REPOS) ; \