speed up build: trim the basic devel image, add stuff as we go
[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 # this is useful for 2.6.22 but will not be needed anymore with 2.6.27
27 kernel-SPECVARS += iwlwifi=1 
28 kernel-SPECVARS += kernelconfig=planetlab
29 KERNELS += kernel
30
31 kernels: $(KERNELS)
32 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
33
34 ALL += $(KERNELS)
35 # this is to mark on which image a given rpm is supposed to go
36 IN_BOOTCD += $(KERNELS)
37 IN_VSERVER += $(KERNELS)
38 IN_BOOTSTRAPFS += $(KERNELS)
39
40 #
41 # ipfw: root context module, and slice companion
42 #
43 ipfwroot-MODULES := ipfw
44 ipfwroot-SPEC := planetlab/ipfwroot.spec
45 ipfwroot-DEPEND-DEVEL-RPMS += kernel-devel
46 ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
47         kernel_release=$(kernel.rpm-release) \
48         kernel_arch=$(kernel.rpm-arch)
49 ALL += ipfwroot
50 IN_BOOTSTRAPFS += ipfwroot
51
52 ipfwslice-MODULES := ipfw
53 ipfwslice-SPEC := planetlab/ipfwslice.spec
54 ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
55         kernel_release=$(kernel.rpm-release) \
56         kernel_arch=$(kernel.rpm-arch)
57 ALL += ipfwslice
58
59 #
60 # madwifi
61 #
62 madwifi-MODULES := madwifi
63 madwifi-SPEC := madwifi.spec
64 madwifi-BUILD-FROM-SRPM := yes
65 madwifi-DEPEND-DEVEL-RPMS += kernel-devel
66 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
67         kernel_release=$(kernel.rpm-release) \
68         kernel_arch=$(kernel.rpm-arch)
69 ALL += madwifi
70 IN_BOOTSTRAPFS += madwifi
71
72
73 # nozomi
74
75 nozomi-MODULES := nozomi
76 nozomi-SPEC := nozomi.spec
77 nozomi-DEPEND-DEVEL-RPMS += kernel-devel
78 nozomi-SPECVARS = kernel_version=$(kernel.rpm-version) \
79         kernel_release=$(kernel.rpm-release) \
80         kernel_arch=$(kernel.rpm-arch)
81 IN_BOOTSTRAPFS += nozomi
82 ALL += nozomi
83
84 #
85 # comgt
86
87 comgt-MODULES := comgt
88 comgt-SPEC := comgt.spec
89 IN_BOOTSTRAPFS += comgt
90 ALL += comgt
91
92 #
93 # umts: root context stuff
94 #
95 umts-backend-MODULES := planetlab-umts-tools
96 umts-backend-SPEC := backend.spec
97 IN_BOOTSTRAPFS += umts-backend
98 ALL += umts-backend
99
100 #
101 # umts: slice tools
102 #
103 umts-frontend-MODULES := planetlab-umts-tools
104 umts-frontend-SPEC := frontend.spec
105 IN_VSERVER += umts-frontend
106 ALL += umts-frontend
107
108 #
109 # iptables
110 #
111 iptables-MODULES := iptables
112 iptables-SPEC := iptables.spec
113 ifeq "$(PLDISTROTAGS)" "onelab-k27-tags.mk"
114 iptables-BUILD-FROM-SRPM := yes
115 endif
116 iptables-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
117 ALL += iptables
118 IN_BOOTSTRAPFS += iptables
119
120 #
121 # iproute
122 #
123 iproute-MODULES := iproute2
124 iproute-SPEC := iproute.spec
125 ALL += iproute
126 IN_BOOTSTRAPFS += iproute
127 IN_VSERVER += iproute
128 IN_BOOTCD += iproute
129
130 #
131 # util-vserver
132 #
133 util-vserver-MODULES := util-vserver
134 util-vserver-SPEC := util-vserver.spec
135 util-vserver-RPMFLAGS:= --without dietlibc
136 ALL += util-vserver
137 IN_BOOTSTRAPFS += util-vserver
138
139 #
140 # libnl - local import
141 # we need either 1.1 or at least 1.0.pre6
142 # rebuild this on centos5 - see kexcludes in build.common
143 #
144 local_libnl=false
145 ifeq "$(DISTRONAME)" "centos5"
146 local_libnl=true
147 endif
148
149 ifeq "$(local_libnl)" "true"
150 libnl-MODULES := libnl
151 libnl-SPEC := libnl.spec
152 libnl-BUILD-FROM-SRPM := yes
153 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
154 libnl-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
155 ALL += libnl
156 IN_BOOTSTRAPFS += libnl
157 endif
158
159 #
160 # util-vserver-pl
161 #
162 util-vserver-pl-MODULES := util-vserver-pl
163 util-vserver-pl-SPEC := util-vserver-pl.spec
164 util-vserver-pl-DEPEND-DEVEL-RPMS += util-vserver-lib util-vserver-devel util-vserver-core 
165 ifeq "$(local_libnl)" "true"
166 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
167 endif
168 ALL += util-vserver-pl
169 IN_BOOTSTRAPFS += util-vserver-pl
170
171 #
172 # NodeUpdate
173 #
174 nodeupdate-MODULES := nodeupdate
175 nodeupdate-SPEC := NodeUpdate.spec
176 ALL += nodeupdate
177 IN_BOOTSTRAPFS += nodeupdate
178
179 #
180 # ipod
181 #
182 ipod-MODULES := PingOfDeath
183 ipod-SPEC := ipod.spec
184 ALL += ipod
185 IN_BOOTSTRAPFS += ipod
186
187 #
188 # NodeManager
189 #
190 nodemanager-MODULES := nodemanager
191 nodemanager-SPEC := NodeManager.spec
192 ALL += nodemanager
193 IN_BOOTSTRAPFS += nodemanager
194
195 #
196 # pl_sshd
197 #
198 sshd-MODULES := pl_sshd
199 sshd-SPEC := pl_sshd.spec
200 ALL += sshd
201 IN_BOOTSTRAPFS += sshd
202
203 #
204 # codemux: Port 80 demux
205 #
206 codemux-MODULES := codemux
207 codemux-SPEC   := codemux.spec
208 ALL += codemux
209 IN_BOOTSTRAPFS += codemux
210
211 #
212 # fprobe-ulog
213 #
214 fprobe-ulog-MODULES := fprobe-ulog
215 fprobe-ulog-SPEC := fprobe-ulog.spec
216 ALL += fprobe-ulog
217 IN_BOOTSTRAPFS += fprobe-ulog
218
219 #
220 # DistributedRateLimiting
221 #
222 DistributedRateLimiting-MODULES := DistributedRateLimiting
223 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
224 ALL += DistributedRateLimiting
225 IN_NODEREPO += DistributedRateLimiting
226
227
228 #
229 # pf2slice
230 #
231 pf2slice-MODULES := pf2slice
232 pf2slice-SPEC := pf2slice.spec
233 ALL += pf2slice
234
235 #
236 # PlanetLab Mom: Cleans up your mess
237 #
238 mom-MODULES := Mom
239 mom-SPEC := pl_mom.spec
240 ALL += mom
241 IN_BOOTSTRAPFS += mom
242
243 #
244 # inotify-tools - local import
245 # rebuild this on centos5 (not found) - see kexcludes in build.common
246 #
247 local_inotify_tools=false
248 ifeq "$(DISTRONAME)" "centos5"
249 local_inotify_tools=true
250 endif
251
252 ifeq "$(local_inotify_tools)" "true"
253 inotify-tools-MODULES := inotify-tools
254 inotify-tools-SPEC := inotify-tools.spec
255 inotify-tools-BUILD-FROM-SRPM := yes
256 IN_BOOTSTRAPFS += inotify-tools
257 ALL += inotify-tools
258 endif
259
260 #
261 # openvswitch
262 #
263 openvswitch-MODULES := openvswitch
264 openvswitch-SPEC := openvswitch.spec
265 openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
266 IN_BOOTSTRAPFS += openvswitch
267 ALL += openvswitch
268
269 #
270 # vsys
271 #
272 vsys-MODULES := vsys
273 vsys-SPEC := vsys.spec
274 ifeq "$(local_inotify_tools)" "true"
275 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
276 endif
277 IN_BOOTSTRAPFS += vsys
278 ALL += vsys
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 # zabbix
339 #
340 zabbix-MODULES := Monitor
341 zabbix-SPEC := zabbix.spec
342 zabbix-BUILD-FROM-SRPM := yes
343 zabbix-DEVEL-RPMS += python-cherrypy
344 ALL += zabbix
345
346 #
347 # PLC RT
348 #
349 plcrt-MODULES := PLCRT
350 plcrt-SPEC := plcrt.spec
351 ALL += plcrt
352
353 #
354 # pyopenssl
355 #
356 pyopenssl-MODULES := pyopenssl
357 pyopenssl-SPEC := pyOpenSSL.spec
358 pyopenssl-BUILD-FROM-SRPM := yes
359 ALL += pyopenssl
360
361 #
362 # pyaspects
363 #
364 pyaspects-MODULES := pyaspects
365 pyaspects-SPEC := pyaspects.spec
366 pyaspects-BUILD-FROM-SRPM := yes
367 ALL += pyaspects
368
369 #
370 # ejabberd
371 #
372 ejabberd-MODULES := ejabberd
373 ejabberd-SPEC := ejabberd.spec
374 ejabberd-BUILD-FROM-SRPM := yes
375 ejabberd-DEVEL-RPMS += erlang pam-devel hevea
376 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
377 # so, this is relevant on f8 and centos5 only
378 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
379 ALL += ejabberd
380 endif
381
382 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
383 build_sfa=true
384 ifeq "$(DISTRONAME)" "centos5"
385 build_sfa=false
386 endif
387
388 ifeq "$(build_sfa)" "true"
389 #
390 # sfa - Slice Facility Architecture
391 #
392 sfa-MODULES := sfa
393 sfa-SPEC := sfa.spec
394 ALL += sfa
395 endif
396
397 sface-MODULES := sface
398 sface-SPEC := sface.spec
399 ALL += sface
400
401 #
402 # nodeconfig
403 #
404 nodeconfig-MODULES := nodeconfig
405 nodeconfig-SPEC := nodeconfig.spec
406 ALL += nodeconfig
407 IN_MYPLC += nodeconfig
408
409 #
410 # bootmanager
411 #
412 bootmanager-MODULES := bootmanager
413 bootmanager-SPEC := bootmanager.spec
414 ALL += bootmanager
415 IN_MYPLC += bootmanager
416
417 #
418 # pypcilib : used in bootcd
419
420 pypcilib-MODULES := pypcilib
421 pypcilib-SPEC := pypcilib.spec
422 ALL += pypcilib
423 IN_BOOTCD += pypcilib
424
425 #
426 # pyplnet
427 #
428 pyplnet-MODULES := pyplnet
429 pyplnet-SPEC := pyplnet.spec
430 ALL += pyplnet
431 IN_BOOTSTRAPFS += pyplnet
432 IN_MYPLC += pyplnet
433 IN_BOOTCD += pyplnet
434
435 #
436 # OMF resource controller
437 #
438 omf-resctl-MODULES := omf
439 omf-resctl-SPEC := omf-resctl.spec
440 ALL += omf-resctl
441 IN_VSERVER += omf-resctl
442
443 #
444 # OMF exp controller
445 #
446 omf-expctl-MODULES := omf
447 omf-expctl-SPEC := omf-expctl.spec
448 ALL += omf-expctl
449
450 #
451 # bootcd
452 #
453 bootcd-MODULES := bootcd build
454 bootcd-SPEC := bootcd.spec
455 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
456 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
457 bootcd-RPMDATE := yes
458 ALL += bootcd
459 IN_MYPLC += bootcd
460
461 #
462 # vserver : reference image for slices
463 #
464 vserver-MODULES := vserver-reference build
465 vserver-SPEC := vserver-reference.spec
466 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
467 vserver-DEPEND-FILES := RPMS/yumgroups.xml
468 vserver-RPMDATE := yes
469 ALL += vserver
470 IN_BOOTSTRAPFS += vserver
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