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.24 2007/04/16 15:17:06 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.
28 # we do not use TAG directly anymore, and let it to HEAD
29 # this because we want the rpm's releases to reflect the date even when a tag is used
30 # our build script defines COMMON_TAG that the various components are free to use or not
32 # COMMON_TAG set from the build script
34 TAGSFILE = onelab-tags.mk
42 # it's useless to set this here because it's overriden on the command line by nightly-build.sh
45 # Check if a tag has been checked out
46 ifneq ($(wildcard CVS/Root),)
47 # Check if we are able to access CVS
48 CVSTAG := $(shell cvs status planetlab.mk 2>/dev/null | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[:space:]]*\).*/\1/p')
50 CVSROOT := $(shell cat CVS/Root)
51 ifeq ($(CVSTAG),(none))
63 #kernel-x86_64-MODULE := linux-2.6
64 #kernel-x86_64-RPMFLAGS:= --target x86_64
65 #kernel-x86_64-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
66 ##ALL += kernel-x86_64
68 kernel-i686-MODULE := linux-2.6
69 kernel-i686-RPMFLAGS:= --target i686
70 kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
73 #kernel-i586-MODULE := linux-2.6
74 #kernel-i586-RPMFLAGS:= --target i586
75 #kernel-i586-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
78 #kernel: kernel-i586 kernel-i686
79 #kernel-clean: kernel-i586-clean kernel-i686-clean
81 kernel-clean: kernel-i686-clean
88 vnet-SPEC := vnet/vnet.spec
91 # Build kernel first so we can bootstrap off of its build
98 madwifi-ng-MODULE := madwifi-ng
99 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
102 # Build kernel first so we can bootstrap off of its build
109 wireless-tools-MODULE = wireless-tools
110 wireless-tools-SPEC := wireless-tools.spec
111 ALL += wireless-tools
118 #ivtv-SPEC := ivtv/ivtv.spec
125 util-vserver-MODULE := util-vserver
126 util-vserver-SPEC := util-vserver/util-vserver.spec
127 util-vserver-RPMFLAGS:= --without dietlibc
134 PlanetLabAccounts-MODULE := PlanetLabAccounts
135 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
136 ALL += PlanetLabAccounts
142 NodeUpdate-MODULE := NodeUpdate
143 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
150 PlanetLabConf-MODULE := PlanetLabConf
151 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
159 ipod-SPEC := ipod/ipod.spec
167 sudo-SPEC := sudo/planetlab_sudo.spec
174 pycurl-MODULE := pycurl
175 pycurl-SPEC := pycurl/pycurl.spec
182 BootServerRequest-MODULE := BootServerRequest
183 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
184 ALL += BootServerRequest
190 PlanetLabID-MODULE := PlanetLabID
191 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
198 NodeManager-MODULE := NodeManager
199 NodeManager-SPEC := NodeManager/NodeManager.spec
206 pl_sshd-MODULE := pl_sshd
207 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
214 libhttpd++-MODULE := libhttpd++
215 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
219 # Proper: Privileged Operations Service
222 proper-MODULE := proper
223 proper-SPEC := proper/proper.spec
232 mysql-MODULE := mysql
233 mysql-SPEC := mysql/mysql.spec
240 ulogd-MODULE := ulogd
241 ulogd-SPEC := ulogd/ulogd.spec
244 ulogd: kernel proper mysql
250 netflow-MODULE := netflow
251 netflow-SPEC := netflow/netflow.spec
257 # PlanetLab Mom: Cleans up your mess
260 pl_mom-MODULE := pl_mom
261 pl_mom-SPEC := pl_mom/pl_mom.spec
268 iptables-MODULE := iptables
269 iptables-SPEC := iptables/iptables.spec
278 iproute-MODULE := iproute2
279 iproute-SPEC := iproute2/iproute.spec
286 kexec-tools-MODULE := kexec-tools
287 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
294 util-python-MODULE := util-python
295 util-python-SPEC := util-python/util-python.spec
298 # proper and util-vserver both use scripts in util-python for building
300 util-vserver: util-python
301 PlanetLabAuth: util-python
307 PLCAPI-MODULE := new_plc_api
308 PLCAPI-SPEC := PLCAPI.spec
315 vserver-reference-MODULE := vserver-reference build
316 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
317 # Package must be built as root
318 vserver-reference-RPMBUILD := sudo rpmbuild
319 ALL += vserver-reference
321 # vserver-reference may require current packages
322 vserver-reference: $(filter-out vserver-reference,$(ALL))
328 bootmanager-MODULE := bootmanager build
329 bootmanager-SPEC := bootmanager.spec
330 bootmanager-RPMBUILD := sudo rpmbuild
333 # bootmanager requires current packages
334 bootmanager: $(filter-out bootmanager,$(ALL))
336 # ...and the yum manifest
337 bootmanager: RPMS/yumgroups.xml
343 bootcd-MODULE := bootcd build bootmanager
344 bootcd-SPEC := bootcd.spec
345 bootcd-RPMBUILD := sudo rpmbuild
348 # bootcd requires current packages
349 bootcd: $(filter-out bootcd,$(ALL))
355 plcwww-MODULE := new_plc_www
356 plcwww-SPEC := plcwww.spec
363 myplc-MODULE := build myplc plc/scripts
364 myplc-SPEC := myplc.spec
365 # Package must be built as root
366 myplc-RPMBUILD := sudo rpmbuild
369 # MyPLC may require current packages
370 myplc: $(filter-out myplc,$(ALL))
372 # ...and the yum manifest
373 myplc: RPMS/yumgroups.xml
375 # we also ship various information on the build in /etc/myplc-release
376 myplc: SOURCES/myplc/myplc/myplc-release
381 SOURCES/myplc/myplc/myplc-release: SOURCES/myplc/myplc
382 @echo 'Creating myplc-release'
384 (echo -n 'Build date: ' ; date '+%Y.%m.%d') >> $@
385 (echo -n 'Build hostname: ' ; hostname) >> $@
386 (echo -n 'Build location: ' ; pwd) >> $@
387 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tags file contents" >> $@
388 cat $(TAGSFILE) >> $@
391 # MyPLC development environment
394 ###myplc-devel-MODULE := build myplc
395 ###myplc-devel-SPEC := myplc/myplc-devel.spec
396 #### Package must be built as root
397 ###myplc-devel-RPMBUILD := sudo rpmbuild
398 ###ALL += myplc-devel
404 # Upload packages to boot server
405 SERVER := root@onelab-plc.inria.fr
406 RPMSAREA := /var/www/html/install-rpms/
407 BOOTAREA := /var/www/html/boot/
409 ifeq ($(PLDISTRO),planetlab)
410 YUMGROUPS := groups/v3_yumgroups.xml
412 YUMGROUPS := groups/v4_onelab.xml
416 BASENEW := build-$(notdir $(shell pwd))
417 BASEBAK := planetlab-bak
421 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
423 INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
424 install: $(INSTALL-TARGETS)
427 @echo install: $(INSTALL-TARGETS)
429 install-rpms:RPMS/yumgroups.xml
431 ssh $(SERVER) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
433 rsync -v --perms --times --group --compress --rsh=ssh \
434 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):/plc/data/$(RPMSAREA)/$(BASENEW)/
437 # sign and index new repository
438 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
441 # sign and index new repository
442 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
446 ssh $(SERVER) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK)
448 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK)
450 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE)
454 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
455 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):/plc/data/$(BOOTAREA) ; fi