Merge conflict
[build.git] / planetlab.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 # mkinitrd
12 #
13 ifeq "$(PLDISTROTAGS)" "planetlab-k32-tags.mk"
14 ifeq "$(DISTRONAME)" "centos5"
15 mkinitrd-MODULES := mkinitrd
16 mkinitrd-SPEC := mkinitrd.spec
17 mkinitrd-BUILD-FROM-SRPM := yes
18 mkinitrd-DEVEL-RPMS += parted-devel glib2-devel libdhcp4client-devel libdhcp6client-devel libdhcp-devel 
19 mkinitrd-DEVEL-RPMS += device-mapper libselinux-devel libsepol-devel libnl-devel
20 ALL += mkinitrd
21 IN_BOOTCD += mkinitrd
22 IN_VSERVER += mkinitrd 
23 IN_BOOTSTRAPFS += mkinitrd
24 IN_MYPLC += mkinitrd
25 endif
26 endif
27 #
28 # kernel
29 #
30 # use a package name with srpm in it:
31 # so the source rpm is created by running make srpm in the codebase
32 #
33
34 #kernel-MODULES := linux-3
35 #kernel-SPEC := kernel-3.1.spec
36 #kernel-DEVEL-RPMS += gettext elfutils-devel
37 #kernel-BUILD-FROM-SRPM := yes
38 #ifeq "$(HOSTARCH)" "i386"
39 #kernel-RPMFLAGS:= --target i686 --with firmware
40 #else
41 #kernel-RPMFLAGS:= --target $(HOSTARCH) --with firmware
42 #endif
43 #kernel-SPECVARS += kernelconfig=planetlab
44 #KERNELS += kernel
45
46 #kernels: $(KERNELS)
47 #kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
48
49 #ALL += $(KERNELS)
50 ## this is to mark on which image a given rpm is supposed to go
51 #IN_BOOTCD += $(KERNELS)
52 #IN_VSERVER += $(KERNELS)
53 #IN_BOOTSTRAPFS += $(KERNELS)
54
55 #
56 # madwifi
57 #
58 # skip this with k32/f8
59 #ifneq "" "$(findstring k32,$(PLDISTROTAGS))"
60 #ifneq "$(DISTRONAME)" "f8"
61 #madwifi-MODULES := madwifi
62 #madwifi-SPEC := madwifi.spec
63 #madwifi-BUILD-FROM-SRPM := yes
64 #madwifi-DEPEND-DEVEL-RPMS += kernel-devel
65 #madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
66 #    kernel_release=$(kernel.rpm-release) \
67 #    kernel_arch=$(kernel.rpm-arch)
68 #ALL += madwifi
69 #IN_BOOTSTRAPFS += madwifi
70 #endif
71 #endif
72
73 #
74 # iptables
75 #
76 #iptables-MODULES := iptables
77 #iptables-SPEC := iptables.spec
78 #iptables-BUILD-FROM-SRPM := yes        
79 #iptables-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
80 #ALL += iptables
81 #IN_BOOTSTRAPFS += iptables
82
83 #
84 # iproute
85 #
86 #iproute-MODULES := iproute2
87 #iproute-SPEC := iproute.spec
88 #iproute-BUILD-FROM-SRPM := yes 
89 #ALL += iproute
90 #IN_BOOTSTRAPFS += iproute
91 #IN_VSERVER += iproute
92 #IN_BOOTCD += iproute
93
94 #
95 # util-vserver
96 #
97 util-vserver-MODULES := util-vserver
98 util-vserver-SPEC := util-vserver.spec
99 # starting with 0.4
100 util-vserver-BUILD-FROM-SRPM := yes
101 util-vserver-RPMFLAGS:= --without dietlibc --without doc
102 ALL += util-vserver
103 IN_BOOTSTRAPFS += util-vserver
104
105 #
106 # libnl - local import
107 # we need either 1.1 or at least 1.0.pre6
108 # rebuild this on centos5 - see kexcludes in build.common
109 #
110 local_libnl=false
111 ifeq "$(DISTRONAME)" "centos5"
112 local_libnl=true
113 endif
114
115 ifeq "$(local_libnl)" "true"
116 libnl-MODULES := libnl
117 libnl-SPEC := libnl.spec
118 libnl-BUILD-FROM-SRPM := yes
119 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
120 libnl-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
121 ALL += libnl
122 IN_BOOTSTRAPFS += libnl
123 endif
124
125 #
126 # util-vserver-pl
127 #
128 util-vserver-pl-MODULES := util-vserver-pl
129 util-vserver-pl-SPEC := util-vserver-pl.spec
130 util-vserver-pl-DEPEND-DEVEL-RPMS += util-vserver-lib util-vserver-devel util-vserver-core 
131 ifeq "$(local_libnl)" "true"
132 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
133 endif
134 ALL += util-vserver-pl
135 IN_BOOTSTRAPFS += util-vserver-pl
136
137 #
138 # NodeUpdate
139 #
140 nodeupdate-MODULES := nodeupdate
141 nodeupdate-SPEC := NodeUpdate.spec
142 ALL += nodeupdate
143 IN_BOOTSTRAPFS += nodeupdate
144
145 #
146 # ipod
147 #
148 ipod-MODULES := PingOfDeath
149 ipod-SPEC := ipod.spec
150 ALL += ipod
151 IN_BOOTSTRAPFS += ipod
152
153 #
154 # NodeManager
155 #
156 nodemanager-MODULES := nodemanager
157 nodemanager-SPEC := NodeManager.spec
158 ALL += nodemanager
159 IN_BOOTSTRAPFS += nodemanager
160
161 #
162 # pl_sshd
163 #
164 sshd-MODULES := pl_sshd
165 sshd-SPEC := pl_sshd.spec
166 ALL += sshd
167 IN_BOOTSTRAPFS += sshd
168
169 #
170 # codemux: Port 80 demux
171 #
172 codemux-MODULES := codemux
173 codemux-SPEC   := codemux.spec
174 ALL += codemux
175 IN_BOOTSTRAPFS += codemux
176
177 #
178 # fprobe-ulog
179 #
180 fprobe-ulog-MODULES := fprobe-ulog
181 fprobe-ulog-SPEC := fprobe-ulog.spec
182 ALL += fprobe-ulog
183 IN_BOOTSTRAPFS += fprobe-ulog
184
185 #
186 # libvirt
187 #
188 libvirt-MODULES := libvirt
189 libvirt-SPEC    := libvirt.spec
190 libvirt-BUILD-FROM-SRPM := yes
191 libvirt-DEVEL-RPMS += libxml2-devel gnutls-devel device-mapper-devel yajl-devel gettext 
192 libvirt-DEVEL-RPMS += python-devel libcap-ng-devel libpciaccess-devel radvd numactl-devel 
193 libvirt-DEVEL-RPMS += xhtml1-dtds libxslt libtasn1-devel systemtap-sdt-devel iptables-ipv6 augeas 
194 libvirt-DEVEL-RPMS += libudev-devel
195 libvirt-RPMFLAGS := --without storage-disk --without storage-iscsi --without storage-scsi \
196                         --without storage-fs --without storage-lvm \
197                         --without polkit --without sasl --without audit --with capng --with udev \
198                         --without netcf --without avahi --without sanlock \
199                         --without xen --without qemu --without hyperv --without phyp --without esx \
200                         --without libxl \
201                         --define 'packager PlanetLab'
202 ALL += libvirt
203 IN_NODEREPO += libvirt
204 IN_BOOTSTRAPFS += libvirt
205
206 #
207 # DistributedRateLimiting
208 #
209 #DistributedRateLimiting-MODULES := DistributedRateLimiting
210 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
211 #ALL += DistributedRateLimiting
212 #IN_NODEREPO += DistributedRateLimiting
213
214 #
215 # pf2slice
216 #
217 pf2slice-MODULES := pf2slice
218 pf2slice-SPEC := pf2slice.spec
219 ALL += pf2slice
220
221 #
222 # PlanetLab Mom: Cleans up your mess
223 #
224 mom-MODULES := Mom
225 mom-SPEC := pl_mom.spec
226 ALL += mom
227 IN_BOOTSTRAPFS += mom
228
229 #
230 # inotify-tools - local import
231 # rebuild this on centos5 (not found) - see kexcludes in build.common
232 #
233 local_inotify_tools=false
234 ifeq "$(DISTRONAME)" "centos5"
235 local_inotify_tools=true
236 endif
237
238 ifeq "$(DISTRONAME)" "sl6"
239 local_inotify_tools=true
240 endif
241
242 ifeq "$(local_inotify_tools)" "true"
243 inotify-tools-MODULES := inotify-tools
244 inotify-tools-SPEC := inotify-tools.spec
245 inotify-tools-BUILD-FROM-SRPM := yes
246 IN_BOOTSTRAPFS += inotify-tools
247 ALL += inotify-tools
248 endif
249
250 #
251 # openvswitch
252 #
253 openvswitch-MODULES := openvswitch
254 openvswitch-SPEC := openvswitch.spec
255 openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
256 IN_BOOTSTRAPFS += openvswitch
257 ALL += openvswitch
258
259 #
260 # vsys
261 #
262 vsys-MODULES := vsys
263 vsys-SPEC := vsys.spec
264 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
265 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
266 ifeq "$(local_inotify_tools)" "true"
267 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
268 endif
269 IN_BOOTSTRAPFS += vsys
270 ALL += vsys
271
272 #
273 # vsyssh : installed in slivers
274 #
275 vsyssh-MODULES := vsys
276 vsyssh-SPEC := vsyssh.spec
277 IN_SLIVER += vsyssh
278 ALL += vsyssh
279
280 #
281 # vsys-scripts
282 #
283 vsys-scripts-MODULES := vsys-scripts
284 vsys-scripts-SPEC := vsys-scripts.spec
285 IN_BOOTSTRAPFS += vsys-scripts
286 ALL += vsys-scripts
287
288 #
289 # plcapi
290 #
291 plcapi-MODULES := plcapi
292 plcapi-SPEC := PLCAPI.spec
293 ALL += plcapi
294 IN_MYPLC += plcapi
295
296 #
297 # drupal
298
299 drupal-MODULES := drupal
300 drupal-SPEC := drupal.spec
301 drupal-BUILD-FROM-SRPM := yes
302 ALL += drupal
303 IN_MYPLC += drupal
304
305 #
306 # use the plewww module instead
307 #
308 plewww-MODULES := plewww
309 plewww-SPEC := plewww.spec
310 ALL += plewww
311 IN_MYPLC += plewww
312
313 #
314 # www-register-wizard
315 #
316 www-register-wizard-MODULES := www-register-wizard
317 www-register-wizard-SPEC := www-register-wizard.spec
318 ALL += www-register-wizard
319 IN_MYPLC += www-register-wizard
320
321 #
322 # pcucontrol
323 #
324 pcucontrol-MODULES := pcucontrol
325 pcucontrol-SPEC := pcucontrol.spec
326 ALL += pcucontrol
327
328 #
329 # monitor
330 #
331 #monitor-MODULES := monitor
332 #monitor-SPEC := Monitor.spec
333 #monitor-DEVEL-RPMS += net-snmp net-snmp-devel
334 #ALL += monitor
335 #IN_BOOTSTRAPFS += monitor
336
337 #
338 # PLC RT
339 #
340 plcrt-MODULES := PLCRT
341 plcrt-SPEC := plcrt.spec
342 ALL += plcrt
343
344 # f12 has 0.9-1 already
345 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
346 #
347 # pyopenssl
348 #
349 pyopenssl-MODULES := pyopenssl
350 pyopenssl-SPEC := pyOpenSSL.spec
351 pyopenssl-BUILD-FROM-SRPM := yes
352 ALL += pyopenssl
353 endif
354
355 #
356 # pyaspects
357 #
358 pyaspects-MODULES := pyaspects
359 pyaspects-SPEC := pyaspects.spec
360 pyaspects-BUILD-FROM-SRPM := yes
361 ALL += pyaspects
362
363 #
364 # ejabberd
365 #
366 ejabberd-MODULES := ejabberd
367 ejabberd-SPEC := ejabberd.spec
368 ejabberd-BUILD-FROM-SRPM := yes
369 ejabberd-DEVEL-RPMS += erlang pam-devel hevea
370 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
371 # so, this is relevant on f8 and centos5 only
372 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
373 ALL += ejabberd
374 endif
375
376 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
377 build_sfa=true
378 ifeq "$(DISTRONAME)" "centos5"
379 build_sfa=false
380 endif
381
382 ifeq "$(build_sfa)" "true"
383 #
384 # sfa - Slice Facility Architecture
385 #
386 sfa-MODULES := sfa
387 sfa-SPEC := sfa.spec
388 ALL += sfa
389 endif
390
391 sface-MODULES := sface
392 sface-SPEC := sface.spec
393 ALL += sface
394
395 #
396 # nodeconfig
397 #
398 nodeconfig-MODULES := nodeconfig
399 nodeconfig-SPEC := nodeconfig.spec
400 ALL += nodeconfig
401 IN_MYPLC += nodeconfig
402
403 #
404 # bootmanager
405 #
406 bootmanager-MODULES := bootmanager
407 bootmanager-SPEC := bootmanager.spec
408 ALL += bootmanager
409 IN_MYPLC += bootmanager
410
411 #
412 # pypcilib : used in bootcd
413
414 pypcilib-MODULES := pypcilib
415 pypcilib-SPEC := pypcilib.spec
416 ALL += pypcilib
417 IN_BOOTCD += pypcilib
418
419 #
420 # pyplnet
421 #
422 pyplnet-MODULES := pyplnet
423 pyplnet-SPEC := pyplnet.spec
424 ALL += pyplnet
425 IN_BOOTSTRAPFS += pyplnet
426 IN_MYPLC += pyplnet
427 IN_BOOTCD += pyplnet
428
429 #
430 # OMF resource controller
431 #
432 omf-resctl-MODULES := omf
433 omf-resctl-SPEC := omf-resctl.spec
434 ALL += omf-resctl
435 IN_VSERVER += omf-resctl
436
437 #
438 # OMF exp controller
439 #
440 omf-expctl-MODULES := omf
441 omf-expctl-SPEC := omf-expctl.spec
442 ALL += omf-expctl
443
444 #
445 # bootcd
446 #
447 bootcd-MODULES := bootcd build
448 bootcd-SPEC := bootcd.spec
449 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
450 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
451 bootcd-RPMDATE := yes
452 ALL += bootcd
453 IN_MYPLC += bootcd
454
455 #
456 # vserver : reference image for slices
457 #
458 #vserver-MODULES := vserver-reference build
459 #vserver-SPEC := vserver-reference.spec
460 #vserver-DEPEND-PACKAGES := $(IN_VSERVER)
461 #vserver-DEPEND-FILES := RPMS/yumgroups.xml
462 #vserver-RPMDATE := yes
463 #ALL += vserver
464 #IN_BOOTSTRAPFS += vserver
465
466 #
467 # LXC reference images
468 #
469 lxcref-MODULES := lxc-reference
470 lxcref-SPEC    := lxc-reference.spec
471 ALL += lxcref
472 IN_BOOTSTRAPFS += lxcref
473
474 #
475 # bootstrapfs
476 #
477 bootstrapfs-MODULES := bootstrapfs build
478 bootstrapfs-SPEC := bootstrapfs.spec
479 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
480 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
481 bootstrapfs-RPMDATE := yes
482 ALL += bootstrapfs
483 IN_MYPLC += bootstrapfs
484
485 #
486 # noderepo
487 #
488 # all rpms resulting from packages marked as being in bootstrapfs and vserver
489 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
490 # replace space with +++ (specvars cannot deal with spaces)
491 SPACE=$(subst x, ,x)
492 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
493
494 noderepo-MODULES := bootstrapfs
495 noderepo-SPEC := noderepo.spec
496 # package requires all embedded packages
497 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
498 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
499 #export rpm list to the specfile
500 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
501 noderepo-RPMDATE := yes
502 ALL += noderepo
503 IN_MYPLC += noderepo
504
505 #
506 # slicerepo
507 #
508 # all rpms resulting from packages marked as being in vserver
509 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
510 # replace space with +++ (specvars cannot deal with spaces)
511 SPACE=$(subst x, ,x)
512 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
513
514 slicerepo-MODULES := bootstrapfs
515 slicerepo-SPEC := slicerepo.spec
516 # package requires all embedded packages
517 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
518 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
519 #export rpm list to the specfile
520 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
521 slicerepo-RPMDATE := yes
522 ALL += slicerepo
523
524 #
525 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
526 #
527 myplc-MODULES := myplc
528 myplc-SPEC := myplc.spec
529 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
530 ALL += myplc
531
532 # myplc-docs only contains docs for PLCAPI and NMAPI, but
533 # we still need to pull MyPLC, as it is where the specfile lies, 
534 # together with the utility script docbook2drupal.sh
535 myplc-docs-MODULES := myplc plcapi nodemanager monitor
536 myplc-docs-SPEC := myplc-docs.spec
537 ALL += myplc-docs
538
539 # using some other name than myplc-release, as this is a make target already
540 release-MODULES := myplc
541 release-SPEC := myplc-release.spec
542 release-RPMDATE := yes
543 ALL += release