cleaning up the root creation functions and build.common - untested
[build.git] / planetlab.mk
1 #
2 # PlanetLab standard components list
3 #
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2003-2006 The Trustees of Princeton University
6 #
7 # $Id$
8 #
9 # see doc in Makefile  
10 #
11
12 #
13 # kernel
14 #
15 # use a package name with srpm in it:
16 # so the source rpm is created by running make srpm in the codebase
17 #
18
19 kernel-MODULES := linux-patches
20 kernel-SPEC := kernel-2.6-planetlab.spec
21 kernel-BUILD-FROM-SRPM := yes
22 ifeq ($(HOSTARCH),i386)
23 kernel-RPMFLAGS:= --target i686
24 else
25 kernel-RPMFLAGS:= --target $(HOSTARCH)
26 endif
27 KERNELS += kernel
28
29 kernels: $(KERNELS)
30 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
31
32 ALL += $(KERNELS)
33 # this is to mark on which image a given rpm is supposed to go
34 IN_BOOTCD += $(KERNELS)
35 IN_VSERVER += $(KERNELS)
36 IN_BOOTSTRAPFS += $(KERNELS)
37 # turns out myplc installs kernel-vserver
38 IN_MYPLC += $(KERNELS)
39
40 #
41 # madwifi
42 #
43 # [thierry] - temporarily use onelab's svn
44 #
45 madwifi-MODULES := madwifi
46 madwifi-SPEC := madwifi.spec
47 madwifi-BUILD-FROM-SRPM := yes
48 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
49 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
50         kernel_release=$(kernel.rpm-release) \
51         kernel_arch=$(kernel.rpm-arch)
52 IN_BOOTSTRAPFS += madwifi
53 ALL += madwifi
54
55 #
56 # wireless-tools
57
58 wireless-tools-MODULES := wireless-tools
59 wireless-tools-SPEC := wireless-tools.spec
60 wireless-tools-BUILD-FROM-SRPM := yes
61 ALL += wireless-tools
62 IN_BOOTSTRAPFS += wireless-tools
63
64 #
65 # libnl
66 #
67 # [daniel]    wait for latest Fedora release 
68 # (03:29:46 PM) daniel_hozac: interfacing with the kernel directly when dealing with netlink was fugly, so... i had to find something nicer.
69 # (03:29:53 PM) daniel_hozac: the one in Fedora is lacking certain APIs i need.
70 #
71 libnl-MODULES := libnl
72 libnl-SPEC := libnl.spec
73 ALL += libnl
74
75 #
76 # util-vserver
77 #
78 util-vserver-MODULES := util-vserver
79 util-vserver-SPEC := util-vserver.spec
80 util-vserver-RPMFLAGS:= --without dietlibc
81 ALL += util-vserver
82 IN_BOOTSTRAPFS += util-vserver
83
84 #
85 # util-vserver-pl
86 #
87 util-vserver-pl-MODULES := util-vserver-pl
88 util-vserver-pl-SPEC := util-vserver-pl.spec
89 util-vserver-pl-DEPEND-DEVEL-RPMS := libnl libnl-devel util-vserver-lib util-vserver-devel util-vserver-core
90 ALL += util-vserver-pl
91 IN_BOOTSTRAPFS += util-vserver-pl
92
93 #
94 # NodeUpdate
95 #
96 NodeUpdate-MODULES := NodeUpdate
97 NodeUpdate-SPEC := NodeUpdate.spec
98 ALL += NodeUpdate
99 IN_BOOTSTRAPFS += NodeUpdate
100
101 #
102 # ipod
103 #
104 ipod-MODULES := PingOfDeath
105 ipod-SPEC := ipod.spec
106 ALL += ipod
107 IN_BOOTSTRAPFS += ipod
108
109 #
110 # NodeManager
111 #
112 NodeManager-MODULES := NodeManager
113 NodeManager-SPEC := NodeManager.spec
114 ALL += NodeManager
115 IN_BOOTSTRAPFS += NodeManager
116
117 #
118 # pl_sshd
119 #
120 pl_sshd-MODULES := pl_sshd
121 pl_sshd-SPEC := pl_sshd.spec
122 ALL += pl_sshd
123 IN_BOOTSTRAPFS += pl_sshd
124
125 #
126 # libhttpd++: 
127 #
128 # Deprecate when vsys takes over [sapan].
129 # keep in build for proper.
130 #
131 libhttpd-MODULES := libhttpd++
132 libhttpd-SPEC := libhttpd++.spec
133 ALL += libhttpd
134 IN_BOOTSTRAPFS += libhttpd
135
136 #
137 # proper: Privileged Operations Service
138 #
139 proper-MODULES := proper
140 proper-SPEC := proper.spec
141 proper-DEPEND-DEVEL-RPMS := libhttpd++-devel
142 ALL += proper
143 IN_BOOTSTRAPFS += proper
144
145 #
146 # codemux: Port 80 demux
147 #
148 codemux-MODULES := CoDemux
149 codemux-SPEC   := codemux.spec
150 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
151 ALL += codemux
152 IN_BOOTSTRAPFS += codemux
153
154 #
155 # ulogd
156 #
157 ulogd-MODULES := ulogd
158 ulogd-SPEC := ulogd.spec
159 ulogd-DEPEND-DEVEL-RPMS := kernel-devel proper-libs proper-devel
160 ALL += ulogd
161 IN_VSERVER += ulogd
162
163 #
164 # fprobe-ulog
165 #
166 fprobe-ulog-MODULES := fprobe-ulog
167 fprobe-ulog-SPEC := fprobe-ulog.spec
168 ALL += fprobe-ulog
169 IN_BOOTSTRAPFS += fprobe-ulog
170
171 #
172 # netflow
173 #
174 netflow-MODULES := PlanetFlow
175 netflow-SPEC := netflow.spec
176 ALL += netflow
177 IN_BOOTSTRAPFS += netflow
178
179 #
180 # PlanetLab Mom: Cleans up your mess
181 #
182 pl_mom-MODULES := Mom
183 pl_mom-SPEC := pl_mom.spec
184 ALL += pl_mom
185 IN_BOOTSTRAPFS += pl_mom
186
187 #
188 # iptables
189 #
190 iptables-MODULES := iptables
191 iptables-SPEC := iptables.spec
192 iptables-DEPEND-DEVEL-RPMS := kernel-devel
193 ALL += iptables
194 IN_BOOTSTRAPFS += iptables
195
196 #
197 # iproute
198 #
199 iproute-MODULES := iproute2
200 iproute-SPEC := iproute.spec
201 ALL += iproute
202 IN_BOOTSTRAPFS += iproute
203
204 #
205 # vsys
206 #
207 vsys-MODULES := vsys
208 vsys-SPEC := vsys.spec
209 ifeq ($(DISTRO),"Fedora")
210 ifeq ($(RELEASE),7)
211 ALL += vsys
212 endif
213 ifeq ($(RELEASE),8)
214 ALL += vsys
215 endif
216 endif
217
218 #
219 # PLCAPI
220 #
221 PLCAPI-MODULES := PLCAPI
222 PLCAPI-SPEC := PLCAPI.spec
223 ALL += PLCAPI
224 IN_MYPLC += PLCAPI
225
226 #
227 # PLCWWW
228 #
229 PLCWWW-MODULES := WWW
230 PLCWWW-SPEC := PLCWWW.spec
231 ALL += PLCWWW
232 IN_MYPLC += PLCWWW
233
234 #
235 # bootmanager
236 #
237 bootmanager-MODULES := BootManager
238 bootmanager-SPEC := bootmanager.spec
239 ALL += bootmanager
240 IN_MYPLC += bootmanager
241
242 #
243 # pypcilib : used in bootcd
244
245 pypcilib-MODULES := pypcilib
246 pypcilib-SPEC := pypcilib.spec
247 ALL += pypcilib
248 IN_BOOTCD += pypcilib
249
250 #
251 # bootcd
252 #
253 bootcd-MODULES := BootCD build
254 bootcd-SPEC := bootcd.spec
255 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
256 # package has *some* dependencies, at least these ones
257 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
258 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
259 ALL += bootcd
260 IN_MYPLC += bootcd
261
262 #
263 # vserver : reference image for slices
264 #
265 vserver-MODULES := VserverReference build
266 vserver-SPEC := vserver-reference.spec
267 # Package must be built as root
268 vserver-RPMBUILD := sudo bash ./rpmbuild.sh
269 # this list is useful for manual builds only, since nightly builds 
270 # always redo all sequentially - try to keep updated
271 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
272 vserver-DEPEND-FILES := RPMS/yumgroups.xml
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 ALL += bootstrapfs
286 IN_MYPLC += bootstrapfs
287
288 #
289 # myplc : initial, chroot-based packaging
290 #
291 myplc-MODULES := MyPLC build
292 myplc-SPEC := myplc.spec
293 # Package must be built as root
294 myplc-RPMBUILD := sudo bash ./rpmbuild.sh
295 # myplc may require all packages
296 myplc-DEPEND-PACKAGES := $(IN_MYPLC)
297 myplc-DEPEND-FILES := RPMS/yumgroups.xml myplc-release
298 ALL += myplc
299
300 #
301 # MyPLC native : lightweight packaging, dependencies are yum-installed in a vserver
302 #
303 myplc-native-MODULES := MyPLC build 
304 myplc-native-SPEC := myplc-native.spec
305 # Package must be built as root
306 myplc-native-RPMBUILD := sudo bash ./rpmbuild.sh
307 # Thierry : don't depend on anything at build-time
308 #myplc-native-DEPEND-PACKAGES :=
309 # Thierry : dunno about this one, let's stay safe
310 myplc-native-DEPEND-FILES := myplc-release
311 ALL += myplc-native
312