scaffolding omf resource controller
[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 := ipfwsrc
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 := ipfwsrc
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 # util-vserver
115 #
116 util-vserver-MODULES := util-vserver
117 util-vserver-SPEC := util-vserver.spec
118 util-vserver-RPMFLAGS:= --without dietlibc
119 ALL += util-vserver
120 IN_BOOTSTRAPFS += util-vserver
121
122 #
123 # libnl - local import
124 # we need either 1.1 or at least 1.0.pre6
125 # rebuild this on centos5 - see kexcludes in build.common
126 #
127 local_libnl=false
128 ifeq "$(DISTRONAME)" "centos5"
129 local_libnl=true
130 endif
131
132 ifeq "$(local_libnl)" "true"
133 libnl-MODULES := libnl
134 libnl-SPEC := libnl.spec
135 libnl-BUILD-FROM-SRPM := yes
136 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
137 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
138 ALL += libnl
139 IN_BOOTSTRAPFS += libnl
140 endif
141
142 #
143 # util-vserver-pl
144 #
145 util-vserver-pl-MODULES := util-vserver-pl
146 util-vserver-pl-SPEC := util-vserver-pl.spec
147 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
148 ifeq "$(local_libnl)" "true"
149 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
150 endif
151 ALL += util-vserver-pl
152 IN_BOOTSTRAPFS += util-vserver-pl
153
154 #
155 # NodeUpdate
156 #
157 nodeupdate-MODULES := NodeUpdate
158 nodeupdate-SPEC := NodeUpdate.spec
159 ALL += nodeupdate
160 IN_BOOTSTRAPFS += nodeupdate
161
162 #
163 # ipod
164 #
165 ipod-MODULES := PingOfDeath
166 ipod-SPEC := ipod.spec
167 ALL += ipod
168 IN_BOOTSTRAPFS += ipod
169
170 #
171 # NodeManager
172 #
173 nodemanager-MODULES := NodeManager
174 nodemanager-SPEC := NodeManager.spec
175 ALL += nodemanager
176 IN_BOOTSTRAPFS += nodemanager
177
178 #
179 # pl_sshd
180 #
181 sshd-MODULES := pl_sshd
182 sshd-SPEC := pl_sshd.spec
183 ALL += sshd
184 IN_BOOTSTRAPFS += sshd
185
186 #
187 # codemux: Port 80 demux
188 #
189 codemux-MODULES := CoDemux
190 codemux-SPEC   := codemux.spec
191 #codemux-RPMBUILD := bash ./rpmbuild.sh
192 ALL += codemux
193 IN_BOOTSTRAPFS += codemux
194
195 #
196 # fprobe-ulog
197 #
198 fprobe-ulog-MODULES := fprobe-ulog
199 fprobe-ulog-SPEC := fprobe-ulog.spec
200 ALL += fprobe-ulog
201 IN_BOOTSTRAPFS += fprobe-ulog
202
203 #
204 # pf2slice
205 #
206 pf2slice-MODULES := pf2slice
207 pf2slice-SPEC := pf2slice.spec
208 ALL += pf2slice
209
210 #
211 # PlanetLab Mom: Cleans up your mess
212 #
213 mom-MODULES := Mom
214 mom-SPEC := pl_mom.spec
215 ALL += mom
216 IN_BOOTSTRAPFS += mom
217
218 #
219 # iptables
220 #
221 iptables-MODULES := iptables
222 iptables-SPEC := iptables.spec
223 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
224 ALL += iptables
225 IN_BOOTSTRAPFS += iptables
226
227 #
228 # iproute
229 #
230 iproute-MODULES := iproute2
231 iproute-SPEC := iproute.spec
232 ALL += iproute
233 IN_BOOTSTRAPFS += iproute
234 IN_VSERVER += iproute
235 IN_BOOTCD += iproute
236
237 #
238 # inotify-tools - local import
239 # rebuild this on centos5 (not found) - see kexcludes in build.common
240 #
241 local_inotify_tools=false
242 ifeq "$(DISTRONAME)" "centos5"
243 local_inotify_tools=true
244 endif
245
246 ifeq "$(local_inotify_tools)" "true"
247 inotify-tools-MODULES := inotify-tools
248 inotify-tools-SPEC := inotify-tools.spec
249 inotify-tools-BUILD-FROM-SRPM := yes
250 IN_BOOTSTRAPFS += inotify-tools
251 ALL += inotify-tools
252 endif
253
254 #
255 # vsys
256 #
257 vsys-MODULES := vsys
258 vsys-SPEC := vsys.spec
259 ifeq "$(local_inotify_tools)" "true"
260 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
261 endif
262 IN_BOOTSTRAPFS += vsys
263 ALL += vsys
264
265 #
266 # vsys-scripts
267 #
268 vsys-scripts-MODULES := vsys-scripts
269 vsys-scripts-SPEC := vsys-scripts.spec
270 IN_BOOTSTRAPFS += vsys-scripts
271 ALL += vsys-scripts
272
273 #
274 # plcapi
275 #
276 plcapi-MODULES := PLCAPI
277 plcapi-SPEC := PLCAPI.spec
278 ALL += plcapi
279
280 #
281 # drupal
282
283 drupal-MODULES := drupal
284 drupal-SPEC := drupal.spec
285 drupal-BUILD-FROM-SRPM := yes
286 ALL += drupal
287
288 #
289 # use the plewww module instead
290 #
291 plewww-MODULES := PLEWWW
292 plewww-SPEC := plewww.spec
293 ALL += plewww
294
295 #
296 # www-register-wizard
297 #
298 www-register-wizard-MODULES := www-register-wizard
299 www-register-wizard-SPEC := www-register-wizard.spec
300 ALL += www-register-wizard
301
302 #
303 # pcucontrol
304 #
305 pcucontrol-MODULES := pcucontrol
306 pcucontrol-SPEC := pcucontrol.spec
307 ALL += pcucontrol
308
309 #
310 # monitor
311 #
312 monitor-MODULES := Monitor
313 monitor-SPEC := Monitor.spec
314 ALL += monitor
315 IN_BOOTSTRAPFS += monitor
316
317 #
318 # PLC RT
319 #
320 plcrt-MODULES := PLCRT
321 plcrt-SPEC := plcrt.spec
322 ALL += plcrt
323
324 #
325 # zabbix
326 #
327 zabbix-MODULES := Monitor
328 zabbix-SPEC := zabbix.spec
329 zabbix-BUILD-FROM-SRPM := yes
330 ALL += zabbix
331
332 #
333 # pyopenssl
334 #
335 pyopenssl-MODULES := pyopenssl
336 pyopenssl-SPEC := pyOpenSSL.spec
337 pyopenssl-BUILD-FROM-SRPM := yes
338 ALL += pyopenssl
339
340
341 #
342 # sfa - Slice Facility Architecture
343 #
344 sfa-MODULES := sfa
345 sfa-SPEC := sfa.spec
346 ALL += sfa
347
348 #
349 # nodeconfig
350 #
351 nodeconfig-MODULES := nodeconfig
352 nodeconfig-SPEC := nodeconfig.spec
353 ALL += nodeconfig
354
355 #
356 # bootmanager
357 #
358 bootmanager-MODULES := BootManager
359 bootmanager-SPEC := bootmanager.spec
360 ALL += bootmanager
361
362 #
363 # pypcilib : used in bootcd
364
365 pypcilib-MODULES := pypcilib
366 pypcilib-SPEC := pypcilib.spec
367 ALL += pypcilib
368 IN_BOOTCD += pypcilib
369
370 #
371 # pyplnet
372 #
373 pyplnet-MODULES := pyplnet
374 pyplnet-SPEC := pyplnet.spec
375 ALL += pyplnet
376 IN_BOOTSTRAPFS += pyplnet
377 IN_BOOTCD += pyplnet
378
379 #
380 # OMF resource controller
381 #
382 omf-resctl-MODULES := omf
383 omf-resctl-SPEC := omf-resctl.spec
384 ALL += omf-resctl
385 IN_VSERVER += omf-resctl
386
387 #
388 # bootcd
389 #
390 bootcd-MODULES := BootCD build
391 bootcd-SPEC := bootcd.spec
392 bootcd-RPMBUILD := bash ./rpmbuild.sh
393 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
394 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
395 bootcd-RPMDATE := yes
396 ALL += bootcd
397
398 #
399 # vserver : reference image for slices
400 #
401 vserver-MODULES := VserverReference build
402 vserver-SPEC := vserver-reference.spec
403 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
404 vserver-DEPEND-FILES := RPMS/yumgroups.xml
405 vserver-RPMDATE := yes
406 ALL += vserver
407 IN_BOOTSTRAPFS += vserver
408
409 #
410 # bootstrapfs
411 #
412 bootstrapfs-MODULES := BootstrapFS build
413 bootstrapfs-SPEC := bootstrapfs.spec
414 bootstrapfs-RPMBUILD := bash ./rpmbuild.sh
415 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
416 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
417 bootstrapfs-RPMDATE := yes
418 ALL += bootstrapfs
419
420 #
421 # noderepo
422 #
423 # all rpms resulting from packages marked as being in bootstrapfs and vserver
424 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
425 # replace space with +++ (specvars cannot deal with spaces)
426 SPACE=$(subst x, ,x)
427 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
428
429 noderepo-MODULES := BootstrapFS 
430 noderepo-SPEC := noderepo.spec
431 noderepo-RPMBUILD := bash ./rpmbuild.sh
432 # package requires all regular packages
433 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
434 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
435 #export rpm list to the specfile
436 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
437 noderepo-RPMDATE := yes
438 ALL += noderepo
439
440 #
441 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
442 #
443 myplc-MODULES := MyPLC
444 myplc-SPEC := myplc.spec
445 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
446 ALL += myplc
447
448 # myplc-docs only contains docs for PLCAPI and NMAPI, but
449 # we still need to pull MyPLC, as it is where the specfile lies, 
450 # together with the utility script docbook2drupal.sh
451 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
452 myplc-docs-SPEC := myplc-docs.spec
453 ALL += myplc-docs
454
455 # using some other name than myplc-release, as this is a make target already
456 release-MODULES := MyPLC
457 release-SPEC := myplc-release.spec
458 release-RPMDATE := yes
459 ALL += release