2 # PlanetLab standard components list
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2003-2006 The Trustees of Princeton University
7 # $Id: onelab.mk,v 1.8 2007/02/14 08:47:15 thierry 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
33 # build based on the latest release candidate
34 TAG := planetlab-4_0-rc1
36 # Check if a tag has been checked out
37 ifneq ($(wildcard CVS/Root),)
38 # Check if we are able to access CVS
39 CVSTAG := $(shell cvs status planetlab.mk 2>/dev/null | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[:space:]]*\).*/\1/p')
41 CVSROOT := $(shell cat CVS/Root)
42 ifeq ($(CVSTAG),(none))
54 #kernel-x86_64-MODULE := linux-2.6
55 #kernel-x86_64-RPMFLAGS:= --target x86_64
56 #kernel-x86_64-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
57 ##ALL += kernel-x86_64
59 kernel-i686-MODULE := linux-2.6
60 kernel-i686-RPMFLAGS:= --target i686
61 kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
64 #kernel-i586-MODULE := linux-2.6
65 #kernel-i586-RPMFLAGS:= --target i586
66 #kernel-i586-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
69 #kernel: kernel-i586 kernel-i686
70 #kernel-clean: kernel-i586-clean kernel-i686-clean
72 kernel-clean: kernel-i686-clean
79 vnet-SPEC := vnet/vnet.spec
82 # Build kernel first so we can bootstrap off of its build
89 madwifi-ng-MODULE := madwifi-ng
90 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
93 # Build kernel first so we can bootstrap off of its build
100 wireless-tools-MODULE = wireless-tools
101 wireless-tools-SPEC := wireless-tools.spec
102 wireless-tools-SVNPATH := file:///svn/wireless-tools/29pre10
103 ALL += wireless-tools
110 #ivtv-SPEC := ivtv/ivtv.spec
117 util-vserver-MODULE := util-vserver
118 util-vserver-SPEC := util-vserver/util-vserver.spec
119 util-vserver-RPMFLAGS:= --without dietlibc
126 PlanetLabAccounts-MODULE := PlanetLabAccounts
127 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
128 ALL += PlanetLabAccounts
134 NodeUpdate-MODULE := NodeUpdate
135 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
142 PlanetLabConf-MODULE := PlanetLabConf
143 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
151 ipod-SPEC := ipod/ipod.spec
159 sudo-SPEC := sudo/planetlab_sudo.spec
166 pycurl-MODULE := pycurl
167 pycurl-SPEC := pycurl/pycurl.spec
174 BootServerRequest-MODULE := BootServerRequest
175 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
176 ALL += BootServerRequest
182 PlanetLabID-MODULE := PlanetLabID
183 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
190 NodeManager-MODULE := NodeManager
191 NodeManager-SPEC := NodeManager/NodeManager.spec
198 pl_sshd-MODULE := pl_sshd
199 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
206 libhttpd++-MODULE := libhttpd++
207 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
211 # Proper: Privileged Operations Service
214 proper-MODULE := proper
215 proper-SPEC := proper/proper.spec
224 mysql-MODULE := mysql
225 mysql-SPEC := mysql/mysql.spec
232 ulogd-MODULE := ulogd
233 ulogd-SPEC := ulogd/ulogd.spec
236 ulogd: kernel proper mysql
242 netflow-MODULE := netflow
243 netflow-SPEC := netflow/netflow.spec
249 # PlanetLab Mom: Cleans up your mess
252 pl_mom-MODULE := pl_mom
253 pl_mom-SPEC := pl_mom/pl_mom.spec
260 iptables-MODULE := iptables
261 iptables-SPEC := iptables/iptables.spec
270 iproute-MODULE := iproute2
271 iproute-SPEC := iproute2/iproute.spec
278 kexec-tools-MODULE := kexec-tools
279 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
286 util-python-MODULE := util-python
287 util-python-SPEC := util-python/util-python.spec
290 # proper and util-vserver both use scripts in util-python for building
292 util-vserver: util-python
293 PlanetLabAuth: util-python
299 PLCAPI-MODULE := new_plc_api
300 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
307 vserver-reference-MODULE := vserver-reference build
308 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
309 # Package must be built as root
310 vserver-reference-RPMBUILD := sudo rpmbuild
311 ALL += vserver-reference
313 # vserver-reference may require current packages
314 vserver-reference: $(filter-out vserver-reference,$(ALL))
320 bootmanager-MODULE := bootmanager build
321 bootmanager-SPEC := bootmanager/bootmanager.spec
322 bootmanager-RPMBUILD := sudo rpmbuild
325 # bootmanager requires current packages
326 bootmanager: $(filter-out bootmanager,$(ALL))
328 # ...and the yum manifest
329 bootmanager: RPMS/yumgroups.xml
335 bootcd-MODULE := bootcd build bootmanager
336 bootcd-SPEC := bootcd/bootcd.spec
337 bootcd-RPMBUILD := sudo rpmbuild
340 # bootcd requires current packages
341 bootcd: $(filter-out bootcd,$(ALL))
347 myplc-MODULE := build myplc new_plc_www plc/scripts
348 myplc-SPEC := myplc/myplc.spec
349 # Package must be built as root
350 myplc-RPMBUILD := sudo rpmbuild
353 # MyPLC may require current packages
354 myplc: $(filter-out myplc,$(ALL))
356 # ...and the yum manifest
357 myplc: RPMS/yumgroups.xml
360 # MyPLC development environment
363 ###myplc-devel-MODULE := build myplc
364 ###myplc-devel-SPEC := myplc/myplc-devel.spec
365 #### Package must be built as root
366 ###myplc-devel-RPMBUILD := sudo rpmbuild
367 ###ALL += myplc-devel
373 # Upload packages to boot server
374 SERVER := root@onelab-plc.inria.fr
375 RPMSAREA := /var/www/html/install-rpms/
376 BOOTAREA := /var/www/html/boot/
378 ifeq ($(PLDISTRO),planetlab)
379 YUMGROUPS := groups/v3_yumgroups.xml
381 YUMGROUPS := groups/v4_onelab.xml
385 BASENEW := build-$(notdir $(shell pwd))
386 BASEBAK := planetlab-bak
390 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
392 INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
393 install: $(INSTALL-TARGETS)
396 @echo install: $(INSTALL-TARGETS)
398 install-rpms:RPMS/yumgroups.xml
400 ssh $(SERVER) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
402 rsync -v --perms --times --group --compress --rsh=ssh \
403 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):/plc/data/$(RPMSAREA)/$(BASENEW)/
406 # sign and index new repository
407 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
410 # sign and index new repository
411 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
415 ssh $(SERVER) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK)
417 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK)
419 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE)
423 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
424 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):/plc/data/$(BOOTAREA) ; fi