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.6 2007/02/08 15:18:37 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-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
211 mysql-MODULE := mysql
212 mysql-SPEC := mysql/mysql.spec
219 ulogd-MODULE := ulogd
220 ulogd-SPEC := ulogd/ulogd.spec
223 ulogd: kernel proper mysql
229 netflow-MODULE := netflow
230 netflow-SPEC := netflow/netflow.spec
236 # PlanetLab Mom: Cleans up your mess
239 pl_mom-MODULE := pl_mom
240 pl_mom-SPEC := pl_mom/pl_mom.spec
247 iptables-MODULE := iptables
248 iptables-SPEC := iptables/iptables.spec
257 iproute-MODULE := iproute2
258 iproute-SPEC := iproute2/iproute.spec
265 kexec-tools-MODULE := kexec-tools
266 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
273 util-python-MODULE := util-python
274 util-python-SPEC := util-python/util-python.spec
277 # proper and util-vserver both use scripts in util-python for building
279 util-vserver: util-python
280 PlanetLabAuth: util-python
286 PLCAPI-MODULE := new_plc_api
287 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
294 vserver-reference-MODULE := vserver-reference build
295 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
296 # Package must be built as root
297 vserver-reference-RPMBUILD := sudo rpmbuild
298 ALL += vserver-reference
300 # vserver-reference may require current packages
301 vserver-reference: $(filter-out vserver-reference,$(ALL))
307 bootmanager-MODULE := bootmanager build
308 bootmanager-SPEC := bootmanager/bootmanager.spec
309 bootmanager-RPMBUILD := sudo rpmbuild
312 # bootmanager requires current packages
313 bootmanager: $(filter-out bootmanager,$(ALL))
315 # ...and the yum manifest
316 bootmanager: RPMS/yumgroups.xml
322 bootcd-MODULE := bootcd build bootmanager
323 bootcd-SPEC := bootcd/bootcd.spec
324 bootcd-RPMBUILD := sudo rpmbuild
327 # bootcd requires current packages
328 bootcd: $(filter-out bootcd,$(ALL))
334 myplc-MODULE := build myplc new_plc_www plc/scripts
335 myplc-SPEC := myplc/myplc.spec
336 # Package must be built as root
337 myplc-RPMBUILD := sudo rpmbuild
340 # MyPLC may require current packages
341 myplc: $(filter-out myplc,$(ALL))
343 # ...and the yum manifest
344 myplc: RPMS/yumgroups.xml
347 # MyPLC development environment
350 myplc-devel-MODULE := build myplc
351 myplc-devel-SPEC := myplc/myplc-devel.spec
352 # Package must be built as root
353 myplc-devel-RPMBUILD := sudo rpmbuild
360 # Upload packages to boot server
361 SERVER := build@boot.planet-lab.org
362 ARCHIVE := /plc/data/var/www/html/install-rpms/archive
364 # Put nightly alpha builds in a subdirectory
366 ARCHIVE := $(ARCHIVE)/planetlab-alpha
367 REPOS := /plc/data/var/www/html/install-rpms/planetlab-alpha
371 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
375 @echo make install is only meant to be called from ./build.sh
377 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
378 # Sign all RPMS. setsid detaches rpm from the terminal,
379 # allowing the (hopefully blank) GPG password to be entered
380 # from stdin instead of /dev/tty. Obviously, the build server
383 --define "_signature gpg" \
384 --define "_gpg_path /etc/planetlab" \
385 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
386 --resign RPMS/*/*.rpm
390 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
392 # Create package manifest
393 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
394 # Update yum metadata
395 yum-arch RPMS >/dev/null
396 createrepo -g yumgroups.xml RPMS >/dev/null
397 # Populate repository
399 --exclude '*-debuginfo-*' \
400 --recursive --links --perms --times --group --compress --rsh=ssh \
401 RPMS/ $(SERVER):$(ARCHIVE)/$(BASE)
403 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
404 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
405 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \