Commit d54d8659 authored by Jérome Perrin's avatar Jérome Perrin

Update Release Candidate

parents 2fadcb00 6fbce8e4
Pipeline #34302 failed with stage
in 0 seconds
...@@ -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.58 version = 2.4.59
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2 url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 30377ec4d7fb8361e1d1f2ab3158b467 md5sum = 9f77eb01b2fddfb4b32d469af90fb01b
configure-options = --disable-static configure-options = --disable-static
--enable-authn-alias --enable-authn-alias
--enable-bucketeer --enable-bucketeer
......
...@@ -14,7 +14,7 @@ setup = ${cloudooo-repository:location} ...@@ -14,7 +14,7 @@ setup = ${cloudooo-repository:location}
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/cloudooo.git repository = https://lab.nexedi.com/nexedi/cloudooo.git
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
revision = 98055878283583fad61374c93fb777c7a91fa070 revision = 2536160661791c7b4704f57a42fb181cb6633d7a
[cloudooo] [cloudooo]
recipe = zc.recipe.egg recipe = zc.recipe.egg
......
...@@ -23,6 +23,10 @@ patches = ...@@ -23,6 +23,10 @@ patches =
https://github.com/coreutils/coreutils/commit/c4c5ed8f4e9cd55a12966d4f520e3a13101637d9.patch#b6810d7559ffbc5e24636a860f02e836 https://github.com/coreutils/coreutils/commit/c4c5ed8f4e9cd55a12966d4f520e3a13101637d9.patch#b6810d7559ffbc5e24636a860f02e836
patch-options = -p1 patch-options = -p1
# disable year 2038 problem ONLY for 32 bit architectures
[coreutils:bits32]
configure-options += --disable-year2038
[coreutils-output] [coreutils-output]
# Shared binary location to ease migration # Shared binary location to ease migration
recipe = plone.recipe.command recipe = plone.recipe.command
......
...@@ -35,7 +35,7 @@ depends = ...@@ -35,7 +35,7 @@ depends =
${patch:recipe} ${patch:recipe}
recipe = slapos.recipe.build recipe = slapos.recipe.build
# Latest version provided by SlapOS. # Latest version provided by SlapOS.
part = gcc-8.5 part = gcc-10.5
# Minimum version for all components that might be required for # Minimum version for all components that might be required for
# slapos.rebootstrap (see https://bugs.python.org/issue34112 about Python 3.7+). # slapos.rebootstrap (see https://bugs.python.org/issue34112 about Python 3.7+).
min_version = 5.4 min_version = 5.4
......
...@@ -4,13 +4,14 @@ parts = ...@@ -4,13 +4,14 @@ parts =
extends = extends =
../defaults.cfg ../defaults.cfg
../libtool/buildout.cfg
../intltool/buildout.cfg
../glib/buildout.cfg
../python-slip/buildout.cfg
../dbus/buildout.cfg ../dbus/buildout.cfg
../flex/buildout.cfg ../flex/buildout.cfg
../glib/buildout.cfg
../gnu-config/buildout.cfg
../intltool/buildout.cfg
../libtool/buildout.cfg
../nftables/buildout.cfg ../nftables/buildout.cfg
../python-slip/buildout.cfg
[firewalld] [firewalld]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
...@@ -67,6 +68,7 @@ environment = ...@@ -67,6 +68,7 @@ environment =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/gobject-introspection-1.50.0.tar.xz url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/gobject-introspection-1.50.0.tar.xz
md5sum = 5af8d724f25d0c9cfbe6df41b77e5dc0 md5sum = 5af8d724f25d0c9cfbe6df41b77e5dc0
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess build-aux/
configure-options = configure-options =
--disable-static --disable-static
...@@ -88,6 +90,7 @@ url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/pygobject-3.22.0.t ...@@ -88,6 +90,7 @@ url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/pygobject-3.22.0.t
python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python${python:version}/site-packages python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python${python:version}/site-packages
md5sum = ed4117ed5d554d25fd7718807fbf819f md5sum = ed4117ed5d554d25fd7718807fbf819f
pre-configure = pre-configure =
cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess .
sed -i 's#/usr/local#${gobject-introspection:location}#g' ${gobject-introspection:location}/lib/pkgconfig/gobject-introspection-1.0.pc sed -i 's#/usr/local#${gobject-introspection:location}#g' ${gobject-introspection:location}/lib/pkgconfig/gobject-introspection-1.0.pc
configure-options = configure-options =
--disable-static --disable-static
......
[buildout] [buildout]
extends = extends =
../bison/buildout.cfg ../bison/buildout.cfg
../gnu-config/buildout.cfg
../m4/buildout.cfg ../m4/buildout.cfg
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
parts = parts =
...@@ -11,6 +12,7 @@ recipe = slapos.recipe.cmmi ...@@ -11,6 +12,7 @@ recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz url = https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz
md5sum = 2882e3179748cc9f9c23ec593d6adc8d md5sum = 2882e3179748cc9f9c23ec593d6adc8d
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess build-aux/
environment = environment =
M4=${m4:location}/bin/m4 M4=${m4:location}/bin/m4
PATH=${bison:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${bison:location}/bin:${xz-utils:location}/bin:%(PATH)s
......
...@@ -10,7 +10,7 @@ extends = ...@@ -10,7 +10,7 @@ extends =
../binutils/buildout.cfg ../binutils/buildout.cfg
parts = parts =
gcc-8.5 gcc-10.5
[gcc-common] [gcc-common]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
...@@ -63,39 +63,12 @@ extra-configure-options = ...@@ -63,39 +63,12 @@ extra-configure-options =
--with-fpu=vfp --with-fpu=vfp
--with-float=hard --with-float=hard
[gcc-5.5]
<= gcc-common
version = 5.5.0
md5sum = 0f70424213b4a1113c04ba66ddda0c1f
# make install does not work when several core are used
make-targets = install -j1
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${:_profile_base_location_}/libsanitizer_Use_pre-computed_size_of_struct_ustat_for_Linux.patch#1e5f33e89f9fe1ca3e406eabcc621762
${:_profile_base_location_}/glibc2.30-ipc_perm.patch#563b7f5a38c2ea6bf741c328422b4c98
[gcc-8.5] [gcc-8.5]
<= gcc-common <= gcc-common
version = 8.5.0 version = 8.5.0
md5sum = 0c1f625768840187ef3b10adebe8e3b0 md5sum = 0c1f625768840187ef3b10adebe8e3b0
[gcc-10.2] [gcc-10.5]
<= gcc-common <= gcc-common
version = 10.2.0 version = 10.5.0
md5sum = e9fd9b1789155ad09bcf3ae747596b50 md5sum = c7d1958570fbd1cd859b015774b9987a
[gcc-minimal]
<= gcc-5.5
configure-options =
--disable-bootstrap
--disable-multilib
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--enable-languages=c
--without-isl
--without-cloog
environment =
LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
PATH=${perl:location}/bin:${tar:location}/bin:%(PATH)s
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 2020-02-28 11:49:29.763277856 +0000
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 2020-02-28 11:49:45.092909823 +0000
@@ -198,8 +198,7 @@
unsigned long long __unused1;
unsigned long long __unused2;
#else
- unsigned short mode;
- unsigned short __pad1;
+ unsigned int mode;
unsigned short __seq;
unsigned short __pad2;
#if defined(__x86_64__) && !defined(_LP64)
From 15f0e921f47a9b81c4a30295c8685ad37d3ff4e0 Mon Sep 17 00:00:00 2001
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 24 May 2018 19:52:32 +0000
Subject: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux
Cherry-pick compiler-rt revision 333213:
<sys/ustat.h> has been removed from glibc 2.28 by:
commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Sun Mar 18 11:28:59 2018 +0800
Deprecate ustat syscall interface
This patch uses pre-computed size of struct ustat for Linux.
PR sanitizer/85835
* sanitizer_common/sanitizer_platform_limits_posix.cc: Don't
include <sys/ustat.h> for Linux.
(SIZEOF_STRUCT_USTAT): New.
(struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260684 138bc75d-0d04-0410-961f-82ee72b054a4
---
libsanitizer/ChangeLog | 8 ++++++++
.../sanitizer_common/sanitizer_platform_limits_posix.cc | 15 +++++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
# Hunk commented-out as this does not apply on gcc 5.5 .
#diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
#index 2ec1a9a..286b789 100644
#--- a/libsanitizer/ChangeLog
#+++ b/libsanitizer/ChangeLog
#@@ -1,3 +1,11 @@
#+2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
#+
#+ PR sanitizer/85835
#+ * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't
#+ include <sys/ustat.h> for Linux.
#+ (SIZEOF_STRUCT_USTAT): New.
#+ (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux.
#+
# 2018-04-26 Hans-Peter Nilsson <hp@axis.com>
#
# * configure.tgt <mips*-*-linux*>: Enable build, excluding
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
index 858bb21..de18e56 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t;
# include <sys/procfs.h>
#endif
#include <sys/user.h>
-#include <sys/ustat.h>
#include <linux/cyclades.h>
#include <linux/if_eql.h>
#include <linux/if_plip.h>
@@ -250,7 +249,19 @@ namespace __sanitizer {
#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
#if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned struct_ustat_sz = sizeof(struct ustat);
+ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+ // has been removed from glibc 2.28.
+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
+ || defined(__x86_64__)
+#define SIZEOF_STRUCT_USTAT 32
+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
+ || defined(__powerpc__) || defined(__s390__)
+#define SIZEOF_STRUCT_USTAT 20
+#else
+#error Unknown size of struct ustat
+#endif
+ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
--
2.9.3
[buildout] [buildout]
extends =
../gnu-config/buildout.cfg
parts = parts =
gdbm gdbm
...@@ -8,6 +10,7 @@ shared = true ...@@ -8,6 +10,7 @@ shared = true
version = 1.23 version = 1.23
url = http://ftp.gnu.org/gnu/gdbm/gdbm-${:version}.tar.gz url = http://ftp.gnu.org/gnu/gdbm/gdbm-${:version}.tar.gz
md5sum = 8551961e36bf8c70b7500d255d3658ec md5sum = 8551961e36bf8c70b7500d255d3658ec
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess build-aux/
configure-options = configure-options =
--disable-static --disable-static
--enable-libgdbm-compat --enable-libgdbm-compat
......
...@@ -98,8 +98,8 @@ patches += ...@@ -98,8 +98,8 @@ patches +=
[golang1.16] [golang1.16]
<= golang-common-pre-1.19 <= golang-common-pre-1.19
url = https://golang.org/dl/go1.16.13.src.tar.gz url = https://golang.org/dl/go1.16.15.src.tar.gz
md5sum = 1c076f952d9af57590a36fa7d36f695a md5sum = fda3664a020a79fabe2d0d5d9d10861f
# go1.16 needs go1.4 to bootstrap # go1.16 needs go1.4 to bootstrap
environment-extra = environment-extra =
...@@ -116,8 +116,8 @@ environment-extra = ...@@ -116,8 +116,8 @@ environment-extra =
[golang1.18] [golang1.18]
<= golang-common-pre-1.19 <= golang-common-pre-1.19
url = https://golang.org/dl/go1.18.9.src.tar.gz url = https://golang.org/dl/go1.18.10.src.tar.gz
md5sum = e2caa7c4de49aa77a14c694bfc9a5cd1 md5sum = 002b4daec72ab396dc023a5ec445a68a
# go1.18 needs go1.4 or go1.17 to bootstrap. # go1.18 needs go1.4 or go1.17 to bootstrap.
# We use go1.4 to reduce the amount of components which # We use go1.4 to reduce the amount of components which
...@@ -128,16 +128,16 @@ environment-extra = ...@@ -128,16 +128,16 @@ environment-extra =
[golang1.20] [golang1.20]
<= golang-common-pre-1.21 <= golang-common-pre-1.21
url = https://go.dev/dl/go1.20.6.src.tar.gz url = https://go.dev/dl/go1.20.14.src.tar.gz
md5sum = 1dc2d18790cfaede7df1e73a1eff8b7b md5sum = 71103194b2ca39cc9cb943df9aa6154c
# go1.20 requires go1.17.13 to bootstrap (see https://go.dev/doc/go1.20#bootstrap) # go1.20 requires go1.17.13 to bootstrap (see https://go.dev/doc/go1.20#bootstrap)
environment-extra = environment-extra =
GOROOT_BOOTSTRAP=${golang1.17:location} GOROOT_BOOTSTRAP=${golang1.17:location}
[golang1.21] [golang1.21]
<= golang-common <= golang-common
url = https://go.dev/dl/go1.21.5.src.tar.gz url = https://go.dev/dl/go1.21.9.src.tar.gz
md5sum = 99385ded31906f1554c27015bbbee52d md5sum = 3cc8b75a5499b5d309f267e21c3432df
# go1.21 requires go1.17.13 to bootstrap (see https://go.dev/blog/rebuild) # go1.21 requires go1.17.13 to bootstrap (see https://go.dev/blog/rebuild)
environment-extra = environment-extra =
GOROOT_BOOTSTRAP=${golang1.17:location} GOROOT_BOOTSTRAP=${golang1.17:location}
......
...@@ -24,8 +24,6 @@ extends = ...@@ -24,8 +24,6 @@ extends =
../popt/buildout.cfg ../popt/buildout.cfg
../xorg/buildout.cfg ../xorg/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
# Inkscape < 1.1 only supports old gcc and needs python2 (and python3)
../python-2.7/buildout.cfg
../defaults.cfg ../defaults.cfg
[gcc] [gcc]
...@@ -48,6 +46,9 @@ recipe = slapos.recipe.cmmi ...@@ -48,6 +46,9 @@ recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://media.inkscape.org/dl/resources/file/inkscape-0.92.5.tar.bz2 url = https://media.inkscape.org/dl/resources/file/inkscape-0.92.5.tar.bz2
md5sum = 592c0e94cf00ea9e0a8901883d8f06fd md5sum = 592c0e94cf00ea9e0a8901883d8f06fd
patch-options = -p1
patches =
${:_profile_base_location_}/inkscape-0.92.5-py3.patch#9407a330c68690b2050f159d0aefb1f7
pkg_config_depends = ${freetype:location}/lib/pkgconfig:${gtkmm:location}/lib/pkgconfig:${gtkmm:pkg_config_depends}:${gsl:location}/lib/pkgconfig:${popt:location}/lib/pkgconfig:${garbage-collector:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig pkg_config_depends = ${freetype:location}/lib/pkgconfig:${gtkmm:location}/lib/pkgconfig:${gtkmm:pkg_config_depends}:${gsl:location}/lib/pkgconfig:${popt:location}/lib/pkgconfig:${garbage-collector:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig
configure-command = ${cmake:location}/bin/cmake configure-command = ${cmake:location}/bin/cmake
configure-options = configure-options =
...@@ -59,7 +60,7 @@ configure-options = ...@@ -59,7 +60,7 @@ configure-options =
-DWITH_LIBVISIO=OFF -DWITH_LIBVISIO=OFF
-DWITH_LIBWPG=OFF -DWITH_LIBWPG=OFF
environment = environment =
PATH=${cmake:location}/bin:${freetype:location}/bin:${gdk-pixbuf:location}/bin:${gettext:location}/bin:${glib:location}/bin:${intltool:location}/bin:${libxml2:location}/bin:${pango:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${python3:location}/bin:${python2.7:location}/bin:%(PATH)s PATH=${cmake:location}/bin:${freetype:location}/bin:${gdk-pixbuf:location}/bin:${gettext:location}/bin:${glib:location}/bin:${intltool:location}/bin:${libxml2:location}/bin:${pango:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${python3:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends} PKG_CONFIG_PATH=${:pkg_config_depends}
CMAKE_INCLUDE_PATH=${boost-lib:location}/include:${freetype:location}/include:${garbage-collector:location}/include:${libjpeg:location}/include:${lcms2:location}/include:${libpng:location}/include:${zlib:location}/include CMAKE_INCLUDE_PATH=${boost-lib:location}/include:${freetype:location}/include:${garbage-collector:location}/include:${libjpeg:location}/include:${lcms2:location}/include:${libpng:location}/include:${zlib:location}/include
CMAKE_LIBRARY_PATH=${boost-lib:location}/lib:${freetype:location}/lib:${garbage-collector:location}/lib:${lcms2:location}/lib:${libjpeg:location}/lib:${libpng:location}/lib:${zlib:location}/lib CMAKE_LIBRARY_PATH=${boost-lib:location}/lib:${freetype:location}/lib:${garbage-collector:location}/lib:${lcms2:location}/lib:${libjpeg:location}/lib:${libpng:location}/lib:${zlib:location}/lib
......
diff -ur inkscape-0.92.5.orig/share/filters/CMakeLists.txt inkscape-0.92.5/share/filters/CMakeLists.txt
--- inkscape-0.92.5.orig/share/filters/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/filters/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -1,6 +1,6 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
)
diff -ur inkscape-0.92.5.orig/share/filters/i18n.py inkscape-0.92.5/share/filters/i18n.py
--- inkscape-0.92.5.orig/share/filters/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/filters/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
diff -ur inkscape-0.92.5.orig/share/filters/samplify.py inkscape-0.92.5/share/filters/samplify.py
--- inkscape-0.92.5.orig/share/filters/samplify.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/filters/samplify.py 2024-04-05 13:02:54.033210445 +0000
@@ -5,33 +5,33 @@
#
# Run it thus:
#
-# python samplify.py sample.svg filters.svg > out.svg
+# python3 samplify.py sample.svg filters.svg > out.svg
#
# It requires 'inkscape' in executable path for dimension queries.
-import sys, os, string
+import sys, os, string, subprocess
from lxml import etree
if len(sys.argv) < 3:
- sys.stderr.write ("Usage: python samplify.py sample.svg filters.svg > out.svg\n")
+ sys.stderr.write ("Usage: python3 samplify.py sample.svg filters.svg > out.svg\n")
sys.exit(1)
# namespaces we need to be aware of
NSS = {
-u'sodipodi' :u'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
-u'cc' :u'http://web.resource.org/cc/',
-u'svg' :u'http://www.w3.org/2000/svg',
-u'dc' :u'http://purl.org/dc/elements/1.1/',
-u'rdf' :u'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
-u'inkscape' :u'http://www.inkscape.org/namespaces/inkscape',
-u'xlink' :u'http://www.w3.org/1999/xlink',
-u'xml' :u'http://www.w3.org/XML/1998/namespace'
+'sodipodi' :'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
+'cc' :'http://web.resource.org/cc/',
+'svg' :'http://www.w3.org/2000/svg',
+'dc' :'http://purl.org/dc/elements/1.1/',
+'rdf' :'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
+'inkscape' :'http://www.inkscape.org/namespaces/inkscape',
+'xlink' :'http://www.w3.org/1999/xlink',
+'xml' :'http://www.w3.org/XML/1998/namespace'
}
# helper function to add namespace URI to a name
def addNS(tag, ns=None):
val = tag
- if ns!=None and len(ns)>0 and NSS.has_key(ns) and len(tag)>0 and tag[0]!='{':
+ if ns!=None and len(ns)>0 and ns in NSS and len(tag)>0 and tag[0]!='{':
val = "{%s}%s" % (NSS[ns], tag)
return val
@@ -88,10 +88,8 @@
file = sys.argv[1]
id = tdoc.getroot().attrib["id"]
for query in q.keys():
- f,err = os.popen3('inkscape --query-%s --query-id=%s "%s"' % (query,id,file))[1:]
- q[query] = float(f.read())
- f.close()
- err.close()
+ f = subprocess.Popen(["inkscape", "--query-%s"%query, "--query-id=%s"%id, "%s"%file], stdout=subprocess.PIPE)
+ q[query] = float(f.stdout.read())
# add some margins
q['width'] = q['width'] * 1.3
@@ -138,7 +136,7 @@
newroot.append(text)
if a_tooltip not in fi.keys():
- print "no menu-tooltip for", fi.attrib["id"]
+ print("no menu-tooltip for", fi.attrib["id"])
sys.exit()
text = etree.Element(e_text, nsmap=NSS)
@@ -156,5 +154,5 @@
tout.getroot().attrib['width'] = str(total_width)
tout.getroot().attrib['height'] = str(total_height)
-print etree.tostring(tout, encoding='UTF-8')
+print(etree.tostring(tout, encoding='UTF-8'))
diff -ur inkscape-0.92.5.orig/share/palettes/CMakeLists.txt inkscape-0.92.5/share/palettes/CMakeLists.txt
--- inkscape-0.92.5.orig/share/palettes/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/palettes/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -2,7 +2,7 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES}
)
diff -ur inkscape-0.92.5.orig/share/palettes/PaletteGen.py inkscape-0.92.5/share/palettes/PaletteGen.py
--- inkscape-0.92.5.orig/share/palettes/PaletteGen.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/palettes/PaletteGen.py 2024-04-05 13:02:54.033210445 +0000
@@ -1,9 +1,9 @@
import colorsys
-print '''GIMP Palette
+print('''GIMP Palette
Name: Inkscape default
Columns: 3
-# generated by PaletteGen.py'''
+# generated by PaletteGen.py''')
# grays
@@ -25,7 +25,7 @@
line = "%3s %3s %3s White" % (rval, gval, bval)
else:
line = "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - int(level * 100))
- print line
+ print(line)
# add three more steps near white
if i == g_steps - 1:
@@ -34,25 +34,25 @@
rval = int(round(r * 255))
gval = int(round(g * 255))
bval = int(round(b * 255))
- print "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_m * 100))
+ print("%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_m * 100)))
level_m = level + 0.5 * g_step_size
r, g, b = colorsys.hls_to_rgb(0, level_m, 0)
rval = int(round(r * 255))
gval = int(round(g * 255))
bval = int(round(b * 255))
- print "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - int(level_m * 100))
+ print("%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - int(level_m * 100)))
level_mm = level + 0.75 * g_step_size
r, g, b = colorsys.hls_to_rgb(0, level_mm, 0)
rval = int(round(r * 255))
gval = int(round(g * 255))
bval = int(round(b * 255))
- print "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_mm * 100))
+ print("%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_mm * 100)))
# standard HTML colors
-print '''128 0 0 Maroon (#800000)
+print('''128 0 0 Maroon (#800000)
255 0 0 Red (#FF0000)
128 128 0 Olive (#808000)
255 255 0 Yellow (#FFFF00)
@@ -63,7 +63,7 @@
0 0 128 Navy (#000080)
0 0 255 Blue (#0000FF)
128 0 128 Purple (#800080)
-255 0 255 Fuchsia (#FF00FF)'''
+255 0 255 Fuchsia (#FF00FF)''')
# HSL palette
h_steps = 15
@@ -88,4 +88,4 @@
bval = int(round(b * 255))
line = "%3s %3s %3s #%02X%02X%02X" % (rval, gval, bval, rval, gval, bval)
- print line
+ print(line)
diff -ur inkscape-0.92.5.orig/share/palettes/i18n.py inkscape-0.92.5/share/palettes/i18n.py
--- inkscape-0.92.5.orig/share/palettes/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/palettes/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import glob
diff -ur inkscape-0.92.5.orig/share/patterns/CMakeLists.txt inkscape-0.92.5/share/patterns/CMakeLists.txt
--- inkscape-0.92.5.orig/share/patterns/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/patterns/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -1,6 +1,6 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
)
diff -ur inkscape-0.92.5.orig/share/patterns/i18n.py inkscape-0.92.5/share/patterns/i18n.py
--- inkscape-0.92.5.orig/share/patterns/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/patterns/i18n.py 2024-04-05 12:47:06.522276571 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
diff -ur inkscape-0.92.5.orig/share/symbols/CMakeLists.txt inkscape-0.92.5/share/symbols/CMakeLists.txt
--- inkscape-0.92.5.orig/share/symbols/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/symbols/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -2,7 +2,7 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
)
diff -ur inkscape-0.92.5.orig/share/symbols/i18n.py inkscape-0.92.5/share/symbols/i18n.py
--- inkscape-0.92.5.orig/share/symbols/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/symbols/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
diff -ur inkscape-0.92.5.orig/share/templates/CMakeLists.txt inkscape-0.92.5/share/templates/CMakeLists.txt
--- inkscape-0.92.5.orig/share/templates/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/templates/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -2,7 +2,7 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
)
diff -ur inkscape-0.92.5.orig/share/templates/i18n.py inkscape-0.92.5/share/templates/i18n.py
--- inkscape-0.92.5.orig/share/templates/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/templates/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance-jupyter-notebook] [instance-jupyter-notebook]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 9f412363ce2c2ac99e3328f7d87d456d md5sum = fd7ed44da8d8723983b8666df2971a36
[jupyter-notebook-config] [jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja filename = jupyter_notebook_config.py.jinja
md5sum = 720e90a829c63371696bc3009917a743 md5sum = 9d579353b579b6e488ae6330c7f4ad68
[jupyter-set-password] [jupyter-set-password]
filename = jupyter_set_password.cgi.jinja filename = jupyter_set_password.cgi.jinja
......
...@@ -43,9 +43,9 @@ recipe = plone.recipe.command ...@@ -43,9 +43,9 @@ recipe = plone.recipe.command
command = command =
if [ ! -e ${instance-parameter:key_file} ] if [ ! -e ${instance-parameter:key_file} ]
then then
{{ openssl_output }} req -x509 -nodes -days 3650 \ {{ openssl_output }} req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=${instance-parameter:host}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=${instance-parameter:host}" \
-newkey rsa:1024 -keyout ${instance-parameter:key_file} \ -newkey rsa -keyout ${instance-parameter:key_file} \
-out ${instance-parameter:cert_file} -out ${instance-parameter:cert_file}
fi fi
update-command = ${:command} update-command = ${:command}
......
...@@ -6,6 +6,7 @@ import ConfigParser ...@@ -6,6 +6,7 @@ import ConfigParser
import random import random
from notebook.auth import passwd from notebook.auth import passwd
import os import os
import ssl
def random_password(length = 10): def random_password(length = 10):
result = "" result = ""
...@@ -33,6 +34,9 @@ if not parser.has_option("jupyter_notebook", "password") or \ ...@@ -33,6 +34,9 @@ if not parser.has_option("jupyter_notebook", "password") or \
parser.set("jupyter_notebook", "password", random_password()) parser.set("jupyter_notebook", "password", random_password())
c.NotebookApp.password = passwd(parser.get("jupyter_notebook", "password")) c.NotebookApp.password = passwd(parser.get("jupyter_notebook", "password"))
c.NotebookApp.ssl_options = {
'ssl_version': ssl.PROTOCOL_TLSv1_2,
}
with open(knowledge_0, 'w') as file: with open(knowledge_0, 'w') as file:
parser.write(file) parser.write(file)
...@@ -16,6 +16,7 @@ patch-options = -p1 ...@@ -16,6 +16,7 @@ patch-options = -p1
patches = patches =
${:_profile_base_location_}/libdir.patch#f7274250c8ca43b10e7fc968f730b833 ${:_profile_base_location_}/libdir.patch#f7274250c8ca43b10e7fc968f730b833
configure-options = configure-options =
--disable-multi-os-directory
--disable-static --disable-static
--enable-portable-binary --enable-portable-binary
--with-gcc-arch=generic --with-gcc-arch=generic
......
...@@ -53,8 +53,8 @@ environment = ...@@ -53,8 +53,8 @@ environment =
[x11vnc] [x11vnc]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://github.com/LibVNC/x11vnc/archive/0.9.16.tar.gz url = https://github.com/LibVNC/x11vnc/archive/354602cffa8edcbe813da6dfd051b96d94b3efbc.zip
md5sum = 64172e8f896389ec963fff93415f0d93 md5sum = f9a7f5e206aa0120f3337abf0910851d
pre-configure = pre-configure =
autoreconf -fiv -I ${libtool:location}/share/aclocal -I ${pkgconfig:location}/share/aclocal -I ${gettext:location}/share/aclocal autoreconf -fiv -I ${libtool:location}/share/aclocal -I ${pkgconfig:location}/share/aclocal -I ${gettext:location}/share/aclocal
configure-options = configure-options =
......
...@@ -13,8 +13,8 @@ parts = ...@@ -13,8 +13,8 @@ parts =
[libxml2] [libxml2]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.5.tar.xz url = https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.7.tar.xz
md5sum = b2e7332289f5784087448a0717f45ac3 md5sum = e22f0dfcbd3e37b8fb09dcd1b3e5e9ce
configure-options = configure-options =
--disable-static --disable-static
--without-python --without-python
......
...@@ -15,12 +15,6 @@ parts = ...@@ -15,12 +15,6 @@ parts =
[gcc] [gcc]
min_version = 7.1 min_version = 7.1
[c-astral-xml-definition]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/c-astral-c-library.git
revision = v2.1
git-executable = ${git:location}/bin/git
[mavsdk-source] [mavsdk-source]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = https://github.com/mavlink/MAVSDK.git repository = https://github.com/mavlink/MAVSDK.git
...@@ -53,7 +47,6 @@ cmake = ${cmake:location}/bin/cmake ...@@ -53,7 +47,6 @@ cmake = ${cmake:location}/bin/cmake
depends = ${mavsdk-pythonpath:recipe} depends = ${mavsdk-pythonpath:recipe}
pre-configure = pre-configure =
${git:location}/bin/git submodule update --init --recursive ${git:location}/bin/git submodule update --init --recursive
sed -i 's#message_definitions/v1.0#${c-astral-xml-definition:location}#' ${mavsdk-source:location}/third_party/mavlink/CMakeLists.txt
configure-command = configure-command =
${:cmake} ${:cmake}
configure-options = configure-options =
...@@ -72,12 +65,3 @@ make-binary = ...@@ -72,12 +65,3 @@ make-binary =
environment = mavsdk-env environment = mavsdk-env
CMAKE_CFLAGS=-I${tinyxml2:location}/include CMAKE_CFLAGS=-I${tinyxml2:location}/include
[c-astral-wrapper]
recipe = slapos.recipe.cmmi
configure-command = true
url = https://lab.nexedi.com/nexedi/c-astral-wrapper/-/archive/v2.0/c-astral-wrapper-v2.0.tar.gz
md5sum = ee2d05d225a57d17318282ff595fd498
environment =
CPLUS_INCLUDE_PATH=${qjs-wrapper-source:location}/include:${mavsdk:location}/include:${mavsdk:location}/include/mavsdk
LDFLAGS=-L${mavsdk:location}/lib -Wl,-rpath=${mavsdk:location}/lib
...@@ -5,12 +5,13 @@ parts = ...@@ -5,12 +5,13 @@ parts =
extends = extends =
../defaults.cfg ../defaults.cfg
../gmp/buildout.cfg ../gmp/buildout.cfg
../gnu-config/buildout.cfg
[libnml] [libnml]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://www.netfilter.org/projects/libmnl/files/libmnl-1.0.4.tar.bz2 url = http://www.netfilter.org/projects/libmnl/files/libmnl-1.0.4.tar.bz2
md5sum = be9b4b5328c6da1bda565ac5dffadb2d md5sum = be9b4b5328c6da1bda565ac5dffadb2d
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess build-aux/
[libnftnl] [libnftnl]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
[buildout] [buildout]
parts = parts =
open62541 open62541
gcc-10.2
extends = extends =
../cmake/buildout.cfg ../cmake/buildout.cfg
../patch/buildout.cfg ../patch/buildout.cfg
...@@ -12,6 +11,7 @@ extends = ...@@ -12,6 +11,7 @@ extends =
../defaults.cfg ../defaults.cfg
[gcc] [gcc]
# we should remove this when open62541 compiles with gcc 12
max_version = 11 max_version = 11
[open62541] [open62541]
...@@ -38,4 +38,4 @@ configure-options = ...@@ -38,4 +38,4 @@ configure-options =
post-install = post-install =
cp src/pubsub/*.h deps/open62541_queue.h @@LOCATION@@/include cp src/pubsub/*.h deps/open62541_queue.h @@LOCATION@@/include
environment = environment =
PATH=${gcc-10.2:location}/bin:${python3:location}/bin:${patch:location}/bin:%(PATH)s PATH=${gcc:prefix}/bin:${python3:location}/bin:${patch:location}/bin:%(PATH)s
...@@ -31,4 +31,4 @@ make-options = ...@@ -31,4 +31,4 @@ make-options =
make-targets = make-targets =
PREFIX="@@LOCATION@@" install PREFIX="@@LOCATION@@" install
environment = environment =
PATH={perl:location}/bin:%(PATH)s PATH=${perl:location}/bin:%(PATH)s
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# http://pkgconfig.freedesktop.org/ # http://pkgconfig.freedesktop.org/
[buildout] [buildout]
extends =
../gnu-config/buildout.cfg
parts = parts =
pkgconfig pkgconfig
...@@ -10,6 +12,9 @@ recipe = slapos.recipe.cmmi ...@@ -10,6 +12,9 @@ recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz url = https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
md5sum = f6e931e319531b736fadc017f470e68a md5sum = f6e931e319531b736fadc017f470e68a
pre-configure =
cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess .
cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess glib/
configure-options = configure-options =
--with-internal-glib --with-internal-glib
--disable-host-tool --disable-host-tool
# SlapOS component for pygolang development.
[buildout]
extends =
buildout.cfg
../git/buildout.cfg
# override pygolang to install it from latest git version
[pygolang]
recipe = zc.recipe.egg:develop
setup = ${pygolang-repository:location}
[pygolang-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/pygolang.git
branch = master
location = ${buildout:parts-directory}/pygolang-dev
git-executable = ${git:location}/bin/git
# unpin pygolang from versions, so that buildout does not fallback to
# installing non-dev egg if dev one has changed its version.
[versions]
pygolang =
...@@ -4,15 +4,17 @@ ...@@ -4,15 +4,17 @@
[buildout] [buildout]
extends = extends =
../../component/cython/buildout.cfg ../../component/cython/buildout.cfg
../git/buildout.cfg
parts = parts =
pygolang pygolang
gpython gpython
# pygolang installed from released egg from pypi # pygolang is installed from git checkout
[pygolang] [pygolang]
recipe = zc.recipe.egg:custom recipe = zc.recipe.egg:develop
setup = ${pygolang-repository:location}
egg = pygolang egg = pygolang
setup-eggs = setup-eggs =
${cython:egg} ${cython:egg}
...@@ -27,6 +29,15 @@ scripts = gpython ...@@ -27,6 +29,15 @@ scripts = gpython
# convenience for gpython users # convenience for gpython users
exe = ${buildout:bin-directory}/gpython exe = ${buildout:bin-directory}/gpython
[pygolang-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/pygolang.git
branch = master
revision = pygolang-0.1-69-g044deb35
location = ${buildout:parts-directory}/pygolang
git-executable = ${git:location}/bin/git
# python-interpreter provides python interpreter with all specified eggs. # python-interpreter provides python interpreter with all specified eggs.
# eggs default to pygolang, but can be overwritten or changed in inherited section. # eggs default to pygolang, but can be overwritten or changed in inherited section.
# if eggs are changes, they must still have pygolang. # if eggs are changes, they must still have pygolang.
...@@ -106,7 +117,3 @@ init = ...@@ -106,7 +117,3 @@ init =
eggs += %(eggs)s eggs += %(eggs)s
interpreter = $${:_buildout_section_name_} interpreter = $${:_buildout_section_name_}
""" % locals()) """ % locals())
[versions]
pygolang = 0.1
...@@ -5,7 +5,7 @@ extends = ...@@ -5,7 +5,7 @@ extends =
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
../pytest/buildout.cfg ../pytest/buildout.cfg
../numpy/buildout.cfg ../numpy/buildout.cfg
buildout-dev.cfg buildout.cfg
parts = parts =
pygolang pygolang
......
...@@ -60,23 +60,23 @@ md5sum = dd94cab4541b57b88cf3dab32d6336e3 ...@@ -60,23 +60,23 @@ md5sum = dd94cab4541b57b88cf3dab32d6336e3
[python3.8] [python3.8]
<= python3-common <= python3-common
version = 3.8 version = 3.8
package_version = 3.8.18 package_version = 3.8.19
md5sum = 5ea6267ea00513fc31d3746feb35842d md5sum = 2532d25930266546822c144b99652254
[python3.9] [python3.9]
<= python3-common <= python3-common
version = 3.9 version = 3.9
package_version = 3.9.18 package_version = 3.9.19
md5sum = 765576c3af57deb046819ecd57804bbb md5sum = 87d0f8281237b972ff8b23e0e2c8d325
[python3.10] [python3.10]
<= python3-common <= python3-common
version = 3.10 version = 3.10
package_version = 3.10.13 package_version = 3.10.14
md5sum = 8847dc6458d1431d0ae0f55942deeb89 md5sum = 05148354ce821ba7369e5b7958435400
[python3.11] [python3.11]
<= python3-common <= python3-common
version = 3.11 version = 3.11
package_version = 3.11.8 package_version = 3.11.9
md5sum = b353b8433e560e1af2b130f56dfbd973 md5sum = 22ea467e7d915477152e99d5da856ddc
[buildout] [buildout]
extends = extends =
../git/buildout.cfg ../git/buildout.cfg
../mavsdk/buildout.cfg
../open62541/buildout.cfg ../open62541/buildout.cfg
../quickjs/buildout.cfg ../quickjs/buildout.cfg
...@@ -10,13 +9,14 @@ parts = qjs-wrapper ...@@ -10,13 +9,14 @@ parts = qjs-wrapper
[qjs-wrapper-source] [qjs-wrapper-source]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/qjs-wrapper.git repository = https://lab.nexedi.com/nexedi/qjs-wrapper.git
revision = v2.0 revision = v2.1
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
[qjs-wrapper] [qjs-wrapper]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
configure-command = true configure-command = true
path = ${qjs-wrapper-source:location} path = ${qjs-wrapper-source:location}
autopilot-wrapper =
environment = environment =
C_INCLUDE_PATH=include:${open62541:location}/include:${open62541:location}/deps:${open62541:location}/src/pubsub:${quickjs:location}/include C_INCLUDE_PATH=include:${open62541:location}/include:${open62541:location}/deps:${open62541:location}/src/pubsub:${quickjs:location}/include
LDFLAGS=-L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -L${c-astral-wrapper:location}/lib -Wl,-rpath=${c-astral-wrapper:location}/lib LDFLAGS=-L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -L${:autopilot-wrapper}/lib -Wl,-rpath=${:autopilot-wrapper}/lib
...@@ -100,7 +100,7 @@ environment += ...@@ -100,7 +100,7 @@ environment +=
PERL5LIB=${perl:location}/lib/5.38.0/ PERL5LIB=${perl:location}/lib/5.38.0/
[gobject-introspection] [gobject-introspection]
pre-configure = pre-configure +=
sed -i 's#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#!${python:location}/bin/python${python:version}#' ${python:location}/bin/python${python:version}-config sed -i 's#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#!${python:location}/bin/python${python:version}#' ${python:location}/bin/python${python:version}-config
configure-options += configure-options +=
--enable-shared --enable-shared
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
[buildout] [buildout]
extends = extends =
../bison/buildout.cfg ../bison/buildout.cfg
../gnu-config/buildout.cfg
parts = parts =
swig swig
...@@ -12,6 +13,7 @@ recipe = slapos.recipe.cmmi ...@@ -12,6 +13,7 @@ recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://sourceforge.net/projects/swig/files/swig/swig-3.0.12/swig-3.0.12.tar.gz/download url = https://sourceforge.net/projects/swig/files/swig/swig-3.0.12/swig-3.0.12.tar.gz/download
md5sum = 82133dfa7bba75ff9ad98a7046be687c md5sum = 82133dfa7bba75ff9ad98a7046be687c
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess Tools/config/
configure-options = configure-options =
--disable-ccache --disable-ccache
--with-python=${buildout:executable} --with-python=${buildout:executable}
......
...@@ -12,3 +12,7 @@ md5sum = a2d8042658cfd8ea939e6d911eaf4152 ...@@ -12,3 +12,7 @@ md5sum = a2d8042658cfd8ea939e6d911eaf4152
environment = environment =
FORCE_UNSAFE_CONFIGURE=1 FORCE_UNSAFE_CONFIGURE=1
PATH=${xz-utils:location}/bin:%(PATH)s PATH=${xz-utils:location}/bin:%(PATH)s
# disable year 2038 problem ONLY for 32 bit architectures
[tar:bits32]
configure-options += --disable-year2038
...@@ -665,7 +665,7 @@ recipe = slapos.recipe.cmmi ...@@ -665,7 +665,7 @@ recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://www.x.org/releases/individual/lib/libXrandr-1.5.1.tar.gz url = https://www.x.org/releases/individual/lib/libXrandr-1.5.1.tar.gz
md5sum = 59e90a544ee8cf706cf11e3027339f60 md5sum = 59e90a544ee8cf706cf11e3027339f60
pkg_config_depends = ${libX11:location}/lib/pkgconfig:${xorgproto:pkg_config_depends}:${xorgproto:location}/share/pkgconfig:${libXext:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${renderproto:location}/lib/pkgconfig:${xorgproto:location}/share/pkgconfig:{xcbproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig pkg_config_depends = ${libX11:location}/lib/pkgconfig:${xorgproto:pkg_config_depends}:${xorgproto:location}/share/pkgconfig:${libXext:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${renderproto:location}/lib/pkgconfig:${xorgproto:location}/share/pkgconfig:${xcbproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig
environment = environment =
PKG_CONFIG_PATH=${:pkg_config_depends} PKG_CONFIG_PATH=${:pkg_config_depends}
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
......
...@@ -46,7 +46,7 @@ class CertificateAuthority: ...@@ -46,7 +46,7 @@ class CertificateAuthority:
try: try:
# no CA, let us create new one # no CA, let us create new one
popenCommunicate([self.openssl_binary, 'req', '-utf8', '-nodes', popenCommunicate([self.openssl_binary, 'req', '-utf8', '-nodes',
'-config', self.openssl_configuration, '-new', '-x509', '-config', self.openssl_configuration, '-new', '-sha256', '-x509',
'-extensions', 'v3_ca', '-keyout', self.key, '-out', '-extensions', 'v3_ca', '-keyout', self.key, '-out',
self.certificate, '-days', '10950'], self.certificate, '-days', '10950'],
'Certificate Authority %s\n' % uuid.uuid1()) 'Certificate Authority %s\n' % uuid.uuid1())
...@@ -75,7 +75,7 @@ class CertificateAuthority: ...@@ -75,7 +75,7 @@ class CertificateAuthority:
csr = certificate + '.csr' csr = certificate + '.csr'
try: try:
popenCommunicate([self.openssl_binary, 'req', '-config', popenCommunicate([self.openssl_binary, 'req', '-config',
self.openssl_configuration, '-nodes', '-new', '-keyout', self.openssl_configuration, '-nodes', '-new', '-sha256', '-keyout',
key, '-out', csr, '-days', '3650'], key, '-out', csr, '-days', '3650'],
common_name + '\n') common_name + '\n')
try: try:
......
...@@ -78,7 +78,7 @@ class Recipe(GenericBaseRecipe): ...@@ -78,7 +78,7 @@ class Recipe(GenericBaseRecipe):
'%s' % key_file, self.options['key-size']] '%s' % key_file, self.options['key-size']]
#'-config', openssl_configuration #'-config', openssl_configuration
cert_command = [self.options['openssl-bin'], 'req', '-nodes', '-new', cert_command = [self.options['openssl-bin'], 'req', '-nodes', '-new', '-sha256',
'-x509', '-batch', '-key', '%s' % key_file, '-set_serial', '-x509', '-batch', '-key', '%s' % key_file, '-set_serial',
'%s' % serial, '-days', '3650', '-out', '%s' % cert_file] '%s' % serial, '-days', '3650', '-out', '%s' % cert_file]
......
...@@ -126,7 +126,8 @@ def generateJSONSchemaTest(): ...@@ -126,7 +126,8 @@ def generateJSONSchemaTest():
class TestJSONSchemaValidation(unittest.TestCase): class TestJSONSchemaValidation(unittest.TestCase):
pass # Show full difference to understand problems
maxDiff = None
generateSoftwareCfgTest() generateSoftwareCfgTest()
generateJSONSchemaTest() generateJSONSchemaTest()
......
...@@ -19,7 +19,7 @@ md5sum = ed2bd38b78f2a66f474205249f6e6f2c ...@@ -19,7 +19,7 @@ md5sum = ed2bd38b78f2a66f474205249f6e6f2c
[template-instance-beremiz] [template-instance-beremiz]
filename = instance-beremiz.cfg.jinja2.in filename = instance-beremiz.cfg.jinja2.in
md5sum = bca63fc8943e7c5fa7dd43841e49bf95 md5sum = 29c65611d51975e5bb2a1e2002a0a6c8
[template-instance-beremiz-test] [template-instance-beremiz-test]
filename = instance-beremiz-test.cfg.jinja2.in filename = instance-beremiz-test.cfg.jinja2.in
......
...@@ -25,7 +25,7 @@ fluxbox = ${buildout:directory}/.fluxbox ...@@ -25,7 +25,7 @@ fluxbox = ${buildout:directory}/.fluxbox
[gen-certificate] [gen-certificate]
recipe = plone.recipe.command recipe = plone.recipe.command
command = "{{ openssl_bin }}" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:key-file}" -out "${:cert-file}" command = "{{ openssl_bin }}" req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "${:key-file}" -out "${:cert-file}"
stop-on-error = true stop-on-error = true
cert-file = ${directory:ssl}/beremiz.crt cert-file = ${directory:ssl}/beremiz.crt
key-file = ${directory:ssl}/beremiz.key key-file = ${directory:ssl}/beremiz.key
......
...@@ -7,7 +7,7 @@ extends = ...@@ -7,7 +7,7 @@ extends =
../../component/numpy/buildout.cfg ../../component/numpy/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/python-sslpsk/buildout.cfg ../../component/python-sslpsk/buildout.cfg
../../component/gcc/buildout.cfg ../../component/defaults.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
...@@ -18,13 +18,13 @@ parts = ...@@ -18,13 +18,13 @@ parts =
python-interpreter python-interpreter
matiec matiec
open62541 open62541
gcc-10.2
[python] [python]
part = python2.7 part = python2.7
[gcc] [gcc]
part = gcc-10.2 # we want this SR to use a fixed gcc (so that we have the same gcc as open62541 component)
max_version = 0
[open62541] [open62541]
configure-options = configure-options =
...@@ -95,7 +95,7 @@ context = ...@@ -95,7 +95,7 @@ context =
section buildout buildout section buildout buildout
raw template_monitor ${monitor2-template:output} raw template_monitor ${monitor2-template:output}
key openssl_location openssl:location key openssl_location openssl:location
key gcc_location gcc-10.2:location key gcc_location gcc:prefix
[versions] [versions]
Twisted = 20.3.0 Twisted = 20.3.0
......
...@@ -18,7 +18,7 @@ md5sum = d1e4d7306c39f2ebc64d0407860d4301 ...@@ -18,7 +18,7 @@ md5sum = d1e4d7306c39f2ebc64d0407860d4301
[template-cloudooo-instance] [template-cloudooo-instance]
filename = instance-cloudooo.cfg.in filename = instance-cloudooo.cfg.in
md5sum = 13759bf9720f0e7109fc35a8ad8a50a9 md5sum = 06dc19acd28ab412beffa61890be2095
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -116,7 +116,7 @@ crl = ${directory:apache-conf}/crl.pem ...@@ -116,7 +116,7 @@ crl = ${directory:apache-conf}/crl.pem
[apache-ssl] [apache-ssl]
recipe = plone.recipe.command recipe = plone.recipe.command
command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}" command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}"
key = ${apache-conf-ssl:key} key = ${apache-conf-ssl:key}
cert = ${apache-conf-ssl:cert} cert = ${apache-conf-ssl:cert}
......
...@@ -17,6 +17,10 @@ parts = ...@@ -17,6 +17,10 @@ parts =
# Always build GCC for Fortran (see openblas). # Always build GCC for Fortran (see openblas).
max_version = 0 max_version = 0
[gcc:python2]
# also use old gcc version for old scipy version used in python2
part = gcc-8.5
[python] [python]
part = python2.7 part = python2.7
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[instance.cfg.in] [instance.cfg.in]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = f7a283e3288d3a9ddfd5de7e9b309273 md5sum = 1e9012cb8476e00497b3fe9881158440
...@@ -115,6 +115,7 @@ command = ...@@ -115,6 +115,7 @@ command =
-newkey rsa \ -newkey rsa \
-batch \ -batch \
-new \ -new \
-sha256 \
-nodes \ -nodes \
-keyout /dev/null \ -keyout /dev/null \
-config '${dufs-certificate-csr-config:output}' \ -config '${dufs-certificate-csr-config:output}' \
......
...@@ -18,4 +18,4 @@ md5sum = 06b0acece285ecbc0e746fa267a374b6 ...@@ -18,4 +18,4 @@ md5sum = 06b0acece285ecbc0e746fa267a374b6
[template-default] [template-default]
filename = instance-default.cfg.jinja.in filename = instance-default.cfg.jinja.in
md5sum = 164c4610ab20a081b3db26f23566bb7c md5sum = bf95d5f4ac107ad27a0c980633ad20be
...@@ -118,9 +118,9 @@ recipe = plone.recipe.command ...@@ -118,9 +118,9 @@ recipe = plone.recipe.command
command = command =
if [ ! -e $${:cert-file} ] if [ ! -e $${:cert-file} ]
then then
${openssl-output:openssl} req -x509 -nodes -days 3650 \ ${openssl-output:openssl} req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa:2048 -keyout $${:cert-file} \ -newkey rsa -keyout $${:cert-file} \
-out $${:cert-file} -out $${:cert-file}
fi fi
update-command = $${:command} update-command = $${:command}
......
...@@ -19,4 +19,4 @@ md5sum = 1747b8cda8d815055453420de4ed677f ...@@ -19,4 +19,4 @@ md5sum = 1747b8cda8d815055453420de4ed677f
[template-default] [template-default]
filename = instance-default.cfg.in filename = instance-default.cfg.in
md5sum = fa9bd07d6a5fcf55e9548f63a943f022 md5sum = 452599c3067904a9decb8c5dba55eb46
...@@ -58,7 +58,7 @@ recordings = $${:srv}/recordings ...@@ -58,7 +58,7 @@ recordings = $${:srv}/recordings
recipe = plone.recipe.command recipe = plone.recipe.command
cert-file = $${directory:data}/cert.pem cert-file = $${directory:data}/cert.pem
key-file = $${directory:data}/key.pem key-file = $${directory:data}/key.pem
command = ${openssl:location}/bin/openssl req -newkey rsa:2048 -batch -new -x509 -days 3650 -nodes -keyout "$${:key-file}" -out "$${:cert-file}" command = ${openssl:location}/bin/openssl req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "$${:key-file}" -out "$${:cert-file}"
update-command = update-command =
stop-on-error = true stop-on-error = true
......
...@@ -54,7 +54,7 @@ md5sum = 58e3d5bbda32583d00cd8f44ec0525b0 ...@@ -54,7 +54,7 @@ md5sum = 58e3d5bbda32583d00cd8f44ec0525b0
[instance-gitlab.cfg.in] [instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in _update_hash_filename_ = instance-gitlab.cfg.in
md5sum = 9303fa3912e6eaea04add760b55521f3 md5sum = b913c4a1f199a87ad71da6d102adffa4
[instance-gitlab-export.cfg.in] [instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in _update_hash_filename_ = instance-gitlab-export.cfg.in
......
...@@ -766,7 +766,7 @@ key_file = ${nginx-ssl-dir:ssl}/gitlab_backend.key ...@@ -766,7 +766,7 @@ key_file = ${nginx-ssl-dir:ssl}/gitlab_backend.key
command = command =
test -e ${:key_file} || \ test -e ${:key_file} || \
{{ openssl_bin }} req -newkey rsa -batch -new -x509 -days 3650 -nodes \ {{ openssl_bin }} req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes \
-keyout ${:key_file} -out ${:cert_file} -keyout ${:key_file} -out ${:cert_file}
update-command = ${:command} update-command = ${:command}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 94674d597e3ea7e9eca3637a737765ff md5sum = 8c9dc41c176ba01116de5b71aaa704de
[influxdb-config-file] [influxdb-config-file]
filename = influxdb-config-file.cfg.in filename = influxdb-config-file.cfg.in
......
...@@ -55,9 +55,9 @@ recipe = plone.recipe.command ...@@ -55,9 +55,9 @@ recipe = plone.recipe.command
command = command =
if [ ! -e ${:key-file} ] if [ ! -e ${:key-file} ]
then then
{{ openssl_bin }} req -x509 -nodes -days 3650 \ {{ openssl_bin }} req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=${:common-name}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=${:common-name}" \
-newkey rsa:1024 -keyout ${:key-file} \ -newkey rsa -keyout ${:key-file} \
-out ${:cert-file} -out ${:cert-file}
fi fi
update-command = ${:command} update-command = ${:command}
......
...@@ -4,7 +4,7 @@ md5sum = c6cdcee1e16dd4bd3bc462d286dcb999 ...@@ -4,7 +4,7 @@ md5sum = c6cdcee1e16dd4bd3bc462d286dcb999
[instance-headless-chromium] [instance-headless-chromium]
_update_hash_filename_ = instance-headless-chromium.cfg.in _update_hash_filename_ = instance-headless-chromium.cfg.in
md5sum = 8a7e024569d92b0992f40ddac232cff5 md5sum = b9af9d5ff5dbf131c143e9e4b2e74f6f
[template-nginx-conf] [template-nginx-conf]
_update_hash_filename_ = templates/nginx.conf.in _update_hash_filename_ = templates/nginx.conf.in
......
...@@ -114,7 +114,7 @@ command = ...@@ -114,7 +114,7 @@ command =
then then
openssl req -x509 -nodes -days 3650 \ openssl req -x509 -nodes -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=${:common-name}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=${:common-name}" \
-newkey rsa:1024 -keyout ${:key-file} \ -newkey rsa -keyout ${:key-file} \
-out ${:cert-file} -out ${:cert-file}
openssl x509 -addtrust serverAuth \ openssl x509 -addtrust serverAuth \
-in ${:cert-file} \ -in ${:cert-file} \
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[template-cfg] [template-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = edddaa4f6145f3eab4463063dacacfaa md5sum = 6799fbb8d8e485725a046ba6361d20fa
[template_nginx_conf] [template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in _update_hash_filename_ = templates/nginx_conf.in
......
...@@ -174,9 +174,9 @@ recipe = plone.recipe.command ...@@ -174,9 +174,9 @@ recipe = plone.recipe.command
command = command =
if [ ! -e ${:key-file} ] if [ ! -e ${:key-file} ]
then then
{{ parameter_list['openssl_location'] }}/bin/openssl req -x509 -nodes -days 3650 \ {{ parameter_list['openssl_location'] }}/bin/openssl req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=${hugo:ip}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=${hugo:ip}" \
-newkey rsa:1024 -keyout ${:key-file} \ -newkey rsa -keyout ${:key-file} \
-out ${:cert-file} -out ${:cert-file}
fi fi
update-command = ${:command} update-command = ${:command}
......
...@@ -10,13 +10,17 @@ ...@@ -10,13 +10,17 @@
## Parameters ## ## Parameters ##
* autopilotType: Select which autopilot wrapper should be used
* autopilotIp: IPv4 address to identify the autopilot from the companion board * autopilotIp: IPv4 address to identify the autopilot from the companion board
* droneGuidList: List of computer id on which flight script must be deployed * droneGuidList: List of computer id on which flight script must be deployed
* droneNetIf: Drone network interface used for multicast traffic
* isASimulation: Must be set to 'true' to automatically take off during simulation * isASimulation: Must be set to 'true' to automatically take off during simulation
* debug: Must be set to 'true' to send drone logs through OPC-UA
* multicastIp: IPv6 of the multicast group of the swarm * multicastIp: IPv6 of the multicast group of the swarm
* netIf: Network interface used for multicast traffic
* flightScript: URL of user's script to execute to fly drone swarm * flightScript: URL of user's script to execute to fly drone swarm
* loopPeriod: Minimal period (in milliseconds) between 2 executions of the flight script loop
* subscriberGuidList: List of computer id on which a GUI must be deployed * subscriberGuidList: List of computer id on which a GUI must be deployed
* subscriberNetIf: Subscriber network interface used for multicast traffic
## How it works ## ## How it works ##
...@@ -46,6 +50,7 @@ For each drone is displayed: ...@@ -46,6 +50,7 @@ For each drone is displayed:
* the yaw angle in degrees * the yaw angle in degrees
* the speed (ground speed for multicopters, airspeed for fixed wings) in meters per second * the speed (ground speed for multicopters, airspeed for fixed wings) in meters per second
* the climb rate in meters per second * the climb rate in meters per second
* the timestamp of the position in format hh:mm:ss
### Buttons ### Buttons
......
...@@ -14,32 +14,36 @@ ...@@ -14,32 +14,36 @@
# not need these here). # not need these here).
[index-html] [index-html]
_update_hash_filename_ = web-gui/index.html.jinja2 _update_hash_filename_ = web-gui/index.html.jinja2
md5sum = 1eedc017ecc9d1a6761dc2fff3bbab9b md5sum = 1644d25ea48e35f4b50fbc31e899a74a
[instance-peer-base]
filename = instance-peer-base.cfg.in
md5sum = 01425a1c77e79788e1948398b9136724
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 80dae3e883663311d9814def78ee875a md5sum = 4733c63573e6812c124b356dc146ffcc
[instance-default] [instance-root]
filename = instance-default.cfg.jinja2 filename = instance-root.cfg.jinja2
md5sum = 9db922cc0fcaa67006a2d6b9b95b95fe md5sum = 316f77c655540226f22dc7a6322624f1
[instance-peer] [instance-subscriber]
filename = instance-peer.cfg.jinja2.in filename = instance-subscriber.cfg.in
md5sum = d12fbb134c587173ddff46ff1bc6ffe7 md5sum = 8559dc8c95e9232060be6db3e0af4379
[main] [main]
_update_hash_filename_ = drone-scripts/main.js.jinja2 _update_hash_filename_ = drone-scripts/main.js.jinja2
md5sum = 9a8ec8a2778f63789f39291795f47e98 md5sum = 60146505ec8ea50d881d033f63b6725c
[pubsub] [pubsub]
_update_hash_filename_ = drone-scripts/pubsub.js.jinja2 _update_hash_filename_ = drone-scripts/pubsub.js.jinja2
md5sum = 1555496ad591a31a845f33488d5c335d md5sum = 34a02101a607e60f4e422375beaf7fc2
[script-js] [script-js]
_update_hash_filename_ = web-gui/script.js.jinja2 _update_hash_filename_ = web-gui/script.js.jinja2
md5sum = e28492276416c2d84e770217ae97a88f md5sum = efd986b3685e50f73c17c9352804bae0
[worker] [worker]
_update_hash_filename_ = drone-scripts/worker.js.jinja2 _update_hash_filename_ = drone-scripts/worker.js.jinja2
md5sum = 48540afedd5437129196d84832d2ed40 md5sum = 5fc7f9738d8230aeea9a9d25ea30f3f0
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */ /*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
{% if isADrone -%}
/*global arm, console, close, dup2, exit, open, scriptArgs, setTimeout, start, /*global arm, console, close, dup2, exit, open, scriptArgs, setTimeout, start,
stop, stopPubsub, takeOffAndWait, Worker, SIGINT, SIGTERM*/ stop, stopPubsub, takeOffAndWait, Worker, SIGINT, SIGTERM*/
{% else -%}
/*global console, close, dup2, exit, open, scriptArgs, setTimeout, stopPubsub,
Worker, SIGINT, SIGTERM*/
{% endif -%}
import { import {
{% if isADrone -%}
arm, arm,
start, start,
stop, stop,
{% endif -%}
stopPubsub, stopPubsub,
{% if isADrone -%}
takeOffAndWait takeOffAndWait
} from {{ json_module.dumps(qjs_wrapper) }}; {% endif -%}
} from "{{ qjs_wrapper }}";
import { import {
Worker, Worker,
SIGINT,
SIGTERM, SIGTERM,
dup2, dup2,
setTimeout, setTimeout,
...@@ -17,30 +27,37 @@ import { ...@@ -17,30 +27,37 @@ import {
} from "os"; } from "os";
import { err, exit, open, out } from "std"; import { err, exit, open, out } from "std";
(function (arm, console, dup2, err, exit, open, out, scriptArgs, {% if isADrone -%}
setTimeout, start, stop, stopPubsub, takeOffAndWait, Worker, (function (arm, console, dup2, err, exit, open, out, scriptArgs, setTimeout,
SIGTERM) { start, stop, stopPubsub, takeOffAndWait, Worker, SIGINT, SIGTERM) {
{% else -%}
(function (console, dup2, err, exit, open, out, scriptArgs, setTimeout,
stopPubsub, Worker, SIGINT, SIGTERM) {
{% endif -%}
"use strict"; "use strict";
var CONF_PATH = {{ json_module.dumps(configuration) }}, var CONF_PATH = "{{ configuration }}",
conf_file = open(CONF_PATH, "r"), conf_file = open(CONF_PATH, "r"),
configuration = JSON.parse(conf_file.readAsString()), configuration = JSON.parse(conf_file.readAsString()),
AUTOPILOT_CONNECTION_TIMEOUT = 5,
MAVSDK_LOG_FILE_PATH = MAVSDK_LOG_FILE_PATH =
"{{ log_dir }}/mavsdk_" + new Date().toISOString() + ".log", "{{ log_dir }}/mavsdk_" + new Date().toISOString() + ".log",
LOG_FILE = QUICKJS_LOG_FILE_PATH =
open("{{ log_dir }}/quickjs_" + new Date().toISOString() + ".log", "w"), "{{ log_dir }}/quickjs_" + new Date().toISOString() + ".log",
QUICKJS_LOG_FILE =
open(QUICKJS_LOG_FILE_PATH, "w"),
pubsubWorker, pubsubWorker,
worker, worker,
user_script = scriptArgs[1], user_script = scriptArgs[1],
FPS = 50, // Minimum sampling interval for open62541 monitored items LOOP_EXECUTION_PERIOD = configuration.loopPeriod,
previous_timestamp, previous_timestamp,
can_update = false; can_update = false;
conf_file.close(); conf_file.close();
// redirect stdout and stderr // redirect stdout and stderr
dup2(LOG_FILE.fileno(), out.fileno()); dup2(QUICKJS_LOG_FILE.fileno(), out.fileno());
dup2(LOG_FILE.fileno(), err.fileno()); dup2(QUICKJS_LOG_FILE.fileno(), err.fileno());
// Use a Worker to ensure the user script // Use a Worker to ensure the user script
// does not block the main script // does not block the main script
...@@ -50,13 +67,13 @@ import { err, exit, open, out } from "std"; ...@@ -50,13 +67,13 @@ import { err, exit, open, out } from "std";
// to prevent it to finish (and so, exit the quickjs process) // to prevent it to finish (and so, exit the quickjs process)
worker = new Worker("{{ worker_script }}"); worker = new Worker("{{ worker_script }}");
function quit(is_a_drone, exit_code) { function quit(exit_code) {
worker.onmessage = null; worker.onmessage = null;
stopPubsub(); stopPubsub();
if (is_a_drone) { {% if isADrone -%}
stop(); stop();
} {% endif -%}
LOG_FILE.close(); QUICKJS_LOG_FILE.close();
exit(exit_code); exit(exit_code);
} }
...@@ -68,6 +85,7 @@ import { err, exit, open, out } from "std"; ...@@ -68,6 +85,7 @@ import { err, exit, open, out } from "std";
} }
signal(SIGTERM, exitWorker.bind(null, 0)); signal(SIGTERM, exitWorker.bind(null, 0));
signal(SIGINT, exitWorker.bind(null, 0));
function exitOnFail(ret, msg) { function exitOnFail(ret, msg) {
if (ret) { if (ret) {
...@@ -76,6 +94,7 @@ import { err, exit, open, out } from "std"; ...@@ -76,6 +94,7 @@ import { err, exit, open, out } from "std";
} }
} }
{% if isADrone -%}
function connect() { function connect() {
var address = configuration.autopilotIp + ":" + configuration.autopilotPort; var address = configuration.autopilotIp + ":" + configuration.autopilotPort;
console.log("Will connect to", address); console.log("Will connect to", address);
...@@ -84,16 +103,17 @@ import { err, exit, open, out } from "std"; ...@@ -84,16 +103,17 @@ import { err, exit, open, out } from "std";
configuration.autopilotIp, configuration.autopilotIp,
configuration.autopilotPort, configuration.autopilotPort,
MAVSDK_LOG_FILE_PATH, MAVSDK_LOG_FILE_PATH,
60 QUICKJS_LOG_FILE_PATH,
AUTOPILOT_CONNECTION_TIMEOUT,
configuration.debug
), ),
"Failed to connect to " + address "Failed to connect to " + address
); );
} }
if (configuration.isADrone) {
console.log("Connecting to aupilot\n"); console.log("Connecting to aupilot\n");
connect(); connect();
} {% endif -%}
pubsubWorker = new Worker("{{ pubsub_script }}"); pubsubWorker = new Worker("{{ pubsub_script }}");
pubsubWorker.onmessage = function (e) { pubsubWorker.onmessage = function (e) {
...@@ -104,15 +124,19 @@ import { err, exit, open, out } from "std"; ...@@ -104,15 +124,19 @@ import { err, exit, open, out } from "std";
worker.postMessage({type: "initPubsub"}); worker.postMessage({type: "initPubsub"});
{% if isADrone -%}
function takeOff() { function takeOff() {
exitOnFail(arm(), "Failed to arm"); exitOnFail(arm(), "Failed to arm");
takeOffAndWait(); takeOffAndWait();
} }
{% endif -%}
function load() { function load() {
if (configuration.isADrone && configuration.isASimulation) { {% if isADrone -%}
if (configuration.isASimulation) {
takeOff(); takeOff();
} }
{% endif -%}
// First argument must provide the user script path // First argument must provide the user script path
if (user_script === undefined) { if (user_script === undefined) {
...@@ -130,23 +154,23 @@ import { err, exit, open, out } from "std"; ...@@ -130,23 +154,23 @@ import { err, exit, open, out } from "std";
var timestamp = Date.now(), var timestamp = Date.now(),
timeout; timeout;
if (can_update) { if (can_update) {
if (FPS <= (timestamp - previous_timestamp)) { if (LOOP_EXECUTION_PERIOD <= (timestamp - previous_timestamp)) {
// Expected timeout between every update // Expected timeout between every update
can_update = false; can_update = false;
worker.postMessage({ worker.postMessage({
type: "update", type: "update",
timestamp: timestamp timestamp: timestamp
}); });
// Try to stick to the expected FPS // Try to stick to the expected LOOP_EXECUTION_PERIOD
timeout = FPS - (timestamp - previous_timestamp - FPS); timeout = LOOP_EXECUTION_PERIOD - (timestamp - previous_timestamp - LOOP_EXECUTION_PERIOD);
previous_timestamp = timestamp; previous_timestamp = timestamp;
} else { } else {
timeout = FPS - (timestamp - previous_timestamp); timeout = LOOP_EXECUTION_PERIOD - (timestamp - previous_timestamp);
} }
} else { } else {
// If timeout occurs, but update is not yet finished // If timeout occurs, but update is not yet finished
// wait a bit // wait a bit
timeout = FPS / 4; timeout = LOOP_EXECUTION_PERIOD / 4;
} }
// Ensure loop is not done with timeout < 1ms // Ensure loop is not done with timeout < 1ms
setTimeout(loop, Math.max(1, timeout)); setTimeout(loop, Math.max(1, timeout));
...@@ -158,12 +182,12 @@ import { err, exit, open, out } from "std"; ...@@ -158,12 +182,12 @@ import { err, exit, open, out } from "std";
pubsubWorker.postMessage({ pubsubWorker.postMessage({
action: "run", action: "run",
id: configuration.id, id: configuration.id,
interval: FPS, interval: LOOP_EXECUTION_PERIOD,
publish: configuration.isADrone publish: configuration.isADrone
}); });
load(); load();
} else if (type === 'loaded') { } else if (type === 'loaded') {
previous_timestamp = -FPS; previous_timestamp = -LOOP_EXECUTION_PERIOD;
can_update = true; can_update = true;
// Start the update loop // Start the update loop
loop(); loop();
...@@ -173,11 +197,16 @@ import { err, exit, open, out } from "std"; ...@@ -173,11 +197,16 @@ import { err, exit, open, out } from "std";
can_update = true; can_update = true;
} else if (type === 'exited') { } else if (type === 'exited') {
worker.onmessage = null; worker.onmessage = null;
quit(configuration.isADrone, e.data.exit); quit(e.data.exit);
} else { } else {
console.log('Unsupported message type', type); console.log('Unsupported message type', type);
exitWorker(1); exitWorker(1);
} }
}; };
{% if isADrone -%}
}(arm, console, dup2, err, exit, open, out, scriptArgs, setTimeout, start, stop, }(arm, console, dup2, err, exit, open, out, scriptArgs, setTimeout, start, stop,
stopPubsub, takeOffAndWait, Worker, SIGTERM)); stopPubsub, takeOffAndWait, Worker, SIGINT, SIGTERM));
{% else -%}
}(console, dup2, err, exit, open, out, scriptArgs, setTimeout, stopPubsub,
Worker, SIGINT, SIGTERM));
{% endif -%}
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */ /*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
/*global console, open, runPubsub, Worker*/ /*global console, open, runPubsub, Worker*/
import {runPubsub} from {{ json_module.dumps(qjs_wrapper) }}; import {runPubsub} from "{{ qjs_wrapper }}";
import {Worker} from "os"; import {Worker} from "os";
import {open} from "std"; import {open} from "std";
(function (console, open, runPubsub, Worker) { (function (console, open, runPubsub, Worker) {
"use strict"; "use strict";
var CONF_PATH = {{ json_module.dumps(configuration) }}, var CONF_PATH = "{{ configuration }}",
PORT = "4840", PORT = "4840",
parent = Worker.parent, parent = Worker.parent,
conf_file = open(CONF_PATH, "r"), conf_file = open(CONF_PATH, "r"),
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
updateLogAndProjection, Drone, Worker*/ updateLogAndProjection, Drone, Worker*/
import { import {
Drone, Drone,
{% if isADrone -%}
triggerParachute, triggerParachute,
getAirspeed, getAirspeed,
getAltitude, getAltitude,
...@@ -13,14 +14,19 @@ import { ...@@ -13,14 +14,19 @@ import {
gpsIsOk, gpsIsOk,
getPosition, getPosition,
getYaw, getYaw,
{% endif -%}
initPubsub, initPubsub,
{% if isADrone -%}
isLanding, isLanding,
loiter, loiter,
setAirSpeed, setAirSpeed,
{% endif -%}
setMessage, setMessage,
{% if isADrone -%}
setTargetCoordinates, setTargetCoordinates,
updateLogAndProjection updateLogAndProjection
} from {{ json_module.dumps(qjs_wrapper) }}; {% endif -%}
} from "{{ qjs_wrapper }}";
import { import {
SIGTERM, SIGTERM,
WNOHANG, WNOHANG,
...@@ -34,15 +40,21 @@ import { ...@@ -34,15 +40,21 @@ import {
} from "os"; } from "os";
import { evalScript, fdopen, loadFile, open } from "std"; import { evalScript, fdopen, loadFile, open } from "std";
{% if isADrone -%}
(function (Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec, (function (Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec,
fdopen, getAltitude, getInitialAltitude, gpsIsOk, getPosition, fdopen, getAltitude, getInitialAltitude, gpsIsOk, getPosition,
getYaw, initPubsub, kill, isLanding, loadFile, loiter, open, pipe, getYaw, initPubsub, isLanding, kill, loadFile, loiter, open,
setAirSpeed, setMessage, setReadHandler, setTargetCoordinates, pipe, setAirSpeed, setMessage, setReadHandler, setTargetCoordinates,
triggerParachute, updateLogAndProjection, waitpid) { triggerParachute, updateLogAndProjection, waitpid) {
{% else -%}
(function (Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec,
fdopen, initPubsub, kill, loadFile, open, pipe, setMessage,
setReadHandler, waitpid) {
{% endif -%}
// Every script is evaluated per drone // Every script is evaluated per drone
"use strict"; "use strict";
var CONF_PATH = {{ json_module.dumps(configuration) }}, var CONF_PATH = "{{ configuration }}",
conf_file = open(CONF_PATH, "r"), conf_file = open(CONF_PATH, "r"),
configuration = JSON.parse(conf_file.readAsString()), configuration = JSON.parse(conf_file.readAsString()),
clientId, clientId,
...@@ -57,9 +69,12 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -57,9 +69,12 @@ import { evalScript, fdopen, loadFile, open } from "std";
peer_dict = {}, peer_dict = {},
user_me = { user_me = {
//required to fly //required to fly
{% if isADrone -%}
triggerParachute: triggerParachute, triggerParachute: triggerParachute,
{% endif -%}
exit: exitWorker, exit: exitWorker,
getDroneDict: function () { return drone_dict; }, getDroneDict: function () { return drone_dict; },
{% if isADrone -%}
getAltitudeAbs: getAltitude, getAltitudeAbs: getAltitude,
getCurrentPosition: getPosition, getCurrentPosition: getPosition,
getInitialAltitude: getInitialAltitude, getInitialAltitude: getInitialAltitude,
...@@ -67,9 +82,14 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -67,9 +82,14 @@ import { evalScript, fdopen, loadFile, open } from "std";
getYaw: getYaw, getYaw: getYaw,
getSpeed: getAirspeed, getSpeed: getAirspeed,
getClimbRate: getClimbRate, getClimbRate: getClimbRate,
{% endif -%}
id: configuration.id, id: configuration.id,
{% if isADrone -%}
isLanding: isLanding, isLanding: isLanding,
loiter: loiter, loiter: loiter,
setAirSpeed: setAirSpeed,
setTargetCoordinates: setTargetCoordinates,
{% endif -%}
sendMsg: function (msg, id) { sendMsg: function (msg, id) {
if (id === undefined) { id = -1; } if (id === undefined) { id = -1; }
setMessage(JSON.stringify({ setMessage(JSON.stringify({
...@@ -77,9 +97,7 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -77,9 +97,7 @@ import { evalScript, fdopen, loadFile, open } from "std";
timestamp: Date.now(), timestamp: Date.now(),
dest_id: id dest_id: id
})); }));
}, }
setAirSpeed: setAirSpeed,
setTargetCoordinates: setTargetCoordinates
}; };
conf_file.close(); conf_file.close();
...@@ -139,7 +157,7 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -139,7 +157,7 @@ import { evalScript, fdopen, loadFile, open } from "std";
], { ], {
block: false, block: false,
usePath: false, usePath: false,
file: {{ json_module.dumps(gwsocket_bin) }}, file: "{{ gwsocket_bin }}",
stdin: gwsocket_w_pipe[0], stdin: gwsocket_w_pipe[0],
stdout: gwsocket_r_pipe[1] stdout: gwsocket_r_pipe[1]
}); });
...@@ -149,9 +167,6 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -149,9 +167,6 @@ import { evalScript, fdopen, loadFile, open } from "std";
handleWebSocketMessage = function () { handleWebSocketMessage = function () {
var message = readMessage(gwsocket_r_pipe_fd).data; var message = readMessage(gwsocket_r_pipe_fd).data;
if (message.includes(configuration.websocketIp)) {
return;
}
onMessage(message); onMessage(message);
}; };
user_me.writeWebsocketMessage = function (message) { user_me.writeWebsocketMessage = function (message) {
...@@ -200,16 +215,16 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -200,16 +215,16 @@ import { evalScript, fdopen, loadFile, open } from "std";
} }
function handleMainMessage(evt) { function handleMainMessage(evt) {
var type = evt.data.type, message, peer_id; var type = evt.data.type, message, peer_id, log;
switch (type) { switch (type) {
case "initPubsub": case "initPubsub":
initPubsub(configuration.numberOfDrone, configuration.numberOfSubscriber); initPubsub(configuration.numberOfDrones, configuration.numberOfSubscribers);
for (peer_id = 0; peer_id < configuration.numberOfDrone + configuration.numberOfSubscriber; peer_id++) { for (peer_id = 0; peer_id < configuration.numberOfDrones + configuration.numberOfSubscribers; peer_id++) {
peer_dict[peer_id] = new Drone(peer_id); peer_dict[peer_id] = new Drone(peer_id);
peer_dict[peer_id].init(peer_id); peer_dict[peer_id].init(peer_id);
if (peer_id < configuration.numberOfDrone) { if (peer_id < configuration.numberOfDrones) {
drone_dict[peer_id] = peer_dict[peer_id]; drone_dict[peer_id] = peer_dict[peer_id];
} }
} }
...@@ -234,13 +249,16 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -234,13 +249,16 @@ import { evalScript, fdopen, loadFile, open } from "std";
} }
} }
}); });
// Call the drone onStart function
// Call the drone onUpdate function
if (user_me.hasOwnProperty("onUpdate")) { if (user_me.hasOwnProperty("onUpdate")) {
user_me.onUpdate(evt.data.timestamp); user_me.onUpdate(evt.data.timestamp);
} }
if (evt.data.timestamp - last_log_timestamp >= 1000) { if (evt.data.timestamp - last_log_timestamp >= 1000) {
{% if isADrone -%}
updateLogAndProjection(); updateLogAndProjection();
{% endif -%}
last_log_timestamp = evt.data.timestamp; last_log_timestamp = evt.data.timestamp;
} }
...@@ -266,8 +284,14 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -266,8 +284,14 @@ import { evalScript, fdopen, loadFile, open } from "std";
exitWorker(1); exitWorker(1);
} }
}; };
{% if isADrone -%}
}(Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec, }(Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec,
fdopen, getAltitude, getInitialAltitude, gpsIsOk, getPosition, getYaw, fdopen, getAltitude, getInitialAltitude, gpsIsOk, getPosition, getYaw,
initPubsub, isLanding, kill, loadFile, loiter, open, pipe, setAirSpeed, initPubsub, isLanding, kill, loadFile, loiter, open, pipe, setAirSpeed,
setMessage, setReadHandler, setTargetCoordinates, triggerParachute, setMessage, setReadHandler, setTargetCoordinates, triggerParachute,
updateLogAndProjection, waitpid)); updateLogAndProjection, waitpid));
{% else -%}
}(Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec,
fdopen, initPubsub, kill, loadFile, open, pipe, setMessage, setReadHandler,
waitpid));
{% endif -%}
...@@ -4,6 +4,16 @@ ...@@ -4,6 +4,16 @@
"description": "Parameters to instantiate JS drone", "description": "Parameters to instantiate JS drone",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"autopilotType": {
"title": "Type of the drone's autopilot",
"description": "Model of the autopilot used in the drones.",
"type": "string",
"default": "c-astral",
"enum": [
"c-astral",
"sqdr"
]
},
"autopilotIp": { "autopilotIp": {
"title": "IP address of the drone's autopilot", "title": "IP address of the drone's autopilot",
"description": "IP used to create a connection with the autopilot.", "description": "IP used to create a connection with the autopilot.",
...@@ -22,35 +32,53 @@ ...@@ -22,35 +32,53 @@
"type": "array", "type": "array",
"default": [] "default": []
}, },
"droneNetIf": {
"title": "Drones Network interface",
"description": "Interface used for multicast traffic.",
"type": "string",
"default": "eth0"
},
"isASimulation": { "isASimulation": {
"title": "Set the flight as a simulation", "title": "Set the flight as a simulation",
"description": "The option used to determine if the flight is real or if it is a simulation. This affects the context of the flight (e.g. if the take off is manual or automatic).", "description": "The option used to determine if the flight is real or if it is a simulation. This affects the context of the flight (e.g. if the take off is manual or automatic).",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },
"debug": {
"title": "Set debug mode",
"description": "When debug mode is enabled, drone are publishing the script logs through OPC-UA.",
"type": "boolean",
"default": false
},
"multicastIpv6": { "multicastIpv6": {
"title": "IP of the multicast group", "title": "IP of the multicast group",
"description": "IP address used to communicate with the other drones.", "description": "IP address used to communicate with the other drones.",
"type": "string", "type": "string",
"default": "ff15::1111" "default": "ff15::1111"
}, },
"netIf": {
"title": "Network interface",
"description": "Interface used for multicast traffic.",
"type": "string",
"default": "eth0"
},
"flightScript": { "flightScript": {
"title": "Script's URL of the flight", "title": "Script's URL of the flight",
"description": "URL of the script which will be executed for the flight. This URL must be publicly accesible so that the drone can fetch the script.", "description": "URL of the script which will be executed for the flight. This URL must be publicly accesible so that the drone can fetch the script.",
"type": "string", "type": "string",
"default": "https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/default.js" "default": "https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/default.js"
}, },
"loopPeriod": {
"title": "Loop execution period",
"description": "Minimal period between 2 executions of flight script loop",
"type": "integer",
"default": 200
},
"subscriberGuidList": { "subscriberGuidList": {
"title": "List of subscribers computer ID", "title": "List of subscribers computer ID",
"description": "List of computer ID of swarms subscribers", "description": "List of computer ID of swarms subscribers (entities able to listen/send OPC-UA messages from/to the swarm)",
"type": "array", "type": "array",
"default": [] "default": []
},
"subscriberNetIf": {
"title": "Subscribers Network interface",
"description": "Interface used for multicast traffic.",
"type": "string",
"default": "eth0"
} }
} }
} }
...@@ -3,6 +3,18 @@ parts = ...@@ -3,6 +3,18 @@ parts =
qjs-launcher qjs-launcher
publish-connection-information publish-connection-information
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
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] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -16,15 +28,26 @@ log = $${:var}/log ...@@ -16,15 +28,26 @@ log = $${:var}/log
public = $${:srv}/public public = $${:srv}/public
service = $${:etc}/service service = $${:etc}/service
[peer-configuration]
recipe = slapos.recipe.template:jinja2
output = $${directory:etc}/configuration.json
extensions = jinja2.ext.do
extra-context =
context =
import json_module json
key parameter_dict slap-configuration:configuration
$${:extra-context}
inline =
{{ json_module.dumps(parameter_dict) }}
[js-dynamic-template] [js-dynamic-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/$${:_buildout_section_name_}.js rendered = $${directory:etc}/$${:_buildout_section_name_}.js
extra-context = extra-context =
context = context =
import json_module json key configuration peer-configuration:output
raw gwsocket_bin ${gwsocket:location}/bin/gwsocket key isADrone slap-configuration:configuration.isADrone
raw qjs_wrapper ${qjs-wrapper:location}/lib/libqjswrapper.so raw qjs_wrapper ${qjs-wrapper:location}/lib/libqjswrapper.so
raw configuration {{ configuration }}
$${:extra-context} $${:extra-context}
[main] [main]
...@@ -42,10 +65,13 @@ template = ${pubsub:target} ...@@ -42,10 +65,13 @@ template = ${pubsub:target}
[worker] [worker]
<= js-dynamic-template <= js-dynamic-template
template = ${worker:target} template = ${worker:target}
gwsocket_bin =
extra-context =
key gwsocket_bin :gwsocket_bin
[user] [user]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = {{ parameter_dict['flightScript'] }} url = $${slap-configuration:configuration.flightScript}
destination = $${directory:etc}/user.js destination = $${directory:etc}/user.js
offline = false offline = false
...@@ -54,41 +80,6 @@ recipe = slapos.cookbook:wrapper ...@@ -54,41 +80,6 @@ recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:service}/qjs-launcher wrapper-path = $${directory:service}/qjs-launcher
command-line = ${quickjs:location}/bin/qjs $${main:rendered} $${user:target} command-line = ${quickjs:location}/bin/qjs $${main:rendered} $${user:target}
[script-js]
recipe = slapos.recipe.template:jinja2
template = ${script-js:target}
rendered = $${directory:public}/script.js
websocket-url = [{{ ipv6 }}]:{{ websocket_port }}
context =
raw websocket_url $${:websocket-url}
[index-html]
recipe = slapos.recipe.template:jinja2
template = ${index-html:target}
rendered = $${directory:public}/index.html
context =
raw nb_drones {{ parameter_dict['numberOfDrone'] }}
[httpd-port]
recipe = slapos.cookbook:free_port
minimum = 8080
maximum = 8090
ip = {{ ipv6 }}
[httpd]
recipe = slapos.cookbook:simplehttpserver
host = {{ ipv6 }}
port = $${httpd-port:port}
base-path = $${directory:public}
wrapper = $${directory:service}/http-server
log-file = $${directory:log}/httpd.log
use-hash-url = false
depends = $${index-html:rendered}
[publish-connection-information] [publish-connection-information]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
instance-path = $${directory:home} instance-path = $${directory:home}
{% if not parameter_dict['isADrone'] -%}
httpd-url = [$${httpd:host}]:$${httpd:port}
websocket-url = ws://$${script-js:websocket-url}
{% endif -%}
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"description": "Parameters to instantiate JS drone",
"additionalProperties": false,
"properties": {
"autopilotIp": {
"title": "IP address of the drone's autopilot",
"description": "IP used to create a connection with the autopilot.",
"type": "string"
},
"autopilotPort": {
"title": "Port of the drone's autopilot",
"description": "Port on which autopilot service is running.",
"type": "integer"
},
"numberOfDrone": {
"title": "Number of drone",
"description": "Number of drone in the swarm",
"type": "integer"
},
"numberOfSubscriber": {
"title": "Number of subscriber",
"description": "Number of subscriber of the swarm",
"type": "integer"
},
"id": {
"title": "drone ID",
"description": "Drone unique identifier",
"type": "integer"
},
"isADrone": {
"title": "Set the requested instance as a drone",
"description": "The option used to determine if the instance is a drone. This affects the context of the user script (e.g. if it should be linked to an autopilot or publish its GPS coordinates)",
"type": "boolean"
},
"isASimulation": {
"title": "Set the flight as a simulation",
"description": "The option used to determine if the flight is real or if it is a simulation. This affects the context of the flight (e.g. if the take off is manual or automatic).",
"type": "boolean"
},
"multicastIp": {
"title": "IP of the multicast group",
"description": "IP address used to communicate with the other drones.",
"type": "string"
},
"netIf": {
"title": "Network interface",
"description": "Interface used for multicast traffic.",
"type": "string"
},
"flightScript": {
"title": "Script's URL of the flight",
"description": "URL of the script which will be executed for the flight. This URL must be publicly accesible so that all drones can fetch the script.",
"type": "string"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by drone instantiation",
"additionalProperties": false,
"properties": {
"instance-path": {
"description": "Path of the directory where the quickjs binary and the flight scripts are located",
"type": "string"
}
},
"type": "object"
}
...@@ -10,28 +10,36 @@ ...@@ -10,28 +10,36 @@
[{{ request_peer_section_title }}] [{{ request_peer_section_title }}]
<= slap-connection <= slap-connection
recipe = slapos.cookbook:request.serialised recipe = slapos.cookbook:request.serialised
name = Peer{{ id }} {% if id < len(parameter_dict['droneGuidList']) -%}
software-url = ${:software-release-url} {% set sr_name = parameter_dict['autopilotType'] -%}
software-type = peer name = Drone{{ id }}_{{ guid }}
{% else -%}
{% set sr_name = 'subscriber' -%}
name = Subscriber{{ len(parameter_dict['droneGuidList']) - id }}_{{ guid }}
{% endif -%}
software-url = {{ '/'.join(software_url.split('/')[:-1]) + '/software-%s.cfg' % sr_name }}
return = instance-path return = instance-path
sla-computer_guid = {{ guid }} sla-computer_guid = {{ guid }}
config-autopilotIp = {{ parameter_dict['autopilotIp'] }} config-autopilotIp = {{ parameter_dict['autopilotIp'] }}
config-autopilotPort = {{ dumps(parameter_dict['autopilotPort']) }} config-autopilotPort = {{ dumps(parameter_dict['autopilotPort']) }}
config-numberOfDrone = {{ dumps(len(parameter_dict['droneGuidList'])) }} config-numberOfDrones = {{ dumps(len(parameter_dict['droneGuidList'])) }}
config-numberOfSubscriber = {{ dumps(len(parameter_dict['subscriberGuidList'])) }} config-numberOfSubscribers = {{ dumps(len(parameter_dict['subscriberGuidList'])) }}
config-id = {{ dumps(id) }} config-id = {{ dumps(id) }}
config-isASimulation = {{ dumps(parameter_dict['isASimulation']) }} config-isASimulation = {{ dumps(parameter_dict['isASimulation']) }}
config-debug = {{ dumps(parameter_dict['debug']) }}
config-loopPeriod = {{ dumps(parameter_dict['loopPeriod']) }}
{% if id < len(parameter_dict['droneGuidList']) -%} {% if id < len(parameter_dict['droneGuidList']) -%}
{% do drone_id_list.append(id) %} {% do drone_id_list.append(id) %}
config-isADrone = {{ dumps(True) }} config-isADrone = {{ dumps(True) }}
config-flightScript = {{ parameter_dict['flightScript'] }} config-flightScript = {{ parameter_dict['flightScript'] }}
config-netIf = {{ parameter_dict['droneNetIf'] }}
{% else -%} {% else -%}
{% do subscriber_id_list.append(id) %} {% do subscriber_id_list.append(id) %}
config-isADrone = {{ dumps(False) }} config-isADrone = {{ dumps(False) }}
config-flightScript = https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/subscribe.js config-flightScript = https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/subscribe.js
config-netIf = {{ parameter_dict['subscriberNetIf'] }}
{% endif -%} {% endif -%}
config-multicastIp = {{ parameter_dict['multicastIp'] }} config-multicastIp = {{ parameter_dict['multicastIp'] }}
config-netIf = {{ parameter_dict['netIf'] }}
{% endfor %} {% endfor %}
[publish-connection-information] [publish-connection-information]
......
[buildout]
extends =
${instance-peer-base:output}
[worker]
gwsocket_bin = ${gwsocket:location}/bin/gwsocket
[gwsocket-port]
recipe = slapos.cookbook:free_port
minimum = 6789
maximum = 6799
ip = $${slap-configuration:ipv6-random}
[peer-configuration]
extra-context =
key websocket_ip gwsocket-port:ip
key websocket_port gwsocket-port:port
inline =
{% do parameter_dict.__setitem__('websocketIp', websocket_ip) -%}
{% do parameter_dict.__setitem__('websocketPort', websocket_port) -%}
{{ json_module.dumps(parameter_dict) }}
[script-js]
recipe = slapos.recipe.template:jinja2
template = ${script-js:target}
rendered = $${directory:public}/script.js
websocket-url = [$${gwsocket-port:ip}]:$${gwsocket-port:port}
context =
key debug slap-configuration:configuration.debug
key websocket_url :websocket-url
[index-html]
recipe = slapos.recipe.template:jinja2
template = ${index-html:target}
rendered = $${directory:public}/index.html
context =
key debug slap-configuration:configuration.debug
key nb_drones slap-configuration:configuration.numberOfDrones
[httpd-port]
recipe = slapos.cookbook:free_port
minimum = 8080
maximum = 8090
ip = $${slap-configuration:ipv6-random}
[httpd]
recipe = slapos.cookbook:simplehttpserver
host = $${slap-configuration:ipv6-random}
port = $${httpd-port:port}
base-path = $${directory:public}
wrapper = $${directory:service}/http-server
log-file = $${directory:log}/httpd.log
use-hash-url = false
depends = $${index-html:rendered}
[publish-connection-information]
httpd-url = [$${httpd:host}]:$${httpd:port}
websocket-url = ws://$${script-js:websocket-url}
...@@ -8,9 +8,8 @@ offline = true ...@@ -8,9 +8,8 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = instance-default:output
peer = instance-peer:output
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
default = instance-root:output
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
...@@ -19,61 +18,29 @@ partition = $${slap_connection:partition_id} ...@@ -19,61 +18,29 @@ partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url} url = $${slap_connection:server_url}
key = $${slap_connection:key_file} key = $${slap_connection:key_file}
cert = $${slap_connection:cert_file} cert = $${slap_connection:cert_file}
software = $${slap-connection:software-release-url}
[dynamic-template-base] [instance-root]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
url = ${instance-root:target}
output = $${buildout:directory}/$${:_buildout_section_name_}.cfg output = $${buildout:directory}/$${:_buildout_section_name_}.cfg
extra-context = extensions = jinja2.ext.do
context = context =
jsonkey default_parameter_dict :default-parameters jsonkey default_parameter_dict :default-parameters
key parameter_dict slap-configuration:configuration key parameter_dict slap-configuration:configuration
$${:extra-context} key software_url slap-configuration:software
default-parameters = default-parameters =
{ {
"autopilotType": "c-astral",
"autopilotIp": "192.168.27.1", "autopilotIp": "192.168.27.1",
"autopilotPort": 7909, "autopilotPort": 7909,
"debug": false,
"droneGuidList": [],
"droneNetIf": "eth0",
"flightScript": "https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/default.js", "flightScript": "https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/default.js",
"isASimulation": false, "isASimulation": false,
"loopPeriod": 200,
"multicastIp": "ff15::1111", "multicastIp": "ff15::1111",
"netIf": "eth0", "subscriberGuidList":[],
"droneGuidList": [], "subscriberNetIf": "eth0"
"subscriberGuidList":[]
} }
[instance-default]
<= dynamic-template-base
url = ${instance-default:target}
extensions = jinja2.ext.do
[directory]
recipe = slapos.cookbook:mkdirectory
home = $${buildout:directory}
etc = $${:home}/etc
[gwsocket-port]
recipe = slapos.cookbook:free_port
minimum = 6789
maximum = 6799
ip = $${slap-configuration:ipv6-random}
[peer-configuration]
recipe = slapos.recipe.template:jinja2
output = $${directory:etc}/configuration.json
extensions = jinja2.ext.do
context =
import json_module json
key websocket_ip gwsocket-port:ip
key websocket_port gwsocket-port:port
key parameter_dict slap-configuration:configuration
inline =
{% do parameter_dict.__setitem__('websocketIp', websocket_ip) -%}
{% do parameter_dict.__setitem__('websocketPort', websocket_port) -%}
{{ json_module.dumps(parameter_dict) }}
[instance-peer]
<= dynamic-template-base
url = ${instance-peer:output}
extra-context =
key configuration peer-configuration:output
key ipv6 slap-configuration:ipv6-random
key websocket_port gwsocket-port:port
[buildout]
extends =
../../component/mavsdk/buildout.cfg
software-peer-base.cfg
[c-astral-xml-definition]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/c-astral-c-library.git
revision = v2.1
git-executable = ${git:location}/bin/git
[mavsdk]
pre-configure +=
sed -i 's#message_definitions/v1.0#${c-astral-xml-definition:location}#' ${mavsdk-source:location}/third_party/mavlink/CMakeLists.txt
[c-astral-wrapper]
recipe = slapos.recipe.cmmi
configure-command = true
url = https://lab.nexedi.com/nexedi/c-astral-wrapper/-/archive/v2.1/c-astral-wrapper-v2.1.tar.gz
md5sum = cca66724e1b7a61c1b9559fde95c420b
environment =
CPLUS_INCLUDE_PATH=${qjs-wrapper-source:location}/include:${mavsdk:location}/include:${mavsdk:location}/include/mavsdk
LDFLAGS=-L${mavsdk:location}/lib -Wl,-rpath=${mavsdk:location}/lib
[qjs-wrapper]
autopilot-wrapper = ${c-astral-wrapper:location}
make-options = WITH_AUTOPILOT=y
...@@ -3,43 +3,25 @@ extends = ...@@ -3,43 +3,25 @@ extends =
buildout.hash.cfg buildout.hash.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/qjs-wrapper/buildout.cfg ../../component/qjs-wrapper/buildout.cfg
../../component/gwsocket/buildout.cfg
parts = parts =
instance-profile instance-peer-base
slapos-cookbook slapos-cookbook
[instance-default] [instance-peer-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[template-base]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
[instance-peer]
<= template-base
output = ${buildout:directory}/${:_buildout_section_name_}
[instance-profile]
<= template-base
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
[download] [download]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_} url = ${:_profile_base_location_}/${:_update_hash_filename_}
[index-html]
<= download
[main] [main]
<= download <= download
[pubsub] [pubsub]
<= download <= download
[script-js]
<= download
[worker] [worker]
<= download <= download
[buildout]
extends =
buildout.hash.cfg
../../stack/slapos.cfg
parts =
instance-profile
slapos-cookbook
[instance-root]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
{ {
"name": "JS Drone", "name": "JS Drone Root",
"description": "JS Drone", "description": "Root instance requesting drones and subscribers",
"serialisation": "json-in-xml", "serialisation": "json-in-xml",
"software-type": { "software-type": {
"default": { "default": {
...@@ -10,14 +10,6 @@ ...@@ -10,14 +10,6 @@
"request": "instance-input-schema.json", "request": "instance-input-schema.json",
"response": "instance-output-schema.json", "response": "instance-output-schema.json",
"index": 0 "index": 0
},
"drone": {
"title": "Peer",
"software-type": "peer",
"description": "Peer Instance",
"request": "instance-peer-input-schema.json",
"response": "instance-peer-output-schema.json",
"index": 1
} }
} }
} }
[buildout] [buildout]
extends = extends =
software.cfg software-peer-base.cfg
[sqdr-source] [sqdr-source]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/slaposdrone/squadrone.git repository = https://lab.nexedi.com/slaposdrone/squadrone.git
revision = v2.0 revision = v2.1
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
[sqdr-wrapper] [sqdr-wrapper]
...@@ -17,6 +17,5 @@ environment = ...@@ -17,6 +17,5 @@ environment =
LDFLAGS=-L${sqdr-source:location}/lib -Wl,-rpath=${sqdr-source:location}/lib LDFLAGS=-L${sqdr-source:location}/lib -Wl,-rpath=${sqdr-source:location}/lib
[qjs-wrapper] [qjs-wrapper]
environment = autopilot-wrapper = ${sqdr-wrapper:location}
C_INCLUDE_PATH=include:${open62541:location}/include:${open62541:location}/deps:${open62541:location}/src/pubsub:${quickjs:location}/include make-options = WITH_AUTOPILOT=y
LDFLAGS=-L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -L${sqdr-wrapper:location}/lib -Wl,-rpath=${sqdr-wrapper:location}/lib
[buildout]
extends =
../../component/gwsocket/buildout.cfg
software-peer-base.cfg
parts +=
instance-subscriber
[instance-subscriber]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
[instance-peer-base]
output = ${buildout:directory}/template-base.cfg
[index-html]
<= download
[script-js]
<= download
...@@ -31,9 +31,11 @@ import os ...@@ -31,9 +31,11 @@ import os
import socket import socket
import struct import struct
import time import time
import websocket
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from contextlib import closing
from websocket import create_connection
from slapos.testing.testcase import installSoftwareUrlList, makeModuleSetUpAndTestCaseClass
''' '''
0. positionArray 0. positionArray
...@@ -46,11 +48,13 @@ from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass ...@@ -46,11 +48,13 @@ from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
1.2 air speed 1.2 air speed
1.3 climb rate 1.3 climb rate
2. message 2. message
3. log
''' '''
MONITORED_ITEM_NB = 3 MONITORED_ITEM_NB = 4
OPC_UA_PORT = 4840 OPC_UA_PORT = 4840
OPC_UA_NET_IF = 'lo' OPC_UA_NET_IF = 'lo'
MCAST_GRP = 'ff15::1111' MCAST_GRP = 'ff15::1111'
LOOP_PERIOD = 200
# OPC UA Pub/Sub related constants # OPC UA Pub/Sub related constants
VERSION = 1 VERSION = 1
...@@ -107,10 +111,27 @@ SPEED_ARRAY_VALUES = (-72.419998, 15.93, -0.015) ...@@ -107,10 +111,27 @@ SPEED_ARRAY_VALUES = (-72.419998, 15.93, -0.015)
STRING_TYPE = 12 STRING_TYPE = 12
MESSAGE_CONTENT = b'{\\"next_checkpoint\\":1}' MESSAGE_CONTENT = b'{\\"next_checkpoint\\":1}'
TEST_MESSAGE = b'{"content":"' + MESSAGE_CONTENT + b'","dest_id":-1}' TEST_MESSAGE = b'{"content":"' + MESSAGE_CONTENT + b'","dest_id":-1}'
LOG = b''
root_software_release_url = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-root.cfg'))
subscriber_software_release_url = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-subscriber.cfg'))
c_astral_software_release_url = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-c-astral.cfg'))
setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass( _, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(root_software_release_url))
os.path.join(os.path.dirname(__file__), '..', 'software.cfg')))
def setUpModule():
installSoftwareUrlList(
SlapOSInstanceTestCase,
[root_software_release_url, subscriber_software_release_url,
c_astral_software_release_url],
debug=bool(int(os.environ.get('SLAPOS_TEST_DEBUG', 0))),
)
class SubscriberTestCase(SlapOSInstanceTestCase): class SubscriberTestCase(SlapOSInstanceTestCase):
...@@ -119,8 +140,8 @@ class SubscriberTestCase(SlapOSInstanceTestCase): ...@@ -119,8 +140,8 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
return { return {
'_': json.dumps({ '_': json.dumps({
'droneGuidList': [cls.slap._computer_id], 'droneGuidList': [cls.slap._computer_id],
'netIf': OPC_UA_NET_IF,
'subscriberGuidList': [cls.slap._computer_id], 'subscriberGuidList': [cls.slap._computer_id],
'subscriberNetIf': OPC_UA_NET_IF
}) })
} }
...@@ -201,6 +222,12 @@ class SubscriberTestCase(SlapOSInstanceTestCase): ...@@ -201,6 +222,12 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
ua_array += struct.pack(struct_type, value) ua_array += struct.pack(struct_type, value)
return ua_array return ua_array
def ua_string_encode(self, string):
ua_string = struct.pack('B', STRING_TYPE)
ua_string += struct.pack('I', len(string))
ua_string += string
return ua_string
def ua_dataSetMessage_encode(self): def ua_dataSetMessage_encode(self):
data_set_message = self.ua_dataSetMessageHeader_encode() data_set_message = self.ua_dataSetMessageHeader_encode()
data_set_message += struct.pack('H', MONITORED_ITEM_NB) data_set_message += struct.pack('H', MONITORED_ITEM_NB)
...@@ -214,9 +241,8 @@ class SubscriberTestCase(SlapOSInstanceTestCase): ...@@ -214,9 +241,8 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
'f', 'f',
SPEED_ARRAY_VALUES, SPEED_ARRAY_VALUES,
) )
data_set_message += struct.pack('B', STRING_TYPE) data_set_message += self.ua_string_encode(TEST_MESSAGE)
data_set_message += struct.pack('I', len(TEST_MESSAGE)) data_set_message += self.ua_string_encode(LOG)
data_set_message += TEST_MESSAGE
return data_set_message return data_set_message
def send_ua_networkMessage(self): def send_ua_networkMessage(self):
...@@ -238,7 +264,6 @@ class SubscriberTestCase(SlapOSInstanceTestCase): ...@@ -238,7 +264,6 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
for expected_process_name in expected_process_name_list: for expected_process_name in expected_process_name_list:
self.assertIn(expected_process_name, process_names) self.assertIn(expected_process_name, process_names)
def test_requested_instances(self): def test_requested_instances(self):
connection_parameter_dict = json.loads( connection_parameter_dict = json.loads(
self.computer_partition.getConnectionParameterDict()['_']) self.computer_partition.getConnectionParameterDict()['_'])
...@@ -251,10 +276,12 @@ class SubscriberTestCase(SlapOSInstanceTestCase): ...@@ -251,10 +276,12 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
{ {
'autopilotIp': '192.168.27.1', 'autopilotIp': '192.168.27.1',
'autopilotPort': 7909, 'autopilotPort': 7909,
'numberOfDrone': 1, 'numberOfDrones': 1,
'numberOfSubscriber': 1, 'numberOfSubscribers': 1,
'id': 1, 'id': 1,
'debug': False,
'isASimulation': False, 'isASimulation': False,
'loopPeriod': LOOP_PERIOD,
'isADrone': False, 'isADrone': False,
'flightScript': 'https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/subscribe.js', 'flightScript': 'https://lab.nexedi.com/nexedi/flight-scripts/-/raw/v2.0/subscribe.js',
'netIf': OPC_UA_NET_IF, 'netIf': OPC_UA_NET_IF,
...@@ -277,32 +304,32 @@ class SubscriberTestCase(SlapOSInstanceTestCase): ...@@ -277,32 +304,32 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
self.assertIn(expected_string, f.readlines()) self.assertIn(expected_string, f.readlines())
def test_pubsub_subscription(self): def test_pubsub_subscription(self):
ws = websocket.WebSocket() with closing(create_connection(self.websocket_server_address, timeout=5)) as conn:
ws.connect(self.websocket_server_address, timeout=5)
# Check if first message is 'Unknown instruction IP' where IP is client IPv6 address # Check if first message is 'Unknown instruction IP' where IP is client IPv6 address
self.assertIn( self.assertIn(
b'Unknown instruction %s' % ws.sock.getsockname()[0].encode(), b'Unknown instruction %s' % conn.sock.getsockname()[0].encode(),
ws.recv_frame().data conn.recv_frame().data,
) )
self.assertEqual( self.assertEqual(
ws.recv_frame().data, conn.recv_frame().data,
b''.join(( b''.join((
b'{"drone_dict":{"0":{"latitude":', b'{"drone_dict":{"0":{"latitude":',
b'"%.6f","longitude":"%.6f","altitude":"%.2f",' % (0, 0, 0), b'"%.6f","longitude":"%.6f","altitude":"%.2f",' % (0, 0, 0),
b'"yaw":"%.2f","speed":"%.2f","climbRate":"%.2f",' % (0, 0, 0), b'"yaw":"%.2f","speed":"%.2f","climbRate":"%.2f",' % (0, 0, 0),
b'"timestamp":%d}}}' % 0, b'"timestamp":%d,' % 0,
)) b'"log":""}}}',
)),
) )
self.send_ua_networkMessage() self.send_ua_networkMessage()
time.sleep(0.1) time.sleep(0.1)
self.assertEqual(ws.recv_frame().data, MESSAGE_CONTENT.replace(b'\\', b'')) self.assertEqual(conn.recv_frame().data, MESSAGE_CONTENT.replace(b'\\', b''))
self.assertEqual( self.assertEqual(
ws.recv_frame().data, conn.recv_frame().data,
b''.join(( b''.join((
b'{"drone_dict":{"0":{"latitude":', b'{"drone_dict":{"0":{"latitude":',
b'"%.6f","longitude":"%.6f","altitude":"%.2f",' % POSITION_ARRAY_OUTPUT_VALUES[:-1], b'"%.6f","longitude":"%.6f","altitude":"%.2f",' % POSITION_ARRAY_OUTPUT_VALUES[:-1],
b'"yaw":"%.2f","speed":"%.2f","climbRate":"%.2f",' % SPEED_ARRAY_VALUES, b'"yaw":"%.2f","speed":"%.2f","climbRate":"%.2f",' % SPEED_ARRAY_VALUES,
b'"timestamp":%d}}}' % POSITION_ARRAY_INPUT_VALUES[-1], b'"timestamp":%d,' % POSITION_ARRAY_INPUT_VALUES[-1],
)) b'"log":""}}}',
)),
) )
ws.close()
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
<style> <style>
button { button {
padding: 0.5%; margin: 2vh;
padding: 2vh;
font-size: 24px; font-size: 24px;
cursor: pointer; cursor: pointer;
border: none; border: none;
...@@ -20,38 +21,64 @@ ...@@ -20,38 +21,64 @@
box-shadow: 0 2px #666; box-shadow: 0 2px #666;
transform: translateY(4px); transform: translateY(4px);
} }
div > * {margin: 1%} label {margin: auto 2%}
label {margin: 2%} table {
table {width: 30%} min-width: 1028px;
height: max-content;
}
textarea {
resize: none;
}
th, td{ th, td{
padding: 1%; padding: 1%;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
white-space: nowrap;
} }
.blue-text {color: blue}
.connected {color: green} .connected {color: green}
.container { .container {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.cyan-text {color: cyan}
.disconnected {color: red} .disconnected {color: red}
.gray-button {background-color: lightgray} .gray-button {background-color: lightgray}
.gray-button:hover {background-color: gray} .gray-button:hover {background-color: gray}
.green-text {color: green}
.green-button {background-color: #4caf50} .green-button {background-color: #4caf50}
.green-button:hover {background-color: #3e8e41} .green-button:hover {background-color: #3e8e41}
.magenta-text {color: magenta}
.red-button {background-color: red} .red-button {background-color: red}
.red-button {background-color: #e42828} .red-button:hover {background-color: #e42828}
.red-text {color: red}
.white-text {color: white}
.yellow-text {color: yellow}
#drones-status {height: 50vh}
</style> </style>
</head> </head>
<body> <body>
<div class="container">
<header class="container">
<label for="web-socket-status">web socket status:</label> <label for="web-socket-status">web socket status:</label>
<output class="disconnected" id="web-socket-status">Disconnected</output> <output class="disconnected" id="web-socket-status">Disconnected</output>
</header> </div>
{% if debug -%}
<div class="container"> <div class="container">
<table>
{% for i in range(int(nb_drones)) -%}
<tr>
<th>Drone {{ i }} logs</th>
<td><textarea id="log_{{ i }}" rows="4" cols="100" readonly></textarea><td>
</tr>
{% endfor %}
</table>
</div>
{% endif -%}
<div class="container" id="drones-status">
<table> <table>
<tr> <tr>
<th></th> <th></th>
...@@ -101,6 +128,12 @@ ...@@ -101,6 +128,12 @@
<td id="climb_rate_{{ i }}"></td> <td id="climb_rate_{{ i }}"></td>
{% endfor %} {% endfor %}
</tr> </tr>
<tr>
<th>Timestamp (hh:mm:ss)</th>
{% for i in range(int(nb_drones)) -%}
<td id="timestamp_{{ i }}"></td>
{% endfor %}
</tr>
</table> </table>
</div> </div>
......
...@@ -12,17 +12,23 @@ ...@@ -12,17 +12,23 @@
FLIGHT_STATUS_BASE_ID = "flight_state_", FLIGHT_STATUS_BASE_ID = "flight_state_",
GREEN_BTN_CLASS_NAME = "green-button", GREEN_BTN_CLASS_NAME = "green-button",
LATITUDE_BASE_ID = "latitude_", LATITUDE_BASE_ID = "latitude_",
LOG_BASE_ID = "log_",
LONGITUDE_BASE_ID = "longitude_", LONGITUDE_BASE_ID = "longitude_",
QUIT_BTN_ID = "quit-btn", QUIT_BTN_ID = "quit-btn",
RED_BTN_CLASS_NAME = "red-button", RED_BTN_CLASS_NAME = "red-button",
SWITCH_BTN_ID = "switch-btn", SWITCH_BTN_ID = "switch-btn",
TIMESTAMP_BASE_ID = "timestamp_",
WEB_SOCKET_STATUS_OUTPUT_ID = "web-socket-status", WEB_SOCKET_STATUS_OUTPUT_ID = "web-socket-status",
YAW_BASE_ID = "yaw_", YAW_BASE_ID = "yaw_",
socket; socket;
function updateConnexionClass(element, status) { function updateConnexionClass(element, status) {
element.classList.remove(status ? DISCONNECTED_CLASS_NAME : CONNECTED_CLASS_NAME); element.classList.remove(
element.classList.add(status ? CONNECTED_CLASS_NAME : DISCONNECTED_CLASS_NAME); status ? DISCONNECTED_CLASS_NAME : CONNECTED_CLASS_NAME
);
element.classList.add(
status ? CONNECTED_CLASS_NAME : DISCONNECTED_CLASS_NAME
);
} }
function setWebSocketStatus(connected, status) { function setWebSocketStatus(connected, status) {
...@@ -49,21 +55,34 @@ ...@@ -49,21 +55,34 @@
socket = new WebSocket('ws://{{ websocket_url }}'); socket = new WebSocket('ws://{{ websocket_url }}');
socket.onopen = function(event) { socket.onopen = function (event) {
setWebSocketStatus(true, "Connected"); setWebSocketStatus(true, "Connected");
}; };
socket.onmessage = function(event) { socket.onmessage = function (event) {
var message = JSON.parse(event.data), var color_array,
flight_state_cell; date,
flight_state_cell,
i,
message,
new_div,
new_span,
text_array;
try {
message = JSON.parse(event.data);
if (message.hasOwnProperty("drone_dict")) { if (message.hasOwnProperty("drone_dict")) {
Object.entries(message["drone_dict"]).forEach(function ([id, drone]) { Object.entries(message.drone_dict).forEach(function ([id, drone]) {
document.getElementById(LATITUDE_BASE_ID + id).innerHTML = drone["latitude"]; document.getElementById(LATITUDE_BASE_ID + id).innerHTML = drone["latitude"];
document.getElementById(LONGITUDE_BASE_ID + id).innerHTML = drone["longitude"]; document.getElementById(LONGITUDE_BASE_ID + id).innerHTML = drone["longitude"];
document.getElementById(ALTITUDE_BASE_ID + id).innerHTML = drone["altitude"]; document.getElementById(ALTITUDE_BASE_ID + id).innerHTML = drone["altitude"];
document.getElementById(YAW_BASE_ID + id).innerHTML = drone["yaw"]; document.getElementById(YAW_BASE_ID + id).innerHTML = drone["yaw"];
document.getElementById(SPEED_BASE_ID + id).innerHTML = drone["speed"]; document.getElementById(SPEED_BASE_ID + id).innerHTML = drone["speed"];
document.getElementById(CLIMB_RATE_BASE_ID + id).innerHTML = drone["climbRate"]; document.getElementById(CLIMB_RATE_BASE_ID + id).innerHTML = drone["climbRate"];
document.getElementById(TIMESTAMP_BASE_ID + id).innerHTML = new Date(drone["timestamp"]).toLocaleTimeString('fr-FR');
{% if debug -%}
document.getElementById(LOG_BASE_ID + id).value += drone["log"];
{% endif -%}
}); });
} else if (message.hasOwnProperty("state") && message.hasOwnProperty("id")) { } else if (message.hasOwnProperty("state") && message.hasOwnProperty("id")) {
flight_state_cell = document.getElementById(FLIGHT_STATUS_BASE_ID + message['id']); flight_state_cell = document.getElementById(FLIGHT_STATUS_BASE_ID + message['id']);
...@@ -72,6 +91,9 @@ ...@@ -72,6 +91,9 @@
} else { } else {
console.info(message); console.info(message);
} }
} catch (error) {
console.error(error, event.data);
}
}; };
socket.onclose = function(event) { socket.onclose = function(event) {
......
...@@ -19,7 +19,7 @@ md5sum = 7333d1dfd4e8e4c375f7f1748292f554 ...@@ -19,7 +19,7 @@ md5sum = 7333d1dfd4e8e4c375f7f1748292f554
[template-jscrawler] [template-jscrawler]
filename = instance-jscrawler.cfg.jinja2.in filename = instance-jscrawler.cfg.jinja2.in
md5sum = 2ba9d6a30b420c9bf67d4a135b48212b md5sum = 2d8da11d54464422110f92dc62c55c78
[template-jscrawler-builder] [template-jscrawler-builder]
filename = template-jscrawler.builder.sh.in filename = template-jscrawler.builder.sh.in
......
...@@ -19,7 +19,7 @@ tmp = ${:srv}/tmp ...@@ -19,7 +19,7 @@ tmp = ${:srv}/tmp
################################# #################################
[gen-certificate] [gen-certificate]
recipe = plone.recipe.command recipe = plone.recipe.command
command = "{{ parameter_dict['openssl'] }}" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:ssl_key}" -out "${:ssl_crt}" command = "{{ parameter_dict['openssl'] }}" req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "${:ssl_key}" -out "${:ssl_crt}"
stop-on-error = true stop-on-error = true
ssl_crt = ${directory:ssl}/httpd.crt ssl_crt = ${directory:ssl}/httpd.crt
ssl_key = ${directory:ssl}/httpd.key ssl_key = ${directory:ssl}/httpd.key
......
...@@ -19,7 +19,7 @@ md5sum = 5f39952f94095b1f12f41db76867e71e ...@@ -19,7 +19,7 @@ md5sum = 5f39952f94095b1f12f41db76867e71e
[instance-jupyter] [instance-jupyter]
filename = instance-jupyter.cfg.in filename = instance-jupyter.cfg.in
md5sum = 1ac942c544d2a2aa3d1e16a61a1f8bc8 md5sum = f9a0e5a134456d74ca8b4d87862f903d
[jupyter-notebook-config] [jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja filename = jupyter_notebook_config.py.jinja
......
...@@ -61,9 +61,9 @@ recipe = plone.recipe.command ...@@ -61,9 +61,9 @@ recipe = plone.recipe.command
command = command =
if [ ! -e ${instance-parameter:key_file} ] if [ ! -e ${instance-parameter:key_file} ]
then then
{{ openssl_output }} req -x509 -nodes -days 3650 \ {{ openssl_output }} req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=${instance-parameter:host}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=${instance-parameter:host}" \
-newkey rsa:1024 -keyout ${instance-parameter:key_file} \ -newkey rsa -keyout ${instance-parameter:key_file} \
-out ${instance-parameter:cert_file} -out ${instance-parameter:cert_file}
fi fi
update-command = ${:command} update-command = ${:command}
......
...@@ -79,7 +79,7 @@ md5sum = a97ba5a5afcfd6f6bb9f4e77f37555dd ...@@ -79,7 +79,7 @@ md5sum = a97ba5a5afcfd6f6bb9f4e77f37555dd
[template-httpd] [template-httpd]
filename = instance-kvm-http.cfg.in filename = instance-kvm-http.cfg.in
md5sum = 438192aab9f11e40dc521b46a4854dcf md5sum = 12779e690aa8341da660d833e102e552
[image-download-controller] [image-download-controller]
filename = template/image-download-controller.py.in filename = template/image-download-controller.py.in
......
...@@ -57,7 +57,7 @@ mode = 700 ...@@ -57,7 +57,7 @@ mode = 700
[httpd-ssl] [httpd-ssl]
recipe = plone.recipe.command recipe = plone.recipe.command
command = "{{ openssl_executable_location }}" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}" command = "{{ openssl_executable_location }}" req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}"
key = ${directory:ssl}/key key = ${directory:ssl}/key
cert = ${directory:ssl}/cert cert = ${directory:ssl}/cert
update-command = update-command =
......
...@@ -234,10 +234,14 @@ class TestInstance(KVMTestCase, KvmMixin): ...@@ -234,10 +234,14 @@ class TestInstance(KVMTestCase, KvmMixin):
{ {
'ipv6': self.computer_partition_ipv6_address, 'ipv6': self.computer_partition_ipv6_address,
'maximum-extra-disk-amount': '0', 'maximum-extra-disk-amount': '0',
'monitor-base-url': f'https://[{self.computer_partition_ipv6_address}]:8026', 'monitor-base-url':
'nat-rule-port-tcp-22': f'{self.computer_partition_ipv6_address} : 10022', f'https://[{self.computer_partition_ipv6_address}]:8026',
'nat-rule-port-tcp-443': f'{self.computer_partition_ipv6_address} : 10443', 'nat-rule-port-tcp-22':
'nat-rule-port-tcp-80': f'{self.computer_partition_ipv6_address} : 10080', f'{self.computer_partition_ipv6_address} : 10022',
'nat-rule-port-tcp-443':
f'{self.computer_partition_ipv6_address} : 10443',
'nat-rule-port-tcp-80':
f'{self.computer_partition_ipv6_address} : 10080',
} }
) )
self.assertEqual(set(present_key_list), set(assert_key_list)) self.assertEqual(set(present_key_list), set(assert_key_list))
...@@ -713,7 +717,8 @@ class TestInstanceResilient(KVMTestCase, KvmMixin): ...@@ -713,7 +717,8 @@ class TestInstanceResilient(KVMTestCase, KvmMixin):
connection_parameter_dict, connection_parameter_dict,
{ {
'ipv6': self.kvm0_ipv6, 'ipv6': self.kvm0_ipv6,
'monitor-base-url': f'https://[{self.computer_partition_ipv6_address}]:8160', 'monitor-base-url':
f'https://[{self.computer_partition_ipv6_address}]:8160',
'monitor-user': 'admin', 'monitor-user': 'admin',
'takeover-kvm-1-url': f'http://[{self.kvm1_ipv6}]:9263/', 'takeover-kvm-1-url': f'http://[{self.kvm1_ipv6}]:9263/',
} }
...@@ -2212,7 +2217,8 @@ class TestExternalDiskModernCluster(TestExternalDiskModern): ...@@ -2212,7 +2217,8 @@ class TestExternalDiskModernCluster(TestExternalDiskModern):
return 'kvm-cluster' return 'kvm-cluster'
def getExternalDiskInstanceParameterDict(self, *args, **kwargs): def getExternalDiskInstanceParameterDict(self, *args, **kwargs):
partition_dict = super().getExternalDiskInstanceParameterDict(*args, **kwargs) partition_dict = super().getExternalDiskInstanceParameterDict(
*args, **kwargs)
partition_dict.update({"disable-ansible-promise": True}) partition_dict.update({"disable-ansible-promise": True})
return { return {
"kvm-partition-dict": { "kvm-partition-dict": {
...@@ -2366,10 +2372,14 @@ vm""", ...@@ -2366,10 +2372,14 @@ vm""",
{ {
'ipv6': self.computer_partition_ipv6_address, 'ipv6': self.computer_partition_ipv6_address,
'maximum-extra-disk-amount': '0', 'maximum-extra-disk-amount': '0',
'monitor-base-url': f'https://[{self.computer_partition_ipv6_address}]:8026', 'monitor-base-url':
'nat-rule-port-tcp-22': f'{self.computer_partition_ipv6_address} : 10022', f'https://[{self.computer_partition_ipv6_address}]:8026',
'nat-rule-port-tcp-443': f'{self.computer_partition_ipv6_address} : 10443', 'nat-rule-port-tcp-22':
'nat-rule-port-tcp-80': f'{self.computer_partition_ipv6_address} : 10080', f'{self.computer_partition_ipv6_address} : 10022',
'nat-rule-port-tcp-443':
f'{self.computer_partition_ipv6_address} : 10443',
'nat-rule-port-tcp-80':
f'{self.computer_partition_ipv6_address} : 10080',
} }
) )
self.assertEqual(set(present_key_list), set(assert_key_list)) self.assertEqual(set(present_key_list), set(assert_key_list))
......
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = f753802ad631a57c559d868e525cf81b md5sum = 798485b3dd08749ff8ec92d65c6a180f
...@@ -78,7 +78,7 @@ recipe = plone.recipe.command ...@@ -78,7 +78,7 @@ recipe = plone.recipe.command
command = command =
if [ ! -e $${:cert-file} ] if [ ! -e $${:cert-file} ]
then then
${openssl-output:openssl} req -x509 -nodes -days 3650 \ ${openssl-output:openssl} req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa -keyout $${:cert-file} \ -newkey rsa -keyout $${:cert-file} \
-out $${:cert-file} -out $${:cert-file}
......
...@@ -32,6 +32,10 @@ parts = ...@@ -32,6 +32,10 @@ parts =
[python] [python]
part = python2.7 part = python2.7
[gcc:python2]
# use old gcc version for old scipy version used in python2
part = gcc-8.5
[neoppod-repository] [neoppod-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/neoppod.git repository = https://lab.nexedi.com/nexedi/neoppod.git
......
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 6482b6aea742357350f0d7e350f9baa6 md5sum = 52e599b14817e28e7ee48706360ad3cc
[template-nginx-configuration] [template-nginx-configuration]
filename = template-nginx.cfg.in filename = template-nginx.cfg.in
......
...@@ -60,9 +60,9 @@ recipe = plone.recipe.command ...@@ -60,9 +60,9 @@ recipe = plone.recipe.command
command = command =
if [ ! -e $${:key-file} ] if [ ! -e $${:key-file} ]
then then
${openssl:location}/bin/openssl req -x509 -nodes -days 3650 \ ${openssl:location}/bin/openssl req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${nginx-configuration:ip}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=$${nginx-configuration:ip}" \
-newkey rsa:1024 -keyout $${:key-file} \ -newkey rsa -keyout $${:key-file} \
-out $${:cert-file} -out $${:cert-file}
fi fi
update-command = $${:command} update-command = $${:command}
......
...@@ -15,14 +15,11 @@ ...@@ -15,14 +15,11 @@
"properties": { "properties": {
"cell_type": { "cell_type": {
"type": "string", "type": "string"
"options": { "hidden": true }
}, },
"cell_kind": { "cell_kind": {
"type": "string", "type": "string",
"const": "enb", "const": "enb"
"template": "enb",
"options": { "hidden": true }
}, },
"rf_mode": { "rf_mode": {
...@@ -74,9 +71,8 @@ ...@@ -74,9 +71,8 @@
"required": ["ru_type", "ru_ref"], "required": ["ru_type", "ru_ref"],
"properties": { "properties": {
"ru_type": { "ru_type": {
"const": "ru_ref", "type": "string",
"template": "ru_ref", "const": "ru_ref"
"options": { "hidden": true }
}, },
"ru_ref": { "ru_ref": {
"title": "RU Reference", "title": "RU Reference",
...@@ -92,9 +88,8 @@ ...@@ -92,9 +88,8 @@
"required": ["ru_type", "ruincell_ref"], "required": ["ru_type", "ruincell_ref"],
"properties": { "properties": {
"ru_type": { "ru_type": {
"const": "ruincell_ref", "type": "string",
"template": "ruincell_ref", "const": "ruincell_ref"
"options": { "hidden": true }
}, },
"ruincell_ref": { "ruincell_ref": {
"title": "Cell Reference", "title": "Cell Reference",
...@@ -103,7 +98,9 @@ ...@@ -103,7 +98,9 @@
} }
} }
}, },
{ "$ref": "../ru/input-schema.json" } { "$ref": "../ru/sdr/input-schema.json" },
{ "$ref": "../ru/lopcomm/input-schema.json" },
{ "$ref": "../ru/sunwave/input-schema.json" }
] ]
} }
} }
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
"cell_type": { "cell_type": {
"$ref": "#/properties/cell_type", "$ref": "#/properties/cell_type",
"const": "lte", "const": "lte"
"template": "lte"
}, },
"tdd_ul_dl_config": { "tdd_ul_dl_config": {
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
"cell_type": { "cell_type": {
"$ref": "#/properties/cell_type", "$ref": "#/properties/cell_type",
"const": "nr", "const": "nr"
"template": "nr"
}, },
"tdd_ul_dl_config": { "tdd_ul_dl_config": {
......
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Type of the shared instance attached to eNB/gNB",
"type": "object",
"oneOf": [
{
"$ref": "ru/input-schema.json"
},
{
"$ref": "cell/input-schema.json"
},
{
"$ref": "peer/input-schema.json"
},
{
"$ref": "peer/cell/input-schema.json"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Values returned by instantiation of a shared instance attached to eNB/gNB",
"type": "object",
"oneOf": [
{
"$ref": "ru/schema.json"
},
{
"$ref": "cell/schema.json"
},
{
"$ref": "peer/schema.json"
},
{
"$ref": "peer/cell/schema.json"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Configuration of a shared instance attached to UEsim",
"type": "object",
"oneOf": [
{
"$ref": "ru/input-schema.json"
},
{
"$ref": "ue/input-schema.json"
},
{
"$ref": "ue/cell/input-schema.json"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Values returned by instantiation of a shared instance attached to UEsim",
"type": "object",
"oneOf": [
{
"$ref": "ru/schema.json"
},
{
"$ref": "ue/schema.json"
},
{
"$ref": "ue/cell/schema.json"
}
]
}
...@@ -12,14 +12,11 @@ ...@@ -12,14 +12,11 @@
"properties": { "properties": {
"cell_type": { "cell_type": {
"type": "string", "type": "string"
"options": { "hidden": true }
}, },
"cell_kind": { "cell_kind": {
"type": "string", "type": "string",
"const": "enb_peer", "const": "enb_peer"
"template": "enb_peer",
"options": { "hidden": true }
} }
} }
} }
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
"properties": { "properties": {
"cell_type": { "cell_type": {
"$ref": "../../../peer/cell/common.json#/properties/cell_type", "$ref": "../../../peer/cell/common.json#/properties/cell_type",
"const": "lte", "const": "lte"
"template": "lte"
}, },
"e_cell_id": { "e_cell_id": {
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
"properties": { "properties": {
"cell_type": { "cell_type": {
"$ref": "../../../peer/cell/common.json#/properties/cell_type", "$ref": "../../../peer/cell/common.json#/properties/cell_type",
"const": "nr", "const": "nr"
"template": "nr"
}, },
"nr_cell_id": { "nr_cell_id": {
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
"properties": { "properties": {
"peer_type": { "peer_type": {
"type": "string", "type": "string"
"options": { "hidden": true }
} }
} }
} }
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
"properties": { "properties": {
"peer_type": { "peer_type": {
"$ref": "../../peer/common.json#/properties/peer_type", "$ref": "../../peer/common.json#/properties/peer_type",
"const": "lte", "const": "lte"
"template": "lte"
}, },
"x2_addr": { "x2_addr": {
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
"properties": { "properties": {
"peer_type": { "peer_type": {
"$ref": "../../peer/common.json#/properties/peer_type", "$ref": "../../peer/common.json#/properties/peer_type",
"const": "nr", "const": "nr"
"template": "nr"
}, },
"xn_addr": { "xn_addr": {
......
...@@ -15,12 +15,10 @@ ...@@ -15,12 +15,10 @@
"properties": { "properties": {
"ru_type": { "ru_type": {
"type": "string", "type": "string"
"options": { "hidden": true }
}, },
"ru_link_type": { "ru_link_type": {
"type": "string", "type": "string"
"options": { "hidden": true }
}, },
"n_antenna_dl": { "n_antenna_dl": {
......
...@@ -38,5 +38,5 @@ destination = ${buildout:directory}/ncclient_common.py ...@@ -38,5 +38,5 @@ destination = ${buildout:directory}/ncclient_common.py
[ru_lopcomm_firmware-dl] [ru_lopcomm_firmware-dl]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/${:filename} url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/${:filename}
filename = PR.PRM61C70V1005.004.tar.gz filename = PR.PRM61C70V1005.005.tar.gz
md5sum = f16413604a8c7631fc6e3782fa9a2695 md5sum = 62281d0be42feac94e843e1850ba6e09
...@@ -21,13 +21,11 @@ ...@@ -21,13 +21,11 @@
"ru_type": { "ru_type": {
"$ref": "#/properties/ru_type", "$ref": "#/properties/ru_type",
"const": "lopcomm", "const": "lopcomm"
"template": "lopcomm"
}, },
"ru_link_type": { "ru_link_type": {
"$ref": "#/properties/ru_link_type", "$ref": "#/properties/ru_link_type",
"const": "cpri", "const": "cpri"
"template": "cpri"
}, },
"n_antenna_dl": { "n_antenna_dl": {
...@@ -45,8 +43,7 @@ ...@@ -45,8 +43,7 @@
"mapping": { "mapping": {
"$ref": "#/properties/cpri_link/properties/mapping", "$ref": "#/properties/cpri_link/properties/mapping",
"const": "hw", "const": "hw",
"enum": ["hw"], "enum": ["hw"]
"options": { "hidden": true }
}, },
"rx_delay": { "rx_delay": {
"$ref": "#/properties/cpri_link/properties/rx_delay", "$ref": "#/properties/cpri_link/properties/rx_delay",
......
...@@ -21,13 +21,11 @@ ...@@ -21,13 +21,11 @@
"ru_type": { "ru_type": {
"$ref": "#/properties/ru_type", "$ref": "#/properties/ru_type",
"const": "sdr", "const": "sdr"
"template": "sdr"
}, },
"ru_link_type": { "ru_link_type": {
"$ref": "#/properties/ru_link_type", "$ref": "#/properties/ru_link_type",
"const": "sdr", "const": "sdr"
"template": "sdr"
}, },
"sdr_dev_list": { "sdr_dev_list": {
......
...@@ -21,13 +21,11 @@ ...@@ -21,13 +21,11 @@
"ru_type": { "ru_type": {
"$ref": "#/properties/ru_type", "$ref": "#/properties/ru_type",
"const": "sunwave", "const": "sunwave"
"template": "sunwave"
}, },
"ru_link_type": { "ru_link_type": {
"$ref": "#/properties/ru_link_type", "$ref": "#/properties/ru_link_type",
"const": "cpri", "const": "cpri"
"template": "cpri"
}, },
"n_antenna_dl": { "n_antenna_dl": {
...@@ -45,8 +43,7 @@ ...@@ -45,8 +43,7 @@
"mapping": { "mapping": {
"$ref": "#/properties/cpri_link/properties/mapping", "$ref": "#/properties/cpri_link/properties/mapping",
"const": "bf1", "const": "bf1",
"enum": ["bf1"], "enum": ["bf1"]
"options": { "hidden": true }
}, },
"rx_delay": { "rx_delay": {
"$ref": "#/properties/cpri_link/properties/rx_delay", "$ref": "#/properties/cpri_link/properties/rx_delay",
......
...@@ -11,49 +11,22 @@ ...@@ -11,49 +11,22 @@
"response": "instance-enb-schema.json", "response": "instance-enb-schema.json",
"index": 1 "index": 1
}, },
"ru": { "enb/*": {
"title": "→ eNB/gNB | Radio Unit", "title": "→ eNB/gNB | Radio Unit / Cell / Peer / Peer Cell",
"description": "Configuration of Radio Unit attached to eNB/gNB", "description": "Configuration of a shared instance attached to eNB/gNB",
"software-type": "enb", "software-type": "enb",
"shared": true, "shared": true,
"request": "ru/input-schema.json", "request": "instance-enb-item-input-schema.json",
"response": "ru/schema.json", "response": "instance-enb-item-schema.json",
"index": 2 "index": 2
}, },
"cell": {
"title": "→ eNB/gNB | Cell",
"description": "Configuration of Cell served by eNB/gNB",
"software-type": "enb",
"shared": true,
"request": "cell/input-schema.json",
"response": "cell/schema.json",
"index": 3
},
"peer": {
"title": "→ eNB/gNB | Peer",
"description": "Handover information about nearby eNB/gNB",
"software-type": "enb",
"shared": true,
"request": "peer/input-schema.json",
"response": "peer/schema.json",
"index": 4
},
"peer/cell": {
"title": "→ eNB/gNB | Peer Cell",
"description": "Handover information about Peer Cell served by nearby eNB/gNB",
"software-type": "enb",
"shared": true,
"request": "peer/cell/input-schema.json",
"response": "peer/cell/schema.json",
"index": 5
},
"core-network": { "core-network": {
"title": "Core Network", "title": "Core Network",
"software-type": "core-network", "software-type": "core-network",
"description": "Core Network Configuration", "description": "Core Network Configuration",
"request": "instance-core-network-input-schema.json", "request": "instance-core-network-input-schema.json",
"response": "instance-core-network-schema.json", "response": "instance-core-network-schema.json",
"index": 6 "index": 3
}, },
"core-network-slave": { "core-network-slave": {
"title": "→ Core Network | Sim Card", "title": "→ Core Network | Sim Card",
...@@ -62,7 +35,7 @@ ...@@ -62,7 +35,7 @@
"request": "sim/input-schema.json", "request": "sim/input-schema.json",
"response": "sim/schema.json", "response": "sim/schema.json",
"shared": true, "shared": true,
"index": 7 "index": 4
}, },
"ue": { "ue": {
"title": "UEsim", "title": "UEsim",
...@@ -70,34 +43,16 @@ ...@@ -70,34 +43,16 @@
"software-type": "ue", "software-type": "ue",
"request": "instance-ue-input-schema.json", "request": "instance-ue-input-schema.json",
"response": "instance-ue-schema.json", "response": "instance-ue-schema.json",
"index": 8 "index": 5
},
"ue/ru": {
"title": "→ UEsim | Radio Unit",
"description": "Configuration of Radio Unit attached to UEsim",
"software-type": "ue",
"shared": true,
"request": "ru/input-schema.json",
"response": "ru/schema.json",
"index": 9
},
"ue/ue": {
"title": "→ UEsim | UE",
"description": "Configuration of UE simulated by UEsim",
"software-type": "ue",
"shared": true,
"request": "ue/input-schema.json",
"response": "ue/schema.json",
"index": 10
}, },
"ue/cell": { "ue/*": {
"title": "→ UEsim | UE Cell", "title": "→ UEsim | Radio Unit / UE / UE Cell",
"description": "Information about Cell to which UEsim attaches", "description": "Configuration of a shared instance attached to UEsim",
"software-type": "ue", "software-type": "ue",
"shared": true, "shared": true,
"request": "ue/cell/input-schema.json", "request": "instance-ue-item-input-schema.json",
"response": "ue/cell/schema.json", "response": "instance-ue-item-schema.json",
"index": 11 "index": 6
} }
} }
} }
...@@ -13,14 +13,11 @@ ...@@ -13,14 +13,11 @@
"properties": { "properties": {
"cell_type": { "cell_type": {
"type": "string", "type": "string"
"options": { "hidden": true }
}, },
"cell_kind": { "cell_kind": {
"type": "string", "type": "string",
"const": "ue", "const": "ue"
"template": "ue",
"options": { "hidden": true }
}, },
"rf_mode": { "$ref": "../../cell/common.json#/properties/rf_mode" }, "rf_mode": { "$ref": "../../cell/common.json#/properties/rf_mode" },
......
...@@ -18,13 +18,12 @@ ...@@ -18,13 +18,12 @@
"cell_type": { "cell_type": {
"$ref": "../../../ue/cell/common.json#/properties/cell_type", "$ref": "../../../ue/cell/common.json#/properties/cell_type",
"const": "lte", "const": "lte",
"template": "lte"
}, },
"cell_kind": { "$ref": "../../../ue/cell/common.json#/properties/cell_kind" }, "cell_kind": { "$ref": "../../../ue/cell/common.json#/properties/cell_kind" },
"rf_mode": { "$ref": "../../../ue/cell/common.json#/properties/rf_mode" }, "rf_mode": { "$ref": "../../../ue/cell/common.json#/properties/rf_mode" },
"ru": { "$ref": "../../../ue/cell/common.json#/properties/ru", "ru": { "$ref": "../../../ue/cell/common.json#/properties/ru",
"propertyOrder": 9999" "propertyOrder": 9999
}, },
"dl_earfcn": { "$ref": "../../../cell/lte/input-schema.json#/properties/dl_earfcn" }, "dl_earfcn": { "$ref": "../../../cell/lte/input-schema.json#/properties/dl_earfcn" },
......
...@@ -18,14 +18,13 @@ ...@@ -18,14 +18,13 @@
"properties": { "properties": {
"cell_type": { "cell_type": {
"$ref": "../../../ue/cell/common.json#/properties/cell_type", "$ref": "../../../ue/cell/common.json#/properties/cell_type",
"const": "nr", "const": "nr"
"template": "nr"
}, },
"cell_kind": { "$ref": "../../../ue/cell/common.json#/properties/cell_kind" }, "cell_kind": { "$ref": "../../../ue/cell/common.json#/properties/cell_kind" },
"rf_mode": { "$ref": "../../../ue/cell/common.json#/properties/rf_mode" }, "rf_mode": { "$ref": "../../../ue/cell/common.json#/properties/rf_mode" },
"ru": { "$ref": "../../../ue/cell/common.json#/properties/ru", "ru": { "$ref": "../../../ue/cell/common.json#/properties/ru",
"propertyOrder": 9999" "propertyOrder": 9999
}, },
"dl_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/dl_nr_arfcn" }, "dl_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/dl_nr_arfcn" },
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
"$ref": "../sim/input-schema.json#/properties", "$ref": "../sim/input-schema.json#/properties",
"ue_type": { "ue_type": {
"type": "string", "type": "string"
"options": { "hidden": true }
}, },
"rue_addr": { "rue_addr": {
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
"ue_type": { "ue_type": {
"$ref": "#/properties/ue_type", "$ref": "#/properties/ue_type",
"const": "lte", "const": "lte"
"template": "lte"
} }
} }
} }
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
"ue_type": { "ue_type": {
"$ref": "#/properties/ue_type", "$ref": "#/properties/ue_type",
"const": "nr", "const": "nr"
"template": "nr"
} }
} }
} }
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = cf6c11bc335c75139695008128f1565a md5sum = 9ca5ddf6bed34861a17e3352dacc4813
...@@ -55,3 +55,5 @@ service = ${:etc}/service ...@@ -55,3 +55,5 @@ service = ${:etc}/service
[publish-connection-parameter] [publish-connection-parameter]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
url-ipv6 = opc.tcp://[${instance-parameter:ipv6-random}]:${instance-parameter:configuration.opc_ua_port} url-ipv6 = opc.tcp://[${instance-parameter:ipv6-random}]:${instance-parameter:configuration.opc_ua_port}
username = ${instance-parameter:configuration.username}
password = ${instance-parameter:configuration.password}
[buildout] [buildout]
parts = parts =
gcc-10.2
open62541 open62541
compile-coupler compile-coupler
slapos-cookbook slapos-cookbook
...@@ -12,16 +11,11 @@ extends = ...@@ -12,16 +11,11 @@ extends =
../../component/open62541/buildout.cfg ../../component/open62541/buildout.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/gcc/buildout.cfg ../../component/defaults.cfg
# disable warning for time_t type structure after 2038 [gcc]
# https://www.gnu.org/software/gnulib/manual/html_node/Avoiding-the-year-2038-problem.html # we want this SR to use a fixed gcc (so that we have the same gcc as open62541 component)
[coreutils] max_version = 0
configure-options =
--disable-libcap
--without-selinux
--prefix=@@LOCATION@@
--disable-year2038
# we need open62541's sources even after compiling and linking in [open62541] # we need open62541's sources even after compiling and linking in [open62541]
# section. Reasons is that coupler's C application depends on it. # section. Reasons is that coupler's C application depends on it.
...@@ -62,7 +56,7 @@ recipe = slapos.recipe.cmmi ...@@ -62,7 +56,7 @@ recipe = slapos.recipe.cmmi
path = ${osie-repository:location}/coupler path = ${osie-repository:location}/coupler
bin_dir = ${:path}/bin/ bin_dir = ${:path}/bin/
environment = environment =
PATH=${gcc-10.2:location}/bin:/usr/bin PATH=${gcc:prefix}/bin:/usr/bin
OPEN62541_HOME = ${open62541:location} OPEN62541_HOME = ${open62541:location}
OPEN62541_SOURCE_HOME = ${open62541-source:location} OPEN62541_SOURCE_HOME = ${open62541-source:location}
C_COMPILER_EXTRA_FLAGS = -L ${mbedtls:location}/lib -Wl,-rpath=${mbedtls:location}/lib -l:libopen62541.so -L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -I${open62541:location}/include -I${open62541-source:location}/src/pubsub/ -I${open62541-source:location}/deps C_COMPILER_EXTRA_FLAGS = -L ${mbedtls:location}/lib -Wl,-rpath=${mbedtls:location}/lib -l:libopen62541.so -L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -I${open62541:location}/include -I${open62541-source:location}/src/pubsub/ -I${open62541-source:location}/deps
......
...@@ -23,7 +23,6 @@ extends = ...@@ -23,7 +23,6 @@ extends =
../../component/ffmpeg/buildout.cfg ../../component/ffmpeg/buildout.cfg
../../component/postgresql/buildout.cfg ../../component/postgresql/buildout.cfg
../../component/nspr/buildout.cfg ../../component/nspr/buildout.cfg
../../component/gcc/buildout.cfg
../../component/libxml2/buildout.cfg ../../component/libxml2/buildout.cfg
../../component/libxslt/buildout.cfg ../../component/libxslt/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
...@@ -40,7 +39,6 @@ parts = ...@@ -40,7 +39,6 @@ parts =
# in 99,9% of Slapos Software Releases) # in 99,9% of Slapos Software Releases)
slapos-cookbook slapos-cookbook
dcron dcron
gcc
unzip unzip
curl curl
openssl openssl
...@@ -67,7 +65,7 @@ md5sum = 1c9639748d66e8c49fc27e4705f87622 ...@@ -67,7 +65,7 @@ md5sum = 1c9639748d66e8c49fc27e4705f87622
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
path = ${peertube:location} path = ${peertube:location}
environment = environment =
PATH=${unzip:location}/bin:${vim:location}/bin:${nodejs:location}/bin:${yarn:location}/bin:${python3:location}/bin:${nginx:location}/sbin:${postgresql10:location}/bin:${gcc-10.2:location}/bin:${redis:location}/bin:{git:location}/bin:{wget:location}/bin:%(PATH)s PATH=${unzip:location}/bin:${vim:location}/bin:${nodejs:location}/bin:${yarn:location}/bin:${python3:location}/bin:${nginx:location}/sbin:${postgresql10:location}/bin:${redis:location}/bin:${git:location}/bin:${wget:location}/bin:%(PATH)s
CPPFLAGS=-I${openssl:location}/include CPPFLAGS=-I${openssl:location}/include
LDFLAGS=-L${curl:location}/lib -Wl,-rpath -Wl,${openssl:location}/lib -Wl LDFLAGS=-L${curl:location}/lib -Wl,-rpath -Wl,${openssl:location}/lib -Wl
pre-configure = pre-configure =
......
...@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68 ...@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend] [profile-frontend]
filename = instance-frontend.cfg.in filename = instance-frontend.cfg.in
md5sum = bb8129cdd89632c3c3ce86556496cb0f md5sum = b3c5694042035f13832479dca3481597
[profile-master] [profile-master]
filename = instance-master.cfg.in filename = instance-master.cfg.in
md5sum = 3006197ddce87bd92866b76b5ce8ce08 md5sum = 934b7f5e8d470e18bc980942bf467ada
[profile-slave-list] [profile-slave-list]
filename = instance-slave-list.cfg.in filename = instance-slave-list.cfg.in
md5sum = b75e42233c1b7bdd5f21971ed8907efc md5sum = 96bd66e98c7b4492ab4aba46e0e14e13
[profile-master-publish-slave-information] [profile-master-publish-slave-information]
filename = instance-master-publish-slave-information.cfg.in filename = instance-master-publish-slave-information.cfg.in
...@@ -102,7 +102,7 @@ md5sum = e82ccdb0b26552a1c88ff523d8fae24a ...@@ -102,7 +102,7 @@ md5sum = e82ccdb0b26552a1c88ff523d8fae24a
[profile-kedifa] [profile-kedifa]
filename = instance-kedifa.cfg.in filename = instance-kedifa.cfg.in
md5sum = 669da915003122e48646dc75fec239a5 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
......
...@@ -209,7 +209,7 @@ command = ...@@ -209,7 +209,7 @@ command =
rm -f ${:certificate} rm -f ${:certificate}
/bin/bash -c ' \ /bin/bash -c ' \
{{ software_parameter_dict['openssl'] }} req \ {{ software_parameter_dict['openssl'] }} req \
-new -newkey rsa:2048 -sha256 \ -new -newkey rsa -sha256 \
-nodes -x509 -days 36500 \ -nodes -x509 -days 36500 \
-keyout ${:certificate} \ -keyout ${:certificate} \
-subj "/CN=Self Signed IP Access" \ -subj "/CN=Self Signed IP Access" \
...@@ -233,7 +233,7 @@ command = ...@@ -233,7 +233,7 @@ command =
rm -f ${:certificate} rm -f ${:certificate}
/bin/bash -c ' \ /bin/bash -c ' \
{{ software_parameter_dict['openssl'] }} req \ {{ software_parameter_dict['openssl'] }} req \
-new -newkey rsa:2048 -sha256 \ -new -newkey rsa -sha256 \
-nodes -x509 -days 36500 \ -nodes -x509 -days 36500 \
-keyout ${:certificate} \ -keyout ${:certificate} \
-subj "/CN=Fallback certificate/OU={{ instance_parameter_dict['configuration.frontend-name'] }}" \ -subj "/CN=Fallback certificate/OU={{ instance_parameter_dict['configuration.frontend-name'] }}" \
...@@ -282,7 +282,7 @@ command = ...@@ -282,7 +282,7 @@ command =
{% if slapparameter_dict['kedifa-caucase-url'] %} {% if slapparameter_dict['kedifa-caucase-url'] %}
if [ ! -f ${:template-csr} ] && [ ! -f ${:key} ] ; then if [ ! -f ${:template-csr} ] && [ ! -f ${:key} ] ; then
{{ software_parameter_dict['openssl'] }} req -new -sha256 \ {{ software_parameter_dict['openssl'] }} req -new -sha256 \
-newkey rsa:2048 -nodes -keyout ${:key} \ -newkey rsa -nodes -keyout ${:key} \
-subj "/O=${:organization}/OU=${:organizational_unit}" \ -subj "/O=${:organization}/OU=${:organizational_unit}" \
-out ${:template-csr} -out ${:template-csr}
fi fi
...@@ -335,7 +335,7 @@ command = ...@@ -335,7 +335,7 @@ command =
{% if slapparameter_dict['backend-client-caucase-url'] %} {% if slapparameter_dict['backend-client-caucase-url'] %}
if [ ! -f ${:template-csr} ] && [ ! -f ${:key} ] ; then if [ ! -f ${:template-csr} ] && [ ! -f ${:key} ] ; then
{{ software_parameter_dict['openssl'] }} req -new -sha256 \ {{ software_parameter_dict['openssl'] }} req -new -sha256 \
-newkey rsa:2048 -nodes -keyout ${:key} \ -newkey rsa -nodes -keyout ${:key} \
-subj "/O=${:organization}/OU=${:organizational_unit}" \ -subj "/O=${:organization}/OU=${:organizational_unit}" \
-out ${:template-csr} -out ${:template-csr}
fi fi
......
...@@ -89,7 +89,7 @@ organizational_unit = Kedifa Partition ...@@ -89,7 +89,7 @@ organizational_unit = Kedifa Partition
command = command =
if [ ! -f ${:template-csr} ] && [ ! -f ${:key} ] ; then if [ ! -f ${:template-csr} ] && [ ! -f ${:key} ] ; then
/bin/bash -c '{{ software_parameter_dict['openssl'] }} req -new -sha256 \ /bin/bash -c '{{ software_parameter_dict['openssl'] }} req -new -sha256 \
-newkey rsa:2048 -nodes -keyout ${:key} \ -newkey rsa -nodes -keyout ${:key} \
-subj "/O=${:organization}/OU=${:organizational_unit}" \ -subj "/O=${:organization}/OU=${:organizational_unit}" \
-reqexts SAN \ -reqexts SAN \
-config <(cat {{ software_parameter_dict['openssl_cnf'] }} \ -config <(cat {{ software_parameter_dict['openssl_cnf'] }} \
...@@ -135,7 +135,7 @@ stop-on-error = True ...@@ -135,7 +135,7 @@ stop-on-error = True
update-command = ${:command} update-command = ${:command}
command = command =
if ! [ -f ${:key} ] && ! [ -f ${:certificate} ] ; then if ! [ -f ${:key} ] && ! [ -f ${:certificate} ] ; then
{{ software_parameter_dict['openssl'] }} req -new -newkey rsa:2048 -sha256 -subj \ {{ software_parameter_dict['openssl'] }} req -new -newkey rsa -sha256 -subj \
"/O=${kedifa-csr:organization}/OU=${kedifa-csr:organizational_unit}/CN={{ instance_parameter_dict['ipv6-random'] }}" \ "/O=${kedifa-csr:organization}/OU=${kedifa-csr:organizational_unit}/CN={{ instance_parameter_dict['ipv6-random'] }}" \
-days 5 -nodes -x509 -keyout ${:key} -out ${:certificate} -days 5 -nodes -x509 -keyout ${:key} -out ${:certificate}
fi fi
......
...@@ -631,7 +631,7 @@ organizational_unit = Automatic Internal Kedifa Caucase CSR ...@@ -631,7 +631,7 @@ organizational_unit = Automatic Internal Kedifa Caucase CSR
command = command =
if [ ! -f ${:csr} ] && [ ! -f ${:key} ] ; then if [ ! -f ${:csr} ] && [ ! -f ${:key} ] ; then
{{ software_parameter_dict['openssl'] }} req -new -sha256 \ {{ software_parameter_dict['openssl'] }} req -new -sha256 \
-newkey rsa:2048 -nodes -keyout ${:key} \ -newkey rsa -nodes -keyout ${:key} \
-subj "/O=${:organization}/OU=${:organizational_unit}" \ -subj "/O=${:organization}/OU=${:organizational_unit}" \
-out ${:csr} -out ${:csr}
fi fi
...@@ -752,7 +752,7 @@ organizational_unit = Automatic Sign Backend Client Caucase CSR ...@@ -752,7 +752,7 @@ organizational_unit = Automatic Sign Backend Client Caucase CSR
command = command =
if [ ! -f ${:csr} ] && [ ! -f ${:key} ] ; then if [ ! -f ${:csr} ] && [ ! -f ${:key} ] ; then
{{ software_parameter_dict['openssl'] }} req -new -sha256 \ {{ software_parameter_dict['openssl'] }} req -new -sha256 \
-newkey rsa:2048 -nodes -keyout ${:key} \ -newkey rsa -nodes -keyout ${:key} \
-subj "/O=${:organization}/OU=${:organizational_unit}" \ -subj "/O=${:organization}/OU=${:organizational_unit}" \
-out ${:csr} -out ${:csr}
fi fi
...@@ -927,7 +927,7 @@ update-command = ${:command} ...@@ -927,7 +927,7 @@ update-command = ${:command}
command = command =
[ -f ${:certificate} ] && {{ software_parameter_dict['findutils'] }}/bin/find ${:certificate} -type f -mtime +3 -delete [ -f ${:certificate} ] && {{ software_parameter_dict['findutils'] }}/bin/find ${:certificate} -type f -mtime +3 -delete
if ! [ -f ${:certificate} ] ; then if ! [ -f ${:certificate} ] ; then
openssl req -new -newkey rsa:2048 -sha256 -subj \ openssl req -new -newkey rsa -sha256 -subj \
"/CN=${master-introspection-server-configuration:ip}" \ "/CN=${master-introspection-server-configuration:ip}" \
-days 5 -nodes -x509 -keyout ${:certificate} -out ${:certificate} -days 5 -nodes -x509 -keyout ${:certificate} -out ${:certificate}
fi fi
......
...@@ -611,7 +611,7 @@ stop-on-error = True ...@@ -611,7 +611,7 @@ stop-on-error = True
update-command = ${:command} update-command = ${:command}
command = command =
if ! [ -f ${:key} ] && ! [ -f ${:certificate} ] ; then if ! [ -f ${:key} ] && ! [ -f ${:certificate} ] ; then
openssl req -new -newkey rsa:2048 -sha256 -subj \ openssl req -new -newkey rsa -sha256 -subj \
"/O={{ expose_csr_organization }}/OU={{ expose_csr_organizational_unit }}/CN=${slap-configuration:ipv6-random}" \ "/O={{ expose_csr_organization }}/OU={{ expose_csr_organizational_unit }}/CN=${slap-configuration:ipv6-random}" \
-days 5 -nodes -x509 -keyout ${:key} -out ${:certificate} -days 5 -nodes -x509 -keyout ${:key} -out ${:certificate}
fi fi
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[instance.cfg.in] [instance.cfg.in]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = b5c479ebb4cf2fd2f63623af88b95078 md5sum = 1d9513c44185ad47bd3bb50f748c372a
...@@ -111,9 +111,10 @@ recipe = plone.recipe.command ...@@ -111,9 +111,10 @@ recipe = plone.recipe.command
command = command =
if [ ! -f '${:csr}' ] ; then if [ ! -f '${:csr}' ] ; then
{{ openssl_bin }} req \ {{ openssl_bin }} req \
-newkey rsa:2048 \ -newkey rsa \
-batch \ -batch \
-new \ -new \
-sha256 \
-nodes \ -nodes \
-keyout /dev/null \ -keyout /dev/null \
-config '${rest-server-certificate-csr-config:output}' \ -config '${rest-server-certificate-csr-config:output}' \
......
...@@ -19,4 +19,4 @@ md5sum = 10e19df182c692b71ea552da183a0bcf ...@@ -19,4 +19,4 @@ md5sum = 10e19df182c692b71ea552da183a0bcf
[template-selenium] [template-selenium]
filename = instance-selenium.cfg.in filename = instance-selenium.cfg.in
md5sum = 7239845e758b2d10299699e061b0fc75 md5sum = 9bef75759623a660cfaf4b6f5a48a923
\ No newline at end of file \ No newline at end of file
...@@ -137,7 +137,7 @@ command = ...@@ -137,7 +137,7 @@ command =
then then
${openssl-output:openssl} req -x509 -nodes -days 3650 \ ${openssl-output:openssl} req -x509 -nodes -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa:2048 -keyout $${:cert-file} \ -newkey rsa -keyout $${:cert-file} \
-out $${:cert-file} -out $${:cert-file}
fi fi
update-command = $${:command} update-command = $${:command}
......
...@@ -18,7 +18,7 @@ md5sum = 38eab3283d175230231c998fa4a3416e ...@@ -18,7 +18,7 @@ md5sum = 38eab3283d175230231c998fa4a3416e
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 88e15a803df4aa35285e59ae9186438a md5sum = 8af2ed33ef2a57cf5c5df4dd5d834d69
[template-apache-backend-conf] [template-apache-backend-conf]
filename = apache-backend.conf.in filename = apache-backend.conf.in
......
...@@ -148,7 +148,7 @@ cert = ${apache-ssl-cert:output} ...@@ -148,7 +148,7 @@ cert = ${apache-ssl-cert:output}
{{ simplefile('apache-ssl-cert', '${apache-conf-ssl:cert}', ssl_parameter_dict['cert']) }} {{ simplefile('apache-ssl-cert', '${apache-conf-ssl:cert}', ssl_parameter_dict['cert']) }}
{% else %} {% else %}
recipe = plone.recipe.command recipe = plone.recipe.command
command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}" command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}"
key = ${apache-conf-ssl:key} key = ${apache-conf-ssl:key}
cert = ${apache-conf-ssl:cert} cert = ${apache-conf-ssl:cert}
{%- endif %} {%- endif %}
......
...@@ -11,6 +11,11 @@ wcfs-enable-default = true ...@@ -11,6 +11,11 @@ wcfs-enable-default = true
# Used to generate bt5lists. # Used to generate bt5lists.
list += ${vifib:location}/master/bt5 list += ${vifib:location}/master/bt5
[default-bt5]
list =
erp5_full_text_mroonga_catalog
slapos_configurator
[erp5_repository_list] [erp5_repository_list]
repository_id_list += vifib/master repository_id_list += vifib/master
......
...@@ -446,7 +446,7 @@ class TestDeploymentScriptInstantiation(ERP5InstanceTestCase): ...@@ -446,7 +446,7 @@ class TestDeploymentScriptInstantiation(ERP5InstanceTestCase):
cert = os.path.join(self.ca_path, 'certs', 'test.crt') cert = os.path.join(self.ca_path, 'certs', 'test.crt')
common_name = 'TEST-SSL-AUTH' common_name = 'TEST-SSL-AUTH'
popenCommunicate([ popenCommunicate([
'openssl', 'req', '-utf8', '-nodes', '-config', openssl_config, '-new', 'openssl', 'req', '-utf8', '-nodes', '-config', openssl_config, '-new', '-sha256',
'-keyout', key, '-out', csr, '-days', '3650'], f'{common_name}\n'.encode(), '-keyout', key, '-out', csr, '-days', '3650'], f'{common_name}\n'.encode(),
stdin=subprocess.PIPE) stdin=subprocess.PIPE)
popenCommunicate([ popenCommunicate([
......
...@@ -42,6 +42,10 @@ parts = ...@@ -42,6 +42,10 @@ parts =
# Always build GCC for Fortran (see openblas). # Always build GCC for Fortran (see openblas).
max_version = 0 max_version = 0
[gcc:python2]
# use old gcc version for old scipy version used in python2
part = gcc-8.5
[bootstrap-slapos.recipe.cmmi] [bootstrap-slapos.recipe.cmmi]
# install our develop version of slapos.recipe.cmmi before anything else, # install our develop version of slapos.recipe.cmmi before anything else,
# otherwise it will be installed from pypi by dependencies. # otherwise it will be installed from pypi by dependencies.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance-theia] [instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in _update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = 07b222d8c29d446fc0957e4e37706585 md5sum = 23b498618bce83a6eb8df0470417f59e
[instance] [instance]
_update_hash_filename_ = instance.cfg.in _update_hash_filename_ = instance.cfg.in
......
...@@ -237,7 +237,7 @@ command = ...@@ -237,7 +237,7 @@ command =
then then
${openssl-output:openssl} req -x509 -nodes -days 3650 \ ${openssl-output:openssl} req -x509 -nodes -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \ -subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa:2048 -keyout $${:cert-file} \ -newkey rsa -keyout $${:cert-file} \
-out $${:cert-file} -out $${:cert-file}
fi fi
update-command = $${:command} update-command = $${:command}
......
...@@ -19,7 +19,7 @@ md5sum = f47adc5131a3096e916dbf9ef0061f50 ...@@ -19,7 +19,7 @@ md5sum = f47adc5131a3096e916dbf9ef0061f50
[template-turnserver] [template-turnserver]
filename = instance-turnserver.cfg.jinja2.in filename = instance-turnserver.cfg.jinja2.in
md5sum = f7ae944a28366c8888946af440d513ed md5sum = 016dd3bbebac4b223c11d17512a36296
[template-insecure-turnserver] [template-insecure-turnserver]
filename = instance-insecure-turnserver.cfg.jinja2.in filename = instance-insecure-turnserver.cfg.jinja2.in
......
...@@ -39,7 +39,7 @@ mode = {{ mode }} ...@@ -39,7 +39,7 @@ mode = {{ mode }}
{% do part_list.append('gen-certificate') -%} {% do part_list.append('gen-certificate') -%}
[gen-certificate] [gen-certificate]
recipe = plone.recipe.command recipe = plone.recipe.command
command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${turnserver-ssl:key}" -out "${turnserver-ssl:certificate}" command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "${turnserver-ssl:key}" -out "${turnserver-ssl:certificate}"
{% endif -%} {% endif -%}
[turnserver-ssl] [turnserver-ssl]
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[caucase-jinja2-library] [caucase-jinja2-library]
filename = caucase.jinja2.library filename = caucase.jinja2.library
md5sum = 962ee4f16cef2b4b44ce0f5a87f7549c md5sum = a16311ab9a8965ea9020929c7100209b
...@@ -96,7 +96,7 @@ output = ${ {{- prefix }}-directory:data-dir}/provided.csr.pem ...@@ -96,7 +96,7 @@ output = ${ {{- prefix }}-directory:data-dir}/provided.csr.pem
recipe = plone.recipe.command recipe = plone.recipe.command
command = command =
if [ ! -f '{{ key_path or crt_path }}' ] && [ ! -f '${:csr}' ] ; then if [ ! -f '{{ key_path or crt_path }}' ] && [ ! -f '${:csr}' ] ; then
'{{ openssl }}' req -newkey rsa:2048 -batch -new -nodes -subj /CN=example.com -keyout '{{ key_path or crt_path }}' -out '${:csr}' '{{ openssl }}' req -newkey rsa -batch -new -sha256 -nodes -subj /CN=example.com -keyout '{{ key_path or crt_path }}' -out '${:csr}'
fi fi
{%- endif %} {%- endif %}
csr = ${ {{- prefix }}-directory:data-dir}/good.csr.pem csr = ${ {{- prefix }}-directory:data-dir}/good.csr.pem
......
...@@ -50,7 +50,7 @@ md5sum = f928b9dc99f7f970caadfe7dd6f95d34 ...@@ -50,7 +50,7 @@ md5sum = f928b9dc99f7f970caadfe7dd6f95d34
[template-postfix] [template-postfix]
filename = instance-postfix.cfg.in filename = instance-postfix.cfg.in
md5sum = 8f7bfca893a01c390df7a3dc9c2410e1 md5sum = 36e2563b306cf7de6297eee415929078
[template-postfix-master-cf] [template-postfix-master-cf]
filename = postfix_master.cf.in filename = postfix_master.cf.in
...@@ -90,7 +90,7 @@ md5sum = 0451190711157fc204418662126d5cf8 ...@@ -90,7 +90,7 @@ md5sum = 0451190711157fc204418662126d5cf8
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = b0751d3d12cfcc8934cb1027190f5e5e md5sum = d570ef33e67ca223eac790f2729c04da
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -295,7 +295,7 @@ certificate-and-key = ${tls-certificate-and-key-from-parameters:output} ...@@ -295,7 +295,7 @@ certificate-and-key = ${tls-certificate-and-key-from-parameters:output}
ssl_parameter_dict['cert'] ~ "\n" ~ ssl_parameter_dict['key']) }} ssl_parameter_dict['cert'] ~ "\n" ~ ssl_parameter_dict['key']) }}
{% else %} {% else %}
recipe = plone.recipe.command recipe = plone.recipe.command
command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:certificate-and-key}" -out "${:certificate-and-key}" command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout "${:certificate-and-key}" -out "${:certificate-and-key}"
certificate-and-key = ${directory:etc}/certificate-and-key-generated.pem certificate-and-key = ${directory:etc}/certificate-and-key-generated.pem
{%- endif %} {%- endif %}
......
...@@ -141,7 +141,7 @@ command = ...@@ -141,7 +141,7 @@ command =
${:openssl} dhparam -out '${:dh-2048}' 2048 && ${:openssl} dhparam -out '${:dh-2048}' 2048 &&
${:update} ${:update}
update = update =
${:openssl} req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}' ${:openssl} req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}'
[{{ section('postfix-logrotate') }}] [{{ section('postfix-logrotate') }}]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
......
...@@ -50,7 +50,7 @@ md5sum = f928b9dc99f7f970caadfe7dd6f95d34 ...@@ -50,7 +50,7 @@ md5sum = f928b9dc99f7f970caadfe7dd6f95d34
[template-postfix] [template-postfix]
filename = instance-postfix.cfg.in filename = instance-postfix.cfg.in
md5sum = b1cdeb8fe02d47c093658b50afa7d6b9 md5sum = eacbaeecb0c7a311eb9663d411201d6b
[template-postfix-master-cf] [template-postfix-master-cf]
filename = postfix_master.cf.in filename = postfix_master.cf.in
...@@ -90,7 +90,7 @@ md5sum = 8725a6b42de735b64b51d9bac598f94b ...@@ -90,7 +90,7 @@ md5sum = 8725a6b42de735b64b51d9bac598f94b
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 0fad9497da12ed0186dca5236c23f3a7 md5sum = 727c6f045da382fe50916e6ea5ae6405
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -93,6 +93,7 @@ command = ...@@ -93,6 +93,7 @@ command =
-newkey rsa \ -newkey rsa \
-batch \ -batch \
-new \ -new \
-sha256 \
-nodes \ -nodes \
-keyout /dev/null \ -keyout /dev/null \
-config '${haproxy-certificate-csr-config:output}' \ -config '${haproxy-certificate-csr-config:output}' \
......
...@@ -141,7 +141,7 @@ command = ...@@ -141,7 +141,7 @@ command =
${:openssl} dhparam -out '${:dh-2048}' 2048 && ${:openssl} dhparam -out '${:dh-2048}' 2048 &&
${:update} ${:update}
update = update =
${:openssl} req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}' ${:openssl} req -newkey rsa -batch -new -sha256 -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}'
[{{ section('postfix-logrotate') }}] [{{ section('postfix-logrotate') }}]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
......
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