Commit 22a41ae2 authored by Jérome Perrin's avatar Jérome Perrin

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

parents 814747a2 0cf70a6e
...@@ -81,6 +81,18 @@ md5sum = 4476707f05cf6915ec1173038dc357a9 ...@@ -81,6 +81,18 @@ md5sum = 4476707f05cf6915ec1173038dc357a9
environment-extra = environment-extra =
GOROOT_BOOTSTRAP=${golang14:location} GOROOT_BOOTSTRAP=${golang14:location}
[golang1.18]
<= golang-common
url = https://golang.org/dl/go1.18.9.src.tar.gz
md5sum = e2caa7c4de49aa77a14c694bfc9a5cd1
# go1.18 needs go1.4 or go1.17 to bootstrap.
# We use go1.4 to reduce the amount of components which
# need to be installed. See following note for rationale:
# https://lab.nexedi.com/nexedi/slapos/merge_requests/1305#note_174936
environment-extra =
GOROOT_BOOTSTRAP=${golang14:location}
# ---- infrastructure to build Go workspaces / projects ---- # ---- infrastructure to build Go workspaces / projects ----
# gowork is the top-level section that defines Go workspace. # gowork is the top-level section that defines Go workspace.
...@@ -140,7 +152,7 @@ bin = ${gowork.dir:bin} ...@@ -140,7 +152,7 @@ bin = ${gowork.dir:bin}
depends = ${gowork.goinstall:recipe} depends = ${gowork.goinstall:recipe}
# go version used for the workspace (possible to override in applications) # go version used for the workspace (possible to override in applications)
golang = ${golang1.17:location} golang = ${golang1.18:location}
# no special build flags by default # no special build flags by default
buildflags = buildflags =
......
...@@ -50,6 +50,8 @@ revision = v1.17.3-0-g24a552b90b ...@@ -50,6 +50,8 @@ revision = v1.17.3-0-g24a552b90b
[gowork] [gowork]
# Fails with current default golang1.18
golang = ${golang1.17:location}
install = install =
${go_github.com_grafana_loki:location}:./cmd/loki ${go_github.com_grafana_loki:location}:./cmd/loki
${go_github.com_grafana_loki:location}:./cmd/promtail ${go_github.com_grafana_loki:location}:./cmd/promtail
......
...@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04 ...@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = a75e8cf8fd664de164a88a680ddd2c9e md5sum = 74979d6743cdc7ce3d2f17680115458d
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
...@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8 ...@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8
[instance-wcfs.cfg.in] [instance-wcfs.cfg.in]
filename = instance-wcfs.cfg.in filename = instance-wcfs.cfg.in
md5sum = eb4be2669a9a56187cc4366272e11d18 md5sum = 0f921643a68e3a8de5529d653710ddca
{# instance that runs WCFS service associated with ZODB storage #} {# instance that runs WCFS service associated with ZODB storage #}
{% from "instance_zodb_base" import zodb_dict with context %} {% from "instance_zodb_base" import zodb_dict with context %}
{# q(text) returns urllib.quote_plus(text) #}
{% macro q(text) %}{{ urllib_parse.quote_plus(text) }}{% endmacro %}
{# build zurl to connect to configured ZODB #} {# build zurl to connect to configured ZODB #}
{% if len(zodb_dict) != 1 -%} {% if len(zodb_dict) != 1 -%}
...@@ -12,15 +14,18 @@ ...@@ -12,15 +14,18 @@
{% if zodb['type'] == 'zeo' -%} {% if zodb['type'] == 'zeo' -%}
{% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%} {% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%}
{% elif zodb['type'] == 'neo' -%} {% elif zodb['type'] == 'neo' -%}
{% set zurl = ('neo://%s@%s' % (z.pop('name'), z.pop('master_nodes'))) -%} {# neo(s)://[credentials@]master1,master2,...,masterN/name?options #}
{% set argv = [] -%} {# (see https://lab.nexedi.com/kirr/neo/blob/3e13fa06/go/neo/client.go#L417) #}
{% set i = 0 -%} {# If 'ca' in storage-dict, ssl is true. #}
{% for k,v in z|dictsort -%} {# (see https://lab.nexedi.com/nexedi/slapos/blob/397726e1/stack/erp5/instance-zodb-base.cfg.in#L17-21) #}
{% do argv.append('%s=%s' % (k,v)) -%} {% if "ca" in z -%}
{% endfor -%} {# ca=ca.crt;cert=my.crt;key=my.key (see https://lab.nexedi.com/kirr/neo/blob/3e13fa06/go/neo/client.go#L428) #}
{% if len(argv) > 0 -%} {% set zurl = 'neos://ca=%s;cert=%s;key=%s@' % (q(z.pop("ca")), q(z.pop("cert")), q(z.pop("key"))) -%}
{% set zurl = zurl + '&' + '?'.join(argv) -%} {% else -%}
{% set zurl = 'neo://' -%}
{% endif -%} {% endif -%}
{% set zurl = ('%s%s/%s' % (zurl, z.pop('master_nodes'), z.pop('name'))) -%}
{% set zurl = zurl + '?' + (z | dictsort | urlencode) -%}
{% else -%} {% else -%}
{% do assert(False, ("unsupported ZODB type", zodb)) -%} {% do assert(False, ("unsupported ZODB type", zodb)) -%}
{% endif -%} {% endif -%}
......
...@@ -206,6 +206,7 @@ url = {{ instance_wcfs_cfg_in }} ...@@ -206,6 +206,7 @@ url = {{ instance_wcfs_cfg_in }}
filename = instance_wcfs.cfg filename = instance_wcfs.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-zope-parameters section parameter_dict dynamic-template-zope-parameters
import urllib_parse six.moves.urllib.parse
import-list = import-list =
file instance_zodb_base context:template-zodb-base file instance_zodb_base context:template-zodb-base
......
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