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