vsyssh goes in sliverland
[build.git] / onelab.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 kernel-MODULES := linux-2.6
19 kernel-SPEC := kernel-2.6.spec
20 kernel-BUILD-FROM-SRPM := yes
21 ifeq "$(HOSTARCH)" "i386"
22 kernel-RPMFLAGS:= --target i686
23 else
24 kernel-RPMFLAGS:= --target $(HOSTARCH)
25 endif
26 kernel-SPECVARS += kernelconfig=planetlab
27 KERNELS += kernel
28
29 kernels: $(KERNELS)
30 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
31
32 ALL += $(KERNELS)
33 # this is to mark on which image a given rpm is supposed to go
34 IN_BOOTCD += $(KERNELS)
35 IN_VSERVER += $(KERNELS)
36 IN_BOOTSTRAPFS += $(KERNELS)
37
38 #
39 # ipfw: root context module, and slice companion
40 #
41 ipfwroot-MODULES := ipfw
42 ipfwroot-SPEC := planetlab/ipfwroot.spec
43 ipfwroot-DEPEND-DEVEL-RPMS += kernel-devel
44 ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
45         kernel_release=$(kernel.rpm-release) \
46         kernel_arch=$(kernel.rpm-arch)
47 ALL += ipfwroot
48 IN_BOOTSTRAPFS += ipfwroot
49
50 ipfwslice-MODULES := ipfw
51 ipfwslice-SPEC := planetlab/ipfwslice.spec
52 ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
53         kernel_release=$(kernel.rpm-release) \
54         kernel_arch=$(kernel.rpm-arch)
55 ALL += ipfwslice
56
57 #
58 # madwifi
59 #
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
70 #
71 # comgt
72
73 comgt-MODULES := comgt
74 comgt-SPEC := comgt.spec
75 IN_BOOTSTRAPFS += comgt
76 ALL += comgt
77
78 #
79 # umts: root context stuff
80 #
81 umts-backend-MODULES := planetlab-umts-tools
82 umts-backend-SPEC := backend.spec
83 IN_BOOTSTRAPFS += umts-backend
84 ALL += umts-backend
85
86 #
87 # umts: slice tools
88 #
89 umts-frontend-MODULES := planetlab-umts-tools
90 umts-frontend-SPEC := frontend.spec
91 IN_VSERVER += umts-frontend
92 ALL += umts-frontend
93
94 #
95 # iptables
96 #
97 iptables-MODULES := iptables
98 iptables-SPEC := iptables.spec
99 iptables-BUILD-FROM-SRPM := yes
100 iptables-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
101 ALL += iptables
102 IN_BOOTSTRAPFS += iptables
103
104 #
105 # iproute
106 #
107 iproute-MODULES := iproute2
108 iproute-SPEC := iproute.spec
109 iproute-BUILD-FROM-SRPM := yes  
110 ALL += iproute
111 IN_BOOTSTRAPFS += iproute
112 IN_VSERVER += iproute
113 IN_BOOTCD += iproute
114
115 #
116 # util-vserver
117 #
118 util-vserver-MODULES := util-vserver
119 util-vserver-SPEC := util-vserver.spec
120 # starting with 0.4
121 util-vserver-BUILD-FROM-SRPM := yes
122 util-vserver-RPMFLAGS:= --without dietlibc --without doc
123 ALL += util-vserver
124 IN_BOOTSTRAPFS += util-vserver
125
126 #
127 # libnl - local import
128 # we need either 1.1 or at least 1.0.pre6
129 # rebuild this on centos5 - see kexcludes in build.common
130 #
131 local_libnl=false
132 ifeq "$(DISTRONAME)" "centos5"
133 local_libnl=true
134 endif
135
136 ifeq "$(local_libnl)" "true"
137 libnl-MODULES := libnl
138 libnl-SPEC := libnl.spec
139 libnl-BUILD-FROM-SRPM := yes
140 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
141 libnl-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
142 ALL += libnl
143 IN_BOOTSTRAPFS += libnl
144 endif
145
146 #
147 # util-vserver-pl
148 #
149 util-vserver-pl-MODULES := util-vserver-pl
150 util-vserver-pl-SPEC := util-vserver-pl.spec
151 util-vserver-pl-DEPEND-DEVEL-RPMS += util-vserver-lib util-vserver-devel util-vserver-core 
152 ifeq "$(local_libnl)" "true"
153 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
154 endif
155 ALL += util-vserver-pl
156 IN_BOOTSTRAPFS += util-vserver-pl
157
158 #
159 # NodeUpdate
160 #
161 nodeupdate-MODULES := nodeupdate
162 nodeupdate-SPEC := NodeUpdate.spec
163 ALL += nodeupdate
164 IN_BOOTSTRAPFS += nodeupdate
165
166 #
167 # ipod
168 #
169 ipod-MODULES := PingOfDeath
170 ipod-SPEC := ipod.spec
171 ALL += ipod
172 IN_BOOTSTRAPFS += ipod
173
174 #
175 # NodeManager
176 #
177 nodemanager-MODULES := nodemanager
178 nodemanager-SPEC := NodeManager.spec
179 ALL += nodemanager
180 IN_BOOTSTRAPFS += nodemanager
181
182 #
183 # pl_sshd
184 #
185 sshd-MODULES := pl_sshd
186 sshd-SPEC := pl_sshd.spec
187 ALL += sshd
188 IN_BOOTSTRAPFS += sshd
189
190 #
191 # codemux: Port 80 demux
192 #
193 codemux-MODULES := codemux
194 codemux-SPEC   := codemux.spec
195 ALL += codemux
196 IN_BOOTSTRAPFS += codemux
197
198 #
199 # fprobe-ulog
200 #
201 fprobe-ulog-MODULES := fprobe-ulog
202 fprobe-ulog-SPEC := fprobe-ulog.spec
203 ALL += fprobe-ulog
204 IN_BOOTSTRAPFS += fprobe-ulog
205
206 #
207 # DistributedRateLimiting
208 #
209 DistributedRateLimiting-MODULES := DistributedRateLimiting
210 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
211 ALL += DistributedRateLimiting
212 IN_NODEREPO += DistributedRateLimiting
213
214
215 #
216 # pf2slice
217 #
218 pf2slice-MODULES := pf2slice
219 pf2slice-SPEC := pf2slice.spec
220 ALL += pf2slice
221
222 #
223 # PlanetLab Mom: Cleans up your mess
224 #
225 mom-MODULES := Mom
226 mom-SPEC := pl_mom.spec
227 ALL += mom
228 IN_BOOTSTRAPFS += mom
229
230 #
231 # inotify-tools - local import
232 # rebuild this on centos5 (not found) - see kexcludes in build.common
233 #
234 local_inotify_tools=false
235 ifeq "$(DISTRONAME)" "centos5"
236 local_inotify_tools=true
237 endif
238
239 ifeq "$(local_inotify_tools)" "true"
240 inotify-tools-MODULES := inotify-tools
241 inotify-tools-SPEC := inotify-tools.spec
242 inotify-tools-BUILD-FROM-SRPM := yes
243 IN_BOOTSTRAPFS += inotify-tools
244 ALL += inotify-tools
245 endif
246
247 #
248 # openvswitch
249 #
250 openvswitch-MODULES := openvswitch
251 openvswitch-SPEC := openvswitch.spec
252 openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
253 # maybe not in production yet
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 # zabbix
337 #
338 zabbix-MODULES := monitor
339 zabbix-SPEC := zabbix.spec
340 zabbix-BUILD-FROM-SRPM := yes
341 zabbix-DEVEL-RPMS += python-cherrypy
342 ### turn this off as zabbix comes with stock fedora or epel
343 ###ALL += zabbix
344
345 #
346 # PLC RT
347 #
348 plcrt-MODULES := PLCRT
349 plcrt-SPEC := plcrt.spec
350 ALL += plcrt
351
352 # f12 has 0.9-1 already
353 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
354 #
355 # pyopenssl
356 #
357 pyopenssl-MODULES := pyopenssl
358 pyopenssl-SPEC := pyOpenSSL.spec
359 pyopenssl-BUILD-FROM-SRPM := yes
360 ALL += pyopenssl
361 endif
362
363 #
364 # pyaspects
365 #
366 pyaspects-MODULES := pyaspects
367 pyaspects-SPEC := pyaspects.spec
368 pyaspects-BUILD-FROM-SRPM := yes
369 ALL += pyaspects
370
371 #
372 # ejabberd
373 #
374 ejabberd-MODULES := ejabberd
375 ejabberd-SPEC := ejabberd.spec
376 ejabberd-BUILD-FROM-SRPM := yes
377 ejabberd-DEVEL-RPMS += erlang pam-devel hevea
378 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
379 # so, this is relevant on f8 and centos5 only
380 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
381 ALL += ejabberd
382 endif
383
384 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
385 build_sfa=true
386 ifeq "$(DISTRONAME)" "centos5"
387 build_sfa=false
388 endif
389
390 ifeq "$(build_sfa)" "true"
391 #
392 # sfa - Slice Facility Architecture
393 #
394 sfa-MODULES := sfa
395 sfa-SPEC := sfa.spec
396 ALL += sfa
397 endif
398
399 sface-MODULES := sface
400 sface-SPEC := sface.spec
401 ALL += sface
402
403 #
404 # nodeconfig
405 #
406 nodeconfig-MODULES := nodeconfig
407 nodeconfig-SPEC := nodeconfig.spec
408 ALL += nodeconfig
409 IN_MYPLC += nodeconfig
410
411 #
412 # bootmanager
413 #
414 bootmanager-MODULES := bootmanager
415 bootmanager-SPEC := bootmanager.spec
416 ALL += bootmanager
417 IN_MYPLC += bootmanager
418
419 #
420 # pypcilib : used in bootcd
421
422 pypcilib-MODULES := pypcilib
423 pypcilib-SPEC := pypcilib.spec
424 ALL += pypcilib
425 IN_BOOTCD += pypcilib
426
427 #
428 # pyplnet
429 #
430 pyplnet-MODULES := pyplnet
431 pyplnet-SPEC := pyplnet.spec
432 ALL += pyplnet
433 IN_BOOTSTRAPFS += pyplnet
434 IN_MYPLC += pyplnet
435 IN_BOOTCD += pyplnet
436
437 #
438 # OMF resource controller
439 #
440 omf-resctl-MODULES := omf
441 omf-resctl-SPEC := omf-resctl.spec
442 ALL += omf-resctl
443 IN_VSERVER += omf-resctl
444
445 #
446 # OMF exp controller
447 #
448 omf-expctl-MODULES := omf
449 omf-expctl-SPEC := omf-expctl.spec
450 ALL += omf-expctl
451
452 #
453 # OML measurement library
454 #
455 oml-MODULES := oml
456 oml-DEVEL-RPMS += sqlite-devel 
457 oml-SPEC := liboml.spec
458 ALL += oml
459
460 #
461 # bootcd
462 #
463 bootcd-MODULES := bootcd build
464 bootcd-SPEC := bootcd.spec
465 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
466 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
467 bootcd-RPMDATE := yes
468 ALL += bootcd
469 IN_MYPLC += bootcd
470
471 #
472 # vserver : reference image for slices
473 #
474 vserver-MODULES := vserver-reference build
475 vserver-SPEC := vserver-reference.spec
476 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
477 vserver-DEPEND-FILES := RPMS/yumgroups.xml
478 vserver-RPMDATE := yes
479 ALL += vserver
480 IN_BOOTSTRAPFS += vserver
481
482 #
483 # bootstrapfs
484 #
485 bootstrapfs-MODULES := bootstrapfs build
486 bootstrapfs-SPEC := bootstrapfs.spec
487 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
488 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
489 bootstrapfs-RPMDATE := yes
490 ALL += bootstrapfs
491 IN_MYPLC += bootstrapfs
492
493 #
494 # noderepo
495 #
496 # all rpms resulting from packages marked as being in bootstrapfs and vserver
497 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
498 # replace space with +++ (specvars cannot deal with spaces)
499 SPACE=$(subst x, ,x)
500 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
501
502 noderepo-MODULES := bootstrapfs
503 noderepo-SPEC := noderepo.spec
504 # package requires all embedded packages
505 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
506 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
507 #export rpm list to the specfile
508 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
509 noderepo-RPMDATE := yes
510 ALL += noderepo
511 IN_MYPLC += noderepo
512
513 #
514 # slicerepo
515 #
516 # all rpms resulting from packages marked as being in vserver
517 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
518 # replace space with +++ (specvars cannot deal with spaces)
519 SPACE=$(subst x, ,x)
520 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
521
522 slicerepo-MODULES := bootstrapfs
523 slicerepo-SPEC := slicerepo.spec
524 # package requires all embedded packages
525 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
526 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
527 #export rpm list to the specfile
528 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
529 slicerepo-RPMDATE := yes
530 ALL += slicerepo
531
532 #
533 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
534 #
535 myplc-MODULES := myplc
536 myplc-SPEC := myplc.spec
537 ALL += myplc
538
539 # myplc-docs only contains docs for PLCAPI and NMAPI, but
540 # we still need to pull MyPLC, as it is where the specfile lies, 
541 # together with the utility script docbook2drupal.sh
542 myplc-docs-MODULES := myplc plcapi nodemanager monitor
543 myplc-docs-SPEC := myplc-docs.spec
544 ALL += myplc-docs
545
546 # using some other name than myplc-release, as this is a make target already
547 release-MODULES := myplc
548 release-SPEC := myplc-release.spec
549 release-RPMDATE := yes
550 ALL += release