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.15 2007/03/16 14:59:47 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 := svn+ssh://build@svn.one-lab.org/svn/wireless-tools/tags/29pre14
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 := PLCAPI.spec
300 PLCAPI-SVNPATH := svn+ssh://build@svn.one-lab.org/svn/new_plc_api/trunk
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
323 bootmanager-SVNPATH := svn+ssh://build@svn.one-lab.org/svn/bootmanager/trunk
326 # bootmanager requires current packages
327 bootmanager: $(filter-out bootmanager,$(ALL))
329 # ...and the yum manifest
330 bootmanager: RPMS/yumgroups.xml
336 bootcd-MODULE := bootcd build bootmanager
337 bootcd-SPEC := bootcd/bootcd.spec
338 bootcd-RPMBUILD := sudo rpmbuild
339 bootcd-SVNPATH := svn+ssh://build@svn.one-lab.org/svn/bootcd/trunk
342 # bootcd requires current packages
343 bootcd: $(filter-out bootcd,$(ALL))
349 myplc-MODULE := build myplc new_plc_www plc/scripts
350 myplc-SPEC := myplc/myplc.spec
351 # Package must be built as root
352 myplc-RPMBUILD := sudo rpmbuild
355 # MyPLC may require current packages
356 myplc: $(filter-out myplc,$(ALL))
358 # ...and the yum manifest
359 myplc: RPMS/yumgroups.xml
362 # MyPLC development environment
365 ###myplc-devel-MODULE := build myplc
366 ###myplc-devel-SPEC := myplc/myplc-devel.spec
367 #### Package must be built as root
368 ###myplc-devel-RPMBUILD := sudo rpmbuild
369 ###ALL += myplc-devel
375 # Upload packages to boot server
376 SERVER := root@onelab-plc.inria.fr
377 RPMSAREA := /var/www/html/install-rpms/
378 BOOTAREA := /var/www/html/boot/
380 ifeq ($(PLDISTRO),planetlab)
381 YUMGROUPS := groups/v3_yumgroups.xml
383 YUMGROUPS := groups/v4_onelab.xml
387 BASENEW := build-$(notdir $(shell pwd))
388 BASEBAK := planetlab-bak
392 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
394 INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
395 install: $(INSTALL-TARGETS)
398 @echo install: $(INSTALL-TARGETS)
400 install-rpms:RPMS/yumgroups.xml
402 ssh $(SERVER) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
404 rsync -v --perms --times --group --compress --rsh=ssh \
405 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):/plc/data/$(RPMSAREA)/$(BASENEW)/
408 # sign and index new repository
409 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
412 # sign and index new repository
413 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
417 ssh $(SERVER) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK)
419 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK)
421 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE)
425 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
426 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):/plc/data/$(BOOTAREA) ; fi