Commit 8ca30103 authored by Alain Takoudjou's avatar Alain Takoudjou

Merge branch 'master' into 1.0

parents 7811a11d c91e5e88
diff -N -u -r bazel.orig/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java bazel/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java
--- bazel.orig/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java 1980-01-01 00:00:00.000000000 +0900
+++ bazel/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java 2017-01-02 22:19:09.326924214 +0900
@@ -172,7 +172,7 @@
@Param(
name = "use_default_shell_env",
type = Boolean.class,
- defaultValue = "False",
+ defaultValue = "True",
named = true,
positional = false,
doc = "whether the action should use the built in shell environment or not"
This diff is collapsed.
[buildout]
extends =
../gcc/buildout.cfg
../unzip/buildout.cfg
parts =
bazel
# The bazel binary contains a zip file. It must not be stripped.
do-not-strip-path = ${buildout:parts-directory}/bazel/bin/bazel
# [jdk]
# recipe = slapos.recipe.build
# url = http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz
# md5sum = de9b7a90f0f5a13cfcaa3b01451d0337
# location = ${buildout:parts-directory}/${:_buildout_section_name_}
# java_home = ${:location}/java_home
# script =
# from zc.buildout.download import check_md5sum, ChecksumError
# download_dir = tempfile.mkdtemp()
# download_path = os.path.join(download_dir, 'jdk.tar.gz')
# self.cleanup_list.append(download_dir)
# call(['wget', '-q', '-O', download_path, '--header', 'Cookie: oraclelicense=accept-securebackup-cookie', self.options['url']])
# if not check_md5sum(download_path, self.options['md5sum']):raise ChecksumError()
# extract_dir = self.extract(download_path)
# java_home = '%(location)s/java_home'
# self.copyTree(os.path.join(extract_dir, 'jdk1.8.0_112'), java_home)
[template-bazel-crosstool]
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 640
filename = bazel_tools_cpp_CROSSTOOL
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename}
cpp_path = ${gcc:location}/bin/cpp
gcc_path = ${gcc:location}/bin/gcc
gconv_path = ${gcc:location}/bin/gconv
include_path = ${gcc:location}/include
gcc_lib64_path = ${gcc:location}/lib64
context =
key cpp_path template-bazel-crosstool:cpp_path
key gcc_path template-bazel-crosstool:gcc_path
key gconv_path template-bazel-crosstool:gconv_path
key include_path template-bazel-crosstool:include_path
key gcc_lib64_path template-bazel-crosstool:gcc_lib64_path
[python2.7]
# link to gcc libraries to solve GLIBXXX undefined reference error.
environment =
PATH=${patch:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${libffi:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -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${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=${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 -Wl,-rpath=${gcc:location}/lib64
[bazel]
recipe = slapos.recipe.build
url = https://github.com/bazelbuild/bazel/releases/download/0.4.3/bazel-0.4.3-dist.zip
md5sum = cbd53f6f59915506da8998dab2098921
patch-binary = ${patch:location}/bin/patch
patch-file-path = ${:_profile_base_location_}/bazel-0.4.3.patch
bazel-crosstool-modified-file-path = ${template-bazel-crosstool:rendered}
unzip-bin = ${unzip:location}/bin
zip-bin = ${zip:location}/bin
gcc-bin = ${gcc:location}/bin
gcc-lib = ${gcc:location}/lib
gcc-lib64 = ${gcc:location}/lib64
java_home = PLEASE_INSTALL_JDK8_BY_YOURSELF_AND_SET_THE_PATH
script =
extract_dir = self.extract(self.download(self.options['url'], self.options['md5sum']))
crosstool_path = os.path.join(extract_dir, 'tools', 'cpp', 'CROSSTOOL')
os.chmod(crosstool_path, 0644)
shutil.copy(self.options['bazel-crosstool-modified-file-path'],
crosstool_path)
target_path = extract_dir+'/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java'
os.chmod(target_path, 0644)
call([self.buildout['bazel']['patch-binary'], '-p1', '-d', extract_dir, '-i', self.buildout['bazel']['patch-file-path']])
path = ':'.join((
self.options['unzip-bin'],
self.options['zip-bin'],
self.options['gcc-bin'],
os.environ['PATH']
))
env = {'JAVA_HOME':self.options['java_home'],
'PATH':path,
'LD_LIBRARY_PATH':':'.join((
self.options['gcc-lib'],
self.options['gcc-lib64'],
os.environ.get('LD_LIBRARY_PATH', '')
)),
'LDFLAGS':'-Wl,-rpath='+self.options['gcc-lib64'],
'CC':self.options['gcc-bin']+'/gcc',
'CXX':self.options['gcc-bin']+'/g++',
}
bin_dir = os.path.join(self.options['location'], 'bin')
os.makedirs(bin_dir)
call(['bash', 'compile.sh', 'compile'], cwd=extract_dir, env=env)
shutil.copy(os.path.join(extract_dir, 'output', 'bazel'),
os.path.join(bin_dir, 'bazel'))
[buildout]
parts = binutils
[binutils]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.gz
md5sum = 41b053ed4fb2c6a8173ef421460fbb28
\ No newline at end of file
[buildout]
# chromium binary is linking to libudev, that can be provided by
# component/systemd. but current component/systemd can be built only
# with Linux kernel >= 3.7. so libudev is not included in
# LD_LIBRARY_PATH below intentionally and libudev should be installed
# in the system.
extends =
../coreutils/buildout.cfg
../cups/buildout.cfg
../dbus/buildout.cfg
../findutils/buildout.cfg
../fontconfig/buildout.cfg
../gettext/buildout.cfg
../glib/buildout.cfg
../gtk-2/buildout.cfg
../libexpat/buildout.cfg
../libffi/buildout.cfg
../libpng/buildout.cfg
../libxml2/buildout.cfg
../mesa/buildout.cfg
../nspr/buildout.cfg
../nss/buildout.cfg
../pcre/buildout.cfg
../sqlite3/buildout.cfg
../xorg/buildout.cfg
../zlib/buildout.cfg
parts =
chromium
......@@ -17,17 +36,20 @@ slapos_promise =
file:chrome-wrapper
file:chrome-slapos
#chromium zip files for linux seem to be corrupted : rights are not correctly
#set (+x) when unzipping using python, but it works when doing "unzip chromium.zip"
#AND it works when unzipping any other archive with python.
#Conclusion : Google, please, learn how to make zip files.
linux_x86 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/109696/chrome-linux.zip 8ba6c022849b2a882b6e65163c147eb9
linux_x86-64 = http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/109696/chrome-linux.zip a3ed3feb285ecfe7c722576db80d5099
mac_x86-64 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/100142/chrome-mac.zip cb3a76b8a1a93be94df2f500fb621131
# How to get the revision :
# stable : https://www.googleapis.com/download/storage/v1/b/chromium-browser-continuous/o/Linux_x64%2FLAST_CHANGE?alt=media
# snapshot : https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media
revision_x86 = 382014
revision_x86-64 = 382014
revision_mac = 381909
linux_x86 = https://www.googleapis.com/download/storage/v1/b/chromium-browser-continuous/o/Linux%2F${:revision_x86}%2Fchrome-linux.zip?alt=media
linux_x86-64 = https://www.googleapis.com/download/storage/v1/b/chromium-browser-continuous/o/Linux_x64%2F${:revision_x86-64}%2Fchrome-linux.zip?alt=media ef2c476b1f059e9aa026bbac1872368d
mac_x86-64 = https://www.googleapis.com/download/storage/v1/b/chromium-browser-continuous/o/Mac%2F${:revision_mac}%2Fchrome-linux.zip?alt=media
script =
#If part directory already exist, will just throw an error.
import sys
import os
platform = '%%s_%%s' %% (guessOperatingSystem(), guessPlatform())
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[platform].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
......@@ -36,12 +58,46 @@ script =
wrapper_location = os.path.join("%(location)s", "chrome-slapos")
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!/bin/sh
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng15:location}/lib:%(location)s
%(location)s/chrome""")
export LD_LIBRARY_PATH="%(location)s"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${atk:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${cairo:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${cups:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus:location}/lib/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus-glib:location}/lib/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${fontconfig:location}/lib/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gdk-pixbuf:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gettext:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${glib:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gtk-2:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${harfbuzz:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libX11:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXau:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcomposite:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcursor:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXext:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXi:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXrender:location}/lib/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXtst:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libexpat:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libffi:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libpng:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libpng12:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxcb:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxml2:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${mesa:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${nspr:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${nss:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pango:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pcre:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pixman:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${sqlite3:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xdamage:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xfixes:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${zlib:location}/lib"
exec %(location)s/chrome --disable-setuid-sandbox --disable-gpu $*""")
wrapper.flush()
wrapper.close()
os.chmod(wrapper_location, 0766)
os.chmod(os.path.join("%(location)s", 'chrome'), 0766)
os.chmod(os.path.join("%(location)s", 'chrome-wrapper'), 0766)
# requirements : libXrender1 libxss1 x11-common
\ No newline at end of file
os.system('"${findutils:location}/bin/find" "%(location)s" -type d -exec "${coreutils:location}/bin/chmod" a+rx {} \;')
os.system('"${findutils:location}/bin/find" "%(location)s" -type f -executable -exec "${coreutils:location}/bin/chmod" a+rx {} \;')
os.system('"${findutils:location}/bin/find" "%(location)s" -type f -exec "${coreutils:location}/bin/chmod" a+r {} \;')
os.chmod(wrapper_location, 0755)
From 6e2dd54b4988a40766db557906b1d544916a6859 Mon Sep 17 00:00:00 2001
From: Julien Muchembled <jm@nexedi.com>
Date: Fri, 13 Jan 2017 23:45:54 +0100
Subject: [PATCH] Fix deadlock with storages that "sync" on a new transaction
This backports a change from commit 227953b977a9e195c4ce9bbb9acd9c5ee60c333a.
NEO, as well as ZEO+server_sync (ERP5 backports this feature with a
monkey-patch), pings the server (primary master node in the case of NEO) on
new transactions. However, this round-trip is actually performed by the thread
that also does tasks requiring to lock the DB, like processing of invalidations.
Since transaction 1.6.1 (more precisely commit e581a120a6), IStorage.sync()
is called indirectly by DB.open() when a transaction has already begun,
and the DB must not be locked when this happens.
---
src/ZODB/DB.py | 9 +++------
src/ZODB/tests/testDB.py | 2 +-
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/ZODB/DB.py b/src/ZODB/DB.py
index 95f1ab4..ffd10e9 100644
--- a/src/ZODB/DB.py
+++ b/src/ZODB/DB.py
@@ -753,19 +753,16 @@ def open(self, transaction_manager=None, at=None, before=None):
result = self.pool.pop()
assert result is not None
- # open the connection.
- result.open(transaction_manager)
-
# A good time to do some cache cleanup.
# (note we already have the lock)
self.pool.availableGC()
self.historical_pool.availableGC()
-
- return result
-
finally:
self._r()
+ result.open(transaction_manager)
+ return result
+
def connectionDebugInfo(self):
result = []
t = time.time()
diff --git a/src/ZODB/tests/testDB.py b/src/ZODB/tests/testDB.py
index 59b6ccf..e6286a4 100644
--- a/src/ZODB/tests/testDB.py
+++ b/src/ZODB/tests/testDB.py
@@ -151,7 +151,7 @@ def connectionDebugInfo():
>>> before
[None, '\x03zY\xd8\xc0m9\xdd', None]
>>> opened
- ['2008-12-04T20:40:44Z (1.40s)', '2008-12-04T20:40:45Z (0.30s)', None]
+ ['2008-12-04T20:40:44Z (1.30s)', '2008-12-04T20:40:46Z (0.10s)', None]
>>> infos
['test info (2)', ' (0)', ' (0)']
--
2.10.2.2.g19ca937.dirty
......@@ -5,10 +5,14 @@ extends =
../dbus/buildout.cfg
../fontconfig/buildout.cfg
../gtk-2/buildout.cfg
../gtk-3/buildout.cfg
../libffi/buildout.cfg
../libpng/buildout.cfg
../mesa/buildout.cfg
../p11-kit/buildout.cfg
../pcre/buildout.cfg
../xorg/buildout.cfg
../xz-utils/buildout.cfg
parts =
firefox
......@@ -26,23 +30,66 @@ depends =
${liberation-fonts:location}
${ipaex-fonts:location}
version = 45.0.1
version = 51.0.1
# MD5SUMs are available at :
# https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${:version}/MD5SUMS
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 3756c8d06d6f915a3dff1dae643ee74b
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 0409177ef649ec90ffe7a421a19bc156
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 9a5b67e9d759a1e4df004294a24b2b43
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 bd93f2652d1d90d59ae462439a93c85f
geckodriver_x86 = https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux32.tar.gz b5836f5a944fe9f3ed1a67c7b342c6a7
geckodriver_x86-64 = https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz 4a185d3179862a35104603b9274452e7
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
geckodriver_url, geckodriver_md5sum = self.options['geckodriver_' + guessPlatform()].split(' ')
extract_dir = self.extract(self.download(geckodriver_url, geckodriver_md5sum))
shutil.copy(extract_dir + '/geckodriver', "%(location)s")
wrapper_location = os.path.join("%(location)s", "firefox-slapos")
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!${dash:location}/bin/dash
cd %(location)s
export LD_LIBRARY_PATH=%(location)s:${alsa:location}/lib:${atk:location}/lib:${bzip2:location}/lib:${cairo:location}/lib:${dbus:location}/lib:${dbus-glib:location}/lib:${fontconfig:location}/lib:${freetype:location}/lib:${gdk-pixbuf:location}/lib:${gettext:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${harfbuzz:location}/lib:${libICE:location}/lib:${libSM:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXcomposite:location}/lib:${libXcursor:location}/lib:${libXext:location}/lib:${libXrender:location}/lib:${libXt:location}/lib:${libffi:location}/lib:${libpng:location}/lib:${libtool:location}/lib:${libuuid:location}/lib:${libxcb:location}/lib:${libxml2:location}/lib:${p11-kit:location}/lib:${pango:location}/lib:${pixman:location}/lib:${xdamage:location}/lib:${xfixes:location}/lib:${zlib:location}/lib
export LD_LIBRARY_PATH="%(location)s"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${alsa:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${atk:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${at-spi2-atk:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${at-spi2-core:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${bzip2:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${cairo:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus-glib:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${fontconfig:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${freetype:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gdk-pixbuf:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gettext:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${glib:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gtk-3:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${harfbuzz:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libepoxy:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libffi:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libICE:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libpng:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libSM:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libtool:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libuuid:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libX11:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXau:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxcb:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcomposite:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcursor:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXext:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXi:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxml2:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXrender:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXt:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${mesa:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pango:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pcre:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pixman:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xdamage:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xfixes:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xz-utils:location}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${zlib:location}/lib"
export PATH=${fontconfig:location}/bin:$PATH
exec %(location)s/firefox $*""")
wrapper.close()
......
......@@ -6,6 +6,7 @@ extends =
../perl/buildout.cfg
../tar/buildout.cfg
../xz-utils/buildout.cfg
../binutils/buildout.cfg
parts =
gcc
......@@ -59,6 +60,9 @@ configure-options =
--with-mpc=${mpc:location}
--enable-languages="c,c++"
--with-isl=${isl:location}
--with-ld=${binutils:location}/bin/ld
--with-nm=${binutils:location}/bin/nm
--with-as=${binutils:location}/bin/as
environment =
LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${isl:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
PATH=${perl:location}/bin:${tar:location}/bin:%(PATH)s
......
......@@ -3,7 +3,7 @@
parts = golang
[golang]
<= golang16
<= golang18
[golang-common]
......@@ -19,8 +19,8 @@ environment =
[golang14]
<= golang-common
url = https://storage.googleapis.com/golang/go1.4.3.src.tar.gz
md5sum = dfb604511115dd402a77a553a5923a04
url = https://storage.googleapis.com/golang/go1.4-bootstrap-20161024.tar.gz
md5sum = 76e42c8152e8560ded880a6d1d1f53cb
environment-extra =
......@@ -42,3 +42,12 @@ md5sum = bf3fce6ccaadd310159c9e874220e2a2
# go1.6 needs go1.4 to bootstrap
environment-extra =
GOROOT_BOOTSTRAP=${golang14:location}
[golang18]
<= golang-common
url = https://storage.googleapis.com/golang/go1.8.src.tar.gz
md5sum = 7743960c968760437b6e39093cfe6f67
# go1.8 needs go1.4 to bootstrap
environment-extra =
GOROOT_BOOTSTRAP=${golang14:location}
[buildout]
[gperf]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz
md5sum = c1f1db32fb6598d6a93e6e88796a8632
[buildout]
extends =
../dbus/buildout.cfg
../gettext/buildout.cfg
../glib/buildout.cfg
../gtk-2/buildout.cfg
../intltool/buildout.cfg
../libepoxy/buildout.cfg
../pcre/buildout.cfg
../perl/buildout.cfg
../perl-XML-Parser/buildout.cfg
../xorg/buildout.cfg
[at-spi2-core]
recipe = slapos.recipe.cmmi
url =http://ftp.gnome.org/pub/gnome/core/3.20/3.20.2/sources/at-spi2-core-2.20.1.tar.xz
md5sum = cd11cba463e8f5e1f39ba69555a7382f
depends =
${perl-XML-Parser:location}
configure-options =
--disable-gtk-doc-html
environment =
PATH=${dbus:location}/bin:${gettext:location}/bin:${glib:location}/bin:${intltool:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${dbus:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${inputproto:location}/include -I${kbproto:location}/include -I${libX11:location}/include -I${libXi:location}/include -I${libXtst:location}/include -I${xextproto:location}/include -I${xproto:location}/include
LDFLAGS=-L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${libXi:location}/lib -Wl,-rpath=${libXi:location}/lib -L${libXtst:location}/lib -Wl,-rpath=${libXtst:location}/lib
[at-spi2-atk]
recipe = slapos.recipe.cmmi
url =http://ftp.gnome.org/pub/gnome/core/3.20/3.20.2/sources/at-spi2-atk-2.20.1.tar.xz
md5sum = 23309b6f8e1623871ace6347fb734dce
environment =
PATH=${intltool:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${atk:location}/lib/pkgconfig:${at-spi2-core:location}/lib/pkgconfig:${dbus:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
[gtk-3]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.20/3.20.2/sources/gtk+-3.20.4.tar.xz
md5sum = 0cceee599f2910c25bf4b9dde4ab2fb6
pkg_config_depends = ${at-spi2-atk:location}/lib/pkgconfig:${at-spi2-core:location}/lib/pkgconfig:${dbus:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${libepoxy:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${libXi:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
configure-options =
--disable-static
--disable-glibtest
--disable-cups
--disable-papi
--enable-explicit-deps
--disable-xinerama
--disable-gtk-doc-html
--disable-man
environment =
PATH=${gdk-pixbuf:location}/bin:${gettext:location}/bin:${glib:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends}
# not taken from pkg-config result...
CPPFLAGS=-I${cairo:location}/include -I${inputproto:location}/include -I${libX11:location}/include -I${libXi:location}/include -I${xproto:location}/include -I${kbproto:location}/include -I${libXrender:location}/include -I${render:location}/include -I${libXext:location}/include
LDFLAGS=-L${libX11:location}/lib -L${libXi:location}/lib -L${libXext:location}/lib -L${libXrender:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
[buildout]
extends =
../hdf5/buildout.cfg
../cython/buildout.cfg
parts =
h5py
[hdf5-env]
LDFLAGS = -L${hdf5:location}/lib
CPPFLAGS = -I${hdf5:location}/include
[h5py]
recipe = zc.recipe.egg:custom
egg = h5py
setup-eggs = ${cython:egg}
include-dirs =
${hdf5:location}/include
library-dirs =
${hdf5:location}/lib
rpath =
${hdf5:location}/lib
environment = hdf5-env
[buildout]
extends =
../zlib/buildout.cfg
parts =
hdf5
[hdf5]
recipe = slapos.recipe.cmmi
url = https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/hdf5-1.10.0-patch1.tar.bz2
md5sum = f6d980febe2c35c11670a9b34fa3b487
configure-options =
--with-zlib=${zlib:location}
environment =
CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -89,7 +89,7 @@ input = inline:
recipe = slapos.recipe.cmmi
path = ${helloweb-repository:location}/go/
go = ${golang16:location}/bin/go
go = ${golang18:location}/bin/go
configure-command = :
make-binary =
make-targets= cd ${:path} &&
......
[buildout]
extends =
../tensorflow/buildout.cfg
../h5py/buildout.cfg
../pillow/buildout.cfg
parts =
keras-egg
[keras-egg]
recipe = zc.recipe.egg
eggs =
${scipy:egg}
${numpy:egg}
${tensorflow-build-install-egg:egg}
${protobuf-python:egg}
Keras
${h5py:egg}
${pillow-python:egg}
interpreter = keras-python
scripts = keras-python
[versions]
Keras = 1.2.1
Theano = 0.8.2
tensorflow = 0.12.0
h5py = 2.7.0rc2
Cython = 0.25.2
......@@ -13,8 +13,8 @@ parts =
[lcms2]
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/project/lcms/lcms/2.6/lcms2-2.6.tar.gz
md5sum = f4c08d38ceade4a664ebff7228910a33
url = http://downloads.sourceforge.net/project/lcms/lcms/2.8/lcms2-2.8.tar.gz
md5sum = 87a5913f1a52464190bb655ad230539c
configure-options =
--disable-static
environment =
......
......@@ -14,7 +14,7 @@ attr-include = ${attr:location}/include/
attr-lib = ${attr:location}/lib/
slapos_promise =
directory:sbin
directory:usr/include
directory:include
statlib:lib/libcap.a
file:lib/libcap.so
file:sbin/getcap
......@@ -26,7 +26,7 @@ script =
workdir = guessworkdir(extract_dir)
cflags = '-I%(attr)s' % {'attr': self.options['attr-include']}
ldflags = '-L%(attr)s -Wl,-rpath=%(attr)s' % {'attr': self.options['attr-lib']}
call(['make', 'CFLAGS=%s' % cflags, 'LDFLAGS=%s' % ldflags, 'DESTDIR=%s' % self.options['location'], 'RAISE_SETFCAP=no', 'install'],
call(['make', 'CFLAGS=%s' % cflags, 'LDFLAGS=%s' % ldflags, 'DESTDIR=%s' % self.options['location'], 'RAISE_SETFCAP=no', 'prefix=', 'install'],
cwd=workdir, env=env)
lib64 = os.path.join(self.options['location'], 'lib64')
lib = os.path.join(self.options['location'], 'lib')
......
[buildout]
extends =
../mesa/buildout.cfg
../pkgconfig/buildout.cfg
../xorg/buildout.cfg
../xz-utils/buildout.cfg
[libepoxy]
recipe = slapos.recipe.cmmi
url = https://github.com/anholt/libepoxy/releases/download/v1.4/libepoxy-1.4.0.tar.xz
md5sum = d8d8cbf2beb64975d424fcc5167a2a38
environment =
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${mesa:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libX11:pkg_config_depends}:${libXext:location}/lib/pkgconfig:${xdamage:location}/lib/pkgconfig:${damageproto:location}/lib/pkgconfig:${xfixes:location}/lib/pkgconfig:${fixesproto:location}/lib/pkgconfig
......@@ -18,15 +18,15 @@ environment =
[libpng12]
<= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.2.56.tar.xz
md5sum = 868562bd1c58b76ed8703f135a2e439a
url = http://download.sourceforge.net/libpng/libpng-1.2.57.tar.xz
md5sum = 307052e5e8af97b82b17b64fb1b3677a
[libpng15]
<= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.5.26.tar.xz
md5sum = 3414d556788e14b4a154369e67eacaa3
url = http://download.sourceforge.net/libpng/libpng-1.5.28.tar.xz
md5sum = 847aa2a1b231c07466d7f4167537424a
[libpng]
<= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.6.21.tar.xz
md5sum = 3bacb4728f6694a64ad9052769d6a4ce
url = http://download.sourceforge.net/libpng/libpng-1.6.28.tar.xz
md5sum = 425354f86c392318d31aedca71019372
[buildout]
extends =
../bzip2/buildout.cfg
../cmake/buildout.cfg
../patch/buildout.cfg
../perl/buildout.cfg
../popt/buildout.cfg
../zlib/buildout.cfg
parts =
......@@ -8,11 +11,19 @@ parts =
[librsync]
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/sourceforge/librsync/librsync-0.9.7.tar.gz
md5sum = 24cdb6b78f45e0e83766903fd4f6bc84
url = https://github.com/librsync/librsync/archive/v2.0.0.tar.gz
md5sum = cbda9c3eba21bcf2d56a4080ba7a5dc4
location = ${buildout:parts-directory}/${:_buildout_section_name_}
patch-options = -p1
patches =
${:_profile_base_location_}/librsync-2.0.0-issue50.patch#5bac5363646a2c2ec6d2c4b26ca4cd7f
configure-command = ${cmake:location}/bin/cmake
configure-options =
--disable-static
--enable-shared
-DCMAKE_INSTALL_PREFIX=${:location}
-DCMAKE_INSTALL_RPATH=${:location}/lib:${bzip2:location}/lib:${popt:location}/lib:${zlib:location}/lib
make-options =
VERBOSE=1
environment =
CPPFLAGS=-I${zlib:location}/include -I${bzip2:location}/include -I${popt:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib
PATH=${perl:location}/bin:%(PATH)s
CMAKE_INCLUDE_PATH=${bzip2:location}/include:${popt:location}/include:${zlib:location}/include
CMAKE_LIBRARY_PATH=${bzip2:location}/lib:${popt:location}/lib:${zlib:location}/lib
--- librsync-2.0.0/src/search.c 2017-02-20 13:39:48.012922600 +0100
+++ librsync-2.0.0/src/search.c 2017-02-20 13:41:43.661880014 +0100
@@ -218,7 +218,7 @@
r = m;
}
- if (l == r) {
+ if ((l == r) && (l <= bucket->r)) {
int i = sig->targets[l].i;
rs_block_sig_t *b = &(sig->block_sigs[i]);
if (weak_sum != b->weak_sum)
......@@ -46,5 +46,5 @@ patches =
${lxc-0.8.0-rc2-lxc-ls-patch:location}/${lxc-0.8.0-rc2-lxc-ls-patch:filename}
environment =
PATH=%(PATH)s:${attr:location}/bin/:${libcap:location}/sbin/
CFLAGS=-I${libcap:location}/usr/include
CFLAGS=-I${libcap:location}/include
LDFLAGS=-L${libcap:location}/lib/ -Wl,-rpath=${libcap:location}/lib/
......@@ -18,12 +18,12 @@ recipe = slapos.recipe.cmmi
url = ftp://ftp.freedesktop.org/pub/mesa/11.0.3/mesa-11.0.3.tar.xz
md5sum = bf9118bf0fbf360715cfe60baf7a1db5
configure-options =
--disable-static
--enable-static
--disable-gles1
--disable-gles2
--disable-dri
--disable-dri3
--disable-egl
--enable-egl
--disable-gbm
--disable-xvmc
--disable-vdpau
......
......@@ -4,28 +4,12 @@ extends =
parts = nspr
[nspr-pkgconfig-patch-download]
recipe = hexagonit.recipe.download
ignore-existing = true
filename = nspr-4.8.6-pkgconfig-1.patch
url = http://www.linuxfromscratch.org/patches/blfs/svn/${:filename}
md5sum = 7c00beff0475314f59214842509e407f
download-only = true
[nspr]
recipe = slapos.recipe.cmmi
url = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.7/src/nspr-4.8.7.tar.gz
md5sum = 97e30989a56ab813453b71261849c200
patches = ${nspr-pkgconfig-patch-download:location}/${nspr-pkgconfig-patch-download:filename}
patch-options = -p1
configure-command =
cd mozilla/nsprpub
./configure
url = https://ftp.mozilla.org/pub/nspr/releases/v4.13.1/src/nspr-4.13.1.tar.gz
md5sum = 9c44298a6fc478b3c0a4e98f4f9981ed
configure-command = nspr/configure
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--with-mozilla
--enable-64bit
make-options =
-C mozilla/nsprpub
environment =
PATH=${patch:location}/bin:%(PATH)s
--enable-ipv6
[buildout]
extends =
https://svn.erp5.org/repos/public/erp5/trunk/buildout/software-profiles/zlib.cfg
nspr.cfg
sed.cfg
parts =
nss
[nss-patch]
recipe = hexagonit.recipe.download
ignore-existing = true
filename = nss-3.12.9-with-nspr-4.8.7-1.patch
url = http://www.linuxfromscratch.org/patches/blfs/svn/nss-3.12.8-standalone-1.patch
md5sum = ee7b5966961bef16ca896435e78652d3
download-only = true
[nss-download]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_9_RTM/src/nss-3.12.9.tar.gz
md5sum = bd32f183ca28440c1744650be31a9ccc
strip-top-level-dir = true
../nspr/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
[nss]
recipe = plone.recipe.command
source = ${nss-download:location}
destination = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
compile-location = ${buildout:parts-directory}/${:_buildout_section_name_}_compile_
stop-on-error = true
command =
rm -rf ${:destination} &&
mkdir -p ${:destination} &&
rm -rf ${:compile-location} &&
cp -R ${:source} ${:compile-location} &&
cd ${:compile-location} &&
patch -Np1 -i ${nss-patch:location}/${nss-patch:filename} &&
${sed:location}/bin/sed -i "s/ZLIB_LIBS = -lz//g" ${:compile-location}/mozilla/security/coreconf/Linux.mk &&
${sed:location}/bin/sed -i "s/# INCLUDES += -I\/usr\/include -Y\/usr\/include\/linux/INCLUDES += \$(ZLIB_INCLUDE_DIR)/g" ${:compile-location}/mozilla/security/coreconf/Linux.mk &&
gmake -C mozilla/security/nss \
USE_64=1 \
BUILD_OPT=1 \
ZLIB_INCLUDE_DIR=-I${zlib:location}/include \
ZLIB_LIBS="-lz -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib" \
NSPR_INCLUDE_DIR=${nspr:location}/include/nspr \
NSPR_LIB_DIR="${nspr:location}/lib -Wl,-rpath=${nspr:location}/lib" \
NSSUTIL_LIB_DIR="${:location}/lib -Wl,-rpath=${:location}/lib" \
nss_build_all &&
mkdir -p ${:destination}/bin &&
mkdir -p ${:destination}/include/nss3 &&
mkdir -p ${:destination}/lib/pkgconfig &&
install -v -m755 ${:compile-location}/mozilla/dist/*.OBJ/lib/*.so ${:destination}/lib &&
install -v -m644 ${:compile-location}/mozilla/dist/*.OBJ/lib/{*.chk,libcrmf.a} ${:destination}/lib &&
install -v -m755 -d ${:destination}/include/nss &&
install -v -m755 ${:compile-location}/mozilla/dist/*.OBJ/bin/{certutil,nss-config,pk12util} ${:destination}/bin &&
install -v -m644 ${:compile-location}/mozilla/dist/*.OBJ/lib/pkgconfig/nss.pc ${:destination}/lib/pkgconfig &&
cp -v -RL ${:compile-location}/mozilla/dist/{public,private}/nss/* ${:destination}/include/nss &&
chmod 644 ${:destination}/include/nss/* &&
cd ${buildout:parts-directory} &&
rm -rf ${:compile-location}
[nss-cmmi]
recipe = slapos.recipe.cmmi
path = ${nss-download:location}/mozilla/security/nss
configure-command = echo "No need to configure"
make-binary = gmake
make-options = USE_64=1
make-targets = nss_build_all
url = https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_29_RTM/src/nss-3.29.tar.gz
md5sum = 253d1ae4cf5a560373bbadb4bf483945
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = make -j1 -C nss/coreconf/nsinstall all
# XXX How to build nss-config and pkg-config files ?
make-options =
-j1
-C nss
NSPR_INCLUDE_DIR="${nspr:location}/include/nspr -I${zlib:location}/include"
NSPR_LIB_DIR="${nspr:location}/lib -L${zlib:location}/lib"
SQLITE_INCLUDE_DIR=${sqlite3:location}/include
SQLITE_LIB_DIR=${sqlite3:location}/lib
LDFLAGS="-Wl,-rpath=${:location}/lib -Wl,-rpath=${nspr:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib"
all
post-install =
cp -aLr dist/*OBJ/* ${:location}/
mkdir -p ${:location}/include
cp -aLr dist/public/nss ${:location}/include/
environment =
BUILD_OPT=1
USE_64=1
NSS_USE_SYSTEM_SQLITE=1
[buildout]
extends =
../protobuf/buildout.cfg
parts =
protobuf-python
[protobuf-python-env]
PATH = ${protobuf:location}/bin:%(PATH)s
[protobuf-python]
recipe = zc.recipe.egg:custom
egg = protobuf
environment = protobuf-python-env
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[buildout]
parts = protobuf
[protobuf]
recipe = slapos.recipe.cmmi
url = https://github.com/google/protobuf/releases/download/v3.1.0/protobuf-python-3.1.0.tar.gz
md5sum = 7a227a21379a2ea08cc5d7ba1fb1ba5b
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......@@ -13,6 +13,7 @@ extends =
../zlib/buildout.cfg
../file/buildout.cfg
../xz-utils/buildout.cfg
../gcc/buildout.cfg
parts =
python2.7
......
......@@ -36,7 +36,7 @@ configure-options =
--enable-vnc
--enable-vnc-png
--disable-vnc-jpeg
--extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${ncurses:location}/include -I${zlib:location}/include -I${libpng:location}/include -I${libaio:location}/include -I${attr:location}/include -I${libcap:location}/usr/include"
--extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${ncurses:location}/include -I${zlib:location}/include -I${libpng:location}/include -I${libaio:location}/include -I${attr:location}/include -I${libcap:location}/include"
--extra-ldflags="-Wl,-rpath -Wl,${glib:location}/lib -L${glib:location}/lib -Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -Wl,-rpath -Wl,${gpg-error:location}/lib -L${gpg-error:location}/lib -L${gettext:location}/lib -Wl,-rpath -Wl,${gettext:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${libaio:location}/lib -Wl,-rpath=${libaio:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls -L${attr:location}/lib -Wl,-rpath=${attr:location}/lib -L${libcap:location}/lib -Wl,-rpath=${libcap:location}/lib"
--disable-werror
environment =
......
......@@ -8,6 +8,10 @@ parts =
[rdiff-backup-build]
recipe = zc.recipe.egg:custom
egg = rdiff-backup
patches =
${:_profile_base_location_}/rdiff-backup-1.2.8-librsync-1.0.0.patch#5e54a67845edd6942fcf7359c921e003
patch-options = -p1
patch-binary = ${patch:location}/bin/patch
include-dirs =
${librsync:location}/include/
library-dirs =
......
Patch by Roman Tereshonkov and Kari Hautio for rdiff-backup <= 1.2.8 to avoid a build failure with
librsync >= 1.0.0 (which is a security bugfix release). The discussion and solution finding can be
found at https://bugs.launchpad.net/duplicity/+bug/1416344 (for duplicity).
--- rdiff-backup-1.2.8/_librsyncmodule.c 2009-03-16 15:36:21.000000000 +0100
+++ rdiff-backup-1.2.8/_librsyncmodule.c.librsync-1.0.0 2015-03-02 00:54:24.000000000 +0100
@@ -59,8 +59,13 @@
if (sm == NULL) return NULL;
sm->x_attr = NULL;
+#ifdef RS_DEFAULT_STRONG_LEN
sm->sig_job = rs_sig_begin((size_t)blocklen,
(size_t)RS_DEFAULT_STRONG_LEN);
+#else
+ sm->sig_job = rs_sig_begin((size_t)blocklen,
+ (size_t)8, RS_MD4_SIG_MAGIC);
+#endif
return (PyObject*)sm;
}
[buildout]
extends =
../pandas/buildout.cfg
../matplotlib/buildout.cfg
../statsmodels/buildout.cfg
parts =
seaborn
[seaborn-env]
<= pandas-env
[seaborn]
recipe = zc.recipe.egg:custom
egg = seaborn
environment = seaborn-env
setup-eggs =
${pandas:egg}
${matplotlib:egg}
${statsmodels:egg}
[buildout]
extends =
../pandas/buildout.cfg
parts =
statsmodels
[statsmodels-env]
<= pandas-env
[statsmodels]
recipe = zc.recipe.egg:custom
egg = statsmodels
environment = statsmodels-env
setup-eggs =
${pandas:egg}
[buildout]
extends =
../coreutils/buildout.cfg
../gettext/buildout.cfg
../gperf/buildout.cfg
../intltool/buildout.cfg
../libcap/buildout.cfg
../perl/buildout.cfg
../perl-XML-Parser/buildout.cfg
../pkgconfig/buildout.cfg
../util-linux/buildout.cfg
../xz-utils/buildout.cfg
[systemd]
recipe = slapos.recipe.cmmi
# XXX This version requires Linux kernel >= 3.7.
url = https://www.freedesktop.org/software/systemd/systemd-221.tar.xz
md5sum = b4d5a253841cf28a98b7ec99c45e3716
depends =
${perl-XML-Parser:location}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-options = rootprefix=${:location} SYSTEM_SYSVINIT_PATH=${:location}/etc/init.d
environment =
PATH=${coreutils:location}/bin:${gettext:location}/bin:${gperf:location}/bin:${intltool:location}/bin:${perl:location}/bin:${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
[buildout]
extends =
../../stack/slapos.cfg
../scipy/buildout.cfg
../zip/buildout.cfg
../bazel/buildout.cfg
../protobuf-python/buildout.cfg
parts =
slapos-cookbook-develop
slapos-cookbook
tensorflow-build-install-egg
[numpy-egg]
recipe = zc.recipe.egg
initialization =
import scipy.stats # load our own libstdc++ explicitly at the very beginning
eggs =
setuptools
${scipy:egg}
${numpy:egg}
interpreter = numpy-python
scripts = numpy-python
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[tensorflow-repository]
recipe = plone.recipe.command
stop-on-error = true
repository = https://github.com/tensorflow/tensorflow
tag = v0.12.0
git-binary = ${git:location}/bin/git
patch-binary = ${patch:location}/bin/patch
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = export HOME=${:location}; (${:git-binary} clone --recurse-submodules --quiet -b ${:tag} ${:repository} ${:location}; cd ${buildout:parts-directory} ; ${:patch-binary} -p1 -d ${:_buildout_section_name_} < ${:_profile_base_location_}/tensorflow-v0.12.0.patch ) || (rm -fr ${:location}; exit 1)
[template-tensorflow-bzl]
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 640
filename = tensorflow.bzl
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename}
tf_extension_linkopts = '-lrt', '-Wl,-rpath=${gcc:location}/lib64'
context =
key tf_extension_linkopts template-tensorflow-bzl:tf_extension_linkopts
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[cuda]
tf_need_cuda = 1
tf_cuda_version = 8.0
tf_cudnn_version = 6.5
tf_cuda_compute_capabilities = 5.2,6.1
cuda_toolkit_path = /usr/local/cuda
cudnn_install_path = /usr/local/cuda
[tensorflow-build]
recipe = slapos.recipe.build
location = ${buildout:parts-directory}/${:_buildout_section_name_}
tensorflow-bzl-file-path = ${template-tensorflow-bzl:rendered}
workdir = ${tensorflow-repository:location}
gcc-bin = ${gcc:location}/bin
gcc-lib = ${gcc:location}/lib
gcc-lib64 = ${gcc:location}/lib64
numpy-python-command = ${buildout:bin-directory}/${numpy-egg:interpreter}
python27-lib = ${python2.7:location}/lib
java_home_bin = ${bazel:java_home}/bin
bazel_bin = ${bazel:location}/bin
need_cuda = ${cuda:cuda_toolkit_path}
script =
os.makedirs(location)
workdir = self.options['workdir']
env = {'PATH':':'.join([self.options['gcc-bin'],
self.options['java_home_bin'],
self.options['bazel_bin'],
os.environ['PATH']]),
'COMPILER_PATH':':'.join([self.options['gcc-bin'],
os.environ.get('COMPILER_PATH') or '']),
'LIBRARY_PATH':':'.join([self.options['gcc-lib'],
self.options['gcc-lib64'],
os.environ.get('LIBRARY_PATH') or '']),
'PYTHON_BIN_PATH':self.options['numpy-python-command'],
'PYTHON_LIB_PATH':self.options['python27-lib'],
'TF_NEED_GCP':'0',
'TF_NEED_HDFS':'0',
'TF_NEED_OPENCL':'0',
'TF_NEED_CUDA':self.buildout['cuda']['tf_need_cuda'],
##### FOR CUDA #####
'GCC_HOST_COMPILER_PATH':os.path.join(self.options['gcc-bin'], 'gcc'),
'TF_CUDA_VERSION':self.buildout['cuda']['tf_cuda_version'],
'CUDA_TOOLKIT_PATH':self.buildout['cuda']['cuda_toolkit_path'],
'TF_CUDNN_VERSION':self.buildout['cuda']['tf_cudnn_version'],
'CUDNN_INSTALL_PATH':self.buildout['cuda']['cudnn_install_path'],
'TF_CUDA_COMPUTE_CAPABILITIES':self.buildout['cuda']['tf_cuda_compute_capabilities'],
####################
}
import os.path
if not os.path.exists(env['CUDA_TOOLKIT_PATH']): env['TF_NEED_CUDA'] = '0'
env['LD_LIBRARY_PATH'] = env['LIBRARY_PATH']
env['LDFLAGS'] = '-lW,-rpath='+self.options['gcc-lib64']
shutil.copy(self.options['tensorflow-bzl-file-path'],
os.path.join(workdir, 'tensorflow', 'tensorflow.bzl'))
call(['./configure'], cwd=workdir, env=env)
bazel_command = (env['TF_NEED_CUDA'] == '1' and
['bazel', 'build', '-c', 'opt', '--copt', '-march=native', '--config', 'cuda', '-s', '--verbose_failures', '//tensorflow/tools/pip_package:build_pip_package']
or
['bazel', 'build', '-c', 'opt', '--copt', '-march=native', '-s', '--verbose_failures', '//tensorflow/tools/pip_package:build_pip_package'])
call(bazel_command, cwd=workdir, env=env)
[tensorflow-build-install-egg]
recipe = slapos.recipe.build
unzip-binary = ${unzip:location}/bin/unzip
tensorflow-repository-path = ${tensorflow-repository:location}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
need-tensorflow-build = ${tensorflow-build:location}
need-protobuf-python = ${protobuf-python:egg}
egg = tensorflow
script =
os.makedirs(location)
workdir = self.options['tensorflow-repository-path']
egg_name = 'tensorflow-0.12.0-py2.7-linux-x86_64.egg'
dist_dir = os.path.join(workdir, 'dist')
dest_dir = os.path.join(self.buildout['buildout']['eggs-directory'], egg_name)
call(['bazel-bin/tensorflow/tools/pip_package/build_pip_package', dist_dir], cwd=workdir)
call([self.options['unzip-binary'], '-o', os.path.join(dist_dir, egg_name), '-d', dest_dir])
[versions]
protobuf = 3.1.0.post1
wheel = 0.30.0a0
diff -N -u -r tensorflow.orig/tensorflow/tools/pip_package/build_pip_package.sh tensorflow/tensorflow/tools/pip_package/build_pip_package.sh
--- tensorflow.orig/tensorflow/tools/pip_package/build_pip_package.sh 2017-01-04 12:16:06.540748399 +0900
+++ tensorflow/tensorflow/tools/pip_package/build_pip_package.sh 2017-01-04 12:16:19.852748187 +0900
@@ -136,7 +136,7 @@
pushd ${TMPDIR}
rm -f MANIFEST
echo $(date) : "=== Building wheel"
- "${PYTHON_BIN_PATH:-python}" setup.py bdist_wheel ${GPU_FLAG} >/dev/null
+ "${PYTHON_BIN_PATH:-python}" setup.py bdist_egg ${GPU_FLAG} >/dev/null
mkdir -p ${DEST}
cp dist/* ${DEST}
popd
diff -N -u -r tensorflow.orig/tensorflow/tools/pip_package/setup.py tensorflow/tensorflow/tools/pip_package/setup.py
--- tensorflow.orig/tensorflow/tools/pip_package/setup.py 2017-01-04 12:16:06.540748399 +0900
+++ tensorflow/tensorflow/tools/pip_package/setup.py 2017-01-04 12:17:29.836747073 +0900
@@ -34,7 +34,7 @@
REQUIRED_PACKAGES = [
'numpy >= 1.11.0',
'six >= 1.10.0',
- 'protobuf == 3.1.0',
+ 'protobuf == 3.1.0.post1',
]
project_name = 'tensorflow'
diff -N -u -r tensorflow.orig/tensorflow/workspace.bzl tensorflow/tensorflow/workspace.bzl
--- tensorflow.orig/tensorflow/workspace.bzl 2017-01-04 12:16:06.568748399 +0900
+++ tensorflow/tensorflow/workspace.bzl 2017-01-04 12:16:19.852748187 +0900
@@ -228,9 +228,9 @@
native.new_http_archive(
name = "zlib_archive",
- url = "http://zlib.net/zlib-1.2.8.tar.gz",
- sha256 = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d",
- strip_prefix = "zlib-1.2.8",
+ url = "https://github.com/madler/zlib/archive/v1.2.9.zip",
+ sha256 = "819936ec260b679726f21dd9c1ef9c553ce0281988842c24a9c42652cbca698a",
+ strip_prefix = "zlib-1.2.9",
build_file = str(Label("//:zlib.BUILD")),
)
This diff is collapsed.
[buildout]
parts = unzip
[unzip]
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz
md5sum = 62b490407489521db863b523a7f86375
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = true
make-options = prefix=${:location} NO_BZIP2_SUPPORT=1 -f unix/Makefile unzips
[buildout]
extends =
../perl/buildout.cfg
../xz-utils/buildout.cfg
[util-linux]
recipe = slapos.recipe.cmmi
url = http://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-2.29.tar.xz
md5sum = 07b6845f48a421ad5844aa9d58edb837
configure-options =
--disable-static
--enable-libuuid
--disable-agetty
--disable-bash-completion
--disable-cal
--disable-cramfs
--disable-fallocate
--disable-fsck
--enable-libblkid
--disable-libfdisk
--enable-libmount
--disable-makeinstall-chown
--disable-makeinstall-setuid
--disable-more
--disable-mount
--disable-nls
--disable-pivot_root
--disable-pylibmount
--disable-rename
--disable-schedutils
--disable-setterm
--disable-libsmartcols
--disable-switch_root
--disable-tinfo
--disable-tls
--disable-ul
--disable-unshare
--disable-uuidd
--disable-wall
--without-libiconv-prefix
--without-libintl-prefix
--without-ncurses
--without-slang
--without-selinux
--without-audit
environment =
PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
[buildout]
extends =
../freetype/buildout.cfg
../fontconfig/buildout.cfg
../libpng/buildout.cfg
../tar/buildout.cfg
../xorg/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
parts =
tar
wkhtmltopdf
[wkhtmltopdf]
......@@ -25,6 +28,7 @@ script =
location = %(location)r
self.failIfPathExists(location)
import sys
import os
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
WK_SUFIX_MAP = { 'x86': 'i386', 'x86-64': 'amd64' }
platform = guessPlatform()
......@@ -35,12 +39,15 @@ script =
extract_dir = tempfile.mkdtemp(self.name)
self.cleanup_dir_list.append(extract_dir)
self.logger.debug('Created working directory ' + repr(extract_dir))
call(["${tar:location}/bin/tar", "xJf", path, "-C", extract_dir])
env = os.environ.copy()
env["PATH"] = "${tar:location}/bin:${xz-utils:location}/bin" + (":" + env["PATH"] if env.get("PATH") else "")
env["LD_LIBRARY_PATH"] = "${xz-utils:location}/lib" + (":" + env["LD_LIBRARY_PATH"] if env.get("LD_LIBRARY_PATH") else "")
call(["tar", "xJf", path, "-C", extract_dir], env=env)
shutil.move(os.path.join(extract_dir, "wkhtmltox"), location)
wrapper_location = os.path.join("%(location)s", "wkhtmltopdf")
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!${dash:location}/bin/dash
export LD_LIBRARY_PATH=%(location)s/lib/:${libXrender:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${libXext:location}/lib/
export LD_LIBRARY_PATH=%(location)s/lib:${fontconfig:location}/lib:${freetype:location}/lib:${libX11:location}/lib:${libXext:location}/lib:${libXrender:location}/lib:${libpng12:location}/lib:${zlib:location}/lib
export PATH=${fontconfig:location}/bin:$PATH
exec %(location)s/bin/wkhtmltopdf "$@"
""")
......
......@@ -528,3 +528,32 @@ environment =
CPPFLAGS=-I${bzip2:location}/include -I${gcrypt:location}/include -I${gpg-error:location}/include -I${zlib:location}/include
PATH=${patch:location}/bin:${pkgconfig:location}/bin:%(PATH)s
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gcrypt:location}/lib -Wl,-rpath=${gcrypt:location}/lib -L${gpg-error:location}/lib -Wl,-rpath=${gpg-error:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
[libXi]
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.7/src/everything/libXi-1.6.1.tar.bz2
md5sum = 78ee882e1ff3b192cf54070bdb19938e
pkg_config_depends = ${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
environment =
PKG_CONFIG_PATH=${:pkg_config_depends}
PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options =
--disable-docs
--disable-specs
--disable-static
--without-fop
--without-xmlto
[libXtst]
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.7/src/everything/libXtst-1.2.1.tar.bz2
md5sum = e8abc5c00c666f551cf26aa53819d592
configure-options =
--disable-specs
--disable-static
--without-fop
--without-xmlto
--without-xsltproc
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libXext:location}/lib/pkgconfig:${libXext:pkg_config_depends}:${libXi:location}/lib/pkgconfig:${recordproto:location}/lib/pkgconfig
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '1.0.48'
version = '1.0.49.dev0'
name = 'slapos.cookbook'
long_description = open("README.rst").read() + "\n" + \
open("CHANGES.rst").read() + "\n"
......
......@@ -51,29 +51,29 @@ pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.download = 1.0
slapos.recipe.template = 2.8
slapos.toolbox = 0.64
slapos.toolbox = 0.65
smmap = 0.9.0
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
GitPython = 2.0.8
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
atomize = 0.2.0
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
feedparser = 5.2.1
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
lockfile = 0.12.2
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
paramiko = 2.0.1
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
rpdb = 0.1.5
......@@ -13,9 +13,9 @@ ecdsa = 0.13
gitdb = 0.6.4
plone.recipe.command = 1.1
pycrypto = 2.6.1
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 2.8
slapos.toolbox = 0.64
slapos.toolbox = 0.65
smmap = 0.9.0
numpy = 1.11.2
......@@ -34,29 +34,29 @@ erp5.util = 0.4.46
passlib = 1.6.5
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
GitPython = 2.0.8
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
atomize = 0.2.0
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
feedparser = 5.2.1
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
lockfile = 0.12.2
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
paramiko = 2.0.1
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
pycurl = 7.43.0
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
rpdb = 0.1.5
......@@ -117,7 +117,7 @@ output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
gunicorn = 19.1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.4.2
......
......@@ -150,12 +150,10 @@ crl =
{%- endif %}
[apache-logrotate]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
< = logrotate-entry-base
name = apache
log = ${apache-conf-parameter-dict:error-log} ${apache-conf-parameter-dict:access-log}
post = {{ bin_directory }}/slapos-kill --pidfile ${apache-conf-parameter-dict:pid-file} -s USR1
post = test ! -s ${apache-conf-parameter-dict:pid-file} || {{ bin_directory }}/slapos-kill --pidfile ${apache-conf-parameter-dict:pid-file} -s USR1
[publish]
recipe = slapos.cookbook:publish.serialised
......
......@@ -83,5 +83,5 @@ template-logrotate-base = ${template-logrotate-base:rendered}
[template-cloudooo-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudooo.cfg.in
md5sum = 3de0b4732e5132448027c1387a4de3c9
md5sum = e1a4a73aeb8b978e953a3f4f39b98a4d
mode = 640
......@@ -45,7 +45,7 @@
"type": "array"
},
"hostalias-dict": {
"description": "Hostname-to-hostname mapping",
"description": "Hostname-to-domain-name mapping",
"default": {},
"additionalProperties": {
"description": "A hostname to which current entry will resolve",
......
......@@ -70,6 +70,11 @@
"minimum": 0,
"type": "integer"
},
"innodb-buffer-pool-instances": {
"description": "See MariaDB documentation on innodb_buffer_pool_instances",
"minimum": 1,
"type": "integer"
},
"innodb-log-file-size": {
"description": "See MariaDB documentation on innodb_log_file_size",
"minimum": 0,
......
......@@ -33,7 +33,7 @@
},
"properties": {
"host": {
"description": "Host name or address of relay, with optional port (ex: '[example.com]:submissionu'). Enclosing hostname with [] prevents MX lookup.",
"description": "Host name or address of relay, with optional port (ex: '[example.com]:submission'). Enclosing hostname with [] prevents MX lookup.",
"type": "string"
},
"sasl-credential": {
......
......@@ -12,6 +12,7 @@ extends =
../../component/nodejs/buildout.cfg
../../component/openssl/buildout.cfg
../../component/nginx/buildout.cfg
../../component/zlib/buildout.cfg
# for instance
../../component/coreutils/buildout.cfg
......@@ -203,6 +204,7 @@ make-targets= cd ${git2go-repository:location}
&& go install ${git-backup-repository:go.importpath}
&& cp -a ${git-backup-repository:location}/contrib/gitlab-backup ${gopath:bin}
environment =
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
PATH=${cmake:location}/bin:${pkgconfig:location}/bin:${git:location}/bin:${golang16:location}/bin:${buildout:bin-directory}:%(PATH)s
GOPATH=${gopath:directory}
......
......@@ -71,7 +71,7 @@ apache-libcloud = 0.12.3
async = 0.6.1
gitdb = 0.5.4
pycrypto = 2.6
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.40.4
smmap = 0.8.2
......
......@@ -7,6 +7,7 @@ extends =
../../component/scikit-learn/buildout.cfg
../../component/pandas/buildout.cfg
../../component/openssl/buildout.cfg
../../component/seaborn/buildout.cfg
parts =
slapos-cookbook
ipython-notebook
......@@ -22,6 +23,10 @@ eggs +=
${pandas:egg}
${scikit-learn:egg}
${seaborn:egg}
${statsmodels:egg}
patsy
[download-file-base]
recipe = hexagonit.recipe.download
ignore-existing = true
......@@ -43,7 +48,7 @@ md5sum = d7d4a7e19d55bf14007819258bf42100
[erp5-kernel]
<= download-file-base
filename = ERP5kernel.py.jinja
md5sum = 24308ca010532863dbcf501f011f9846
md5sum = cbd35bbe54b66e9b2f73487ecdbc6976
[kernel-json]
<= download-file-base
......
......@@ -215,6 +215,8 @@ class ERP5Kernel(Kernel):
code = code.strip()
extra_data_list = []
print_result = {}
displayhook_result = {}
if code.startswith('%'):
# No need to try-catch here as its already been taken that the code
......@@ -270,12 +272,17 @@ class ERP5Kernel(Kernel):
# "evalue": null,
# "traceback": null,
# "code_result": "",
# "mime_type": "text/plain"
# "print_result": {},
# "displayhook_result": {},
# "mime_type": "text/plain",
# "extra_data_list": []
# }
# So, we can easily use any of the key to update values as such.
# Getting code_result for succesfull execution of code
code_result = content['code_result']
print_result = content['print_result']
displayhook_result = content['displayhook_result']
# Update mime_type with the mime_type from the http response result
# Required in case the mime_type is anything other than 'text/plain'
......@@ -297,21 +304,26 @@ class ERP5Kernel(Kernel):
except ValueError:
content = self.response
code_result = content
print_result = {'data':{'text/plain':content}, 'metadata':{}}
# Display basic error message to frontend in case of error on server side
else:
self.make_erp5_request(code=code)
code_result = "Error at Server Side"
print_result = {'data':{'text/plain':'Error at Server Side'}, 'metadata':{}}
mime_type = 'text/plain'
# For all status_code except allowed_HTTP_response_code_list show unauthorized message
else:
code_result = 'Unauthorized access'
print_result = {'data':{'text/plain':'Unauthorized access'}, 'metadata':{}}
mime_type = 'text/plain'
data = {
'data': {mime_type: code_result},
'metadata': {}}
self.send_response(self.iopub_socket, 'display_data', data)
if print_result.get('data'):
self.send_response(self.iopub_socket, 'display_data', print_result)
if displayhook_result.get('data'):
displayhook_result['execution_count'] = self.execution_count
self.send_response(self.iopub_socket, 'execute_result', displayhook_result)
for extra_data in extra_data_list:
self.send_response(self.iopub_socket, 'display_data', extra_data)
......
......@@ -38,15 +38,6 @@ output = $${directory:bin}/runTestSuite
buildout-directory = $${buildout:directory}
mode = 0700
[firefox-instance]
recipe = slapos.cookbook:firefox
executable = firefox
runner-path = $${directory:bin}/$${:executable}
firefox-path = ${firefox:location}/firefox-slapos
prefsjs-path = $${directory:etc}/prefs.js
shell-path = ${dash:location}/bin/dash
tmp-path = $${xvfb-instance:tmp-path}
[xvfb-instance]
recipe = slapos.cookbook:xvfb
runner-path = $${directory:services}/xvfb
......
......@@ -13,11 +13,9 @@ from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# Put a 'firefox' executable in the path
# otherwise, WebDriver refuses to start
os.environ['PATH'] = '$${directory:bin}' + os.pathsep + os.environ['PATH']
os.environ['TMPDIR'] = '$${xvfb-instance:tmp-path}'
os.environ['DISPLAY'] = ':0'
FIREFOX_EXECUTABLE = '$${firefox-instance:executable}'
BASE_URL = 'http://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/'
def main():
......@@ -91,8 +89,11 @@ def main():
is_appium = False
if args.target == 'firefox':
firefox_binary = webdriver.firefox.firefox_binary.FirefoxBinary(firefox_path=FIREFOX_EXECUTABLE)
browser = webdriver.Firefox(firefox_binary=firefox_binary)
firefox_capabilities = webdriver.common.desired_capabilities.DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
firefox_capabilities['binary'] = '${firefox:location}/firefox-slapos'
browser = webdriver.Firefox(capabilities=firefox_capabilities,
executable_path='${firefox:location}/geckodriver')
elif args.target in ['iOS', 'Android']:
# parameters for mobile emulators have different names then parameters for
# desktop OSes
......
......@@ -25,7 +25,7 @@ parts =
[instance]
recipe = slapos.recipe.template
md5sum = 929a2b6cf6bb16e22e49984563547ca9
md5sum = 7c907db5f803b03a218b49888a3a3799
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
mode = 0644
......@@ -107,7 +107,7 @@ mode = 0644
[template-runTestSuite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/runTestSuite.in
md5sum = ef4118cb653838bf5c875c6fcac1677f
md5sum = fcf15b2a90340e0afe8f8b9921a4ffae
output = ${buildout:directory}/runTestSuite.in
mode = 0644
......
......@@ -40,5 +40,5 @@ output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 2.4.2
......@@ -5,7 +5,7 @@ extends = common.cfg
# XXX - use websockify = 0.5.1 for compatibility with kvm frontend
websockify = 0.5.1
slapos.toolbox = 0.64
slapos.toolbox = 0.65
erp5.util = 0.4.46
apache-libcloud = 1.1.0
collective.recipe.environment = 0.2.0
......
......@@ -44,5 +44,5 @@ output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 2.2
......@@ -22,9 +22,7 @@ port = ${neo-admin:port}
path = ${directory:promises}/neo-admin-promise
[logrotate-admin]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
< = logrotate-entry-base
name = neo-admin
log = ${neo-admin:logfile}
post = {{ bin_directory }}/slapos-kill -n neoadmin -s RTMIN+1 ${:log}
......
......@@ -27,7 +27,7 @@
"type": "string"
},
"sla-dict": {
"description": "[NEO SR only] Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references ('node-0', 'node-1', ...).",
"description": "[NEO SR only] Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references ('node-0', 'node-1', ...). The prefix 'node-' is mandatory and the number must start from 0. The total number of nodes here must be equal to the length of node-list.",
"additionalProperties": {
"type": "array",
"items": { "type": "string" },
......
......@@ -30,9 +30,7 @@ port = ${neo-master:port}
path = ${directory:promises}/neo-master-promise
[logrotate-master]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
< = logrotate-entry-base
name = neo-master
log = ${neo-master:logfile}
post = {{ bin_directory }}/slapos-kill -n neomaster -s RTMIN+1 ${:log}
......@@ -88,11 +88,6 @@ database-adapter = MySQL
wait-database = 60
engine = {{ slapparameter_dict.get('engine', '') }}
[logrotate-storage]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
{% for i in range(slapparameter_dict.get('storage-count', 1)) -%}
{% set storage_id = 'neo-storage-' ~ i -%}
[{{ section(storage_id) }}]
......@@ -103,7 +98,7 @@ logfile = ${directory:log}/{{ 'neostorage-' ~ i }}.log
database-parameters = root@neo{{ i }}${my-cnf-parameters:socket}
[{{ section('logrotate-storage-' ~ i) }}]
< = logrotate-storage
< = logrotate-entry-base
name = {{ storage_id }}
log = {{ '${' + storage_id + ':logfile}' }}
post = {{ bin_directory }}/slapos-kill -n neostorage -s RTMIN+1 ${:log}
......@@ -129,9 +124,7 @@ log = ${buildout:directory}/var/log
tmp = ${buildout:directory}/tmp
[logrotate-mysql]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
< = logrotate-entry-base
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = ${mysqld:mysql-base-directory}/bin/mysql --defaults-file="${my-cnf:rendered}" -e "FLUSH LOGS"
......
......@@ -47,10 +47,6 @@ eggs = neoppod[admin, ctl, master, storage-mysqldb]
ZODB
zope.testing
zodbtools
patch-binary = ${patch:location}/bin/patch
ZODB-patch-options = -p1
ZODB-patches =
${:_profile_base_location_}/../../component/egg-patch/ZODB4-pr136.patch
[slapos-deps-eggs]
recipe = zc.recipe.egg
......@@ -93,15 +89,15 @@ md5sum = f3259726bd5d824c569dc7db6b7d26a0
[instance-neo-admin]
<= download-base-neo
md5sum = ec1e2d9d2a1da092621f1b01ce6af322
md5sum = d5eb14e3d83d7787950de913d7e29aad
[instance-neo-master]
<= download-base-neo
md5sum = 82f3f76f54ee9db355966a7ada61f56e
md5sum = c6e0db7344a26a55580102e3cc33c984
[instance-neo-storage-mysql]
<= download-base-neo
md5sum = cd2a978a09c5686205592923866f6584
md5sum = 22206396eff084af3e0587494a012174
[template-neo-my-cnf]
<= download-base-neo
......@@ -109,28 +105,28 @@ url = ${:_profile_base_location_}/my.cnf.in
md5sum = cfdd59d42ae540563a964ccaf8fec232
[versions]
slapos.recipe.template = 2.10
ZODB = 4.4.4+SlapOSPatched001
BTrees = 4.3.1
BTrees = 4.4.1
ZODB = 4.4.5
persistent = 4.2.2
slapos.recipe.template = 2.10
transaction = 1.7.0
zdaemon = 4.1.0
zodbpickle = 0.6.0
zodbtools = 0.0.0.dev3
# Required by slapos.toolbox = 0.64
slapos.toolbox = 0.64
# Required by slapos.toolbox = 0.65
slapos.toolbox = 0.65
GitPython = 2.1.1
PyRSS2Gen = 1.1
apache-libcloud = 1.5.0
atomize = 0.2.0
dnspython = 1.14.0
ecdsa = 0.13
feedparser = 5.2.1
GitPython = 2.1.1
gitdb2 = 2.0.0
lockfile = 0.12.2
mysqlclient = 1.3.9
paramiko = 2.1.1
passlib = 1.6.5
passlib = 1.7.1
pycrypto = 2.6.1
pycurl = 7.43.0
smmap2 = 2.0.1
[buildout]
extends = software.cfg
[neoppod]
ZODB-patches =
[versions]
ZODB = 5.1.1
transaction = 2.0.3
[buildout]
parts =
cron-entry-logrotate
[cron]
recipe = slapos.cookbook:cron
cron-entries = ${logrotate-directory:cron-entries}
dcrond-binary = {{ dcron_location }}/sbin/crond
crontabs = ${logrotate-directory:crontabs}
cronstamps = ${logrotate-directory:cronstamps}
catcher = ${cron-simplelogger:wrapper}
binary = ${logrotate-directory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = ${logrotate-directory:bin}/cron_simplelogger
log = ${logrotate-directory:log}/cron.log
[logrotate]
recipe = slapos.cookbook:logrotate
logrotate-entries = ${logrotate-directory:logrotate-entries}
backup = ${logrotate-directory:logrotate-backup}
logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
gzip-binary = {{ gzip_location }}/bin/gzip
gunzip-binary = {{ gzip_location }}/bin/gunzip
wrapper = ${logrotate-directory:bin}/logrotate
conf = ${logrotate-directory:etc}/logrotate.conf
state-file = ${logrotate-directory:srv}/logrotate.status
[cron-entry-logrotate]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
[logrotate-directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = ${:etc}/cron.d
cronstamps = ${:etc}/cronstamps
crontabs = ${:etc}/crontabs
logrotate-backup = ${:backup}/logrotate
logrotate-entries = ${:etc}/logrotate.d
bin = ${buildout:directory}/bin
srv = ${buildout:directory}/srv
backup = ${:srv}/backup
etc = ${buildout:directory}/etc
services = ${:etc}/service
log = ${buildout:directory}/var/log
......@@ -102,12 +102,7 @@ context =
< = logrotate-entry-base
name = apache
log = ${apache-conf:error-log} ${apache-conf:access-log}
post = {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${apache-conf:pid-file} -s USR1
[logrotate-entry-base]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
post = test ! -s ${apache-conf:pid-file} || {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${apache-conf:pid-file} -s USR1
[re6st-registry-conf-dict]
port = 9201
......@@ -197,7 +192,7 @@ command = {{ python_bin }} ${re6st-registry:drop-service-wrapper}
< = logrotate-entry-base
name = re6stnet
log = ${re6st-registry-conf-dict:logfile}
post = {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${re6st-registry:pid-file} -s USR1
post = test ! -s ${re6st-registry:pid-file} || {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${re6st-registry:pid-file} -s USR1
[re6st-registry-promise]
recipe = slapos.cookbook:check_port_listening
......
......@@ -75,7 +75,6 @@ md5sum = 84387d5af13561447c1170704a2076a6
extra-context =
key apache_location apache:location
key dash_location dash:location
key logrotate_location logrotate:location
key openssl_location openssl:location
key template_apache_conf template-apache-conf:target
key template_re6stnet template-re6stnet:target
......@@ -88,16 +87,7 @@ extra-context =
[template-re6stnet]
< = download-base
filename = instance-re6stnet.cfg.in
md5sum = 050efe586eb78c0b4f0cc9ba33389675
[template-logrotate-base]
< = template-jinja2-base
filename = instance-logrotate-base.cfg
md5sum = f28fbd310944f321ccb34b2a34c82005
extra-context =
key dcron_location dcron:location
key gzip_location gzip:location
key logrotate_location logrotate:location
md5sum = 6e9452d283e82e2f512a9f9edb17fe3a
[template-apache-conf]
< = download-base
......@@ -125,15 +115,15 @@ plone.recipe.command = 1.1
pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.template = 2.7
slapos.toolbox = 0.64
slapos.toolbox = 0.65
smmap = 0.9.0
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
GitPython = 2.0.8
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
atomize = 0.2.0
# Required by:
......@@ -141,11 +131,11 @@ atomize = 0.2.0
backports.ssl-match-hostname = 3.4.0.2
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
feedparser = 5.1.3
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
lockfile = 0.12.2
# Required by:
......@@ -153,10 +143,10 @@ lockfile = 0.12.2
miniupnpc = 1.9
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
paramiko = 2.0.1
# Required by:
# slapos.toolbox = 0.64
# slapos.toolbox = 0.65
rpdb = 0.1.5
......@@ -46,7 +46,7 @@ context =
raw dropbearkey_executable ${dropbear:location}/bin/dropbearkey
raw gzip_executable ${gzip:location}/bin/gzip
raw gunzip_executable ${gzip:location}/bin/gunzip
raw logrotate_executable ${logrotate:location}/sbin/logrotate
raw logrotate_executable ${logrotate:location}/usr/sbin/logrotate
raw slapos_configuration_file_template_path ${slapos-configuration-file-template:target}
raw httpd_configuration_file_template_path ${httpd-configuration-file-template:target}
......
......@@ -17,7 +17,7 @@ gunicorn = 19.4.5
prettytable = 0.7.2
pycurl = 7.43.0
slapos.recipe.template = 2.9
slapos.toolbox = 0.64
slapos.toolbox = 0.65
smmap = 0.9.0
# Required by:
......
{% set tcpv4_port = slapparameter_dict.get('tcpv4_port', 6001) -%}
{% set ip = (ipv4_set | list)[0] %}
[buildout]
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
parts =
publish-varnish-connection-information
varnish-instance
......@@ -46,10 +49,6 @@ notifempty = true
create = true
{%- endif %}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-varnish-connection-information]
recipe = slapos.cookbook:publish.serialised
url = http://${varnish-instance:ip}:${varnish-instance:server-port}/
......
[buildout]
# Local development
develop =
${:parts-directory}/slapos.cookbook-repository
extends =
../../stack/slapos.cfg
../../component/dash/buildout.cfg
......@@ -18,32 +14,15 @@ extends =
../../component/wget/buildout.cfg
parts =
slapos-cookbook
dash
dcron
gcc-minimal
slapos-toolbox
stunnel
varnish-3.0
wget
# Local development
slapos.cookbook-repository
check-recipe
# Create instance template
template
# Local development
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/slapos.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[template-jinja2-base]
recipe = slapos.recipe.template:jinja2
mode = 640
......@@ -79,29 +58,8 @@ extra-context =
[template-varnish]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-varnish.cfg.in
md5sum = 4334d900f212d170fd0ca35865879bdf
md5sum = 0ea12a4ad2d2e3d406476e35b8d3e3fb
mode = 640
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
erp5.util
pytz
lock_file
inotifyx
scripts =
web_checker_utility = erp5.util.webchecker:web_checker_utility
[slapos-toolbox]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${pycurl:egg}
slapos.toolbox
scripts =
killpidfromfile
[versions]
erp5.util = 0.4.41
slapos.toolbox = 0.40.4
slapos.recipe.template = 2.9
[buildout]
extends =
../../component/keras/buildout.cfg
software.cfg
parts +=
keras-egg
[eggs]
eggs +=
${tensorflow-build-install-egg:egg}
${protobuf-python:egg}
${h5py:egg}
${pillow-python:egg}
Keras
[bazel]
# For Debian 8 users
# Add jessie-backports to /etc/apt/sources.list
# deb http://ftp.jp.debian.org/debian jessie-backports main
# Then install jdk
# apt-get update
# apt-get -t jessie-backports install openjdk-8-jdk
java_home = /usr/lib/jvm/java-8-openjdk-amd64
[cuda]
# If you use cuda, please adjust paramters for your environment
# else ignore this part.
# https://developer.nvidia.com/cuda-gpus
tf_need_cuda = 1
tf_cuda_version = 8.0
tf_cudnn_version = 6.5
tf_cuda_compute_capabilities = 5.2,6.1
cuda_toolkit_path = /usr/local/cuda
cudnn_install_path = /usr/local/cuda
[versions]
mock = 2.0.0
funcsigs = 1.0.2
......@@ -88,7 +88,7 @@ Paste = 2.0.2
PasteScript = 2.0.2
WSGIUtils = 0.7
python-magic = 0.4.6
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 2.8
# Required by:
......
[buildout]
extends =
# Exact version of Zope
ztk-versions.cfg
zope-versions.cfg
buildout.hash.cfg
../../component/cups/buildout.cfg
../../component/dbus/buildout.cfg
../../component/file/buildout.cfg
......@@ -150,15 +152,11 @@ update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[mariadb-resiliency-after-import-script]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/template/instance-mariadb-resiliency-after-import-script.sh.in
md5sum = 79109ae720d5471cb2dd15e63fdf4dcf
<= download-base
mode = 755
[template-mariadb]
<= download-base
filename = instance-mariadb.cfg.in
md5sum = 9312af2f9d9faf06d2f26f073ad60180
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
......@@ -173,70 +171,45 @@ link-binary =
[template-kumofs]
<= download-base
filename = instance-kumofs.cfg.in
md5sum = 763db0c4a94649296e74fe1f53c03940
[template-cloudooo]
<= download-base
filename = instance-cloudoo.cfg.in
md5sum = c553bbcdc5f80d893907a05acefc1356
[template-zope-conf]
<= download-base
filename = zope.conf.in
md5sum = 77ab4f229a92e02603028a0bd3772edd
[site-zcml]
<= download-base
filename = site.zcml
md5sum = d32417746fcf671d4e86a70379815039
[template-my-cnf]
<= download-base
filename = my.cnf.in
md5sum = d50920c942b8ee98402f8551fef38383
[template-mariadb-initial-setup]
<= download-base
filename = mariadb_initial_setup.sql.in
md5sum = 6465212fdc7fe9076a0c929d9f14da14
[template-create-erp5-site]
<= download-base
filename = instance-create-erp5-site.cfg.in
md5sum = 71cef1d06065951ab4cf43eb13f311a3
[template-create-erp5-site-real]
<= download-base
filename = instance-create-erp5-site-real.cfg.in
md5sum = 79f789360e71146486c82a7a10834bae
[template-postfix]
< = download-base
filename = instance-postfix.cfg.in
md5sum = 90a017581116f14014a039d38ef36ffd
[template-postfix-master-cf]
< = download-base
filename = postfix_master.cf.in
md5sum = 9ac81647368068a1a98a785d08074b43
[template-postfix-main-cf]
< = download-base
filename = postfix_main.cf.in
md5sum = d51897728755e14d8005344608098009
[template-postfix-aliases]
< = download-base
filename = postfix_aliases.in
md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template]
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = ec143441fac42ce6b3a183724298bc6b
template = ${:_profile_base_location_}/${:filename}
mode = 640
context =
key mariadb_link_binary template-mariadb:link-binary
......@@ -330,26 +303,18 @@ context =
[monitor-template-dummy]
<= download-base
# This is a placeholder, to be overriden by extending monitor SR
filename = dummy.cfg
md5sum = d41d8cd98f00b204e9800998ecf8427e
[monitor-template]
rendered = ${monitor-template-dummy:target}
[template-erp5]
<= download-base
filename = instance-erp5.cfg.in
md5sum = b5f49c90017684aa3389ef3f97ece509
[template-zeo]
<= download-base
filename = instance-zeo.cfg.in
md5sum = 84aba4fa10d3087fbcc1d979df90fab9
[template-zope]
<= download-base
filename = instance-zope.cfg.in
md5sum = e65672c423d603e5fa516ad811cc1fa9
link-binary =
${aspell:location}/bin/aspell
${dmtx-utils:location}/bin/dmtxwrite
......@@ -372,13 +337,9 @@ link-binary =
[template-balancer]
<= download-base
filename = instance-balancer.cfg.in
md5sum = 049d4153990374dc130403c04accaf13
[template-haproxy-cfg]
<= download-base
filename = haproxy.cfg.in
md5sum = 3defd473e2cea17ae36bba7752494858
[bt5-repository]
# Format:
......@@ -559,7 +520,6 @@ eggs = ${neoppod:eggs}
Products.ExternalEditor
Products.TIDStorage
Products.LongRequestLogger
Products.PloneHotfix20160830
# BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF
# (for tests like testCookieCrumbler).
......@@ -572,6 +532,8 @@ eggs = ${neoppod:eggs}
# Needed for parsing .po files from our Localizer subset
polib
# Needed for Google OAuth
google-api-python-client
# Used by ERP5 Jupyter backend
ipykernel
......@@ -633,12 +595,15 @@ scripts +=
Acquisition = 2.13.9+SlapOSPatched001
Products.DCWorkflow = 2.2.4+SlapOSPatched001
pysvn = 1.7.10+SlapOSPatched002
python-ldap = 2.4.28+SlapOSPatched001
python-ldap = 2.4.29+SlapOSPatched001
python-magic = 0.4.12+SlapOSPatched001
# specify dev version to be sure that an old released version is not used
cloudooo = 1.2.5-dev
uritemplate = 3.0.0
google-api-python-client = 1.6.1
# use newer version than specified in ZTK
PasteDeploy = 1.5.2
Pygments = 2.1.3
......@@ -650,7 +615,7 @@ zope.dottedname = 4.1.0
Products.PluggableAuthService = 1.9.0
# we are still using this old stable version.
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
# use newest version of slapos.cookbook
slapos.cookbook =
......@@ -684,7 +649,6 @@ Products.GenericSetup = 1.8.6
Products.LongRequestLogger = 2.0.0
# Products.MimetypesRegistry 2.1 requires AccessControl>=3.0.0Acquisition.
Products.MimetypesRegistry = 2.0.10
Products.PloneHotfix20160830 = 1.3
Products.PluginRegistry = 1.4
Products.TIDStorage = 5.4.9
PyPDF2 = 1.26.0
......@@ -696,7 +660,7 @@ WSGIUtils = 0.7
# ZEO 5 requires transaction >= 2
ZEO = 4.3.1
ZODB3 = 3.11.0
Zope2 = 2.13.24
Zope2 = 2.13.25
astor = 0.5
# astroid 1.4.1 breaks testDynamicClassGeneration
astroid = 1.3.8
......@@ -714,26 +678,27 @@ http-parser = 0.8.3
httplib2 = 0.9.2
huBarcode = 1.0.0
interval = 1.0.0
ipdb = 0.10.1
ipdb = 0.10.2
ipykernel = 4.5.2
ipython = 5.1.0
ipython = 5.2.1
ipython-genutils = 0.1.0
ipywidgets = 5.2.2
logilab-common = 1.3.0
matplotlib = 2.0.0
mistune = 0.7.3
msgpack-python = 0.4.8
notebook = 4.3.1
numpy = 1.11.3
notebook = 4.3.2
nt-svcutils = 2.13.0
numpy = 1.12.0
objgraph = 3.1.0
pandas = 0.19.2
ply = 3.9
ply = 3.10
polib = 1.0.8
pprofile = 1.10.0
prompt-toolkit = 1.0.9
prompt-toolkit = 1.0.10
ptyprocess = 0.5.1
pycountry = 17.1.8
pyflakes = 1.3.0
pyflakes = 1.5.0
# pylint 1.5.1 breaks testDynamicClassGeneration
pylint = 1.4.4
python-memcached = 1.58
......@@ -745,8 +710,6 @@ rtjp-eventlet = 0.3.2
scikit-learn = 0.18.1
scipy = 0.18.1
simplegeneric = 0.8.1
slapos.recipe.template = 2.9
slapos.toolbox = 0.64
socketpool = 0.5.3
spyne = 2.12.14
suds = 0.4
......@@ -772,7 +735,7 @@ backports.ssl-match-hostname = 3.5.0.1
# Required by:
# tornado==4.4.2
certifi = 2016.9.26
certifi = 2017.1.23
# Required by:
# eventlet==0.20.1
......@@ -787,13 +750,13 @@ fpconst = 0.7.2
graphviz = 0.5.2
# Required by:
# notebook==4.3.1
# notebook==4.3.2
# nbconvert 4.2.0 depends on entrypoints egg that is not available as tar/zip source.
nbconvert = 4.1.0
# Required by:
# nbconvert==4.1.0
# notebook==4.3.1
# notebook==4.3.2
nbformat = 4.2.0
# Required by:
......@@ -801,15 +764,15 @@ nbformat = 4.2.0
olefile = 0.44
# Required by:
# ipython==5.1.0
pathlib2 = 2.1.0
# ipython==5.2.1
pathlib2 = 2.2.1
# Required by:
# ipython==5.1.0
# ipython==5.2.1
pexpect = 4.2.1
# Required by:
# ipython==5.1.0
# ipython==5.2.1
pickleshare = 0.7.4
# Required by:
......@@ -817,6 +780,10 @@ pickleshare = 0.7.4
# pandas==0.19.2
python-dateutil = 2.6.0
# Required by:
# pathlib2==2.2.1
scandir = 1.4
# Required by:
# tornado==4.4.2
singledispatch = 3.4.0.3
......@@ -826,7 +793,7 @@ singledispatch = 3.4.0.3
subprocess32 = 3.2.7
# Required by:
# prompt-toolkit==1.0.9
# prompt-toolkit==1.0.10
wcwidth = 0.1.7
# Required by:
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# But avoid directories, they are not portable.
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[mariadb-resiliency-after-import-script]
filename = instance-mariadb-resiliency-after-import-script.sh.in
md5sum = 394109d9373f4375d5e1599d5d1500ac
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 11e7faca5233868c1643854e4c898588
[template-kumofs]
filename = instance-kumofs.cfg.in
md5sum = 42d2a2c7cb5bf5122b6cfd8f53a5576f
[template-cloudooo]
filename = instance-cloudoo.cfg.in
md5sum = c553bbcdc5f80d893907a05acefc1356
[template-zope-conf]
filename = zope.conf.in
md5sum = 77ab4f229a92e02603028a0bd3772edd
[site-zcml]
filename = site.zcml
md5sum = d32417746fcf671d4e86a70379815039
[template-my-cnf]
filename = my.cnf.in
md5sum = d814b984abf2dc444af2a0bc6287e7f5
[template-mariadb-initial-setup]
filename = mariadb_initial_setup.sql.in
md5sum = 6465212fdc7fe9076a0c929d9f14da14
[template-create-erp5-site]
filename = instance-create-erp5-site.cfg.in
md5sum = 1186c5804bdc679d8a31ac70cd85d51f
[template-create-erp5-site-real]
filename = instance-create-erp5-site-real.cfg.in
md5sum = 79f789360e71146486c82a7a10834bae
[template-postfix]
filename = instance-postfix.cfg.in
md5sum = 2fd9ec619456fd00e7482cebc5c41f76
[template-postfix-master-cf]
filename = postfix_master.cf.in
md5sum = 9ac81647368068a1a98a785d08074b43
[template-postfix-main-cf]
filename = postfix_main.cf.in
md5sum = 66b273861888c8bd59e46de399d2c1d8
[template-postfix-aliases]
filename = postfix_aliases.in
md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template]
filename = instance.cfg.in
md5sum = 9d6c7b1a17cf2a5987e8c9f4c9239736
[monitor-template-dummy]
filename = dummy.cfg
md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = b5f49c90017684aa3389ef3f97ece509
[template-zeo]
filename = instance-zeo.cfg.in
md5sum = 7610bafda245c008ccf0b6ea58ce21c2
[template-zope]
filename = instance-zope.cfg.in
md5sum = 5e7145e8fa17046581b66e9690bf5186
[template-balancer]
filename = instance-balancer.cfg.in
md5sum = d71c49f91b3455e6866f4b2db591009f
[template-haproxy-cfg]
filename = haproxy.cfg.in
md5sum = 3defd473e2cea17ae36bba7752494858
......@@ -16,8 +16,12 @@ per partition. No more (undefined result), no less (IndexError).
{% do apache_ip_list.append('[' ~ ipv6 ~ ']') -%}
{% endif -%}
[simplefile]
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
[simplefile]
< = jinja2-template-base
template = inline:{{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%}
......@@ -95,7 +99,7 @@ backend-dict = {{ dumps(haproxy_dict) }}
ip = {{ ipv4 }}
[haproxy-cfg]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
template = {{ parameter_dict['template-haproxy-cfg'] }}
rendered = ${directory:etc}/haproxy.cfg
context = section parameter_dict haproxy-cfg-parameter-dict
......@@ -132,7 +136,7 @@ ca-cert = ${apache-ssl-client:cert}
crl = ${apache-ssl-client:crl}
[apache-conf]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
template = {{ parameter_dict['template-apache-conf'] }}
rendered = ${directory:apache-conf}/apache.conf
context = section parameter_dict apache-conf-parameter-dict
......@@ -181,12 +185,10 @@ crl =
{%- endif %}
[logrotate-apache]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
< = logrotate-entry-base
name = apache
log = ${apache-conf-parameter-dict:error-log} ${apache-conf-parameter-dict:access-log}
post = {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${apache-conf-parameter-dict:pid-file} -s USR1
post = test ! -s ${apache-conf-parameter-dict:pid-file} || {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${apache-conf-parameter-dict:pid-file} -s USR1
[directory]
recipe = slapos.cookbook:mkdirectory
......
......@@ -14,6 +14,7 @@ recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-create-erp5-site-real'] }}
rendered = ${buildout:directory}/instance-create-erp5-site-real.cfg
extensions = jinja2.ext.do
mode = 644
context =
import urlparse urlparse
section publish publish
......
......@@ -63,9 +63,7 @@ kumo-server-binary = {{ parameter_dict['kumo-location'] }}/bin/kumo-server
shell-path = {{ parameter_dict['dash-location'] }}/bin/dash
[logrotate-entry-kumofs]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
< = logrotate-entry-base
name = kumofs
log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log} ${kumofs-instance:kumo-server-log}
......
......@@ -12,17 +12,18 @@
set -e
mysql_executable="${binary-wrap-mysql:wrapper-path}"
mysqldump_executable="${binary-wrap-mysqldump:wrapper-path}"
mariadb_data_directory="${directory:mariadb-data}"
mariadb_backup_directory="${directory:mariadb-backup-full}"
instance_directory="${buildout:directory}"
pid_file="${my-cnf-parameters:pid-file}"
binlog_path="${my-cnf-parameters:binlog-path}"
mysql_executable='${binary-wrap-mysql:wrapper-path}'
mariadb_data_directory='${directory:mariadb-data}'
mariadb_backup_directory='${directory:mariadb-backup-full}'
instance_directory='${buildout:directory}'
pid_file='${my-cnf-parameters:pid-file}'
binlog_path='${my-cnf-parameters:binlog-path}'
server_executable='${mysqld:rendered}'
update_executable='${update-mysql:output}'
# Make sure mariadb is not already running
if [ -e "$pid_file" ]; then
pid=$(cat $pid_file) > /dev/null 2>&1
pid=$(cat "$pid_file") > /dev/null 2>&1
if kill -0 "$pid"; then
echo "Mariadb is already running with pid $pid. Aborting."
exit 1
......@@ -30,11 +31,11 @@ if [ -e "$pid_file" ]; then
fi
echo "Deleting existing database..."
rm -r $mariadb_data_directory/* >/dev/null 2>&1 || true
rm -r "$mariadb_data_directory"/* >/dev/null 2>&1 || true
# $binlog_path can be empty if incremental_backup_retention_days <= -1
if [ -n "$binlog_path" ]; then
new_binlog_directory="$(dirname $binlog_path)"
new_binlog_directory="$(dirname "$binlog_path")"
binlog_index_file="$new_binlog_directory/binlog.index"
if [ -e "$binlog_index_file" ]; then
echo "Adapting binlog database to new paths..."
......@@ -45,7 +46,7 @@ fi
echo "Starting mariadb..."
# XXX hardcoded
$instance_directory/etc/run/mariadb &
"$server_executable" --innodb-flush-method=nosync --skip-innodb-doublewrite &
mysqld_pid=$!
trap "kill $mysqld_pid" EXIT TERM INT
sleep 30
......@@ -54,7 +55,7 @@ if ! [ -d /proc/$mysql_pid ]; then
echo "mysqld exited, aborting."
exit 1
fi
$instance_directory/etc/run/mariadb_update &
"$update_executable" &
mariadb_update_pid=$!
sleep 60
# If mariadb_update is still running, abort
......@@ -66,7 +67,7 @@ fi
echo "Importing data..."
# Use latest dump XXX can contain funny characters
dump=$(ls -r $mariadb_backup_directory | head -1)
dump=$(ls -r "$mariadb_backup_directory" | head -1)
zcat "$mariadb_backup_directory/$dump" | $mysql_executable -u root --socket="$instance_directory/var/run/mariadb.sock"
RESTORE_EXIT_CODE=$?
......
......@@ -33,8 +33,16 @@ recipe = slapos.cookbook:publish.serialised
database-list = {{ render_database_list(database_list) }}
test-database-list = {{ render_database_list(test_database_list) }}
[simplefile]
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
[jinja2-template-executable]
< = jinja2-template-base
mode = 755
[simplefile]
< = jinja2-template-base
template = inline:{{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%}
......@@ -108,6 +116,7 @@ error-log = ${directory:log}/mariadb_error.log
slow-query-log = ${directory:log}/mariadb_slowquery.log
long-query-time = {{ dumps(slapparameter_dict.get('long-query-time', 1)) }}
innodb-buffer-pool-size = {{ dumps(slapparameter_dict.get('innodb-buffer-pool-size', 0)) }}
innodb-buffer-pool-instances = {{ dumps(slapparameter_dict.get('innodb-buffer-pool-instances', 0)) }}
innodb-log-file-size = {{ dumps(slapparameter_dict.get('innodb-log-file-size', 0)) }}
innodb-log-buffer-size = {{ dumps(slapparameter_dict.get('innodb-log-buffer-size', 0)) }}
relaxed-writes = {{ dumps(slapparameter_dict.get('relaxed-writes', False)) }}
......@@ -124,7 +133,7 @@ ssl-{{ key }} = {{ value }}
{% endfor %}
[my-cnf]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:etc}/mariadb.cnf
template = {{ parameter_dict['template-my-cnf'] }}
context = section parameter_dict my-cnf-parameters
......@@ -133,7 +142,7 @@ context = section parameter_dict my-cnf-parameters
database-list = {{ dumps(database_list + test_database_list) }}
[init-script]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-executable
# XXX: is there a better location ?
rendered = ${directory:etc}/mariadb_initial_setup.sql
template = {{ parameter_dict['template-mariadb-initial-setup'] }}
......@@ -147,19 +156,25 @@ mysql = ${binary-wrap-mysql:wrapper-path}
init-script = ${init-script:rendered}
mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path}
[mysqld]
recipe = slapos.cookbook:generic.mysql.wrap_mysqld
output = ${directory:services}/mariadb
binary = {{ parameter_dict['mariadb-location'] }}/bin/mysqld
configuration-file = ${my-cnf:rendered}
data-directory = ${my-cnf-parameters:data-directory}
mysql-install-binary = {{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db
mysql-base-directory = {{ parameter_dict['mariadb-location'] }}
[{{ section('mysqld') }}]
< = jinja2-template-executable
# Note: all rendering is done when this file is rendered, not when the mysqld
# section is installed - so I only use jinja2 as a fancy way to write an
# executable file with partition-dependent but instance-parameters independent
# content.
template = inline:#!{{ parameter_dict['dash-location'] }}/bin/dash
'{{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db' \
--defaults-file='${my-cnf:rendered}' \
--skip-name-resolve \
--datadir='${my-cnf-parameters:data-directory}' \
--basedir='{{ parameter_dict['mariadb-location'] }}' \
&& exec '{{ parameter_dict['mariadb-location'] }}/bin/mysqld' \
--defaults-file='${my-cnf:rendered}' \
"$@"
rendered = ${directory:services}/mariadb
[logrotate-entry-mariadb]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
< = logrotate-entry-base
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = "${binary-wrap-mysql:wrapper-path}" -B -u root -e "FLUSH LOGS"
......@@ -249,7 +264,6 @@ parts +=
logrotate-entry-mariadb
binary-link
update-mysql
mysqld
resiliency-exclude-file
resiliency-after-import-script
promise
......
......@@ -13,6 +13,10 @@
{% set smtpd_sasl_user = slapparameter_dict['smtpd-sasl-user'] -%}
{% set smtpd_sasl_password = slapparameter_dict['smtpd-sasl-password'] -%}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
[smtpd-password]
recipe = slapos.cookbook:generate.password
storage-path =
......@@ -64,7 +68,7 @@ cyrus-sasldb = ${directory:etc-cyrus}/postfix.gdbm
recipe = slapos.cookbook:userinfo
[smtp-sasl-passwd]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:etc-postfix}/sasl_passwd
{% if relay -%}
template = inline:{{ "{{ host }} {{ sasl_credential }}" }}
......@@ -77,7 +81,7 @@ context =
mode = 600
[{{ section('cyrus-smtpd-conf') }}]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:etc-cyrus}/smtpd.conf
template = inline:
pwcheck_method: auxprop
......@@ -95,7 +99,7 @@ command =
update-command = ${:command}
[divert]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:etc-postfix}/divert
{% if divert -%}
template = inline:{{ "/.*/ {{ ', '.join(divert) }}" }}
......@@ -121,7 +125,7 @@ update =
${:openssl} req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}'
[{{ section('postfix-main-cf') }}]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:etc-postfix}/main.cf
template = {{ parameter_dict['template-postfix-main-cf'] }}
context =
......@@ -144,13 +148,13 @@ context =
key dh_2048 smtpd-ssl:dh-2048
[{{ section('postfix-master-cf') }}]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:etc-postfix}/master.cf
template = {{ parameter_dict['template-postfix-master-cf'] }}
context = key smtp configuration:smtp
[aliases]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
template = {{ parameter_dict['template-postfix-aliases'] }}
rendered = ${directory:etc-postfix}/aliases
context =
......
......@@ -8,11 +8,6 @@
{% set default_backup_path = buildout_directory ~ '/srv/backup/zodb' -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
[logrotate-base]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
[zeo-base]
recipe = slapos.cookbook:zeo
log-path = ${directory:log}/${:base-name}.log
......@@ -53,10 +48,10 @@ port = {{ current_port }}
storage = {{ dumps(storage_list) }}
[{{ section("logrotate-" ~ zeo_section_name) }}]
< = logrotate-base
< = logrotate-entry-base
name = {{ "${" ~ zeo_section_name ~ ":base-name}" }}
log = {{ "${" ~ zeo_section_name ~ ":log-path}" }}
post = {{ bin_directory }}/slapos-kill --pidfile {{ "${" ~ zeo_section_name ~ ":pid-path}" }} -s USR2
post = test ! -s {{ "${" ~ zeo_section_name ~":pid-path}" }} || {{ bin_directory }}/slapos-kill --pidfile {{ "${" ~ zeo_section_name ~ ":pid-path}" }} -s USR2
[{{ section(zeo_section_name ~ "-promise") }}]
recipe = slapos.cookbook:check_port_listening
......
......@@ -2,7 +2,9 @@
{% set next_port = itertools.count(slapparameter_dict['port-base']).next -%}
{% set site_id = slapparameter_dict['site-id'] -%}
{% set zodb_dict = slapparameter_dict['zodb-dict'] -%}
{% set instance_index_list = range(slapparameter_dict['instance-count']) -%}
{% set node_id_base = slapparameter_dict['name'] -%}
{% set node_id_index_format = '-%%0%ii' % (len(str(instance_index_list[-1])), ) -%}
{% set part_list = [] -%}
{% set publish_list = [] -%}
{% set longrequest_logger_base_path = buildout_directory ~ '/var/log/longrequest_logger_' -%}
......@@ -14,6 +16,10 @@ partition. No more (undefined result), no less (IndexError).
-#}
{% set ipv4 = (ipv4_set | list)[0] -%}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
{% if slapparameter_dict['mysql-test-url-list'] -%}
[{{ section('test-runner') }}]
recipe = slapos.cookbook:erp5.test
......@@ -143,7 +149,7 @@ hostalias-dict = {{ dumps(slapparameter_dict['hostalias-dict']) }}
# ...so it's not possible to merge these templates (not a big deal anyway).
[hostaliases]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
template = inline: {{ '
{% for alias, aliased in host_dict.items() -%}
{{ alias }} {{ aliased }}
......@@ -153,7 +159,7 @@ rendered = ${directory:etc}/hostaliases
context = key host_dict hosts-parameter:hostalias-dict
[hosts]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
template = inline: {{ '
{% for alias, aliased in host_dict.items() -%}
{{ aliased }} {{ alias }}
......@@ -171,7 +177,7 @@ context = key host_dict hosts-parameter:host-dict
('_key', 'neo.key')) -%}
{% if k in storage_dict -%}
[{{ section('neo-ssl-' + k[1:]) }}]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:etc}/{{v}}
template = inline:{{'{{'}}pem}}
context = key pem :pem
......@@ -204,7 +210,7 @@ target-directory = ${directory:instance-etc}
file-list = {{ parameter_dict['site-zcml'] }}
[{{ section('zope-inituser') }}]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
rendered = ${directory:instance}/inituser
template = inline:{{ slapparameter_dict['inituser-login'] }}:{SHA}{{ hashlib.sha1(slapparameter_dict['inituser-password']).digest().encode('base64').rstrip() }}
mode = 600
......@@ -253,14 +259,9 @@ webdav = {{ dumps(webdav) }}
timerserver-interval = {{ dumps(timerserver_interval) }}
[zope-conf-base]
recipe = slapos.recipe.template:jinja2
< = jinja2-template-base
template = {{ parameter_dict['zope-conf-template'] }}
[logrotate-entry-base]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
{% macro zope(
index,
port,
......@@ -279,7 +280,7 @@ lock-file = ${directory:run}/{{ name }}.lock
port = {{ port }}
event-log = ${directory:log}/{{ name }}-event.log
z2-log = ${directory:log}/{{ name }}-Z2.log
node-id = {{ dumps(node_id_base ~ '-' ~ index) }}
node-id = {{ dumps(node_id_base ~ (node_id_index_format % index)) }}
{% set log_list = [] -%}
{% set import_set = set() -%}
{% for db_name, zodb in zodb_dict.iteritems() -%}
......@@ -352,10 +353,10 @@ path = ${directory:promises}/{{ zope_tunnel_base_name }}
< = logrotate-entry-base
name = {{ name }}
log = {{ '${' ~ conf_parameter_name ~ ':event-log}' }} {{ '${' ~ conf_parameter_name ~ ':z2-log}' }} {{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }} {{ ' '.join(log_list) }}
post = {{ bin_directory }}/slapos-kill --pidfile {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} -s USR2
post = test ! -s {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} || {{ bin_directory }}/slapos-kill --pidfile {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} -s USR2
{% endmacro -%}
{% for i in range(slapparameter_dict['instance-count']) -%}
{% for i in instance_index_list -%}
{{ zope(
i,
next_port(),
......
......@@ -4,6 +4,7 @@ extends = {{ instance_common_cfg }}
[jinja2-template-base]
context +=
raw slapos_core_version {{ slapos_core_version }}
mode = 644
[dynamic-template-cloudooo-parameters]
cairo = {{ cairo_location }}
......
......@@ -37,6 +37,8 @@ max_connections = 1000
{% set innodb_buffer_pool_size = parameter_dict['innodb-buffer-pool-size'] -%}
{% if innodb_buffer_pool_size %}innodb_buffer_pool_size = {{ innodb_buffer_pool_size }}{% endif %}
{% set innodb_buffer_pool_instances = parameter_dict['innodb-buffer-pool-instances'] -%}
{% if innodb_buffer_pool_instances %}innodb_buffer_pool_instances = {{ innodb_buffer_pool_instances }}{% endif %}
{% set innodb_log_file_size = parameter_dict['innodb-log-file-size'] -%}
{% if innodb_log_file_size %} innodb_log_file_size = {{ innodb_log_file_size }}{% endif %}
{% set innodb_log_buffer_size = parameter_dict['innodb-log-buffer-size'] -%}
......
......@@ -17,6 +17,8 @@ manpage_directory =
sample_directory =
readme_directory =
inet_interfaces = {{ inet_interfaces }}
smtp_bind_address = 0.0.0.0
smtp_bind_address6 = ::
virtual_alias_maps = {{ divert }}
# Compared to default:
......@@ -46,6 +48,10 @@ smtpd_recipient_restrictions =
reject_unknown_recipient_domain
permit_sasl_authenticated
reject
# Do not allow mynetworks to send mails, only authenticated clients.
smtpd_relay_restrictions =
permit_sasl_authenticated
defer_unauth_destination
# Disable local delivery
local_transport = error
......
[versions]
AccessControl = 2.13.14
Acquisition = 2.13.9
Acquisition = 2.13.11
DateTime = 2.12.8
DocumentTemplate = 2.13.2
DocumentTemplate = 2.13.3
ExtensionClass = 2.13.2
Jinja2 = 2.8
MarkupSafe = 0.23
Jinja2 = 2.8.1
Missing = 2.13.1
MultiMapping = 2.13.0
Paste = 1.7.5.1
......@@ -18,25 +17,26 @@ Products.MIMETools = 2.13.0
Products.MailHost = 2.13.2
Products.OFSP = 2.13.2
Products.PythonScripts = 2.13.2
Products.Sessions = 3.0
Products.StandardCacheManagers = 2.13.1
Products.TemporaryFolder = 3.0
Products.ZCTextIndex = 2.13.5
Products.ZCatalog = 2.13.27
Pygments = 2.1.2
Pygments = 2.1.3
Record = 2.13.0
RestrictedPython = 3.6.0
Sphinx = 1.0.8
ZConfig = 2.9.3
ZODB3 = 3.10.5
ZODB3 = 3.10.7
ZServer = 3.0
ZopeUndo = 2.12.0
docutils = 0.12
initgroups = 2.13.0
mechanize = 0.2.5
mr.developer = 1.34
pytz = 2015.7
repoze.retry = 1.2
repoze.tm2 = 1.0
repoze.who = 2.0
setuptools = 20.2.2
tempstorage = 2.12.2
transaction = 1.1.1
z3c.checkversions = 0.5
......@@ -86,3 +86,70 @@ zope.testbrowser = 3.11.1
zope.testing = 3.9.7
zope.traversing = 3.13.2
zope.viewlet = 3.7.2
# Required by:
# Jinja2==2.8.1
MarkupSafe = 0.23
# Required by:
# DateTime==2.12.8
# Zope2==2.13.25
# zope.i18n==3.7.4
# zope.testbrowser==3.11.1
pytz = 2016.10
# Required by:
# Products.BTreeFolder2==2.13.5
# Products.ExternalMethod==2.13.1
# Products.MIMETools==2.13.0
# Products.MailHost==2.13.2
# Products.OFSP==2.13.2
# Products.PythonScripts==2.13.2
# Products.Sessions==3.0
# Products.StandardCacheManagers==2.13.1
# Products.TemporaryFolder==3.0
# Products.ZCTextIndex==2.13.5
# Products.ZCatalog==2.13.27
# RestrictedPython==3.6.0
# ZServer==3.0
# Zope2==2.13.25
# mr.developer==1.34
# tempstorage==2.12.2
# z3c.checkversions==0.5
# zExceptions==2.13.0
# zope.browser==1.3
# zope.browsermenu==3.9.1
# zope.browserpage==3.12.2
# zope.browserresource==3.10.3
# zope.component==3.9.5
# zope.configuration==3.7.4
# zope.container==3.11.2
# zope.contentprovider==3.7.2
# zope.contenttype==3.5.5
# zope.deferredimport==3.5.3
# zope.event==3.5.2
# zope.exceptions==3.6.2
# zope.i18n==3.7.4
# zope.i18nmessageid==3.5.3
# zope.interface==3.6.7
# zope.lifecycleevent==3.6.2
# zope.location==3.9.1
# zope.pagetemplate==3.5.2
# zope.processlifetime==1.0
# zope.proxy==3.6.1
# zope.ptresource==3.9.0
# zope.publisher==3.12.6
# zope.schema==3.7.1
# zope.security==3.7.4
# zope.sendmail==3.7.5
# zope.sequencesort==3.4.0
# zope.site==3.9.2
# zope.size==3.4.1
# zope.structuredtext==3.5.1
# zope.tal==3.5.2
# zope.tales==3.5.3
# zope.testbrowser==3.11.1
# zope.testing==3.9.7
# zope.traversing==3.13.2
# zope.viewlet==3.7.2
setuptools = 32.3.1
......@@ -187,7 +187,7 @@ async = 0.6.1
gitdb = 0.5.4
mysqlclient = 1.3.9
pycrypto = 2.6
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.40.4
smmap = 0.8.2
......
[buildout]
extends =
buildout.hash.cfg
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg
parts =
template-logrotate-base
[logrotate-download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
# XXX: following mode should be the default
mode = 644
[logrotate-conf-template]
< = logrotate-download-base
[logrotate-entry-template]
< = logrotate-download-base
[template-logrotate-base]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${buildout:directory}/${:filename}
filename = instance-logrotate-base.cfg
md5sum = 4f940a5b5a6abac039738b45633c709c
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-logrotate-base.cfg
context =
key dcron_location dcron:location
key gzip_location gzip:location
key logrotate_location logrotate:location
key logrotate_conf_template logrotate-conf-template:target
key logrotate_entry_template logrotate-entry-template:target
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# But avoid directories, they are not portable.
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[logrotate-conf-template]
filename = logrotate.conf.in
md5sum = 67954c82a8030e5dcac3a8c5d115f624
[logrotate-entry-template]
filename = logrotate_entry.in
md5sum = 7a5ec8f141c61826a14db8619acba314
[template-logrotate-base]
filename = instance-logrotate-base.cfg.in
md5sum = 3e3e572c5537f77e83b1ee157d1c9852
......@@ -17,27 +17,52 @@ recipe = slapos.cookbook:simplelogger
wrapper = ${logrotate-directory:bin}/cron_simplelogger
log = ${logrotate-directory:log}/cron.log
[logrotate]
recipe = slapos.cookbook:logrotate
logrotate-entries = ${logrotate-directory:logrotate-entries}
backup = ${logrotate-directory:logrotate-backup}
logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
[logrotate-conf-parameter]
gzip-binary = {{ gzip_location }}/bin/gzip
gunzip-binary = {{ gzip_location }}/bin/gunzip
wrapper = ${logrotate-directory:bin}/logrotate
conf = ${logrotate-directory:etc}/logrotate.conf
state-file = ${logrotate-directory:srv}/logrotate.status
logrotate-entries = ${logrotate-directory:logrotate-entries}
[logrotate-conf]
recipe = slapos.recipe.template:jinja2
template = {{ logrotate_conf_template }}
rendered = ${logrotate-directory:etc}/logrotate.conf
context =
section parameter_dict logrotate-conf-parameter
[logrotate-entry-base]
# User must define keys:
# - "name" to generate configuration path (must be unique in partition)
# - "log" space-separated list of file paths to be rotated
# User may override keys:
# - "post" with commands to execute after rotation
# - "pre" with commands to execute before rotation
recipe = slapos.recipe.template:jinja2
template = {{ logrotate_entry_template }}
rendered = ${logrotate-conf-parameter:logrotate-entries}/${:name}
context =
key backup logrotate-directory:logrotate-backup
key log :log
key post :post
key pre :pre
post =
pre =
[logrotate]
recipe = slapos.cookbook:wrapper
parameters-extra = true
command-line = {{ logrotate_location }}/usr/sbin/logrotate -s "${logrotate-directory:srv}/logrotate.status" "${logrotate-conf:rendered}"
wrapper-path = ${logrotate-directory:bin}/logrotate
[cron-entry-logrotate]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
command = ${logrotate:wrapper-path}
[logrotate-entry-base]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
logrotate-entries = ${logrotate-directory:logrotate-entries}
backup = ${logrotate-directory:backup}
[logrotate-entry-cron]
......@@ -58,4 +83,3 @@ backup = ${:srv}/backup
etc = ${buildout:directory}/etc
services = ${:etc}/run
log = ${buildout:directory}/var/log
compresscmd {{ parameter_dict['gzip-binary'] }}
compressoptions -9
uncompresscmd {{ parameter_dict['gunzip-binary'] }}
include {{ parameter_dict['logrotate-entries'] }}
{{ log }} {
daily
dateext
rotate 3650
compress
delaycompress
notifempty
sharedscripts
create
olddir {{ backup }}
missingok
{% if pre %}prerotate {
{{ pre }}
}{% endif %}
{% if post %}postrotate {
{{ post }}
}{% endif %}
}
This diff is collapsed.
......@@ -85,6 +85,11 @@ md5sum = 1bdb4e05c6be04f4e5766c64467fbcec
<= monitor-template-base
filename = httpd-cors.cfg.in
md5sum = 683ea85fc054094248baf5752dd089bf
[monitor-check-free-disk-space]
<= monitor-template-base
filename = check_free_disk.in
md5sum = bab457ac4d139ed31d0b343a7d14d996
# End templates files
# XXX keep compatibility (with software/ipython_notebook/software.cfg )
......@@ -97,7 +102,7 @@ recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg
md5sum = 3a0417a9a3c2710c31be37e7a66f8a82
md5sum = bf0adf565d7cde55abc94bd223ec3162
context =
key apache_location apache:location
key gzip_location gzip:location
......@@ -119,6 +124,7 @@ context =
raw python_executable ${buildout:executable}
raw python_with_eggs ${buildout:directory}/bin/${extra-eggs:interpreter}
raw template_wrapper ${monitor-template-wrapper:location}/${monitor-template-wrapper:filename}
raw template_check_disk_space ${monitor-check-free-disk-space:location}/${monitor-check-free-disk-space:filename}
depends =
${monitor-eggs:eggs}
......@@ -126,5 +132,5 @@ depends =
PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
pycurl = 7.43.0
slapos.toolbox = 0.64
slapos.toolbox = 0.65
......@@ -82,7 +82,7 @@ base-url = ${monitor-instance-parameter:monitor-base-url}
monitor-hal-json = ${monitor-directory:public}/monitor.hal.json
service-pid-folder = ${monitor-directory:pids}
crond-folder = ${logrotate-directory:cron-entries}
logrotate-folder = ${logrotate:logrotate-entries}
logrotate-folder = ${logrotate-directory:logrotate-entries}
promise-runner = {{ monitor_runpromise }}
promise-folder = ${directory:promises}
monitor-promise-folder = ${monitor-directory:promises}
......@@ -102,12 +102,14 @@ parameter-list =
raw monitor-user ${monitor-instance-parameter:username}
htpasswd monitor-password ${monitor-htpassword-file:password-file} ${monitor-instance-parameter:username} ${httpd-monitor-htpasswd:htpasswd-path}
file promise-timeout ${monitor-promise-timeout-file:file}
file min-free-disk-MB ${promise-check-free-disk-space:config-file}
${monitor-instance-parameter:instance-configuration}
# htpasswd entry: htpasswd key password-file username htpasswd-file
collector-db = ${monitor-instance-parameter:collector-db}
collect-script = {{ monitor_collect }}
python = {{ python_with_eggs }}
nice-cmd = ${xnice-bin:output}
promise-output-file = ${directory:monitor}/monitor-bootstrap-status
......@@ -168,14 +170,14 @@ recipe = plone.recipe.command
stop-on-error = true
password-file = ${directory:etc}/.monitor_pwd
command =
if [ ! -f "${:password-file}" ]; then echo "${monitor-instance-parameter:password}" > ${:password-file}; fi
if [ ! -s "${:password-file}" ]; then echo "${monitor-instance-parameter:password}" > ${:password-file}; fi
update-command = ${:command}
[httpd-monitor-htpasswd]
recipe = plone.recipe.command
stop-on-error = true
htpasswd-path = ${monitor-directory:etc}/monitor-htpasswd
command = if [ ! -f "${:htpasswd-path}" ]; then {{ apache_location }}/bin/htpasswd -cb ${:htpasswd-path} ${:user} ${:password}; fi
command = if [ ! -s "${:htpasswd-path}" ]; then {{ apache_location }}/bin/htpasswd -cb ${:htpasswd-path} ${:user} ${:password}; fi
update-command = ${:command}
user = ${monitor-instance-parameter:username}
password = ${monitor-instance-parameter:password}
......@@ -229,9 +231,17 @@ context =
raw dash_binary {{ dash_executable_location }}
command = kill -USR1 $(cat ${monitor-httpd-conf-parameter:pid-file})
[xnice-bin]
recipe = collective.recipe.template
input = inline:#!/bin/sh
# run something at lowest possible priority
exec nice -19 chrt --idle 0 ionice -c3 "$@"
output = ${directory:bin}/xnice
mode = 700
[monitor-globalstate-wrapper]
recipe = slapos.cookbook:wrapper
command-line = {{ monitor_genstatus }} '${monitor-conf:rendered}' '${monitor-instance-info:rendered}'
command-line = ${xnice-bin:output} {{ monitor_genstatus }} '${monitor-conf:rendered}' '${monitor-instance-info:rendered}'
wrapper-path = ${directory:bin}/monitor-globalstate
[monitor-configurator-wrapper]
......@@ -345,6 +355,18 @@ input = inline:#!/bin/sh
output = ${monitor-directory:promises}/buildout-${slap-connection:partition-id}-status
mode = 700
[promise-check-free-disk-space]
recipe = slapos.recipe.template:jinja2
template = {{ template_check_disk_space }}
rendered = ${monitor-directory:promises}/check-free-disk-space
mode = 0700
context =
key config_file :config-file
raw home_path ${buildout:directory}
raw python_bin {{ python_with_eggs }}
config-file = ${directory:etc}/min-free-disk-size
[monitor-base]
# create dependencies between required monitor parts
recipe = plone.recipe.command
......
This diff is collapsed.
......@@ -88,7 +88,7 @@ destination = ${buildout:directory}/template-parts.cfg.in
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}.in
output = ${buildout:directory}/${:filename}
md5sum = be2ebf91faa6b5b131995a05a907707f
md5sum = 41e82859dc6b65e94a300a006d51536e
mode = 0644
filename = template-resilient-templates.cfg
......@@ -138,8 +138,10 @@ mode = 0644
[rdiff-backup-build]
# use our own version
find-links = http://www.nexedi.org/static/packages/source/rdiff-backup-1.3.4nxd2.tar.gz
patches =
${:_profile_base_location_}/rdiff-backup-1.3.4-librsync-1.0.0.patch#31fafc8bc4a00f002f52008a9f3b671f
[versions]
rdiff-backup = 1.3.4nxd2
# 1.3.4nxd2 is invalid version string, thus pached version string is not '1.3.4nxd2+SlapOSPatched001'
# but '1.3.4nxd2-SlapOSPatched001'.
rdiff-backup = 1.3.4nxd2-SlapOSPatched001
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