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.9 2007/02/21 10:21:25 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
32 # it's useless to set this here because it's overriden on the command line by nightly-build.sh
35 # Check if a tag has been checked out
36 ifneq ($(wildcard CVS/Root),)
37 # Check if we are able to access CVS
38 CVSTAG := $(shell cvs status planetlab.mk 2>/dev/null | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[:space:]]*\).*/\1/p')
40 CVSROOT := $(shell cat CVS/Root)
41 ifeq ($(CVSTAG),(none))
53 #kernel-x86_64-MODULE := linux-2.6
54 #kernel-x86_64-RPMFLAGS:= --target x86_64
55 #kernel-x86_64-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
56 ##ALL += kernel-x86_64
58 kernel-i686-MODULE := linux-2.6
59 kernel-i686-RPMFLAGS:= --target i686
60 kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
63 #kernel-i586-MODULE := linux-2.6
64 #kernel-i586-RPMFLAGS:= --target i586
65 #kernel-i586-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
68 #kernel: kernel-i586 kernel-i686
69 #kernel-clean: kernel-i586-clean kernel-i686-clean
71 kernel-clean: kernel-i686-clean
78 vnet-SPEC := vnet/vnet.spec
81 # Build kernel first so we can bootstrap off of its build
88 madwifi-ng-MODULE := madwifi-ng
89 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
92 # Build kernel first so we can bootstrap off of its build
99 wireless-tools-MODULE = wireless-tools
100 wireless-tools-SPEC := wireless-tools.spec
101 wireless-tools-SVNPATH := file:///svn/wireless-tools/29pre10
102 ALL += wireless-tools
109 #ivtv-SPEC := ivtv/ivtv.spec
116 util-vserver-MODULE := util-vserver
117 util-vserver-SPEC := util-vserver/util-vserver.spec
118 util-vserver-RPMFLAGS:= --without dietlibc
125 PlanetLabAccounts-MODULE := PlanetLabAccounts
126 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
127 ALL += PlanetLabAccounts
133 NodeUpdate-MODULE := NodeUpdate
134 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
141 PlanetLabConf-MODULE := PlanetLabConf
142 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
150 ipod-SPEC := ipod/ipod.spec
158 sudo-SPEC := sudo/planetlab_sudo.spec
165 pycurl-MODULE := pycurl
166 pycurl-SPEC := pycurl/pycurl.spec
173 BootServerRequest-MODULE := BootServerRequest
174 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
175 ALL += BootServerRequest
181 PlanetLabID-MODULE := PlanetLabID
182 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
189 NodeManager-MODULE := NodeManager
190 NodeManager-SPEC := NodeManager/NodeManager.spec
197 pl_sshd-MODULE := pl_sshd
198 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
205 libhttpd++-MODULE := libhttpd++
206 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
210 # Proper: Privileged Operations Service
213 proper-MODULE := proper
214 proper-SPEC := proper/proper.spec
223 mysql-MODULE := mysql
224 mysql-SPEC := mysql/mysql.spec
231 ulogd-MODULE := ulogd
232 ulogd-SPEC := ulogd/ulogd.spec
235 ulogd: kernel proper mysql
241 netflow-MODULE := netflow
242 netflow-SPEC := netflow/netflow.spec
248 # PlanetLab Mom: Cleans up your mess
251 pl_mom-MODULE := pl_mom
252 pl_mom-SPEC := pl_mom/pl_mom.spec
259 iptables-MODULE := iptables
260 iptables-SPEC := iptables/iptables.spec
269 iproute-MODULE := iproute2
270 iproute-SPEC := iproute2/iproute.spec
277 kexec-tools-MODULE := kexec-tools
278 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
285 util-python-MODULE := util-python
286 util-python-SPEC := util-python/util-python.spec
289 # proper and util-vserver both use scripts in util-python for building
291 util-vserver: util-python
292 PlanetLabAuth: util-python
298 PLCAPI-MODULE := new_plc_api
299 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
306 vserver-reference-MODULE := vserver-reference build
307 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
308 # Package must be built as root
309 vserver-reference-RPMBUILD := sudo rpmbuild
310 ALL += vserver-reference
312 # vserver-reference may require current packages
313 vserver-reference: $(filter-out vserver-reference,$(ALL))
319 bootmanager-MODULE := bootmanager build
320 bootmanager-SPEC := bootmanager/bootmanager.spec
321 bootmanager-RPMBUILD := sudo rpmbuild
324 # bootmanager requires current packages
325 bootmanager: $(filter-out bootmanager,$(ALL))
327 # ...and the yum manifest
328 bootmanager: RPMS/yumgroups.xml
334 bootcd-MODULE := bootcd build bootmanager
335 bootcd-SPEC := bootcd/bootcd.spec
336 bootcd-RPMBUILD := sudo rpmbuild
339 # bootcd requires current packages
340 bootcd: $(filter-out bootcd,$(ALL))
346 myplc-MODULE := build myplc new_plc_www plc/scripts
347 myplc-SPEC := myplc/myplc.spec
348 # Package must be built as root
349 myplc-RPMBUILD := sudo rpmbuild
352 # MyPLC may require current packages
353 myplc: $(filter-out myplc,$(ALL))
355 # ...and the yum manifest
356 myplc: RPMS/yumgroups.xml
359 # MyPLC development environment
362 ###myplc-devel-MODULE := build myplc
363 ###myplc-devel-SPEC := myplc/myplc-devel.spec
364 #### Package must be built as root
365 ###myplc-devel-RPMBUILD := sudo rpmbuild
366 ###ALL += myplc-devel
372 # Upload packages to boot server
373 SERVER := root@onelab-plc.inria.fr
374 RPMSAREA := /var/www/html/install-rpms/
375 BOOTAREA := /var/www/html/boot/
377 ifeq ($(PLDISTRO),planetlab)
378 YUMGROUPS := groups/v3_yumgroups.xml
380 YUMGROUPS := groups/v4_onelab.xml
384 BASENEW := build-$(notdir $(shell pwd))
385 BASEBAK := planetlab-bak
389 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
391 INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
392 install: $(INSTALL-TARGETS)
395 @echo install: $(INSTALL-TARGETS)
397 install-rpms:RPMS/yumgroups.xml
399 ssh $(SERVER) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
401 rsync -v --perms --times --group --compress --rsh=ssh \
402 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):/plc/data/$(RPMSAREA)/$(BASENEW)/
405 # sign and index new repository
406 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
409 # sign and index new repository
410 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
414 ssh $(SERVER) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK)
416 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK)
418 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE)
422 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
423 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):/plc/data/$(BOOTAREA) ; fi