2 # PlanetLab standard components list
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2003-2006 The Trustees of Princeton University
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-planetlab.spec
57 kernel-i686-MODULE := linux-2.6
58 kernel-i686-RPMFLAGS:= --target i686
59 kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.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
75 vnet-SPEC := vnet/vnet.spec
78 # Build kernel first so we can bootstrap off of its build
85 madwifi-ng-MODULE := madwifi-ng
86 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
89 # Build kernel first so we can bootstrap off of its build
97 #ivtv-SPEC := ivtv/ivtv.spec
104 util-vserver-MODULE := util-vserver
105 util-vserver-SPEC := util-vserver/util-vserver.spec
106 util-vserver-RPMFLAGS:= --without dietlibc
114 yum-SPEC := yum/yum.spec
121 PlanetLabAccounts-MODULE := PlanetLabAccounts
122 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
123 ALL += PlanetLabAccounts
129 NodeUpdate-MODULE := NodeUpdate
130 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
137 PlanetLabConf-MODULE := PlanetLabConf
138 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
146 ipod-SPEC := ipod/ipod.spec
154 sudo-SPEC := sudo/planetlab_sudo.spec
161 pycurl-MODULE := pycurl
162 pycurl-SPEC := pycurl/pycurl.spec
169 BootServerRequest-MODULE := BootServerRequest
170 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
171 ALL += BootServerRequest
177 PlanetLabID-MODULE := PlanetLabID
178 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
185 NodeManager-MODULE := NodeManager
186 NodeManager-SPEC := NodeManager/NodeManager.spec
193 pl_sshd-MODULE := pl_sshd
194 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
201 libhttpd++-MODULE := libhttpd++
202 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
206 # Proper: Privileged Operations Service
209 proper-MODULE := proper
210 proper-SPEC := proper/proper.spec
219 mysql-MODULE := mysql
220 mysql-SPEC := mysql/mysql.spec
227 ulogd-MODULE := ulogd
228 ulogd-SPEC := ulogd/ulogd.spec
231 ulogd: kernel proper mysql
237 netflow-MODULE := netflow
238 netflow-SPEC := netflow/netflow.spec
244 # PlanetLab Mom: Cleans up your mess
247 pl_mom-MODULE := pl_mom
248 pl_mom-SPEC := pl_mom/pl_mom.spec
255 iptables-MODULE := iptables
256 iptables-SPEC := iptables/iptables.spec
265 iproute-MODULE := iproute2
266 iproute-SPEC := iproute2/iproute.spec
273 kexec-tools-MODULE := kexec-tools
274 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
282 dhcp-SPEC := dhcp/dhcp.spec
289 util-python-MODULE := util-python
290 util-python-SPEC := util-python/util-python.spec
293 # proper and util-vserver both use scripts in util-python for building
295 util-vserver: util-python
296 PlanetLabAuth: util-python
302 PlanetLabAuth-MODULE := pl_auth
303 PlanetLabAuth-SPEC := pl_auth/pl_auth.spec
310 plcapilib-MODULE := plcmdline
311 plcapilib-SPEC := plcmdline/plcapilib.spec
318 PLCAPI-MODULE := new_plc_api
319 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
326 vserver-reference-MODULE := vserver-reference build
327 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
328 # Package must be built as root
329 vserver-reference-RPMBUILD := sudo rpmbuild
330 ALL += vserver-reference
332 # vserver-reference may require current packages
333 vserver-reference: $(filter-out vserver-reference,$(ALL))
339 bootmanager-MODULE := bootmanager build
340 bootmanager-SPEC := bootmanager/bootmanager.spec
341 bootmanager-RPMBUILD := sudo rpmbuild
344 # bootmanager requires current packages
345 bootmanager: $(filter-out bootmanager,$(ALL))
347 # ...and the yum manifest
348 bootmanager: RPMS/yumgroups.xml
354 bootcd-MODULE := bootcd build bootmanager
355 bootcd-SPEC := bootcd/bootcd.spec
356 bootcd-RPMBUILD := sudo rpmbuild
359 # bootcd requires current packages
360 bootcd: $(filter-out bootcd,$(ALL))
366 myplc-MODULE := $(sort $(foreach module,$(ALL),$($(module)-MODULE)) myplc new_plc_www plc/scripts)
367 myplc-SPEC := myplc/myplc.spec
368 # Package must be built as root
369 myplc-RPMBUILD := sudo rpmbuild
372 # MyPLC may require current packages
373 myplc: $(filter-out myplc,$(ALL))
375 # ...and the yum manifest
376 myplc: RPMS/yumgroups.xml
379 # MyPLC development environment
382 myplc-devel-MODULE := build myplc
383 myplc-devel-SPEC := myplc/myplc-devel.spec
384 # Package must be built as root
385 myplc-devel-RPMBUILD := sudo rpmbuild
392 # Upload packages to boot server
393 SERVER := build@boot.planet-lab.org
394 ARCHIVE := /var/www/html/install-rpms/archive
396 # Put nightly alpha builds in a subdirectory
398 ARCHIVE := $(ARCHIVE)/planetlab-alpha
399 REPOS := /var/www/html/install-rpms/planetlab-alpha
403 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
407 @echo make install is only meant to be called from ./build.sh
409 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
410 # Sign all RPMS. setsid detaches rpm from the terminal,
411 # allowing the (hopefully blank) GPG password to be entered
412 # from stdin instead of /dev/tty. Obviously, the build server
415 --define "_signature gpg" \
416 --define "_gpg_path /etc/planetlab" \
417 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
418 --resign RPMS/*/*.rpm SRPMS/*.rpm
422 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
424 # Create package manifest
425 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
426 # Populate repository
427 ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
428 rsync --delete --links --perms --times --group --compress --rsh=ssh \
429 $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*.rpm))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
430 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
431 ssh $(SERVER) createrepo -g yumgroups.xml $(ARCHIVE)/$(BASE)/RPMS >/dev/null
432 rsync --delete --links --perms --times --group --compress --rsh=ssh \
433 $(wildcard SRPMS/*.rpm) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
434 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
435 ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
437 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
438 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
439 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE)/RPMS/ $(REPOS) ; \