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.53 2007/03/02 21:12:49 faiyaza 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-x86_64-MODULE := linux-2.6
53 kernel-x86_64-RPMFLAGS:= --target x86_64
54 kernel-x86_64-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
57 kernel-i686-MODULE := linux-2.6
58 kernel-i686-RPMFLAGS:= --target i686
59 kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
62 kernel-i586-MODULE := linux-2.6
63 kernel-i586-RPMFLAGS:= --target i586
64 kernel-i586-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
67 kernel: kernel-i586 kernel-i686
68 kernel-clean: kernel-i586-clean kernel-i686-clean
75 vnet-SPEC := vnet/vnet.spec
78 # Build kernel first so we can bootstrap off of its build
85 madwifi-ng-MODULE := madwifi-ng
86 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
89 # Build kernel first so we can bootstrap off of its build
97 #ivtv-SPEC := ivtv/ivtv.spec
104 util-vserver-MODULE := util-vserver
105 util-vserver-SPEC := util-vserver/util-vserver.spec
106 util-vserver-RPMFLAGS:= --without dietlibc
113 PlanetLabAccounts-MODULE := PlanetLabAccounts
114 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
115 ALL += PlanetLabAccounts
121 NodeUpdate-MODULE := NodeUpdate
122 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
129 PlanetLabConf-MODULE := PlanetLabConf
130 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
138 ipod-SPEC := ipod/ipod.spec
146 sudo-SPEC := sudo/planetlab_sudo.spec
153 pycurl-MODULE := pycurl
154 pycurl-SPEC := pycurl/pycurl.spec
161 BootServerRequest-MODULE := BootServerRequest
162 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
163 ALL += BootServerRequest
169 PlanetLabID-MODULE := PlanetLabID
170 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
177 NodeManager-MODULE := NodeManager
178 NodeManager-SPEC := NodeManager/NodeManager.spec
185 pl_sshd-MODULE := pl_sshd
186 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
193 libhttpd++-MODULE := libhttpd++
194 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
198 # Proper: Privileged Operations Service
201 proper-MODULE := proper
202 proper-SPEC := proper/proper.spec
208 # CoDemux: Port 80 demux
211 codemux-MODULE := codemux
212 codemux-SPEC := codemux/codemux.spec
219 mysql-MODULE := mysql
220 mysql-SPEC := mysql/mysql.spec
227 ulogd-MODULE := ulogd
228 ulogd-SPEC := ulogd/ulogd.spec
231 ulogd: kernel proper mysql
237 netflow-MODULE := netflow
238 netflow-SPEC := netflow/netflow.spec
244 # PlanetLab Mom: Cleans up your mess
247 pl_mom-MODULE := pl_mom
248 pl_mom-SPEC := pl_mom/pl_mom.spec
255 iptables-MODULE := iptables
256 iptables-SPEC := iptables/iptables.spec
265 iproute-MODULE := iproute2
266 iproute-SPEC := iproute2/iproute.spec
273 kexec-tools-MODULE := kexec-tools
274 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
281 util-python-MODULE := util-python
282 util-python-SPEC := util-python/util-python.spec
285 # proper and util-vserver both use scripts in util-python for building
287 util-vserver: util-python
288 PlanetLabAuth: util-python
294 PLCAPI-MODULE := new_plc_api
295 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
302 vserver-reference-MODULE := vserver-reference build
303 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
304 # Package must be built as root
305 vserver-reference-RPMBUILD := sudo rpmbuild
306 ALL += vserver-reference
308 # vserver-reference may require current packages
309 vserver-reference: $(filter-out vserver-reference,$(ALL))
315 bootmanager-MODULE := bootmanager build
316 bootmanager-SPEC := bootmanager/bootmanager.spec
317 bootmanager-RPMBUILD := sudo rpmbuild
320 # bootmanager requires current packages
321 bootmanager: $(filter-out bootmanager,$(ALL))
323 # ...and the yum manifest
324 bootmanager: RPMS/yumgroups.xml
330 bootcd-MODULE := bootcd build bootmanager
331 bootcd-SPEC := bootcd/bootcd.spec
332 bootcd-RPMBUILD := sudo rpmbuild
335 # bootcd requires current packages
336 bootcd: $(filter-out bootcd,$(ALL))
342 myplc-MODULE := build myplc new_plc_www plc/scripts
343 myplc-SPEC := myplc/myplc.spec
344 # Package must be built as root
345 myplc-RPMBUILD := sudo rpmbuild
348 # MyPLC may require current packages
349 myplc: $(filter-out myplc,$(ALL))
351 # ...and the yum manifest
352 myplc: RPMS/yumgroups.xml
355 # MyPLC development environment
358 myplc-devel-MODULE := build myplc
359 myplc-devel-SPEC := myplc/myplc-devel.spec
360 # Package must be built as root
361 myplc-devel-RPMBUILD := sudo rpmbuild
368 # Upload packages to boot server
369 SERVERA := build@boot1.planet-lab.org
370 SERVERB := build@boot2.planet-lab.org
371 ARCHIVE := /plc/data/var/www/html/install-rpms/archive
373 # Put nightly alpha builds in a subdirectory
375 ARCHIVE := $(ARCHIVE)/planetlab-alpha
376 REPOS := /plc/data/var/www/html/install-rpms/planetlab-alpha
380 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
384 @echo make install is only meant to be called from ./build.sh
386 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
387 # Sign all RPMS. setsid detaches rpm from the terminal,
388 # allowing the (hopefully blank) GPG password to be entered
389 # from stdin instead of /dev/tty. Obviously, the build server
392 --define "_signature gpg" \
393 --define "_gpg_path /etc/planetlab" \
394 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
395 --resign RPMS/*/*.rpm
399 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERA) /bin/bash -s
400 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERB) /bin/bash -s
402 # Create package manifest
403 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
404 # Update yum metadata
405 yum-arch RPMS >/dev/null
406 createrepo -g yumgroups.xml RPMS >/dev/null
407 # Populate repository
409 --exclude '*-debuginfo-*' \
410 --recursive --links --perms --times --group --compress --rsh=ssh \
411 RPMS/ $(SERVERA):$(ARCHIVE)/$(BASE)
413 --exclude '*-debuginfo-*' \
414 --recursive --links --perms --times --group --compress --rsh=ssh \
415 RPMS/ $(SERVERB):$(ARCHIVE)/$(BASE)
417 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
418 if ! ssh $(SERVERA) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
419 ssh $(SERVERA) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \
421 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
422 if ! ssh $(SERVERB) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
423 ssh $(SERVERB) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \