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