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-MODULE := linux-2.6
53 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
61 vnet-SPEC := vnet/vnet.spec
64 # Build kernel first so we can bootstrap off of its build
71 util-vserver-MODULE := util-vserver
72 util-vserver-SPEC := util-vserver/util-vserver.spec
80 yum-SPEC := yum/yum.spec
87 PlanetLabAccounts-MODULE := PlanetLabAccounts
88 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
89 ALL += PlanetLabAccounts
95 NodeUpdate-MODULE := NodeUpdate
96 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
103 PlanetLabConf-MODULE := PlanetLabConf
104 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
112 ipod-SPEC := ipod/ipod.spec
120 sudo-SPEC := sudo/planetlab_sudo.spec
127 pycurl-MODULE := pycurl
128 pycurl-SPEC := pycurl/pycurl.spec
135 BootServerRequest-MODULE := BootServerRequest
136 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
137 ALL += BootServerRequest
143 PlanetLabID-MODULE := PlanetLabID
144 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
151 NodeManager-MODULE := NodeManager
152 NodeManager-SPEC := NodeManager/NodeManager.spec
159 pl_sshd-MODULE := pl_sshd
160 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
167 libhttpd++-MODULE := libhttpd++
168 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
172 # Proper: Privileged Operations Service
175 proper-MODULE := proper
176 proper-SPEC := proper/proper.spec
185 mysql-MODULE := mysql
186 mysql-SPEC := mysql/mysql.spec
193 ulogd-MODULE := ulogd
194 ulogd-SPEC := ulogd/ulogd.spec
197 ulogd: kernel proper mysql
203 netflow-MODULE := netflow
204 netflow-SPEC := netflow/netflow.spec
210 # PlanetLab Mom: Cleans up your mess
213 pl_mom-MODULE := pl_mom
214 pl_mom-SPEC := pl_mom/pl_mom.spec
221 iptables-MODULE := iptables
222 iptables-SPEC := iptables/iptables.spec
231 iproute-MODULE := iproute2
232 iproute-SPEC := iproute2/iproute.spec
239 kexec-tools-MODULE := kexec-tools
240 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
248 dhcp-SPEC := dhcp/dhcp.spec
255 util-python-MODULE := util-python
256 util-python-SPEC := util-python/util-python.spec
259 # proper and util-vserver both use scripts in util-python for building
261 util-vserver: util-python
262 PlanetLabAuth: util-python
268 PlanetLabAuth-MODULE := pl_auth
269 PlanetLabAuth-SPEC := pl_auth/pl_auth.spec
276 plcapilib-MODULE := plcmdline
277 plcapilib-SPEC := plcmdline/plcapilib.spec
284 PLCAPI-MODULE := new_plc_api
285 PLCAPI-SPEC := new_plc_api/PLCAPI.spec
292 vserver-reference-MODULE := vserver-reference build
293 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
294 # Package must be built as root
295 vserver-reference-RPMBUILD := sudo rpmbuild
296 ALL += vserver-reference
298 # vserver-reference may require current packages
299 vserver-reference: $(filter-out vserver-reference,$(ALL))
305 bootmanager-MODULE := bootmanager build
306 bootmanager-SPEC := bootmanager/bootmanager.spec
307 bootmanager-RPMBUILD := sudo rpmbuild
310 # bootmanager requires current packages
311 bootmanager: $(filter-out bootmanager,$(ALL))
313 # ...and the yum manifest
314 bootmanager: RPMS/yumgroups.xml
320 bootcd-MODULE := bootcd build bootmanager
321 bootcd-SPEC := bootcd/bootcd.spec
322 bootcd-RPMBUILD := sudo rpmbuild
325 # bootcd requires current packages
326 bootcd: $(filter-out bootcd,$(ALL))
332 myplc-MODULE := $(sort $(foreach module,$(ALL),$($(module)-MODULE)) myplc new_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
365 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
366 # Sign all RPMS. setsid detaches rpm from the terminal,
367 # allowing the (hopefully blank) GPG password to be entered
368 # from stdin instead of /dev/tty. Obviously, the build server
371 --define "_signature gpg" \
372 --define "_gpg_path /etc/planetlab" \
373 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
374 --resign RPMS/*/*.rpm SRPMS/*.rpm
378 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
380 # Create package manifest
381 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
382 # Populate repository
383 ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
384 rsync --delete --links --perms --times --group --compress --rsh=ssh \
385 $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*.rpm))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
386 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
387 ssh $(SERVER) createrepo -g yumgroups.xml $(ARCHIVE)/$(BASE)/RPMS >/dev/null
388 rsync --delete --links --perms --times --group --compress --rsh=ssh \
389 $(wildcard SRPMS/*.rpm) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
390 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
391 ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
393 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
394 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
395 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE)/RPMS/ $(REPOS) ; \