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