Commit 0e6e620f authored by Rafael Monnerat's avatar Rafael Monnerat

Update Release Candidate

parents d909bebf 5ae99219
...@@ -44,9 +44,9 @@ environment = ...@@ -44,9 +44,9 @@ environment =
[apache] [apache]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
version = 2.4.61 version = 2.4.62
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2 url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = f67c69e2faf605d0a4bd483f27cf1dc3 md5sum = cded7afa23c13c4854008d95a69ce016
configure-options = --disable-static configure-options = --disable-static
--enable-authn-alias --enable-authn-alias
--enable-bucketeer --enable-bucketeer
......
...@@ -31,8 +31,8 @@ post-make-hook = ${:_profile_base_location_}/${aspell-create-wrapper:filename}#$ ...@@ -31,8 +31,8 @@ post-make-hook = ${:_profile_base_location_}/${aspell-create-wrapper:filename}#$
[aspell] [aspell]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://ftp.gnu.org/gnu/aspell/aspell-0.60.7.tar.gz url = https://ftp.gnu.org/gnu/aspell/aspell-0.60.8.1.tar.gz
md5sum = 8ef2252609c511cd2bb26f3a3932ef28 md5sum = 187bd142f522ada555c7aa6b9cbf56e6
configure-options = configure-options =
--enable-curses="-lncursesw -ltinfow" --enable-curses="-lncursesw -ltinfow"
environment = environment =
......
...@@ -18,8 +18,8 @@ parts = ...@@ -18,8 +18,8 @@ parts =
[git] [git]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.42.0.tar.xz url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.45.2.tar.xz
md5sum = e61c187f6863d5e977e60cdedf213ec0 md5sum = a6af98f948a1f07cfeac57e91a0f2abe
configure-options = configure-options =
--with-curl=${curl:location} --with-curl=${curl:location}
--with-openssl=${openssl:location} --with-openssl=${openssl:location}
......
...@@ -55,17 +55,9 @@ command = ${coreutils-output:test} -x ${:keytool} ...@@ -55,17 +55,9 @@ command = ${coreutils-output:test} -x ${:keytool}
keytool = ${java-re-8:location}/bin/keytool keytool = ${java-re-8:location}/bin/keytool
[java-re-temurin-11] [java-re-temurin-linux-x64-base]
recipe = slapos.recipe.build
update =
from zc.buildout import UserError
raise UserError("unsupported platform")
[java-re-temurin-11:linux and platform.machine() == 'x86_64']
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jre_x64_linux_hotspot_11.0.13_8.tar.gz
md5sum = 1b06100bcd0923d3f3279c2f09773af0
configure-command = : configure-command = :
make-binary = : make-binary = :
post-install = post-install =
...@@ -75,3 +67,26 @@ post-install = ...@@ -75,3 +67,26 @@ post-install =
${patchelf:location}/bin/patchelf --set-rpath %(rpath)s $file ${patchelf:location}/bin/patchelf --set-rpath %(rpath)s $file
done done
rpath = ${alsa:location}/lib:${freetype:location}/lib:${fontconfig:location}/lib:${libpng:location}/lib:${libXrender:location}/lib:${libXtst:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXext:location}/lib:${libXdmcp:location}/lib:${libXi:location}/lib:${libxcb:location}/lib:${zlib:location}/lib:@@LOCATION@@/lib:@@LOCATION@@/lib/server:@@LOCATION@@/lib/jli rpath = ${alsa:location}/lib:${freetype:location}/lib:${fontconfig:location}/lib:${libpng:location}/lib:${libXrender:location}/lib:${libXtst:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXext:location}/lib:${libXdmcp:location}/lib:${libXi:location}/lib:${libxcb:location}/lib:${zlib:location}/lib:@@LOCATION@@/lib:@@LOCATION@@/lib/server:@@LOCATION@@/lib/jli
[java-re-temurin-unsupported-base]
recipe = slapos.recipe.build
update =
from zc.buildout import UserError
raise UserError("unsupported platform")
[java-re-temurin-11]
<= java-re-temurin-unsupported-base
[java-re-temurin-11:linux and platform.machine() == 'x86_64']
<= java-re-temurin-linux-x64-base
url = https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jre_x64_linux_hotspot_11.0.13_8.tar.gz
md5sum = 1b06100bcd0923d3f3279c2f09773af0
[java-re-temurin-21]
<= java-re-temurin-unsupported-base
[java-re-temurin-21:linux and platform.machine() == 'x86_64']
<= java-re-temurin-linux-x64-base
url = https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jre_x64_linux_hotspot_21.0.3_9.tar.gz
md5sum = a028c69d40663040a4438d501b21b11a
[buildout] [buildout]
extends = extends =
../libsodium/buildout.cfg ../libsodium/buildout.cfg
../patch/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
parts = parts =
...@@ -9,10 +10,13 @@ parts = ...@@ -9,10 +10,13 @@ parts =
[libzmq] [libzmq]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://github.com/zeromq/zeromq4-1/releases/download/v4.1.6/zeromq-4.1.6.tar.gz url = https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz
md5sum = c89db4dbc0b90c34c9f4983cbff6d321 md5sum = ae933b1e98411fd7cb8309f9502d2737
configure-options = configure-options =
--without-documentation --without-documentation
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libsodium:location}/lib/pkgconfig PKG_CONFIG_PATH=${libsodium:location}/lib/pkgconfig
patches =
${:_profile_base_location_}/disable-stringop-overflow-gcc-10.5.patch#4705ba5b86e48e2fd2eaea1d1f891cfe
patch-options = -p1
Disable a stringop-overflow warning failing build on gcc 10.5
This is an original slapos patch probably no longer necessary once we update gcc
--- zeromq-4.3.5.orig/src/xpub.cpp 2023-06-18 23:40:34.000000000 +0900
+++ zeromq-4.3.5/src/xpub.cpp 2024-07-11 20:07:19.620329232 +0900
@@ -384,7 +384,10 @@
// Place the unsubscription to the queue of pending (un)subscriptions
// to be retrieved by the user later on.
blob_t unsub (size_ + 1);
+
+#pragma GCC diagnostic ignored "-Wstringop-overflow="
*unsub.data () = 0;
+#pragma GCC diagnostic pop
if (size_ > 0)
memcpy (unsub.data () + 1, data_, size_);
self_->_pending_data.ZMQ_PUSH_OR_EMPLACE_BACK (ZMQ_MOVE (unsub));
...@@ -36,11 +36,3 @@ rpath = ...@@ -36,11 +36,3 @@ rpath =
${libpng:location}/lib ${libpng:location}/lib
${freetype:location}/lib ${freetype:location}/lib
need-matplotlibrc = ${matplotlibrc:location} need-matplotlibrc = ${matplotlibrc:location}
[versions]
matplotlib = 2.1.2
cycler = 0.11.0
matplotlib-inline = 0.1.6:whl
[versions:sys.version_info < (3,8)]
cycler = 0.10.0
...@@ -13,18 +13,17 @@ parts = ...@@ -13,18 +13,17 @@ parts =
[miniupnp-repository] [miniupnp-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = https://github.com/miniupnp/miniupnp.git repository = https://github.com/miniupnp/miniupnp.git
revision = miniupnpd_2_3_0 revision = miniupnpd_2_3_7
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
[miniupnpd] [miniupnpd]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
path = ${miniupnp-repository:location}/miniupnpd path = ${miniupnp-repository:location}/miniupnpd
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${iptables:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig PKG_CONFIG_PATH=${iptables:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
LDFLAGS=-L${libuuid:location}/lib -L${openssl:location}/lib -L${zlib:location}/lib LDFLAGS=-L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${iptables:location}/lib
# because these configure not support prefix syntax # because these configure not support prefix syntax
configure-command = ./configure configure-command = ./configure
configure-options = configure-options =
......
...@@ -8,9 +8,9 @@ parts = ...@@ -8,9 +8,9 @@ parts =
[perl] [perl]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
version = 5.38.0 version = 5.40.0
url = https://www.cpan.org/src/5.0/perl-${:version}.tar.xz url = https://www.cpan.org/src/5.0/perl-${:version}.tar.xz
md5sum = e1c8aaec897dd386c741f97eef9f2e87 md5sum = cfe14ef0709b9687f9c514042e8e1e82
siteprefix =@@LOCATION@@/site_${:_buildout_section_name_} siteprefix =@@LOCATION@@/site_${:_buildout_section_name_}
configure-command = configure-command =
sh Configure -des \ sh Configure -des \
......
...@@ -44,23 +44,23 @@ configure-options += ...@@ -44,23 +44,23 @@ configure-options +=
make-options += make-options +=
DESTDIR=${buildout:destdir} DESTDIR=${buildout:destdir}
environment += environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/${perl:version}/
[intltool] [intltool]
environment += environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/${perl:version}/
[autoconf] [autoconf]
environment += environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/${perl:version}/
[automake] [automake]
environment += environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/${perl:version}/
[firewalld] [firewalld]
environment += environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/${perl:version}/
[dbus] [dbus]
...@@ -97,7 +97,7 @@ make-options += ...@@ -97,7 +97,7 @@ make-options +=
INSTALL_PREFIX=${buildout:destdir} INSTALL_PREFIX=${buildout:destdir}
DESTDIR=${buildout:destdir} DESTDIR=${buildout:destdir}
environment += environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/${perl:version}/
[gobject-introspection] [gobject-introspection]
pre-configure += pre-configure +=
...@@ -105,7 +105,7 @@ pre-configure += ...@@ -105,7 +105,7 @@ pre-configure +=
configure-options += configure-options +=
--enable-shared --enable-shared
environment += environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/${perl:version}/
post-install = post-install =
sed -i 's#!${python:location}/bin/python${python:version}#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#' ${python:location}/bin/python${python:version}-config sed -i 's#!${python:location}/bin/python${python:version}#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#' ${python:location}/bin/python${python:version}-config
...@@ -121,14 +121,14 @@ environment += ...@@ -121,14 +121,14 @@ environment +=
[perl-CPAN-package] [perl-CPAN-package]
perl-PERL5LIB=${perl:location}/lib/5.38.0/ perl-PERL5LIB=${perl:location}/lib/${perl:version}/
pre-configure = pre-configure =
sed -i "s#'/opt/slapos/parts/perl#'${perl:location}#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm sed -i "s#'/opt/slapos/parts/perl#'${perl:location}#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
sed -i "s#'/opt/slapos/parts/site_perl#'${buildout:destdir}/parts/site_perl#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm sed -i "s#'/opt/slapos/parts/site_perl#'${buildout:destdir}/parts/site_perl#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
post-install = post-install =
sed -i "s#'${perl:location}#'/opt/slapos/parts/perl#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm sed -i "s#'${perl:location}#'/opt/slapos/parts/perl#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
sed -i "s#'${buildout:destdir}/parts/site_perl#'/opt/slapos/parts/site_perl#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm sed -i "s#'${buildout:destdir}/parts/site_perl#'/opt/slapos/parts/site_perl#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
[perl] [perl]
configure-command = configure-command =
......
...@@ -20,8 +20,8 @@ parts = ...@@ -20,8 +20,8 @@ parts =
[subversion] [subversion]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://downloads.apache.org/subversion/subversion-1.14.2.tar.bz2 url = https://archive.apache.org/dist/subversion/subversion-1.14.3.tar.bz2
md5sum = 9927b167d1c67d663ca63125907f6f69 md5sum = 19756a5ceb32a022698a66e48616ef6b
configure-options = configure-options =
--disable-static --disable-static
--with-apr=${apr:location} --with-apr=${apr:location}
......
...@@ -24,8 +24,8 @@ min_version = 8 ...@@ -24,8 +24,8 @@ min_version = 8
[trafficserver] [trafficserver]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.2.4.tar.bz2 url = https://archive.apache.org/dist/trafficserver/trafficserver-9.2.5.tar.bz2
md5sum = 5a889ba1be6f325e4b523df85616f30b md5sum = 73f9c41eeafdb5d20f0287796e9fcef2
shared = true shared = true
patch-options = -p1 patch-options = -p1
configure-options = configure-options =
......
...@@ -74,3 +74,7 @@ environment = ...@@ -74,3 +74,7 @@ environment =
PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
CFLAGS=-I${ncurses:location}/include CFLAGS=-I${ncurses:location}/include
# disable year 2038 problem ONLY for 32 bit architectures
[libuuid:bits32]
configure-options += --disable-year2038
...@@ -12,17 +12,17 @@ extends = ...@@ -12,17 +12,17 @@ extends =
[zbar] [zbar]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://github.com/mchehab/zbar/archive/0.23.90.tar.gz url = https://github.com/mchehab/zbar/archive/refs/tags/0.23.93.tar.gz
md5sum = cb1667e20c1d7acf1b9911414adaeb84 md5sum = 3f69d17f6495de023b59b3539ce5e605
pre-configure = pre-configure =
autoreconf -vfi -I ${libtool:location}/share/aclocal -I ${pkgconfig:location}/share/aclocal autoreconf -vfi -I ${libtool:location}/share/aclocal -I ${pkgconfig:location}/share/aclocal
configure-options = configure-options =
--disable-video --disable-video
--without-imagemagick --without-imagemagick
--without-gtk --without-gtk
--without-xv --without-xv
--without-qt --without-qt
--without-python --without-python
--without-x --without-x
--without-jpg --without-jpg
--without-dbus --without-dbus
......
...@@ -5,7 +5,5 @@ parts = ...@@ -5,7 +5,5 @@ parts =
[zlib] [zlib]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://zlib.net/fossils/zlib-1.3.tar.gz url = https://zlib.net/fossils/zlib-1.3.1.tar.gz
md5sum = 60373b133d630f74f4a1f94c1185a53f md5sum = 9855b6d802d7fe5b7bd5b196a2271655
environment =
CFLAGS=-fPIC
...@@ -45,17 +45,17 @@ def createInstanceParameterSchemaValidatorTest(path): ...@@ -45,17 +45,17 @@ def createInstanceParameterSchemaValidatorTest(path):
"http://json-schema.org/draft-04/schema#": jsonschema.Draft4Validator, "http://json-schema.org/draft-04/schema#": jsonschema.Draft4Validator,
"http://json-schema.org/draft-06/schema#": jsonschema.Draft6Validator, "http://json-schema.org/draft-06/schema#": jsonschema.Draft6Validator,
"http://json-schema.org/draft-07/schema#": jsonschema.Draft7Validator, "http://json-schema.org/draft-07/schema#": jsonschema.Draft7Validator,
"http://json-schema.org/draft/2019-09/schema": jsonschema.Draft201909Validator, "https://json-schema.org/draft/2019-09/schema": jsonschema.Draft201909Validator,
"http://json-schema.org/draft/2019-09/schema#": jsonschema.Draft201909Validator, "https://json-schema.org/draft/2019-09/schema#": jsonschema.Draft201909Validator,
"http://json-schema.org/draft/2020-12/schema": jsonschema.Draft202012Validator, "https://json-schema.org/draft/2020-12/schema": jsonschema.Draft202012Validator,
"http://json-schema.org/draft/2020-12/schema#": jsonschema.Draft202012Validator, "https://json-schema.org/draft/2020-12/schema#": jsonschema.Draft202012Validator,
} }
def run(self, *args, **kwargs): def run(self, *args, **kwargs):
with open(path, "r") as json_file: with open(path, "r") as json_file:
json_dict = json.load(json_file) json_dict = json.load(json_file)
validator = validator_dict.get( validator = validator_dict.get(json_dict.get('$schema'))
json_dict.get('$schema'), if validator is None:
jsonschema.Draft7Validator) raise ValueError("%s has an invalid $schema %s" % (path, json_dict.get('$schema')))
validator.check_schema(json_dict) validator.check_schema(json_dict)
return run return run
......
...@@ -13,13 +13,15 @@ def makeRecipe(recipe_class, options, name='test', buildout=None): ...@@ -13,13 +13,15 @@ def makeRecipe(recipe_class, options, name='test', buildout=None):
and SLAPOS_TEST_DEVELOP_EGGS_DIRECTORY environment variables, so that the and SLAPOS_TEST_DEVELOP_EGGS_DIRECTORY environment variables, so that the
test recipe does not need to install eggs again when using working set. test recipe does not need to install eggs again when using working set.
""" """
_buildout = { _buildout = six.moves.UserDict({
'buildout': { 'buildout': {
'bin-directory': '', 'bin-directory': '',
'find-links': '', 'find-links': '',
'allow-hosts': '', 'allow-hosts': '',
'allow-unknown-extras': False,
'develop-eggs-directory': '', 'develop-eggs-directory': '',
'eggs-directory': '', 'eggs-directory': '',
'directory': '',
'python': 'testpython', 'python': 'testpython',
}, },
'testpython': { 'testpython': {
...@@ -31,7 +33,7 @@ def makeRecipe(recipe_class, options, name='test', buildout=None): ...@@ -31,7 +33,7 @@ def makeRecipe(recipe_class, options, name='test', buildout=None):
'server-url': '', 'server-url': '',
'software-release-url': '', 'software-release-url': '',
} }
} })
_buildout['buildout']['eggs-directory'] = os.environ['SLAPOS_TEST_EGGS_DIRECTORY'] _buildout['buildout']['eggs-directory'] = os.environ['SLAPOS_TEST_EGGS_DIRECTORY']
_buildout['buildout']['develop-eggs-directory'] = os.environ['SLAPOS_TEST_DEVELOP_EGGS_DIRECTORY'] _buildout['buildout']['develop-eggs-directory'] = os.environ['SLAPOS_TEST_DEVELOP_EGGS_DIRECTORY']
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#", "extends": "./schema-definitions.json#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
......
# OWASP Dependency Track
https://dependencytrack.org/
Can be used to ingest SBOM of slapos software release produced with [nxdbom](https://lab.nexedi.com/nexedi/nxd-bom)
[instance-profile]
filename = instance.cfg.in
md5sum = 5545f52ea36d5116523c5569999915ae
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"properties": {}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"url": {
"title": "URL",
"description": "URL to access Dependency-Track.",
"type": "string",
"format": "uri"
}
}
}
[buildout]
parts =
publish-connection-parameter
extends = ${monitor2-template:output}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[dependency-track-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:service}/$${:_buildout_section_name_}
command-line =
${java:location}/bin/java
-jar ${dependency-track-bundled.jar:location}/dependency-track-bundled.jar
-host $${:ip}
-port $${:port}
environment =
ALPINE_DATABASE_MODE=external
ALPINE_DATABASE_URL=jdbc:postgresql://$${postgresql:ipv4}:$${postgresql:port}/$${postgresql:dbname}
ALPINE_DATABASE_DRIVER=org.postgresql.Driver
ALPINE_DATABASE_USERNAME=$${postgresql:superuser}
ALPINE_DATABASE_PASSWORD=$${postgresql:password}
HOME=$${directory:srv-dependency-track}
hash-existing-files =
$${buildout:directory}/software_release/buildout.cfg
ip = $${instance-parameter:ipv4-random}
port = 18080
promises =
$${dependency-track-promise:name}
[dependency-track-frontend-certificate]
recipe = plone.recipe.command
command =
if [ ! -e $${:cert-file} ]
then
${openssl-output:openssl} req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa -keyout $${:cert-file} \
-out $${:cert-file}
fi
update-command = $${:command}
cert-file = $${directory:var}/$${:_buildout_section_name_}.pem
common-name = $${dependency-track-frontend-config:ip}
location =
$${:cert-file}
[dependency-track-frontend-config]
recipe = slapos.recipe.template:jinja2
url = ${stack-haproxy-default-backend-config:target}
output = $${directory:etc}/$${:_buildout_section_name_}
context =
key pidfile :pidfile
key content :content
content =
listen app
log global
bind $${:ip}:$${:port} ssl crt $${dependency-track-frontend-certificate:cert-file} alpn h2,http/1.1
server app $${dependency-track-instance:ip}:$${dependency-track-instance:port}
pidfile = $${directory:run}/$${:_buildout_section_name_}.pid
ip = $${instance-parameter:ipv6-random}
port = 8443
[dependency-track-frontend]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
${haproxy:location}/sbin/haproxy -f $${dependency-track-frontend-config:output}
url = https://[$${dependency-track-frontend-config:ip}]:$${dependency-track-frontend-config:port}
[dependency-track-promise]
<= monitor-promise-base
promise = check_url_available
name = $${:_buildout_section_name_}.py
config-url= $${dependency-track-frontend:url}/
[postgresql-password]
recipe = slapos.cookbook:generate.password
[postgresql]
recipe = slapos.cookbook:postgres
bin = ${postgresql:location}/bin
services = $${directory:service}
dbname = dependency-track_db
superuser = dependency-track-psql
password = $${postgresql-password:passwd}
pgdata-directory = $${directory:srv}/postgresql
ipv4 = $${instance-parameter:ipv4-random}
# disable listening on ipv6
ipv6 =
port = 5432
promises = $${postgresql-promise:name}
[postgresql-psql]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:bin}/$${:_buildout_section_name_}
command-line =
$${postgresql:bin}/psql
-h $${postgresql:pgdata-directory}
-U $${postgresql:superuser}
-d $${postgresql:dbname}
[postgresql-promise]
<= monitor-promise-base
promise = check_command_execute
name = promise-postgresql.py
config-command = $${postgresql-psql:wrapper-path} -c '\q'
[postgresql-backup-crontab-entry]
recipe = slapos.cookbook:cron.d
name = $${:_buildout_section_name_}
cron-entries = $${cron:cron-entries}
time = daily
command = $${postgresql-backup:wrapper-path}
[postgresql-backup]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:bin}/$${:_buildout_section_name_}
# XXX there's a recipe for backup in slapos cookbook, but it does not create
# the backup file in an atomic way, which is not acceptable here, because we
# don't want to risk pulling a partial file. To prevent this, we create a
# temp file and move it when finished.
command-line =
sh -c "$${postgresql:bin}/pg_dump \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
--format=custom \
-f $${:backup-file}.tmp \
$${postgresql:dbname} \
&& mv $${:backup-file}.tmp $${:backup-file}"
backup-file = $${directory:srv-backup}/backup.pg_dump
[postgresql-restore-backup]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:bin}/$${:_buildout_section_name_}
command-line =
sh -e -c "\
echo 'This will replace current database with latest backup. Hit Ctrl+C to cancel';
sleep 10;
$${postgresql:bin}/dropdb \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
--if-exists \
$${postgresql:dbname};
$${postgresql:bin}/createdb \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
$${postgresql:dbname};
$${postgresql:bin}/pg_restore \
--exit-on-error \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
-d $${postgresql:dbname} \
$${postgresql-backup:backup-file}"
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron-output:crond}
cron-entries = $${directory:etc-cron.d}
crontabs = $${directory:var-crontabs}
cronstamps = $${directory:var-cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${directory:bin}/crond
[cron-service]
recipe = slapos.cookbook:wrapper
command-line = $${cron:binary}
wrapper-path = $${directory:services}/crond
hash-existing-files = $${buildout:directory}/software_release/buildout.cfg
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${directory:bin}/cron_simplelogger
log = $${directory:log}/cron.log
[rapidcdn-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Dependency Track Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
shared = true
config-url = $${dependency-track-frontend:url}
return = domain secure_access
[rapidcdn-frontend-available-promise]
<= monitor-promise-base
promise = check_url_available
name = $${:_buildout_section_name_}.py
config-url = $${rapidcdn-frontend:connection-secure_access}
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
etc-cron.d = $${:etc}/cron.d
var = $${buildout:directory}/var
var-crontabs = $${:var}/crontabs
var-cronstamps = $${:var}/cronstamps
var-cron-entries = $${:var}/cron-entries
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
run = $${buildout:directory}/run
service = $${:etc}/service
srv-dependency-track = $${:srv}/dependency-track
srv-backup = $${:srv}/backup
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${rapidcdn-frontend-available-promise:config-url}
backup-crontab = $${postgresql-backup-crontab-entry:name}
restore-backup-script = $${postgresql-restore-backup:wrapper-path}
[buildout]
extends =
../../component/defaults.cfg
../../component/java/buildout.cfg
../../component/postgresql/buildout.cfg
../../component/dcron/buildout.cfg
../../stack/haproxy/default-backend.cfg
../../stack/slapos.cfg
buildout.hash.cfg
../../stack/monitor/buildout.cfg
parts =
slapos-cookbook
instance-profile
[java]
<= java-re-temurin-21
[dependency-track-bundled.jar]
recipe = slapos.recipe.build:download
url = https://github.com/DependencyTrack/dependency-track/releases/download/4.11.4/dependency-track-bundled.jar
md5sum = a1c5e8f216a999b6d497b133c93588a6
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
{
"name": "Dependency-Track",
"description": "Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.",
"serialisation": "xml",
"software-type": {
"default": {
"title": "Default",
"software-type": "default",
"description": "Default",
"request": "instance-dependency-track-input-schema.json",
"response": "instance-dependency-track-output-schema.json",
"index": 1
}
}
}
Tests for DependencyTrack software release
##############################################################################
#
# Copyright (c) 2024 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from setuptools import setup, find_packages
version = '0.0.1.dev0'
name = 'slapos.test.dependencytrack'
with open("README.md") as f:
long_description = f.read()
setup(name=name,
version=version,
description="Test for SlapOS' dependencytrack",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer="Nexedi",
maintainer_email="info@nexedi.com",
url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(),
install_requires=[
'slapos.core',
'slapos.cookbook',
'slapos.libnetworkcache',
'supervisor',
'requests'
],
zip_safe=True,
test_suite='test',
)
##############################################################################
#
# Copyright (c) 2024 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, InstanceTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software.cfg')))
class TestDependencyTrack(InstanceTestCase):
__partition_reference__ = 'DT' # postgresql use a socket in data dir
def test(self):
url = self.computer_partition.getConnectionParameterDict()['url']
resp = requests.get(url, verify=False)
self.assertTrue(resp.text)
self.assertTrue(resp.ok)
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"test-node-title": { "test-node-title": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"image-to-test-url": { "image-to-test-url": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"allow_subgroups": { "allow_subgroups": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"allow_subgroups": { "allow_subgroups": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"required": [ "required": [
"target-url" "target-url"
], ],
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Values returned by headless Chromium instantiation", "title": "Values returned by headless Chromium instantiation",
"properties": { "properties": {
"frontend-url": { "frontend-url": {
......
{ {
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "http://json-schema.org/draft-06/schema#",
"type": "object", "type": "object",
"description": "Parameters to instantiate JS drone", "description": "Parameters to instantiate JS drone",
"additionalProperties": false, "additionalProperties": false,
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "http://json-schema.org/draft-06/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"urls": { "urls": {
......
{ {
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters", "name": "Output Parameters",
"properties": { "properties": {
"url": { "url": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"frontend": { "frontend": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "http://json-schema.org/draft-06/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"enable-device-hotplug": { "enable-device-hotplug": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters For NDB Server", "title": "Input Parameters For NDB Server",
"properties": {} "properties": {}
} }
{ {
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters", "name": "Output Parameters",
"properties": { "properties": {
"nbd_url": { "nbd_url": {
......
{ {
"$schema": "http://json-schema.org/draft-06/schema#",
"name": "Output Parameters", "name": "Output Parameters",
"properties": { "properties": {
"backend-url": { "backend-url": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "https://json-schema.org/draft/2020-12/schema#",
"description": "Parameters to instantiate resilient KVM",
"allOf": [ "allOf": [
{ {
"$ref": "./instance-kvm-input-schema.json#" "$ref": "./instance-kvm-input-schema.json#",
"additionalProperties": true,
}, },
{ {
"additionalProperties": true,
"properties": { "properties": {
"resilient-clone-number": { "resilient-clone-number": {
"title": "Amount of backup(s) to create", "title": "Amount of backup(s) to create",
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"dns_sr_url": { "dns_sr_url": {
......
{ {
"$schema": "https://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"type": "object", "type": "object",
"properties": { "properties": {
"url": { "url": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"type": "object", "type": "object",
"properties": { "properties": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Values returned by node-monitoring instanciation", "title": "Values returned by node-monitoring instanciation",
"type": "object", "type": "object",
"properties": { "properties": {
......
{ {
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters", "name": "Output Parameters",
"properties": { "properties": {
"backend-url": { "backend-url": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Core Network Input Parameters", "title": "Core Network Input Parameters",
"type": "object", "type": "object",
"properties": { "properties": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by Core Network instantiation (stub)", "description": "Values returned by Core Network instantiation (stub)",
"type": "object", "type": "object",
"properties": {} "properties": {}
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"user-authorized-key": { "user-authorized-key": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by eNB/gNB instantiation (stub)", "description": "Values returned by eNB/gNB instantiation (stub)",
"type": "object", "type": "object",
"properties": {} "properties": {}
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"bandwidth": { "bandwidth": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ORS eNB instantiation (stub)", "description": "Values returned by ORS eNB instantiation (stub)",
"type": "object", "type": "object",
"properties": {} "properties": {}
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"nr_bandwidth": { "nr_bandwidth": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ORS gNB instantiation (stub)", "description": "Values returned by ORS gNB instantiation (stub)",
"type": "object", "type": "object",
"properties": {} "properties": {}
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": {} "properties": {}
} }
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by UEsim instantiation (stub)", "description": "Values returned by UEsim instantiation (stub)",
"type": "object", "type": "object",
"properties": {} "properties": {}
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "SIM Card Parameters", "title": "SIM Card Parameters",
"required": [ "required": [
"sim_algo", "sim_algo",
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"-dns-type": { "-dns-type": {
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"record": { "record": {
......
...@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68 ...@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend] [profile-frontend]
filename = instance-frontend.cfg.in filename = instance-frontend.cfg.in
md5sum = b3c5694042035f13832479dca3481597 md5sum = af6c2d8dfa36c9012c6ef905689972ff
[profile-master] [profile-master]
filename = instance-master.cfg.in filename = instance-master.cfg.in
...@@ -38,7 +38,7 @@ md5sum = cba4d995962f7fbeae3f61c9372c4181 ...@@ -38,7 +38,7 @@ md5sum = cba4d995962f7fbeae3f61c9372c4181
[template-frontend-haproxy-configuration] [template-frontend-haproxy-configuration]
_update_hash_filename_ = templates/frontend-haproxy.cfg.in _update_hash_filename_ = templates/frontend-haproxy.cfg.in
md5sum = 545a0ff2f2dfaeb4342232398d8c8ebe md5sum = 49fc74e8948181014c1af863dbff1b59
[template-frontend-haproxy-crt-list] [template-frontend-haproxy-crt-list]
_update_hash_filename_ = templates/frontend-haproxy-crt-list.in _update_hash_filename_ = templates/frontend-haproxy-crt-list.in
...@@ -50,7 +50,7 @@ md5sum = d56e2cfab274cbbbe5b387f2f6e417df ...@@ -50,7 +50,7 @@ md5sum = d56e2cfab274cbbbe5b387f2f6e417df
[template-backend-haproxy-configuration] [template-backend-haproxy-configuration]
_update_hash_filename_ = templates/backend-haproxy.cfg.in _update_hash_filename_ = templates/backend-haproxy.cfg.in
md5sum = 629f4cc34dd7512eb61f10eac4e62d7a md5sum = 13942d8f5525b748cf3cfc2665a87f63
[template-empty] [template-empty]
_update_hash_filename_ = templates/empty.in _update_hash_filename_ = templates/empty.in
...@@ -106,11 +106,11 @@ md5sum = 107dc147d94d02d2084b97b8ec591831 ...@@ -106,11 +106,11 @@ md5sum = 107dc147d94d02d2084b97b8ec591831
[template-frontend-haproxy-rsyslogd-conf] [template-frontend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/frontend-haproxy-rsyslogd.conf.in _update_hash_filename_ = templates/frontend-haproxy-rsyslogd.conf.in
md5sum = afbf1a74322f927a10306657b9a590ad md5sum = 9f60941ba505bcb9eec5b09676411038
[template-backend-haproxy-rsyslogd-conf] [template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in _update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
md5sum = ba91b7778c3d730353d42d7804ef8050 md5sum = 53bb2f095db7bc5cd3a238d3c1416502
[template-slave-introspection-httpd-nginx] [template-slave-introspection-httpd-nginx]
_update_hash_filename_ = templates/slave-introspection-httpd-nginx.conf.in _update_hash_filename_ = templates/slave-introspection-httpd-nginx.conf.in
......
...@@ -651,7 +651,7 @@ output = ${directory:bin}/trafficserver-rotate ...@@ -651,7 +651,7 @@ output = ${directory:bin}/trafficserver-rotate
xz_binary = {{ software_parameter_dict['xz_location'] ~ '/bin/xz' }} xz_binary = {{ software_parameter_dict['xz_location'] ~ '/bin/xz' }}
pattern = *.old pattern = *.old
# days to keep log files # days to keep log files
keep_days = 365 keep_days = ${configuration:rotate-num}
extra-context = extra-context =
raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find
......
{ {
"$schema": "http://json-schema.org/draft-07/schema", "$schema": "http://json-schema.org/draft-07/schema#",
"properties": { "properties": {
"-frontend-quantity": { "-frontend-quantity": {
"description": "Quantity of Frontends Replicate.", "description": "Quantity of Frontends Replicate.",
......
{ {
"$schema": "http://json-schema.org/draft-07/schema", "$schema": "http://json-schema.org/draft-07/schema#",
"properties": { "properties": {
"custom_domain": { "custom_domain": {
"description": "Custom Domain to use for the website. Shall contain only letters, numbers and -, and can look like example.com, first2.example.com special-site.example.com.", "description": "Custom Domain to use for the website. Shall contain only letters, numbers and -, and can look like example.com, first2.example.com special-site.example.com.",
......
...@@ -216,7 +216,7 @@ kedifa = 0.0.7 ...@@ -216,7 +216,7 @@ kedifa = 0.0.7
zc.lockfile = 1.4 zc.lockfile = 1.4
python2-secrets = 1.0.5 python2-secrets = 1.0.5
validators = 0.12.2 validators = 0.32.0
ecdsa = 0.13 ecdsa = 0.13
furl = 2.1.0 furl = 2.1.0
......
...@@ -6,7 +6,7 @@ module( ...@@ -6,7 +6,7 @@ module(
# haproxy emits enough information by itself # haproxy emits enough information by itself
# Also cut out first empty space in msg, which is related to rsyslogd # Also cut out first empty space in msg, which is related to rsyslogd
# internal and end up cutting on 8k, as it's default of $MaxMessageSize # internal and end up cutting on 8k, as it's default of $MaxMessageSize
template(name="rawoutput" type="string" string="%msg:2:8192%\n") template(name="rawoutput" type="string" string="%msg:2:65537%\n")
$ActionFileDefaultTemplate rawoutput $ActionFileDefaultTemplate rawoutput
$FileCreateMode 0600 $FileCreateMode 0600
......
...@@ -2,8 +2,9 @@ global ...@@ -2,8 +2,9 @@ global
pidfile {{ configuration['pid-file'] }} pidfile {{ configuration['pid-file'] }}
# master-worker is compatible with foreground with process management # master-worker is compatible with foreground with process management
master-worker master-worker
tune.http.logurilen 16384
log {{ configuration['log-socket'] }} len 65535 local0
log {{ configuration['log-socket'] }} local0
defaults defaults
log global log global
mode http mode http
......
...@@ -6,7 +6,7 @@ module( ...@@ -6,7 +6,7 @@ module(
# haproxy emits enough information by itself # haproxy emits enough information by itself
# Also cut out first empty space in msg, which is related to rsyslogd # Also cut out first empty space in msg, which is related to rsyslogd
# internal and end up cutting on 8k, as it's default of $MaxMessageSize # internal and end up cutting on 8k, as it's default of $MaxMessageSize
template(name="rawoutput" type="string" string="%msg:2:8192%\n") template(name="rawoutput" type="string" string="%msg:2:65537%\n")
$ActionFileDefaultTemplate rawoutput $ActionFileDefaultTemplate rawoutput
$FileCreateMode 0600 $FileCreateMode 0600
......
...@@ -8,12 +8,13 @@ global ...@@ -8,12 +8,13 @@ global
# master-worker is compatible with foreground with process management # master-worker is compatible with foreground with process management
master-worker master-worker
expose-experimental-directives expose-experimental-directives
log {{ configuration['log-socket'] }} local0 tune.http.logurilen 16384
log {{ configuration['log-socket'] }} len 65535 local0
defaults defaults
mode http mode http
log global log global
option httplog log-format "%{+E}o {{ '{' }}%b{{ '}' }} %ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq!!!%ci - %[capture.req.hdr(0)] [%trl] \"%HM %[capture.req.uri] %HV\" %ST %B \"%[capture.req.hdr(1)]\" \"%[capture.req.hdr(2)]\" %Ta"
timeout queue 60s timeout queue 60s
timeout server {{ configuration['request-timeout'] }}s timeout server {{ configuration['request-timeout'] }}s
timeout client {{ configuration['request-timeout'] }}s timeout client {{ configuration['request-timeout'] }}s
...@@ -42,7 +43,6 @@ defaults ...@@ -42,7 +43,6 @@ defaults
capture request header REMOTE_USER len 255 capture request header REMOTE_USER len 255
capture request header Referer len 255 capture request header Referer len 255
capture request header User-Agent len 255 capture request header User-Agent len 255
log-format "%{+E}o {{ '{' }}%b{{ '}' }} %ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq!!!%ci - %[capture.req.hdr(0)] [%trl] \"%HM %[capture.req.uri] %HV\" %ST %B \"%[capture.req.hdr(1)]\" \"%[capture.req.hdr(2)]\" %Ta"
# setup Via # setup Via
http-request add-header Via "%HV rapid-cdn-frontend-{{ configuration['node-id'] }}-{{ configuration['version-hash'] }}" http-request add-header Via "%HV rapid-cdn-frontend-{{ configuration['node-id'] }}-{{ configuration['version-hash'] }}"
# setup X-Forwarded-For # setup X-Forwarded-For
......
...@@ -2111,7 +2111,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin): ...@@ -2111,7 +2111,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
) )
# check retention # check retention
old_time = time.time() - (400 * 24 * 3600) # 4000 is default configuration:rotate-num, so make the log a bit older
old_time = time.time() - (4010 * 24 * 3600)
os.utime( os.utime(
os.path.join(ats_logrotate_dir, older_file_name + '.xz'), os.path.join(ats_logrotate_dir, older_file_name + '.xz'),
(old_time, old_time)) (old_time, old_time))
...@@ -2365,7 +2366,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin): ...@@ -2365,7 +2366,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
) )
result = fakeHTTPSResult( result = fakeHTTPSResult(
parameter_dict['domain'], parameter_dict['domain'],
'test-path/deep/.././deeper', '/test-path/deep/.././deeper' * 250,
headers={ headers={
'Timeout': '10', # more than default backend-connect-timeout == 5 'Timeout': '10', # more than default backend-connect-timeout == 5
'Accept-Encoding': 'gzip', 'Accept-Encoding': 'gzip',
...@@ -2379,7 +2380,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin): ...@@ -2379,7 +2380,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
headers = self.assertResponseHeaders(result) headers = self.assertResponseHeaders(result)
self.assertNotIn('Strict-Transport-Security', headers) self.assertNotIn('Strict-Transport-Security', headers)
self.assertEqualResultJson(result, 'Path', '?a=b&c=/test-path/deeper') self.assertEqualResultJson(
result, 'Path', '?a=b&c=' + '/test-path/deeper' * 250)
try: try:
j = result.json() j = result.json()
...@@ -2399,7 +2401,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin): ...@@ -2399,7 +2401,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
'_Url_access_log', '_Url_access_log',
r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} - - ' r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} - - '
r'\[\d{2}\/.{3}\/\d{4}\:\d{2}\:\d{2}\:\d{2} \+\d{4}\] ' r'\[\d{2}\/.{3}\/\d{4}\:\d{2}\:\d{2}\:\d{2} \+\d{4}\] '
r'"GET \/test-path\/deep\/..\/.\/deeper ' r'"GET \/(\/test-path\/deep\/..\/.\/deeper){250} '
r'HTTP\/%(http_version)s" \d{3} ' r'HTTP\/%(http_version)s" \d{3} '
r'\d+ "-" "TEST USER AGENT" \d+' % dict( r'\d+ "-" "TEST USER AGENT" \d+' % dict(
http_version=self.max_client_version) http_version=self.max_client_version)
...@@ -2423,7 +2425,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin): ...@@ -2423,7 +2425,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
r'\d+/\d+\/\d+\/\d+\/\d+ ' r'\d+/\d+\/\d+\/\d+\/\d+ '
r'200 \d+ - - ---- ' r'200 \d+ - - ---- '
r'\d+\/\d+\/\d+\/\d+\/\d+ \d+\/\d+ ' r'\d+\/\d+\/\d+\/\d+\/\d+ \d+\/\d+ '
r'"GET /test-path/deeper HTTP/1.1"' r'"GET (/test-path/deeper){250} HTTP/1.1"'
) )
result_http = fakeHTTPResult( result_http = fakeHTTPResult(
......
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"slave-frontend": { "slave-frontend": {
......
{ {
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters", "name": "Output Parameters",
"properties": { "properties": {
"backend-url": { "backend-url": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"properties": { "properties": {
"db_password": { "db_password": {
"description": "Database password. If no password set, a password will be generated. This parameter is set only if database is not created yet.", "description": "Database password. If no password set, a password will be generated. This parameter is set only if database is not created yet.",
......
...@@ -35,11 +35,11 @@ branch = master ...@@ -35,11 +35,11 @@ branch = master
[eggs] [eggs]
eggs += eggs +=
slapos.core slapos.core
dummy += dummy +=
${vifib:location} ${vifib:location}
${slapos-bin:location} ${slapos-bin:location}
extra-paths += extra-paths +=
${vifib:location}/master ${vifib:location}/master
${slapos-bin:location} ${slapos-bin:location}
...@@ -64,11 +64,6 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -64,11 +64,6 @@ url = ${:_profile_base_location_}/${:filename}
[template-haproxy-cfg] [template-haproxy-cfg]
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
[versions]
python-memcached = 1.47
xml-marshaller = 1.0.2
# Test Suite: SlapOS-Master.UnitTest-Master ran at 2024/07/12 21:10:13.771752 UTC # Test Suite: SlapOS-Master.UnitTest-Master ran at 2024/07/12 21:10:13.771752 UTC
# 0 failures, 0 errors, 1390 total, status: PASS # 0 failures, 0 errors, 1390 total, status: PASS
...@@ -94,4 +89,3 @@ revision = 3996ae1f832ca438ead9fbcf0ab8082dd1d22021 ...@@ -94,4 +89,3 @@ revision = 3996ae1f832ca438ead9fbcf0ab8082dd1d22021
[wendelin] [wendelin]
revision = eb4706e934566001d778ffb0082656ea813dfa26 revision = eb4706e934566001d778ffb0082656ea813dfa26
...@@ -47,6 +47,11 @@ setup = ${slapos-repository:location}/software/backupserver/test/ ...@@ -47,6 +47,11 @@ setup = ${slapos-repository:location}/software/backupserver/test/
egg = slapos.test.dufs egg = slapos.test.dufs
setup = ${slapos-repository:location}/software/dufs/test/ setup = ${slapos-repository:location}/software/dufs/test/
[slapos.test.dependency-track-setup]
<= setup-develop-egg
egg = slapos.test.dependencytrack
setup = ${slapos-repository:location}/software/dependency-track/test/
[slapos.test.erp5-setup] [slapos.test.erp5-setup]
<= setup-develop-egg <= setup-develop-egg
egg = slapos.test.erp5 egg = slapos.test.erp5
...@@ -355,6 +360,7 @@ eggs += ...@@ -355,6 +360,7 @@ eggs +=
${slapos.test.caucase-setup:egg} ${slapos.test.caucase-setup:egg}
${slapos.test.cloudooo-setup:egg} ${slapos.test.cloudooo-setup:egg}
${slapos.test.dream-setup:egg} ${slapos.test.dream-setup:egg}
${slapos.test.dependency-track-setup:egg}
${slapos.test.dufs-setup:egg} ${slapos.test.dufs-setup:egg}
${slapos.test.erp5-setup:egg} ${slapos.test.erp5-setup:egg}
${slapos.test.erp5testnode-setup:egg} ${slapos.test.erp5testnode-setup:egg}
...@@ -446,6 +452,7 @@ tests = ...@@ -446,6 +452,7 @@ tests =
caucase ${slapos.test.caucase-setup:setup} caucase ${slapos.test.caucase-setup:setup}
cloudooo ${slapos.test.cloudooo-setup:setup} cloudooo ${slapos.test.cloudooo-setup:setup}
dream ${slapos.test.dream-setup:setup} dream ${slapos.test.dream-setup:setup}
dependency-track ${slapos.test.dependency-track-setup:setup}
dufs ${slapos.test.dufs-setup:setup} dufs ${slapos.test.dufs-setup:setup}
erp5 ${slapos.test.erp5-setup:setup} erp5 ${slapos.test.erp5-setup:setup}
erp5-py3 ${slapos.test.erp5-setup:setup} erp5-py3 ${slapos.test.erp5-setup:setup}
......
{ {
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "http://json-schema.org/draft-06/schema#",
"type": "object", "type": "object",
"description": "Parameters to instantiate Theia", "description": "Parameters to instantiate Theia",
"additionalProperties": false, "additionalProperties": false,
......
{ {
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "https://json-schema.org/draft/2020-12/schema#",
"type": "object", "type": "object",
"description": "Parameters to instantiate resilient Theia", "description": "Parameters to instantiate resilient Theia",
"allOf": [ "allOf": [
{ {
"$ref": "./instance-input-schema.json#" "$ref": "./instance-input-schema.json#",
"additionalProperties": true
}, },
{ {
"additionalProperties": true,
"properties": { "properties": {
"resilient-clone-number": { "resilient-clone-number": {
"title": "Amount of backup(s) to create", "title": "Amount of backup(s) to create",
......
...@@ -498,7 +498,8 @@ class TakeoverMixin(ExportAndImportMixin): ...@@ -498,7 +498,8 @@ class TakeoverMixin(ExportAndImportMixin):
def _requestTakeover(self, takeover_url, takeover_password): def _requestTakeover(self, takeover_url, takeover_password):
resp = requests.get("%s?password=%s" % (takeover_url, takeover_password), verify=True) resp = requests.get("%s?password=%s" % (takeover_url, takeover_password), verify=True)
self.assertEqual(requests.codes.ok, resp.status_code) self.assertEqual(requests.codes.ok, resp.status_code)
self.assertNotIn("Error", resp.text, "An Error occured: %s" % resp.text) # Allow KeyError because of stricter "slapos request" command
self.assertNotIn("Error", resp.text.replace("KeyError: \\'frozen\\'", ""), "An Error occured: %s" % resp.text)
self.assertIn("Success", resp.text, "An Error occured: %s" % resp.text) self.assertIn("Success", resp.text, "An Error occured: %s" % resp.text)
return resp.text return resp.text
......
{ {
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Resiliency Parameters", "title": "Resiliency Parameters",
"description": "List of possible parameters used in the resilient stack", "description": "List of possible parameters used in the resilient stack",
"type": "object", "type": "object",
......
...@@ -269,6 +269,7 @@ lxml-html-clean = 0.1.1 ...@@ -269,6 +269,7 @@ lxml-html-clean = 0.1.1
manuel = 1.11.2 manuel = 1.11.2
MarkupSafe = 2.1.3 MarkupSafe = 2.1.3
matplotlib = 2.1.2 matplotlib = 2.1.2
matplotlib-inline = 0.1.6:whl
meld3 = 1.0.2 meld3 = 1.0.2
mistune = 0.8.4 mistune = 0.8.4
mock = 3.0.5 mock = 3.0.5
...@@ -353,7 +354,7 @@ simplegeneric = 0.8.1 ...@@ -353,7 +354,7 @@ simplegeneric = 0.8.1
singledispatch = 3.4.0.3 singledispatch = 3.4.0.3
six = 1.16.0 six = 1.16.0
slapos.cookbook = 1.0.360 slapos.cookbook = 1.0.360
slapos.core = 1.11.0 slapos.core = 1.12.0
slapos.extension.shared = 1.0 slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.25 slapos.libnetworkcache = 0.25
slapos.rebootstrap = 4.7 slapos.rebootstrap = 4.7
...@@ -435,6 +436,7 @@ beautifulsoup4 = 4.8.2 ...@@ -435,6 +436,7 @@ beautifulsoup4 = 4.8.2
certifi = 2020.4.5.1 certifi = 2020.4.5.1
charset-normalizer = 2.0.12 charset-normalizer = 2.0.12
click = 6.7 click = 6.7
cycler = 0.10.0
distro = 1.6.0 distro = 1.6.0
feedparser = 5.2.1 feedparser = 5.2.1
Flask = 1.1.2 Flask = 1.1.2
......
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