Use the system libnl.
[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 IN_BOOTSTRAPFS += vsys
186 ALL += vsys
187 endif
188
189 #
190 # PLCAPI
191 #
192 PLCAPI-MODULES := PLCAPI
193 PLCAPI-SPEC := PLCAPI.spec
194 ALL += PLCAPI
195 IN_MYPLC += PLCAPI
196
197 #
198 # PLCWWW
199 #
200 PLCWWW-MODULES := PLCWWW
201 PLCWWW-SPEC := PLCWWW.spec
202 ALL += PLCWWW
203 IN_MYPLC += PLCWWW
204
205 #
206 # monitor
207 #
208 Monitor-MODULES := Monitor
209 Monitor-SPEC := Monitor.spec
210 ALL += Monitor
211 IN_BOOTSTRAPFS += Monitor
212
213 #
214 # monitor-server
215 #
216 monitor-server-MODULES := Monitor
217 monitor-server-SPEC := monitor-server.spec
218 ALL += monitor-server
219
220 #
221 # nodeconfig
222 #
223 nodeconfig-MODULES := nodeconfig
224 nodeconfig-SPEC := nodeconfig.spec
225 ALL += nodeconfig
226 IN_MYPLC += nodeconfig
227
228 #
229 # bootmanager
230 #
231 bootmanager-MODULES := BootManager
232 bootmanager-SPEC := bootmanager.spec
233 ALL += bootmanager
234 IN_MYPLC += bootmanager
235
236 #
237 # pypcilib : used in bootcd
238
239 pypcilib-MODULES := pypcilib
240 pypcilib-SPEC := pypcilib.spec
241 ALL += pypcilib
242 IN_BOOTCD += pypcilib
243
244 #
245 # bootcd
246 #
247 bootcd-MODULES := BootCD build
248 bootcd-SPEC := bootcd.spec
249 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
250 # package has *some* dependencies, at least these ones
251 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
252 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
253 bootcd-RPMDATE := yes
254 ALL += bootcd
255 IN_MYPLC += bootcd
256
257 #
258 # vserver : reference image for slices
259 #
260 vserver-MODULES := VserverReference build
261 vserver-SPEC := vserver-reference.spec
262 # Package must be built as root
263 vserver-RPMBUILD := sudo bash ./rpmbuild.sh
264 # this list is useful for manual builds only, since nightly builds 
265 # always redo all sequentially - try to keep updated
266 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
267 vserver-DEPEND-FILES := RPMS/yumgroups.xml
268 vserver-RPMDATE := yes
269 ALL += vserver
270 IN_BOOTSTRAPFS += vserver
271
272 #
273 # bootstrapfs
274 #
275 bootstrapfs-MODULES := BootstrapFS build
276 bootstrapfs-SPEC := bootstrapfs.spec
277 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
278 # package requires all regular packages
279 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
280 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
281 bootstrapfs-RPMDATE := yes
282 ALL += bootstrapfs
283 IN_MYPLC += bootstrapfs
284
285 #
286 # noderepo
287 #
288 # all rpms resulting from packages marked as being in bootstrapfs and vserver
289 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
290 # replace space with +++ (specvars cannot deal with spaces)
291 SPACE=$(subst x, ,x)
292 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
293
294 noderepo-MODULES := BootstrapFS 
295 noderepo-SPEC := noderepo.spec
296 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
297 # package requires all regular packages
298 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
299 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
300 #export rpm list to the specfile
301 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
302 noderepo-RPMDATE := yes
303 ALL += noderepo
304 IN_MYPLC += noderepo
305
306 #
307 # MyPLC native : lightweight packaging, dependencies are yum-installed in a vserver
308 #
309 myplc-native-MODULES := MyPLC build 
310 myplc-native-SPEC := myplc-native.spec
311 # Package must be built as root
312 myplc-native-RPMBUILD := sudo bash ./rpmbuild.sh
313 # Thierry : don't depend on anything at build-time
314 #myplc-native-DEPEND-PACKAGES :=
315 # Thierry : dunno about this one, let's stay safe
316 myplc-native-DEPEND-FILES := myplc-release
317 ALL += myplc-native
318
319 ## #
320 ## # myplc : old-fashioned, chroot-based packaging
321 ## #
322 ## myplc-MODULES := MyPLC build
323 ## myplc-SPEC := myplc.spec
324 ## # Package must be built as root
325 ## myplc-RPMBUILD := sudo bash ./rpmbuild.sh
326 ## # myplc may require all packages
327 ## myplc-DEPEND-PACKAGES := $(IN_MYPLC)
328 ## myplc-DEPEND-FILES := RPMS/yumgroups.xml myplc-release
329 ## myplc-RPMDATE := yes
330 ## ALL += myplc
331
332 # myplc-docs only contains docs for PLCAPI and NMAPI, but
333 # we still need to pull MyPLC, as it is where the specfile lies, 
334 # together with the utility script docbook2drupal.sh
335 myplc-docs-MODULES := MyPLC PLCAPI NodeManager
336 myplc-docs-SPEC := myplc-docs.spec
337 ALL += myplc-docs