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.1 2007/01/27 08:39:38 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
99 #ivtv-SPEC := ivtv/ivtv.spec
106 util-vserver-MODULE := util-vserver
107 util-vserver-SPEC := util-vserver/util-vserver.spec
108 util-vserver-RPMFLAGS:= --without dietlibc
116 yum-SPEC := yum/yum.spec
123 PlanetLabAccounts-MODULE := PlanetLabAccounts
124 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
125 ALL += PlanetLabAccounts
131 NodeUpdate-MODULE := NodeUpdate
132 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
139 PlanetLabConf-MODULE := PlanetLabConf
140 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
148 ipod-SPEC := ipod/ipod.spec
156 sudo-SPEC := sudo/planetlab_sudo.spec
163 pycurl-MODULE := pycurl
164 pycurl-SPEC := pycurl/pycurl.spec
171 BootServerRequest-MODULE := BootServerRequest
172 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
173 ALL += BootServerRequest
179 PlanetLabID-MODULE := PlanetLabID
180 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
187 NodeManager-MODULE := NodeManager
188 NodeManager-SPEC := NodeManager/NodeManager.spec
195 pl_sshd-MODULE := pl_sshd
196 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
203 libhttpd++-MODULE := libhttpd++
204 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
208 # Proper: Privileged Operations Service
211 proper-MODULE := proper
212 proper-SPEC := proper/proper.spec
221 mysql-MODULE := mysql
222 mysql-SPEC := mysql/mysql.spec
229 ulogd-MODULE := ulogd
230 ulogd-SPEC := ulogd/ulogd.spec
233 ulogd: kernel proper mysql
239 netflow-MODULE := netflow
240 netflow-SPEC := netflow/netflow.spec
246 # PlanetLab Mom: Cleans up your mess
249 pl_mom-MODULE := pl_mom
250 pl_mom-SPEC := pl_mom/pl_mom.spec
257 iptables-MODULE := iptables
258 iptables-SPEC := iptables/iptables.spec
267 iproute-MODULE := iproute2
268 iproute-SPEC := iproute2/iproute.spec
275 kexec-tools-MODULE := kexec-tools
276 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
284 dhcp-SPEC := dhcp/dhcp.spec
291 util-python-MODULE := util-python
292 util-python-SPEC := util-python/util-python.spec
295 # proper and util-vserver both use scripts in util-python for building
297 util-vserver: util-python
298 PlanetLabAuth: util-python
304 PlanetLabAuth-MODULE := pl_auth
305 PlanetLabAuth-SPEC := pl_auth/pl_auth.spec
312 plcapilib-MODULE := plcmdline
313 plcapilib-SPEC := plcmdline/plcapilib.spec
320 PLCAPI-MODULE := new_plc_api
321 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
328 vserver-reference-MODULE := vserver-reference build
329 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
330 # Package must be built as root
331 vserver-reference-RPMBUILD := sudo rpmbuild
332 ALL += vserver-reference
334 # vserver-reference may require current packages
335 vserver-reference: $(filter-out vserver-reference,$(ALL))
341 bootmanager-MODULE := bootmanager build
342 bootmanager-SPEC := bootmanager/bootmanager.spec
343 bootmanager-RPMBUILD := sudo rpmbuild
346 # bootmanager requires current packages
347 bootmanager: $(filter-out bootmanager,$(ALL))
349 # ...and the yum manifest
350 bootmanager: RPMS/yumgroups.xml
356 bootcd-MODULE := bootcd build bootmanager
357 bootcd-SPEC := bootcd/bootcd.spec
358 bootcd-RPMBUILD := sudo rpmbuild
361 # bootcd requires current packages
362 bootcd: $(filter-out bootcd,$(ALL))
368 myplc-MODULE := $(sort $(foreach module,$(ALL),$($(module)-MODULE)) myplc new_plc_www plc/scripts)
369 myplc-SPEC := myplc/myplc.spec
370 # Package must be built as root
371 myplc-RPMBUILD := sudo rpmbuild
374 # MyPLC may require current packages
375 myplc: $(filter-out myplc,$(ALL))
377 # ...and the yum manifest
378 myplc: RPMS/yumgroups.xml
381 # MyPLC development environment
384 ###myplc-devel-MODULE := build myplc
385 ###myplc-devel-SPEC := myplc/myplc-devel.spec
386 #### Package must be built as root
387 ###myplc-devel-RPMBUILD := sudo rpmbuild
388 ###ALL += myplc-devel
394 # Upload packages to boot server
395 SERVER := root@onelab-plc.inria.fr
396 RPMSAREA := /plc/data/var/www/html/install-rpms/
397 BOOTAREA := /plc/data/var/www/html/boot/
399 YUMGROUPS := $(PLDISTRO).xml
401 BASETMP := planetlab-upgrading
402 BASEBAK := planetlab-bak
406 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
408 install: install-rpms install-index install-bootstrap
410 install-rpms:RPMS/yumgroups.xml
412 ssh $(SERVER) mkdir -p $(RPMSAREA)/$(BASETMP)
414 rsync -v --perms --times --group --compress --rsh=ssh \
415 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):$(RPMSAREA)/$(BASETMP)/
417 # would be better if we could run plc.d/packages on a temporary dir
418 # currently while we run packages clients wont be able to use the repo (nor signed nor indexed)
421 ssh $(SERVER) rm -rf $(RPMSAREA)/$(BASEBAK)
423 ssh $(SERVER) mv $(RPMSAREA)/$(BASE) $(RPMSAREA)/$(BASEBAK)
425 ssh $(SERVER) mv $(RPMSAREA)/$(BASETMP) $(RPMSAREA)/$(BASE)
427 ssh $(SERVER) chroot /plc/root service plc start packages
431 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
432 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):$(BOOTAREA) ; fi