software.cfg 1.68 KB
Newer Older
1 2 3 4 5 6 7 8
[buildout]
extends =
    ../../stack/slapos.cfg
    ../../component/rina-tools/buildout.cfg
parts =
    slapos-cookbook
    template

9 10 11 12 13 14 15 16
[file]
# For old GCC like 4.9.2 on Debian 8.
# XXX: This should be moved to component/rina-tools/buildout.cfg, next to where
#      we force use of system GCC. However, our buildout patches are still not
#      perfect concerning the processing of +=
environment +=
  CFLAGS=-std=c99 -g -O2

17 18 19
[template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
20
md5sum = d7506e861ef87977eaa554b8928d2c99
21 22 23 24 25 26 27 28
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key rina_tools_location rina-tools:location
    key instance_root instance-root:target
    key instance_server instance-server:target
29
    key rina_proxy proxy:location
30 31 32 33 34 35 36

[download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in

[instance-root]
<= download-base
37
md5sum = 1c0e222aab51dfc598094e972f1d1482
38 39 40 41 42 43

[instance-server]
<= download-base
md5sum = 88a451b0f7f8def12713b92b91659b98

[proxy]
44 45
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:_buildout_section_name_}
46 47
url = ${:_profile_base_location_}/${:_buildout_section_name_}
md5sum = 78b77a6bda9958f547f7d89b747731e3
48 49 50 51 52 53 54 55
install =
  import os, sys
  with open(self.download(options['url'], options['md5sum'])) as src, \
       open(options['location'], 'w') as dst:
    os.fchmod(dst.fileno(), 0o755)
    src.readline()
    dst.write('#!%s\n' % sys.executable)
    dst.write(src.read())