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