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 ifneq ($(wildcard CVS/Root),)
32 CVSROOT := $(shell cat CVS/Root)
33 TAG := $(shell cvs status Makefile | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\(.*\)/\1/p')
38 CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
46 kernel-MODULE := linux-2.6
47 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
55 vnet-SPEC := vnet/vnet.spec
58 # Build kernel first so we can bootstrap off of its build
65 util-vserver-MODULE := util-vserver
66 util-vserver-SPEC := util-vserver/util-vserver.spec
73 lkcdutils-MODULE := lkcdutils
74 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
77 # Build kernel first so we can bootstrap off of its build
85 yum-SPEC := yum/yum.spec
92 ksymoops-MODULE := ksymoops
93 ksymoops-SPEC := ksymoops/ksymoops.spec
100 PlanetLabAccounts-MODULE := PlanetLabAccounts
101 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
102 ALL += PlanetLabAccounts
108 NodeUpdate-MODULE := NodeUpdate
109 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
116 PlanetLabConf-MODULE := PlanetLabConf
117 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
125 ipod-SPEC := ipod/ipod.spec
133 sudo-SPEC := sudo/planetlab_sudo.spec
140 pycurl-MODULE := pycurl
141 pycurl-SPEC := pycurl/pycurl.spec
148 BootServerRequest-MODULE := BootServerRequest
149 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
150 ALL += BootServerRequest
156 PlanetLabID-MODULE := PlanetLabID
157 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
164 sidewinder-MODULE := sidewinder
165 sidewinder-SPEC := sidewinder/sidewinder.spec
172 pl_sshd-MODULE := pl_sshd
173 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
180 libhttpd++-MODULE := libhttpd++
181 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
185 # Proper: Privileged Operations Service
188 proper-MODULE := proper
189 proper-SPEC := proper/proper.spec
198 mysql-MODULE := mysql
199 mysql-SPEC := mysql/mysql.spec
206 ulogd-MODULE := ulogd
207 ulogd-SPEC := ulogd/ulogd.spec
210 ulogd: kernel proper mysql
216 netflow-MODULE := netflow
217 netflow-SPEC := netflow/netflow.spec
223 # PlanetLab Mom: Cleans up your mess
226 pl_mom-MODULE := pl_mom
227 pl_mom-SPEC := pl_mom/pl_mom.spec
234 iptables-MODULE := iptables
235 iptables-SPEC := iptables/iptables.spec
244 iproute-MODULE := iproute2
245 iproute-SPEC := iproute2/iproute.spec
252 kexec-tools-MODULE := kexec-tools
253 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
261 dhcp-SPEC := dhcp/dhcp.spec
268 util-python-MODULE := util-python
269 util-python-SPEC := util-python/util-python.spec
272 # proper and util-vserver both use scripts in util-python for building
274 util-vserver: util-python
275 PlanetLabAuth: util-python
281 PlanetLabAuth-MODULE := pl_auth
282 PlanetLabAuth-SPEC := pl_auth/pl_auth.spec
289 plcapilib-MODULE := plcmdline
290 plcapilib-SPEC := plcmdline/plcapilib.spec
297 vserver-reference-MODULE := vserver-reference build
298 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
299 # Package must be built as root
300 vserver-reference-RPMBUILD := sudo rpmbuild
301 ALL += vserver-reference
303 # vserver-reference may require current packages
304 vserver-reference: $(filter-out vserver-reference,$(ALL))
310 bootmanager-MODULE := bootmanager build
311 bootmanager-SPEC := bootmanager/bootmanager.spec
312 bootmanager-RPMBUILD := sudo rpmbuild
315 # bootmanager requires current packages
316 bootmanager: $(filter-out bootmanager,$(ALL))
318 # ...and the yum manifest
319 bootmanager: RPMS/yumgroups.xml
325 bootcd-MODULE := bootcd build bootmanager
326 bootcd-SPEC := bootcd/bootcd.spec
327 bootcd-RPMBUILD := sudo rpmbuild
330 # bootcd requires current packages
331 bootcd: $(filter-out bootcd,$(ALL))
337 myplc-MODULE := myplc build pl_db plc_api plc_www plc/scripts
338 myplc-SPEC := myplc/myplc.spec
339 # Package must be built as root
340 myplc-RPMBUILD := sudo rpmbuild
343 # MyPLC may require current packages
344 myplc: $(filter-out myplc,$(ALL))
346 # ...and the yum manifest
347 myplc: RPMS/yumgroups.xml
353 # Upload packages to boot server
354 SERVER := build@boot.planet-lab.org
355 ARCHIVE := /var/www/html/install-rpms/archive
357 # Put nightly alpha builds in a subdirectory
359 ARCHIVE := $(ARCHIVE)/planetlab-alpha
360 REPOS := /var/www/html/install-rpms/planetlab-alpha
364 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
368 @echo make install is only meant to be called from ./build.sh
370 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
371 # Sign all RPMS. setsid detaches rpm from the terminal,
372 # allowing the (hopefully blank) GPG password to be entered
373 # from stdin instead of /dev/tty. Obviously, the build server
376 --define "_signature gpg" \
377 --define "_gpg_path /etc/planetlab" \
378 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
379 --resign RPMS/*/*.rpm SRPMS/*.rpm
383 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
385 # Create package manifest
386 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/SRPMS" SRPMS > SRPMS/packages.xml
387 # Populate repository
388 ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
389 rsync --delete --links --perms --times --group --compress --rsh=ssh \
390 $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*.rpm))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
391 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
392 ssh $(SERVER) createrepo -g yumgroups.xml $(ARCHIVE)/$(BASE)/RPMS >/dev/null
393 rsync --delete --links --perms --times --group --compress --rsh=ssh \
394 $(wildcard SRPMS/*.rpm) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
395 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
396 ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
398 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
399 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
400 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE)/RPMS/ $(REPOS) ; \