Commit ac651b3b authored by Jérome Perrin's avatar Jérome Perrin

Merge remote-tracking branch 'upstream/master' into zope4py3

parents b13d20e9 a212dbb0
Pipeline #34487 failed with stage
in 0 seconds
......@@ -50,7 +50,10 @@ patches = ${python2.7-lib-patches:patches}
url =
http://www.python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
pre-configure =
sed -i -e "s/if 'curses' in ln:/if 'curses' in ln.split()[0]:/" setup.py
sed -i \
-e "s/if 'curses' in ln:/if 'curses' in ln.split()[0]:/" \
-e '/"SQLITE_OMIT_LOAD_EXTENSION"/s/^/#/' \
setup.py
configure-options =
--enable-ipv6
--enable-unicode=ucs4
......
......@@ -34,6 +34,7 @@ pre-configure =
sed -i -e "s/if 'curses' in ln:/if 'curses' in ln.split()[0]:/" setup.py
configure-options =
--enable-ipv6
--enable-loadable-sqlite-extensions
--without-ensurepip
--with-system-expat
--with-system-ffi
......
......@@ -16,11 +16,14 @@ md5sum = 79f2507907721b770cbec98195cecece
configure-options =
--disable-static
--disable-tcl
--enable-readline
--enable-update-limit
--with-readline-inc=-I${readline:location}/include
post-install =
gcc -I%(location)s/include -fPIC -shared ext/misc/cksumvfs.c -o %(location)s/lib/cksumvfs.so
# Increase MAX_VARIABLE_NUMBER like many os. For example:
# https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/sqlite
# NEO needs SQLITE_ENABLE_UPDATE_DELETE_LIMIT to drop partitions.
environment =
CPPFLAGS=-I${readline:location}/include -I${ncurses:location}/include -I${zlib:location}/include -DSQLITE_MAX_VARIABLE_NUMBER=250000 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
LDFLAGS=-L@@LOCATION@@ -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline:location}/lib -L${ncurses:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
CPPFLAGS=-I${zlib:location}/include -DSQLITE_MAX_VARIABLE_NUMBER=250000
LDFLAGS=-Wl,-rpath=@@LOCATION@@/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PATH=${tcl:location}/bin:${xz-utils:location}/bin:%(PATH)s
......@@ -24,8 +24,8 @@ min_version = 8
[trafficserver]
recipe = slapos.recipe.cmmi
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.2.3.tar.bz2
md5sum = 5e37ec924667052d655de2ebab98ad3f
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.2.4.tar.bz2
md5sum = 5a889ba1be6f325e4b523df85616f30b
shared = true
patch-options = -p1
configure-options =
......
[yappi]
recipe = zc.recipe.egg:custom
egg = yappi
[versions]
yappi = 1.5.1
......@@ -27,7 +27,6 @@ keep_log_days = %(keep_log_days)s
# Binaries
git_binary = %(git_binary)s
slapos_binary = %(slapos_binary)s
zip_binary = %(zip_binary)s
[environment]
PATH = %(PATH)s
......
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "Values returned by Fluentd instantiation",
"additionalProperties": false,
"properties": {},
"type": "object"
}
......@@ -7,6 +7,7 @@
"title": "Default",
"description": "Fluentd",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
}
}
......
......@@ -14,7 +14,7 @@
# not need these here).
[instance-common]
filename = instance-common.cfg.in
md5sum = e000e7134113b9d1c63d40861eaf0489
md5sum = ecc98da90cd446ea224ddeece1374190
[root-common]
filename = root-common.cfg.in
......@@ -30,7 +30,7 @@ md5sum = 9f27195d770b2f57461c60a82c851ab9
[instance-neo]
filename = instance-neo.cfg.in
md5sum = fda911d5ef9efee365f1b0ff9843a50b
md5sum = 200ae55715cb735b0f97f8c835a3071f
[template-neo-my-cnf]
filename = my.cnf.in
......
......@@ -41,6 +41,7 @@ url = {{ neo_master }}
<= jinja2-template-base
url = {{ neo }}
extra-context =
import urllib urllib
key master_cfg neo-master:output
key admin_cfg neo-admin:output
{%- if mariadb_location is defined %}
......
......@@ -110,14 +110,6 @@
"default": false,
"type": "boolean"
},
"storage-type": {
"description": "Storage type. Defaults to MySQL if available, else SQLite.",
"enum": [
"MySQL",
"SQLite"
],
"type": "string"
},
"private-tmpfs": {
"description": "Size of private tmpfs mount to store the database. See filesystems/tmpfs.txt in Linux documentation. Use only for testing.",
"type": "string"
......@@ -126,24 +118,50 @@
"description": "List of bindings to test when running the test suite.",
"type": "array"
},
"storage-type": {
"description": "Storage type. Required when several types are configured and you select which one to use via 'node!' parameter. Defaults to whatever is configured ('sqlite' or 'mysql'), else MySQL if available, else SQLite.",
"enum": [
"MySQL",
"SQLite"
],
"type": "string"
},
"sqlite": {
"description": "Storage backend configuration.",
"properties": {
"relaxed-writes": {
"description": "When enabled, sets synchronous = OFF and journal_mode = MEMORY - RTFM, those options are dangerous.",
"default": false,
"type": "boolean"
}
},
"additionalProperties": {
"description": "See NEO documentation for the list of supported settings.",
"type": ["number", "string"]
},
"type": "object"
},
"mysql": {
"description": "Dictionary containing parameters for MySQL.",
"default": {},
"description": "MariaDB server configuration.",
"properties": {
"relaxed-writes": {
"description": "When enabled, sets innodb_flush_log_at_trx_commit = 0, innodb_flush_method = nosync, innodb_doublewrite = 0 and sync_frm = 0 - RTFM, those options are dangerous",
"description": "When enabled, sets innodb_flush_log_at_trx_commit = 0, innodb_flush_method = nosync, innodb_doublewrite = 0 and sync_frm = 0 - RTFM, those options are dangerous.",
"default": false,
"type": "boolean"
}
},
"additionalProperties": {
"description": "To configure important parameters like innodb_buffer_pool_size, rocksdb_block_cache_size, etc.",
"type": "string"
"description": "To configure parameters like innodb_buffer_pool_size, rocksdb_block_cache_size, etc.",
"type": ["number", "string"]
},
"type": "object"
},
"engine": {
"description": "Configures storage engine, currently only InnoDB and RocksDB are supported. Defaults to NEO's default.",
"description": "[MySQL only] For NEO, this is a creation-time parameter and it defaults to NEO's default. For mysqld, this sets plugins to load and it defaults to load all.",
"enum": [
"InnoDB",
"RocksDB"
],
"type": "string"
}
},
......
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set part_list = [] -%}
{% set init_list = [] -%}
{% set directory_dict = {} -%}
{% set private_tmpfs = slapparameter_dict.get('private-tmpfs') -%}
{% set storage_count = slapparameter_dict.get('storage-count', 1) -%}
{% set storage_type = slapparameter_dict.get('storage-type') or (
'MySQL' if mariadb_location is defined else 'SQLite') -%}
{% set mysql = storage_count and storage_type != 'SQLite' -%}
{# When mixing different storage types via node specialisation
('node!' parameter), it can be convenient to configure all types in the
common 'node' parameter and then switch between the 2 with 'storage-type'.
So we must be quite tolerant. -#}
{% if storage_count -%}
{% if 'mysql' in slapparameter_dict -%}
{% if 'sqlite' in slapparameter_dict -%}
{% set storage_type = slapparameter_dict['storage-type'] -%}
{% else -%}
{% set storage_type = 'MySQL' -%}
{% endif -%}
{% elif 'sqlite' in slapparameter_dict -%}
{% set storage_type = 'SQLite' -%}
{% else -%}
{% set storage_type = slapparameter_dict.get('storage-type') or (
'MySQL' if mariadb_location is defined else 'SQLite') -%}
{% endif -%}
{% do assert(slapparameter_dict.get('storage-type', storage_type) == storage_type) -%}
{% else -%}
{% set storage_type = '' -%}
{% endif -%}
{% set mysql = storage_type == 'MySQL' -%}
{% if mysql -%}
{% set extra_dict = slapparameter_dict.get('mysql') or {} -%}
[{{ section('mysqld') }}]
{% if private_tmpfs -%}
......@@ -37,7 +59,7 @@ tmp-directory = ${directory:tmp}
pid-file = ${directory:var_run}/mariadb.pid
error-log = ${directory:log}/mariadb_error.log
slow-query-log = ${directory:log}/mariadb_slowquery.log
extra-dict = {{ dumps(slapparameter_dict.get('mysql', {})) }}
extra-dict = {{ dumps(extra_dict) }}
init-file = ${init-script:output}
engine = {{ slapparameter_dict.get('engine', '') }}
......@@ -54,6 +76,18 @@ command-line = '{{ mariadb_location }}/bin/${:command}' --defaults-file="${my-cn
wrapper-path = ${directory:bin}/${:command}
command = mysql
{% elif storage_type == 'SQLite' -%}
{% set extra_dict = slapparameter_dict.get('sqlite') or {} -%}
{% if extra_dict.pop('relaxed-writes', False) -%}
{% do extra_dict.setdefault('synchronous', 'OFF') -%}
{% do extra_dict.setdefault('journal_mode', 'MEMORY') -%}
{% endif -%}
{% set query_string = urllib.urlencode(extra_dict) -%}
{% else -%}
{% do assert(not storage_count) -%}
{% endif -%}
[{{ section('binary-neolog') }}]
......@@ -123,14 +157,19 @@ logfile = ${directory:log}/{{ 'neostorage-' ~ i }}.log
{%- if mysql %}
{%- do init_list.append('CREATE DATABASE IF NOT EXISTS neo' ~ i ~ ';') %}
database-parameters = root@neo{{ i }}${my-cnf-parameters:socket}
{%- elif private_tmpfs %}
private-tmpfs = {{ private_tmpfs }} ${directory:tmp}
database-parameters = ${directory:tmp}/db.sqlite
{%- else %}
database-parameters = ${directory:db-{{i}}}/db.sqlite
[directory]
db-{{i}} = ${:srv}/{{ storage_id }}
{%- if private_tmpfs %}
private-tmpfs = {{ private_tmpfs }} ${directory:tmp}
{%- set path = '${directory:tmp}/db.sqlite' %}
{%- else %}
{%- set path = '${directory:db-' ~ i ~ '}/db.sqlite' %}
{%- do directory_dict.__setitem__('db-' ~ i, '${:srv}/' + storage_id) %}
{%- endif %}
{%- if query_string %}
database-parameters = file:{{ path }}?{{ query_string }}
{%- else %}
database-parameters = {{ path }}
{%- endif -%}
{%- endif %}
[{{ section('logrotate-storage-' ~ i) }}]
......@@ -141,17 +180,6 @@ post = {{ bin_directory }}/slapos-kill -s RTMIN+1 -- {{ bin_directory }}/neostor
{% endfor -%}
[directory]
recipe = slapos.cookbook:mkdirectory
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
var = ${buildout:directory}/var
etc_run = ${:etc}/run
var_run = ${:var}/run
log = ${buildout:directory}/var/log
tmp = ${buildout:directory}/tmp
srv = ${buildout:directory}/srv
{% if mysql -%}
[init-script]
recipe = slapos.recipe.template
......@@ -196,13 +224,26 @@ context =
key datadir my-cnf-parameters:data-directory
key results_directory directory:results
[directory]
results = ${directory:srv}/tests
{%- do directory_dict.__setitem__('results', '${directory:srv}/tests') %}
{%- endif %}
{%- endif %}
{%- endif %}
[directory]
recipe = slapos.cookbook:mkdirectory
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
var = ${buildout:directory}/var
etc_run = ${:etc}/run
var_run = ${:var}/run
log = ${buildout:directory}/var/log
tmp = ${buildout:directory}/tmp
srv = ${buildout:directory}/srv
{%- for k, v in directory_dict.iteritems() %}
{{ k }} = {{ v }}
{%- endfor %}
[buildout]
extends =
{{ logrotate_cfg }}
......
......@@ -18,6 +18,7 @@ extends =
../../component/python-mysqlclient/buildout.cfg
../../component/python-cryptography/buildout.cfg
../../component/pycurl/buildout.cfg
../../component/yappi/buildout.cfg
../../component/ZODB/buildout.cfg
../../component/ZEO/buildout.cfg
../../component/zodbtools/buildout.cfg
......@@ -55,6 +56,7 @@ eggs = neoppod[admin, ctl, master]
${cython-zstd:egg}
${msgpack-python:egg}
${:adapter-egg}
${yappi:egg}
${ZODB:egg}
${zodbtools:egg}
psutil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment