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