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