Added NorNet distribution.
[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 #
219 # nodemanager
220 #
221 nodemanager-lib-MODULES := nodemanager
222 nodemanager-lib-SPEC := nodemanager-lib.spec
223 ALL += nodemanager-lib
224 IN_NODEIMAGE += nodemanager-lib
225
226 nodemanager-lxc-MODULES := nodemanager
227 nodemanager-lxc-SPEC := nodemanager-lxc.spec
228 ALL += nodemanager-lxc
229 IN_NODEIMAGE += nodemanager-lxc
230
231 #
232 # pl_sshd
233 #
234 sshd-MODULES := pl_sshd
235 sshd-SPEC := pl_sshd.spec
236 ALL += sshd
237 IN_NODEIMAGE += sshd
238
239 #
240 # codemux: Port 80 demux
241 #
242 codemux-MODULES := codemux
243 codemux-SPEC   := codemux.spec
244 ALL += codemux
245 IN_NODEIMAGE += codemux
246
247 #
248 # fprobe-ulog
249 #
250 fprobe-ulog-MODULES := fprobe-ulog
251 fprobe-ulog-SPEC := fprobe-ulog.spec
252 ALL += fprobe-ulog
253 IN_NODEIMAGE += fprobe-ulog
254
255 #################### libvirt version selection
256 # settling with using version 1.2.1 on all fedoras
257 # although this does not solve the slice re-creation issue seen on f20
258
259 local_libvirt=true
260 separate_libvirt_python=true
261
262 #
263 # libvirt
264 #
265 ifeq "$(local_libvirt)" "true"
266
267 libvirt-MODULES := libvirt
268 libvirt-SPEC    := libvirt.spec
269 libvirt-BUILD-FROM-SRPM := yes
270 # The --without options are breaking spec2make : hard-wired in the specfile instead
271 libvirt-STOCK-DEVEL-RPMS += xhtml1-dtds gettext gettext-devel libtasn1-devel gnutls-devel 
272 libvirt-STOCK-DEVEL-RPMS += libattr-devel augeas libpciaccess-devel yajl-devel 
273 libvirt-STOCK-DEVEL-RPMS += libpcap-devel radvd ebtables device-mapper-devel 
274 libvirt-STOCK-DEVEL-RPMS += ceph-devel numactl-devel libcap-ng-devel scrub 
275 # for 1.2.1 - first seen on f20, not sure for the other ones
276 libvirt-STOCK-DEVEL-RPMS += libblkid-devel glusterfs-api-devel glusterfs-devel
277 # strictly speaking fuse-devel is not required anymore but we might wish to turn fuse back on again in the future
278 libvirt-STOCK-DEVEL-RPMS += fuse-devel libssh2-devel dbus-devel numad 
279 libvirt-STOCK-DEVEL-RPMS += systemd-devel libnl3-devel iptables-ipv6 libgcrypt-devel netcf-devel
280 ALL += libvirt
281 IN_NODEREPO += libvirt
282 IN_NODEIMAGE += libvirt
283
284 endif
285
286 #
287 ## libvirt-python
288 #
289 ifeq "$(separate_libvirt_python)" "true"
290
291 libvirt-python-MODULES := libvirt-python
292 libvirt-python-SPEC    := libvirt-python.spec
293 libvirt-python-BUILD-FROM-SRPM := yes
294 libvirt-python-STOCK-DEVEL-RPMS += gnutls-utils nc pm-utils 
295 libvirt-python-LOCAL-DEVEL-RPMS += libvirt-devel libvirt-docs libvirt-client
296 libvirt-python-RPMFLAGS :=     --define 'packager PlanetLab'
297 ALL += libvirt-python
298 IN_NODEREPO += libvirt-python
299 IN_NODEIMAGE += libvirt-python
300
301 endif
302
303 #
304 # DistributedRateLimiting
305 #
306 #DistributedRateLimiting-MODULES := DistributedRateLimiting
307 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
308 #ALL += DistributedRateLimiting
309 #IN_NODEREPO += DistributedRateLimiting
310
311 #
312 # pf2slice
313 #
314 pf2slice-MODULES := pf2slice
315 pf2slice-SPEC := pf2slice.spec
316 ALL += pf2slice
317
318 ##
319 ## PlanetLab Mom: Cleans up your mess
320 ##
321 #mom-MODULES := mom
322 #mom-SPEC := pl_mom.spec
323 #ALL += mom
324 #IN_NODEIMAGE += mom
325
326 #
327 # openvswitch
328 #
329 # openvswitch-MODULES := openvswitch
330 # openvswitch-SPEC := openvswitch.spec
331 # openvswitch-STOCK-DEVEL-RPMS += kernel-devel
332 # IN_NODEIMAGE += openvswitch
333 # # build only on f14 as f16 has this natively
334 # ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14)"
335 # ALL += openvswitch
336 # endif
337
338 #
339 # vsys
340 #
341 vsys-MODULES := vsys
342 vsys-SPEC := vsys.spec
343 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
344 vsys-STOCK-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
345 IN_NODEIMAGE += vsys
346 ALL += vsys
347
348 #
349 # vsyssh : installed in slivers
350 #
351 vsyssh-MODULES := vsys
352 vsyssh-SPEC := vsyssh.spec
353 IN_SLICEIMAGE += vsyssh
354 ALL += vsyssh
355
356 #
357 # vsys-scripts
358 #
359 vsys-scripts-MODULES := vsys-scripts
360 vsys-scripts-SPEC := root-context/vsys-scripts.spec
361 IN_NODEIMAGE += vsys-scripts
362 ALL += vsys-scripts
363
364 #
365 # bind_public
366 #
367 bind_public-MODULES := bind_public
368 bind_public-SPEC := bind_public.spec
369 IN_SLICEIMAGE += bind_public
370 ALL += bind_public
371
372 #
373 # sliver-openvswitch
374 #
375 sliver-openvswitch-MODULES := sliver-openvswitch
376 sliver-openvswitch-SPEC := sliver-openvswitch.spec
377 IN_SLICEIMAGE += sliver-openvswitch
378 ALL += sliver-openvswitch
379
380 #
381 # plcapi
382 #
383 plcapi-MODULES := plcapi
384 plcapi-SPEC := plcapi.spec
385 ALL += plcapi
386 IN_MYPLC += plcapi
387
388 #
389 # drupal
390
391 drupal-MODULES := drupal
392 drupal-SPEC := drupal.spec
393 drupal-BUILD-FROM-SRPM := yes
394 ALL += drupal
395 IN_MYPLC += drupal
396
397 #
398 # use the plewww module instead
399 #
400 plewww-MODULES := plewww
401 plewww-SPEC := plewww.spec
402 ALL += plewww
403 IN_MYPLC += plewww
404
405 #
406 # www-register-wizard
407 #
408 www-register-wizard-MODULES := www-register-wizard
409 www-register-wizard-SPEC := www-register-wizard.spec
410 ALL += www-register-wizard
411 IN_MYPLC += www-register-wizard
412
413 #
414 # pcucontrol
415 #
416 pcucontrol-MODULES := pcucontrol
417 pcucontrol-SPEC := pcucontrol.spec
418 ALL += pcucontrol
419
420 #
421 # monitor
422 #
423 #monitor-MODULES := monitor
424 #monitor-SPEC := Monitor.spec
425 #monitor-STOCK-DEVEL-RPMS += net-snmp net-snmp-devel
426 #ALL += monitor
427 #IN_NODEIMAGE += monitor
428
429 #
430 # PLC RT
431 #
432 plcrt-MODULES := PLCRT
433 plcrt-SPEC := plcrt.spec
434 ALL += plcrt
435
436 # f12 has 0.9-1 already
437 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
438 #
439 # pyopenssl
440 #
441 pyopenssl-MODULES := pyopenssl
442 pyopenssl-SPEC := pyOpenSSL.spec
443 pyopenssl-BUILD-FROM-SRPM := yes
444 ALL += pyopenssl
445 endif
446
447 #
448 # pyaspects
449 #
450 pyaspects-MODULES := pyaspects
451 pyaspects-SPEC := pyaspects.spec
452 pyaspects-BUILD-FROM-SRPM := yes
453 ALL += pyaspects
454
455 #
456 # nodeconfig
457 #
458 nodeconfig-MODULES := nodeconfig
459 nodeconfig-SPEC := nodeconfig.spec
460 ALL += nodeconfig
461 IN_MYPLC += nodeconfig
462
463 #
464 # bootmanager
465 #
466 bootmanager-MODULES := bootmanager
467 bootmanager-SPEC := bootmanager.spec
468 ALL += bootmanager
469 IN_MYPLC += bootmanager
470
471 #
472 # pypcilib : used in bootcd
473
474 pypcilib-MODULES := pypcilib
475 pypcilib-SPEC := pypcilib.spec
476 ALL += pypcilib
477 IN_BOOTCD += pypcilib
478
479 #
480 # pyplnet
481 #
482 pyplnet-MODULES := pyplnet
483 pyplnet-SPEC := pyplnet.spec
484 ALL += pyplnet
485 IN_NODEIMAGE += pyplnet
486 IN_MYPLC += pyplnet
487 IN_BOOTCD += pyplnet
488
489 #
490 # for OMF resource controller as a gem : rvm-ruby has right version of ruby and related gem stuff
491 #
492 ifneq "$(DISTRONAME)" "$(filter $(DISTRONAME),f18 f20)"
493 rvm-ruby-MODULES := rvm-ruby
494 rvm-ruby-SPEC := rpm/rvm-ruby.spec
495 rvm-ruby-STOCK-DEVEL-RPMS := chrpath libyaml-devel libffi-devel libxslt-devel
496 # Since Oct 22. 2013, f18 has a new release of openssl that ruby is not too happy to build against
497 # turning this off for now, Christoph Dwertmann to monitor the status of this bug/incompatibility upstream
498 ALL += rvm-ruby
499 endif
500
501 #
502 # OML measurement library
503 #
504 oml-MODULES := oml
505 oml-STOCK-DEVEL-RPMS += sqlite-devel 
506 oml-SPEC := liboml.spec
507 ALL += oml
508
509 #
510 # bootcd
511 #
512 bootcd-MODULES := bootcd build
513 bootcd-SPEC := bootcd.spec
514 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
515 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
516 bootcd-RPMDATE := yes
517 ALL += bootcd
518 IN_MYPLC += bootcd
519
520 #
521 # images for slices
522 #
523 sliceimage-MODULES := sliceimage build
524 sliceimage-SPEC := sliceimage.spec
525 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
526 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
527 sliceimage-RPMDATE := yes
528 ALL += sliceimage
529 IN_NODEIMAGE += sliceimage
530
531 #
532 # lxc-specific sliceimage initialization
533
534 lxc-sliceimage-MODULES  := sliceimage
535 lxc-sliceimage-SPEC     := lxc-sliceimage.spec
536 lxc-sliceimage-RPMDATE  := yes
537 ALL                     += lxc-sliceimage
538 IN_NODEIMAGE            += lxc-sliceimage
539
540 #
541 # nodeimage
542 #
543 nodeimage-MODULES := nodeimage build
544 nodeimage-SPEC := nodeimage.spec
545 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
546 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
547 nodeimage-RPMDATE := yes
548 ALL += nodeimage
549 IN_MYPLC += nodeimage
550
551 #
552 # noderepo
553 #
554 # all rpms resulting from packages marked as being in nodeimage and sliceimage
555 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
556 # replace space with +++ (specvars cannot deal with spaces)
557 SPACE=$(subst x, ,x)
558 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
559
560 noderepo-MODULES := nodeimage
561 noderepo-SPEC := noderepo.spec
562 # package requires all embedded packages
563 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
564 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
565 #export rpm list to the specfile
566 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
567 noderepo-RPMDATE := yes
568 ALL += noderepo
569 IN_MYPLC += noderepo
570
571 #
572 # slicerepo
573 #
574 # all rpms resulting from packages marked as being in vserver
575 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
576 # replace space with +++ (specvars cannot deal with spaces)
577 SPACE=$(subst x, ,x)
578 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
579
580 slicerepo-MODULES := nodeimage
581 slicerepo-SPEC := slicerepo.spec
582 # package requires all embedded packages
583 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
584 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
585 #export rpm list to the specfile
586 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
587 slicerepo-RPMDATE := yes
588 ALL += slicerepo
589
590 #
591 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
592 #
593 myplc-MODULES := myplc
594 myplc-SPEC := myplc.spec
595 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
596 ALL += myplc
597
598 # myplc-docs only contains docs for PLCAPI and NMAPI, but
599 # we still need to pull MyPLC, as it is where the specfile lies, 
600 # together with the utility script docbook2drupal.sh
601 myplc-docs-MODULES := myplc plcapi nodemanager monitor
602 myplc-docs-SPEC := myplc-docs.spec
603 ALL += myplc-docs
604
605 # using some other name than myplc-release, as this is a make target already
606 release-MODULES := myplc
607 release-SPEC := myplc-release.spec
608 release-RPMDATE := yes
609 ALL += release
610
611 ##############################
612 #
613 # sfa - Slice Facility Architecture
614 #
615 sfa-MODULES := sfa
616 sfa-SPEC := sfa.spec
617 ALL += sfa