Merge branch 'master' of ssh://git.onelab.eu/git/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_SLIVER += $(KERNELS)
39 IN_BOOTSTRAPFS += $(KERNELS)
40 endif
41
42 #
43 # NodeUpdate
44 #
45 nodeupdate-MODULES := nodeupdate
46 nodeupdate-SPEC := NodeUpdate.spec
47 ALL += nodeupdate
48 IN_BOOTSTRAPFS += nodeupdate
49
50 #
51 # ipod
52 #
53 ipod-MODULES := PingOfDeath
54 ipod-SPEC := ipod.spec
55 ALL += ipod
56 IN_BOOTSTRAPFS += ipod
57
58 #
59 # NodeManager
60 #
61 nodemanager-MODULES := nodemanager
62 nodemanager-SPEC := NodeManager.spec
63 ALL += nodemanager
64 IN_BOOTSTRAPFS += nodemanager
65
66 #
67 # pl_sshd
68 #
69 sshd-MODULES := pl_sshd
70 sshd-SPEC := pl_sshd.spec
71 ALL += sshd
72 IN_BOOTSTRAPFS += sshd
73
74 #
75 # codemux: Port 80 demux
76 #
77 codemux-MODULES := codemux
78 codemux-SPEC   := codemux.spec
79 ALL += codemux
80 IN_BOOTSTRAPFS += 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_BOOTSTRAPFS += 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_BOOTSTRAPFS += 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_BOOTSTRAPFS += mom
133
134 #
135 # inotify-tools - local import
136 # rebuild this on centos5 (not found) - see kexcludes in build.common
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_BOOTSTRAPFS += 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_BOOTSTRAPFS += 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_BOOTSTRAPFS += vsys
175 ALL += vsys
176
177 #
178 # vsyssh : installed in slivers
179 #
180 vsyssh-MODULES := vsys
181 vsyssh-SPEC := vsyssh.spec
182 IN_SLIVER += 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_BOOTSTRAPFS += 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_BOOTSTRAPFS += 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 #
269 # ejabberd
270 #
271 ejabberd-MODULES := ejabberd
272 ejabberd-SPEC := ejabberd.spec
273 ejabberd-BUILD-FROM-SRPM := yes
274 ejabberd-DEVEL-RPMS += erlang pam-devel hevea
275 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
276 # so, this is relevant on f8 and centos5 only
277 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
278 ALL += ejabberd
279 endif
280
281 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
282 build_sfa=true
283 ifeq "$(DISTRONAME)" "centos5"
284 build_sfa=false
285 endif
286
287 ifeq "$(build_sfa)" "true"
288 #
289 # sfa - Slice Facility Architecture
290 #
291 sfa-MODULES := sfa
292 sfa-SPEC := sfa.spec
293 ALL += sfa
294 endif
295
296 sface-MODULES := sface
297 sface-SPEC := sface.spec
298 ALL += sface
299
300 #
301 # nodeconfig
302 #
303 nodeconfig-MODULES := nodeconfig
304 nodeconfig-SPEC := nodeconfig.spec
305 ALL += nodeconfig
306 IN_MYPLC += nodeconfig
307
308 #
309 # bootmanager
310 #
311 bootmanager-MODULES := bootmanager
312 bootmanager-SPEC := bootmanager.spec
313 ALL += bootmanager
314 IN_MYPLC += bootmanager
315
316 #
317 # pypcilib : used in bootcd
318
319 pypcilib-MODULES := pypcilib
320 pypcilib-SPEC := pypcilib.spec
321 ALL += pypcilib
322 IN_BOOTCD += pypcilib
323
324 #
325 # pyplnet
326 #
327 pyplnet-MODULES := pyplnet
328 pyplnet-SPEC := pyplnet.spec
329 ALL += pyplnet
330 IN_BOOTSTRAPFS += pyplnet
331 IN_MYPLC += pyplnet
332 IN_BOOTCD += pyplnet
333
334 #
335 # OMF resource controller
336 #
337 omf-resctl-MODULES := omf
338 omf-resctl-SPEC := omf-resctl.spec
339 ALL += omf-resctl
340 IN_SLIVER += omf-resctl
341
342 #
343 # OMF exp controller
344 #
345 omf-expctl-MODULES := omf
346 omf-expctl-SPEC := omf-expctl.spec
347 ALL += omf-expctl
348
349 #
350 # bootcd
351 #
352 bootcd-MODULES := bootcd build
353 bootcd-SPEC := bootcd.spec
354 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
355 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
356 bootcd-RPMDATE := yes
357 ALL += bootcd
358 IN_MYPLC += bootcd
359
360 #
361 # LXC reference images
362 #
363 lxcref-MODULES := lxc-reference
364 lxcref-SPEC    := lxc-reference.spec
365 ALL += lxcref
366 IN_BOOTSTRAPFS += lxcref
367
368 #
369 # bootstrapfs
370 #
371 bootstrapfs-MODULES := bootstrapfs build
372 bootstrapfs-SPEC := bootstrapfs.spec
373 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
374 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
375 bootstrapfs-RPMDATE := yes
376 ALL += bootstrapfs
377 IN_MYPLC += bootstrapfs
378
379 #
380 # noderepo
381 #
382 # all rpms resulting from packages marked as being in bootstrapfs and vserver
383 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_SLIVER),$($(package).rpms))
384 # replace space with +++ (specvars cannot deal with spaces)
385 SPACE=$(subst x, ,x)
386 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
387
388 noderepo-MODULES := bootstrapfs
389 noderepo-SPEC := noderepo.spec
390 # package requires all embedded packages
391 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_SLIVER)
392 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
393 #export rpm list to the specfile
394 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
395 noderepo-RPMDATE := yes
396 ALL += noderepo
397 IN_MYPLC += noderepo
398
399 #
400 # slicerepo
401 #
402 # all rpms resulting from packages marked as being in vserver
403 SLICEREPO_RPMS = $(foreach package,$(IN_SLIVER),$($(package).rpms))
404 # replace space with +++ (specvars cannot deal with spaces)
405 SPACE=$(subst x, ,x)
406 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
407
408 slicerepo-MODULES := bootstrapfs
409 slicerepo-SPEC := slicerepo.spec
410 # package requires all embedded packages
411 slicerepo-DEPEND-PACKAGES := $(IN_SLIVER)
412 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
413 #export rpm list to the specfile
414 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
415 slicerepo-RPMDATE := yes
416 ALL += slicerepo
417
418 #
419 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
420 #
421 myplc-MODULES := myplc
422 myplc-SPEC := myplc.spec
423 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
424 ALL += myplc
425
426 # myplc-docs only contains docs for PLCAPI and NMAPI, but
427 # we still need to pull MyPLC, as it is where the specfile lies, 
428 # together with the utility script docbook2drupal.sh
429 myplc-docs-MODULES := myplc plcapi nodemanager monitor
430 myplc-docs-SPEC := myplc-docs.spec
431 ALL += myplc-docs
432
433 # using some other name than myplc-release, as this is a make target already
434 release-MODULES := myplc
435 release-SPEC := myplc-release.spec
436 release-RPMDATE := yes
437 ALL += release