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
38 kernel-MODULE := linux-2.6
39 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
47 vnet-SPEC := vnet/vnet.spec
50 # Build kernel first so we can bootstrap off of its build
57 util-vserver-MODULE := util-vserver
58 util-vserver-SPEC := util-vserver/util-vserver.spec
65 lkcdutils-MODULE := lkcdutils
66 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
69 # Build kernel first so we can bootstrap off of its build
77 yum-SPEC := yum/yum.spec
84 ksymoops-MODULE := ksymoops
85 ksymoops-SPEC := ksymoops/ksymoops.spec
92 PlanetLabAccounts-MODULE := PlanetLabAccounts
93 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
94 ALL += PlanetLabAccounts
100 NodeUpdate-MODULE := NodeUpdate
101 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
108 PlanetLabConf-MODULE := PlanetLabConf
109 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
116 PlanetLabKeys-MODULE := PlanetLabKeys
117 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.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
177 # Resource Management Tools
180 resman-MODULE := resman
181 resman-SPEC := resman/resman.spec
188 libhttpd++-MODULE := libhttpd++
189 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
193 # Proper: Privileged Operations Service
196 proper-MODULE := proper
197 proper-SPEC := proper/proper.spec
206 ulogd-MODULE := ulogd
207 ulogd-SPEC := ulogd/ulogd.spec
216 netflow-MODULE := netflow
217 netflow-SPEC := netflow/netflow.spec
221 # PlanetLab Mom: Cleans up your mess
224 pl_mom-MODULE := pl_mom
225 pl_mom-SPEC := pl_mom/pl_mom.spec
232 iptables-MODULE := iptables
233 iptables-SPEC := iptables/iptables.spec
242 iproute-MODULE := iproute2
243 iproute-SPEC := iproute2/iproute.spec
250 kexec-tools-MODULE := kexec-tools
251 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
259 dhcp-SPEC := dhcp/dhcp.spec
266 util-python-MODULE := util-python
267 util-python-SPEC := util-python/util-python.spec
270 # proper and util-vserver both use scripts in util-python for building
272 util-vserver: util-python
278 plcapilib-MODULE := plcmdline
279 plcapilib-SPEC := plcmdline/plcapilib.spec
286 vserver-reference-MODULE := vserver-reference
287 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
288 # Package must be built as root
289 vserver-reference-RPMBUILD := sudo rpmbuild
290 ALL += vserver-reference
292 # vserver-reference may require current packages
293 vserver-reference: $(filter-out vserver-reference,$(ALL))
295 # ...and the yum manifest
296 vserver-reference: RPMS/yumgroups.xml
302 bootmanager-MODULE := bootmanager
303 bootmanager-SPEC := bootmanager/bootmanager.spec
304 bootmanager-RPMBUILD := sudo rpmbuild
307 # bootmanager requires current packages
308 bootmanager: $(filter-out bootmanager,$(ALL))
310 # ...and the yum manifest
311 bootmanager: RPMS/yumgroups.xml
317 bootcd-MODULE := bootcd_v3
318 bootcd-SPEC := bootcd_v3/bootcd.spec
319 bootcd-RPMBUILD := sudo rpmbuild
322 # bootcd requires current packages
323 bootcd: $(filter-out bootcd,$(ALL))
325 # ...and the yum manifest
326 bootcd: RPMS/yumgroups.xml
332 myplc-MODULE := myplc pl_db plc_api plc_www plc/scripts
333 myplc-SPEC := myplc/myplc.spec
334 # Package must be built as root
335 myplc-RPMBUILD := sudo rpmbuild
338 # MyPLC may require current packages
339 myplc: $(filter-out myplc,$(ALL))
341 # ...and the yum manifest
342 myplc: RPMS/yumgroups.xml
348 # Upload packages to boot server
349 SERVER := build@boot.planet-lab.org
350 ARCHIVE := /var/www/html/install-rpms/archive
352 # Put nightly alpha builds in a subdirectory
354 ARCHIVE := $(ARCHIVE)/planetlab-alpha
355 REPOS := /var/www/html/install-rpms/planetlab-alpha
359 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
363 @echo make install is only meant to be called from ./build.sh
367 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
369 # Create package manifest
370 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/SRPMS" SRPMS > SRPMS/packages.xml
371 # Populate repository
372 ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
373 rsync --delete --links --perms --times --group --compress --rsh=ssh \
374 $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
375 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
376 ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/RPMS >/dev/null
377 rsync --delete --links --perms --times --group --compress --rsh=ssh \
378 $(wildcard SRPMS/*) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
379 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
380 ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
382 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
383 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
384 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE)/RPMS/ $(REPOS) ; \