...
 
Commits (36)
root = true
[*.{cfg,in,md,json}]
[*.{cfg,in,md,json,py}]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
[**.json]
[*.{json,py}]
indent_style = space
indent_size = 2
......
......@@ -76,7 +76,7 @@ configure-options = --disable-static
--with-z=${zlib:location}
--with-expat=${libexpat:location}
--with-libxml2=${libxml2:location}/include/libxml2
--with-pcre=${pcre:location}
--with-pcre=${pcre:location}/bin/pcre-config
--with-sqlite3=${sqlite3:location}
--with-gdbm=${gdbm:location}
--with-nghttp2=${nghttp2:location}
......
[buildout]
extends =
../attr/buildout.cfg
parts = libcap-ng
[libcap-ng]
recipe = slapos.recipe.cmmi
shared = true
url = https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-0.8.2.tar.gz
#url = https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${:version}.tar.gz
# ERROR: The certificate of 'people.redhat.com' doesn't have a known issuer.
url = http://sources.buildroot.net/libcap-ng/libcap-ng-${:version}.tar.gz
version = 0.8.2
md5sum = faf1ef766cf068ad1aba4008ced665f7
location = @@LOCATION@@
configure-options =
--with-python=no
--with-python3=no
......
[buildout]
extends =
../pygolang/buildout.cfg
[virtual-env-base]
recipe = slapos.recipe.build
_name = ${:_buildout_section_name_}
init =
from zc.buildout.easy_install import working_set
import os
name = options['_name']
eggs = options['eggs']
try:
scripts = "scripts = " + options['scripts']
except KeyError:
scripts = ""
self.buildout.parse("""
[.%(name)s.install-eggs]
recipe = zc.recipe.egg
eggs = %(eggs)s
%(scripts)s
[.%(name)s.install-interpreter]
<= python-interpreter
eggs += %(eggs)s
""" % locals())
install =
with open(location, "w") as f:
f.write(options['template'] % {
"path" : self.buildout['buildout']['bin-directory'],
"name" : self.name,
})
# Template virtual env for bash shell in posix
[virtual-env-base:posix]
template =
deactivate () {
set PATH PS1
while [ "$1" ]; do
eval "if [ \"\$_OLD_VENV_$1\" ]; then $1=\$_OLD_VENV_$1; else unset $1; fi; unset \$_OLD_VENV_$1"
shift
done
unset -f deactivate
}
VENV_PATH=%(path)s
_OLD_VENV_PATH=$PATH
_OLD_VENV_PS1=$PS1
PATH=$VENV_PATH:$PATH
PS1='(%(name)s) '$PS1
......@@ -81,7 +81,7 @@ environment =
PATH=${patch:location}/bin:%(PATH)s
patch-options = -p1
patches =
https://sources.debian.org/data/main/m/mariadb-10.3/1:10.3.22-0+deb10u1/debian/patches/0024-Revert-to-using-system-pcre-library.patch#1c6a0f2634f5a56122299674b77b1131
https://sources.debian.org/data/main/m/mariadb-10.3/1:10.3.34-0+deb10u1/debian/patches/0024-Revert-to-using-system-pcre-library.patch#1c6a0f2634f5a56122299674b77b1131
post-install =
ldd=`ldd %(location)s/lib/plugin/ha_rocksdb.so`
for x in ${lz4:location} ${snappy:location} ${zstd:location}
......
......@@ -7,7 +7,7 @@ parts =
[pcre]
recipe = slapos.recipe.cmmi
shared = true
url = https://download.sourceforge.net/pcre/pcre/8.45/pcre-8.45.tar.bz
url = https://download.sourceforge.net/pcre/pcre/8.45/pcre-8.45.tar.bz2
md5sum = 4452288e6a0eefb2ab11d36010a1eebb
configure-options =
--disable-static
......
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '1.0.226'
version = '1.0.237'
name = 'slapos.cookbook'
long_description = open("README.rst").read()
......
......@@ -24,7 +24,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from urlparse import urlparse
from six.moves.urllib.parse import urlparse
from slapos.recipe.librecipe import GenericBaseRecipe
......
......@@ -8,7 +8,7 @@ import pytz
def updateMysql(mysql_upgrade_binary, mysql_binary, mysql_script_file):
sleep = 0
with open(mysql_script_file, 'rb') as script_file:
with open(mysql_script_file, 'r') as script_file:
mysql_script = script_file.read()
mysql_list = mysql_binary, '-B'
mysql_tzinfo_to_sql_list = (
......
import unittest
import zc.buildout.testing
class UrlparseTest(unittest.TestCase):
def setUp(self):
self.buildout = buildout = zc.buildout.testing.Buildout()
buildout['urlinfo'] = {}
buildout['urlinfo']['url'] = "http://www.google.com/search?hl=en&q=urlparse&btnG=Google+Search"
from slapos.recipe import _urlparse
self.recipe = _urlparse.Recipe(buildout,"urlinfo",buildout['urlinfo'])
def test_options(self):
buildout = self.buildout
self.assertTrue(buildout['urlinfo'])
self.assertEqual(buildout['urlinfo']['path'], 'search')
self.assertEqual(buildout['urlinfo']['scheme'], 'http')
self.assertEqual(buildout['urlinfo']['host'], 'www.google.com')
self.assertEqual(buildout['urlinfo']['query'], 'hl=en&q=urlparse&btnG=Google+Search')
def test_install(self):
self.assertEqual(self.recipe.install(), [])
......@@ -6674,6 +6674,9 @@ class TestPassedRequestParameter(HttpFrontendTestCase):
're6st-verification-url': 're6st-verification-url',
'request-timeout': '100',
'root_instance_title': 'testing partition 0',
'slap_computer_id': 'local',
'slap_computer_partition_id': 'T-0',
'slap_software_release_url': base_software_url,
'slap_software_type': 'RootSoftwareInstance',
'slave_instance_list': []
}
......
[buildout]
extends =
../../stack/slapos.cfg
../../component/macros/virtual-env.cfg
parts =
instance
slapos-cookbook
[python]
part = python3
[django-env]
<= virtual-env-base
location = ${buildout:directory}/activate
eggs = Django
[instance]
recipe = slapos.recipe.template
output = ${buildout:directory}/instance.cfg
inline =
[buildout]
parts = publish
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
[publish]
recipe = slapos.cookbook:publish
activate-script = ${django-env:location}
[versions]
Django = 3.2.12
sqlparse = 0.4.2
pytz = 2021.3
asgiref = 3.3.2
typing-extensions = 4.1.1:whl
......@@ -71,7 +71,7 @@ stop-on-error = true
command = set -e
cd ${jio-repository.git:location}
PATH=${git:location}/bin:${nodejs:location}/bin:$PATH
${nodejs:location}/bin/npm install jslint@0.9.2 jison@0.4.16 git://github.com/qunitjs/node-qunit.git#v0.9.3 sinon@1.7.3
${nodejs:location}/bin/npm install jslint@0.9.2 jison@0.4.16 https://github.com/qunitjs/node-qunit.git#v0.9.3 sinon@1.7.3
make
update-command = ${:command}
......
......@@ -18,7 +18,7 @@ md5sum = 71531ed9c9b79fa769ab367e7ea2d2a5
[template-re6stnet]
filename = instance-re6stnet.cfg.in
md5sum = 98f86d2a10d909215ae88ba6a602da27
md5sum = a9cd303d17c4f07ad11fc8099afeed24
[template-apache-conf]
filename = apache.conf.in
......@@ -26,4 +26,4 @@ md5sum = 3d55f7c9c4fc7279f06bfe6313a78a4b
[template-re6st-registry-conf]
filename = re6st-registry.conf.in
md5sum = feb4b3318f37414d1bf3d16a03aec93d
md5sum = 28ffb7a742e293139814f1324ff003ff
......@@ -84,6 +84,11 @@
"title": "Git backup repository",
"description": "URL of Git repository where backups are pushed. Nothing is pushed if empty.",
"type": "string"
},
"community-conf": {
"title": "Community configuration",
"textarea": true,
"type": "string"
}
}
}
......@@ -83,6 +83,15 @@ hello = {{ slapparameter_dict.get('hello', 15) }}
min-protocol = {{ slapparameter_dict.get('min-protocol', -1) }}
encrypt = {{ slapparameter_dict.get('encrypt', 'False') }}
same-country = {{ slapparameter_dict.get('same-country', '') }}
{%- set community = slapparameter_dict.get('community-conf') %}
{%- if community %}
community-path = ${re6st-community-conf:output}
[re6st-community-conf]
recipe = slapos.recipe.template
inline = {{ dumps(community) }}
output = ${re6stnet-dirs:conf}/community.conf
{%- endif %}
[re6st-registry-conf]
recipe = slapos.recipe.template:jinja2
......@@ -90,20 +99,6 @@ template = {{ parameter_dict['template-re6st-registry-conf'] }}
rendered = ${re6stnet-dirs:conf}/registry.conf
context = section parameter_dict re6st-registry-conf-dict
depends = ${re6st-compat:recipe}
[re6st-compat]
recipe = slapos.recipe.build
update =
import errno, os
res6stnet = self.buildout['directory']['srv'] + '/res6stnet'
try:
os.rename(res6stnet + '/registry', self.buildout['re6stnet-dirs']['data'])
except OSError as e:
if e.errno != errno.ENOENT:
raise
else:
os.rmdir(res6stnet)
[re6st-registry-wrapper]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/re6st-registry
......
......@@ -30,3 +30,6 @@ max-clients {{ parameter_dict['max-clients'] }}
{% if parameter_dict.get('same-country') -%}
same-country {{ parameter_dict['same-country'] }}
{% endif -%}
{% if parameter_dict.get('community-path') -%}
community {{ parameter_dict['community-path'] }}
{% endif -%}
......@@ -6,6 +6,7 @@
"default": {
"title": "Default",
"description": "Re6st registry",
"serialisation": "json-in-xml",
"request": "instance-re6stnet-input-schema.json",
"response": "instance-re6stnet-output-schema.json",
"index": 0
......
......@@ -15,7 +15,7 @@
[instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = 4df9f0d76a134a8abec9060a0c1be50b
md5sum = 00d15432c1486376d8ba7d0f5ec63c33
[instance]
_update_hash_filename_ = instance.cfg.in
......@@ -31,7 +31,7 @@ md5sum = b3f1dd83033d6a45def0bd26e70d5a9c
[instance-resilient]
_update_hash_filename_ = instance-resilient.cfg.jinja
md5sum = b1e338973bc9cfe1bb4e16d46b3c6da9
md5sum = ad9499e7355ded4975ad313442cecb7a
[theia-common]
_update_hash_filename_ = theia_common.py
......
......@@ -17,6 +17,10 @@
"backend-url": {
"description": "Theia Backend URL",
"type": "string"
},
"ipv6": {
"description": "A Theia ipv6 address",
"type": "string"
}
},
"type": "object"
......
......@@ -33,7 +33,7 @@ parts +=
# Ask for the connection parameters of the main theia
[request-theia]
return += url username password backend-url
return += url username password backend-url ipv6
# Publish connection parameters of the main theia and resiliency parameters
......@@ -43,6 +43,7 @@ url = ${request-theia:connection-url}
username = ${request-theia:connection-username}
password = ${request-theia:connection-password}
backend-url = ${request-theia:connection-backend-url}
ipv6 = ${request-theia:connection-ipv6}
monitor-base-url = ${monitor-publish:monitor-base-url}
monitor-setup-url = ${monitor-publish:monitor-setup-url}
<= publish-connection-information
......@@ -37,7 +37,7 @@ additional-url = $${remote-additional-frontend:connection-secure_access}
username = $${frontend-instance-password:username}
password = $${frontend-instance-password:passwd}
backend-url = $${frontend-instance:url}
ipv6 = {{ ipv6_random }}
[directory]
recipe = slapos.cookbook:mkdirectory
......@@ -353,7 +353,7 @@ template =
#!/bin/sh
export HOME=$${directory:home}
export PATH=${python-language-server:location}/bin:${java-jdk:location}/bin:${cli-utilities:PATH}:$HOME/.cargo/bin:$PATH
export IPV6_SLAPRUNNER={{ ipv6_random }}
# Theia Backend
# -------------
......
......@@ -125,6 +125,9 @@ class TestTheia(TheiaTestCase):
resp = self.get(urljoin(authenticated_url, url))
self.assertTrue(resp.raw)
def test_ipv6_parameter_published(self):
self.assertIn('ipv6', self.connection_parameters)
def test_theia_slapos(self):
# Make sure we can use the shell and the integrated slapos command
process = pexpect.spawnu(
......
......@@ -132,7 +132,7 @@ eggs =
[versions]
setuptools = 44.1.1
# Use SlapOS patched zc.buildout
zc.buildout = 2.7.1+slapos016
zc.buildout = 2.7.1+slapos017
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 2.0.3+slapos003
......@@ -189,11 +189,11 @@ setproctitle = 1.1.10
setuptools-dso = 1.7
rubygemsrecipe = 0.4.3
six = 1.12.0
slapos.cookbook = 1.0.226
slapos.cookbook = 1.0.237
slapos.core = 1.7.5
slapos.extension.strip = 0.4
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.22
slapos.libnetworkcache = 0.23
slapos.rebootstrap = 4.5
slapos.recipe.build = 0.54
slapos.recipe.cmmi = 0.19
......@@ -249,15 +249,22 @@ certifi = 2020.6.20
chardet = 3.0.4
urllib3 = 1.25.9
pkgconfig = 1.5.1
distro = 1.7.0
[versions:python2]
Werkzeug = 1.0.1
distro = 1.6.0
[networkcache]
download-cache-url = http://shacache.nxdcdn.com
download-dir-url = http://shadir.nxdcdn.com
# Define options for binary cache, used to download already compiled software.
download-binary-cache-url = http://shacache.org/shacache
download-binary-dir-url = http://shacache.org/shadir
# More options for 'networkcache-download' command
download-cache-url = http://shacache.org/shacache
download-dir-url = http://shacache.org/shadir
# signature certificates of the following uploaders.
# Sebastien Robin
......@@ -270,6 +277,19 @@ download-dir-url = http://shadir.nxdcdn.com
# Julien Muchembled
# Yusei Tahara
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIICBjCCAW+gAwIBAgIUY4zdKc2RjiM7kSvRzC63Rr/cJ8swDQYJKoZIhvcNAQEL
BQAwFDESMBAGA1UEAwwJQ09NUC0zNTcxMCAXDTIyMDIwMTEzNDE0MloYDzIxMjIw
MTA4MTM0MTQyWjAUMRIwEAYDVQQDDAlDT01QLTM1NzEwgZ8wDQYJKoZIhvcNAQEB
BQADgY0AMIGJAoGBAMI2XsqTzpvSXA3qF8mshoETGxwfZT5vmr3p3DE/8w05Wa8Y
6c5YU9ZUnv4OzTuYwARd4ea2rRTfPy9r0KGfTKYgnYYke2GyaK1oAIHh4qa7kazE
G6zpxv7JsOh+2aCfTkFPlz0ZTYCs8sxLDg7yVZk+PTJdYIknHA+n50ub1AH7AgMB
AAGjUzBRMB0GA1UdDgQWBBRUqB8d7mhc7HVFN1ILRb2emIvcHjAfBgNVHSMEGDAW
gBRUqB8d7mhc7HVFN1ILRb2emIvcHjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3
DQEBCwUAA4GBABVYPsrSNHxlx+y7rOnEt+eQ5WJDl9173Cb1ArDh8ELSi9Cdn9Pz
6dXrh2CB2S3o/GkFShvX1YlaaQJE8yWmOAmQQeeYAgp3U6T5YFKpD6Id6DKxE7ui
PdKyGgZoY5o8Gya+ZqAQEiZg+KF6FyJBsjGV7vF0qY+Chw6IJE59OMN5
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV
BAMMB3RzeGRldjMwHhcNMTExMDE0MTIxNjIzWhcNMTIxMDEzMTIxNjIzWjASMRAw
......