fix iptables for k27 builds
[build.git] / onelab.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 #
14 # kernel
15 #
16 # use a package name with srpm in it:
17 # so the source rpm is created by running make srpm in the codebase
18 #
19
20 kernel-MODULES := linux-2.6
21 kernel-SPEC := kernel-2.6.spec
22 kernel-BUILD-FROM-SRPM := yes
23 ifeq "$(HOSTARCH)" "i386"
24 kernel-RPMFLAGS:= --target i686
25 else
26 kernel-RPMFLAGS:= --target $(HOSTARCH)
27 endif
28 # this is useful for 2.6.22 but will not be needed anymore with 2.6.27
29 kernel-SPECVARS += iwlwifi=1 
30 kernel-SPECVARS += kernelconfig=planetlab
31 KERNELS += kernel
32
33 kernels: $(KERNELS)
34 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
35
36 ALL += $(KERNELS)
37 # this is to mark on which image a given rpm is supposed to go
38 IN_BOOTCD += $(KERNELS)
39 IN_VSERVER += $(KERNELS)
40 IN_BOOTSTRAPFS += $(KERNELS)
41
42 #
43 # ipfw: root context module, and slice companion
44 #
45 ipfwroot-MODULES := ipfw
46 ipfwroot-SPEC := planetlab/ipfwroot.spec
47 ipfwroot-DEPEND-DEVEL-RPMS := kernel-devel
48 ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
49         kernel_release=$(kernel.rpm-release) \
50         kernel_arch=$(kernel.rpm-arch)
51 ALL += ipfwroot
52
53 ipfwslice-MODULES := ipfw
54 ipfwslice-SPEC := planetlab/ipfwslice.spec
55 ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
56         kernel_release=$(kernel.rpm-release) \
57         kernel_arch=$(kernel.rpm-arch)
58 ALL += ipfwslice
59
60 # this doesn't build on f12 - weird all right - I suspect gcc to be smarter but that needs investigation
61 # is madwifi still current anyway ? should we move to ath5k instead ?
62 #ifneq "$(DISTRONAME)" "f12"
63 #
64 # madwifi
65 #
66 madwifi-MODULES := madwifi
67 madwifi-SPEC := madwifi.spec
68 madwifi-BUILD-FROM-SRPM := yes
69 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
70 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
71         kernel_release=$(kernel.rpm-release) \
72         kernel_arch=$(kernel.rpm-arch)
73 ALL += madwifi
74 IN_BOOTSTRAPFS += madwifi
75 #endif
76
77
78 # nozomi
79
80 nozomi-MODULES := nozomi
81 nozomi-SPEC := nozomi.spec
82 nozomi-DEPEND-DEVEL-RPMS := kernel-devel
83 nozomi-SPECVARS = kernel_version=$(kernel.rpm-version) \
84         kernel_release=$(kernel.rpm-release) \
85         kernel_arch=$(kernel.rpm-arch)
86 IN_BOOTSTRAPFS += nozomi
87 ALL += nozomi
88
89 #
90 # comgt
91
92 comgt-MODULES := comgt
93 comgt-SPEC := comgt.spec
94 IN_BOOTSTRAPFS += comgt
95 ALL += comgt
96
97 #
98 # umts: root context stuff
99 #
100 umts-backend-MODULES := planetlab-umts-tools
101 umts-backend-SPEC := backend.spec
102 IN_BOOTSTRAPFS += umts-backend
103 ALL += umts-backend
104
105 #
106 # umts: slice tools
107 #
108 umts-frontend-MODULES := planetlab-umts-tools
109 umts-frontend-SPEC := frontend.spec
110 IN_VSERVER += umts-frontend
111 ALL += umts-frontend
112
113 #
114 # iptables
115 #
116 iptables-MODULES := iptables
117 iptables-SPEC := iptables.spec
118 ifeq "$(PLDISTROTAGS)" "onelab-k27-tags.mk"
119 iptables-BUILD-FROM-SRPM := yes
120 endif
121 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
122 ALL += iptables
123 IN_BOOTSTRAPFS += iptables
124
125 #
126 # iproute
127 #
128 iproute-MODULES := iproute2
129 iproute-SPEC := iproute.spec
130 ALL += iproute
131 IN_BOOTSTRAPFS += iproute
132 IN_VSERVER += iproute
133 IN_BOOTCD += iproute
134
135 #
136 # util-vserver
137 #
138 util-vserver-MODULES := util-vserver
139 util-vserver-SPEC := util-vserver.spec
140 util-vserver-RPMFLAGS:= --without dietlibc
141 ALL += util-vserver
142 IN_BOOTSTRAPFS += util-vserver
143
144 #
145 # libnl - local import
146 # we need either 1.1 or at least 1.0.pre6
147 # rebuild this on centos5 - see kexcludes in build.common
148 #
149 local_libnl=false
150 ifeq "$(DISTRONAME)" "centos5"
151 local_libnl=true
152 endif
153
154 ifeq "$(local_libnl)" "true"
155 libnl-MODULES := libnl
156 libnl-SPEC := libnl.spec
157 libnl-BUILD-FROM-SRPM := yes
158 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
159 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
160 ALL += libnl
161 IN_BOOTSTRAPFS += libnl
162 endif
163
164 #
165 # util-vserver-pl
166 #
167 util-vserver-pl-MODULES := util-vserver-pl
168 util-vserver-pl-SPEC := util-vserver-pl.spec
169 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
170 ifeq "$(local_libnl)" "true"
171 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
172 endif
173 ALL += util-vserver-pl
174 IN_BOOTSTRAPFS += util-vserver-pl
175
176 #
177 # NodeUpdate
178 #
179 nodeupdate-MODULES := NodeUpdate
180 nodeupdate-SPEC := NodeUpdate.spec
181 ALL += nodeupdate
182 IN_BOOTSTRAPFS += nodeupdate
183
184 #
185 # ipod
186 #
187 ipod-MODULES := PingOfDeath
188 ipod-SPEC := ipod.spec
189 ALL += ipod
190 IN_BOOTSTRAPFS += ipod
191
192 #
193 # NodeManager
194 #
195 nodemanager-MODULES := NodeManager
196 nodemanager-SPEC := NodeManager.spec
197 ALL += nodemanager
198 IN_BOOTSTRAPFS += nodemanager
199
200 #
201 # pl_sshd
202 #
203 sshd-MODULES := pl_sshd
204 sshd-SPEC := pl_sshd.spec
205 ALL += sshd
206 IN_BOOTSTRAPFS += sshd
207
208 #
209 # codemux: Port 80 demux
210 #
211 codemux-MODULES := CoDemux
212 codemux-SPEC   := codemux.spec
213 #codemux-RPMBUILD := bash ./rpmbuild.sh
214 ALL += codemux
215 IN_BOOTSTRAPFS += codemux
216
217 #
218 # fprobe-ulog
219 #
220 fprobe-ulog-MODULES := fprobe-ulog
221 fprobe-ulog-SPEC := fprobe-ulog.spec
222 ALL += fprobe-ulog
223 IN_BOOTSTRAPFS += fprobe-ulog
224
225 #
226 # DistributedRateLimiting
227 #
228 DistributedRateLimiting-MODULES := DistributedRateLimiting
229 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
230 ALL += DistributedRateLimiting
231 IN_NODEREPO += DistributedRateLimiting
232
233
234 #
235 # pf2slice
236 #
237 pf2slice-MODULES := pf2slice
238 pf2slice-SPEC := pf2slice.spec
239 ALL += pf2slice
240
241 #
242 # PlanetLab Mom: Cleans up your mess
243 #
244 mom-MODULES := Mom
245 mom-SPEC := pl_mom.spec
246 ALL += mom
247 IN_BOOTSTRAPFS += mom
248
249 #
250 # inotify-tools - local import
251 # rebuild this on centos5 (not found) - see kexcludes in build.common
252 #
253 local_inotify_tools=false
254 ifeq "$(DISTRONAME)" "centos5"
255 local_inotify_tools=true
256 endif
257
258 ifeq "$(local_inotify_tools)" "true"
259 inotify-tools-MODULES := inotify-tools
260 inotify-tools-SPEC := inotify-tools.spec
261 inotify-tools-BUILD-FROM-SRPM := yes
262 IN_BOOTSTRAPFS += inotify-tools
263 ALL += inotify-tools
264 endif
265
266 #
267 # vsys
268 #
269 vsys-MODULES := vsys
270 vsys-SPEC := vsys.spec
271 ifeq "$(local_inotify_tools)" "true"
272 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
273 endif
274 IN_BOOTSTRAPFS += vsys
275 ALL += vsys
276
277 #
278 # vsys-scripts
279 #
280 vsys-scripts-MODULES := vsys-scripts
281 vsys-scripts-SPEC := vsys-scripts.spec
282 IN_BOOTSTRAPFS += vsys-scripts
283 ALL += vsys-scripts
284
285 #
286 # plcapi
287 #
288 plcapi-MODULES := PLCAPI
289 plcapi-SPEC := PLCAPI.spec
290 ALL += 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
300 #
301 # use the plewww module instead
302 #
303 plewww-MODULES := PLEWWW
304 plewww-SPEC := plewww.spec
305 ALL += plewww
306
307 #
308 # www-register-wizard
309 #
310 www-register-wizard-MODULES := www-register-wizard
311 www-register-wizard-SPEC := www-register-wizard.spec
312 ALL += www-register-wizard
313
314 #
315 # pcucontrol
316 #
317 pcucontrol-MODULES := pcucontrol
318 pcucontrol-SPEC := pcucontrol.spec
319 ALL += pcucontrol
320
321 #
322 # monitor
323 #
324 monitor-MODULES := Monitor
325 monitor-SPEC := Monitor.spec
326 ALL += monitor
327 IN_BOOTSTRAPFS += monitor
328
329 #
330 # zabbix
331 #
332 zabbix-MODULES := Monitor
333 zabbix-SPEC := zabbix.spec
334 zabbix-BUILD-FROM-SRPM := yes
335 ALL += zabbix
336
337 #
338 # PLC RT
339 #
340 plcrt-MODULES := PLCRT
341 plcrt-SPEC := plcrt.spec
342 ALL += plcrt
343
344 #
345 # pyopenssl
346 #
347 pyopenssl-MODULES := pyopenssl
348 pyopenssl-SPEC := pyOpenSSL.spec
349 pyopenssl-BUILD-FROM-SRPM := yes
350 ALL += pyopenssl
351
352 #
353 # pyaspects
354 #
355 pyaspects-MODULES := pyaspects
356 pyaspects-SPEC := pyaspects.spec
357 pyaspects-BUILD-FROM-SRPM := yes
358 ALL += pyaspects
359
360 #
361 # ejabberd
362 #
363 ejabberd-MODULES := ejabberd
364 ejabberd-SPEC := ejabberd.spec
365 ejabberd-BUILD-FROM-SRPM := yes
366 ALL += ejabberd
367
368 #
369 # sfa - Slice Facility Architecture
370 #
371 sfa-MODULES := sfa
372 sfa-SPEC := sfa.spec
373 ALL += sfa
374
375 #
376 # nodeconfig
377 #
378 nodeconfig-MODULES := nodeconfig
379 nodeconfig-SPEC := nodeconfig.spec
380 ALL += nodeconfig
381
382 #
383 # bootmanager
384 #
385 bootmanager-MODULES := BootManager
386 bootmanager-SPEC := bootmanager.spec
387 ALL += bootmanager
388
389 #
390 # pypcilib : used in bootcd
391
392 pypcilib-MODULES := pypcilib
393 pypcilib-SPEC := pypcilib.spec
394 ALL += pypcilib
395 IN_BOOTCD += pypcilib
396
397 #
398 # pyplnet
399 #
400 pyplnet-MODULES := pyplnet
401 pyplnet-SPEC := pyplnet.spec
402 ALL += pyplnet
403 IN_BOOTSTRAPFS += pyplnet
404 IN_BOOTCD += pyplnet
405
406 #
407 # OMF resource controller
408 #
409 omf-resctl-MODULES := omf
410 omf-resctl-SPEC := omf-resctl.spec
411 ALL += omf-resctl
412 IN_VSERVER += omf-resctl
413
414 #
415 # OMF exp controller
416 #
417 omf-expctl-MODULES := omf
418 omf-expctl-SPEC := omf-expctl.spec
419 ALL += omf-expctl
420
421 #
422 # bootcd
423 #
424 bootcd-MODULES := BootCD build
425 bootcd-SPEC := bootcd.spec
426 bootcd-RPMBUILD := bash ./rpmbuild.sh
427 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
428 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
429 bootcd-RPMDATE := yes
430 ALL += bootcd
431
432 #
433 # vserver : reference image for slices
434 #
435 vserver-MODULES := VserverReference build
436 vserver-SPEC := vserver-reference.spec
437 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
438 vserver-DEPEND-FILES := RPMS/yumgroups.xml
439 vserver-RPMDATE := yes
440 ALL += vserver
441 IN_BOOTSTRAPFS += vserver
442
443 #
444 # bootstrapfs
445 #
446 bootstrapfs-MODULES := BootstrapFS build
447 bootstrapfs-SPEC := bootstrapfs.spec
448 bootstrapfs-RPMBUILD := bash ./rpmbuild.sh
449 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
450 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
451 bootstrapfs-RPMDATE := yes
452 ALL += bootstrapfs
453
454 #
455 # noderepo
456 #
457 # all rpms resulting from packages marked as being in bootstrapfs and vserver
458 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
459 # replace space with +++ (specvars cannot deal with spaces)
460 SPACE=$(subst x, ,x)
461 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
462
463 noderepo-MODULES := BootstrapFS 
464 noderepo-SPEC := noderepo.spec
465 noderepo-RPMBUILD := bash ./rpmbuild.sh
466 # package requires all embedded packages
467 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
468 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
469 #export rpm list to the specfile
470 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
471 noderepo-RPMDATE := yes
472 ALL += noderepo
473
474 #
475 # slicerepo
476 #
477 # all rpms resulting from packages marked as being in vserver
478 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
479 # replace space with +++ (specvars cannot deal with spaces)
480 SPACE=$(subst x, ,x)
481 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
482
483 slicerepo-MODULES := BootstrapFS 
484 slicerepo-SPEC := slicerepo.spec
485 slicerepo-RPMBUILD := bash ./rpmbuild.sh
486 # package requires all embedded packages
487 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
488 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
489 #export rpm list to the specfile
490 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
491 slicerepo-RPMDATE := yes
492 ALL += slicerepo
493
494 #
495 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
496 #
497 myplc-MODULES := MyPLC
498 myplc-SPEC := myplc.spec
499 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
500 ALL += myplc
501
502 # myplc-docs only contains docs for PLCAPI and NMAPI, but
503 # we still need to pull MyPLC, as it is where the specfile lies, 
504 # together with the utility script docbook2drupal.sh
505 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
506 myplc-docs-SPEC := myplc-docs.spec
507 ALL += myplc-docs
508
509 # using some other name than myplc-release, as this is a make target already
510 release-MODULES := MyPLC
511 release-SPEC := myplc-release.spec
512 release-RPMDATE := yes
513 ALL += release