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