other distros move to nodemanager that has a single specfile for all packages
[build.git] / nornet.mk
1 # /=========================================================================\
2 # =             #     #                 #     #                             =
3 # =             ##    #   ####   #####  ##    #  ######   #####             =
4 # =             # #   #  #    #  #    # # #   #  #          #               =
5 # =             #  #  #  #    #  #    # #  #  #  #####      #               =
6 # =             #   # #  #    #  #####  #   # #  #          #               =
7 # =             #    ##  #    #  #   #  #    ##  #          #               =
8 # =             #     #   ####   #    # #     #  ######     #               =
9 # =                                                                         =
10 # =             A Real-World, Large-Scale Multi-Homing Testbed              =
11 # =                          https://www.nntb.no/                           =
12 # =                                                                         =
13 # = Contact: Thomas Dreibholz                                               =
14 # =          dreibh@simula.no, https://www.simula.no/people/dreibh          =
15 # \=========================================================================/
16
17 #
18 # declare the packages to be built and their dependencies
19 # initial version from Mark Huang
20 # Mark Huang <mlhuang@cs.princeton.edu>
21 # Copyright (C) 2003-2006 The Trustees of Princeton University
22 # rewritten by Thierry Parmentelat - INRIA Sophia Antipolis
23 #
24 # see doc in Makefile  
25 #
26
27
28 # ###### NorNet customisation ###############################################
29
30 kernel-MODULES := linux
31 kernel-SPEC := kernel.spec
32 kernel-BUILD-FROM-SRPM := yes
33 ifeq "$(HOSTARCH)" "i386"
34    kernel-RPMFLAGS := --target i686
35 else
36    kernel-RPMFLAGS := --target $(HOSTARCH)
37 endif
38 kernel-RPMFLAGS += --without smp --without pae --without debug --without doc --without debuginfo --without perf
39 kernel-WHITELIST-RPMS := kernel,kernel-headers,kernel-devel,kernel-modules-extra,kernel-tools,kernel-tools-libs,kernel-tools-libs-devel
40 kernel-SPECVARS += kernelconfig=planetlab
41 KERNELS += kernel
42 kernel-STOCK-DEVEL-RPMS += elfutils-libelf-devel
43
44 kernels: $(KERNELS)
45 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
46
47 ALL += $(KERNELS)
48 # this is to mark on which image a given rpm is supposed to go
49 IN_BOOTCD += $(KERNELS)
50 #IN_SLICEIMAGE += $(KERNELS)
51 IN_NODEIMAGE += $(KERNELS)
52
53 #
54 # netperfmeter
55 #
56 netperfmeter-MODULES := netperfmeter
57 netperfmeter-SPEC := rpm/netperfmeter.spec
58 ALL += netperfmeter
59 IN_NODEIMAGE += netperfmeter
60
61 #
62 # nornet-nn
63 #
64 nornet-nn-MODULES := nornet-nn
65 nornet-nn-SPEC := rpm/nornet-nn.spec
66 ALL += nornet-nn
67 IN_NODEIMAGE += nornet-nn
68
69 #
70 # rsplib
71 #
72 rsplib-MODULES := rsplib
73 rsplib-SPEC := rpm/rsplib.spec
74 ALL += rsplib
75 IN_NODEIMAGE += rsplib
76
77 #
78 # subnetcalc
79 #
80 subnetcalc-MODULES := subnetcalc
81 subnetcalc-SPEC := rpm/subnetcalc.spec
82 ALL += subnetcalc
83 IN_NODEIMAGE += subnetcalc
84
85 #
86 # tracebox
87 #
88 tracebox-MODULES := tracebox
89 tracebox-SPEC := rpm/tracebox.spec
90 ALL += tracebox
91 IN_NODEIMAGE += tracebox
92
93 #
94 # tsctp
95 #
96 tsctp-MODULES := tsctp
97 tsctp-SPEC := rpm/tsctp.spec
98 ALL += tsctp
99 IN_NODEIMAGE += tsctp
100
101 # ###########################################################################
102
103
104 ### the madwifi drivers ship with fedora16's kernel rpm
105
106 #
107 # lxc-userspace: scripts for entering containers
108 #
109 lxc-userspace-MODULES := lxc-userspace
110 lxc-userspace-SPEC := lxc-userspace.spec
111 ALL += lxc-userspace
112 IN_NODEIMAGE += lxc-userspace
113
114 #
115 #
116 # transforward: root context module for transparent port forwarding
117 #
118 transforward-MODULES := transforward
119 transforward-SPEC := transforward.spec
120 # ##### NorNet ########################
121 transforward-LOCAL-DEVEL-RPMS += kernel-devel
122 transforward-SPECVARS = kernel_version=$(kernel.rpm-version) \
123         kernel_release=$(kernel.rpm-release) \
124         kernel_arch=$(kernel.rpm-arch)
125 # #####################################
126 ALL += transforward
127 IN_NODEIMAGE += transforward
128
129 #
130 # procprotect: root context module for protecting against weaknesses in /proc
131 #
132 procprotect-MODULES := procprotect
133 procprotect-SPEC := procprotect.spec
134 # ##### NorNet ########################
135 procprotect-LOCAL-DEVEL-RPMS += kernel-devel
136 procprotect-SPECVARS = kernel_version=$(kernel.rpm-version) \
137         kernel_release=$(kernel.rpm-release) \
138         kernel_arch=$(kernel.rpm-arch)
139 # #####################################
140 ALL += procprotect
141 IN_NODEIMAGE += procprotect
142
143 #
144 # ipfw: root context module, and slice companion
145 #
146 # this module won't build yet under f20
147 ifeq "$(DISTRONAME)" "f18"
148 ipfwroot-MODULES := ipfw
149 ipfwroot-SPEC := planetlab/ipfwroot.spec
150 # ##### NorNet ########################
151 ipfwroot-LOCAL-DEVEL-RPMS += kernel-devel
152 ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
153         kernel_release=$(kernel.rpm-release) \
154         kernel_arch=$(kernel.rpm-arch)
155 # #####################################
156 ALL += ipfwroot
157 IN_NODEIMAGE += ipfwroot
158
159 ipfwslice-MODULES := ipfw
160 ipfwslice-SPEC := planetlab/ipfwslice.spec
161 # ##### NorNet ########################
162 ipfwslice-LOCAL-DEVEL-RPMS += kernel-devel
163 ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
164         kernel_release=$(kernel.rpm-release) \
165         kernel_arch=$(kernel.rpm-arch)
166 # #####################################
167 ALL += ipfwslice
168 endif
169
170 #
171 # comgt - a companion to umts tools
172
173 comgt-MODULES := comgt
174 comgt-SPEC := comgt.spec
175 IN_NODEIMAGE += comgt
176 ALL += comgt
177
178 #
179 # umts: root context stuff
180 #
181 umts-backend-MODULES := planetlab-umts-tools
182 umts-backend-SPEC := backend.spec
183 IN_NODEIMAGE += umts-backend
184 ALL += umts-backend
185
186 #
187 # umts: slice tools
188 #
189 umts-frontend-MODULES := planetlab-umts-tools
190 umts-frontend-SPEC := frontend.spec
191 IN_SLICEIMAGE += umts-frontend
192 ALL += umts-frontend
193
194 #
195 # NodeUpdate
196 #
197 nodeupdate-MODULES := nodeupdate
198 nodeupdate-SPEC := NodeUpdate.spec
199 ALL += nodeupdate
200 IN_NODEIMAGE += nodeupdate
201
202 #
203 # ipod
204 #
205 ipod-MODULES := PingOfDeath
206 ipod-SPEC := ipod.spec
207 ALL += ipod
208 IN_NODEIMAGE += ipod
209
210 #
211 # plnode-utils
212
213 plnode-utils-MODULES := plnode-utils
214 plnode-utils-SPEC := plnode-utils-lxc.spec
215 ALL += plnode-utils
216 IN_NODEIMAGE += plnode-utils
217
218 # nodemanager
219 #
220 nodemanager-MODULES := nodemanager
221 nodemanager-SPEC := nodemanager.spec
222 ALL += nodemanager
223 IN_NODEIMAGE += nodemanager
224
225 #
226 # pl_sshd
227 #
228 sshd-MODULES := pl_sshd
229 sshd-SPEC := pl_sshd.spec
230 ALL += sshd
231 IN_NODEIMAGE += sshd
232
233 #
234 # codemux: Port 80 demux
235 #
236 codemux-MODULES := codemux
237 codemux-SPEC   := codemux.spec
238 ALL += codemux
239 IN_NODEIMAGE += codemux
240
241 #
242 # fprobe-ulog
243 #
244 fprobe-ulog-MODULES := fprobe-ulog
245 fprobe-ulog-SPEC := fprobe-ulog.spec
246 ALL += fprobe-ulog
247 IN_NODEIMAGE += fprobe-ulog
248
249 #################### libvirt version selection
250 # settling with using version 1.2.1 on all fedoras
251 # although this does not solve the slice re-creation issue seen on f20
252
253 local_libvirt=true
254 separate_libvirt_python=true
255
256 #
257 # libvirt
258 #
259 ifeq "$(local_libvirt)" "true"
260
261 libvirt-MODULES := libvirt
262 libvirt-SPEC    := libvirt.spec
263 libvirt-BUILD-FROM-SRPM := yes
264 # The --without options are breaking spec2make : hard-wired in the specfile instead
265 libvirt-STOCK-DEVEL-RPMS += xhtml1-dtds gettext gettext-devel libtasn1-devel gnutls-devel 
266 libvirt-STOCK-DEVEL-RPMS += libattr-devel augeas libpciaccess-devel yajl-devel 
267 libvirt-STOCK-DEVEL-RPMS += libpcap-devel radvd ebtables device-mapper-devel 
268 libvirt-STOCK-DEVEL-RPMS += ceph-devel numactl-devel libcap-ng-devel scrub 
269 # for 1.2.1 - first seen on f20, not sure for the other ones
270 libvirt-STOCK-DEVEL-RPMS += libblkid-devel glusterfs-api-devel glusterfs-devel
271 # strictly speaking fuse-devel is not required anymore but we might wish to turn fuse back on again in the future
272 libvirt-STOCK-DEVEL-RPMS += fuse-devel libssh2-devel dbus-devel numad 
273 libvirt-STOCK-DEVEL-RPMS += systemd-devel libnl3-devel iptables-ipv6 libgcrypt-devel netcf-devel
274 ALL += libvirt
275 IN_NODEREPO += libvirt
276 IN_NODEIMAGE += libvirt
277
278 endif
279
280 #
281 ## libvirt-python
282 #
283 ifeq "$(separate_libvirt_python)" "true"
284
285 libvirt-python-MODULES := libvirt-python
286 libvirt-python-SPEC    := libvirt-python.spec
287 libvirt-python-BUILD-FROM-SRPM := yes
288 libvirt-python-STOCK-DEVEL-RPMS += gnutls-utils nc pm-utils 
289 libvirt-python-LOCAL-DEVEL-RPMS += libvirt-devel libvirt-docs libvirt-client
290 libvirt-python-RPMFLAGS :=     --define 'packager PlanetLab'
291 ALL += libvirt-python
292 IN_NODEREPO += libvirt-python
293 IN_NODEIMAGE += libvirt-python
294
295 endif
296
297 #
298 # DistributedRateLimiting
299 #
300 #DistributedRateLimiting-MODULES := DistributedRateLimiting
301 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
302 #ALL += DistributedRateLimiting
303 #IN_NODEREPO += DistributedRateLimiting
304
305 #
306 # pf2slice
307 #
308 pf2slice-MODULES := pf2slice
309 pf2slice-SPEC := pf2slice.spec
310 ALL += pf2slice
311
312 ##
313 ## PlanetLab Mom: Cleans up your mess
314 ##
315 #mom-MODULES := mom
316 #mom-SPEC := pl_mom.spec
317 #ALL += mom
318 #IN_NODEIMAGE += mom
319
320 #
321 # openvswitch
322 #
323 # openvswitch-MODULES := openvswitch
324 # openvswitch-SPEC := openvswitch.spec
325 # openvswitch-STOCK-DEVEL-RPMS += kernel-devel
326 # IN_NODEIMAGE += openvswitch
327 # # build only on f14 as f16 has this natively
328 # ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14)"
329 # ALL += openvswitch
330 # endif
331
332 #
333 # vsys
334 #
335 vsys-MODULES := vsys
336 vsys-SPEC := vsys.spec
337 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
338 vsys-STOCK-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
339 IN_NODEIMAGE += vsys
340 ALL += vsys
341
342 #
343 # vsyssh : installed in slivers
344 #
345 vsyssh-MODULES := vsys
346 vsyssh-SPEC := vsyssh.spec
347 IN_SLICEIMAGE += vsyssh
348 ALL += vsyssh
349
350 #
351 # vsys-scripts
352 #
353 vsys-scripts-MODULES := vsys-scripts
354 vsys-scripts-SPEC := root-context/vsys-scripts.spec
355 IN_NODEIMAGE += vsys-scripts
356 ALL += vsys-scripts
357
358 #
359 # bind_public
360 #
361 bind_public-MODULES := bind_public
362 bind_public-SPEC := bind_public.spec
363 IN_SLICEIMAGE += bind_public
364 ALL += bind_public
365
366 #
367 # sliver-openvswitch
368 #
369 sliver-openvswitch-MODULES := sliver-openvswitch
370 sliver-openvswitch-SPEC := sliver-openvswitch.spec
371 IN_SLICEIMAGE += sliver-openvswitch
372 ALL += sliver-openvswitch
373
374 #
375 # plcapi
376 #
377 plcapi-MODULES := plcapi
378 plcapi-SPEC := plcapi.spec
379 ALL += plcapi
380 IN_MYPLC += plcapi
381
382 #
383 # drupal
384
385 drupal-MODULES := drupal
386 drupal-SPEC := drupal.spec
387 drupal-BUILD-FROM-SRPM := yes
388 ALL += drupal
389 IN_MYPLC += drupal
390
391 #
392 # use the plewww module instead
393 #
394 plewww-MODULES := plewww
395 plewww-SPEC := plewww.spec
396 ALL += plewww
397 IN_MYPLC += plewww
398
399 #
400 # www-register-wizard
401 #
402 www-register-wizard-MODULES := www-register-wizard
403 www-register-wizard-SPEC := www-register-wizard.spec
404 ALL += www-register-wizard
405 IN_MYPLC += www-register-wizard
406
407 #
408 # pcucontrol
409 #
410 pcucontrol-MODULES := pcucontrol
411 pcucontrol-SPEC := pcucontrol.spec
412 ALL += pcucontrol
413
414 #
415 # monitor
416 #
417 #monitor-MODULES := monitor
418 #monitor-SPEC := Monitor.spec
419 #monitor-STOCK-DEVEL-RPMS += net-snmp net-snmp-devel
420 #ALL += monitor
421 #IN_NODEIMAGE += monitor
422
423 #
424 # PLC RT
425 #
426 plcrt-MODULES := PLCRT
427 plcrt-SPEC := plcrt.spec
428 ALL += plcrt
429
430 # f12 has 0.9-1 already
431 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
432 #
433 # pyopenssl
434 #
435 pyopenssl-MODULES := pyopenssl
436 pyopenssl-SPEC := pyOpenSSL.spec
437 pyopenssl-BUILD-FROM-SRPM := yes
438 ALL += pyopenssl
439 endif
440
441 #
442 # pyaspects
443 #
444 pyaspects-MODULES := pyaspects
445 pyaspects-SPEC := pyaspects.spec
446 pyaspects-BUILD-FROM-SRPM := yes
447 ALL += pyaspects
448
449 #
450 # nodeconfig
451 #
452 nodeconfig-MODULES := nodeconfig
453 nodeconfig-SPEC := nodeconfig.spec
454 ALL += nodeconfig
455 IN_MYPLC += nodeconfig
456
457 #
458 # bootmanager
459 #
460 bootmanager-MODULES := bootmanager
461 bootmanager-SPEC := bootmanager.spec
462 ALL += bootmanager
463 IN_MYPLC += bootmanager
464
465 #
466 # pypcilib : used in bootcd
467
468 pypcilib-MODULES := pypcilib
469 pypcilib-SPEC := pypcilib.spec
470 ALL += pypcilib
471 IN_BOOTCD += pypcilib
472
473 #
474 # pyplnet
475 #
476 pyplnet-MODULES := pyplnet
477 pyplnet-SPEC := pyplnet.spec
478 ALL += pyplnet
479 IN_NODEIMAGE += pyplnet
480 IN_MYPLC += pyplnet
481 IN_BOOTCD += pyplnet
482
483 #
484 # OML measurement library
485 #
486 oml-MODULES := oml
487 oml-STOCK-DEVEL-RPMS += sqlite-devel 
488 oml-SPEC := liboml.spec
489 ALL += oml
490
491 #
492 # bootcd
493 #
494 bootcd-MODULES := bootcd build
495 bootcd-SPEC := bootcd.spec
496 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
497 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
498 bootcd-RPMDATE := yes
499 ALL += bootcd
500 IN_MYPLC += bootcd
501
502 #
503 # images for slices
504 #
505 sliceimage-MODULES := sliceimage build
506 sliceimage-SPEC := sliceimage.spec
507 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
508 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
509 sliceimage-RPMDATE := yes
510 ALL += sliceimage
511 IN_NODEIMAGE += sliceimage
512
513 #
514 # lxc-specific sliceimage initialization
515
516 lxc-sliceimage-MODULES  := sliceimage
517 lxc-sliceimage-SPEC     := lxc-sliceimage.spec
518 lxc-sliceimage-RPMDATE  := yes
519 ALL                     += lxc-sliceimage
520 IN_NODEIMAGE            += lxc-sliceimage
521
522 #
523 # nodeimage
524 #
525 nodeimage-MODULES := nodeimage build
526 nodeimage-SPEC := nodeimage.spec
527 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
528 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
529 nodeimage-RPMDATE := yes
530 ALL += nodeimage
531 IN_MYPLC += nodeimage
532
533 #
534 # noderepo
535 #
536 # all rpms resulting from packages marked as being in nodeimage and sliceimage
537 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
538 # replace space with +++ (specvars cannot deal with spaces)
539 SPACE=$(subst x, ,x)
540 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
541
542 noderepo-MODULES := nodeimage
543 noderepo-SPEC := noderepo.spec
544 # package requires all embedded packages
545 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
546 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
547 #export rpm list to the specfile
548 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
549 noderepo-RPMDATE := yes
550 ALL += noderepo
551 IN_MYPLC += noderepo
552
553 #
554 # slicerepo
555 #
556 # all rpms resulting from packages marked as being in vserver
557 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
558 # replace space with +++ (specvars cannot deal with spaces)
559 SPACE=$(subst x, ,x)
560 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
561
562 slicerepo-MODULES := nodeimage
563 slicerepo-SPEC := slicerepo.spec
564 # package requires all embedded packages
565 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
566 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
567 #export rpm list to the specfile
568 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
569 slicerepo-RPMDATE := yes
570 ALL += slicerepo
571
572 #
573 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
574 #
575 myplc-MODULES := myplc
576 myplc-SPEC := myplc.spec
577 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
578 ALL += myplc
579
580 # myplc-docs only contains docs for PLCAPI and NMAPI, but
581 # we still need to pull MyPLC, as it is where the specfile lies, 
582 # together with the utility script docbook2drupal.sh
583 myplc-docs-MODULES := myplc plcapi nodemanager monitor
584 myplc-docs-SPEC := myplc-docs.spec
585 ALL += myplc-docs
586
587 # using some other name than myplc-release, as this is a make target already
588 release-MODULES := myplc
589 release-SPEC := myplc-release.spec
590 release-RPMDATE := yes
591 ALL += release
592
593 ##############################
594 #
595 # sfa - Slice Facility Architecture
596 #
597 sfa-MODULES := sfa
598 sfa-SPEC := sfa.spec
599 ALL += sfa