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.2 2007/01/29 09:41:43 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-CVSROOT := /cvs
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
125 yum-SPEC := yum/yum.spec
132 PlanetLabAccounts-MODULE := PlanetLabAccounts
133 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
134 ALL += PlanetLabAccounts
140 NodeUpdate-MODULE := NodeUpdate
141 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
148 PlanetLabConf-MODULE := PlanetLabConf
149 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
157 ipod-SPEC := ipod/ipod.spec
165 sudo-SPEC := sudo/planetlab_sudo.spec
172 pycurl-MODULE := pycurl
173 pycurl-SPEC := pycurl/pycurl.spec
180 BootServerRequest-MODULE := BootServerRequest
181 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
182 ALL += BootServerRequest
188 PlanetLabID-MODULE := PlanetLabID
189 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
196 NodeManager-MODULE := NodeManager
197 NodeManager-SPEC := NodeManager/NodeManager.spec
204 pl_sshd-MODULE := pl_sshd
205 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
212 libhttpd++-MODULE := libhttpd++
213 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
217 # Proper: Privileged Operations Service
220 proper-MODULE := proper
221 proper-SPEC := proper/proper.spec
230 mysql-MODULE := mysql
231 mysql-SPEC := mysql/mysql.spec
238 ulogd-MODULE := ulogd
239 ulogd-SPEC := ulogd/ulogd.spec
242 ulogd: kernel proper mysql
248 netflow-MODULE := netflow
249 netflow-SPEC := netflow/netflow.spec
255 # PlanetLab Mom: Cleans up your mess
258 pl_mom-MODULE := pl_mom
259 pl_mom-SPEC := pl_mom/pl_mom.spec
266 iptables-MODULE := iptables
267 iptables-SPEC := iptables/iptables.spec
276 iproute-MODULE := iproute2
277 iproute-SPEC := iproute2/iproute.spec
284 kexec-tools-MODULE := kexec-tools
285 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
293 dhcp-SPEC := dhcp/dhcp.spec
300 util-python-MODULE := util-python
301 util-python-SPEC := util-python/util-python.spec
304 # proper and util-vserver both use scripts in util-python for building
306 util-vserver: util-python
307 PlanetLabAuth: util-python
313 PlanetLabAuth-MODULE := pl_auth
314 PlanetLabAuth-SPEC := pl_auth/pl_auth.spec
321 plcapilib-MODULE := plcmdline
322 plcapilib-SPEC := plcmdline/plcapilib.spec
329 PLCAPI-MODULE := new_plc_api
330 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
337 vserver-reference-MODULE := vserver-reference build
338 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
339 # Package must be built as root
340 vserver-reference-RPMBUILD := sudo rpmbuild
341 ALL += vserver-reference
343 # vserver-reference may require current packages
344 vserver-reference: $(filter-out vserver-reference,$(ALL))
350 bootmanager-MODULE := bootmanager build
351 bootmanager-SPEC := bootmanager/bootmanager.spec
352 bootmanager-RPMBUILD := sudo rpmbuild
355 # bootmanager requires current packages
356 bootmanager: $(filter-out bootmanager,$(ALL))
358 # ...and the yum manifest
359 bootmanager: RPMS/yumgroups.xml
365 bootcd-MODULE := bootcd build bootmanager
366 bootcd-SPEC := bootcd/bootcd.spec
367 bootcd-RPMBUILD := sudo rpmbuild
370 # bootcd requires current packages
371 bootcd: $(filter-out bootcd,$(ALL))
377 myplc-MODULE := $(sort $(foreach module,$(ALL),$($(module)-MODULE)) myplc new_plc_www plc/scripts)
378 myplc-SPEC := myplc/myplc.spec
379 # Package must be built as root
380 myplc-RPMBUILD := sudo rpmbuild
383 # MyPLC may require current packages
384 myplc: $(filter-out myplc,$(ALL))
386 # ...and the yum manifest
387 myplc: RPMS/yumgroups.xml
390 # MyPLC development environment
393 ###myplc-devel-MODULE := build myplc
394 ###myplc-devel-SPEC := myplc/myplc-devel.spec
395 #### Package must be built as root
396 ###myplc-devel-RPMBUILD := sudo rpmbuild
397 ###ALL += myplc-devel
403 # Upload packages to boot server
404 SERVER := root@onelab-plc.inria.fr
405 RPMSAREA := /plc/data/var/www/html/install-rpms/
406 BOOTAREA := /plc/data/var/www/html/boot/
408 YUMGROUPS := $(PLDISTRO).xml
410 BASETMP := planetlab-upgrading
411 BASEBAK := planetlab-bak
415 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
417 install: install-rpms install-index install-bootstrap
419 install-rpms:RPMS/yumgroups.xml
421 ssh $(SERVER) mkdir -p $(RPMSAREA)/$(BASETMP)
423 rsync -v --perms --times --group --compress --rsh=ssh \
424 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):$(RPMSAREA)/$(BASETMP)/
426 # would be better if we could run plc.d/packages on a temporary dir
427 # currently while we run packages clients wont be able to use the repo (nor signed nor indexed)
430 ssh $(SERVER) rm -rf $(RPMSAREA)/$(BASEBAK)
432 ssh $(SERVER) mv $(RPMSAREA)/$(BASE) $(RPMSAREA)/$(BASEBAK)
434 ssh $(SERVER) mv $(RPMSAREA)/$(BASETMP) $(RPMSAREA)/$(BASE)
436 ssh $(SERVER) chroot /plc/root service plc start packages
440 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
441 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):$(BOOTAREA) ; fi