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.45.2.7 2007/02/09 01:34:38 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
34 # Check if a tag has been checked out
35 ifneq ($(wildcard CVS/Root),)
36 # Check if we are able to access CVS
37 CVSTAG := $(shell cvs status planetlab.mk 2>/dev/null | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[:space:]]*\).*/\1/p')
39 CVSROOT := $(shell cat CVS/Root)
40 ifeq ($(CVSTAG),(none))
52 kernel-MODULE := linux-2.6
53 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
61 vnet-SPEC := vnet/vnet.spec
64 # Build kernel first so we can bootstrap off of its build
71 util-vserver-MODULE := util-vserver
72 util-vserver-SPEC := util-vserver/util-vserver.spec
73 util-vserver-RPMFLAGS:= --without dietlibc
80 PlanetLabAccounts-MODULE := PlanetLabAccounts
81 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
82 ALL += PlanetLabAccounts
88 NodeUpdate-MODULE := NodeUpdate
89 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
96 PlanetLabConf-MODULE := PlanetLabConf
97 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
105 ipod-SPEC := ipod/ipod.spec
113 sudo-SPEC := sudo/planetlab_sudo.spec
120 pycurl-MODULE := pycurl
121 pycurl-SPEC := pycurl/pycurl.spec
128 BootServerRequest-MODULE := BootServerRequest
129 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
130 ALL += BootServerRequest
136 PlanetLabID-MODULE := PlanetLabID
137 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
144 NodeManager-MODULE := NodeManager
145 NodeManager-SPEC := NodeManager/NodeManager.spec
152 pl_sshd-MODULE := pl_sshd
153 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
160 libhttpd++-MODULE := libhttpd++
161 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
165 # Proper: Privileged Operations Service
168 proper-MODULE := proper
169 proper-SPEC := proper/proper.spec
178 mysql-MODULE := mysql
179 mysql-SPEC := mysql/mysql.spec
186 ulogd-MODULE := ulogd
187 ulogd-SPEC := ulogd/ulogd.spec
190 ulogd: kernel proper mysql
196 netflow-MODULE := netflow
197 netflow-SPEC := netflow/netflow.spec
203 # PlanetLab Mom: Cleans up your mess
206 pl_mom-MODULE := pl_mom
207 pl_mom-SPEC := pl_mom/pl_mom.spec
214 iptables-MODULE := iptables
215 iptables-SPEC := iptables/iptables.spec
224 iproute-MODULE := iproute2
225 iproute-SPEC := iproute2/iproute.spec
232 kexec-tools-MODULE := kexec-tools
233 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
240 util-python-MODULE := util-python
241 util-python-SPEC := util-python/util-python.spec
244 # proper and util-vserver both use scripts in util-python for building
246 util-vserver: util-python
247 PlanetLabAuth: util-python
253 PLCAPI-MODULE := new_plc_api
254 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
261 vserver-reference-MODULE := vserver-reference build
262 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
263 # Package must be built as root
264 vserver-reference-RPMBUILD := sudo rpmbuild
265 ALL += vserver-reference
267 # vserver-reference may require current packages
268 vserver-reference: $(filter-out vserver-reference,$(ALL))
274 bootmanager-MODULE := bootmanager build
275 bootmanager-SPEC := bootmanager/bootmanager.spec
276 bootmanager-RPMBUILD := sudo rpmbuild
279 # bootmanager requires current packages
280 bootmanager: $(filter-out bootmanager,$(ALL))
282 # ...and the yum manifest
283 bootmanager: RPMS/yumgroups.xml
289 bootcd-MODULE := bootcd build bootmanager
290 bootcd-SPEC := bootcd/bootcd.spec
291 bootcd-RPMBUILD := sudo rpmbuild
294 # bootcd requires current packages
295 bootcd: $(filter-out bootcd,$(ALL))
301 myplc-MODULE := build myplc new_plc_www plc/scripts
302 myplc-SPEC := myplc/myplc.spec
303 # Package must be built as root
304 myplc-RPMBUILD := sudo rpmbuild
307 # MyPLC may require current packages
308 myplc: $(filter-out myplc,$(ALL))
310 # ...and the yum manifest
311 myplc: RPMS/yumgroups.xml
314 # MyPLC development environment
317 myplc-devel-MODULE := build myplc
318 myplc-devel-SPEC := myplc/myplc-devel.spec
319 # Package must be built as root
320 myplc-devel-RPMBUILD := sudo rpmbuild
327 # Upload packages to boot server
328 SERVER := build@boot.planet-lab.org
329 ARCHIVE := /plc/data/var/www/html/install-rpms/archive
331 # Put nightly alpha builds in a subdirectory
333 ARCHIVE := $(ARCHIVE)/planetlab-alpha
334 REPOS := /plc/data/var/www/html/install-rpms/planetlab-alpha
338 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
342 @echo make install is only meant to be called from ./build.sh
344 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
345 # Sign all RPMS. setsid detaches rpm from the terminal,
346 # allowing the (hopefully blank) GPG password to be entered
347 # from stdin instead of /dev/tty. Obviously, the build server
350 --define "_signature gpg" \
351 --define "_gpg_path /etc/planetlab" \
352 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
353 --resign RPMS/*/*.rpm
357 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
359 # Create package manifest
360 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
361 # Update yum metadata
362 yum-arch RPMS >/dev/null
363 createrepo -g yumgroups.xml RPMS >/dev/null
364 # Populate repository
366 --exclude '*-debuginfo-*' \
367 --recursive --links --perms --times --group --compress --rsh=ssh \
368 RPMS/ $(SERVER):$(ARCHIVE)/$(BASE)
370 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
371 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
372 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \