iproute is needed by initscripts, so is required on bootcd
[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 # libnl
68 #
69 # [daniel]    wait for latest Fedora release 
70 # (03:29:46 PM) daniel_hozac: interfacing with the kernel directly when dealing with netlink was fugly, so... i had to find something nicer.
71 # (03:29:53 PM) daniel_hozac: the one in Fedora is lacking certain APIs i need.
72 #
73 libnl-MODULES := libnl
74 libnl-SPEC := libnl.spec
75 ALL += libnl
76
77 #
78 # util-vserver
79 #
80 util-vserver-MODULES := util-vserver
81 util-vserver-SPEC := util-vserver.spec
82 util-vserver-RPMFLAGS:= --without dietlibc
83 ALL += util-vserver
84 IN_BOOTSTRAPFS += util-vserver
85
86 #
87 # util-vserver-pl
88 #
89 util-vserver-pl-MODULES := util-vserver-pl
90 util-vserver-pl-SPEC := util-vserver-pl.spec
91 util-vserver-pl-DEPEND-DEVEL-RPMS := libnl libnl-devel util-vserver-lib util-vserver-devel util-vserver-core
92 ALL += util-vserver-pl
93 IN_BOOTSTRAPFS += util-vserver-pl
94
95 #
96 # NodeUpdate
97 #
98 NodeUpdate-MODULES := NodeUpdate
99 NodeUpdate-SPEC := NodeUpdate.spec
100 ALL += NodeUpdate
101 IN_BOOTSTRAPFS += NodeUpdate
102
103 #
104 # ipod
105 #
106 ipod-MODULES := PingOfDeath
107 ipod-SPEC := ipod.spec
108 ALL += ipod
109 IN_BOOTSTRAPFS += ipod
110
111 #
112 # NodeManager
113 #
114 NodeManager-MODULES := NodeManager
115 NodeManager-SPEC := NodeManager.spec
116 ALL += NodeManager
117 IN_BOOTSTRAPFS += NodeManager
118
119 #
120 # pl_sshd
121 #
122 pl_sshd-MODULES := pl_sshd
123 pl_sshd-SPEC := pl_sshd.spec
124 ALL += pl_sshd
125 IN_BOOTSTRAPFS += pl_sshd
126
127 #
128 # codemux: Port 80 demux
129 #
130 codemux-MODULES := CoDemux
131 codemux-SPEC   := codemux.spec
132 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
133 ALL += codemux
134 IN_BOOTSTRAPFS += codemux
135
136 #
137 # fprobe-ulog
138 #
139 fprobe-ulog-MODULES := fprobe-ulog
140 fprobe-ulog-SPEC := fprobe-ulog.spec
141 ALL += fprobe-ulog
142 IN_BOOTSTRAPFS += fprobe-ulog
143
144 #
145 # pf2slice
146 #
147 pf2slice-MODULES := pf2slice
148 pf2slice-SPEC := pf2slice.spec
149 ALL += pf2slice
150
151 #
152 # PlanetLab Mom: Cleans up your mess
153 #
154 pl_mom-MODULES := Mom
155 pl_mom-SPEC := pl_mom.spec
156 ALL += pl_mom
157 IN_BOOTSTRAPFS += pl_mom
158
159 #
160 # iptables
161 #
162 iptables-MODULES := iptables
163 iptables-SPEC := iptables.spec
164 iptables-DEPEND-DEVEL-RPMS := kernel-devel
165 ALL += iptables
166 IN_BOOTSTRAPFS += iptables
167
168 #
169 # iproute
170 #
171 iproute-MODULES := iproute2
172 iproute-SPEC := iproute.spec
173 ALL += iproute
174 IN_BOOTSTRAPFS += iproute
175 IN_VSERVER += iproute
176 IN_BOOTCD += iproute
177
178 #
179 # vsys
180 #
181 vsys_support=yes
182 ifeq "$(DISTRONAME)" "fc4"
183 vsys_support=
184 endif
185 ifeq "$(DISTRONAME)" "fc6"
186 vsys_support=
187 endif
188 # cannot find the required packages (see devel.pkgs) on centos5
189 ifeq "$(DISTRONAME)" "centos5"
190 vsys_support=
191 endif
192
193 ifeq "$(vsys_support)" "yes"
194 vsys-MODULES := vsys
195 vsys-SPEC := vsys.spec
196 IN_BOOTSTRAPFS += vsys
197 ALL += vsys
198 endif
199
200 #
201 # PLCAPI
202 #
203 PLCAPI-MODULES := PLCAPI
204 PLCAPI-SPEC := PLCAPI.spec
205 ALL += PLCAPI
206 IN_MYPLC += PLCAPI
207
208 #
209 # PLCWWW
210 #
211 PLCWWW-MODULES := PLCWWW
212 PLCWWW-SPEC := PLCWWW.spec
213 ALL += PLCWWW
214 IN_MYPLC += PLCWWW
215
216 #
217 # monitor
218 #
219 Monitor-MODULES := Monitor
220 Monitor-SPEC := Monitor.spec
221 ALL += Monitor
222 IN_BOOTSTRAPFS += Monitor
223
224 #
225 # nodeconfig
226 #
227 nodeconfig-MODULES := nodeconfig
228 nodeconfig-SPEC := nodeconfig.spec
229 ALL += nodeconfig
230 IN_MYPLC += nodeconfig
231
232 #
233 # bootmanager
234 #
235 bootmanager-MODULES := BootManager
236 bootmanager-SPEC := bootmanager.spec
237 ALL += bootmanager
238 IN_MYPLC += bootmanager
239
240 #
241 # pypcilib : used in bootcd
242
243 pypcilib-MODULES := pypcilib
244 pypcilib-SPEC := pypcilib.spec
245 ALL += pypcilib
246 IN_BOOTCD += pypcilib
247
248 #
249 # bootcd
250 #
251 bootcd-MODULES := BootCD build
252 bootcd-SPEC := bootcd.spec
253 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
254 # package has *some* dependencies, at least these ones
255 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
256 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
257 bootcd-RPMDATE := yes
258 ALL += bootcd
259 IN_MYPLC += bootcd
260
261 #
262 # vserver : reference image for slices
263 #
264 vserver-MODULES := VserverReference build
265 vserver-SPEC := vserver-reference.spec
266 # Package must be built as root
267 vserver-RPMBUILD := sudo bash ./rpmbuild.sh
268 # this list is useful for manual builds only, since nightly builds 
269 # always redo all sequentially - try to keep updated
270 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
271 vserver-DEPEND-FILES := RPMS/yumgroups.xml
272 vserver-RPMDATE := yes
273 ALL += vserver
274 IN_BOOTSTRAPFS += vserver
275
276 #
277 # bootstrapfs
278 #
279 bootstrapfs-MODULES := BootstrapFS build
280 bootstrapfs-SPEC := bootstrapfs.spec
281 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
282 # package requires all regular packages
283 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
284 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
285 bootstrapfs-RPMDATE := yes
286 ALL += bootstrapfs
287 IN_MYPLC += bootstrapfs
288
289 #
290 # noderepo
291 #
292 # all rpms resulting from packages marked as being in bootstrapfs and vserver
293 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
294 # replace space with +++ (specvars cannot deal with spaces)
295 SPACE=$(subst x, ,x)
296 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
297
298 noderepo-MODULES := BootstrapFS 
299 noderepo-SPEC := noderepo.spec
300 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
301 # package requires all regular packages
302 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
303 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
304 #export rpm list to the specfile
305 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
306 noderepo-RPMDATE := yes
307 ALL += noderepo
308 IN_MYPLC += noderepo
309
310 #
311 # MyPLC native : lightweight packaging, dependencies are yum-installed in a vserver
312 #
313 myplc-native-MODULES := MyPLC build 
314 myplc-native-SPEC := myplc-native.spec
315 # Package must be built as root
316 myplc-native-RPMBUILD := sudo bash ./rpmbuild.sh
317 # Thierry : don't depend on anything at build-time
318 #myplc-native-DEPEND-PACKAGES :=
319 # Thierry : dunno about this one, let's stay safe
320 myplc-native-DEPEND-FILES := myplc-release
321 ALL += myplc-native
322
323 ## #
324 ## # myplc : old-fashioned, chroot-based packaging
325 ## #
326 ## myplc-MODULES := MyPLC build
327 ## myplc-SPEC := myplc.spec
328 ## # Package must be built as root
329 ## myplc-RPMBUILD := sudo bash ./rpmbuild.sh
330 ## # myplc may require all packages
331 ## myplc-DEPEND-PACKAGES := $(IN_MYPLC)
332 ## myplc-DEPEND-FILES := RPMS/yumgroups.xml myplc-release
333 ## myplc-RPMDATE := yes
334 ## ALL += myplc
335
336 myplc-docs-MODULES := MyPLC PLCAPI NodeManager
337 myplc-docs-SPEC := myplc-docs.spec
338 ALL += myplc-docs