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