add plnode-utils to mlab.mk
[build.git] / mlab.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-DEVEL-RPMS += parted-devel glib2-devel libdhcp4client-devel libdhcp6client-devel libdhcp-devel 
19 mkinitrd-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-DEPEND-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-DEPEND-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-DEPEND-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-DEPEND-DEVEL-RPMS += util-vserver-lib util-vserver-devel util-vserver-core 
130 ifeq "$(local_libnl)" "true"
131 util-vserver-pl-DEPEND-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 # NodeManager
154 #
155 nodemanager-MODULES := nodemanager
156 nodemanager-SPEC := NodeManager.spec
157 ALL += nodemanager
158 IN_NODEIMAGE += nodemanager
159
160 #
161 # plnode-utils
162
163 plnode-utils-MODULES := plnode-utils
164 plnode-utils-SPEC := plnode-utils-vs.spec
165 ALL += plnode-utils
166 IN_NODEIMAGE += plnode-utils
167
168 #
169 # pl_sshd
170 #
171 sshd-MODULES := pl_sshd
172 sshd-SPEC := pl_sshd.spec
173 ALL += sshd
174 IN_NODEIMAGE += sshd
175
176 #
177 # codemux: Port 80 demux
178 #
179 codemux-MODULES := codemux
180 codemux-SPEC   := codemux.spec
181 ALL += codemux
182 IN_NODEIMAGE += codemux
183
184 #
185 # fprobe-ulog
186 #
187 fprobe-ulog-MODULES := fprobe-ulog
188 fprobe-ulog-SPEC := fprobe-ulog.spec
189 ALL += fprobe-ulog
190 IN_NODEIMAGE += fprobe-ulog
191
192 #
193 # DistributedRateLimiting
194 #
195 DistributedRateLimiting-MODULES := DistributedRateLimiting
196 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
197 ALL += DistributedRateLimiting
198 IN_NODEREPO += DistributedRateLimiting
199
200 #
201 # pf2slice
202 #
203 pf2slice-MODULES := pf2slice
204 pf2slice-SPEC := pf2slice.spec
205 ALL += pf2slice
206
207 #
208 # PlanetLab Mom: Cleans up your mess
209 #
210 mom-MODULES := mom
211 mom-SPEC := pl_mom.spec
212 ALL += mom
213 IN_NODEIMAGE += mom
214
215 #
216 # inotify-tools - local import
217 # rebuild this on centos5 (not found) - see yumexclude
218 #
219 local_inotify_tools=false
220 ifeq "$(DISTRONAME)" "centos5"
221 local_inotify_tools=true
222 endif
223
224 ifeq "$(DISTRONAME)" "sl6"
225 local_inotify_tools=true
226 endif
227
228 ifeq "$(local_inotify_tools)" "true"
229 inotify-tools-MODULES := inotify-tools
230 inotify-tools-SPEC := inotify-tools.spec
231 inotify-tools-BUILD-FROM-SRPM := yes
232 IN_NODEIMAGE += inotify-tools
233 ALL += inotify-tools
234 endif
235
236 #
237 # openvswitch
238 #
239 openvswitch-MODULES := openvswitch
240 openvswitch-SPEC := openvswitch.spec
241 openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
242
243 #ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14 f15 f16)"
244 #IN_NODEIMAGE += openvswitch
245 #ALL += openvswitch
246 #endif
247
248 #
249 # vsys
250 #
251 vsys-MODULES := vsys
252 vsys-SPEC := vsys.spec
253 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
254 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
255 ifeq "$(local_inotify_tools)" "true"
256 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
257 endif
258 IN_NODEIMAGE += vsys
259 ALL += vsys
260
261 #
262 # vsyssh : installed in slivers
263 #
264 vsyssh-MODULES := vsys
265 vsyssh-SPEC := vsyssh.spec
266 IN_SLICEIMAGE += vsyssh
267 ALL += vsyssh
268
269 #
270 # vsys-scripts
271 #
272 vsys-scripts-MODULES := vsys-scripts
273 vsys-scripts-SPEC := root-context/vsys-scripts.spec
274 IN_NODEIMAGE += vsys-scripts
275 ALL += vsys-scripts
276
277 #
278 # plcapi
279 #
280 plcapi-MODULES := plcapi
281 plcapi-SPEC := PLCAPI.spec
282 ALL += plcapi
283 IN_MYPLC += plcapi
284
285 #
286 # drupal
287
288 drupal-MODULES := drupal
289 drupal-SPEC := drupal.spec
290 drupal-BUILD-FROM-SRPM := yes
291 ALL += drupal
292 IN_MYPLC += drupal
293
294 #
295 # use the plewww module instead
296 #
297 plewww-MODULES := plewww
298 plewww-SPEC := plewww.spec
299 ALL += plewww
300 IN_MYPLC += plewww
301
302 #
303 # www-register-wizard
304 #
305 www-register-wizard-MODULES := www-register-wizard
306 www-register-wizard-SPEC := www-register-wizard.spec
307 ALL += www-register-wizard
308 IN_MYPLC += www-register-wizard
309
310 #
311 # pcucontrol
312 #
313 pcucontrol-MODULES := pcucontrol
314 pcucontrol-SPEC := pcucontrol.spec
315 ALL += pcucontrol
316
317 #
318 # monitor
319 #
320 monitor-MODULES := monitor
321 monitor-SPEC := Monitor.spec
322 monitor-DEVEL-RPMS += net-snmp net-snmp-devel
323 ALL += monitor
324 IN_NODEIMAGE += monitor
325
326 #
327 # PLC RT
328 #
329 plcrt-MODULES := PLCRT
330 plcrt-SPEC := plcrt.spec
331 ALL += plcrt
332
333 # f12 has 0.9-1 already
334 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
335 #
336 # pyopenssl
337 #
338 pyopenssl-MODULES := pyopenssl
339 pyopenssl-SPEC := pyOpenSSL.spec
340 pyopenssl-BUILD-FROM-SRPM := yes
341 ALL += pyopenssl
342 endif
343
344 #
345 # pyaspects
346 #
347 pyaspects-MODULES := pyaspects
348 pyaspects-SPEC := pyaspects.spec
349 pyaspects-BUILD-FROM-SRPM := yes
350 ALL += pyaspects
351
352 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
353 # In addition we now use sqlalchemy and 0.5 as per f12 is not compatible with our model
354 build_sfa=true
355 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f12 centos5)"
356 build_sfa=false
357 endif
358
359 ifeq "$(build_sfa)" "true"
360 #
361 # sfa - Slice Facility Architecture
362 #
363 sfa-MODULES := sfa
364 sfa-SPEC := sfa.spec
365 ALL += sfa
366
367 sface-MODULES := sface
368 sface-SPEC := sface.spec
369 ALL += sface
370 endif
371
372 #
373 # nodeconfig
374 #
375 nodeconfig-MODULES := nodeconfig
376 nodeconfig-SPEC := nodeconfig.spec
377 ALL += nodeconfig
378 IN_MYPLC += nodeconfig
379
380 #
381 # bootmanager
382 #
383 bootmanager-MODULES := bootmanager
384 bootmanager-SPEC := bootmanager.spec
385 ALL += bootmanager
386 IN_MYPLC += bootmanager
387
388 #
389 # pypcilib : used in bootcd
390
391 pypcilib-MODULES := pypcilib
392 pypcilib-SPEC := pypcilib.spec
393 ALL += pypcilib
394 IN_BOOTCD += pypcilib
395
396 #
397 # pyplnet
398 #
399 pyplnet-MODULES := pyplnet
400 pyplnet-SPEC := pyplnet.spec
401 ALL += pyplnet
402 IN_NODEIMAGE += pyplnet
403 IN_MYPLC += pyplnet
404 IN_BOOTCD += pyplnet
405
406 #
407 # OMF resource controller
408 #
409 omf-resctl-MODULES := omf
410 omf-resctl-SPEC := omf-resctl.spec
411 ALL += omf-resctl
412 IN_SLICEIMAGE += omf-resctl
413
414 #
415 # OMF exp controller
416 #
417 omf-expctl-MODULES := omf
418 omf-expctl-SPEC := omf-expctl.spec
419 ALL += omf-expctl
420
421 #
422 # bootcd
423 #
424 bootcd-MODULES := bootcd build
425 bootcd-SPEC := bootcd.spec
426 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
427 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
428 bootcd-RPMDATE := yes
429 ALL += bootcd
430 IN_MYPLC += bootcd
431
432 #
433 # images for slices
434 #
435 sliceimage-MODULES := sliceimage build
436 sliceimage-SPEC := sliceimage.spec
437 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
438 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
439 sliceimage-RPMDATE := yes
440 ALL += sliceimage
441 IN_NODEIMAGE += sliceimage
442
443 #
444 # vserver-specific sliceimage initialization
445
446 vserver-sliceimage-MODULES := sliceimage
447 vserver-sliceimage-SPEC    := vserver-sliceimage.spec
448 vserver-sliceimage-RPMDATE := yes
449 ALL                        += vserver-sliceimage
450 IN_NODEIMAGE               += vserver-sliceimage
451
452 #
453 # nodeimage
454 #
455 nodeimage-MODULES := nodeimage build
456 nodeimage-SPEC := nodeimage.spec
457 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
458 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
459 nodeimage-RPMDATE := yes
460 ALL += nodeimage
461 IN_MYPLC += nodeimage
462
463 #
464 # noderepo
465 #
466 # all rpms resulting from packages marked as being in nodeimage and sliceimage
467 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
468 # replace space with +++ (specvars cannot deal with spaces)
469 SPACE=$(subst x, ,x)
470 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
471
472 noderepo-MODULES := nodeimage
473 noderepo-SPEC := noderepo.spec
474 # package requires all embedded packages
475 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
476 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
477 #export rpm list to the specfile
478 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
479 noderepo-RPMDATE := yes
480 ALL += noderepo
481 IN_MYPLC += noderepo
482
483 #
484 # slicerepo
485 #
486 # all rpms resulting from packages marked as being in vserver
487 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
488 # replace space with +++ (specvars cannot deal with spaces)
489 SPACE=$(subst x, ,x)
490 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
491
492 slicerepo-MODULES := nodeimage
493 slicerepo-SPEC := slicerepo.spec
494 # package requires all embedded packages
495 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
496 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
497 #export rpm list to the specfile
498 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
499 slicerepo-RPMDATE := yes
500 ALL += slicerepo
501
502 #
503 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
504 #
505 myplc-MODULES := myplc
506 myplc-SPEC := myplc.spec
507 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
508 ALL += myplc
509
510 # myplc-docs only contains docs for PLCAPI and NMAPI, but
511 # we still need to pull MyPLC, as it is where the specfile lies, 
512 # together with the utility script docbook2drupal.sh
513 myplc-docs-MODULES := myplc plcapi nodemanager monitor
514 myplc-docs-SPEC := myplc-docs.spec
515 ALL += myplc-docs
516
517 # using some other name than myplc-release, as this is a make target already
518 release-MODULES := myplc
519 release-SPEC := myplc-release.spec
520 release-RPMDATE := yes
521 ALL += release