Commit 7c63f1a3 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Update Release Candidate

parents fbe80364 4590d41f
......@@ -14,6 +14,7 @@ extends =
../libtool/buildout.cfg
../m4/buildout.cfg
../perl/buildout.cfg
../python-2.7/buildout.cfg
../pkgconfig/buildout.cfg
../xorg/buildout.cfg
../icu/buildout.cfg
......@@ -81,7 +82,7 @@ configure-options =
--disable-static
--disable-gtk-doc-html
environment =
PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${python2.7:location}/bin:${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends}
CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${harfbuzz:location}/lib -Wl,-rpath=${harfbuzz:location}/lib
......
......@@ -14,8 +14,8 @@ extends =
[postfix]
recipe = slapos.recipe.cmmi
shared = true
url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-3.5.8.tar.gz
md5sum = c7c55ccc1db2a30d35c3867c21fe7109
url = http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.7.2.tar.gz
md5sum = 92ff3863194004f7d8a0893421ba4248
location = @@LOCATION@@
patch-options = -p1
patches =
......
......@@ -9,22 +9,18 @@ parts =
[tomcat]
<= tomcat9
[tomcat7]
[tomcat-base]
recipe = slapos.recipe.build:download-unpacked
shared = true
strip-top-level-dir = true
url = https://archive.apache.org/dist/tomcat/tomcat-7/v${:version}/bin/apache-tomcat-${:version}.tar.gz
url = https://archive.apache.org/dist/tomcat/tomcat-${:version-major}/v${:version}/bin/apache-tomcat-${:version}.tar.gz
[tomcat7]
<= tomcat-base
version-major = 7
version = 7.0.100
md5sum = 79be4ba5a6e770730a4be3d5cb3c7862
[tomcat9]
recipe = slapos.recipe.build:download-unpacked
shared = true
strip-top-level-dir = true
url = https://archive.apache.org/dist/tomcat/tomcat-9/v${:version}/bin/apache-tomcat-${:version}.tar.gz
version = 9.0.12
md5sum = 7283da4a3a6e939adcd8f919be4ba41a
[tomcat7-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
......@@ -32,3 +28,15 @@ stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:catalina}
catalina = ${tomcat7:location}/bin/catalina.sh
[tomcat9]
<= tomcat-base
version-major = 9
version = 9.0.12
md5sum = 7283da4a3a6e939adcd8f919be4ba41a
[tomcat10]
<= tomcat-base
version-major = 10
version = 10.0.23
md5sum = 820ca70d01adf99d602615fb8d648162
......@@ -7,8 +7,6 @@ parts +=
instance
caucase-eggs
[python]
part = python2.7
[instance-caucased]
recipe = slapos.recipe.build:download
......
......@@ -24,7 +24,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from __future__ import unicode_literals
import json
import os
......
......@@ -15,9 +15,6 @@ parts =
slapos-cookbook
template
[python]
part = python2.7
##########################################################
# Service startup scripts and configuration files
##########################################################
......
......@@ -16,9 +16,6 @@ parts =
jscrawler-build
instance
[python]
part = python2.7
[nodejs]
<= nodejs-12.18.3
......
......@@ -26,8 +26,7 @@
##############################################################################
import os
import logging
from six.moves.urllib.parse import urlparse
from urllib.parse import urlparse
import requests
import time
......@@ -51,7 +50,7 @@ class TestJSCrawler(SlapOSInstanceTestCase):
self.send_response(200)
self.send_header("Content-Type", "application/html")
self.end_headers()
self.wfile.write('<title>Hello {}</title>'.format(self._name))
self.wfile.write(f'<title>Hello {self._name}</title>'.encode())
return {
'urls': '\n'.join([
......
......@@ -15,8 +15,8 @@
[instance]
filename = instance.cfg.in
md5sum = 51597d8161458028ea8b46962d378a70
md5sum = d769f82481c689ec2c66fc1de0f0541a
[tomcat-server-xml]
filename = server.xml.in
md5sum = fdfa7eb249082855039ca98f310324e9
md5sum = 367f91cf7d3a053a94edc9e675a12e25
......@@ -37,29 +37,30 @@ scheme = https
[tomcat-web-xml]
recipe = plone.recipe.command
command = [ -f $${:location} ] || cp ${tomcat9:location}/conf/web.xml $${:location}
command = [ -f $${:location} ] || cp ${tomcat:location}/conf/web.xml $${:location}
location = $${directory:catalina_conf}/web.xml
[tomcat-keystore]
recipe = plone.recipe.command
command =
${java-re-8-output:keytool} \
${java:location}/bin/keytool \
-genkeypair \
-alias "tomcat" \
-keyalg RSA \
-keypass "$${:pass}" \
-dname "CN=Web Server,OU=Unit,O=Organization,L=City,S=State,C=Country" \
-dname "CN=$${:common-name},OU=Unit,O=Organization,L=City,S=State,C=Country" \
-keystore "$${:file}" \
-storepass "$${:pass}"
file = $${directory:catalina_base}/.keystore
pass = insecure
common-name = $${tomcat-server-xml:ip}
[tomcat-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = ${tomcat9:location}/bin/catalina.sh run
command-line = ${tomcat:location}/bin/catalina.sh run
environment =
JRE_HOME=${java-re-8:location}
JRE_HOME=${java:location}
CATALINA_BASE=$${directory:catalina_base}
GRAPHVIZ_DOT=${graphviz:location}/bin/dot
FONTCONFIG_FILE=$${fontconfig-conf:output}
......
<?xml version='1.0' encoding='utf-8'?>
<Server port="-1" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<Service name="Catalina">
<Connector
protocol="org.apache.coyote.http11.Http11Nio2Protocol"
......@@ -11,10 +17,16 @@
secure="true"
clientAuth="false"
SSLEnabled="true"
keystorePass="$${tomcat-keystore:pass}"
keystoreFile="$${tomcat-keystore:file}"
>
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate
certificateKeystoreFile="$${tomcat-keystore:file}"
certificateKeystorePassword="$${tomcat-keystore:pass}"
type="RSA"
/>
</SSLHostConfig>
</Connector>
<Engine name="Catalina" defaultHost="localhost">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".log"
......
......@@ -15,6 +15,12 @@ parts =
slapos-cookbook
instance
[tomcat]
<= tomcat10
[java]
<= java-re-temurin-11
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
......@@ -27,5 +33,5 @@ output = ${buildout:directory}/${:_buildout_section_name_}
[plantuml.war]
recipe = slapos.recipe.build:download
url = https://sourceforge.net/projects/plantuml/files/1.2020.15/plantuml.1.2020.15.war
md5sum = ed203cb3b90df8f77492fa36ea6490a5
url = https://github.com/plantuml/plantuml-server/releases/download/v1.2022.7/plantuml-jsp-v1.2022.7.war
md5sum = d0889f990f4db01efebb9b9fe98ebf7b
......@@ -64,10 +64,23 @@ class TestSimpleDiagram(PlantUMLTestCase, ImageComparisonTestCase):
# http://www.plantuml.com/plantuml/png/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vuBmWC8WMIi5ztm5n_B4IYw7rBmKe1u0
# because plantuml include information about the server in the output image metadata ( you can
# use http://exif.regex.info/exif.cgi to see metadata )
# So we process the image to remove metadata.
# We just compare that image are similar.
reference = Image.open(os.path.join(os.path.dirname(__file__), "data", "test_sequence_diagram.png"))
self.assertImagesSame(Image.open(BytesIO(png)), reference)
def test_sequence_diagram_skin_rose(self):
# default theme changed, but we can use `skin rose` to keep old theme
# https://github.com/plantuml/plantuml/issues/996
png = self.plantuml.processes(textwrap.dedent("""\
@startuml
skin rose
Bob -> Alice : hello
Alice -> Bob : Go Away
@enduml
"""))
reference = Image.open(os.path.join(os.path.dirname(__file__), "data", "test_sequence_diagram_skin_rose.png"))
self.assertImagesSame(Image.open(BytesIO(png)), reference)
def test_class_diagram(self):
"""Class diagram require a working graphviz installation"""
png = self.plantuml.processes(textwrap.dedent("""\
......
......@@ -14,6 +14,7 @@ extra-eggs +=
extra =
# The following list is for SR whose buildout runs only with Python 3.
caddy-frontend ${slapos.test.caddy-frontend-setup:setup}
caucase ${slapos.test.caucase-setup:setup}
erp5testnode ${slapos.test.erp5testnode-setup:setup}
galene ${slapos.test.galene-setup:setup}
grafana ${slapos.test.grafana-setup:setup}
......@@ -21,7 +22,9 @@ extra =
helloworld ${slapos.test.helloworld-setup:setup}
html5as ${slapos.test.html5as-setup:setup}
html5as-base ${slapos.test.html5as-base-setup:setup}
htmlvalidatorserver ${slapos.test.htmlvalidatorserver-setup:setup}
hugo ${slapos.test.hugo-setup:setup}
jscrawler ${slapos.test.jscrawler-setup:setup}
jstestnode ${slapos.test.jstestnode-setup:setup}
jupyter ${slapos.test.jupyter-setup:setup}
kvm ${slapos.test.kvm-setup:setup}
......
......@@ -367,12 +367,9 @@ extra =
# You should not add more lines here.
backupserver ${slapos.test.backupserver-setup:setup}
beremiz-ide ${slapos.test.beremiz-ide-setup:setup}
caucase ${slapos.test.caucase-setup:setup}
cloudooo ${slapos.test.cloudooo-setup:setup}
dream ${slapos.test.dream-setup:setup}
gitlab ${slapos.test.gitlab-setup:setup}
htmlvalidatorserver ${slapos.test.htmlvalidatorserver-setup:setup}
jscrawler ${slapos.test.jscrawler-setup:setup}
re6stnet ${slapos.test.re6stnet-setup:setup}
slapos-master ${slapos.test.slapos-master-setup:setup}
slaprunner ${slapos.test.slaprunner-setup:setup}
......@@ -401,7 +398,7 @@ PyPDF2 = 1.26.0+SlapOSPatched001
Django = 1.11
mock = 2.0.0:whl
testfixtures = 6.11
testfixtures = 6.11.0
funcsigs = 1.0.2
mysqlclient = 1.3.12
pexpect = 4.8.0
......
......@@ -50,15 +50,15 @@ md5sum = f928b9dc99f7f970caadfe7dd6f95d34
[template-postfix]
filename = instance-postfix.cfg.in
md5sum = 0b7db23344b4795c8786d5e655810b38
md5sum = 8f7bfca893a01c390df7a3dc9c2410e1
[template-postfix-master-cf]
filename = postfix_master.cf.in
md5sum = 9ac81647368068a1a98a785d08074b43
md5sum = ef164517e3f7170d03499967d625c3bb
[template-postfix-main-cf]
filename = postfix_main.cf.in
md5sum = 886d1b004049c8dc1f89cbbfe4f95371
md5sum = e9f03c66627beb4054d45123450162d2
[template-postfix-aliases]
filename = postfix_aliases.in
......@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template]
filename = instance.cfg.in
md5sum = 5747c487edd721d8a53061392307b55f
md5sum = 2cf8721b82767c2461b5c847d281ae7b
[template-erp5]
filename = instance-erp5.cfg.in
......
......@@ -36,6 +36,7 @@ bin = ${buildout:directory}/bin
usr = ${buildout:directory}/usr
srv = ${buildout:directory}/srv
var = ${buildout:directory}/var
var-log = ${:var}/log
var-lib = ${:var}/lib
var-lib-postfix = ${:var-lib}/postfix
var-spool = ${:var}/spool
......@@ -92,6 +93,7 @@ relayhost = {{ dumps(relay.get('host')) }}
relay-sasl-credential = {{ dumps(relay.get('sasl-credential')) }}
cyrus-sasldb = ${directory:etc-cyrus}/postfix.gdbm
milter-list = {{ dumps(milter_list) }}
xz-utils-location = {{ dumps(parameter_dict['xz-utils-location']) }}
[userinfo]
recipe = slapos.cookbook:userinfo
......@@ -141,6 +143,16 @@ command =
update =
${:openssl} req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}'
[{{ section('postfix-logrotate') }}]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = postfix-logrotate
frequency = 0 0 * * *
command = ${directory:bin}/postfix logrotate
[postfix-main-cf-parameter]
postfix-location = {{ parameter_dict['postfix-location'] }}
[{{ section('postfix-main-cf') }}]
< = jinja2-template-base
output = ${directory:etc-postfix}/main.cf
......@@ -163,6 +175,10 @@ context =
key key smtpd-ssl:key
key dh_512 smtpd-ssl:dh-512
key dh_2048 smtpd-ssl:dh-2048
key log_directory directory:var-log
key xz_utils_location configuration:xz-utils-location
key postfix_location postfix-main-cf-parameter:postfix-location
key etc_postfix directory:etc-postfix
[{{ section('postfix-master-cf') }}]
< = jinja2-template-base
......
......@@ -15,6 +15,7 @@ postfix-location = {{ postfix_location }}
template-postfix-aliases = {{ template_postfix_aliases }}
template-postfix-main-cf = {{ template_postfix_main_cf }}
template-postfix-master-cf = {{ template_postfix_master_cf }}
xz-utils-location = {{ xz_utils_location }}
[dynamic-template-postfix]
< = jinja2-template-base
......
......@@ -8,17 +8,19 @@ mail_owner = {{ mail_owner }}
alias_maps = {{ aliases }}
alias_database = {{ aliases }}
mail_spool_directory = {{ spool_directory }}
sendmail_path =
newaliases_path =
mailq_path =
sendmail_path = {{ bin_directory }}/sendmail
newaliases_path = {{ bin_directory }}/newaliases
mailq_path = {{ bin_directory }}/mailq
setgid_group = {{ setgid_group }}
html_directory =
manpage_directory =
sample_directory =
readme_directory =
html_directory = no
manpage_directory = {{ postfix_location }}/usr/local/man
sample_directory = {{ postfix_location }}/etc/postfix
readme_directory = no
inet_interfaces = {{ inet_interfaces }}
smtp_bind_address = 0.0.0.0
smtp_bind_address6 = ::
compatibility_level = 3.6
smtputf8_enable = no
# Compared to default:
# - remove X-related variables, irrelevant for slapos, to be concise
......@@ -69,3 +71,7 @@ smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = {{ sasl_passwd }}
smtp_sasl_tls_security_options = noanonymous
{%- endif %}
maillog_file = {{ log_directory }}/postfix.log
maillog_file_compressor = {{ xz_utils_location }}/bin/xz
maillog_file_prefixes = {{ log_directory }}
......@@ -27,3 +27,4 @@ virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
postlog unix-dgram n - n - 1 postlogd
......@@ -194,7 +194,7 @@ setuptools-dso = 1.7
rubygemsrecipe = 0.4.3
six = 1.16.0
slapos.cookbook = 1.0.253
slapos.core = 1.8.0
slapos.core = 1.8.1
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.25
slapos.rebootstrap = 4.5
......@@ -263,7 +263,7 @@ Werkzeug = 1.0.1
requests = 2.27.1
charset-normalizer = 2.0.12
pyparsing = 2.2.0
certifi = 2020.04.05.1
certifi = 2020.4.5.1
[versions:sys.version_info < (3,8)]
MarkupSafe = 1.0
......
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