support for more variants of libvirt - warning, libvirt*GITPATH is set in lxc.mk...
[build.git] / lxc.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 ### the madwifi drivers ship with fedora16's kernel rpm
12
13 #
14 # lxc-userspace: scripts for entering containers
15 #
16 lxc-userspace-MODULES := lxc-userspace
17 lxc-userspace-SPEC := lxc-userspace.spec
18 ALL += lxc-userspace
19 IN_NODEIMAGE += lxc-userspace
20
21 #
22 #
23 # transforward: root context module for transparent port forwarding
24 #
25 transforward-MODULES := transforward
26 transforward-SPEC := transforward.spec
27 ALL += transforward
28 IN_NODEIMAGE += transforward
29
30 #
31 # procprotect: root context module for protecting against weaknesses in /proc
32 #
33 procprotect-MODULES := procprotect
34 procprotect-SPEC := procprotect.spec
35 ALL += procprotect
36 IN_NODEIMAGE += procprotect
37
38 #
39 # ipfw: root context module, and slice companion
40 #
41 # this module won't build yet under f20
42 ifeq "$(DISTRONAME)" "f18"
43 ipfwroot-MODULES := ipfw
44 ipfwroot-SPEC := planetlab/ipfwroot.spec
45 ALL += ipfwroot
46 IN_NODEIMAGE += ipfwroot
47
48 ipfwslice-MODULES := ipfw
49 ipfwslice-SPEC := planetlab/ipfwslice.spec
50 ALL += ipfwslice
51 endif
52
53 #
54 # comgt - a companion to umts tools
55
56 comgt-MODULES := comgt
57 comgt-SPEC := comgt.spec
58 IN_NODEIMAGE += comgt
59 ALL += comgt
60
61 #
62 # umts: root context stuff
63 #
64 umts-backend-MODULES := planetlab-umts-tools
65 umts-backend-SPEC := backend.spec
66 IN_NODEIMAGE += umts-backend
67 ALL += umts-backend
68
69 #
70 # umts: slice tools
71 #
72 umts-frontend-MODULES := planetlab-umts-tools
73 umts-frontend-SPEC := frontend.spec
74 IN_SLICEIMAGE += umts-frontend
75 ALL += umts-frontend
76
77 #
78 # NodeUpdate
79 #
80 nodeupdate-MODULES := nodeupdate
81 nodeupdate-SPEC := NodeUpdate.spec
82 ALL += nodeupdate
83 IN_NODEIMAGE += nodeupdate
84
85 #
86 # ipod
87 #
88 ipod-MODULES := PingOfDeath
89 ipod-SPEC := ipod.spec
90 ALL += ipod
91 IN_NODEIMAGE += ipod
92
93 #
94 # plnode-utils
95
96 plnode-utils-MODULES := plnode-utils
97 plnode-utils-SPEC := plnode-utils-lxc.spec
98 ALL += plnode-utils
99 IN_NODEIMAGE += plnode-utils
100
101 #
102 # nodemanager
103 #
104 nodemanager-lib-MODULES := nodemanager
105 nodemanager-lib-SPEC := nodemanager-lib.spec
106 ALL += nodemanager-lib
107 IN_NODEIMAGE += nodemanager-lib
108
109 nodemanager-lxc-MODULES := nodemanager
110 nodemanager-lxc-SPEC := nodemanager-lxc.spec
111 ALL += nodemanager-lxc
112 IN_NODEIMAGE += nodemanager-lxc
113
114 #
115 # pl_sshd
116 #
117 sshd-MODULES := pl_sshd
118 sshd-SPEC := pl_sshd.spec
119 ALL += sshd
120 IN_NODEIMAGE += sshd
121
122 #
123 # codemux: Port 80 demux
124 #
125 codemux-MODULES := codemux
126 codemux-SPEC   := codemux.spec
127 ALL += codemux
128 IN_NODEIMAGE += codemux
129
130 #
131 # fprobe-ulog
132 #
133 fprobe-ulog-MODULES := fprobe-ulog
134 fprobe-ulog-SPEC := fprobe-ulog.spec
135 ALL += fprobe-ulog
136 IN_NODEIMAGE += fprobe-ulog
137
138 #################### libvirt version selection
139 # for now things are a bit confused
140 # on f18 we build with our own 1.0.4 and that works fine
141 # on f20 we have tried the mainstream (1.1.3) libvirt, 
142 # as well as the latest 1.2.1 release, and both exhibit an issue that needs to be fixed
143 # in addition once this is done we might need to have f18+1.2.1 as well
144 # so for now we leave the option to set the following on the command line
145 # LIBVIRT=104 (for f18)
146 # LIBVIRT=mainstream (for f20) 
147 # LIBVIRT=121 (for f18 or f20)
148
149 # set default according to distro
150 ifeq "$(LIBVIRT)" ""
151 ifeq "$(DISTRONAME)" "f18"
152 LIBVIRT=104
153 else
154 LIBVIRT=121
155 endif
156 endif
157
158 ifeq "$(LIBVIRT)" "104"
159 local_libvirt=true
160 separate_libvirt_python=false
161 libvirt-GITPATH                 := git://git.onelab.eu/libvirt.git@libvirt-1.0.4-3
162 endif
163
164 ifeq "$(LIBVIRT)" "121"
165 local_libvirt=true
166 separate_libvirt_python=true
167 libvirt-GITPATH                 := git://git.onelab.eu/libvirt.git@1.2.1
168 libvirt-python-GITPATH          := git://git.onelab.eu/libvirt-python.git@1.2.1
169 endif
170
171 ifeq "$(LIBVIRT)" "mainstream"
172 local_libvirt=false
173 endif
174
175 #
176 # libvirt
177 #
178 ifeq "$(local_libvirt)" "true"
179
180 libvirt-MODULES := libvirt
181 libvirt-SPEC    := libvirt.spec
182 libvirt-BUILD-FROM-SRPM := yes
183 # The --without options are breaking spec2make : hard-wired in the specfile instead
184 libvirt-STOCK-DEVEL-RPMS += xhtml1-dtds gettext gettext-devel libtasn1-devel gnutls-devel 
185 libvirt-STOCK-DEVEL-RPMS += libattr-devel augeas libpciaccess-devel yajl-devel 
186 libvirt-STOCK-DEVEL-RPMS += libpcap-devel radvd ebtables device-mapper-devel 
187 libvirt-STOCK-DEVEL-RPMS += ceph-devel numactl-devel libcap-ng-devel scrub 
188 # for 1.2.1 - first seen on f20, not sure for the other ones
189 libvirt-STOCK-DEVEL-RPMS += libblkid-devel glusterfs-api-devel glusterfs-devel
190
191 ifeq "$(DISTRONAME)" "f16"
192 libvirt-STOCK-DEVEL-RPMS += libnl-devel libudev-devel
193 endif
194 # strictly speaking fuse-devel is not required anymore but we might wish to turn fuse back on again in the future
195 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f18 f20)"
196 libvirt-STOCK-DEVEL-RPMS += fuse-devel libssh2-devel dbus-devel numad 
197 libvirt-STOCK-DEVEL-RPMS += systemd-devel libnl3-devel iptables-ipv6 libgcrypt-devel netcf-devel
198 endif
199 ALL += libvirt
200 IN_NODEREPO += libvirt
201 IN_NODEIMAGE += libvirt
202 endif
203
204 #
205 ## libvirt-python
206 #
207 ifeq "$(separate_libvirt_python)" "true"
208
209 libvirt-python-MODULES := libvirt-python
210 libvirt-python-SPEC    := libvirt-python.spec
211 libvirt-python-BUILD-FROM-SRPM := yes
212 libvirt-python-STOCK-DEVEL-RPMS += gnutls-utils nc pm-utils 
213 libvirt-python-LOCAL-DEVEL-RPMS += libvirt-devel libvirt-docs libvirt-client
214 libvirt-python-RPMFLAGS :=     --define 'packager PlanetLab'
215 ALL += libvirt-python
216 IN_NODEREPO += libvirt-python
217 IN_NODEIMAGE += libvirt-python
218 endif
219
220 #
221 # DistributedRateLimiting
222 #
223 #DistributedRateLimiting-MODULES := DistributedRateLimiting
224 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
225 #ALL += DistributedRateLimiting
226 #IN_NODEREPO += DistributedRateLimiting
227
228 #
229 # pf2slice
230 #
231 pf2slice-MODULES := pf2slice
232 pf2slice-SPEC := pf2slice.spec
233 ALL += pf2slice
234
235 ##
236 ## PlanetLab Mom: Cleans up your mess
237 ##
238 #mom-MODULES := mom
239 #mom-SPEC := pl_mom.spec
240 #ALL += mom
241 #IN_NODEIMAGE += mom
242
243 #
244 # openvswitch
245 #
246 # openvswitch-MODULES := openvswitch
247 # openvswitch-SPEC := openvswitch.spec
248 # openvswitch-STOCK-DEVEL-RPMS += kernel-devel
249 # IN_NODEIMAGE += openvswitch
250 # # build only on f14 as f16 has this natively
251 # ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14)"
252 # ALL += openvswitch
253 # endif
254
255 #
256 # vsys
257 #
258 vsys-MODULES := vsys
259 vsys-SPEC := vsys.spec
260 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
261 vsys-STOCK-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
262 IN_NODEIMAGE += vsys
263 ALL += vsys
264
265 #
266 # vsyssh : installed in slivers
267 #
268 vsyssh-MODULES := vsys
269 vsyssh-SPEC := vsyssh.spec
270 IN_SLICEIMAGE += vsyssh
271 ALL += vsyssh
272
273 #
274 # vsys-scripts
275 #
276 vsys-scripts-MODULES := vsys-scripts
277 vsys-scripts-SPEC := root-context/vsys-scripts.spec
278 IN_NODEIMAGE += vsys-scripts
279 ALL += vsys-scripts
280
281 #
282 # bind_public
283 #
284 bind_public-MODULES := bind_public
285 bind_public-SPEC := bind_public.spec
286 IN_SLICEIMAGE += bind_public
287 ALL += bind_public
288
289 #
290 # sliver-openvswitch
291 #
292 sliver-openvswitch-MODULES := sliver-openvswitch
293 sliver-openvswitch-SPEC := sliver-openvswitch.spec
294 IN_SLICEIMAGE += sliver-openvswitch
295 ALL += sliver-openvswitch
296
297 #
298 # plcapi
299 #
300 plcapi-MODULES := plcapi
301 plcapi-SPEC := plcapi.spec
302 ALL += plcapi
303 IN_MYPLC += plcapi
304
305 #
306 # drupal
307
308 drupal-MODULES := drupal
309 drupal-SPEC := drupal.spec
310 drupal-BUILD-FROM-SRPM := yes
311 ALL += drupal
312 IN_MYPLC += drupal
313
314 #
315 # use the plewww module instead
316 #
317 plewww-MODULES := plewww
318 plewww-SPEC := plewww.spec
319 ALL += plewww
320 IN_MYPLC += plewww
321
322 #
323 # www-register-wizard
324 #
325 www-register-wizard-MODULES := www-register-wizard
326 www-register-wizard-SPEC := www-register-wizard.spec
327 ALL += www-register-wizard
328 IN_MYPLC += www-register-wizard
329
330 #
331 # pcucontrol
332 #
333 pcucontrol-MODULES := pcucontrol
334 pcucontrol-SPEC := pcucontrol.spec
335 ALL += pcucontrol
336
337 #
338 # monitor
339 #
340 #monitor-MODULES := monitor
341 #monitor-SPEC := Monitor.spec
342 #monitor-STOCK-DEVEL-RPMS += net-snmp net-snmp-devel
343 #ALL += monitor
344 #IN_NODEIMAGE += monitor
345
346 #
347 # PLC RT
348 #
349 plcrt-MODULES := PLCRT
350 plcrt-SPEC := plcrt.spec
351 ALL += plcrt
352
353 # f12 has 0.9-1 already
354 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
355 #
356 # pyopenssl
357 #
358 pyopenssl-MODULES := pyopenssl
359 pyopenssl-SPEC := pyOpenSSL.spec
360 pyopenssl-BUILD-FROM-SRPM := yes
361 ALL += pyopenssl
362 endif
363
364 #
365 # pyaspects
366 #
367 pyaspects-MODULES := pyaspects
368 pyaspects-SPEC := pyaspects.spec
369 pyaspects-BUILD-FROM-SRPM := yes
370 ALL += pyaspects
371
372 #
373 # nodeconfig
374 #
375 nodeconfig-MODULES := nodeconfig
376 nodeconfig-SPEC := nodeconfig.spec
377 ALL += nodeconfig
378 IN_MYPLC += nodeconfig
379
380 #
381 # bootmanager
382 #
383 bootmanager-MODULES := bootmanager
384 bootmanager-SPEC := bootmanager.spec
385 ALL += bootmanager
386 IN_MYPLC += bootmanager
387
388 #
389 # pypcilib : used in bootcd
390
391 pypcilib-MODULES := pypcilib
392 pypcilib-SPEC := pypcilib.spec
393 ALL += pypcilib
394 IN_BOOTCD += pypcilib
395
396 #
397 # pyplnet
398 #
399 pyplnet-MODULES := pyplnet
400 pyplnet-SPEC := pyplnet.spec
401 ALL += pyplnet
402 IN_NODEIMAGE += pyplnet
403 IN_MYPLC += pyplnet
404 IN_BOOTCD += pyplnet
405
406 #
407 # for OMF resource controller as  a gem : rvm-ruby has right version of ruby and related gem stuff
408 #
409 rvm-ruby-MODULES := rvm-ruby
410 rvm-ruby-SPEC := rpm/rvm-ruby.spec
411 rvm-ruby-STOCK-DEVEL-RPMS := chrpath libyaml-devel libffi-devel libxslt-devel
412 # Since Oct 22. 2013, f18 has a new release of openssl that ruby is not too happy to build against
413 # turning this off for now, Christoph Dwertmann to monitor the status of this bug/incompatibility upstream
414 #ALL += rvm-ruby
415
416 #
417 # OML measurement library
418 #
419 oml-MODULES := oml
420 oml-STOCK-DEVEL-RPMS += sqlite-devel 
421 oml-SPEC := liboml.spec
422 ALL += oml
423
424 #
425 # bootcd
426 #
427 bootcd-MODULES := bootcd build
428 bootcd-SPEC := bootcd.spec
429 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
430 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
431 bootcd-RPMDATE := yes
432 ALL += bootcd
433 IN_MYPLC += bootcd
434
435 #
436 # images for slices
437 #
438 sliceimage-MODULES := sliceimage build
439 sliceimage-SPEC := sliceimage.spec
440 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
441 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
442 sliceimage-RPMDATE := yes
443 ALL += sliceimage
444 IN_NODEIMAGE += sliceimage
445
446 #
447 # lxc-specific sliceimage initialization
448
449 lxc-sliceimage-MODULES  := sliceimage
450 lxc-sliceimage-SPEC     := lxc-sliceimage.spec
451 lxc-sliceimage-RPMDATE  := yes
452 ALL                     += lxc-sliceimage
453 IN_NODEIMAGE            += lxc-sliceimage
454
455 #
456 # nodeimage
457 #
458 nodeimage-MODULES := nodeimage build
459 nodeimage-SPEC := nodeimage.spec
460 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
461 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
462 nodeimage-RPMDATE := yes
463 ALL += nodeimage
464 IN_MYPLC += nodeimage
465
466 #
467 # noderepo
468 #
469 # all rpms resulting from packages marked as being in nodeimage and sliceimage
470 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
471 # replace space with +++ (specvars cannot deal with spaces)
472 SPACE=$(subst x, ,x)
473 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
474
475 noderepo-MODULES := nodeimage
476 noderepo-SPEC := noderepo.spec
477 # package requires all embedded packages
478 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
479 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
480 #export rpm list to the specfile
481 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
482 noderepo-RPMDATE := yes
483 ALL += noderepo
484 IN_MYPLC += noderepo
485
486 #
487 # slicerepo
488 #
489 # all rpms resulting from packages marked as being in vserver
490 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
491 # replace space with +++ (specvars cannot deal with spaces)
492 SPACE=$(subst x, ,x)
493 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
494
495 slicerepo-MODULES := nodeimage
496 slicerepo-SPEC := slicerepo.spec
497 # package requires all embedded packages
498 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
499 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
500 #export rpm list to the specfile
501 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
502 slicerepo-RPMDATE := yes
503 ALL += slicerepo
504
505 #
506 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
507 #
508 myplc-MODULES := myplc
509 myplc-SPEC := myplc.spec
510 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
511 ALL += myplc
512
513 # myplc-docs only contains docs for PLCAPI and NMAPI, but
514 # we still need to pull MyPLC, as it is where the specfile lies, 
515 # together with the utility script docbook2drupal.sh
516 myplc-docs-MODULES := myplc plcapi nodemanager monitor
517 myplc-docs-SPEC := myplc-docs.spec
518 ALL += myplc-docs
519
520 # using some other name than myplc-release, as this is a make target already
521 release-MODULES := myplc
522 release-SPEC := myplc-release.spec
523 release-RPMDATE := yes
524 ALL += release
525
526 ##############################
527 # sfa requires python-2.7
528 build_sfa=true
529 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f12 centos5)"
530 build_sfa=false
531 endif
532
533 ifeq "$(build_sfa)" "true"
534 #
535 # sfa - Slice Facility Architecture
536 #
537 sfa-MODULES := sfa
538 sfa-SPEC := sfa.spec
539 ALL += sfa
540
541 #sface-MODULES := sface
542 #sface-SPEC := sface.spec
543 #ALL += sface
544 endif
545
546 ##############################
547 # don't build these by default, we have separate builds for that
548 myslice-MODULES := myslice
549 myslice-SPEC := myslice.spec
550 myslice-STOCK-DEVEL-RPMS := python-django
551 myslice-STOCK-DEVEL-DEBS := python-django python-django-south
552 #ALL += myslice
553
554 manifold-MODULES := manifold
555 manifold-SPEC := manifold.spec
556 #ALL += manifold