Merge branch 'master' of ssh://git.onelab.eu/git/build
[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 ahip with fedora16's kernel rpm
12
13 #
14 # lxctools: scripts for entering containers
15 #
16 lxctools-MODULES := lxctools
17 lxctools-SPEC := lxctools.spec
18 ALL += lxctools
19 IN_NODEIMAGE += lxctools
20
21 #
22 # lxcsu: root context module for entering namespaces
23 #
24 lxcsu-MODULES := lxcsu
25 lxcsu-SPEC := lxcsu.spec
26 ALL += lxcsu
27 IN_NODEIMAGE += lxcsu
28
29 #
30 #
31 # transforward: root context module for transparent port forwarding
32 #
33 transforward-MODULES := transforward
34 transforward-SPEC := transforward.spec
35 ALL += transforward
36 IN_NODEIMAGE += transforward
37
38 #
39 # procprotect: root context module for protecting against weaknesses in /proc
40 #
41 procprotect-MODULES := procprotect
42 procprotect-SPEC := procprotect.spec
43 ALL += procprotect
44 IN_NODEIMAGE += procprotect
45
46 #
47 # ipfw: root context module, and slice companion
48 #
49 ipfwroot-MODULES := ipfw
50 ipfwroot-SPEC := planetlab/ipfwroot.spec
51 ALL += ipfwroot
52 IN_NODEIMAGE += ipfwroot
53
54 ipfwslice-MODULES := ipfw
55 ipfwslice-SPEC := planetlab/ipfwslice.spec
56 ALL += ipfwslice
57
58 #
59 # NodeUpdate
60 #
61 nodeupdate-MODULES := nodeupdate
62 nodeupdate-SPEC := NodeUpdate.spec
63 ALL += nodeupdate
64 IN_NODEIMAGE += nodeupdate
65
66 #
67 # ipod
68 #
69 ipod-MODULES := PingOfDeath
70 ipod-SPEC := ipod.spec
71 ALL += ipod
72 IN_NODEIMAGE += ipod
73
74 #
75 # plnode-utils
76
77 plnode-utils-MODULES := plnode-utils
78 plnode-utils-SPEC := plnode-utils-lxc.spec
79 ALL += plnode-utils
80 IN_NODEIMAGE += plnode-utils
81
82 #
83 # nodemanager
84 #
85 nodemanager-lib-MODULES := nodemanager
86 nodemanager-lib-SPEC := nodemanager-lib.spec
87 ALL += nodemanager-lib
88 IN_NODEIMAGE += nodemanager-lib
89
90 nodemanager-lxc-MODULES := nodemanager
91 nodemanager-lxc-SPEC := nodemanager-lxc.spec
92 ALL += nodemanager-lxc
93 IN_NODEIMAGE += nodemanager-lxc
94
95 #
96 # pl_sshd
97 #
98 sshd-MODULES := pl_sshd
99 sshd-SPEC := pl_sshd.spec
100 ALL += sshd
101 IN_NODEIMAGE += sshd
102
103 #
104 # codemux: Port 80 demux
105 #
106 codemux-MODULES := codemux
107 codemux-SPEC   := codemux.spec
108 ALL += codemux
109 IN_NODEIMAGE += codemux
110
111 #
112 # fprobe-ulog
113 #
114 fprobe-ulog-MODULES := fprobe-ulog
115 fprobe-ulog-SPEC := fprobe-ulog.spec
116 ALL += fprobe-ulog
117 IN_NODEIMAGE += fprobe-ulog
118
119 #################### libvirt on f16 is too old, sounds like f17 has something fine
120 local_libvirt=false
121 ifeq "$(DISTRONAME)" "f16"
122 local_libvirt=true
123 endif
124
125 ifeq "$(local_libvirt)" "true"
126 #
127 # libvirt
128 #
129 libvirt-MODULES := libvirt
130 libvirt-SPEC    := libvirt.spec
131 libvirt-BUILD-FROM-SRPM := yes
132 libvirt-DEVEL-RPMS += libxml2-devel gnutls-devel device-mapper-devel yajl-devel gettext 
133 libvirt-DEVEL-RPMS += python-devel libcap-ng-devel libpciaccess-devel radvd numactl-devel 
134 libvirt-DEVEL-RPMS += xhtml1-dtds libxslt libtasn1-devel systemtap-sdt-devel iptables-ipv6 augeas 
135 libvirt-DEVEL-RPMS += libudev-devel libpcap-devel libnl-devel ebtables scrub ceph-devel
136 # The --without options are breaking spec2make
137 #libvirt-RPMFLAGS := --without storage-disk --without storage-iscsi --without storage-scsi \
138 #                       --without storage-fs --without storage-lvm \
139 #                       --without polkit --without sasl --without audit --with capng --with udev \
140 #                       --without netcf --without avahi --without sanlock \
141 #                       --without xen --without qemu --without hyperv --without phyp --without esx \
142 #                       --without libxl \
143 libvirt-RPMFLAGS :=     --define 'packager PlanetLab'
144 ALL += libvirt
145 IN_NODEREPO += libvirt
146 IN_NODEIMAGE += libvirt
147 endif
148
149 #
150 # DistributedRateLimiting
151 #
152 #DistributedRateLimiting-MODULES := DistributedRateLimiting
153 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
154 #ALL += DistributedRateLimiting
155 #IN_NODEREPO += DistributedRateLimiting
156
157 #
158 # pf2slice
159 #
160 pf2slice-MODULES := pf2slice
161 pf2slice-SPEC := pf2slice.spec
162 ALL += pf2slice
163
164 ##
165 ## PlanetLab Mom: Cleans up your mess
166 ##
167 #mom-MODULES := mom
168 #mom-SPEC := pl_mom.spec
169 #ALL += mom
170 #IN_NODEIMAGE += mom
171
172 #
173 # inotify-tools - local import
174 # rebuild this on centos5 (not found) - see yumexclude
175 #
176 local_inotify_tools=false
177 ifeq "$(DISTRONAME)" "centos5"
178 local_inotify_tools=true
179 endif
180
181 ifeq "$(DISTRONAME)" "sl6"
182 local_inotify_tools=true
183 endif
184
185 ifeq "$(local_inotify_tools)" "true"
186 inotify-tools-MODULES := inotify-tools
187 inotify-tools-SPEC := inotify-tools.spec
188 inotify-tools-BUILD-FROM-SRPM := yes
189 IN_NODEIMAGE += inotify-tools
190 ALL += inotify-tools
191 endif
192
193 #
194 # openvswitch
195 #
196 # openvswitch-MODULES := openvswitch
197 # openvswitch-SPEC := openvswitch.spec
198 # openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
199 # IN_NODEIMAGE += openvswitch
200 # # build only on f14 as f16 has this natively
201 # ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14)"
202 # ALL += openvswitch
203 # endif
204
205 #
206 # vsys
207 #
208 vsys-MODULES := vsys
209 vsys-SPEC := vsys.spec
210 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
211 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
212 ifeq "$(local_inotify_tools)" "true"
213 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
214 endif
215 IN_NODEIMAGE += vsys
216 ALL += vsys
217
218 #
219 # vsyssh : installed in slivers
220 #
221 vsyssh-MODULES := vsys
222 vsyssh-SPEC := vsyssh.spec
223 IN_SLICEIMAGE += vsyssh
224 ALL += vsyssh
225
226 #
227 # vsys-scripts
228 #
229 vsys-scripts-MODULES := vsys-scripts
230 vsys-scripts-SPEC := root-context/vsys-scripts.spec
231 IN_NODEIMAGE += vsys-scripts
232 ALL += vsys-scripts
233
234 #
235 # bind_public
236 #
237 bind_public-MODULES := bind_public
238 bind_public-SPEC := bind_public.spec
239 IN_SLICEIMAGE += bind_public
240 ALL += bind_public
241
242 #
243 # plcapi
244 #
245 plcapi-MODULES := plcapi
246 plcapi-SPEC := PLCAPI.spec
247 ALL += plcapi
248 IN_MYPLC += plcapi
249
250 #
251 # drupal
252
253 drupal-MODULES := drupal
254 drupal-SPEC := drupal.spec
255 drupal-BUILD-FROM-SRPM := yes
256 ALL += drupal
257 IN_MYPLC += drupal
258
259 #
260 # use the plewww module instead
261 #
262 plewww-MODULES := plewww
263 plewww-SPEC := plewww.spec
264 ALL += plewww
265 IN_MYPLC += plewww
266
267 #
268 # www-register-wizard
269 #
270 www-register-wizard-MODULES := www-register-wizard
271 www-register-wizard-SPEC := www-register-wizard.spec
272 ALL += www-register-wizard
273 IN_MYPLC += www-register-wizard
274
275 #
276 # pcucontrol
277 #
278 pcucontrol-MODULES := pcucontrol
279 pcucontrol-SPEC := pcucontrol.spec
280 ALL += pcucontrol
281
282 #
283 # monitor
284 #
285 #monitor-MODULES := monitor
286 #monitor-SPEC := Monitor.spec
287 #monitor-DEVEL-RPMS += net-snmp net-snmp-devel
288 #ALL += monitor
289 #IN_NODEIMAGE += monitor
290
291 #
292 # PLC RT
293 #
294 plcrt-MODULES := PLCRT
295 plcrt-SPEC := plcrt.spec
296 ALL += plcrt
297
298 # f12 has 0.9-1 already
299 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
300 #
301 # pyopenssl
302 #
303 pyopenssl-MODULES := pyopenssl
304 pyopenssl-SPEC := pyOpenSSL.spec
305 pyopenssl-BUILD-FROM-SRPM := yes
306 ALL += pyopenssl
307 endif
308
309 #
310 # pyaspects
311 #
312 pyaspects-MODULES := pyaspects
313 pyaspects-SPEC := pyaspects.spec
314 pyaspects-BUILD-FROM-SRPM := yes
315 ALL += pyaspects
316
317 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
318 # In addition we now use sqlalchemy and 0.5 as per f12 is not compatible with our model
319 build_sfa=true
320 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f12 centos5)"
321 build_sfa=false
322 endif
323
324 ifeq "$(build_sfa)" "true"
325 #
326 # sfa - Slice Facility Architecture
327 #
328 sfa-MODULES := sfa
329 sfa-SPEC := sfa.spec
330 ALL += sfa
331
332 sface-MODULES := sface
333 sface-SPEC := sface.spec
334 ALL += sface
335 endif
336
337 #
338 # nodeconfig
339 #
340 nodeconfig-MODULES := nodeconfig
341 nodeconfig-SPEC := nodeconfig.spec
342 ALL += nodeconfig
343 IN_MYPLC += nodeconfig
344
345 #
346 # bootmanager
347 #
348 bootmanager-MODULES := bootmanager
349 bootmanager-SPEC := bootmanager.spec
350 ALL += bootmanager
351 IN_MYPLC += bootmanager
352
353 #
354 # pypcilib : used in bootcd
355
356 pypcilib-MODULES := pypcilib
357 pypcilib-SPEC := pypcilib.spec
358 ALL += pypcilib
359 IN_BOOTCD += pypcilib
360
361 #
362 # pyplnet
363 #
364 pyplnet-MODULES := pyplnet
365 pyplnet-SPEC := pyplnet.spec
366 ALL += pyplnet
367 IN_NODEIMAGE += pyplnet
368 IN_MYPLC += pyplnet
369 IN_BOOTCD += pyplnet
370
371 #
372 # OMF resource controller
373 #
374 omf-resctl-MODULES := omf
375 omf-resctl-SPEC := omf-resctl.spec
376 ALL += omf-resctl
377 IN_SLICEIMAGE += omf-resctl
378
379 #
380 # OMF exp controller
381 #
382 omf-expctl-MODULES := omf
383 omf-expctl-SPEC := omf-expctl.spec
384 ALL += omf-expctl
385
386 #
387 # bootcd
388 #
389 bootcd-MODULES := bootcd build
390 bootcd-SPEC := bootcd.spec
391 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
392 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
393 bootcd-RPMDATE := yes
394 ALL += bootcd
395 IN_MYPLC += bootcd
396
397 #
398 # images for slices
399 #
400 sliceimage-MODULES := sliceimage build
401 sliceimage-SPEC := sliceimage.spec
402 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
403 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
404 sliceimage-RPMDATE := yes
405 ALL += sliceimage
406 IN_NODEIMAGE += sliceimage
407
408 #
409 # lxc-specific sliceimage initialization
410
411 lxc-sliceimage-MODULES  := sliceimage
412 lxc-sliceimage-SPEC     := lxc-sliceimage.spec
413 lxc-sliceimage-RPMDATE  := yes
414 ALL                     += lxc-sliceimage
415 IN_NODEIMAGE            += lxc-sliceimage
416
417 #
418 # nodeimage
419 #
420 nodeimage-MODULES := nodeimage build
421 nodeimage-SPEC := nodeimage.spec
422 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
423 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
424 nodeimage-RPMDATE := yes
425 ALL += nodeimage
426 IN_MYPLC += nodeimage
427
428 #
429 # noderepo
430 #
431 # all rpms resulting from packages marked as being in nodeimage and sliceimage
432 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
433 # replace space with +++ (specvars cannot deal with spaces)
434 SPACE=$(subst x, ,x)
435 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
436
437 noderepo-MODULES := nodeimage
438 noderepo-SPEC := noderepo.spec
439 # package requires all embedded packages
440 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
441 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
442 #export rpm list to the specfile
443 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
444 noderepo-RPMDATE := yes
445 ALL += noderepo
446 IN_MYPLC += noderepo
447
448 #
449 # slicerepo
450 #
451 # all rpms resulting from packages marked as being in vserver
452 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
453 # replace space with +++ (specvars cannot deal with spaces)
454 SPACE=$(subst x, ,x)
455 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
456
457 slicerepo-MODULES := nodeimage
458 slicerepo-SPEC := slicerepo.spec
459 # package requires all embedded packages
460 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
461 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
462 #export rpm list to the specfile
463 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
464 slicerepo-RPMDATE := yes
465 ALL += slicerepo
466
467 #
468 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
469 #
470 myplc-MODULES := myplc
471 myplc-SPEC := myplc.spec
472 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
473 ALL += myplc
474
475 # myplc-docs only contains docs for PLCAPI and NMAPI, but
476 # we still need to pull MyPLC, as it is where the specfile lies, 
477 # together with the utility script docbook2drupal.sh
478 myplc-docs-MODULES := myplc plcapi nodemanager monitor
479 myplc-docs-SPEC := myplc-docs.spec
480 ALL += myplc-docs
481
482 # using some other name than myplc-release, as this is a make target already
483 release-MODULES := myplc
484 release-SPEC := myplc-release.spec
485 release-RPMDATE := yes
486 ALL += release