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