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