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