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 planetlab.mk | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[: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
74 yum-SPEC := yum/yum.spec
81 PlanetLabAccounts-MODULE := PlanetLabAccounts
82 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
83 ALL += PlanetLabAccounts
89 NodeUpdate-MODULE := NodeUpdate
90 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
97 PlanetLabConf-MODULE := PlanetLabConf
98 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
106 ipod-SPEC := ipod/ipod.spec
114 sudo-SPEC := sudo/planetlab_sudo.spec
121 pycurl-MODULE := pycurl
122 pycurl-SPEC := pycurl/pycurl.spec
129 BootServerRequest-MODULE := BootServerRequest
130 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
131 ALL += BootServerRequest
137 PlanetLabID-MODULE := PlanetLabID
138 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
145 sidewinder-MODULE := sidewinder
146 sidewinder-SPEC := sidewinder/sidewinder.spec
153 pl_sshd-MODULE := pl_sshd
154 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
161 libhttpd++-MODULE := libhttpd++
162 libhttpd++-SPEC := libhttpd++/libhttpd++.spec
166 # Proper: Privileged Operations Service
169 proper-MODULE := proper
170 proper-SPEC := proper/proper.spec
179 mysql-MODULE := mysql
180 mysql-SPEC := mysql/mysql.spec
187 ulogd-MODULE := ulogd
188 ulogd-SPEC := ulogd/ulogd.spec
191 ulogd: kernel proper mysql
197 netflow-MODULE := netflow
198 netflow-SPEC := netflow/netflow.spec
204 # PlanetLab Mom: Cleans up your mess
207 pl_mom-MODULE := pl_mom
208 pl_mom-SPEC := pl_mom/pl_mom.spec
215 iptables-MODULE := iptables
216 iptables-SPEC := iptables/iptables.spec
225 iproute-MODULE := iproute2
226 iproute-SPEC := iproute2/iproute.spec
233 kexec-tools-MODULE := kexec-tools
234 kexec-tools-SPEC := kexec-tools/kexec-tools.spec
242 dhcp-SPEC := dhcp/dhcp.spec
249 util-python-MODULE := util-python
250 util-python-SPEC := util-python/util-python.spec
253 # proper and util-vserver both use scripts in util-python for building
255 util-vserver: util-python
256 PlanetLabAuth: util-python
262 PlanetLabAuth-MODULE := pl_auth
263 PlanetLabAuth-SPEC := pl_auth/pl_auth.spec
270 plcapilib-MODULE := plcmdline
271 plcapilib-SPEC := plcmdline/plcapilib.spec
278 vserver-reference-MODULE := vserver-reference build
279 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
280 # Package must be built as root
281 vserver-reference-RPMBUILD := sudo rpmbuild
282 ALL += vserver-reference
284 # vserver-reference may require current packages
285 vserver-reference: $(filter-out vserver-reference,$(ALL))
291 bootmanager-MODULE := bootmanager build
292 bootmanager-SPEC := bootmanager/bootmanager.spec
293 bootmanager-RPMBUILD := sudo rpmbuild
296 # bootmanager requires current packages
297 bootmanager: $(filter-out bootmanager,$(ALL))
299 # ...and the yum manifest
300 bootmanager: RPMS/yumgroups.xml
306 bootcd-MODULE := bootcd build bootmanager
307 bootcd-SPEC := bootcd/bootcd.spec
308 bootcd-RPMBUILD := sudo rpmbuild
311 # bootcd requires current packages
312 bootcd: $(filter-out bootcd,$(ALL))
318 myplc-MODULE := $(sort $(foreach module,$(ALL),$($(module)-MODULE))) myplc
319 myplc-SPEC := myplc/myplc.spec
320 # Package must be built as root
321 myplc-RPMBUILD := sudo rpmbuild
324 # MyPLC may require current packages
325 myplc: $(filter-out myplc,$(ALL))
327 # ...and the yum manifest
328 myplc: RPMS/yumgroups.xml
334 # Upload packages to boot server
335 SERVER := build@boot.planet-lab.org
336 ARCHIVE := /var/www/html/install-rpms/archive
338 # Put nightly alpha builds in a subdirectory
340 ARCHIVE := $(ARCHIVE)/planetlab-alpha
341 REPOS := /var/www/html/install-rpms/planetlab-alpha
345 install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
349 @echo make install is only meant to be called from ./build.sh
351 ifneq ($(wildcard /etc/planetlab/secring.gpg),)
352 # Sign all RPMS. setsid detaches rpm from the terminal,
353 # allowing the (hopefully blank) GPG password to be entered
354 # from stdin instead of /dev/tty. Obviously, the build server
357 --define "_signature gpg" \
358 --define "_gpg_path /etc/planetlab" \
359 --define "_gpg_name PlanetLab <info@planet-lab.org>" \
360 --resign RPMS/*/*.rpm SRPMS/*.rpm
364 echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
366 # Create package manifest
367 sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
368 # Populate repository
369 ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
370 rsync --delete --links --perms --times --group --compress --rsh=ssh \
371 $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*.rpm))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
372 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
373 ssh $(SERVER) createrepo -g yumgroups.xml $(ARCHIVE)/$(BASE)/RPMS >/dev/null
374 rsync --delete --links --perms --times --group --compress --rsh=ssh \
375 $(wildcard SRPMS/*.rpm) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
376 ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
377 ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
379 # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
380 if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
381 ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE)/RPMS/ $(REPOS) ; \