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