Commit 8941f98b authored by Jérome Perrin's avatar Jérome Perrin

Update plantuml to 1.2022.7

See merge request nexedi/slapos!1245
parents 64701828 c9d8a43b
......@@ -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
......@@ -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"
......@@ -27,4 +39,4 @@
</Host>
</Engine>
</Service>
</Server>
\ No newline at end of file
</Server>
......@@ -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("""\
......
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