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.16 2007/03/16 16:07:57 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 include onelab-tags.mk
40 CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
41 # it's useless to set this here because it's overriden on the command line by nightly-build.sh
44 # Check if a tag has been checked out
45 ifneq ($(wildcard CVS/Root),)
46 # Check if we are able to access CVS
47 CVSTAG := $(shell cvs status planetlab.mk 2>/dev/null | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[:space:]]*\).*/\1/p')
49 CVSROOT := $(shell cat CVS/Root)
50 ifeq ($(CVSTAG),(none))
62 #kernel-x86_64-MODULE := linux-2.6
63 #kernel-x86_64-RPMFLAGS:= --target x86_64
64 #kernel-x86_64-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
65 ##ALL += kernel-x86_64
67 kernel-i686-MODULE := linux-2.6
68 kernel-i686-RPMFLAGS:= --target i686
69 kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-$(PLDISTRO).spec
72 #kernel-i586-MODULE := linux-2.6
73 #kernel-i586-RPMFLAGS:= --target i586
74 #kernel-i586-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
77 #kernel: kernel-i586 kernel-i686
78 #kernel-clean: kernel-i586-clean kernel-i686-clean
80 kernel-clean: kernel-i686-clean
87 vnet-SPEC := vnet/vnet.spec
90 # Build kernel first so we can bootstrap off of its build
97 madwifi-ng-MODULE := madwifi-ng
98 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
101 # Build kernel first so we can bootstrap off of its build
108 wireless-tools-MODULE = wireless-tools
109 wireless-tools-SPEC := wireless-tools.spec
110 wireless-tools-SVNPATH := svn+ssh://build@svn.one-lab.org/svn/wireless-tools/tags/29pre14
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
309 PLCAPI-SVNPATH := svn+ssh://build@svn.one-lab.org/svn/new_plc_api/trunk
316 vserver-reference-MODULE := vserver-reference build
317 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
318 # Package must be built as root
319 vserver-reference-RPMBUILD := sudo rpmbuild
320 ALL += vserver-reference
322 # vserver-reference may require current packages
323 vserver-reference: $(filter-out vserver-reference,$(ALL))
329 bootmanager-MODULE := bootmanager build
330 bootmanager-SPEC := bootmanager/bootmanager.spec
331 bootmanager-RPMBUILD := sudo rpmbuild
332 bootmanager-SVNPATH := svn+ssh://build@svn.one-lab.org/svn/bootmanager/trunk
335 # bootmanager requires current packages
336 bootmanager: $(filter-out bootmanager,$(ALL))
338 # ...and the yum manifest
339 bootmanager: RPMS/yumgroups.xml
345 bootcd-MODULE := bootcd build bootmanager
346 bootcd-SPEC := bootcd/bootcd.spec
347 bootcd-RPMBUILD := sudo rpmbuild
348 bootcd-SVNPATH := svn+ssh://build@svn.one-lab.org/svn/bootcd/trunk
351 # bootcd requires current packages
352 bootcd: $(filter-out bootcd,$(ALL))
358 myplc-MODULE := build myplc new_plc_www plc/scripts
359 myplc-SPEC := myplc/myplc.spec
360 # Package must be built as root
361 myplc-RPMBUILD := sudo rpmbuild
364 # MyPLC may require current packages
365 myplc: $(filter-out myplc,$(ALL))
367 # ...and the yum manifest
368 myplc: RPMS/yumgroups.xml
371 # MyPLC development environment
374 ###myplc-devel-MODULE := build myplc
375 ###myplc-devel-SPEC := myplc/myplc-devel.spec
376 #### Package must be built as root
377 ###myplc-devel-RPMBUILD := sudo rpmbuild
378 ###ALL += myplc-devel
384 # Upload packages to boot server
385 SERVER := root@onelab-plc.inria.fr
386 RPMSAREA := /var/www/html/install-rpms/
387 BOOTAREA := /var/www/html/boot/
389 ifeq ($(PLDISTRO),planetlab)
390 YUMGROUPS := groups/v3_yumgroups.xml
392 YUMGROUPS := groups/v4_onelab.xml
396 BASENEW := build-$(notdir $(shell pwd))
397 BASEBAK := planetlab-bak
401 install -D -m 644 $(YUMGROUPS) RPMS/yumgroups.xml
403 INSTALL-TARGETS := install-rpms install-index install-adopt install-bootstrap
404 install: $(INSTALL-TARGETS)
407 @echo install: $(INSTALL-TARGETS)
409 install-rpms:RPMS/yumgroups.xml
411 ssh $(SERVER) mkdir -p /plc/data/$(RPMSAREA)/$(BASENEW)
413 rsync -v --perms --times --group --compress --rsh=ssh \
414 RPMS/yumgroups.xml $(wildcard RPMS/*/*.rpm) $(SERVER):/plc/data/$(RPMSAREA)/$(BASENEW)/
417 # sign and index new repository
418 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages start $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
421 # sign and index new repository
422 ssh $(SERVER) chroot /plc/root /etc/plc.d/packages clean $(RPMSAREA)/$(BASENEW)/ 2>> install-index.log
426 ssh $(SERVER) rm -rf /plc/data/$(RPMSAREA)/$(BASEBAK)
428 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASE) /plc/data/$(RPMSAREA)/$(BASEBAK)
430 ssh $(SERVER) mv /plc/data/$(RPMSAREA)/$(BASENEW) /plc/data/$(RPMSAREA)/$(BASE)
434 install_bz2=$(wildcard BUILD/bootmanager-*/bootmanager/support-files/PlanetLab-Bootstrap.tar.bz2) ; \
435 if [ -n "$$install_bz2" ] ; then rsync $$install_bz2 $(SERVER):/plc/data/$(BOOTAREA) ; fi