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.12 2007/03/06 22:19:16 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 := new_plc_api/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
325 # bootmanager requires current packages
326 bootmanager: $(filter-out bootmanager,$(ALL))
328 # ...and the yum manifest
329 bootmanager: RPMS/yumgroups.xml
335 bootcd-MODULE := bootcd build bootmanager
336 bootcd-SPEC := bootcd/bootcd.spec
337 bootcd-RPMBUILD := sudo rpmbuild
340 # bootcd requires current packages
341 bootcd: $(filter-out bootcd,$(ALL))
347 myplc-MODULE := build myplc new_plc_www plc/scripts
348 myplc-SPEC := myplc/myplc.spec
349 # Package must be built as root
350 myplc-RPMBUILD := sudo rpmbuild
353 # MyPLC may require current packages
354 myplc: $(filter-out myplc,$(ALL))
356 # ...and the yum manifest
357 myplc: RPMS/yumgroups.xml
360 # MyPLC development environment
363 ###myplc-devel-MODULE := build myplc
364 ###myplc-devel-SPEC := myplc/myplc-devel.spec
365 #### Package must be built as root
366 ###myplc-devel-RPMBUILD := sudo rpmbuild
367 ###ALL += myplc-devel
373 # Upload packages to boot server
374 SERVER := root@onelab-plc.inria.fr
375 RPMSAREA := /var/www/html/install-rpms/
376 BOOTAREA := /var/www/html/boot/
378 ifeq ($(PLDISTRO),planetlab)
379 YUMGROUPS := groups/v3_yumgroups.xml
381 YUMGROUPS := groups/v4_onelab.xml
385 BASENEW := build-$(notdir $(shell pwd))
386 BASEBAK := planetlab-bak
390 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
392 INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
393 install: $(INSTALL-TARGETS)
396 @echo install: $(INSTALL-TARGETS)
398 install-rpms:RPMS/yumgroups.xml
400 ssh $(SERVER) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
402 rsync -v --perms --times --group --compress --rsh=ssh \
403 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):/plc/data/$(RPMSAREA)/$(BASENEW)/
406 # sign and index new repository
407 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
410 # sign and index new repository
411 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
415 ssh $(SERVER) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK)
417 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK)
419 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE)
423 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
424 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):/plc/data/$(BOOTAREA) ; fi