use tests@master
[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-RPMFLAGS := --without storage-disk --without storage-iscsi --without storage-scsi \
195                         --without storage-fs --without storage-lvm \
196                         --without polkit --without sasl --without audit --with capng --with udev \
197                         --without netcf --without avahi --without sanlock \
198                         --without xen --without qemu --without hyperv --without phyp --without esx \
199                     --define 'packager PlanetLab'
200 ALL += libvirt
201 IN_NODEREPO += libvirt
202 IN_BOOTSTRAPFS += libvirt
203
204 #
205 # DistributedRateLimiting
206 #
207 DistributedRateLimiting-MODULES := DistributedRateLimiting
208 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
209 ALL += DistributedRateLimiting
210 IN_NODEREPO += DistributedRateLimiting
211
212 #
213 # pf2slice
214 #
215 pf2slice-MODULES := pf2slice
216 pf2slice-SPEC := pf2slice.spec
217 ALL += pf2slice
218
219 #
220 # PlanetLab Mom: Cleans up your mess
221 #
222 mom-MODULES := Mom
223 mom-SPEC := pl_mom.spec
224 ALL += mom
225 IN_BOOTSTRAPFS += mom
226
227 #
228 # inotify-tools - local import
229 # rebuild this on centos5 (not found) - see kexcludes in build.common
230 #
231 local_inotify_tools=false
232 ifeq "$(DISTRONAME)" "centos5"
233 local_inotify_tools=true
234 endif
235
236 ifeq "$(DISTRONAME)" "sl6"
237 local_inotify_tools=true
238 endif
239
240 ifeq "$(local_inotify_tools)" "true"
241 inotify-tools-MODULES := inotify-tools
242 inotify-tools-SPEC := inotify-tools.spec
243 inotify-tools-BUILD-FROM-SRPM := yes
244 IN_BOOTSTRAPFS += inotify-tools
245 ALL += inotify-tools
246 endif
247
248 #
249 # openvswitch
250 #
251 openvswitch-MODULES := openvswitch
252 openvswitch-SPEC := openvswitch.spec
253 openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
254 #IN_BOOTSTRAPFS += openvswitch
255 #ALL += openvswitch
256
257 #
258 # vsys
259 #
260 vsys-MODULES := vsys
261 vsys-SPEC := vsys.spec
262 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
263 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
264 ifeq "$(local_inotify_tools)" "true"
265 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
266 endif
267 IN_BOOTSTRAPFS += vsys
268 ALL += vsys
269
270 #
271 # vsyssh : installed in slivers
272 #
273 vsyssh-MODULES := vsys
274 vsyssh-SPEC := vsyssh.spec
275 IN_SLIVER += vsyssh
276 ALL += vsyssh
277
278 #
279 # vsys-scripts
280 #
281 vsys-scripts-MODULES := vsys-scripts
282 vsys-scripts-SPEC := vsys-scripts.spec
283 IN_BOOTSTRAPFS += vsys-scripts
284 ALL += vsys-scripts
285
286 #
287 # plcapi
288 #
289 plcapi-MODULES := plcapi
290 plcapi-SPEC := PLCAPI.spec
291 ALL += plcapi
292 IN_MYPLC += plcapi
293
294 #
295 # drupal
296
297 drupal-MODULES := drupal
298 drupal-SPEC := drupal.spec
299 drupal-BUILD-FROM-SRPM := yes
300 ALL += drupal
301 IN_MYPLC += drupal
302
303 #
304 # use the plewww module instead
305 #
306 plewww-MODULES := plewww
307 plewww-SPEC := plewww.spec
308 ALL += plewww
309 IN_MYPLC += plewww
310
311 #
312 # www-register-wizard
313 #
314 www-register-wizard-MODULES := www-register-wizard
315 www-register-wizard-SPEC := www-register-wizard.spec
316 ALL += www-register-wizard
317 IN_MYPLC += www-register-wizard
318
319 #
320 # pcucontrol
321 #
322 pcucontrol-MODULES := pcucontrol
323 pcucontrol-SPEC := pcucontrol.spec
324 ALL += pcucontrol
325
326 #
327 # monitor
328 #
329 monitor-MODULES := monitor
330 monitor-SPEC := Monitor.spec
331 monitor-DEVEL-RPMS += net-snmp net-snmp-devel
332 ALL += monitor
333 IN_BOOTSTRAPFS += monitor
334
335 #
336 # PLC RT
337 #
338 plcrt-MODULES := PLCRT
339 plcrt-SPEC := plcrt.spec
340 ALL += plcrt
341
342 # f12 has 0.9-1 already
343 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
344 #
345 # pyopenssl
346 #
347 pyopenssl-MODULES := pyopenssl
348 pyopenssl-SPEC := pyOpenSSL.spec
349 pyopenssl-BUILD-FROM-SRPM := yes
350 ALL += pyopenssl
351 endif
352
353 #
354 # pyaspects
355 #
356 pyaspects-MODULES := pyaspects
357 pyaspects-SPEC := pyaspects.spec
358 pyaspects-BUILD-FROM-SRPM := yes
359 ALL += pyaspects
360
361 #
362 # ejabberd
363 #
364 ejabberd-MODULES := ejabberd
365 ejabberd-SPEC := ejabberd.spec
366 ejabberd-BUILD-FROM-SRPM := yes
367 ejabberd-DEVEL-RPMS += erlang pam-devel hevea
368 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
369 # so, this is relevant on f8 and centos5 only
370 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
371 ALL += ejabberd
372 endif
373
374 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
375 build_sfa=true
376 ifeq "$(DISTRONAME)" "centos5"
377 build_sfa=false
378 endif
379
380 ifeq "$(build_sfa)" "true"
381 #
382 # sfa - Slice Facility Architecture
383 #
384 sfa-MODULES := sfa
385 sfa-SPEC := sfa.spec
386 ALL += sfa
387 endif
388
389 sface-MODULES := sface
390 sface-SPEC := sface.spec
391 ALL += sface
392
393 #
394 # nodeconfig
395 #
396 nodeconfig-MODULES := nodeconfig
397 nodeconfig-SPEC := nodeconfig.spec
398 ALL += nodeconfig
399 IN_MYPLC += nodeconfig
400
401 #
402 # bootmanager
403 #
404 bootmanager-MODULES := bootmanager
405 bootmanager-SPEC := bootmanager.spec
406 ALL += bootmanager
407 IN_MYPLC += bootmanager
408
409 #
410 # pypcilib : used in bootcd
411
412 pypcilib-MODULES := pypcilib
413 pypcilib-SPEC := pypcilib.spec
414 ALL += pypcilib
415 IN_BOOTCD += pypcilib
416
417 #
418 # pyplnet
419 #
420 pyplnet-MODULES := pyplnet
421 pyplnet-SPEC := pyplnet.spec
422 ALL += pyplnet
423 IN_BOOTSTRAPFS += pyplnet
424 IN_MYPLC += pyplnet
425 IN_BOOTCD += pyplnet
426
427 #
428 # OMF resource controller
429 #
430 omf-resctl-MODULES := omf
431 omf-resctl-SPEC := omf-resctl.spec
432 ALL += omf-resctl
433 IN_VSERVER += omf-resctl
434
435 #
436 # OMF exp controller
437 #
438 omf-expctl-MODULES := omf
439 omf-expctl-SPEC := omf-expctl.spec
440 ALL += omf-expctl
441
442 #
443 # bootcd
444 #
445 bootcd-MODULES := bootcd build
446 bootcd-SPEC := bootcd.spec
447 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
448 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
449 bootcd-RPMDATE := yes
450 ALL += bootcd
451 IN_MYPLC += bootcd
452
453 #
454 # vserver : reference image for slices
455 #
456 vserver-MODULES := vserver-reference build
457 vserver-SPEC := vserver-reference.spec
458 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
459 vserver-DEPEND-FILES := RPMS/yumgroups.xml
460 vserver-RPMDATE := yes
461 ALL += vserver
462 IN_BOOTSTRAPFS += vserver
463
464 #
465 # LXC reference images
466 #
467 lxcref-MODULES := lxc-reference
468 lxcref-SPEC    := lxc-reference.spec
469 ALL += lxcref
470 IN_BOOTSTRAPFS += lxcref
471
472 #
473 # bootstrapfs
474 #
475 bootstrapfs-MODULES := bootstrapfs build
476 bootstrapfs-SPEC := bootstrapfs.spec
477 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
478 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
479 bootstrapfs-RPMDATE := yes
480 ALL += bootstrapfs
481 IN_MYPLC += bootstrapfs
482
483 #
484 # noderepo
485 #
486 # all rpms resulting from packages marked as being in bootstrapfs and vserver
487 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
488 # replace space with +++ (specvars cannot deal with spaces)
489 SPACE=$(subst x, ,x)
490 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
491
492 noderepo-MODULES := bootstrapfs
493 noderepo-SPEC := noderepo.spec
494 # package requires all embedded packages
495 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
496 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
497 #export rpm list to the specfile
498 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
499 noderepo-RPMDATE := yes
500 ALL += noderepo
501 IN_MYPLC += noderepo
502
503 #
504 # slicerepo
505 #
506 # all rpms resulting from packages marked as being in vserver
507 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
508 # replace space with +++ (specvars cannot deal with spaces)
509 SPACE=$(subst x, ,x)
510 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
511
512 slicerepo-MODULES := bootstrapfs
513 slicerepo-SPEC := slicerepo.spec
514 # package requires all embedded packages
515 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
516 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
517 #export rpm list to the specfile
518 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
519 slicerepo-RPMDATE := yes
520 ALL += slicerepo
521
522 #
523 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
524 #
525 myplc-MODULES := myplc
526 myplc-SPEC := myplc.spec
527 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
528 ALL += myplc
529
530 # myplc-docs only contains docs for PLCAPI and NMAPI, but
531 # we still need to pull MyPLC, as it is where the specfile lies, 
532 # together with the utility script docbook2drupal.sh
533 myplc-docs-MODULES := myplc plcapi nodemanager monitor
534 myplc-docs-SPEC := myplc-docs.spec
535 ALL += myplc-docs
536
537 # using some other name than myplc-release, as this is a make target already
538 release-MODULES := myplc
539 release-SPEC := myplc-release.spec
540 release-RPMDATE := yes
541 ALL += release