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