enable building DistributedRateLimiting for onelab
[build.git] / onelab.mk
1 # $Id$
2 # $URL$
3 #
4 # declare the packages to be built and their dependencies
5 # initial version from Mark Huang
6 # Mark Huang <mlhuang@cs.princeton.edu>
7 # Copyright (C) 2003-2006 The Trustees of Princeton University
8 # rewritten by Thierry Parmentelat - INRIA Sophia Antipolis
9 #
10 # see doc in Makefile  
11 #
12
13 #
14 # kernel
15 #
16 # use a package name with srpm in it:
17 # so the source rpm is created by running make srpm in the codebase
18 #
19
20 kernel-MODULES := linux-2.6
21 kernel-SPEC := kernel-2.6.spec
22 kernel-BUILD-FROM-SRPM := yes
23 ifeq "$(HOSTARCH)" "i386"
24 kernel-RPMFLAGS:= --target i686
25 else
26 kernel-RPMFLAGS:= --target $(HOSTARCH)
27 endif
28 # this is useful for 2.6.22 but will not be needed anymore with 2.6.27
29 kernel-SPECVARS += iwlwifi=1 
30 kernel-SPECVARS += kernelconfig=planetlab
31 KERNELS += kernel
32
33 kernels: $(KERNELS)
34 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
35
36 ALL += $(KERNELS)
37 # this is to mark on which image a given rpm is supposed to go
38 IN_BOOTCD += $(KERNELS)
39 IN_VSERVER += $(KERNELS)
40 IN_BOOTSTRAPFS += $(KERNELS)
41
42 #
43 # ipfw: root context module, and slice companion
44 #
45 ipfwroot-MODULES := ipfw
46 ipfwroot-SPEC := planetlab/ipfwroot.spec
47 ipfwroot-DEPEND-DEVEL-RPMS := kernel-devel
48 ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
49         kernel_release=$(kernel.rpm-release) \
50         kernel_arch=$(kernel.rpm-arch)
51 ALL += ipfwroot
52
53 ipfwslice-MODULES := ipfw
54 ipfwslice-SPEC := planetlab/ipfwslice.spec
55 ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
56         kernel_release=$(kernel.rpm-release) \
57         kernel_arch=$(kernel.rpm-arch)
58 ALL += ipfwslice
59
60 # this doesn't build on f12 - weird all right - I suspect gcc to be smarter but that needs investigation
61 # is madwifi still current anyway ? should we move to ath5k instead ?
62 #ifneq "$(DISTRONAME)" "f12"
63 #
64 # madwifi
65 #
66 madwifi-MODULES := madwifi
67 madwifi-SPEC := madwifi.spec
68 madwifi-BUILD-FROM-SRPM := yes
69 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
70 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
71         kernel_release=$(kernel.rpm-release) \
72         kernel_arch=$(kernel.rpm-arch)
73 ALL += madwifi
74 IN_BOOTSTRAPFS += madwifi
75 #endif
76
77
78 # nozomi
79
80 nozomi-MODULES := nozomi
81 nozomi-SPEC := nozomi.spec
82 nozomi-DEPEND-DEVEL-RPMS := kernel-devel
83 nozomi-SPECVARS = kernel_version=$(kernel.rpm-version) \
84         kernel_release=$(kernel.rpm-release) \
85         kernel_arch=$(kernel.rpm-arch)
86 IN_BOOTSTRAPFS += nozomi
87 ALL += nozomi
88
89 #
90 # comgt
91
92 comgt-MODULES := comgt
93 comgt-SPEC := comgt.spec
94 IN_BOOTSTRAPFS += comgt
95 ALL += comgt
96
97 #
98 # umts: root context stuff
99 #
100 umts-backend-MODULES := planetlab-umts-tools
101 umts-backend-SPEC := backend.spec
102 IN_BOOTSTRAPFS += umts-backend
103 ALL += umts-backend
104
105 #
106 # umts: slice tools
107 #
108 umts-frontend-MODULES := planetlab-umts-tools
109 umts-frontend-SPEC := frontend.spec
110 IN_VSERVER += umts-frontend
111 ALL += umts-frontend
112
113 #
114 # iptables
115 #
116 iptables-MODULES := iptables
117 iptables-SPEC := iptables.spec
118 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
119 ALL += iptables
120 IN_BOOTSTRAPFS += iptables
121
122 #
123 # iproute
124 #
125 iproute-MODULES := iproute2
126 iproute-SPEC := iproute.spec
127 ALL += iproute
128 IN_BOOTSTRAPFS += iproute
129 IN_VSERVER += iproute
130 IN_BOOTCD += iproute
131
132 #
133 # util-vserver
134 #
135 util-vserver-MODULES := util-vserver
136 util-vserver-SPEC := util-vserver.spec
137 util-vserver-RPMFLAGS:= --without dietlibc
138 ALL += util-vserver
139 IN_BOOTSTRAPFS += util-vserver
140
141 #
142 # libnl - local import
143 # we need either 1.1 or at least 1.0.pre6
144 # rebuild this on centos5 - see kexcludes in build.common
145 #
146 local_libnl=false
147 ifeq "$(DISTRONAME)" "centos5"
148 local_libnl=true
149 endif
150
151 ifeq "$(local_libnl)" "true"
152 libnl-MODULES := libnl
153 libnl-SPEC := libnl.spec
154 libnl-BUILD-FROM-SRPM := yes
155 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
156 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
157 ALL += libnl
158 IN_BOOTSTRAPFS += libnl
159 endif
160
161 #
162 # util-vserver-pl
163 #
164 util-vserver-pl-MODULES := util-vserver-pl
165 util-vserver-pl-SPEC := util-vserver-pl.spec
166 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
167 ifeq "$(local_libnl)" "true"
168 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
169 endif
170 ALL += util-vserver-pl
171 IN_BOOTSTRAPFS += util-vserver-pl
172
173 #
174 # NodeUpdate
175 #
176 nodeupdate-MODULES := NodeUpdate
177 nodeupdate-SPEC := NodeUpdate.spec
178 ALL += nodeupdate
179 IN_BOOTSTRAPFS += nodeupdate
180
181 #
182 # ipod
183 #
184 ipod-MODULES := PingOfDeath
185 ipod-SPEC := ipod.spec
186 ALL += ipod
187 IN_BOOTSTRAPFS += ipod
188
189 #
190 # NodeManager
191 #
192 nodemanager-MODULES := NodeManager
193 nodemanager-SPEC := NodeManager.spec
194 ALL += nodemanager
195 IN_BOOTSTRAPFS += nodemanager
196
197 #
198 # pl_sshd
199 #
200 sshd-MODULES := pl_sshd
201 sshd-SPEC := pl_sshd.spec
202 ALL += sshd
203 IN_BOOTSTRAPFS += sshd
204
205 #
206 # codemux: Port 80 demux
207 #
208 codemux-MODULES := CoDemux
209 codemux-SPEC   := codemux.spec
210 #codemux-RPMBUILD := bash ./rpmbuild.sh
211 ALL += codemux
212 IN_BOOTSTRAPFS += codemux
213
214 #
215 # fprobe-ulog
216 #
217 fprobe-ulog-MODULES := fprobe-ulog
218 fprobe-ulog-SPEC := fprobe-ulog.spec
219 ALL += fprobe-ulog
220 IN_BOOTSTRAPFS += fprobe-ulog
221
222 #
223 # DistributedRateLimiting
224 #
225 DistributedRateLimiting-MODULES := DistributedRateLimiting
226 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
227 ALL += DistributedRateLimiting
228 IN_NODEREPO += DistributedRateLimiting
229
230
231 #
232 # pf2slice
233 #
234 pf2slice-MODULES := pf2slice
235 pf2slice-SPEC := pf2slice.spec
236 ALL += pf2slice
237
238 #
239 # PlanetLab Mom: Cleans up your mess
240 #
241 mom-MODULES := Mom
242 mom-SPEC := pl_mom.spec
243 ALL += mom
244 IN_BOOTSTRAPFS += mom
245
246 #
247 # inotify-tools - local import
248 # rebuild this on centos5 (not found) - see kexcludes in build.common
249 #
250 local_inotify_tools=false
251 ifeq "$(DISTRONAME)" "centos5"
252 local_inotify_tools=true
253 endif
254
255 ifeq "$(local_inotify_tools)" "true"
256 inotify-tools-MODULES := inotify-tools
257 inotify-tools-SPEC := inotify-tools.spec
258 inotify-tools-BUILD-FROM-SRPM := yes
259 IN_BOOTSTRAPFS += inotify-tools
260 ALL += inotify-tools
261 endif
262
263 #
264 # vsys
265 #
266 vsys-MODULES := vsys
267 vsys-SPEC := vsys.spec
268 ifeq "$(local_inotify_tools)" "true"
269 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
270 endif
271 IN_BOOTSTRAPFS += vsys
272 ALL += vsys
273
274 #
275 # vsys-scripts
276 #
277 vsys-scripts-MODULES := vsys-scripts
278 vsys-scripts-SPEC := vsys-scripts.spec
279 IN_BOOTSTRAPFS += vsys-scripts
280 ALL += vsys-scripts
281
282 #
283 # plcapi
284 #
285 plcapi-MODULES := PLCAPI
286 plcapi-SPEC := PLCAPI.spec
287 ALL += plcapi
288
289 #
290 # drupal
291
292 drupal-MODULES := drupal
293 drupal-SPEC := drupal.spec
294 drupal-BUILD-FROM-SRPM := yes
295 ALL += drupal
296
297 #
298 # use the plewww module instead
299 #
300 plewww-MODULES := PLEWWW
301 plewww-SPEC := plewww.spec
302 ALL += plewww
303
304 #
305 # www-register-wizard
306 #
307 www-register-wizard-MODULES := www-register-wizard
308 www-register-wizard-SPEC := www-register-wizard.spec
309 ALL += www-register-wizard
310
311 #
312 # pcucontrol
313 #
314 pcucontrol-MODULES := pcucontrol
315 pcucontrol-SPEC := pcucontrol.spec
316 ALL += pcucontrol
317
318 #
319 # monitor
320 #
321 monitor-MODULES := Monitor
322 monitor-SPEC := Monitor.spec
323 ALL += monitor
324 IN_BOOTSTRAPFS += monitor
325
326 #
327 # zabbix
328 #
329 zabbix-MODULES := Monitor
330 zabbix-SPEC := zabbix.spec
331 zabbix-BUILD-FROM-SRPM := yes
332 ALL += zabbix
333
334 #
335 # PLC RT
336 #
337 plcrt-MODULES := PLCRT
338 plcrt-SPEC := plcrt.spec
339 ALL += plcrt
340
341 #
342 # pyopenssl
343 #
344 pyopenssl-MODULES := pyopenssl
345 pyopenssl-SPEC := pyOpenSSL.spec
346 pyopenssl-BUILD-FROM-SRPM := yes
347 ALL += pyopenssl
348
349 #
350 # pyaspects
351 #
352 pyaspects-MODULES := pyaspects
353 pyaspects-SPEC := pyaspects.spec
354 pyaspects-BUILD-FROM-SRPM := yes
355 ALL += pyaspects
356
357 #
358 # ejabberd
359 #
360 ejabberd-MODULES := ejabberd
361 ejabberd-SPEC := ejabberd.spec
362 ejabberd-BUILD-FROM-SRPM := yes
363 ALL += ejabberd
364
365 #
366 # sfa - Slice Facility Architecture
367 #
368 sfa-MODULES := sfa
369 sfa-SPEC := sfa.spec
370 ALL += sfa
371
372 #
373 # nodeconfig
374 #
375 nodeconfig-MODULES := nodeconfig
376 nodeconfig-SPEC := nodeconfig.spec
377 ALL += nodeconfig
378
379 #
380 # bootmanager
381 #
382 bootmanager-MODULES := BootManager
383 bootmanager-SPEC := bootmanager.spec
384 ALL += bootmanager
385
386 #
387 # pypcilib : used in bootcd
388
389 pypcilib-MODULES := pypcilib
390 pypcilib-SPEC := pypcilib.spec
391 ALL += pypcilib
392 IN_BOOTCD += pypcilib
393
394 #
395 # pyplnet
396 #
397 pyplnet-MODULES := pyplnet
398 pyplnet-SPEC := pyplnet.spec
399 ALL += pyplnet
400 IN_BOOTSTRAPFS += pyplnet
401 IN_BOOTCD += pyplnet
402
403 #
404 # OMF resource controller
405 #
406 omf-resctl-MODULES := omf
407 omf-resctl-SPEC := omf-resctl.spec
408 ALL += omf-resctl
409 IN_VSERVER += omf-resctl
410
411 #
412 # OMF exp controller
413 #
414 omf-expctl-MODULES := omf
415 omf-expctl-SPEC := omf-expctl.spec
416 ALL += omf-expctl
417
418 #
419 # bootcd
420 #
421 bootcd-MODULES := BootCD build
422 bootcd-SPEC := bootcd.spec
423 bootcd-RPMBUILD := bash ./rpmbuild.sh
424 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
425 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
426 bootcd-RPMDATE := yes
427 ALL += bootcd
428
429 #
430 # vserver : reference image for slices
431 #
432 vserver-MODULES := VserverReference build
433 vserver-SPEC := vserver-reference.spec
434 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
435 vserver-DEPEND-FILES := RPMS/yumgroups.xml
436 vserver-RPMDATE := yes
437 ALL += vserver
438 IN_BOOTSTRAPFS += vserver
439
440 #
441 # bootstrapfs
442 #
443 bootstrapfs-MODULES := BootstrapFS build
444 bootstrapfs-SPEC := bootstrapfs.spec
445 bootstrapfs-RPMBUILD := bash ./rpmbuild.sh
446 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
447 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
448 bootstrapfs-RPMDATE := yes
449 ALL += bootstrapfs
450
451 #
452 # noderepo
453 #
454 # all rpms resulting from packages marked as being in bootstrapfs and vserver
455 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
456 # replace space with +++ (specvars cannot deal with spaces)
457 SPACE=$(subst x, ,x)
458 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
459
460 noderepo-MODULES := BootstrapFS 
461 noderepo-SPEC := noderepo.spec
462 noderepo-RPMBUILD := bash ./rpmbuild.sh
463 # package requires all embedded packages
464 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
465 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
466 #export rpm list to the specfile
467 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
468 noderepo-RPMDATE := yes
469 ALL += noderepo
470
471 #
472 # slicerepo
473 #
474 # all rpms resulting from packages marked as being in vserver
475 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
476 # replace space with +++ (specvars cannot deal with spaces)
477 SPACE=$(subst x, ,x)
478 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
479
480 slicerepo-MODULES := BootstrapFS 
481 slicerepo-SPEC := slicerepo.spec
482 slicerepo-RPMBUILD := bash ./rpmbuild.sh
483 # package requires all embedded packages
484 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
485 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
486 #export rpm list to the specfile
487 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
488 slicerepo-RPMDATE := yes
489 ALL += slicerepo
490
491 #
492 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
493 #
494 myplc-MODULES := MyPLC
495 myplc-SPEC := myplc.spec
496 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
497 ALL += myplc
498
499 # myplc-docs only contains docs for PLCAPI and NMAPI, but
500 # we still need to pull MyPLC, as it is where the specfile lies, 
501 # together with the utility script docbook2drupal.sh
502 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
503 myplc-docs-SPEC := myplc-docs.spec
504 ALL += myplc-docs
505
506 # using some other name than myplc-release, as this is a make target already
507 release-MODULES := MyPLC
508 release-SPEC := myplc-release.spec
509 release-RPMDATE := yes
510 ALL += release