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