debian : support for stock devel packages required for building (-STOCK-DEVEL-DEBS)
[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 # starting on 2013-03-05 when f18 has moved to kernel 3.8 this module won't build anymore
42 #ifeq "$(DISTRONAME)" "f16"
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 #################### using our own libvirt on all distros for now
139 #local_libvirt=false
140 #ifeq "$(DISTRONAME)" "f16"
141 local_libvirt=true
142 #endif
143
144 ifeq "$(local_libvirt)" "true"
145 #
146 # libvirt
147 #
148 libvirt-MODULES := libvirt
149 libvirt-SPEC    := libvirt.spec
150 libvirt-BUILD-FROM-SRPM := yes
151 # The --without options are breaking spec2make : hard-wired in the specfile instead
152 libvirt-STOCK-DEVEL-RPMS += xhtml1-dtds gettext gettext-devel libtasn1-devel gnutls-devel 
153 libvirt-STOCK-DEVEL-RPMS += libattr-devel augeas libpciaccess-devel yajl-devel 
154 libvirt-STOCK-DEVEL-RPMS += libpcap-devel radvd ebtables device-mapper-devel 
155 libvirt-STOCK-DEVEL-RPMS += ceph-devel numactl-devel libcap-ng-devel scrub 
156 ifeq "$(DISTRONAME)" "f16"
157 libvirt-STOCK-DEVEL-RPMS += libnl-devel libudev-devel
158 endif
159 # strictly speaking fuse-devel is not required anymore but we might wish to turn fuse back on again in the future
160 ifeq "$(DISTRONAME)" "f18"
161 libvirt-STOCK-DEVEL-RPMS += fuse-devel libssh2-devel dbus-devel numad 
162 libvirt-STOCK-DEVEL-RPMS += systemd-devel libnl3-devel iptables-ipv6 
163 endif
164 libvirt-RPMFLAGS :=     --define 'packager PlanetLab'
165 ALL += libvirt
166 IN_NODEREPO += libvirt
167 IN_NODEIMAGE += libvirt
168 endif
169
170 #
171 # DistributedRateLimiting
172 #
173 #DistributedRateLimiting-MODULES := DistributedRateLimiting
174 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
175 #ALL += DistributedRateLimiting
176 #IN_NODEREPO += DistributedRateLimiting
177
178 #
179 # pf2slice
180 #
181 pf2slice-MODULES := pf2slice
182 pf2slice-SPEC := pf2slice.spec
183 ALL += pf2slice
184
185 ##
186 ## PlanetLab Mom: Cleans up your mess
187 ##
188 #mom-MODULES := mom
189 #mom-SPEC := pl_mom.spec
190 #ALL += mom
191 #IN_NODEIMAGE += mom
192
193 #
194 # inotify-tools - local import
195 # rebuild this on centos5 (not found) - see yumexclude
196 #
197 local_inotify_tools=false
198 ifeq "$(DISTRONAME)" "centos5"
199 local_inotify_tools=true
200 endif
201
202 ifeq "$(DISTRONAME)" "sl6"
203 local_inotify_tools=true
204 endif
205
206 ifeq "$(local_inotify_tools)" "true"
207 inotify-tools-MODULES := inotify-tools
208 inotify-tools-SPEC := inotify-tools.spec
209 inotify-tools-BUILD-FROM-SRPM := yes
210 IN_NODEIMAGE += inotify-tools
211 ALL += inotify-tools
212 endif
213
214 #
215 # openvswitch
216 #
217 # openvswitch-MODULES := openvswitch
218 # openvswitch-SPEC := openvswitch.spec
219 # openvswitch-LOCAL-STOCK-DEVEL-RPMS += kernel-devel
220 # IN_NODEIMAGE += openvswitch
221 # # build only on f14 as f16 has this natively
222 # ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14)"
223 # ALL += openvswitch
224 # endif
225
226 #
227 # vsys
228 #
229 vsys-MODULES := vsys
230 vsys-SPEC := vsys.spec
231 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
232 vsys-STOCK-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
233 ifeq "$(local_inotify_tools)" "true"
234 vsys-LOCAL-STOCK-DEVEL-RPMS += inotify-tools inotify-tools-devel
235 endif
236 IN_NODEIMAGE += vsys
237 ALL += vsys
238
239 #
240 # vsyssh : installed in slivers
241 #
242 vsyssh-MODULES := vsys
243 vsyssh-SPEC := vsyssh.spec
244 IN_SLICEIMAGE += vsyssh
245 ALL += vsyssh
246
247 #
248 # vsys-scripts
249 #
250 vsys-scripts-MODULES := vsys-scripts
251 vsys-scripts-SPEC := root-context/vsys-scripts.spec
252 IN_NODEIMAGE += vsys-scripts
253 ALL += vsys-scripts
254
255 #
256 # bind_public
257 #
258 bind_public-MODULES := bind_public
259 bind_public-SPEC := bind_public.spec
260 IN_SLICEIMAGE += bind_public
261 ALL += bind_public
262
263 #
264 # sliver-openvswitch
265 #
266 sliver-openvswitch-MODULES := sliver-openvswitch
267 sliver-openvswitch-SPEC := sliver-openvswitch.spec
268 IN_SLICEIMAGE += sliver-openvswitch
269 ALL += sliver-openvswitch
270
271 #
272 # plcapi
273 #
274 plcapi-MODULES := plcapi
275 plcapi-SPEC := plcapi.spec
276 ALL += plcapi
277 IN_MYPLC += plcapi
278
279 #
280 # mod_python
281
282 # this was dropped in fedora18, at which point the intention has been to
283 # move to wsgi instead; however our using wsgi currently looks unstable
284 # so you have the option to install this manually, in which case myplc will 
285 # swap to using mod_python - see plc.d/httpd
286 ifeq "$(DISTRO)" "Fedora"
287 ifneq "$(DISTRONAME)" "f16"
288 mod_python-MODULES := mod_python
289 mod_python-SPEC := mod_python.spec
290 mod_python-STOCK-DEVEL-RPMS := httpd-devel
291 mod_python-BUILD-FROM-SRPM := yes
292 ALL += mod_python
293 endif
294 endif
295
296 #
297 # drupal
298
299 drupal-MODULES := drupal
300 drupal-SPEC := drupal.spec
301 drupal-BUILD-FROM-SRPM := yes
302 ALL += drupal
303 IN_MYPLC += drupal
304
305 #
306 # use the plewww module instead
307 #
308 plewww-MODULES := plewww
309 plewww-SPEC := plewww.spec
310 ALL += plewww
311 IN_MYPLC += plewww
312
313 #
314 # www-register-wizard
315 #
316 www-register-wizard-MODULES := www-register-wizard
317 www-register-wizard-SPEC := www-register-wizard.spec
318 ALL += www-register-wizard
319 IN_MYPLC += www-register-wizard
320
321 #
322 # pcucontrol
323 #
324 pcucontrol-MODULES := pcucontrol
325 pcucontrol-SPEC := pcucontrol.spec
326 ALL += pcucontrol
327
328 #
329 # monitor
330 #
331 #monitor-MODULES := monitor
332 #monitor-SPEC := Monitor.spec
333 #monitor-STOCK-DEVEL-RPMS += net-snmp net-snmp-devel
334 #ALL += monitor
335 #IN_NODEIMAGE += monitor
336
337 #
338 # PLC RT
339 #
340 plcrt-MODULES := PLCRT
341 plcrt-SPEC := plcrt.spec
342 ALL += plcrt
343
344 # f12 has 0.9-1 already
345 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
346 #
347 # pyopenssl
348 #
349 pyopenssl-MODULES := pyopenssl
350 pyopenssl-SPEC := pyOpenSSL.spec
351 pyopenssl-BUILD-FROM-SRPM := yes
352 ALL += pyopenssl
353 endif
354
355 #
356 # pyaspects
357 #
358 pyaspects-MODULES := pyaspects
359 pyaspects-SPEC := pyaspects.spec
360 pyaspects-BUILD-FROM-SRPM := yes
361 ALL += pyaspects
362
363 #
364 # nodeconfig
365 #
366 nodeconfig-MODULES := nodeconfig
367 nodeconfig-SPEC := nodeconfig.spec
368 ALL += nodeconfig
369 IN_MYPLC += nodeconfig
370
371 #
372 # bootmanager
373 #
374 bootmanager-MODULES := bootmanager
375 bootmanager-SPEC := bootmanager.spec
376 ALL += bootmanager
377 IN_MYPLC += bootmanager
378
379 #
380 # pypcilib : used in bootcd
381
382 pypcilib-MODULES := pypcilib
383 pypcilib-SPEC := pypcilib.spec
384 ALL += pypcilib
385 IN_BOOTCD += pypcilib
386
387 #
388 # pyplnet
389 #
390 pyplnet-MODULES := pyplnet
391 pyplnet-SPEC := pyplnet.spec
392 ALL += pyplnet
393 IN_NODEIMAGE += pyplnet
394 IN_MYPLC += pyplnet
395 IN_BOOTCD += pyplnet
396
397 #
398 # for OMF resource controller as  a gem : rvm-ruby has right version of ruby and related gem stuff
399 #
400 rvm-ruby-MODULES := rvm-ruby
401 rvm-ruby-SPEC := rpm/rvm-ruby.spec
402 rvm-ruby-STOCK-DEVEL-RPMS := chrpath libyaml-devel libffi-devel libxslt-devel
403 ALL += rvm-ruby
404
405 #
406 # OML measurement library
407 #
408 oml-MODULES := oml
409 oml-STOCK-DEVEL-RPMS += sqlite-devel 
410 oml-SPEC := liboml.spec
411 ALL += oml
412
413 #
414 # bootcd
415 #
416 bootcd-MODULES := bootcd build
417 bootcd-SPEC := bootcd.spec
418 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
419 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
420 bootcd-RPMDATE := yes
421 ALL += bootcd
422 IN_MYPLC += bootcd
423
424 #
425 # images for slices
426 #
427 sliceimage-MODULES := sliceimage build
428 sliceimage-SPEC := sliceimage.spec
429 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
430 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
431 sliceimage-RPMDATE := yes
432 ALL += sliceimage
433 IN_NODEIMAGE += sliceimage
434
435 #
436 # lxc-specific sliceimage initialization
437
438 lxc-sliceimage-MODULES  := sliceimage
439 lxc-sliceimage-SPEC     := lxc-sliceimage.spec
440 lxc-sliceimage-RPMDATE  := yes
441 ALL                     += lxc-sliceimage
442 IN_NODEIMAGE            += lxc-sliceimage
443
444 #
445 # nodeimage
446 #
447 nodeimage-MODULES := nodeimage build
448 nodeimage-SPEC := nodeimage.spec
449 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
450 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
451 nodeimage-RPMDATE := yes
452 ALL += nodeimage
453 IN_MYPLC += nodeimage
454
455 #
456 # noderepo
457 #
458 # all rpms resulting from packages marked as being in nodeimage and sliceimage
459 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
460 # replace space with +++ (specvars cannot deal with spaces)
461 SPACE=$(subst x, ,x)
462 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
463
464 noderepo-MODULES := nodeimage
465 noderepo-SPEC := noderepo.spec
466 # package requires all embedded packages
467 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
468 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
469 #export rpm list to the specfile
470 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
471 noderepo-RPMDATE := yes
472 ALL += noderepo
473 IN_MYPLC += noderepo
474
475 #
476 # slicerepo
477 #
478 # all rpms resulting from packages marked as being in vserver
479 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
480 # replace space with +++ (specvars cannot deal with spaces)
481 SPACE=$(subst x, ,x)
482 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
483
484 slicerepo-MODULES := nodeimage
485 slicerepo-SPEC := slicerepo.spec
486 # package requires all embedded packages
487 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
488 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
489 #export rpm list to the specfile
490 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
491 slicerepo-RPMDATE := yes
492 ALL += slicerepo
493
494 #
495 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
496 #
497 myplc-MODULES := myplc
498 myplc-SPEC := myplc.spec
499 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
500 ALL += myplc
501
502 # myplc-docs only contains docs for PLCAPI and NMAPI, but
503 # we still need to pull MyPLC, as it is where the specfile lies, 
504 # together with the utility script docbook2drupal.sh
505 myplc-docs-MODULES := myplc plcapi nodemanager monitor
506 myplc-docs-SPEC := myplc-docs.spec
507 ALL += myplc-docs
508
509 # using some other name than myplc-release, as this is a make target already
510 release-MODULES := myplc
511 release-SPEC := myplc-release.spec
512 release-RPMDATE := yes
513 ALL += release
514
515 ##############################
516 # sfa requires python-2.7
517 build_sfa=true
518 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f12 centos5)"
519 build_sfa=false
520 endif
521
522 ifeq "$(build_sfa)" "true"
523 #
524 # sfa - Slice Facility Architecture
525 #
526 sfa-MODULES := sfa
527 sfa-SPEC := sfa.spec
528 ALL += sfa
529
530 sface-MODULES := sface
531 sface-SPEC := sface.spec
532 ALL += sface
533 endif
534
535 ##############################
536 # don't build these by default, we have separate builds for that
537 myslice-MODULES := myslice
538 myslice-SPEC := myslice.spec
539 myslice-STOCK-DEVEL-RPMS := python-django
540 myslice-STOCK-DEVEL-DEBS := python-django
541 #ALL += myslice
542
543 manifold-MODULES := manifold
544 manifold-SPEC := manifold.spec
545 #ALL += manifold