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