Commit 5efd56aa authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Merge remote-tracking branch 'origin/zope4py2' into zope4py3

parents 64a18a80 6cd9c2bf
......@@ -23,6 +23,8 @@ parts =
major = 4-wc2
[ZODB4-wc2-repository]
revision =
[python]
part = python2.7
# we need persistent to be a git checkout because persistent tests want to
# discover in-tree files that are not present in persistent egg when it is
......@@ -60,24 +62,25 @@ eggs +=
# env.sh for ZODB's python to be on $PATH.
[ZODB-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(ZODB-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# .nxdtest to run ZODB tests
[.nxdtest]
<= jinja2-template
template =
inline:
inline =
# determine where ZODB & friends were installed
from subprocess import check_output
where = check_output(['python', '-c', """if 1:
from os.path import dirname
for m in "ZODB", "persistent", "BTrees", "transaction", "ZEO":
print(dirname(__import__(m).__file__))
"""])
"""],
universal_newlines=True,
)
ZODB, persistent, BTrees, transaction, ZEO = where.split()
# run tests for whole ZODB stack
......@@ -99,12 +102,12 @@ template =
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${ZODB-env.sh:rendered}
env.sh = ${ZODB-env.sh:output}
workdir = ${buildout:directory}
......
......@@ -22,16 +22,16 @@ extends =
[apr]
recipe = slapos.recipe.cmmi
shared = true
version = 1.5.2
md5sum = 4e9769f3349fe11fc0a5e1b224c236aa
version = 1.7.0
md5sum = 7a14a83d664e87599ea25ff4432e48a7
url = https://archive.apache.org/dist/apr/apr-${:version}.tar.bz2
[apr-util]
recipe = slapos.recipe.cmmi
shared = true
version = 1.5.4
version = 1.6.1
url = https://archive.apache.org/dist/apr/apr-util-${:version}.tar.bz2
md5sum = 2202b18f269ad606d70e1864857ed93c
md5sum = 8ff5dc36fa39a2a3db1df196d3ed6086
configure-options =
--with-apr=${apr:location}
--with-expat=${libexpat:location}
......@@ -39,9 +39,9 @@ configure-options =
[apache]
recipe = slapos.recipe.cmmi
shared = true
version = 2.4.53
version = 2.4.54
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = f594f137137b5bdff3998dc17e3e9526
md5sum = 861b43073ab416d689f1fc4dfa087711
configure-options = --disable-static
--enable-authn-alias
--enable-bucketeer
......
......@@ -18,8 +18,8 @@ md5sum = e5f4b1d997e50ffe4998c68c8ec45403
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bazel_tools_cpp_CROSSTOOL
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename}
url = ${:_profile_base_location_}/${:filename}.in
output = ${:location}/${:filename}
context =
key gcc_location gcc:prefix
key binutils_location binutils:location
......@@ -28,8 +28,8 @@ context =
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bazel_src_main_cpp_BUILD
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename}
url = ${:_profile_base_location_}/${:filename}.in
output = ${:location}/${:filename}
# We previously passed an argument that we don't want anymore. Rather than
# changing templates, we pass a dummy argument that will have no effect.
linkopts = -DSLAPOS_DUMMY=
......@@ -50,10 +50,10 @@ url = https://github.com/bazelbuild/bazel/releases/download/0.6.1/bazel-0.6.1-di
md5sum = 8c5c827e33d3ff74c263c1299810b485
patch-binary = ${patch:location}/bin/patch
patch-file-path = ${:_profile_base_location_}/bazel-0.6.1.patch
bazel-crosstool-modified-file-path = ${template-bazel-crosstool:rendered}
bazel-src-main-cpp-build-path = ${template-bazel-src-main-cpp-build:rendered}
bazel-src-main-tools-build-path = ${template-bazel-src-main-tools-build:rendered}
bazel-src-tools-singlejar-build-path = ${template-bazel-src-tools-singlejar-build:rendered}
bazel-crosstool-modified-file-path = ${template-bazel-crosstool:output}
bazel-src-main-cpp-build-path = ${template-bazel-src-main-cpp-build:output}
bazel-src-main-tools-build-path = ${template-bazel-src-main-tools-build:output}
bazel-src-tools-singlejar-build-path = ${template-bazel-src-tools-singlejar-build:output}
unzip-bin = ${unzip:location}/bin
zip-bin = ${zip:location}/bin
java_home = ${zulu:location}
......
[buildout]
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
../m4/buildout.cfg
../patch/buildout.cfg
../perl/buildout.cfg
......@@ -16,7 +14,15 @@ url = https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz
md5sum = c28f119f405a2304ff0a7ccdcc629713
environment =
M4=${m4:location}/bin/m4
PATH=${autoconf:location}/bin:${automake:location}/bin:${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
patch-options = -p1
patches =
${:_profile_base_location_}/01_inhibit_example_generation#ee2df22601a56d738939fa760f9dc19b
# Make sure that Makefile.in is not older that the other file that is modified
# by the above patch, otherwise `make` would invoke automake, which is likely
# to fail with an error like:
# This is Automake 1.16.5, but the definition used by this AM_INIT_AUTOMAKE
# comes from Automake 1.16.4.
# Without such pre-configure, the 2 files usually have the same modification
# date because machines are fast, but not always.
pre-configure = touch Makefile.in
......@@ -3,15 +3,14 @@ parts =
boost-lib
extends =
../bzip2/buildout.cfg
../patch/buildout.cfg
../zlib/buildout.cfg
../xz-utils/buildout.cfg
[boost-lib]
recipe = slapos.recipe.cmmi
shared = true
url = https://boostorg.jfrog.io/artifactory/main/release/1.67.0/source/boost_1_67_0.tar.bz2
md5sum = ced776cb19428ab8488774e1415535ab
url = https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2
md5sum = db0112a3a37a3742326471d20f1a186a
location = @@LOCATION@@
configure-command = ./bootstrap.sh --prefix=${:location} --without-icu $${PYTHON:+--with-python=$PYTHON}
make-binary =
......@@ -25,7 +24,3 @@ environment =
ZLIB_LIBPATH=${zlib:location}/lib
LZMA_INCLUDE=${xz-utils:location}/include
LZMA_LIBRARY_PATH=${xz-utils:location}/lib
patch-options = -p1
patches =
https://sources.debian.org/data/main/b/boost1.67/1.67.0-13+deb10u1/debian/patches/fix-ftbfs-python-3.3.patch#c85fb479d51354deafd1cc7af78f25d2
patch-binary = ${patch:location}/bin/patch
[buildout]
extends =
../boost-lib/buildout.cfg
../cmake/buildout.cfg
../cryptsetup/buildout.cfg
../curl/buildout.cfg
../keyutils/buildout.cfg
../libnl/buildout.cfg
../ncurses/buildout.cfg
../ninja/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../snappy/buildout.cfg
../systemd/buildout.cfg
../util-linux/buildout.cfg
../zlib/buildout.cfg
../pkgconfig/buildout.cfg
[pyyaml-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/${:filename}
filename = PyYAML-5.1.2.tar.gz
md5sum = 20f87ab421b0271dbf371dc5c1cddb5c
[pyaml-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/b6/f0/dbb524509ce28f5cfd4e1d9e3ef955f51186cfd1b8297f6e158778c4a8ef/${:filename}
filename = pyaml-21.10.1.tar.gz
md5sum = a915f577f6fc62344fa4775b22db9052
[librbd-python]
recipe = slapos.recipe.build
shared = true
pyyaml = ${pyyaml-download:target}
pyaml = ${pyaml-download:target}
install =
import os, sys
call([sys.executable, '-m', 'venv', '--clear', location])
pip = os.path.join(location, 'bin', 'pip')
call([pip, 'install', '--no-index', options['pyyaml'], options['pyaml']])
call([pip, 'uninstall', '-y', 'pip', 'setuptools'])
# selftest
python = os.path.join(location, 'bin', 'python')
call([python, '-c', 'import yaml'])
[librbd]
# CEPH only for librbd
recipe = slapos.recipe.cmmi
shared = true
url = https://download.ceph.com/tarballs/ceph_17.1.0.orig.tar.gz
md5sum = 1f2ed3f17f76ea71d555428f26644610
# Note: SlapOSifying whole ceph, including it's managers, is an enormous effort
# so only "librbd" is provided with header files and this requires
# careful selection and ordering of ninja's targets and also manual
# copying of common library
configure-command = cmake
make-binary = ninja -C build librbd librados
make-targets = src/librbd/install src/librados/install src/common/install src/include/install ; cp build/lib/libceph-common.so build/lib/libceph-common.so.2 %(location)s/lib ; cd %(location)s/lib
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${:_profile_base_location_}/ceph-minimal.patch#a84c4d30586c8b8f87a581fed5fbf5d8
CMAKE_LIBRARY_PATH="${util-linux:location}/lib;${ncurses:location}/lib;${keyutils:location}/x86_64-linux-gnu;${cryptsetup:location}/lib;${snappy:location}/lib;${systemd:location}/lib64;${zlib:location}/lib;${libnl:location}/lib;${boost-lib:location}/lib;${curl:location}/lib;${openssl:location}/lib"
CMAKE_INCLUDE_PATH="${systemd:location}/include;${util-linux:location}/include;${boost-lib:location}/include;${ncurses:location}/include;${keyutils:location}/include;${cryptsetup:location}/include;${snappy:location}/include;${zlib:location}/include;${libnl:location}/include;${curl:location}/include;${openssl:location}/include"
environment =
PATH=${cmake:location}/bin:${ninja:location}/bin:${pkgconfig:location}/bin:${librbd-python:location}/bin:%(PATH)s
configure-options =
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INCLUDE_PATH=${:CMAKE_INCLUDE_PATH}
-DCMAKE_INSTALL_PREFIX=%(location)s
-DCMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH}
-DCMAKE_INSTALL_RPATH=%(location)s/lib
-DDEBUG_GATHER=OFF
-DWITH_SYSTEM_ROCKSDB=OFF
-DWITH_BABELTRACE=OFF
-DWITH_BLUESTORE=OFF
-DWITH_CEPHFS=OFF
-DWITH_FUSE=OFF
-DWITH_FUSE=OFF
-DWITH_KRBD=OFF
-DWITH_LIBCEPHFS=OFF
-DWITH_LIBCEPHSQLITE=OFF
-DWITH_LTTNG=OFF
-DWITH_LZ4=OFF
-DWITH_MANPAGE=OFF
-DWITH_MGR=OFF
-DWITH_MGR_DASHBOARD_FRONTEND=OFF
-DWITH_OPENLDAP=OFF
-DWITH_RADOSGW=OFF
-DWITH_RADOSGW_AMQP_ENDPOINT=OFF
-DWITH_RADOSGW_BEAST_OPENSSL=OFF
-DWITH_RADOSGW_DBSTORE=OFF
-DWITH_RADOSGW_KAFKA_ENDPOINT=OFF
-DWITH_RADOSGW_LUA_PACKAGES=OFF
-DWITH_RADOSGW_SELECT_PARQUET=OFF
-DWITH_RBD=ON
-DWITH_RDMA=OFF
-DWITH_SYSTEMD=OFF
-DWITH_SYSTEM_BOOST=ON
-DWITH_TESTS=OFF
-DWITH_XFS=OFF
-GNinja
-S . -B build
From 3884a23340defa68ce84590e4a3175d7ea59bbbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 11 Apr 2022 13:49:17 +0200
Subject: [PATCH 1/3] cmake: Drop FindCython.cmake
Cython is not required while building minimal ceph - librbd only support,
and dropping it simplifies build process and removes a lot of additional
dependencies.
---
cmake/modules/FindCython.cmake | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/cmake/modules/FindCython.cmake b/cmake/modules/FindCython.cmake
index 8eb9e42f402..e69de29bb2d 100644
--- a/cmake/modules/FindCython.cmake
+++ b/cmake/modules/FindCython.cmake
@@ -1,16 +0,0 @@
-#
-# Cython
-#
-
-# Try to run Cython, to make sure it works:
-execute_process(
- COMMAND ${Python3_EXECUTABLE} -m cython --version
- RESULT_VARIABLE cython_result
- ERROR_VARIABLE cython_output)
-if(cython_result EQUAL 0)
- string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+).*" "\\1" CYTHON_VERSION "${cython_output}")
-else()
- message(SEND_ERROR "Could not find cython${PYTHON_VERSION}: ${cython_output}")
-endif()
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Cython${PYTHON_VERSION} DEFAULT_MSG CYTHON_VERSION)
--
2.30.2
From 17131b5c0619a8bf2e56e6a8d63649d3d1b2a432 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 11 Apr 2022 13:50:33 +0200
Subject: [PATCH 2/3] librbd: drop needless udev
It's automatically added by cmake and such configuration results with linker
not being able to find libudev in case if it lives outside of typical
directory structure.
---
src/librbd/CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt
index ad23f0975fd..5bd011bf242 100644
--- a/src/librbd/CMakeLists.txt
+++ b/src/librbd/CMakeLists.txt
@@ -337,10 +337,6 @@ target_link_libraries(librbd PRIVATE
pthread
${CMAKE_DL_LIBS}
${EXTRALIBS} ${GSSAPI_LIBRARIES})
-if(HAVE_UDEV)
- target_link_libraries(librbd PRIVATE
- udev)
-endif()
if(ENABLE_SHARED)
set_target_properties(librbd PROPERTIES
OUTPUT_NAME rbd
--
2.30.2
From 7d16861edea2609e0f6b29b146ed928c63a6ee08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 11 Apr 2022 13:50:03 +0200
Subject: [PATCH 3/3] common: Fix missing cmake declarations
Original ceph build process can't find some dependencies in case if it's run
on machines which do not have installed in standard /usr locations.
---
src/common/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 3bf28659e1c..005d08c1caa 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -184,6 +184,8 @@ add_library(common-common-objs OBJECT
# retrieved OpenSSL location. This is especially important when cross
# compiling (e.g. targeting Windows).
target_include_directories(common-common-objs PRIVATE ${OPENSSL_INCLUDE_DIR})
+target_include_directories(common-common-objs PRIVATE ${UDEV_INCLUDE_DIR})
+target_include_directories(common-common-objs PRIVATE ${BLKID_INCLUDE_DIR})
# for options.cc
target_compile_definitions(common-common-objs PRIVATE
"CMAKE_INSTALL_LIBDIR=\"${CMAKE_INSTALL_LIBDIR}\""
@@ -241,4 +243,5 @@ if(HAVE_KEYUTILS)
set(parse_secret_srcs
secret.c)
add_library(parse_secret_objs OBJECT ${parse_secret_srcs})
+ target_include_directories(parse_secret_objs PRIVATE ${KEYUTILS_INCLUDE_DIR})
endif()
--
2.30.2
......@@ -14,7 +14,7 @@ recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/cloudooo.git
branch = master
git-executable = ${git:location}/bin/git
revision = 0b5ff71a2ede76499e81659aed392057ae910917
revision = 78d15e091df750952998a6a23f49300a5a0faa53
[cloudooo]
recipe = zc.recipe.egg
......@@ -27,7 +27,7 @@ entry-points =
cloudooo_tester=cloudooo.bin.cloudooo_tester:main
runCloudoooUnitTest=cloudooo.tests.runHandlerUnitTest:run
runCloudoooTestSuite=cloudooo.tests.runTestSuite:run
scripts =
scripts =
paster=cloudooo_paster
runCloudoooUnitTest
runCloudoooTestSuite
[buildout]
extends =
../util-linux/buildout.cfg
../lvm2/buildout.cfg
../popt/buildout.cfg
../pkgconfig/buildout.cfg
../json-c/buildout.cfg
../openssl/buildout.cfg
[cryptsetup]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.kernel.org/pub/linux/utils/cryptsetup/v2.4/cryptsetup-2.4.3.tar.xz
md5sum = 2303d57e78d4977344188a46e125095c
configure-options =
--disable-external-tokens
--disable-ssh-token
--disable-luks2-reencryption
--disable-cryptsetup
--disable-veritysetup
--disable-cryptsetup-reencrypt
--disable-integritysetup
--disable-selinux
--disable-udev
--disable-kernel_crypto
--disable-blkid
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${json-c:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
CFLAGS=-I${libuuid:location}/include -I${lvm2:location}/include -I${popt:location}/include -I${json-c:location}/include -I${openssl:location}/include
LDFLAGS=-L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${lvm2:location}/lib -Wl,-rpath=${lvm2:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${json-c:location}/lib -Wl,-rpath=${json-c:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib
......@@ -28,9 +28,9 @@ git-executable = ${git:location}/bin/git
[cythonplus_env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template =
inline:{% set path, python = os.path.split(python) -%}
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
{% set path, python = os.path.split(python) -%}
{% if 'part' in gcc -%}
{% set path = path + ':' + gcc.prefix + '/bin' -%}
{% endif -%}
......
......@@ -12,7 +12,7 @@ python = python
[python]
recipe = slapos.recipe.build
part = python2.7
part = python3
init =
python = self.buildout[options['part']]
for x in 'location', 'executable', 'version':
......
......@@ -31,7 +31,7 @@ part = firefox
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:part}
fonts-conf = ${firefox-default-fonts-conf:rendered}
fonts-conf = ${firefox-default-fonts-conf:output}
init =
self.buildout[options['part']]
install =
......@@ -72,8 +72,8 @@ part = firefox-52
[firefox-default-fonts-conf]
recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output}
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf
url = ${template-fonts-conf:output}
output = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf
context =
key cachedir :cache-dir
key fonts :fonts
......
......@@ -60,7 +60,8 @@ environment =
DBUS_GLIB_CFLAGS=-I${dbus-glib:location}/include/dbus-1.0
DBUS_GLIB_LIBS=-L${dbus-glib:location}/lib -ldbus-glib-1
CPPFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib
LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib
PYTHON=${buildout:executable}
[gobject-introspection]
recipe = slapos.recipe.cmmi
......@@ -79,6 +80,7 @@ environment =
FFI_CFLAGS=-I${libffi:location}/include
FFI_LIBS=-L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
GIR_DIR=${buildout:parts-directory}/${:_buildout_section_name_}/share/gir-1.0
PYTHON=${buildout:executable}
[pygobject3]
recipe = slapos.recipe.cmmi
......@@ -101,6 +103,7 @@ environment =
GIO_LIBS=-L${glib:location}/lib -lgio-2.0
GI_CFLAGS=-I${gobject-introspection:location}/include/gobject-introspection-1.0
GI_LIBS=-L${gobject-introspection:location}/lib -lgirepository-1.0
PYTHON=${buildout:executable}
[trusted-config]
recipe = slapos.recipe.build:download
......@@ -114,13 +117,13 @@ python = ${buildout:bin-directory}/${firewalld-eggs:interpreter}
stop-on-error = True
command =
set -e
sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-applet
sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-cmd
sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-config
sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-offline-cmd
sed -i 's#python2.7#${:python}#' ${firewalld:location}/${firewalld:sbin-dir}/firewalld
sed -i 's#python3#${:python}#' ${firewalld:location}/bin/firewall-applet
sed -i 's#python3#${:python}#' ${firewalld:location}/bin/firewall-cmd
sed -i 's#python3#${:python}#' ${firewalld:location}/bin/firewall-config
sed -i 's#python3#${:python}#' ${firewalld:location}/bin/firewall-offline-cmd
sed -i 's#python3#${:python}#' ${firewalld:location}/${firewalld:sbin-dir}/firewalld
sed -i 's#python2.7 /usr/bin/firewall-config#${:python} ${firewalld:location}/bin/firewall-config#' ${firewalld:etc-dir}/lockdown-whitelist.xml
sed -i 's#python3 /usr/bin/firewall-config#${:python} ${firewalld:location}/bin/firewall-config#' ${firewalld:etc-dir}/lockdown-whitelist.xml
sed -i 's#DefaultZone=public#DefaultZone=trusted#' ${firewalld:etc-dir}/firewalld.conf
sed -i 's#FirewallBackend=nftables#FirewallBackend=iptables#' ${firewalld:etc-dir}/firewalld.conf
......
......@@ -14,8 +14,8 @@ extends =
[fish-shell]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/fish-shell/fish-shell/releases/download/3.2.2/fish-3.2.2.tar.xz
md5sum = 606253699ce41991b03a93bcc6047d51
url = https://github.com/fish-shell/fish-shell/releases/download/3.5.1/fish-3.5.1.tar.xz
md5sum = 59950f8ec9bf9e2fa02ff205dc5a9c57
configure-command = ${cmake:location}/bin/cmake
configure-options =
-DCMAKE_INSTALL_PREFIX=${:location}
......
# This is part of the OCEAN project.
# Plugin for fluent-bit to send data to Wendelin:
# https://lab.nexedi.com/nexedi/fluentbit-plugin-wendelin
[buildout]
extends =
../golang/buildout.cfg
parts =
fluentbit-plugin-wendelin
[fluentbit-plugin-wendelin]
recipe = slapos.recipe.cmmi
share = true
url = https://lab.nexedi.com/nexedi/fluentbit-plugin-wendelin/-/archive/v0.1i-dev_buildout/fluentbit-plugin-wendelin-v0.1i-dev_buildout.tar.gz
md5sum = 9ed2ef46b0edfca072255b849ee65249
configure-command = echo "No configure command."
environment =
PATH=${golang1.17:location}/bin:%(PATH)s
PREFIX=@@LOCATION@@
......@@ -18,8 +18,8 @@ parts =
[git]
recipe = slapos.recipe.cmmi
shared = true
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.35.1.tar.xz
md5sum = 3aae077280b6be861e3c1c637491853a
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.37.0.tar.xz
md5sum = 9716e2b4be3f9e1105f23aa1f80a37e4
configure-options =
--with-curl=${curl:location}
--with-openssl=${openssl:location}
......
......@@ -19,7 +19,11 @@ shared = true
configure-command = :
location = @@LOCATION@@
make-binary =
make-targets= cd src && unset GOBIN && ./all.bash && cp -alf .. ${:location}
# build and test Go and its standard library
# clean intermediate cache before installing
# contrary to build cache in gowork, build cache, that Go uses during its own build, is not reused anywhere:
# https://github.com/golang/go/blob/go1.18.2-0-g8ed0e51b5e/src/cmd/dist/build.go#L239-L242
make-targets= cd src && unset GOBIN && ./all.bash && GOCACHE=`pwd`/../pkg/obj/go-build ../bin/go clean -cache && cp -alf .. ${:location}
# some testdata files have an issue with slapos.extension.strip.
post-install = ${findutils:location}/bin/find ${:location}/src -type d -name testdata -exec rm -rf {} \; || true
environment =
......@@ -42,6 +46,8 @@ patches =
url = https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz
md5sum = dbf727a4b0e365bf88d97cbfde590016
environment-extra =
# build Go without testing it
# NOTE go1.4 does not have build cache
make-targets= cd src && unset GOBIN && ./make.bash && cp -alf .. ${:location}
# skip-chown-tests.patch does not apply to go1.4, but we don't run go1.4 tests.
......@@ -119,10 +125,10 @@ environment-extra =
#
# ${go:exe} is standalone executable that runs go in activated gowork environment.
[go]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template
exe = ${buildout:bin-directory}/go
rendered= ${:exe}
template= inline:
output= ${:exe}
inline =
#!/bin/sh -e
. ${gowork:env.sh}
exec go "$@"
......
......@@ -15,12 +15,12 @@ extends =
[groonga]
recipe = slapos.recipe.cmmi
shared = true
url = https://packages.groonga.org/source/groonga/groonga-11.0.9.tar.gz
md5sum = 9c66445d92c8b7536f1b28119ac1855b
url = https://packages.groonga.org/source/groonga/groonga-12.0.7.tar.gz
md5sum = 5ef412a6941994e623cb50d76a8be261
groonga-plugin-dir = @@LOCATION@@/lib/groonga/plugins/
# temporary patch to respect more tokens in natural language mode.
patches =
${:_profile_base_location_}/groonga.patch#5d831331ddfdcd87e91b68949c339a1d
${:_profile_base_location_}/groonga.patch#cc6a678acd478fc074e678c7b7dd09d8
patch-options = -p1
configure-options =
--disable-static
......@@ -48,8 +48,8 @@ environment =
[groonga-normalizer-mysql]
recipe = slapos.recipe.cmmi
shared = true
url = https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-1.1.5.tar.gz
md5sum = 842d02becc6dcc25a02fa7e789c2cba7
url = https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-1.1.8.tar.gz
md5sum = a1520691da3083e14bdc65a9ec57a620
groonga-plugin-dir = @@LOCATION@@/lib/groonga/plugins/
pre-configure = mkdir -p ${:groonga-plugin-dir}
make-targets = GROONGA_PLUGINS_DIR=${:groonga-plugin-dir} install
......
--- a/lib/ii.c
+++ b/lib/ii.c
@@ -10387,7 +10387,9 @@
? (data->optarg->similarity_threshold > GRN_HASH_SIZE(h)
@@ -10874,7 +10874,9 @@
? ((uint32_t)(data->optarg->similarity_threshold) > GRN_HASH_SIZE(h)
? GRN_HASH_SIZE(h)
: data->optarg->similarity_threshold)
:(uint32_t)(data->optarg->similarity_threshold))
- : (GRN_HASH_SIZE(h) >> 3) + 1;
+ : (GRN_HASH_SIZE(h) < 8
+ ? GRN_HASH_SIZE(h)
+ : ((GRN_HASH_SIZE(h) - 8) >> 3) + 8);
if (GRN_HASH_SIZE(h)) {
grn_id j, id;
int w2, rep;
float w2;
......@@ -14,6 +14,7 @@ extends =
../libtool/buildout.cfg
../m4/buildout.cfg
../perl/buildout.cfg
../python-2.7/buildout.cfg
../pkgconfig/buildout.cfg
../xorg/buildout.cfg
../icu/buildout.cfg
......@@ -81,7 +82,7 @@ configure-options =
--disable-static
--disable-gtk-doc-html
environment =
PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${python2.7:location}/bin:${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends}
CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${harfbuzz:location}/lib -Wl,-rpath=${harfbuzz:location}/lib
......
......@@ -132,11 +132,11 @@ promises =
# as future-proof against new versions of Chromium.
[headless-chromium-wrapper]
recipe = slapos.recipe.template:jinja2
template =
inline:#!/bin/sh
inline =
#!/bin/sh
export LD_LIBRARY_PATH="{{ nss_location }}/lib:$LD_LIBRARY_PATH"
exec {{ chromium_binary }} "$@"
rendered = ${buildout:bin-directory}/headless-chromium
output = ${buildout:bin-directory}/headless-chromium
context =
key nss_location nss:location
key chromium_binary headless-chromium:binary
......@@ -34,12 +34,12 @@ install =
[helloweb-go]
# we already have gowork/bin/helloweb with helloweb Go build.
# Add bin/helloweb-go that runs go version of helloweb without any environment preset needed.
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:#!/bin/sh -e
. ${gowork:env.sh}
exec helloweb "$@"
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh -e
. ${gowork:env.sh}
exec helloweb "$@"
# -*- python -*-
......@@ -97,9 +97,9 @@ make-targets= ${bundler:bundle} install
[helloweb-ruby]
# NOTE slapos.cookbook:wrapper also works, but currently _only_ in instance
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:#!/bin/sh -e
export BUNDLE_GEMFILE=${helloweb-ruby-bundle:path}/Gemfile
exec ${bundler:bundle} exec sh -c 'helloweb.rb "$@"' ${:_buildout_section_name_} "$@"
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh -e
export BUNDLE_GEMFILE=${helloweb-ruby-bundle:path}/Gemfile
exec ${bundler:bundle} exec sh -c 'helloweb.rb "$@"' ${:_buildout_section_name_} "$@"
[buildout]
extends =
../cmake/buildout.cfg
[json-c]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/json-c/json-c/archive/refs/tags/json-c-0.15-20200726.tar.gz
md5sum = b3841c9abdca837ea00ce6a5ada4bb2c
configure-command = mkdir build ; cd build ; ../cmake-configure
configure-options = --prefix=%(location)s
make-binary = cd build ; make
environment =
PATH=${cmake:location}/bin:%(PATH)s
[buildout]
extends =
../cmake/buildout.cfg
../pkgconfig/buildout.cfg
parts =
jsoncpp
[jsoncpp]
recipe = slapos.recipe.cmmi
shared = true
pre-configure =
mkdir jsoncpp-build
configure-command =
cd jsoncpp-build && ${cmake:location}/bin/cmake ..
configure-options =
-DCMAKE_INSTALL_PREFIX=@@LOCATION@@
url = https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.9.5.tar.gz
md5sum = d6c8c609f2162eff373db62b90a051c7
make-binary =
cd jsoncpp-build && make
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
......@@ -40,8 +40,8 @@ url = ${:_profile_base_location_}/${:filename}
[instance-jupyter-notebook]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
context =
key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
......@@ -79,7 +79,6 @@ mistune = 0.7.3
nbformat = 4.3.0
notebook = 4.4.1
pandas = 0.19.2
plone.recipe.command = 1.1
prompt-toolkit = 1.0.13
ptyprocess = 0.5.1
pyzmq = 16.0.2
......@@ -92,7 +91,6 @@ tornado = 4.4.2
widgetsnbextension = 2.0.0
# numpy >= 1.13.1 is required for numpy.core.multiarray
numpy = 1.13.1
certifi = 2020.6.20
# nbconvert 4.2.0 depends on entrypoints egg that is not available as tar/zip source.
nbconvert = 4.1.0
......
......@@ -15,7 +15,7 @@
[instance-jupyter-notebook]
filename = instance.cfg.in
md5sum = 357f28614a13cdbf00a29a83cbfd2642
md5sum = 9f412363ce2c2ac99e3328f7d87d456d
[jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja
......
......@@ -73,8 +73,8 @@ environment =
[jupyter-notebook-config]
recipe = slapos.recipe.template:jinja2
template = {{ jupyter_config_location }}/{{ jupyter_config_filename }}
rendered = ${directory:jupyter_config_dir}/jupyter_notebook_config.py
url = {{ jupyter_config_location }}/{{ jupyter_config_filename }}
output = ${directory:jupyter_config_dir}/jupyter_notebook_config.py
context =
raw config_cfg ${buildout:directory}/knowledge0.cfg
......@@ -130,8 +130,8 @@ target-directory = ${directory:erp5_kernel_dir}
[kernel-json]
recipe = slapos.recipe.template:jinja2
template = {{ kernel_json_location }}/{{ kernel_json_filename }}
rendered = ${directory:erp5_kernel_dir}/kernel.json
url = {{ kernel_json_location }}/{{ kernel_json_filename }}
output = ${directory:erp5_kernel_dir}/kernel.json
# Use python2.7 executable bin file for kernel config
context =
raw python_executable {{ python_executable }}
......
[buildout]
extends =
../patch/buildout.cfg
[keyutils]
recipe = slapos.recipe.cmmi
shared = true
url = https://people.redhat.com/~dhowells/keyutils/keyutils-1.6.1.tar.bz2
md5sum = 919af7f33576816b423d537f8a8692e8
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${:_profile_base_location_}/keyutils-ln.diff#775e8e4efd35103335bff2ac951ea22e
configure-command = echo
make-options = DESTDIR=%(location)s INCLUDEDIR=/include SHAREDIR=/share/keyutils PREFIX=/ MANDIR=/share/man LDFLAGS=-Wl,-rpath=%(location)s/x86_64-linux-gnu
Link relatively to the directory instead from /x86_64-linux-gnu/
diff --git a/Makefile b/Makefile
index 5f8b163..0d20499 100644
--- a/Makefile
+++ b/Makefile
@@ -184,7 +184,7 @@ ifeq ($(NO_SOLIB),0)
$(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
$(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
mkdir -p $(DESTDIR)$(USRLIBDIR)
- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
+ $(LNS) $(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
sed \
-e 's,@VERSION\@,$(VERSION),g' \
-e 's,@prefix\@,$(PREFIX),g' \
......@@ -2,6 +2,7 @@
extends =
../attr/buildout.cfg
../gperf/buildout.cfg
parts = libcap
......@@ -19,6 +20,9 @@ make-options =
LDFLAGS="-L${attr:location}/lib/ -Wl,-rpath=${attr:location}/lib/ -Wl,-rpath=${:location}/lib/"
install
environment =
PATH=${gperf:location}/bin:%(PATH)s
# if lib64 exists, then create a symlink from lib to lib64
post-install =
cd ${:location}
......
[buildout]
extends =
../flex/buildout.cfg
../bison/buildout.cfg
[libnl]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz
md5sum = 03f74d0cd5037cadc8cdfa313bbd195c
environment =
PATH=${flex:location}/bin:${bison:location}/bin:%(PATH)s
[buildout]
extends =
../bison/buildout.cfg
../flex/buildout.cfg
[libpcap]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.tcpdump.org/release/libpcap-1.10.1.tar.gz
md5sum = 28e17495004036567c2cc884b51eba45
environment =
PATH=${bison:location}/bin:${flex:location}/bin:%(PATH)s
......@@ -12,8 +12,8 @@ parts =
[libxml2]
recipe = slapos.recipe.cmmi
shared = true
url = http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz
md5sum = 10942a1dc23137a8aa07f0639cbfece5
url = https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz
md5sum = b7b3029ac6beb32a7925225515f83ca3
configure-options =
--disable-static
--without-python
......
......@@ -7,8 +7,8 @@ parts =
libxslt
[libxslt]
url = ftp://xmlsoft.org/libxslt/libxslt-1.1.34.tar.gz
md5sum = db8765c8d076f1b6caafd9f2542a304a
url = https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.35.tar.xz
md5sum = 5b3a634b77effd8a6268c21173575053
recipe = slapos.recipe.cmmi
shared = true
# --disable-static is temporarilly removed due to build error
......
......@@ -7,5 +7,3 @@ recipe = slapos.recipe.cmmi
shared = true
url = http://download-mirror.savannah.gnu.org/releases/lzip/lunzip/lunzip-1.13.tar.gz
md5sum = 4bc15e65fef99db64e27f4cd369ae02e
configure-options =
--disable-static
[buildout]
extends =
../libaio/buildout.cfg
[lvm2]
recipe = slapos.recipe.cmmi
shared = true
url = https://mirrors.kernel.org/sourceware/lvm2/LVM2.2.03.15.tgz
md5sum = 0dbe745e945461419b56c7a21d7e47e2
location = @@LOCATION@@
configure-options =
--with-confdir=${:location}/etc
environment =
CFLAGS=-I${libaio:location}/include
LDFLAGS=-L${libaio:location}/lib -Wl,-rpath=${libaio:location}/lib -Wl,-rpath=${:location}/lib
......@@ -2,51 +2,143 @@
extends =
../pygolang/buildout.cfg
parts =
[virtual-env-base]
recipe = slapos.recipe.build
_name = ${:_buildout_section_name_}
name = ${:_buildout_section_name_}
default-instance = true
init =
from zc.buildout.easy_install import working_set
import os
name = options['_name']
eggs = options['eggs']
try:
scripts = "scripts = " + options['scripts']
except KeyError:
scripts = ""
self.buildout.parse("""
name = options['name']
eggs = options.get('eggs')
self.message = options.get('message')
self.chain = options.get('chain')
environment = options.get('environment')
scripts = options.get('scripts')
eggs_template = """
[.%(name)s.install-eggs]
recipe = zc.recipe.egg
eggs = %(eggs)s
eggs =
%(eggs)s
%(scripts)s
[.%(name)s.install-interpreter]
<= python-interpreter
eggs += %(eggs)s
""" % locals())
eggs +=
%(eggs)s
"""
instance_template = """
[.%(name)s.instance]
recipe = slapos.recipe.template
output = ${buildout:directory}/instance.cfg
depends = $%(cookbook)s
inline =
[buildout]
parts = publish
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
[publish]
recipe = slapos.cookbook:publish
activate-script = %(location)s
"""
if eggs:
self.buildout.parse(eggs_template % {
"eggs": "\n ".join(e.strip() for e in eggs.splitlines()),
"name": name,
"scripts": "scripts = " + scripts if scripts else "",
})
if is_true(options.get('default-instance')):
self.buildout.parse(instance_template % {
"cookbook": "{slapos-cookbook:recipe}",
"location": location,
"name": name,
})
env = {
"PATH": self.buildout['buildout']['bin-directory'] + ":\$PATH",
"PS1": "\"(" + self.name + ") \$PS1\"",
}
if environment:
for line in environment.splitlines():
key, value = line.split("=", 1)
env[key.strip()] = value.strip()
self.env = env
install =
message = ""
if self.message:
message = "echo " + "\n echo ".join(
"%r" % line for line in self.message.splitlines())
message += "\n echo \'\'"
chain = ""
if self.chain:
chain = "source " + "\n source ".join(
"%r" % line for line in self.chain.splitlines())
with open(location, "w") as f:
f.write(options['template'] % {
"path" : self.buildout['buildout']['bin-directory'],
"name" : self.name,
"env": " ".join("%s %s" % (k, v) for k, v in self.env.items()),
"message": message,
"chain": chain,
})
# Template virtual env for bash shell in posix
[virtual-env-base:posix]
template =
deactivate () {
set PATH PS1
if type deactivate > /dev/null 2>&1
then
export _OLD_PARAM=( "$@")
set %(env)s
while [ "$1" ]; do
eval "if [ \"\$_OLD_VENV_$1\" ]; then $1=\$_OLD_VENV_$1; else unset $1; fi; unset \$_OLD_VENV_$1"
if ! ( echo $_LIST_OLD_VENV | grep $1 ) > /dev/null 2>&1
then
eval "export _OLD_VENV_$1=\$$1"
eval "export _LIST_OLD_VENV=\"$1 \$_LIST_OLD_VENV\""
fi
eval "export $1=\"$2\""
shift
shift
done
unset -f deactivate
}
VENV_PATH=%(path)s
_OLD_VENV_PATH=$PATH
_OLD_VENV_PS1=$PS1
PATH=$VENV_PATH:$PATH
PS1='(%(name)s) '$PS1
if [[ -n "$_OLD_PARAM" ]]; then
set "$${_OLD_PARAM[@]}"
fi
unset _OLD_PARAM
%(chain)s
%(message)s
else
deactivate () {
set $_LIST_OLD_VENV
while [ "$1" ]; do
eval "if [ \"\$_OLD_VENV_$1\" ]; then $1=\$_OLD_VENV_$1; else unset $1; fi; unset \$_OLD_VENV_$1"
shift
done
unset -f deactivate
unset _LIST_OLD_VENV
}
export _OLD_PARAM=( "$@" )
set %(env)s
while [ "$1" ]; do
eval "_OLD_VENV_$1=\$$1"
eval "export $1=\"$2\""
eval "export _LIST_OLD_VENV=\"$1 \$_LIST_OLD_VENV\""
shift
shift
done
if [[ -n "$_OLD_PARAM" ]]; then
set "$${_OLD_PARAM[@]}"
fi
unset _OLD_PARAM
%(chain)s
%(message)s
fi
Virtual environment
===================
Introduction
------------
The virtual environment macro allows you to quickly create a development environment.
Options
-------
Several options are available to customize your virtual environment :
name
~~~~
The ``name`` option is the name that will be displayed when the environment is activated. For example::
name = virtual-env
gives::
>> source activate
( virtual-env ) >>
**Note:** By default, ``name`` is the name of the Buildout section that uses the macro.
location
~~~~~~~~
The ``location`` option is where the script to be sourced will be stored. For example::
location = project/activate
gives::
>> source project/activate
( virtual-env ) >>
**Note:** Don't forget to add the name of the script in the path.
eggs
~~~~
This option should not be used to install eggs during instantiation (in an instance file).
It works the same way as ``zc.recipe.eggs``, you can add to the line several eggs to download for use in the virtual environment.
A custom Python with the chosen eggs will then be generated. For example::
eggs = numpy
gives::
( virtual-env ) >> python
python
>>> import numpy
scripts
~~~~~~~
This option should not be used to install scripts during instantiation (in an instance file).
It works in the same way as in ``zc.recipe.eggs``, you can add to the line several scripts to generate for use in the virtual environment.For example::
eggs = Django
scripts = django-admin
gives::
( virtual-env ) >> django-admin
**Note:** By default if the option is not used, all scripts will be installed.
default-instance
~~~~~~~~~~~~~~~~
The ``default-instance`` option takes the value ``true`` or ``false``.
If set to ``true``, it will create a minimal instance that will publish the path of the script to be sourced.
If it is set to ``false``, you will be able to create your own custom instance.
**Note:** If you want to use the macro in an ``instance`` file, you should set this option to ``false``.
environment
~~~~~~~~~~~
The ``environment`` option allows you to choose the value of the environment variables of the virtual environment.
They are to be written on the line in the form ``VAR = value``. For example::
environment =
VAR1 = value1
VAR2 = value2
gives::
( virtual-env ) >> echo $VAR1
value1
**Note:** If you want to keep the other values as well, like for PATH for example, you have to do::
PATH = new_val:$PATH
message
~~~~~~~
The ``message`` option allows to display a message when sourcing the virtual environment.
The message will be considered as a string. For example::
message =
You are in a virtual environment.
gives::
>> source activate
You are in a virtual environment.
( virtual-env) >>
chain
~~~~~
The ``chain`` option allows you to chain several scripts created by the macro as if it were one. This can be useful if one script is generated in a ``software`` file and another in an ``instance`` file.
When deactivating, the state of the environment will return to the initial state.
To use this option you just have to specify the script to source by running the script. For example::
chain = project/another_activate
Deactivate
----------
Once you want to exit the virtual environment, you just have to run the ``deactivate`` function. Like::
( virtual-env ) >> deactivate
>>
......@@ -30,8 +30,8 @@ parts =
recipe = slapos.recipe.cmmi
shared = true
url = https://archive.mariadb.org//mariadb-${:version}/source/mariadb-${:version}.tar.gz
version = 10.4.22
md5sum = 0d5e1b9e3694322e18819811a2bf81fa
version = 10.4.25
md5sum = 76e6ee973adb7deb15d7936f710eb5a4
pre-configure =
set '\bSET(PLUGIN_AUTH_PAM YES CACHE BOOL "")' cmake/build_configurations/mysql_release.cmake
grep -q "$@"
......@@ -82,7 +82,7 @@ environment =
patch-options = -p1
patches =
https://sources.debian.org/data/main/m/mariadb-10.3/1:10.3.34-0+deb10u1/debian/patches/0024-Revert-to-using-system-pcre-library.patch#1c6a0f2634f5a56122299674b77b1131
post-install =
post-install =
ldd=`ldd %(location)s/lib/plugin/ha_rocksdb.so`
for x in ${lz4:location} ${snappy:location} ${zstd:location}
do echo "$ldd" |grep -qF " $x/lib/"
......@@ -99,9 +99,9 @@ post-install =
# as plugin-dir ( https://mariadb.com/kb/en/server-system-variables/#plugin_dir )
recipe = slapos.recipe.cmmi
shared = true
url = https://packages.groonga.org/source/mroonga/mroonga-11.09.tar.gz
md5sum = 8b1786332edc61c41a769f225e6063b2
pre-configure =
url = https://packages.groonga.org/source/mroonga/mroonga-12.07.tar.gz
md5sum = bee7506e08deda9a607d85ed03b8b62e
pre-configure =
rm -rf fake_mariadb_source
mkdir -p fake_mariadb_source
cd fake_mariadb_source
......@@ -134,8 +134,8 @@ environment =
### (we just override here for easier revert)
[mariadb-10.3]
<= mariadb-10.4
version = 10.3.32
md5sum = 12341dc150c810c0072a40e55825ca57
version = 10.3.35
md5sum = b7a2e69d103eda3dd61c8bad8775c7bd
post-install =
ldd=`ldd %(location)s/lib/plugin/ha_rocksdb.so`
for x in ${lz4:location} ${snappy:location} ${zstd:location}
......
......@@ -12,8 +12,8 @@ parts =
[matplotlibrc]
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
template = ${:_profile_base_location_}/${:filename}
rendered = ${matplotlibrc:location}/matplotlibrc
url = ${:_profile_base_location_}/${:filename}
output = ${matplotlibrc:location}/matplotlibrc
backend = agg
context =
key backend matplotlibrc:backend
......
[buildout]
extends =
../cmake/buildout.cfg
../curl/buildout.cfg
../git/buildout.cfg
../jsoncpp/buildout.cfg
../tinyxml2/buildout.cfg
parts =
mavsdk
[c-astral-headers]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/c-astral-c-library
revision = v0.1
git-executable = ${git:location}/bin/git
[gcc]
min_version = 7.1
[mavsdk-source]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/mavlink/MAVSDK.git
revision = v0.37.0
git-executable = ${git:location}/bin/git
ignore-cloning-submodules = true
[mavsdk]
recipe = slapos.recipe.cmmi
path = ${mavsdk-source:location}
cmake = ${cmake:location}/bin/cmake
pre-configure =
${git:location}/bin/git submodule update --init --recursive
cp -r ${c-astral-headers:location}/* ${mavsdk-source:location}/src/third_party/mavlink/include/mavlink/v2.0/
sed -i 's#common/mavlink.h#CAstral/mavlink.h#' ${mavsdk-source:location}/src/core/mavlink_include.h
configure-command =
${:cmake}
configure-options =
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_FLAGS="${:CMAKE_CFLAGS}"
-DCMAKE_CXX_FLAGS="${:CMAKE_CFLAGS}"
-DCMAKE_INSTALL_PREFIX=@@LOCATION@@
-DCMAKE_INSTALL_RPATH=${:CMAKE_LIBRARY_PATH}
-DPKG_CONFIG_EXECUTABLE=${pkgconfig:location}/bin/pkg-config
-DSUPERBUILD=OFF
-Bbuild/default
-H.
make-binary =
${:cmake} --build build/default --target install
environment =
CMAKE_INCLUDE_PATH=${curl:location}/include:${jsoncpp:location}/include:${tinyxml2:location}/include
CMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH}
CMAKE_PROGRAM_PATH=${cmake:location}/bin
PATH=${pkgconfig:location}/bin/:%(PATH)s
LDFLAGS=-L${jsoncpp:location}/lib -Wl,-rpath=${jsoncpp:location}/lib
CMAKE_CFLAGS=-I${tinyxml2:location}/include
CMAKE_LIBRARY_PATH=${curl:location}/lib:${jsoncpp:location}/lib:${tinyxml2:location}/lib
# MCA stands for Metadata Collect Agent
# https://lab.nexedi.com/nexedi/metadata-collect-agent
[buildout]
extends =
../../component/defaults.cfg
../../component/fmtlib/buildout.cfg
../../component/openssl/buildout.cfg
parts =
mca
[mca]
recipe = slapos.recipe.cmmi
url = https://lab.nexedi.com/nexedi/metadata-collect-agent/-/archive/v0.2h-dev_buildout/metadata-collect-agent-v0.2h-dev_buildout.tar.gz
md5sum = f394ea9507d13a0b18f9485e70abaf32
configure-command = :
make-targets =
no-dracut
install-no-dracut
environment =
PYTHON_PATH=${python3:location}
PREFIX=@@LOCATION@@
OPENSSL_PATH=${openssl:location}
FMTLIB_PATH=${fmtlib:location}
......@@ -8,8 +8,8 @@ parts =
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/mesonbuild/meson/releases/download/${:version}/meson-${:version}.tar.gz
version = 0.57.2
md5sum = 4a07b6d42d7a46a6b6e9604fae7da9aa
version = 0.62.1
md5sum = 2f5301d0e7fd5544ab0004393ba44cbe
configure-command = true
make-binary = true
post-install =
......
......@@ -18,5 +18,5 @@ configure-option =
--disable-documentation
environment =
PATH=${m4:location}/bin:${patch:location}/bin:%(PATH)s
CPPFLAGS=-I${gmp:location}/include
LDFLAGS=-L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=@@LOCATION@@/lib
CPPFLAGS=-I${gmp:location}/include -I${openssl:location}/include
LDFLAGS=-L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=@@LOCATION@@/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib
......@@ -49,4 +49,5 @@ configure-options =
--enable-python
--with-json
--without-cli
--with-python-bin=${buildout:executable}
......@@ -5,4 +5,4 @@ extends =
test.cfg
[python]
part = python3
part = python2.7
......@@ -21,20 +21,20 @@ eggs +=
# env.sh for interpreter to be on $PATH.
[nxdtest-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(nxdtest-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${nxdtest-env.sh:rendered}
env.sh = ${nxdtest-env.sh:output}
workdir = ${nxdtest-repository:location}
......@@ -4,14 +4,26 @@
parts = open62541
extends =
../cmake/buildout.cfg
../patch/buildout.cfg
[open62541]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/open62541/open62541/archive/refs/tags/v1.2.2.tar.gz
md5sum = 2883bde165bc9bc3d459ccbb47acf7f4
configure-command = ${cmake:location}/bin/cmake
url = https://github.com/open62541/open62541/archive/refs/heads/pack/v1.3.zip
md5sum = c2e9938f082b027110fba538de76684c
patch-options = -p1
patches =
${:_profile_base_location_}/ipv6_bugfix.patch#355bec02adee4ea73ff5a56ba6971ad2
configure-command =
${cmake:location}/bin/cmake
configure-options =
-Bbuild
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=@@LOCATION@@
make-options = -C build
-DUA_ENABLE_PUBSUB=ON
-DUA_ENABLE_SUBSCRIPTIONS=ON
-DUA_NAMESPACE_ZERO=REDUCED
post-install =
cp src/pubsub/*.h deps/open62541_queue.h @@LOCATION@@/include
environement =
PATH=${patch:location}/bin:%(PATH)s
commit ccdde2eddfd2e0937ba0b452063c60c214f5f2f5 (HEAD -> master)
Author: Thomas Gambier <thomas.gambier@nexedi.com>
Date: Sat May 28 19:18:02 2022 +0200
BUGFIX: UA_PubSubChannelUDPMC_regist supports different interface in IPv6
diff --git a/plugins/ua_pubsub_udp.c b/plugins/ua_pubsub_udp.c
index 2c6ea480..f66f5860 100644
--- a/plugins/ua_pubsub_udp.c
+++ b/plugins/ua_pubsub_udp.c
@@ -319,6 +319,7 @@ UA_PubSubChannelUDPMC_open(const UA_PubSubConnectionConfig *connectionConfig) {
"Interface configuration preparation failed.");
goto cleanup;
}
+ memcpy(&channelDataUDPMC->intf_addr, &group.ipv6.ipv6mr_interface, sizeof(group.ipv6.ipv6mr_interface));
}
#endif
}
@@ -432,6 +433,7 @@ UA_PubSubChannelUDPMC_regist(UA_PubSubChannel *channel, UA_ExtensionObject *tran
memcpy(&groupV6.ipv6mr_multiaddr,
&((const struct sockaddr_in6 *) &connectionConfig->ai_addr)->sin6_addr,
sizeof(struct in6_addr));
+ memcpy(&groupV6.ipv6mr_interface, &connectionConfig->intf_addr, sizeof(int));
if(UA_setsockopt(channel->sockfd,
connectionConfig->ai_family == PF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP,
......@@ -17,8 +17,8 @@ parts =
[openssl]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.openssl.org/source/openssl-1.1.1n.tar.gz
md5sum = 2aad5635f9bb338bc2c6b7d19cbc9676
url = https://www.openssl.org/source/openssl-1.1.1o.tar.gz
md5sum = d05e96e200d2ff0aef20c114cb5f17bf
location = @@LOCATION@@
# 'prefix' option to override --openssldir/--prefix (which is useful
# when combined with DESTDIR). Used by slapos.package.git/obs
......
......@@ -73,7 +73,7 @@ perl-PATH = ${:location}/bin/
# dependencies
perl-bin = ${:perl-PATH}/perl
perl-PERL5LIB =
perl-PERL5LIB =
# Implementation
recipe = slapos.recipe.cmmi
......@@ -117,12 +117,12 @@ perl_location = ${perl:location}
# - inc : colon (:) separated site perl of modules to include in @INC
# Outputs:
# - perl-bin : an executable perl
recipe = slapos.recipe.template:jinja2
template = inline:
recipe = slapos.recipe.template
inline =
#!/bin/sh
{% set inc = "${:inc}".split(':') %} {# XXX we could remove duplicates from inc #}
exec ${perl:location}/bin/perl \
{% for item in inc -%}{% if item %} -I "{{ item }}" \
{% endif %}{% endfor %} "$@"
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
perl-bin = ${:rendered}
output = ${buildout:bin-directory}/${:_buildout_section_name_}
perl-bin = ${:output}
......@@ -14,8 +14,8 @@ extends =
[postfix]
recipe = slapos.recipe.cmmi
shared = true
url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-3.5.8.tar.gz
md5sum = c7c55ccc1db2a30d35c3867c21fe7109
url = http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.7.2.tar.gz
md5sum = 92ff3863194004f7d8a0893421ba4248
location = @@LOCATION@@
patch-options = -p1
patches =
......
......@@ -88,12 +88,10 @@ init =
# .X.pyprog is python program to start and run entry
# it uses .X.pyexe as underlying python interpreter
[.%(name)s.pyprog]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template
exe = %(exe)s
rendered= $${:exe}
mode = 755
template=
inline:
output= $${:exe}
inline =
#!$${.%(name)s.pyexe:exe}
import sys
%(__pyinit)s
......
# SlapOS software release to test pygolang/py3 on Nexedi testing infrastructure.
# SlapOS software release to test pygolang/py2 on Nexedi testing infrastructure.
[buildout]
extends = test.cfg
[python]
part = python3
part = python2.7
......@@ -28,21 +28,21 @@ eggs = ${pygolang:egg}
# env.sh for pygolang's python/gpython to be on $PATH.
[pygolang-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(pygolang-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${pygolang-env.sh:rendered}
env.sh = ${pygolang-env.sh:output}
workdir = ${pygolang-repository:location}
......
commit cf5648658c87b6e3b2fa4394b5921792827246dc
Author: Bryce Guinta <bryce.paul.guinta@gmail.com>
Date: Sun Jan 7 14:28:42 2018 -0700
Fix submodule import in six.moves
This commit fixes import errors when modname
started with, but was not equal, to six.moves
---
astroid/brain/pysix_moves.py | 38 ++++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/astroid/brain/pysix_moves.py b/astroid/brain/pysix_moves.py
index 548d9761..1db6566a 100644
--- a/astroid/brain/pysix_moves.py
+++ b/astroid/brain/pysix_moves.py
@@ -23,7 +23,8 @@
from astroid import MANAGER, register_module_extender
from astroid.builder import AstroidBuilder
-from astroid.exceptions import AstroidBuildingException
+from astroid.exceptions import AstroidBuildingException, NotFoundError
+from astroid import nodes
def _indent(text, prefix, predicate=None):
"""Adds 'prefix' to the beginning of selected lines in 'text'.
@@ -48,6 +49,7 @@
import CGIHTTPServer
import SimpleHTTPServer
+ import cPickle
from StringIO import StringIO
from cStringIO import StringIO as cStringIO
from UserDict import UserDict
@@ -194,7 +196,7 @@
import html.entities as html_entities
import html.parser as html_parser
import http.client as http_client
- import http.server
+ import http.server as http_server
BaseHTTPServer = CGIHTTPServer = SimpleHTTPServer = http.server
import pickle as cPickle
import queue
@@ -225,7 +227,8 @@
import tkinter.filedialog as tkinter_tkfiledialog
import tkinter.font as tkinter_font
import tkinter.messagebox as tkinter_messagebox
- import urllib.request
+ import urllib
+ import urllib.request as urllib_request
import urllib.robotparser as urllib_robotparser
import urllib.parse as urllib_parse
import urllib.error as urllib_error
@@ -248,10 +251,38 @@
def _six_fail_hook(modname):
- if modname != 'six.moves':
+ """Fix six.moves imports due to the dynamic nature of this
+ class.
+
+ Construct a psuedo-module which contains all the nessecary imports
+ for six
+
+ :param modname: Name of failed module
+ :type modname: str
+
+ :return: An astroid module
+ :rtype: nodes.Module
+ """
+
+ attribute_of = (modname != "six.moves" and
+ modname.startswith("six.moves"))
+ if modname != 'six.moves' and not attribute_of:
raise AstroidBuildingException
module = AstroidBuilder(MANAGER).string_build(_IMPORTS)
module.name = 'six.moves'
+ if attribute_of:
+ # Facilitate import of submodules in Moves
+ start_index = len(module.name)
+ attribute = modname[start_index:].lstrip(".").replace(".", "_")
+ try:
+ import_attr = module.getattr(attribute)[0]
+ except NotFoundError:
+ raise AstroidBuildingException
+ if isinstance(import_attr, nodes.Import):
+ submodule = MANAGER.ast_from_module_name(import_attr.names[0][0])
+ return submodule
+ # Let dummy submodule imports pass through
+ # This will cause an Uninferable result, which is okay
return module
[buildout]
parts =
pylint
astroid
extends =
../patch/buildout.cfg
[astroid]
recipe = zc.recipe.egg:custom
egg = astroid
patches =
${:_profile_base_location_}/astroid-six_moves_import_error.patch#377beb0c50f52b9608bb6be7bf93096e
patch-options = -p1
patch-binary = ${patch:location}/bin/patch
[pylint]
recipe = zc.recipe.egg:custom
egg = pylint
patches =
${:_profile_base_location_}/pylint-super_on_old_class.patch#cb0c3f8c091bf4980be395c917edc435
${:_profile_base_location_}/pylint-redefining-builtins-modules.patch#043defc6e9002ac48b40e078797d4d17
patch-options = -p1
patch-binary = ${patch:location}/bin/patch
From 258eee33e9a059b704546772b42683699894b52e Mon Sep 17 00:00:00 2001
From: Claudiu Popa <pcmanticore@gmail.com>
Date: Fri, 25 Mar 2016 14:36:31 +0000
Subject: [PATCH] Backport of new option, 'redefining-builtins-modules'.
commit 5674ff98a6cd090578910c2c3bb02e1328f8e6d2
Author: Claudiu Popa <pcmanticore@gmail.com>
Date: Wed Apr 4 20:56:59 2018 +0200
builtins is allowed to redefine builtins. Close #1966
commit 5674ff98a6cd090578910c2c3bb02e1328f8e6d2
Author: Claudiu Popa <pcmanticore@gmail.com>
Date: Wed Apr 4 20:56:59 2018 +0200
builtins is allowed to redefine builtins. Close #1966
commit 44a2431745e61ff7d7ded7db5145da835b5877d1
Author: Claudiu Popa <pcmanticore@gmail.com>
Date: Tue Dec 12 18:10:26 2017 +0100
past.builtins import don't trigger redefined-builtin. Close #1764
commit ad7c2cd38f7213edd1ff37aaead86d5ae8390df4.
Author: Claudiu Popa <pcmanticore@gmail.com>
Date: Fri Mar 25 14:36:31 2016 +0000
Add a new option, 'redefining-builtins-modules'.
The option can be used for controlling the modules
which can redefine builtins, such as six.moves and future.builtins.
Close #464.
---
pylint/checkers/variables.py | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index 8f6f9574..3223f8f0 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -309,7 +309,13 @@ builtins. Remember that you should avoid to define new builtins when possible.'
'help' : 'List of strings which can identify a callback '
'function by name. A callback name must start or '
'end with one of those strings.'}
- )
+ ),
+ ("redefining-builtins-modules",
+ {'default': ('six.moves', 'past.builtins', 'future.builtins', 'builtins', 'io'), 'type': 'csv',
+ 'metavar': '<comma separated list>',
+ 'help': 'List of qualified module names which can have objects '
+ 'that can redefine builtins.'}
+ ),
)
def __init__(self, linter=None):
BaseChecker.__init__(self, linter)
@@ -323,7 +329,8 @@ builtins. Remember that you should avoid to define new builtins when possible.'
self._to_consume = [(copy(node.locals), {}, 'module')]
for name, stmts in six.iteritems(node.locals):
if is_builtin(name) and not is_inside_except(stmts[0]):
- # do not print Redefining builtin for additional builtins
+ if self._should_ignore_redefined_builtin(stmts[0]):
+ continue
self.add_message('redefined-builtin', args=name, node=stmts[0])
@check_messages('unused-import', 'unused-wildcard-import',
@@ -496,7 +503,7 @@ builtins. Remember that you should avoid to define new builtins when possible.'
dummy_rgx = self.config.dummy_variables_rgx
if not dummy_rgx.match(name):
self.add_message('redefined-outer-name', args=(name, line), node=stmt)
- elif is_builtin(name):
+ elif is_builtin(name) and not self._should_ignore_redefined_builtin(stmt):
# do not print Redefining builtin for additional builtins
self.add_message('redefined-builtin', args=name, node=stmt)
@@ -688,6 +695,11 @@ builtins. Remember that you should avoid to define new builtins when possible.'
and not ass.statement() is node.statement():
self.add_message('undefined-loop-variable', args=name, node=node)
+ def _should_ignore_redefined_builtin(self, stmt):
+ if not isinstance(stmt, astroid.From):
+ return False
+ return stmt.modname in self.config.redefining_builtins_modules
+
@check_messages('redefine-in-handler')
def visit_excepthandler(self, node):
for name in get_all_elements(node.name):
--
2.36.0
[buildout]
extends =
../libpcap/buildout.cfg
../python-PyYAML/buildout.cfg
parts =
eggs
[python-pim-dm]
recipe = zc.recipe.egg:custom
egg = pim-dm
include-dirs =
${libpcap:location}/include
library-dirs =
${libpcap:location}/lib
rpath =
${libpcap:location}/lib/
[eggs]
recipe = zc.recipe.egg
eggs =
igmp
ipaddress
netifaces
${python-pim-dm:egg}
prettytable
py-mld
pyroute2
${python-PyYAML:egg}
......@@ -6,27 +6,19 @@ parts =
[python-slip]
# BUG: This section does FS changes outside location.
recipe = slapos.recipe.cmmi
url = https://github.com/nphilipp/python-slip/releases/download/python-slip-0.6.1/python-slip-0.6.1.tar.bz2
md5sum = a6d8ee96245fc21785d4c1c062c85f2f
url = https://github.com/nphilipp/python-slip/releases/download/python-slip-0.6.5/python-slip-0.6.5.tar.bz2
md5sum = 28ae5f93853466c44ec96706ba2a1eb4
configure-command = true
make-targets =
make-binary =
make all
cp -ax . ${:slip}/
cp -ax . ${:slip.dbus}/
cp -ax . ${:slip.gtk}/
sed -i '/setup(name="slip.dbus"/,/"gtk", "pango"])/d' ${:slip}/setup.py
sed -i '/setup(name="slip"/,/selinux"])/d' ${:slip.dbus}/setup.py
sed -i '/if sys.version_info.major/,/"gtk", "pango"])/d' ${:slip.dbus}/setup.py
sed -i '/setup(name="slip"/,/xml.etree.ElementTree"])/d' ${:slip.gtk}/setup.py
slip = ${buildout:parts-directory}/slip
slip.dbus = ${buildout:parts-directory}/slip.dbus
slip.gtk = ${buildout:parts-directory}/slip.gtk
[slip.gtk-develop]
recipe = zc.recipe.egg:develop
setup = ${python-slip:slip.gtk}
egg-name = slip.gtk
[slip.dbus-develop]
recipe = zc.recipe.egg:develop
......@@ -43,5 +35,4 @@ recipe = zc.recipe.egg
eggs =
${slip-develop:egg-name}
${slip.dbus-develop:egg-name}
${slip.gtk-develop:egg-name}
......@@ -9,7 +9,6 @@ extends =
../libpng/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../readline/buildout.cfg
../sqlite3/buildout.cfg
../xz-utils/buildout.cfg
......@@ -19,7 +18,7 @@ parts =
python3
[python3]
<= python3.7
<= python3.8
[python3-common]
recipe = slapos.recipe.cmmi
......@@ -28,10 +27,6 @@ package_version_suffix =
executable = @@LOCATION@@/bin/${:_buildout_section_name_}
patch-options = -p1
patches =
${:_profile_base_location_}/default_encoding.patch#4ad9664e622d5556b4c32b1d9cb587ff
${:_profile_base_location_}/pdb_ignore-ValueError-from-signal-in-non-main-thread.patch#29a34d7c6ef8372d4fb40b1704933349
url =
https://www.python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
configure-options =
......@@ -49,20 +44,30 @@ pre-install = mkdir profile-opt
# the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic,
# which would otherwise load the system libmagic.so with ctypes
environment =
PATH=${patch:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include -I${xz-utils:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${libffi:location}/include -I${ncurses:location}/include -I${ncurses:location}/include -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -L${xz-utils:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${xz-utils:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file:location}/lib
[python3.6]
<= python3-common
version = 3.6
package_version = 3.6.10
md5sum = 986078f11b39074be22a199e56491d98
[python3.7]
<= python3-common
version = 3.7
package_version = 3.7.7
md5sum = 172c650156f7bea68ce31b2fd01fa766
patch-options =
patches =
package_version = 3.7.13
md5sum = 10822726f75fd7efe05a94fbd6ac2258
[python3.8]
<= python3-common
version = 3.8
package_version = 3.8.13
md5sum = c4b7100dcaace9d33ab1fda9a3a038d6
[python3.9]
<= python3-common
version = 3.9
package_version = 3.9.13
md5sum = 5e2411217b0060828d5f923eb422a3b8
[python3.10]
<= python3-common
version = 3.10
package_version = 3.10.6
md5sum = afc7e14f7118d10d1ba95ae8e2134bf0
--- Python-3.5.3/Programs/python.c.orig 2017-01-17 08:57:53.000000000 +0100
+++ Python-3.5.3/Programs/python.c 2017-06-08 19:30:42.927077437 +0200
@@ -24,6 +24,9 @@
int i, res;
char *oldloc;
+ if (!getenv("LC_CTYPE") && !getenv("LC_ALL"))
+ setenv("LANG", "C.UTF-8", 0);
+
argv_copy = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1));
argv_copy2 = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1));
if (!argv_copy || !argv_copy2) {
[buildout]
extends =
../defaults.cfg
../attr/buildout.cfg
../bzip2/buildout.cfg
../gnutls/buildout.cfg
......@@ -17,20 +18,25 @@ extends =
../xorg/buildout.cfg
../zlib/buildout.cfg
../glib/buildout.cfg
../ceph/buildout.cfg
[gcc]
min_version = 7.4
[qemu]
recipe = slapos.recipe.cmmi
shared = true
url = https://download.qemu.org/qemu-5.2.0.tar.xz
md5sum = 179f86928835da857c237b42f4b2df73
url = https://download.qemu.org/qemu-7.0.0.tar.xz
md5sum = bfb5b09a0d1f887c8c42a6d5f26971ab
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=2079938
patches =
# backport (2021-03-20)
https://gitlab.com/qemu-project/qemu/-/commit/3eacf70bb5a83e4775ad8003cbca63a40f70c8c2.patch#c4330b02f331a827145009d85e4f6862
patch-binary = ${patch:location}/bin/patch
https://gitlab.com/redhat/centos-stream/src/qemu-kvm/-/merge_requests/87.diff#ad41b138aa6f330f95811c9a83637b85
patch-options = -p1
patch-binary = ${patch:location}/bin/patch
pre-configure =
sed -i '/^libmigration\b/s/$/ dependencies: [zlib],/' meson.build
sed -i 's/\bsnappy,/zlib, \0/' dump/meson.build
configure-rbd = --enable-rbd
configure-options =
--meson=${meson:location}/bin/meson
--ninja=${ninja:location}/bin/ninja
......@@ -51,11 +57,21 @@ configure-options =
--enable-vnc-png
--disable-vnc-jpeg
--disable-werror
${:configure-rbd}
CFLAGS-rbd = -I${librbd:location}/include/
LDFLAGS-rbd = -L${librbd:location}/lib -Wl,-rpath=${librbd:location}/lib
PKG_CONFIG_PATH-rbd = :${librbd:location}/lib/pkgconfig
environment =
CFLAGS=-I${gettext:location}/include -I${libaio:location}/include -I${liburing:location}/include -I${libcap-ng:location}/include
LDFLAGS=-L${gettext:location}/lib -L${libaio:location}/lib -L${libcap-ng:location}/lib -Wl,-rpath=${libcap-ng:location}/lib -Wl,-rpath=${glib:location}/lib -Wl,-rpath=${gnutls:location}/lib -Wl,-rpath=${nettle:location}/lib -Wl,-rpath=${pixman:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${libpng:location}/lib -Wl,-rpath=${libaio:location}/lib -Wl,-rpath=${liburing:location}/lib -Wl,-rpath=${libcap-ng:location}/lib
CFLAGS=${:CFLAGS-rbd} -I${gettext:location}/include -I${libaio:location}/include -I${liburing:location}/include -I${libcap-ng:location}/include
LDFLAGS=${:LDFLAGS-rbd} -L${gettext:location}/lib -L${libaio:location}/lib -L${libcap-ng:location}/lib -Wl,-rpath=${libcap-ng:location}/lib -Wl,-rpath=${glib:location}/lib -Wl,-rpath=${gnutls:location}/lib -Wl,-rpath=${nettle:location}/lib -Wl,-rpath=${pixman:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${libpng:location}/lib -Wl,-rpath=${libaio:location}/lib -Wl,-rpath=${liburing:location}/lib -Wl,-rpath=${libcap-ng:location}/lib
PATH=${pkgconfig:location}/bin:${bzip2:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gnutls:location}/lib/pkgconfig:${gnutls:pkg-config-path}:${libpng:location}/lib/pkgconfig:${liburing:location}/lib/pkgconfig:${ncurses:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gnutls:location}/lib/pkgconfig:${gnutls:pkg-config-path}:${libpng:location}/lib/pkgconfig:${liburing:location}/lib/pkgconfig:${ncurses:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig${:PKG_CONFIG_PATH-rbd}
[qemu:python2 or [int(q) for q in platform.libc_ver()[1].split(".")] < [2,25]]
configure-rbd =
CFLAGS-rbd =
LDFLAGS-rbd =
PKG_CONFIG_PATH-rbd =
[qemu:sys.version_info < (3,6)]
environment +=
......
[buildout]
extends =
../mavsdk/buildout.cfg
../open62541/buildout.cfg
../quickjs/buildout.cfg
parts = qjs-wrapper
[qjs-wrapper]
recipe = slapos.recipe.cmmi
shared = true
configure-command = true
url = https://lab.nexedi.com/nexedi/qjs-wrapper/-/archive/v0.1/qjs-wrapper-v0.1.tar.gz
md5sum = 4f0eb6f3bc5719a8ec043ce4f4d20747
environment =
C_INCLUDE_PATH=include:${open62541:location}/include:${open62541:location}/deps:${open62541:location}/src/pubsub:${quickjs:location}/include
CPLUS_INCLUDE_PATH=include:${mavsdk:location}/include:${mavsdk:location}/include/mavsdk
LDFLAGS=-L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -L${mavsdk:location}/lib -Wl,-rpath=${mavsdk:location}/lib
......@@ -5,8 +5,9 @@ parts = quickjs
[quickjs]
recipe = slapos.recipe.cmmi
shared = true
configure-command = true
url = https://bellard.org/quickjs/quickjs-2020-09-06.tar.xz
md5sum = 47cb6def3263d6a631b647b268b1c554
url = https://bellard.org/quickjs/quickjs-2021-03-27.tar.xz
md5sum = 135182a626aa0c87a49aa2bf58fd39bf
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
......@@ -5,6 +5,8 @@ extends =
../geoip2/buildout.cfg
../openvpn/buildout.cfg
../python-cryptography/buildout.cfg
../python-PyYAML/buildout.cfg
../python-pim-dm/buildout.cfg
parts =
re6stnet
......@@ -18,6 +20,7 @@ eggs =
${maxminddb-python:egg}
${python-cffi:egg}
${python-cryptography:egg}
${python-PyYAML:egg}
pyOpenSSL
re6stnet[geoip]
......@@ -26,4 +29,54 @@ eggs =
initialization =
import os
os.environ['GEOIP2_MMDB'] = "${geolite2-country:location}/GeoLite2-Country.mmdb"
os.environ['PATH'] = "${openvpn:location}/sbin:${babeld:location}/bin:${openssl:location}/bin:${python:location}/bin:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
os.environ['PATH'] = "${openvpn:location}/sbin:${babeld:location}/bin:${openssl:location}/bin:${python:location}/bin:${pim-dm-buildout:location}/bin:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
[pim-dm-buildout]
recipe = slapos.recipe.build
base = ${:_profile_base_location_}
python = ${python3:executable}
install =
import os
from zc.buildout.buildout import _isurl, urljoin
from slapos.rebootstrap.bootstrap import setup_script
base = options['base']
if _isurl(base):
extends = lambda path: urljoin(base + '/', path)
else:
extends = lambda path: os.path.realpath(os.path.join(base, path))
buildout_extra = []
buildout_section = self.buildout['buildout']
for option_name in ('download-cache', 'newest', 'shared-part-list'):
option_value = buildout_section.get(option_name)
if option_value:
buildout_extra.append('%s = %s' % (option_name, option_value))
os.mkdir(location)
with open(os.path.join(location, 'buildout.cfg'), 'w') as buildout_conf:
buildout_conf.write(
options['template'] % {
'extends': '\n '.join(map(extends, (
'../../stack/slapos.cfg',
'../python-pim-dm/buildout.cfg',
))),
'buildout': '\n'.join(buildout_extra),
}
)
buildout = os.path.join(location, 'bin', 'buildout')
os.mkdir(os.path.dirname(buildout))
setup_script(buildout, options['python'])
call((buildout, '-U'), cwd=location)
template =
[buildout]
extends = %(extends)s
extends-cache = ${buildout:extends-cache}
extensions -= slapos.rebootstrap
%(buildout)s
[libpcap]
recipe =
location = ${libpcap:location}
environment =
[libyaml]
recipe =
location = ${libyaml:location}
pre-configure =
......@@ -31,8 +31,7 @@ md5sum = e39331f32ad14009b9ff49cc10c5e751
configure-options =
--enable-multibyte
--disable-static
environment =
PATH=${patch:location}/bin:%(PATH)s
patch-binary = ${patch:location}/bin/patch
[readline]
recipe = slapos.recipe.cmmi
......@@ -47,3 +46,4 @@ configure-options =
environment =
CPPFLAGS=-I${ncurses:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
patch-binary = ${patch:location}/bin/patch
......@@ -30,4 +30,4 @@ go.importpath = github.com/signal18/replication-manager
repository = https://github.com/signal18/replication-manager
#branch = 2.1
branch = develop
revision = 838ffeb205ea4477f1c1bda607940fa07d8bcf51
\ No newline at end of file
revision = ecd7fa29cb517b292e70ca557757882cd748016e
\ No newline at end of file
......@@ -26,4 +26,4 @@ location = ${:output}
<= go-git-package
go.importpath = github.com/restic/restic
repository = https://github.com/restic/restic
revision = v0.9.6
revision = v0.14.0-0-g1bc87e17
#!/bin/sh -e
#!/bin/sh -ex
#
# This simple script to buildout slapos from source using 1.0 branch on
# /opt/slapos folder, adapt this script as you please.
# This simple script to buildout slapos from source using 1.0 branch on
# /opt/slapos folder, adapt this script as you please.
#
# Be carefull to not run this script were the script is already installed.
#
# Before run this script, ensure dependencies are installed, on debian, you can
# Be carefull to not run this script where slapos-node is already installed.
#
# Before run this script, ensure dependencies are installed, on debian, you can
# use the command bellow:
#
# apt-get install python gcc g++ make uml-utilities bridge-utils patch wget
# apt-get install python3 gcc g++ make patch wget curl
#
# Use sudo or superuser and create slapos directory (you can pick a different directory)
mkdir -p /opt/slapos/log/
mkdir -p /opt/slapos
cd /opt/slapos/
# Create buildout.cfg SlapOS bootstrap file
echo "[buildout]
extends = https://lab.nexedi.com/nexedi/slapos/raw/1.0/component/slapos/buildout.cfg
" > buildout.cfg
mkdir -p eggs log download-cache/dist
# Required in some distros such as Mandriva
unset PYTHONPATH
......@@ -26,17 +22,61 @@ unset PYTHONDONTWRITEBYTECODE
unset CONFIG_SITE
#
# Bootstrap SlapOS, using forked version of buildout.
# Bootstrap buildout.
#
wget https://bootstrap.pypa.io/bootstrap-buildout.py
python -S bootstrap-buildout.py --buildout-version 2.5.2+slapos013 \
-f http://www.nexedi.org/static/packages/source/slapos.buildout/
cat > buildout.cfg <<EOF
[buildout]
extensions =
download-cache = download-cache
parts =
zc.buildout
# Add location for modified non-official slapos.buildout
find-links +=
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/slapos.buildout/
[zc.buildout]
recipe = zc.recipe.egg
eggs =
zc.buildout
[versions]
setuptools = 44.1.1
zc.buildout = 2.7.1+slapos019
zc.recipe.egg = 2.0.3+slapos003
EOF
rm -f bootstrap.py
wget https://lab.nexedi.com/nexedi/slapos.buildout/raw/master/bootstrap/bootstrap.py
python3 -S bootstrap.py \
--setuptools-version 40.8.0 \
--setuptools-to-dir eggs
sed -i '1s/$/ -S/' bin/buildout
bin/buildout buildout:newest=true -v
# Install slapos.libnetworkcache (outside of system libraries, see python -S)
cat > buildout.cfg <<EOF
[buildout]
extends = https://lab.nexedi.com/nexedi/slapos/raw/1.0/component/slapos/buildout.cfg
download-cache = download-cache
parts =
networkcached
[networkcached]
recipe = zc.recipe.egg
eggs =
slapos.libnetworkcache
zc.buildout
EOF
sed -i '1s/$/ -S/' bin/buildout
bin/buildout buildout:newest=true -v
#
# Warning:Depending on your distribution you might need to
# replace python by python2 in the last command. This happens when your
# distribution considers that the standard python is the 3.x branch.
# Finally start the big build
#
# Finally start to build
bin/buildout -v
echo "[buildout]
extends = https://lab.nexedi.com/nexedi/slapos/raw/1.0/component/slapos/buildout.cfg
download-cache = download-cache
" > buildout.cfg
bin/buildout buildout:newest=true -v
......@@ -19,14 +19,17 @@ parts =
py
firewalld-patch
[python]
part = python3
[environment]
# Note: For now original PATH is appended to the end, as not all tools are
# provided by SlapOS
PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:${patch:location}/bin:${socat:location}/bin:$PATH
PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:${patch:location}/bin:${socat:location}/bin:$PATH
CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include
CPPFLAGS=${:CFLAGS}
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig:${python2.7:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig:${python:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig
LD_LIBRARY_PATH=${bzip2:location}/lib:${gdbm:location}/lib:${gettext:location}/lib:${glib:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${ncurses:location}/lib:${openssl:location}/lib:${readline:location}/lib:${sqlite3:location}/lib:${zlib:location}/lib
[cfg-environment]
......
......@@ -29,15 +29,19 @@ download-cache = download-cache
init +=
buildout = self.buildout['buildout']
assert buildout['directory'] == buildout['destdir'] + buildout['rootdir'], (
"Buildout MUST BE launched in destdir/rootdir (currently launched in %s but should be launched in %s)",
buildout['directory'], buildout['destdir'] + buildout['rootdir'])
"Buildout MUST BE launched in destdir/rootdir (currently launched in %s but should be launched in %s)" %
(buildout['directory'], buildout['destdir'] + buildout['rootdir']))
[python2.7]
[python3-common]
configure-options +=
--prefix=${buildout:rootdir}/parts/${:_buildout_section_name_}
environment +=
DESTDIR=${buildout:destdir}
# Force python3.7 for a while to be compatible with more SR
[python3]
<= python3.7
[bison]
configure-options +=
--prefix=${buildout:rootdir}/parts/${:_buildout_section_name_}
......@@ -85,9 +89,8 @@ pre-configure =
sed -i 's#/opt/slapos/parts/dbus/lib/libdbus-1.la#${dbus:location}/lib/libdbus-1.la#' ${dbus-glib:location}/lib/libdbus-glib-1.la
environment +=
LD_LIBRARY_PATH=${dbus:location}/lib
PYTHON=${python:location}/bin/python${python:version}
PYTHON_INCLUDES=-I${python:location}/include/python${python:version}
PYTHON_LIBS=-L${python:location}/lib -lpython${python:version} -lpthread -ldl -lutil -lm
PYTHON_INCLUDES=-I${python:location}/include/python${python:version}m
PYTHON_LIBS=-L${python:location}/lib -lpython${python:version}m -lpthread -ldl -lutil -lm
post-install =
sed -i 's#${dbus:location}/lib/libdbus-1.la#/opt/slapos/parts/dbus/lib/libdbus-1.la#' ${dbus-glib:location}/lib/libdbus-glib-1.la
......
......@@ -12,4 +12,5 @@ url = http://www.dest-unreach.org/socat/download/Archive/socat-${:version}.tar.g
version = 1.7.3.2
md5sum = aec3154f7854580cfab0c2d81e910519
environment =
CPPFLAGS=-I${openssl:location}/include
LDFLAGS=-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib
......@@ -9,16 +9,78 @@ extends =
../pkgconfig/buildout.cfg
../util-linux/buildout.cfg
../xz-utils/buildout.cfg
../ninja/buildout.cfg
../meson/buildout.cfg
[systemd-markupsafe-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/${:filename}
filename = MarkupSafe-2.0.1.tar.gz
md5sum = 892e0fefa3c488387e5cc0cad2daa523
[systemd-markupsafe-download:sys.version_info < (3,8)]
url = https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/${:filename}
filename = MarkupSafe-1.0.tar.gz
md5sum = 2fcedc9284d50e577b5192e8e3578355
[systemd-jinja2-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7/${:filename}
filename = Jinja2-2.11.3.tar.gz
md5sum = 231dc00d34afb2672c497713fa9cdaaa
[systemd-python]
recipe = slapos.recipe.build
shared = true
markupsafe = ${systemd-markupsafe-download:target}
jinja2 = ${systemd-jinja2-download:target}
install =
import os, sys
call([sys.executable, '-m', 'venv', '--clear', location])
pip = os.path.join(location, 'bin', 'pip')
call([pip, 'install', '--no-index', options['markupsafe'], options['jinja2']])
call([pip, 'uninstall', '-y', 'pip', 'setuptools'])
# selftest
python = os.path.join(location, 'bin', 'python')
call([python, '-c', 'import jinja2'])
[systemd]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.build
shared = true
# XXX This version requires Linux kernel >= 3.7.
url = https://www.freedesktop.org/software/systemd/systemd-221.tar.xz
md5sum = b4d5a253841cf28a98b7ec99c45e3716
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-options = rootprefix=${:location} SYSTEM_SYSVINIT_PATH=${:location}/etc/init.d
url = https://github.com/systemd/systemd-stable/archive/v249.6.tar.gz
md5sum = eb4a1923009abdb4e25c4802f4921a18
install =
env = self.environ
extract_dir = self.extract(self.download(options['url'], options['md5sum']))
workdir = guessworkdir(extract_dir)
call([
'meson', 'setup', 'build',
'-Dprefix=%s' % (location,),
'-Drootprefix=%s' % (location,),
'-Dsysconfdir=%s/etc' % (location,),
'-Dsysvinit-path=%s/etc/init.d' % (location,),
'-Dsysvrcnd-path=%s/etc/rc.d' % (location,),
'-Dlocalstatedir=%s/var' % (location,),
'-Dcreate-log-dirs=False',
'-Dhwdb=False',
], cwd=workdir, env=env)
call(['meson', 'setup', 'build',], cwd=workdir, env=env)
call(['meson', 'compile', '-C', 'build/'], cwd=workdir, env=env)
call(['meson', 'install', '-C', 'build/'], cwd=workdir, env=env)
import os
# On some systems multiarch is detected, and then libraries go to
# x86_64-linux-gnu, and as there was no way to control this behaviour
# during meson setup build phase, simply link it to lib64, where other
# parts are looking for libraries
if os.path.exists(os.path.join(location, 'x86_64-linux-gnu')):
call(['ln', '-s', 'x86_64-linux-gnu', 'lib64'], cwd=location)
environment =
PATH=${coreutils:location}/bin:${gettext:location}/bin:${gperf:location}/bin:${intltool:location}/bin:${perl-XML-Parser:perl-PATH}:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${systemd-python:location}/bin:${meson:location}/bin:${ninja:location}/bin:${coreutils:location}/bin:${gettext:location}/bin:${gperf:location}/bin:${intltool:location}/bin:${perl-XML-Parser:perl-PATH}:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${libcap:location}/include -I${util-linux:location}/include
LDFLAGS=-L${libcap:location}/lib -Wl,-rpath=${libcap:location}/lib -L${util-linux:location}/lib -Wl,-rpath=${util-linux:location}/lib
PKG_CONFIG_PATH=${util-linux:location}/lib/pkgconfig
......@@ -5,6 +5,7 @@ extends =
../pkgconfig/buildout.cfg
../patchelf/buildout.cfg
../python3/buildout.cfg
../tar/buildout.cfg
../yarn/buildout.cfg
download-plugins.cfg
buildout.hash.cfg
......@@ -20,6 +21,13 @@ recipe = slapos.recipe.build:download
shared = true
url = ${:_profile_base_location_}/${:_buildout_section_name_}
[vscode-uri]
recipe = slapos.recipe.build:download
shared = true
revision = c45342deb98de5c7b391bd2c08431b536b869a04
url = https://github.com/xavth/vscode-uri/archive/${:revision}.tar.gz
md5sum = 877accd4e29d2293ce33815803d998cc
[theia]
recipe = slapos.recipe.cmmi
shared = true
......@@ -36,6 +44,19 @@ pre-configure =
echo '${package.json:content}' > %(location)s/package.json
# To regenerate yarn.lock, comment the line below
cp yarn.lock %(location)s
# Workaround https://github.com/microsoft/vscode/issues/154048
# Once upstream is fixed:
# - remove [vscode-uri] section
# - remove the commands below
# - remove component/tar/buildout.cfg
# - remove the "resolution" field in package.json
# - regenerate yarn.lock
cd %(location)s
${tar:location}/bin/tar -xzf ${vscode-uri:target}
mv vscode-uri-${vscode-uri:revision} vscode-uri
cd vscode-uri
${yarn:location}/bin/yarn
${yarn:location}/bin/yarn install
configure-command = true
make-binary = cd %(location)s && ${yarn:location}/bin/yarn
make-targets = theia build
......@@ -47,19 +68,17 @@ post-install =
keytar.node
[theia-wrapper]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh
cd ${theia:location}
exec ${yarn:location}/bin/yarn theia start "$@"
[theia-open]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh
exec ${nodejs:location}/bin/node ${theia:location}/node_modules/.bin/theia-open "$@"
......@@ -73,7 +92,17 @@ install =
extract_dir = self.extract(self.download(url, md5sum))
destination_dir = os.path.join(options['location'], extension_name)
self.copyTree(guessworkdir(extract_dir), destination_dir)
patches = options.get(extension_name + '-patches')
if patches:
self.applyPatchList(
patches,
patch_options=options.get(extension_name + '-patch-options', '-p1'),
patch_binary=options['patch-binary'],
cwd=destination_dir,
)
os.chmod(destination_dir, 0o750)
patch-binary = ${patch:location}/bin/patch
ms-python-python-patches = ${:_profile_base_location_}/${ms-python-disable-jedi-buildout.patch:_update_hash_filename_} ${ms-python-disable-jedi-buildout.patch:md5sum}
[package.json]
content =
......@@ -108,7 +137,6 @@ content =
"**/.git/**": true,
"**/node_modules/**": true
},
"editor.multiCursorModifier": "ctrlCmd",
"editor.tabSize": 2,
"plantuml.server": "https://plantuml.host.vifib.net/svg/",
"plantuml.render": "PlantUMLServer",
......@@ -165,6 +193,9 @@ content =
"@perrinjerome/theia-open": "latest",
"@perrinjerome/theia-open-cli": "latest"
},
"resolutions": {
"**/vscode-uri": "file:./vscode-uri"
},
"devDependencies": {
"@theia/cli": "latest"
}
......
......@@ -19,4 +19,8 @@ md5sum = 8157c22134200bd862a07c6521ebf799
[yarn.lock]
_update_hash_filename_ = yarn.lock
md5sum = 7c6a0103f9b07cf51940f25b8e3a5730
md5sum = f961f8ef90e9a02543b4231af4fbd5cc
[ms-python-disable-jedi-buildout.patch]
_update_hash_filename_ = ms-python-disable-jedi-buildout.patch
md5sum = 0ec840ffecceaf7e91a037d439962415
......@@ -21,14 +21,14 @@ urls = vscode-bat https://open-vsx.org/api/vscode/bat/1.62.3/file/vscode.bat-1.6
vscode-handlebars https://open-vsx.org/api/vscode/handlebars/1.62.3/file/vscode.handlebars-1.62.3.vsix b762f43fff8bd5629dd9dc6454c3045b
vscode-hlsl https://open-vsx.org/api/vscode/hlsl/1.62.3/file/vscode.hlsl-1.62.3.vsix 899e646896216df4ed2d46e8f17812c9
vscode-html https://open-vsx.org/api/vscode/html/1.62.3/file/vscode.html-1.62.3.vsix a3448adf65e4158a250b37d470ce396c
vscode-html-language-features https://open-vsx.org/api/vscode/html-language-features/1.52.1/file/vscode.html-language-features-1.52.1.vsix a83619f2924ec58713691e76f17c7fb6
vscode-html-language-features https://open-vsx.org/api/vscode/html-language-features/1.62.3/file/vscode.html-language-features-1.62.3.vsix bb99f42d21bd4d2cdbf36b43aaae0a0b
vscode-ini https://open-vsx.org/api/vscode/ini/1.62.3/file/vscode.ini-1.62.3.vsix ee71130f95861b61d92d644c3cd8ded7
vscode-jake https://open-vsx.org/api/vscode/jake/1.62.3/file/vscode.jake-1.62.3.vsix fb7d81d41eaa04d53183bd6163e83ed3
vscode-java https://open-vsx.org/api/vscode/java/1.62.3/file/vscode.java-1.62.3.vsix d8239ae11719762e8b8152010bca50c9
vscode-javascript https://open-vsx.org/api/vscode/javascript/1.62.3/file/vscode.javascript-1.62.3.vsix 6f5babbbd2f437f2e34df2feb97ce595
ms-vscode-js-debug https://open-vsx.org/api/ms-vscode/js-debug/1.66.1/file/ms-vscode.js-debug-1.66.1.vsix 67bb6b75963b92fed5152598a4f969ae
ms-vscode-js-debug https://open-vsx.org/api/ms-vscode/js-debug/1.51.0/file/ms-vscode.js-debug-1.51.0.vsix db7f18b5bd883018d2b9150e20098b5f
vscode-json https://open-vsx.org/api/vscode/json/1.62.3/file/vscode.json-1.62.3.vsix 9e0e7b25a2d4c5df88ea3a75cf60372b
vscode-json-language-features https://open-vsx.org/api/vscode/json-language-features/1.45.1/file/vscode.json-language-features-1.45.1.vsix b7aa9d96d67792dedf9c2558880f38c0
vscode-json-language-features https://open-vsx.org/api/vscode/json-language-features/1.62.3/file/vscode.json-language-features-1.62.3.vsix 8c9ac731780ffc53aed4a3e9c17e92b9
vscode-less https://open-vsx.org/api/vscode/less/1.62.3/file/vscode.less-1.62.3.vsix 9eb5e65d5d089abae8fc7cb2ebcdd53a
vscode-log https://open-vsx.org/api/vscode/log/1.62.3/file/vscode.log-1.62.3.vsix 454bea32383e2f93a035c8c8c9d680f1
vscode-lua https://open-vsx.org/api/vscode/lua/1.62.3/file/vscode.lua-1.62.3.vsix 89bf9895c9562b15ed5ae11c035df577
......@@ -63,7 +63,7 @@ urls = vscode-bat https://open-vsx.org/api/vscode/bat/1.62.3/file/vscode.bat-1.6
vscode-theme-solarized-dark https://open-vsx.org/api/vscode/theme-solarized-dark/1.62.3/file/vscode.theme-solarized-dark-1.62.3.vsix 6216c9d67d5d9443ca27e3afdb816e46
vscode-theme-tomorrow-night-blue https://open-vsx.org/api/vscode/theme-tomorrow-night-blue/1.62.3/file/vscode.theme-tomorrow-night-blue-1.62.3.vsix 04ca5f2984a9b5fed4102e040e4e4fda
vscode-typescript https://open-vsx.org/api/vscode/typescript/1.62.3/file/vscode.typescript-1.62.3.vsix 4f4b4b40506dacce128306facf3ed092
vscode-typescript-language-features https://open-vsx.org/api/vscode/typescript-language-features/1.54.3/file/vscode.typescript-language-features-1.54.3.vsix 968364ffa226c88d685f55cb21359954
vscode-typescript-language-features https://open-vsx.org/api/vscode/typescript-language-features/1.62.3/file/vscode.typescript-language-features-1.62.3.vsix de0fcfc97774ee2804c7952e1267d34a
vscode-vb https://open-vsx.org/api/vscode/vb/1.62.3/file/vscode.vb-1.62.3.vsix cd17e947324bb9cd05e799546d7d4638
vscode-vscode-theme-seti https://open-vsx.org/api/vscode/vscode-theme-seti/1.62.3/file/vscode.vscode-theme-seti-1.62.3.vsix b27e54ecb1c38f270f8c671a6574dcbc
vscode-xml https://open-vsx.org/api/vscode/xml/1.62.3/file/vscode.xml-1.62.3.vsix e3ba682c8ecb22516a1fd02abcdff841
......@@ -74,8 +74,8 @@ urls = vscode-bat https://open-vsx.org/api/vscode/bat/1.62.3/file/vscode.bat-1.6
vscjava-vscode-java-debug https://open-vsx.org/api/vscjava/vscode-java-debug/0.29.0/file/vscjava.vscode-java-debug-0.29.0.vsix 1eb95110f84ff8dcabbe3c672066b86d
redhat-java https://open-vsx.org/api/redhat/java/0.61.0/file/redhat.java-0.61.0.vsix 72e548e2845e1ff655f28111558d6942
vscjava-vscode-java-test https://open-vsx.org/api/vscjava/vscode-java-test/0.26.0/file/vscjava.vscode-java-test-0.26.0.vsix fd63da5537a4bee1d3ceaae0fa6bf419
ms-python-python https://open-vsx.org/api/ms-python/python/2020.9.112786/file/ms-python.python-2020.9.112786.vsix c64b79fa822418e07b6d0f57b8838b44
perrinjerome-vscode-zc-buildout https://open-vsx.org/api/perrinjerome/vscode-zc-buildout/0.7.0/file/perrinjerome.vscode-zc-buildout-0.7.0.vsix 7598fa3c1c3701cb2da5c330fe996ff1
ms-python-python https://open-vsx.org/api/ms-python/python/2020.10.332292344/file/ms-python.python-2020.10.332292344.vsix e5cb6d850db94278b9fda02e38851361
perrinjerome-vscode-zc-buildout https://open-vsx.org/api/perrinjerome/vscode-zc-buildout/0.8.1/file/perrinjerome.vscode-zc-buildout-0.8.1.vsix b4b28223f1019b62fce3d7d6f6242152
jebbs-plantuml https://open-vsx.org/api/jebbs/plantuml/2.14.0/file/jebbs.plantuml-2.14.0.vsix 13fa7cbd14a30ecca166c41a307c7a73
rafaelmaiolla-diff https://open-vsx.org/api/rafaelmaiolla/diff/0.0.1/file/rafaelmaiolla.diff-0.0.1.vsix 1d8f868bc19b7d703c1be2bf99c4c7f9
perrinjerome-git-commit-syntax https://open-vsx.org/api/perrinjerome/git-commit-syntax/0.0.1/file/perrinjerome.git-commit-syntax-0.0.1.vsix 46625f2f05e244911c2cb9cc5032c0ef
......
......@@ -25,17 +25,17 @@ for plugin_and_version in '''\
vscode/handlebars/latest
vscode/hlsl/latest
vscode/html/latest
# latest fails to activate:
# Activating extension 'HTML Language Features (built-in)' failed: The language client requires VS Code version ^1.52.0 but received version 1.50.0
vscode/html-language-features/1.52.1
vscode/html-language-features/latest
vscode/ini/latest
vscode/jake/latest
vscode/java/latest
vscode/javascript/latest
ms-vscode/js-debug/latest
# js-debug 1.66.1 was starting OK with previous theia version, but since 1.27.0:
# Activating extension 'JavaScript Debugger' failed: a.window.registerTerminalProfileProvider is not a function
# (which is curious because registerTerminalProfileProvider was never supported in Theia)
ms-vscode/js-debug/1.51.0
vscode/json/latest
# latest json-language-features does offer completions with .theia/settings.json
vscode/json-language-features/1.45.1
vscode/json-language-features/latest
vscode/less/latest
vscode/log/latest
vscode/lua/latest
......@@ -70,9 +70,7 @@ for plugin_and_version in '''\
vscode/theme-solarized-dark/latest
vscode/theme-tomorrow-night-blue/latest
vscode/typescript/latest
# latest (1.62.3) does not activate because it uses a proposed API not in theia:
# Activating extension 'TypeScript and JavaScript Language Features (built-in)' failed: r.languages.createLanguageStatusItem is not a function
vscode/typescript-language-features/1.54.3
vscode/typescript-language-features/latest
vscode/vb/latest
vscode/vscode-theme-seti/latest
vscode/xml/latest
......@@ -87,7 +85,7 @@ for plugin_and_version in '''\
vscjava/vscode-java-debug/0.29.0
redhat/java/0.61.0
vscjava/vscode-java-test/0.26.0
ms-python/python/2020.9.112786
ms-python/python/2020.10.332292344
perrinjerome/vscode-zc-buildout/latest
jebbs/plantuml/2.14.0
rafaelmaiolla/diff/latest
......
jedi: Disable discover_buildout_paths
This slows down jedi a lot and can make it crash on some scripts.
See also https://github.com/davidhalter/jedi/issues/1325
---
extension/pythonFiles/lib/python/jedi/inference/sys_path.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/extension/pythonFiles/lib/python/jedi/inference/sys_path.py b/extension/pythonFiles/lib/python/jedi/inference/sys_path.py
index 5b82ec1..256b19c 100644
--- a/extension/pythonFiles/lib/python/jedi/inference/sys_path.py
+++ b/extension/pythonFiles/lib/python/jedi/inference/sys_path.py
@@ -137,6 +137,7 @@ def check_sys_path_modifications(module_context):
def discover_buildout_paths(inference_state, script_path):
buildout_script_paths = set()
+ return buildout_script_paths
for buildout_script_path in _get_buildout_script_paths(script_path):
for path in _get_paths_from_buildout_script(inference_state, buildout_script_path):
This diff is collapsed.
......@@ -9,8 +9,8 @@ extends =
[tig]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/jonas/tig/releases/download/tig-2.5.5/tig-2.5.5.tar.gz
md5sum = 0902ba706e8efaf6c2087d8b66393375
url = https://github.com/jonas/tig/releases/download/tig-2.5.7/tig-2.5.7.tar.gz
md5sum = 307e966837370ba698286a1c48d31a7f
environment =
CFLAGS=-I${ncurses:location}/include -I${libiconv:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${libiconv:location}/lib -Wl,-rpath=${libiconv:location}/lib
[buildout]
extends =
../cmake/buildout.cfg
parts =
tinyxml2
[tinyxml2]
recipe = slapos.recipe.cmmi
shared = true
configure-command =
${cmake:location}/bin/cmake
configure-options =
-DCMAKE_INSTALL_PREFIX=@@LOCATION@@
-Dtinyxml2_SHARED_LIBS=ON
url = https://github.com/leethomason/tinyxml2/archive/refs/tags/9.0.0.tar.gz
md5sum = afecd941107a8e74d3d1b4363cf52bd7
......@@ -8,8 +8,8 @@ parts +=
[tmux]
recipe = slapos.recipe.cmmi
url = https://github.com/tmux/tmux/releases/download/2.9a/tmux-2.9a.tar.gz
md5sum = f0564dbf4cf6b301c4845219d27ed3ad
url = https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz
md5sum = 8eee5883b9f6550fa4efaad0c9ec38f3
shared = true
environment =
CFLAGS=-I${ncurses:location}/include -I${libevent2:location}/include/
......
......@@ -9,22 +9,18 @@ parts =
[tomcat]
<= tomcat9
[tomcat7]
[tomcat-base]
recipe = slapos.recipe.build:download-unpacked
shared = true
strip-top-level-dir = true
url = https://archive.apache.org/dist/tomcat/tomcat-7/v${:version}/bin/apache-tomcat-${:version}.tar.gz
url = https://archive.apache.org/dist/tomcat/tomcat-${:version-major}/v${:version}/bin/apache-tomcat-${:version}.tar.gz
[tomcat7]
<= tomcat-base
version-major = 7
version = 7.0.100
md5sum = 79be4ba5a6e770730a4be3d5cb3c7862
[tomcat9]
recipe = slapos.recipe.build:download-unpacked
shared = true
strip-top-level-dir = true
url = https://archive.apache.org/dist/tomcat/tomcat-9/v${:version}/bin/apache-tomcat-${:version}.tar.gz
version = 9.0.12
md5sum = 7283da4a3a6e939adcd8f919be4ba41a
[tomcat7-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
......@@ -32,3 +28,15 @@ stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:catalina}
catalina = ${tomcat7:location}/bin/catalina.sh
[tomcat9]
<= tomcat-base
version-major = 9
version = 9.0.12
md5sum = 7283da4a3a6e939adcd8f919be4ba41a
[tomcat10]
<= tomcat-base
version-major = 10
version = 10.0.23
md5sum = 820ca70d01adf99d602615fb8d648162
......@@ -24,8 +24,8 @@ min_version = 8
[trafficserver]
recipe = slapos.recipe.cmmi
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.1.1.tar.bz2
md5sum = 666945652942cce8c3ff0ae2757cc3c6
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.1.3.tar.bz2
md5sum = 020e09019d38704a2cf96f4ae8450709
shared = true
patch-options = -p1
configure-options =
......
......@@ -39,9 +39,9 @@ eggs =
# env.sh for that python + go to be on $PATH
[wendelin.core-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
. ${gowork:env.sh}
export PS1="(wendelin.core-env) $PS1"
export PATH=${buildout:bin-directory}:${gdb:location}/bin:$PATH
......@@ -49,12 +49,12 @@ template = inline:
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${wendelin.core-env.sh:rendered}
env.sh = ${wendelin.core-env.sh:output}
workdir = ${wendelin.core-repository:location}
......
......@@ -23,21 +23,21 @@ eggs = ${zodbtools:egg}[test]
# env.sh for zodbtools's python to be on $PATH.
[zodbtools-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(zodbtools-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${zodbtools-env.sh:rendered}
env.sh = ${zodbtools-env.sh:output}
workdir = ${zodbtools-repository:location}
......
[python]
part = python2.7
# SlapOS software release to test zodbtools/ZODB4-py2 on Nexedi testing infrastructure.
[buildout]
extends =
test-zodb4.cfg
test-py2.cfg
# SlapOS software release to test zodbtools/ZODB4-wc2-py2 on Nexedi testing infrastructure.
[buildout]
extends =
test-zodb4-wc2.cfg
test-py2.cfg
# SlapOS software release to test zodbtools/ZODB4-wc2 on Nexedi testing infrastructure.
# SlapOS software release to test zodbtools/ZODB4-wc2-py3 on Nexedi testing infrastructure.
[buildout]
extends = test-common.cfg
......
# SlapOS software release to test zodbtools/ZODB4-py3 on Nexedi testing infrastructure.
[buildout]
extends = test-common.cfg
[ZODB]
major = 4
# SlapOS software release to test zodbtools/ZODB5-py2 on Nexedi testing infrastructure.
[buildout]
extends =
test-zodb5.cfg
test-py2.cfg
# SlapOS software release to test zodbtools/ZODB5 on Nexedi testing infrastructure.
# SlapOS software release to test zodbtools/ZODB5-py3 on Nexedi testing infrastructure.
[buildout]
extends = test-common.cfg
......
# SlapOS software release to test zodbtools on Nexedi testing infrastructure.
[buildout]
extends = test-common.cfg
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '1.0.238'
version = '1.0.272'
name = 'slapos.cookbook'
long_description = open("README.rst").read()
......@@ -79,7 +79,6 @@ setup(name=name,
'addresiliency = slapos.recipe.addresiliency:Recipe',
'apacheperl = slapos.recipe.apacheperl:Recipe',
'apachephp = slapos.recipe.apachephp:Recipe',
'apachephpconfigure = slapos.recipe.apachephpconfigure:Recipe',
'apacheproxy = slapos.recipe.apacheproxy:Recipe',
'certificate_authority = slapos.recipe.certificate_authority:Recipe',
'certificate_authority.request = slapos.recipe.certificate_authority:Request',
......@@ -108,15 +107,12 @@ setup(name=name,
'generic.memcached = slapos.recipe.generic_memcached:Recipe',
'generic.mysql.wrap_update_mysql = slapos.recipe.generic_mysql:WrapUpdateMySQL',
'gitinit = slapos.recipe.gitinit:Recipe',
'haproxy = slapos.recipe.haproxy:Recipe',
'ipv4toipv6 = slapos.recipe.6tunnel:FourToSix',
'ipv6toipv4 = slapos.recipe.6tunnel:SixToFour',
'jsondump = slapos.recipe.jsondump:Recipe',
'kvm.frontend = slapos.recipe.kvm_frontend:Recipe',
'logrotate = slapos.recipe.logrotate:Recipe',
'logrotate.d = slapos.recipe.logrotate:Part',
'mkdirectory = slapos.recipe.mkdirectory:Recipe',
'mioga.instantiate = slapos.recipe.mioga.instantiate:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe',
'neoppod.cluster = slapos.recipe.neoppod:Cluster',
'neoppod.admin = slapos.recipe.neoppod:Admin',
......@@ -147,7 +143,6 @@ setup(name=name,
'requestoptional.serialised = '
'slapos.recipe.request:RequestOptionalJSONEncoded',
're6stnet.registry = slapos.recipe.re6stnet:Recipe',
'reverseproxy.nginx = slapos.recipe.reverse_proxy_nginx:Recipe',
'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed',
'shell = slapos.recipe.shell:Recipe',
'signalwrapper= slapos.recipe.signal_wrapper:Recipe',
......@@ -169,7 +164,6 @@ setup(name=name,
'webchecker = slapos.recipe.web_checker:Recipe',
'wrapper = slapos.recipe.wrapper:Recipe',
'zabbixagent = slapos.recipe.zabbixagent:Recipe',
'zimbra.kvm = slapos.recipe.zimbra_kvm:Recipe',
'zeo = slapos.recipe.zeo:Recipe',
'zero-knowledge.read = slapos.recipe.zero_knowledge:ReadRecipe',
'zero-knowledge.write = slapos.recipe.zero_knowledge:WriteRecipe'
......
......@@ -24,7 +24,7 @@ Here is an example of a section to add in your software.cfg :
openoffice-port = 1235
ooo-binary-path = ${directory:libreoffice-bin}/program
environment =
FONTCONFIG_FILE = $${fontconfig-conf:rendered}
FONTCONFIG_FILE = $${fontconfig-conf:output}
PATH = ${binary-link:target-directory}
ooo-uno-path = ${directory:libreoffice-bin}/basis-link/program
......
kvm
===
kvm: Introduction
-----------------
The erp5.recipe.kvm aims to integrate KVM setups and buildout. This recipe is
able to download one remote image and setup a KVM environment to use it.
This recipe is also capable to reuse images or partitions already present on
disk to create the setup.
Examples
--------
The follow examples lists different kind of configurations.
KVM with Remote and gzipped Image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
[kvm-testing-with-remote-gzip-image]
image = http://URL/public.mdv2010.0_x86_64.qcow2.img.gz
# md5 checks are optional
md5_download = adcff8adcff8adcff8adcff8
md5_image = 1a4e371a4e371a4e371a4e371a4e37
gzip = true
# Use -hda instead -drive arg
# Default is drive (see Options below)
image_type = hda
### Common Configuration below. ###
# VNC is optional
kvm_vnc = <SOME-IP>:<VNC-DISPLAY>
# Graphic is optional
kvm_graphic = std
# Define list of redirections.
kvm_redir =
tcp:13480::80
kvm_net =
user,hostname=publicmandriva
nic,model=ne2k_pci
# This automatically create a redirection for 13456 -> 22
ssh_port = 13456
ssh_key_path = /path/to/mykey.key
KVM with Remote and raw Image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
[kvm-testing-with-remote-raw-image]
image = http://URL/public.mdv2010.0_x86_64.qcow2.img
md5_download = 1a4e371a4e371a4e371a4e371a4e37
md5_image = 1a4e371a4e371a4e371a4e371a4e37
gzip = false
### The Rest Same configuration as previous ###
KVM with direct local Image file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This does not copy and/or download the image::
[kvm-testing-with-local-image]
file = /home/you/public.mdv2010.0_x86_64.qcow2.img
md5_image = 1a4e371a4e371a4e371a4e371a4e37
### The Rest Same configuration as previous ###
KVM with a linux partition
~~~~~~~~~~~~~~~~~~~~~~~~~~
This does not copy and/or download the image::
[kvm-testing-a-linux-partition]
file = /dev/sdb
### The Rest Same configuration as previous ###
Options
-------
location
When define, it does not use buildout parts directory to allocate the image.
image
URL to a remote image.
file
Use file makes recipe ignore image option. You can define a path to a image
or partion to use.
image_type
You can define how the KVM will use the image with "-hdx" or "-drive". By
default it uses drive and the result is:
"kvm -drive file=IMAGE,if=virtio,cache=none,boot=on ..."
if you use image_type=hda:
"kvm -hda IMAGE ..."
gzip
If true means the image is compressed (gzipped), and the recipe will
uncompress the image before copy it.
md5_download
When defined, this values is used to verify the file downloaded.
md5_image
When defined, this values is used to verify the image generated, don't use it
when a partition is used in file parameter.
kvm_vnc
Define the ip-address:display used by KVM to start the VNC server. If not
defined, no VNC port is created.
kvm_redir
Define port redirections to the buildout.
kvm_graphic
If defined it adds the "-vga value" at the KVM command.
kvm_net
Define the net definitions, each value defines one "-net" in kvm command.
Example:
kvm_net =
user,hostname=publicmandriva
nic,model=ne2k_pci
It generates:
"kvm -net user,hostname=publicmandriva -net nic,model=ne2k_pci ..."
kvm_snapshot
Use "-snapshot" when run a KVM. This not write the changes direct into the
image. Default value is False.
ssh_port
If defined creates a new redirection for port 22 and creates few script to
connect to the instance.
ssh_hostname
By default it uses localhost. You don't need to define this.
ssh_key_path
Path to the ssh key used to connect without password to the image running.
ssh_user
Define the server that will be used to connect to the instance.
kvm_bin_directory
Place where the scripts will be created. By default it uses bin-directory from
buildout.
kvm_run_directory
Place where the pid file will be created, by default it uses var-directory
from buildout.
Generated Commands
------------------
Few scripts are generated to you manage your KVM instance. The scripts names are
created with the followed standard:
KVM-PARTS-NAME-ctl
Commands usage
~~~~~~~~~~~~~~
KVM-PARTS-NAME-ctl (start|stop|status|restart)
This script is used to manage the KVM instance.
KVM-PARTS-NAME-sendfile REMOTEFILE LOCALFILE
Copy the local file to a remote place.
KVM-PARTS-NAME-getfile REMOTEFILE LOCALFILE
Copy the remote file to a local place.
KVM-PARTS-NAME-runscript COMMAND
Run a command into remote KVM computer.
kvm_frontend
=============
kvm_frontend: Introduction
---------------------------
The ``slapos.recipe.kvm_frontend`` aims to provide proxy server to KVM instances.
It allows HTTPS IPv4/IPv6 proxying (with or without domain name), and supports
the WebSocket technology needed for VNC-in-webapplication noVNC.
It works following the master/slave instances system. A master instance is
created, containing all what is needed to run the proxy. Slave instances
are later created, adding one line in the master instance's proxy configuration
that specify the IP/port to proxy to the KVM.
The slave instance (kvm) is then accessible from
http://[masterinstanceIPorhostname]/[randomgeneratednumber]
Instance parameters
-------------------
Incoming master instance parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ``port`` - Port of server, optional, defaults to 4443.
* ``domain`` - domain name to use, optional, default to ``host.vifib.net``.
* ``redirect_plain_http`` - if value is one of ``['y', 'yes', '1', 'true']``,
will try to create a simple http server on port 80 redirecting to the proxy. Optional.
Incoming slave instance parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ``host`` - KVM instance IP or hostname. Mandatory.
* ``port`` - KVM instance port, Mandatory.
* ``https`` - if value is one of ``['n', 'no', '0', 'false']``, will try to connect to target in plain http. Optional.
Connection parameters
---------------------
Outgoing master connection parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ``domain_ipv6_address`` - Proxy IP
* ``site_url`` - Proxy URL
Outgoing slave connection parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ``site_url`` - URL of instance
* ``domain_name`` - Domain name of proxy
* ``port`` - Port of proxy
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from __future__ import print_function
from slapos.recipe.librecipe import GenericBaseRecipe
import zc.buildout
import sys
import zc.recipe.egg
class Recipe(GenericBaseRecipe):
def install(self):
"""
Taken out from the old "lamp" recipe. Allows do configure a LAMP instance.
"""
self.path_list = []
document_root = self.options['htdocs']
url = self.options.get('url', '')
mysql_conf = {'mysql_host': self.options['mysql-host'],
'mysql_port': self.options['mysql-port'],
'mysql_user': self.options['mysql-username'],
'mysql_password': self.options['mysql-password'],
'mysql_database': self.options['mysql-database'],
}
self.configureInstallation(document_root, url, mysql_conf)
return self.path_list
def configureInstallation(self, document_root, url, mysql_conf):
"""Start process which can launch python scripts, move or remove files or
directories when installing software.
"""
if not self.options.has_key('delete') and not self.options.has_key('rename') and not\
self.options.has_key('chmod') and not self.options.has_key('script') and not self.options.has_key('sql-script'):
return ""
delete = []
chmod = []
data = []
rename = []
rename_list = ""
argument = [self.options['lampconfigure'], "-H", mysql_conf['mysql_host'], "-P", mysql_conf['mysql_port'],
"-p", mysql_conf['mysql_password'], "-u", mysql_conf['mysql_user']]
if not self.options.has_key('file_token'):
argument = argument + ["-d", mysql_conf['mysql_database'],
"--table", self.options['table_name'].strip(), "--cond",
self.options.get('constraint', '1').strip()]
else:
argument = argument + ["-f", self.options['file_token'].strip()]
argument += ["-t", document_root]
if self.options.has_key('delete'):
delete = ["delete"]
for fname in self.options['delete'].split(','):
delete.append(fname.strip())
if self.options.has_key('rename'):
for fname in self.options['rename'].split(','):
if fname.find("=>") < 0:
old_name = fname
fname = []
fname.append(old_name)
fname.append(old_name + '-' + mysql_conf['mysql_user'])
else:
fname = fname.split("=>")
cmd = ["rename"]
if self.options.has_key('rename_chmod'):
cmd += ["--chmod", self.options['rename_chmod'].strip()]
rename.append(cmd + [fname[0].strip(), fname[1].strip()])
rename_list += fname[0] + " to " + fname[1] + " "
if self.options.has_key('chmod'):
chmod = ["chmod", self.options['mode'].strip()]
for fname in self.options['chmod'].split(','):
chmod.append(fname.strip())
if self.options.has_key('script') and \
self.options['script'].strip().endswith(".py"):
data = ["run", self.options['script'].strip(), "-v", mysql_conf['mysql_database'], url, document_root]
if self.options.has_key('sql-script'):
data = ["sql", self.options['sql-script'].strip(), "-v", mysql_conf['mysql_database'], url, document_root]
# TODO factor
if delete != []:
print("Creating lampconfigure with 'delete' arguments")
command = argument + delete
if rename != []:
for parameters in rename:
print("Creating lampconfigure with 'rename' arguments")
command = argument + rename
if chmod != []:
print("Creating lampconfigure with 'chmod' arguments")
command = argument + chmod
if data != []:
print("Creating lampconfigure with 'run' arguments")
command = argument + data
configureinstall_wrapper_path = self.createPythonScript(
self.options['configureinstall-location'],
__name__ + '.runner.executeRunner',
(argument, delete, rename, chmod, data)
)
#TODO finish to port this and remove upper one
#configureinstall_wrapper_path = self.createPythonScript(
# self.options['configureinstall-location'],
# 'slapos.lamp.run',
# [command]
#)
self.path_list.append(configureinstall_wrapper_path)
return rename_list
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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