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