Updated vsys dependencies
[build.git] / planetlab.mk
1 #
2 # PlanetLab standard components list
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 # $Id$
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 KERNELS += kernel
29
30 kernels: $(KERNELS)
31 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
32
33 ALL += $(KERNELS)
34 # this is to mark on which image a given rpm is supposed to go
35 IN_BOOTCD += $(KERNELS)
36 IN_VSERVER += $(KERNELS)
37 IN_BOOTSTRAPFS += $(KERNELS)
38 # turns out myplc installs kernel-vserver
39 IN_MYPLC += $(KERNELS)
40
41 #
42 # kexec-tools
43 #
44 ifeq "$(DISTRONAME)" "fc4"
45 kexec-tools-MODULES := kexec-tools
46 kexec-tools-SPEC := kexec-tools.spec
47 kexec-tools-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
48 kexec-tools-TAG := planetlab-4_1-rc2
49 ALL += kexec-tools
50 IN_BOOTCD += kexec-tools
51 endif
52
53 #
54 # madwifi
55 #
56 madwifi-MODULES := madwifi
57 madwifi-SPEC := madwifi.spec
58 madwifi-BUILD-FROM-SRPM := yes
59 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
60 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
61         kernel_release=$(kernel.rpm-release) \
62         kernel_arch=$(kernel.rpm-arch)
63 ALL += madwifi
64 IN_BOOTSTRAPFS += madwifi
65
66 #
67 # util-vserver
68 #
69 util-vserver-MODULES := util-vserver
70 util-vserver-SPEC := util-vserver.spec
71 util-vserver-RPMFLAGS:= --without dietlibc
72 ALL += util-vserver
73 IN_BOOTSTRAPFS += util-vserver
74
75 #
76 # util-vserver-pl
77 #
78 util-vserver-pl-MODULES := util-vserver-pl
79 util-vserver-pl-SPEC := util-vserver-pl.spec
80 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core
81 ALL += util-vserver-pl
82 IN_BOOTSTRAPFS += util-vserver-pl
83
84 #
85 # NodeUpdate
86 #
87 NodeUpdate-MODULES := NodeUpdate
88 NodeUpdate-SPEC := NodeUpdate.spec
89 ALL += NodeUpdate
90 IN_BOOTSTRAPFS += NodeUpdate
91
92 #
93 # ipod
94 #
95 ipod-MODULES := PingOfDeath
96 ipod-SPEC := ipod.spec
97 ALL += ipod
98 IN_BOOTSTRAPFS += ipod
99
100 #
101 # NodeManager
102 #
103 NodeManager-MODULES := NodeManager
104 NodeManager-SPEC := NodeManager.spec
105 ALL += NodeManager
106 IN_BOOTSTRAPFS += NodeManager
107
108 #
109 # pl_sshd
110 #
111 pl_sshd-MODULES := pl_sshd
112 pl_sshd-SPEC := pl_sshd.spec
113 ALL += pl_sshd
114 IN_BOOTSTRAPFS += pl_sshd
115
116 #
117 # codemux: Port 80 demux
118 #
119 codemux-MODULES := CoDemux
120 codemux-SPEC   := codemux.spec
121 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
122 ALL += codemux
123 IN_BOOTSTRAPFS += codemux
124
125 #
126 # fprobe-ulog
127 #
128 fprobe-ulog-MODULES := fprobe-ulog
129 fprobe-ulog-SPEC := fprobe-ulog.spec
130 ALL += fprobe-ulog
131 IN_BOOTSTRAPFS += fprobe-ulog
132
133 #
134 # pf2slice
135 #
136 pf2slice-MODULES := pf2slice
137 pf2slice-SPEC := pf2slice.spec
138 ALL += pf2slice
139
140 #
141 # PlanetLab Mom: Cleans up your mess
142 #
143 pl_mom-MODULES := Mom
144 pl_mom-SPEC := pl_mom.spec
145 ALL += pl_mom
146 IN_BOOTSTRAPFS += pl_mom
147
148 #
149 # iptables
150 #
151 iptables-MODULES := iptables
152 iptables-SPEC := iptables.spec
153 iptables-DEPEND-DEVEL-RPMS := kernel-devel
154 ALL += iptables
155 IN_BOOTSTRAPFS += iptables
156
157 #
158 # iproute
159 #
160 iproute-MODULES := iproute2
161 iproute-SPEC := iproute.spec
162 ALL += iproute
163 IN_BOOTSTRAPFS += iproute
164 IN_VSERVER += iproute
165 IN_BOOTCD += iproute
166
167 #
168 # vsys
169 #
170 vsys_support=yes
171 ifeq "$(DISTRONAME)" "fc4"
172 vsys_support=
173 endif
174 ifeq "$(DISTRONAME)" "fc6"
175 vsys_support=
176 endif
177 # cannot find the required packages (see devel.pkgs) on centos5
178 ifeq "$(DISTRONAME)" "centos5"
179 vsys_support=
180 endif
181
182 ifeq "$(vsys_support)" "yes"
183 vsys-MODULES := vsys
184 vsys-SPEC := vsys.spec
185 vsys-DEPEND-DEVEL-RPMS := kernel-headers ocaml ocaml-docs inotify-tools inotify-tools-devel 
186 IN_BOOTSTRAPFS += vsys
187 ALL += vsys
188 endif
189
190 #
191 # PLCAPI
192 #
193 PLCAPI-MODULES := PLCAPI
194 PLCAPI-SPEC := PLCAPI.spec
195 ALL += PLCAPI
196 IN_MYPLC += PLCAPI
197
198 #
199 # PLCWWW
200 #
201 PLCWWW-MODULES := PLCWWW
202 PLCWWW-SPEC := PLCWWW.spec
203 ALL += PLCWWW
204 IN_MYPLC += PLCWWW
205
206 #
207 # monitor
208 #
209 Monitor-MODULES := Monitor
210 Monitor-SPEC := Monitor.spec
211 ALL += Monitor
212 IN_BOOTSTRAPFS += Monitor
213
214 #
215 # monitor-server
216 #
217 monitor-server-MODULES := Monitor
218 monitor-server-SPEC := monitor-server.spec
219 ALL += monitor-server
220
221 #
222 # nodeconfig
223 #
224 nodeconfig-MODULES := nodeconfig
225 nodeconfig-SPEC := nodeconfig.spec
226 ALL += nodeconfig
227 IN_MYPLC += nodeconfig
228
229 #
230 # bootmanager
231 #
232 bootmanager-MODULES := BootManager
233 bootmanager-SPEC := bootmanager.spec
234 ALL += bootmanager
235 IN_MYPLC += bootmanager
236
237 #
238 # pypcilib : used in bootcd
239
240 pypcilib-MODULES := pypcilib
241 pypcilib-SPEC := pypcilib.spec
242 ALL += pypcilib
243 IN_BOOTCD += pypcilib
244
245 #
246 # bootcd
247 #
248 bootcd-MODULES := BootCD build
249 bootcd-SPEC := bootcd.spec
250 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
251 # package has *some* dependencies, at least these ones
252 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
253 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
254 bootcd-RPMDATE := yes
255 ALL += bootcd
256 IN_MYPLC += bootcd
257
258 #
259 # vserver : reference image for slices
260 #
261 vserver-MODULES := VserverReference build
262 vserver-SPEC := vserver-reference.spec
263 # Package must be built as root
264 vserver-RPMBUILD := sudo bash ./rpmbuild.sh
265 # this list is useful for manual builds only, since nightly builds 
266 # always redo all sequentially - try to keep updated
267 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
268 vserver-DEPEND-FILES := RPMS/yumgroups.xml
269 vserver-RPMDATE := yes
270 ALL += vserver
271 IN_BOOTSTRAPFS += vserver
272
273 #
274 # bootstrapfs
275 #
276 bootstrapfs-MODULES := BootstrapFS build
277 bootstrapfs-SPEC := bootstrapfs.spec
278 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
279 # package requires all regular packages
280 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
281 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
282 bootstrapfs-RPMDATE := yes
283 ALL += bootstrapfs
284 IN_MYPLC += bootstrapfs
285
286 #
287 # noderepo
288 #
289 # all rpms resulting from packages marked as being in bootstrapfs and vserver
290 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
291 # replace space with +++ (specvars cannot deal with spaces)
292 SPACE=$(subst x, ,x)
293 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
294
295 noderepo-MODULES := BootstrapFS 
296 noderepo-SPEC := noderepo.spec
297 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
298 # package requires all regular packages
299 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
300 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
301 #export rpm list to the specfile
302 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
303 noderepo-RPMDATE := yes
304 ALL += noderepo
305 IN_MYPLC += noderepo
306
307 #
308 # MyPLC native : lightweight packaging, dependencies are yum-installed in a vserver
309 #
310 myplc-native-MODULES := MyPLC build 
311 myplc-native-SPEC := myplc-native.spec
312 # Package must be built as root
313 myplc-native-RPMBUILD := sudo bash ./rpmbuild.sh
314 myplc-native-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
315 ALL += myplc-native
316
317 ## #
318 ## # myplc : old-fashioned, chroot-based packaging
319 ## #
320 ## myplc-MODULES := MyPLC build
321 ## myplc-SPEC := myplc.spec
322 ## # Package must be built as root
323 ## myplc-RPMBUILD := sudo bash ./rpmbuild.sh
324 ## # myplc may require all packages
325 ## myplc-DEPEND-PACKAGES := $(IN_MYPLC)
326 ## myplc-DEPEND-FILES := RPMS/yumgroups.xml myplc-release
327 ## myplc-RPMDATE := yes
328 ## ALL += myplc
329
330 # myplc-docs only contains docs for PLCAPI and NMAPI, but
331 # we still need to pull MyPLC, as it is where the specfile lies, 
332 # together with the utility script docbook2drupal.sh
333 myplc-docs-MODULES := MyPLC PLCAPI NodeManager
334 myplc-docs-SPEC := myplc-docs.spec
335 ALL += myplc-docs