Added a new module called openvswitch. Tried module-tag -s <version of new module...
[build.git] / planetlab.mk
1 # $Id$
2 # $URL$
3 #
4 # declare the packages to be built and their dependencies
5 # initial version from Mark Huang
6 # Mark Huang <mlhuang@cs.princeton.edu>
7 # Copyright (C) 2003-2006 The Trustees of Princeton University
8 # rewritten by Thierry Parmentelat - INRIA Sophia Antipolis
9 #
10 # see doc in Makefile  
11 #
12
13 # mkinitrd
14 #
15 ifeq "$(PLDISTROTAGS)" "planetlab-k32-tags.mk"
16 ifeq "$(DISTRONAME)" "centos5"
17 mkinitrd-MODULES := mkinitrd
18 mkinitrd-SPEC := mkinitrd.spec
19 mkinitrd-BUILD-FROM-SRPM := yes
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 KERNELS += kernel
43
44 kernels: $(KERNELS)
45 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
46
47 ALL += $(KERNELS)
48 # this is to mark on which image a given rpm is supposed to go
49 IN_BOOTCD += $(KERNELS)
50 IN_VSERVER += $(KERNELS)
51 IN_BOOTSTRAPFS += $(KERNELS)
52 # turns out myplc installs kernel-vserver
53 IN_MYPLC += $(KERNELS)
54
55 #
56 # madwifi
57 #
58 madwifi-MODULES := madwifi
59 madwifi-SPEC := madwifi.spec
60 madwifi-BUILD-FROM-SRPM := yes
61 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
62 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
63         kernel_release=$(kernel.rpm-release) \
64         kernel_arch=$(kernel.rpm-arch)
65 ALL += madwifi
66 IN_BOOTSTRAPFS += madwifi
67
68 #
69 # util-vserver
70 #
71 util-vserver-MODULES := util-vserver
72 util-vserver-SPEC := util-vserver.spec
73 util-vserver-RPMFLAGS:= --without dietlibc
74 ALL += util-vserver
75 IN_BOOTSTRAPFS += util-vserver
76
77 #
78 # libnl - local import
79 # we need either 1.1 or at least 1.0.pre6
80 # rebuild this on centos5 - see kexcludes in build.common
81 #
82 local_libnl=false
83 ifeq "$(DISTRONAME)" "centos5"
84 local_libnl=true
85 endif
86
87 ifeq "$(local_libnl)" "true"
88 libnl-MODULES := libnl
89 libnl-SPEC := libnl.spec
90 libnl-BUILD-FROM-SRPM := yes
91 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
92 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
93 ALL += libnl
94 IN_BOOTSTRAPFS += libnl
95 endif
96
97 #
98 # util-vserver-pl
99 #
100 util-vserver-pl-MODULES := util-vserver-pl
101 util-vserver-pl-SPEC := util-vserver-pl.spec
102 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
103 ifeq "$(local_libnl)" "true"
104 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
105 endif
106 ALL += util-vserver-pl
107 IN_BOOTSTRAPFS += util-vserver-pl
108
109 #
110 # NodeUpdate
111 #
112 nodeupdate-MODULES := nodeupdate
113 nodeupdate-SPEC := NodeUpdate.spec
114 ALL += nodeupdate
115 IN_BOOTSTRAPFS += nodeupdate
116
117 #
118 # ipod
119 #
120 ipod-MODULES := PingOfDeath
121 ipod-SPEC := ipod.spec
122 ALL += ipod
123 IN_BOOTSTRAPFS += ipod
124
125 #
126 # NodeManager
127 #
128 nodemanager-MODULES := nodemanager
129 nodemanager-SPEC := NodeManager.spec
130 ALL += nodemanager
131 IN_BOOTSTRAPFS += nodemanager
132
133 #
134 # pl_sshd
135 #
136 sshd-MODULES := pl_sshd
137 sshd-SPEC := pl_sshd.spec
138 ALL += sshd
139 IN_BOOTSTRAPFS += sshd
140
141 #
142 # codemux: Port 80 demux
143 #
144 codemux-MODULES := codemux
145 codemux-SPEC   := codemux.spec
146 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
147 ALL += codemux
148 IN_BOOTSTRAPFS += codemux
149
150 #
151 # fprobe-ulog
152 #
153 fprobe-ulog-MODULES := fprobe-ulog
154 fprobe-ulog-SPEC := fprobe-ulog.spec
155 ALL += fprobe-ulog
156 IN_BOOTSTRAPFS += fprobe-ulog
157
158 #
159 # DistributedRateLimiting
160 #
161 DistributedRateLimiting-MODULES := DistributedRateLimiting
162 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
163 ALL += DistributedRateLimiting
164 IN_NODEREPO += DistributedRateLimiting
165
166 #
167 # pf2slice
168 #
169 pf2slice-MODULES := pf2slice
170 pf2slice-SPEC := pf2slice.spec
171 ALL += pf2slice
172
173 #
174 # PlanetLab Mom: Cleans up your mess
175 #
176 mom-MODULES := Mom
177 mom-SPEC := pl_mom.spec
178 ALL += mom
179 IN_BOOTSTRAPFS += mom
180
181 #
182 # iptables
183 #
184 iptables-MODULES := iptables
185 iptables-SPEC := iptables.spec
186 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
187 ALL += iptables
188 IN_BOOTSTRAPFS += iptables
189
190 #
191 # iproute
192 #
193 iproute-MODULES := iproute2
194 iproute-SPEC := iproute.spec
195 ALL += iproute
196 IN_BOOTSTRAPFS += iproute
197 IN_VSERVER += iproute
198 IN_BOOTCD += iproute
199
200 #
201 # inotify-tools - local import
202 # rebuild this on centos5 (not found) - see kexcludes in build.common
203 #
204 local_inotify_tools=false
205 ifeq "$(DISTRONAME)" "centos5"
206 local_inotify_tools=true
207 endif
208
209 ifeq "$(local_inotify_tools)" "true"
210 inotify-tools-MODULES := inotify-tools
211 inotify-tools-SPEC := inotify-tools.spec
212 inotify-tools-BUILD-FROM-SRPM := yes
213 IN_BOOTSTRAPFS += inotify-tools
214 ALL += inotify-tools
215 endif
216
217 #
218 # openvswitch
219 #
220 openvswitch-MODULES := openvswitch
221 openvswitch-SPEC := openvswitch.spec
222 IN_BOOTSTRAPFS += openvswitch
223 ALL += openvswitch
224
225 #
226 # vsys
227 #
228 vsys-MODULES := vsys
229 vsys-SPEC := vsys.spec
230 ifeq "$(local_inotify_tools)" "true"
231 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
232 endif
233 IN_BOOTSTRAPFS += vsys
234 ALL += vsys
235
236 #
237 # vsys-scripts
238 #
239 vsys-scripts-MODULES := vsys-scripts
240 vsys-scripts-SPEC := vsys-scripts.spec
241 IN_BOOTSTRAPFS += vsys-scripts
242 ALL += vsys-scripts
243
244 #
245 # PLCAPI
246 #
247 plcapi-MODULES := plcapi
248 plcapi-SPEC := PLCAPI.spec
249 ALL += plcapi
250 IN_MYPLC += plcapi
251
252 #
253 # drupal
254
255 drupal-MODULES := drupal
256 drupal-SPEC := drupal.spec
257 drupal-BUILD-FROM-SRPM := yes
258 ALL += drupal
259 IN_MYPLC += drupal
260
261 #
262 # use the plewww module instead
263 #
264 plewww-MODULES := plewww
265 plewww-SPEC := plewww.spec
266 ALL += plewww
267 IN_MYPLC += plewww
268
269 #
270 # www-register-wizard
271 #
272 www-register-wizard-MODULES := www-register-wizard
273 www-register-wizard-SPEC := www-register-wizard.spec
274 ALL += www-register-wizard
275 IN_MYPLC += www-register-wizard
276
277 #
278 # pcucontrol
279 #
280 pcucontrol-MODULES := pcucontrol
281 pcucontrol-SPEC := pcucontrol.spec
282 ALL += pcucontrol
283
284 #
285 # monitor
286 #
287 monitor-MODULES := Monitor
288 monitor-SPEC := Monitor.spec
289 ALL += monitor
290 IN_BOOTSTRAPFS += monitor
291
292 #
293 # PLC RT
294 #
295 plcrt-MODULES := PLCRT
296 plcrt-SPEC := plcrt.spec
297 ALL += plcrt
298
299 #
300 # zabbix
301 #
302 zabbix-MODULES := Monitor
303 zabbix-SPEC := zabbix.spec
304 zabbix-BUILD-FROM-SRPM := yes
305 ALL += zabbix
306
307 #
308 # pyopenssl
309 #
310 pyopenssl-MODULES := pyopenssl
311 pyopenssl-SPEC := pyOpenSSL.spec
312 pyopenssl-BUILD-FROM-SRPM := yes
313 ALL += pyopenssl
314
315
316 #
317 # pyaspects
318 #
319 pyaspects-MODULES := pyaspects
320 pyaspects-SPEC := pyaspects.spec
321 pyaspects-BUILD-FROM-SRPM := yes
322 ALL += pyaspects
323
324 #
325 # ejabberd
326 #
327 ejabberd-MODULES := ejabberd
328 ejabberd-SPEC := ejabberd.spec
329 ejabberd-BUILD-FROM-SRPM := yes
330 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
331 # so, this is relevant on f8 and centos5 only
332 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
333 ALL += ejabberd
334 endif
335
336 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
337 build_sfa=true
338 ifeq "$(DISTRONAME)" "centos5"
339 build_sfa=false
340 endif
341
342 ifeq "$(build_sfa)" "true"
343 #
344 # sfa - Slice Facility Architecture
345 #
346 sfa-MODULES := sfa
347 sfa-SPEC := sfa.spec
348 ALL += sfa
349 endif
350
351 #
352 # nodeconfig
353 #
354 # xxx needed when upgrading to 5.0
355 #nodeconfig-MODULES := nodeconfig
356 nodeconfig-MODULES := nodeconfig
357 nodeconfig-SPEC := nodeconfig.spec
358 ALL += nodeconfig
359 IN_MYPLC += nodeconfig
360
361 #
362 # bootmanager
363 #
364 bootmanager-MODULES := bootmanager
365 bootmanager-SPEC := bootmanager.spec
366 ALL += bootmanager
367 IN_MYPLC += bootmanager
368
369 #
370 # pypcilib : used in bootcd
371
372 pypcilib-MODULES := pypcilib
373 pypcilib-SPEC := pypcilib.spec
374 ALL += pypcilib
375 IN_BOOTCD += pypcilib
376
377 #
378 # pyplnet
379 #
380 pyplnet-MODULES := pyplnet
381 pyplnet-SPEC := pyplnet.spec
382 ALL += pyplnet
383 IN_BOOTSTRAPFS += pyplnet
384 IN_MYPLC += pyplnet
385 IN_BOOTCD += pyplnet
386
387
388 #
389 # OMF resource controller
390 #
391 omf-resctl-MODULES := omf
392 omf-resctl-SPEC := omf-resctl.spec
393 ALL += omf-resctl
394 IN_VSERVER += omf-resctl
395
396 #
397 # OMF exp controller
398 #
399 omf-expctl-MODULES := omf
400 omf-expctl-SPEC := omf-expctl.spec
401 ALL += omf-expctl
402
403
404 #
405 # bootcd
406 #
407 bootcd-MODULES := bootcd build
408 bootcd-SPEC := bootcd.spec
409 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
410 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
411 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
412 bootcd-RPMDATE := yes
413 ALL += bootcd
414 IN_MYPLC += bootcd
415
416 #
417 # vserver : reference image for slices
418 #
419 vserver-MODULES := vserver-reference build
420 vserver-SPEC := vserver-reference.spec
421 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
422 vserver-DEPEND-FILES := RPMS/yumgroups.xml
423 vserver-RPMDATE := yes
424 ALL += vserver
425 IN_BOOTSTRAPFS += vserver
426
427 #
428 # bootstrapfs
429 #
430 bootstrapfs-MODULES := bootstrapfs build
431 bootstrapfs-SPEC := bootstrapfs.spec
432 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
433 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
434 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
435 bootstrapfs-RPMDATE := yes
436 ALL += bootstrapfs
437 IN_MYPLC += bootstrapfs
438
439 #
440 # noderepo
441 #
442 # all rpms resulting from packages marked as being in bootstrapfs and vserver
443 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
444 # replace space with +++ (specvars cannot deal with spaces)
445 SPACE=$(subst x, ,x)
446 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
447
448 noderepo-MODULES := bootstrapfs
449 noderepo-SPEC := noderepo.spec
450 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
451 # package requires all regular packages
452 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
453 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
454 #export rpm list to the specfile
455 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
456 noderepo-RPMDATE := yes
457 ALL += noderepo
458 IN_MYPLC += noderepo
459
460 #
461 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
462 #
463 myplc-MODULES := myplc
464 myplc-SPEC := myplc.spec
465 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
466 ALL += myplc
467
468 # myplc-docs only contains docs for PLCAPI and NMAPI, but
469 # we still need to pull MyPLC, as it is where the specfile lies, 
470 # together with the utility script docbook2drupal.sh
471 myplc-docs-MODULES := myplc plcapi nodemanager Monitor
472 myplc-docs-SPEC := myplc-docs.spec
473 ALL += myplc-docs
474
475 # using some other name than myplc-release, as this is a make target already
476 release-MODULES := myplc
477 release-SPEC := myplc-release.spec
478 release-RPMDATE := yes
479 ALL += release
480