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.7 2007/02/09 01:16:19 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
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-$(PLDISTRO).spec
55 ##ALL += kernel-x86_64
57 kernel-i686-MODULE := linux-2.6
58 kernel-i686-RPMFLAGS:= --target i686
59 kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).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
70 kernel-clean: kernel-i686-clean
77 vnet-SPEC := vnet/vnet.spec
80 # Build kernel first so we can bootstrap off of its build
87 madwifi-ng-MODULE := madwifi-ng
88 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
91 # Build kernel first so we can bootstrap off of its build
98 wireless-tools-MODULE = wireless-tools
99 wireless-tools-SPEC := wireless-tools.spec
100 wireless-tools-SVNPATH := file:///svn/wireless-tools/29pre10
101 ALL += wireless-tools
108 #ivtv-SPEC := ivtv/ivtv.spec
115 util-vserver-MODULE := util-vserver
116 util-vserver-SPEC := util-vserver/util-vserver.spec
117 util-vserver-RPMFLAGS:= --without dietlibc
124 PlanetLabAccounts-MODULE := PlanetLabAccounts
125 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
126 ALL += PlanetLabAccounts
132 NodeUpdate-MODULE := NodeUpdate
133 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
140 PlanetLabConf-MODULE := PlanetLabConf
141 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
149 ipod-SPEC := ipod/ipod.spec
157 sudo-SPEC := sudo/planetlab_sudo.spec
164 pycurl-MODULE := pycurl
165 pycurl-SPEC := pycurl/pycurl.spec
172 BootServerRequest-MODULE := BootServerRequest
173 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
174 ALL += BootServerRequest
180 PlanetLabID-MODULE := PlanetLabID
181 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
188 NodeManager-MODULE := NodeManager
189 NodeManager-SPEC := NodeManager/NodeManager.spec
196 pl_sshd-MODULE := pl_sshd
197 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
204 libhttpd++-MODULE := libhttpd++
205 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
209 # Proper: Privileged Operations Service
212 proper-MODULE := proper
213 proper-SPEC := proper/proper.spec
222 mysql-MODULE := mysql
223 mysql-SPEC := mysql/mysql.spec
230 ulogd-MODULE := ulogd
231 ulogd-SPEC := ulogd/ulogd.spec
234 ulogd: kernel proper mysql
240 netflow-MODULE := netflow
241 netflow-SPEC := netflow/netflow.spec
247 # PlanetLab Mom: Cleans up your mess
250 pl_mom-MODULE := pl_mom
251 pl_mom-SPEC := pl_mom/pl_mom.spec
258 iptables-MODULE := iptables
259 iptables-SPEC := iptables/iptables.spec
268 iproute-MODULE := iproute2
269 iproute-SPEC := iproute2/iproute.spec
276 kexec-tools-MODULE := kexec-tools
277 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
284 util-python-MODULE := util-python
285 util-python-SPEC := util-python/util-python.spec
288 # proper and util-vserver both use scripts in util-python for building
290 util-vserver: util-python
291 PlanetLabAuth: util-python
297 PLCAPI-MODULE := new_plc_api
298 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
305 vserver-reference-MODULE := vserver-reference build
306 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
307 # Package must be built as root
308 vserver-reference-RPMBUILD := sudo rpmbuild
309 ALL += vserver-reference
311 # vserver-reference may require current packages
312 vserver-reference: $(filter-out vserver-reference,$(ALL))
318 bootmanager-MODULE := bootmanager build
319 bootmanager-SPEC := bootmanager/bootmanager.spec
320 bootmanager-RPMBUILD := sudo rpmbuild
323 # bootmanager requires current packages
324 bootmanager: $(filter-out bootmanager,$(ALL))
326 # ...and the yum manifest
327 bootmanager: RPMS/yumgroups.xml
333 bootcd-MODULE := bootcd build bootmanager
334 bootcd-SPEC := bootcd/bootcd.spec
335 bootcd-RPMBUILD := sudo rpmbuild
338 # bootcd requires current packages
339 bootcd: $(filter-out bootcd,$(ALL))
345 myplc-MODULE := build myplc new_plc_www plc/scripts
346 myplc-SPEC := myplc/myplc.spec
347 # Package must be built as root
348 myplc-RPMBUILD := sudo rpmbuild
351 # MyPLC may require current packages
352 myplc: $(filter-out myplc,$(ALL))
354 # ...and the yum manifest
355 myplc: RPMS/yumgroups.xml
358 # MyPLC development environment
361 ###myplc-devel-MODULE := build myplc
362 ###myplc-devel-SPEC := myplc/myplc-devel.spec
363 #### Package must be built as root
364 ###myplc-devel-RPMBUILD := sudo rpmbuild
365 ###ALL += myplc-devel
371 # Upload packages to boot server
372 SERVER := root@onelab-plc.inria.fr
373 RPMSAREA := /var/www/html/install-rpms/
374 BOOTAREA := /var/www/html/boot/
376 ifeq ($(PLDISTRO),planetlab)
377 YUMGROUPS := groups/v3_yumgroups.xml
379 YUMGROUPS := groups/v4_onelab.xml
383 BASENEW := build-$(notdir $(shell pwd))
384 BASEBAK := planetlab-bak
388 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
390 INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
391 install: $(INSTALL-TARGETS)
394 @echo install: $(INSTALL-TARGETS)
396 install-rpms:RPMS/yumgroups.xml
398 ssh $(SERVER) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
400 rsync -v --perms --times --group --compress --rsh=ssh \
401 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):/plc/data/$(RPMSAREA)/$(BASENEW)/
404 # sign and index new repository
405 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
408 # sign and index new repository
409 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
413 ssh $(SERVER) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK)
415 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK)
417 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE)
421 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
422 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):/plc/data/$(BOOTAREA) ; fi