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