Commit 4c390117 authored by Jérome Perrin's avatar Jérome Perrin

erp5: share most dependencies

Modify components to make them compatible with `slapos.recipe.cmmi` shared mode.

Most of them were straightforward, except:

 - aspell, where all dictionnaries parts were installed in aspell part. Instead of this, we generate an aspell wrapper for each language. This wrapper runs aspell with environment variables so that it loads dictionnaries from the language.
 - fonts, where all fonts were installed in the same `${buildout:parts-directory}/fonts/` folder and where just installing a font part had the side effect to make this font available to every application. Now each font is installed separately and it becomes applications responsability to generate a fontconfig's fonts.conf and set `FONTCONFIG_FILE` environment variable to load it, as described in https://www.freedesktop.org/software/fontconfig/fontconfig-user.html . A new `template-fonts-conf` section was introduced for this.
 - mariadb, where mroonga plugin write in mariadb's folder. For this, mroonga plugin is installed in another directory along with all original mariadb's plugin (that are copied) and mariadb service is configured to use mroonga's plugin folder instead of the default mariadb's folder.

See merge request !706
parents cdd6690d d29fba55
...@@ -58,8 +58,11 @@ environment = ...@@ -58,8 +58,11 @@ environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${m4:location}/bin:${apache-php:location}/bin:%(PATH)s PATH=${autoconf:location}/bin:${automake:location}/bin:${m4:location}/bin:${apache-php:location}/bin:%(PATH)s
[apache]
# apache-php will write in apache folder, so we cannot share apache if apache-php is used.
shared = false
[apache-php] [apache-php]
# Note: Shall react on each build of apache and reinstall itself
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://www.php.net/distributions/php-7.3.6.tar.bz2 url = https://www.php.net/distributions/php-7.3.6.tar.bz2
md5sum = bde9a912fb311182cd460dad1abbc247 md5sum = bde9a912fb311182cd460dad1abbc247
......
...@@ -18,32 +18,30 @@ extends = ...@@ -18,32 +18,30 @@ extends =
../zlib/buildout.cfg ../zlib/buildout.cfg
./buildout.hash.cfg ./buildout.hash.cfg
[apr] [apr]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.cmmi
shared = false shared = true
strip-top-level-dir = false
version = 1.5.2 version = 1.5.2
md5sum = 4e9769f3349fe11fc0a5e1b224c236aa md5sum = 4e9769f3349fe11fc0a5e1b224c236aa
url = https://archive.apache.org/dist/apr/apr-${:version}.tar.bz2 url = https://archive.apache.org/dist/apr/apr-${:version}.tar.bz2
[apr-util] [apr-util]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.cmmi
shared = false shared = true
strip-top-level-dir = false
version = 1.5.4 version = 1.5.4
url = https://archive.apache.org/dist/apr/apr-util-${:version}.tar.bz2 url = https://archive.apache.org/dist/apr/apr-util-${:version}.tar.bz2
md5sum = 2202b18f269ad606d70e1864857ed93c md5sum = 2202b18f269ad606d70e1864857ed93c
configure-options =
--with-apr=${apr:location}
--with-expat=${libexpat:location}
[apache] [apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = false shared = true
version = 2.4.43 version = 2.4.43
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2 url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 791c986b1e70fe61eb44060aacc89a64 md5sum = 791c986b1e70fe61eb44060aacc89a64
pre-configure =
cp -ar ${apr:location}/apr-${apr:version} srclib/apr/ &&
cp -ar ${apr-util:location}/apr-util-${apr-util:version} srclib/apr-util
configure-options = --disable-static configure-options = --disable-static
--enable-authn-alias --enable-authn-alias
--enable-bucketeer --enable-bucketeer
...@@ -74,7 +72,6 @@ configure-options = --disable-static ...@@ -74,7 +72,6 @@ configure-options = --disable-static
--enable-so --enable-so
--enable-ssl --enable-ssl
--disable-lua --disable-lua
--with-included-apr
--with-ssl=${openssl:location} --with-ssl=${openssl:location}
--with-z=${zlib:location} --with-z=${zlib:location}
--with-expat=${libexpat:location} --with-expat=${libexpat:location}
...@@ -94,15 +91,19 @@ configure-options = --disable-static ...@@ -94,15 +91,19 @@ configure-options = --disable-static
--without-freedts --without-freedts
--without-odbc --without-odbc
--without-iconv --without-iconv
--with-apr=${apr:location}
--with-apr-util=${apr-util:location}
environment = environment =
PATH=${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s PATH=${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS =-I${libuuid:location}/include -I${openssl:location}/include CPPFLAGS =-I${libuuid:location}/include -I${openssl:location}/include -I${apr:location}/include -I${apr-util:location}/include
LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${apr:location}/lib -Wl,-rpath=${apr:location}/lib -L${apr-util:location}/lib -Wl,-rpath=${apr-util:location}/lib -L${libexpat:location}/lib -Wl,-rpath=${libexpat:location}/lib
[apache-antiloris] [apache-antiloris]
# Note: Shall react on each build of apache and reinstall itself # Note: This component tries to write in a [apache] parts, which is now
# shared. To use this component in a software, apache parts have to be made
# not shared in the software.
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = false shared = false
url = http://downloads.sourceforge.net/project/mod-antiloris/mod_antiloris-0.4.tar.bz2 url = http://downloads.sourceforge.net/project/mod-antiloris/mod_antiloris-0.4.tar.bz2
...@@ -122,6 +123,6 @@ environment = ...@@ -122,6 +123,6 @@ environment =
[template-apache-backend-conf] [template-apache-backend-conf]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
shared = false shared = true
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 640 mode = 640
import os
import textwrap
import glob
def post_make_hook(options, buildout, environment):
prefix = options['prefix']
dict_dir = options['dict-dir']
aspell_bin = os.path.join(
buildout['aspell']['location'],
'bin',
'aspell')
aspell_bin_wrapper = options['bin-aspell']
bin_folder = os.path.dirname(aspell_bin_wrapper)
if not os.path.isdir(bin_folder):
os.mkdir(bin_folder)
# install a ./bin/aspell set to use the dict from this part
with open(aspell_bin_wrapper, 'w') as wrapper:
wrapper.write('''#!/bin/sh
export ASPELL_CONF="dict-dir {dict_dir}"
exec {aspell_bin} "$@"
'''.format(**locals()))
os.chmod(aspell_bin_wrapper, 0o755)
[buildout] [buildout]
parts = parts =
aspell aspell
aspell-en-dictonary aspell-en-dictionary
extends = extends =
../ncurses/buildout.cfg ../ncurses/buildout.cfg
../patch/buildout.cfg ../patch/buildout.cfg
../perl/buildout.cfg ../perl/buildout.cfg
buildout.hash.cfg
[aspell-dictionary-common] [aspell-dictionary-common]
# Macro to install an aspell dictionnary and create an aspell wrapper using
# this dictionnary.
# The aspell wrapper is exported as ${:bin-aspell}
bin-aspell = @@LOCATION@@/bin/aspell
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = false shared = true
configure-command = ./configure --vars ASPELL=${aspell:location}/bin/aspell PREZIP=${aspell:location}/bin/prezip-bin configure-command = ./configure --vars ASPELL=${aspell:location}/bin/aspell PREZIP=${aspell:location}/bin/prezip-bin
dict-dir = @@LOCATION@@/lib/aspell/
data-dir = @@LOCATION@@/lib/aspell/
make-options =
dictdir=${:dict-dir}
datadir=${:data-dir}
make-targets = install
post-make-hook = ${:_profile_base_location_}/${aspell-create-wrapper:filename}#${aspell-create-wrapper:md5sum}:post_make_hook
[aspell] [aspell]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = false shared = true
url = https://ftp.gnu.org/gnu/aspell/aspell-0.60.7.tar.gz url = https://ftp.gnu.org/gnu/aspell/aspell-0.60.7.tar.gz
md5sum = 8ef2252609c511cd2bb26f3a3932ef28 md5sum = 8ef2252609c511cd2bb26f3a3932ef28
environment = environment =
......
[aspell-create-wrapper]
filename = aspell-create-wrapper.py
md5sum = 5b7cc325032f8588870fd2c6b8bd1b6d
...@@ -4,5 +4,6 @@ parts = cpio ...@@ -4,5 +4,6 @@ parts = cpio
[cpio] [cpio]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2 url = http://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2
md5sum = 93eea9f07c0058c097891c73e4955456 md5sum = 93eea9f07c0058c097891c73e4955456
...@@ -110,9 +110,6 @@ slapos_promise = ...@@ -110,9 +110,6 @@ slapos_promise =
x86 = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 ${:i686-md5sum} x86 = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 ${:i686-md5sum}
x86-64 = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 ${:x86_64-md5sum} x86-64 = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 ${:x86_64-md5sum}
fonts =
${liberation-fonts:location}
${ipaex-fonts:location}
library = library =
${alsa:location}/lib ${alsa:location}/lib
${atk:location}/lib ${atk:location}/lib
......
[buildout] [buildout]
extends = extends =
../fonts/buildout.cfg
../freetype/buildout.cfg ../freetype/buildout.cfg
../libxml2/buildout.cfg ../libxml2/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
...@@ -8,12 +7,14 @@ extends = ...@@ -8,12 +7,14 @@ extends =
../zlib/buildout.cfg ../zlib/buildout.cfg
../bzip2/buildout.cfg ../bzip2/buildout.cfg
../gperf/buildout.cfg ../gperf/buildout.cfg
buildout.hash.cfg
parts = parts =
fontconfig fontconfig
[fontconfig] [fontconfig]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://fontconfig.org/release/fontconfig-2.12.6.tar.bz2 url = http://fontconfig.org/release/fontconfig-2.12.6.tar.bz2
md5sum = 733f5e2371ca77b69707bd7b30cc2163 md5sum = 733f5e2371ca77b69707bd7b30cc2163
pkg_config_depends = ${freetype:pkg_config_depends}:${freetype:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig pkg_config_depends = ${freetype:pkg_config_depends}:${freetype:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig
...@@ -21,10 +22,15 @@ configure-options = ...@@ -21,10 +22,15 @@ configure-options =
--disable-static --disable-static
--disable-docs --disable-docs
--enable-libxml2 --enable-libxml2
--with-default-fonts=${fonts:location}
--with-add-fonts=no --with-add-fonts=no
environment = environment =
PATH=${pkgconfig:location}/bin:${gperf:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:${gperf:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends} PKG_CONFIG_PATH=${:pkg_config_depends}
CPPFLAGS=-I${zlib:location}/include -I${bzip2:location}/include CPPFLAGS=-I${zlib:location}/include -I${bzip2:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib
[template-fonts-conf]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 640
[template-fonts-conf]
filename = fonts.conf.in
md5sum = 6967e553630d107fc0a59b14de8b0251
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
{#
# Generates a fonts.conf to be used as FONTCONFIG_FILE environment variable.
#
# This template needs the following keys in context:
#
# - cachedir: a directory to use a cachedir
# - fonts: directories containing fonts ( \n separated list of paths )
# for example {liberation-fonts:location}
# - includes: directories fontconfig configuration ( \n separated list of paths )
# typically, applications want to include {fontconfig:location}/etc/fonts/conf.d
# also some fonts packages bundles font.d
#}
<fontconfig>
<cachedir>{{ cachedir | escape}}</cachedir>
{% for font in fonts.splitlines() -%}
<dir>{{ font | escape}}</dir>
{% endfor %}
{% for include in includes.splitlines() -%}
<include>{{ include | escape}}</include>
{% endfor %}
</fontconfig>
\ No newline at end of file
...@@ -4,21 +4,27 @@ extends = ...@@ -4,21 +4,27 @@ extends =
../p7zip/buildout.cfg ../p7zip/buildout.cfg
parts = parts =
liberation-fonts
ipaex-fonts
ipa-fonts
ocrb-fonts
android-fonts android-fonts
dejavu-fonts dejavu-fonts
ipa-fonts
ipaex-fonts
liberation-fonts
ocrb-fonts
[fonts]
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[fonts-base] [fonts-base]
destination = ${fonts:location}/${:_buildout_section_name_} # XXX download and unpack, with shared parts support
location = ${:destination} # we could make slapos.recipe.build:download-unpacked really support shared
recipe = slapos.recipe.build:download-unpacked # parts and use it here. Current version of slapos.recipe.build ( 0.44 ) looks
strip-top-level-dir = true # for buildout:shared-parts , but this is not what shared parts are using.
recipe = slapos.recipe.cmmi
shared = true
configure-command = :
make-binary = :
post-install = cp -ra . ${:location}
location = @@LOCATION@@
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
# Liberation(tm) Fonts - a font family which aims at metric # Liberation(tm) Fonts - a font family which aims at metric
# compatibility with Arial, Times New Roman, and Courier New. # compatibility with Arial, Times New Roman, and Courier New.
...@@ -61,7 +67,7 @@ md5sum = d0efec10b9f110a32e9b8f796e21782c ...@@ -61,7 +67,7 @@ md5sum = d0efec10b9f110a32e9b8f796e21782c
# Microsoft's TrueType core fonts # Microsoft's TrueType core fonts
# non-free so not enabled by default # non-free so not enabled by default
[msttcore-fonts] [msttcore-fonts]
location = ${fonts:location}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
recipe = slapos.recipe.build recipe = slapos.recipe.build
install = install =
import os, subprocess import os, subprocess
......
...@@ -11,6 +11,7 @@ parts = ghostscript ...@@ -11,6 +11,7 @@ parts = ghostscript
[ghostscript-common] [ghostscript-common]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
pkg_config_depends = ${libtiff:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends} pkg_config_depends = ${libtiff:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends}
configure-options = configure-options =
--disable-cups --disable-cups
......
...@@ -13,6 +13,7 @@ extends = ...@@ -13,6 +13,7 @@ extends =
[graphviz] [graphviz]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://ftp.osuosl.org/pub/blfs/conglomeration/graphviz/graphviz-2.40.1.tar.gz url = https://ftp.osuosl.org/pub/blfs/conglomeration/graphviz/graphviz-2.40.1.tar.gz
md5sum = 4ea6fd64603536406166600bcc296fc8 md5sum = 4ea6fd64603536406166600bcc296fc8
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends} pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}
......
...@@ -14,9 +14,10 @@ extends = ...@@ -14,9 +14,10 @@ extends =
[groonga] [groonga]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = false shared = true
url = https://packages.groonga.org/source/groonga/groonga-9.1.2.tar.gz url = https://packages.groonga.org/source/groonga/groonga-9.1.2.tar.gz
md5sum = 5266c49b758dde744854cb8cfe025812 md5sum = 5266c49b758dde744854cb8cfe025812
groonga-plugin-dir = @@LOCATION@@/lib/groonga/plugins/
# temporary patch to respect more tokens in natural language mode. # temporary patch to respect more tokens in natural language mode.
patches = patches =
${:_profile_base_location_}/groonga.patch#9ed02fbe8400402d3eab47eee149978b ${:_profile_base_location_}/groonga.patch#9ed02fbe8400402d3eab47eee149978b
...@@ -43,12 +44,16 @@ environment = ...@@ -43,12 +44,16 @@ environment =
LDFLAGS=-Wl,-rpath=${jemalloc:location}/lib -L${jemalloc:location}/lib -Wl,-rpath=${libstemmer:location}/lib -L${libstemmer:location}/lib -Wl,-rpath=${zlib:location}/lib -L${zlib:location}/lib LDFLAGS=-Wl,-rpath=${jemalloc:location}/lib -L${jemalloc:location}/lib -Wl,-rpath=${libstemmer:location}/lib -L${libstemmer:location}/lib -Wl,-rpath=${zlib:location}/lib -L${zlib:location}/lib
PATH=${patch:location}/bin:%(PATH)s PATH=${patch:location}/bin:%(PATH)s
[groonga-normalizer-mysql] [groonga-normalizer-mysql]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = false shared = true
url = https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-1.1.4.tar.gz url = https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-1.1.4.tar.gz
md5sum = effa67fb271d49810850a3b275d040f6 md5sum = effa67fb271d49810850a3b275d040f6
location = ${groonga:location}
groonga-plugin-dir = @@LOCATION@@/lib/groonga/plugins/
pre-configure = mkdir -p ${:groonga-plugin-dir}
make-targets = GROONGA_PLUGINS_DIR=${:groonga-plugin-dir} install
configure-options = configure-options =
--disable-static --disable-static
environment = environment =
......
...@@ -25,6 +25,7 @@ parts = ...@@ -25,6 +25,7 @@ parts =
[cairo] [cairo]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://cairographics.org/releases/cairo-1.16.0.tar.xz url = https://cairographics.org/releases/cairo-1.16.0.tar.xz
md5sum = f19e0353828269c22bd72e271243a552 md5sum = f19e0353828269c22bd72e271243a552
pkg_config_depends = ${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends}:${glib:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libXext:pkg_config_depends}:${libpng:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig pkg_config_depends = ${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends}:${glib:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libXext:pkg_config_depends}:${libpng:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig
...@@ -46,6 +47,7 @@ environment = ...@@ -46,6 +47,7 @@ environment =
[harfbuzz] [harfbuzz]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.6.4.tar.xz url = https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.6.4.tar.xz
md5sum = 2b3a4dfdb3e5e50055f941978944da9f md5sum = 2b3a4dfdb3e5e50055f941978944da9f
pkg_config_depends = ${cairo:location}/lib/pkgconfig:${cairo:pkg_config_depends}:${icu4c:location}/lib/pkgconfig pkg_config_depends = ${cairo:location}/lib/pkgconfig:${cairo:pkg_config_depends}:${icu4c:location}/lib/pkgconfig
...@@ -71,6 +73,7 @@ configure-options = ...@@ -71,6 +73,7 @@ configure-options =
[pango] [pango]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://download.gnome.org/sources/pango/1.42/pango-1.42.4.tar.xz url = https://download.gnome.org/sources/pango/1.42/pango-1.42.4.tar.xz
md5sum = deb171a31a3ad76342d5195a1b5bbc7c md5sum = deb171a31a3ad76342d5195a1b5bbc7c
pkg_config_depends = ${fribidi:location}/lib/pkgconfig:${harfbuzz:location}/lib/pkgconfig:${harfbuzz:pkg_config_depends} pkg_config_depends = ${fribidi:location}/lib/pkgconfig:${harfbuzz:location}/lib/pkgconfig:${harfbuzz:pkg_config_depends}
...@@ -116,6 +119,7 @@ environment = ...@@ -116,6 +119,7 @@ environment =
[gtk-2] [gtk-2]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.32.tar.xz url = https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.32.tar.xz
md5sum = d5742aa42275203a499b59b4c382a784 md5sum = d5742aa42275203a499b59b4c382a784
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig
......
...@@ -15,6 +15,7 @@ parts = ...@@ -15,6 +15,7 @@ parts =
[cairomm] [cairomm]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://cairographics.org/releases/cairomm-1.13.1.tar.gz url = http://cairographics.org/releases/cairomm-1.13.1.tar.gz
md5sum = 21fe892652741b7544f52da6965d27fc md5sum = 21fe892652741b7544f52da6965d27fc
pkg_config_depends = ${cairo:location}/lib/pkgconfig:${cairo:pkg_config_depends}:${libsigc:location}/lib/pkgconfig pkg_config_depends = ${cairo:location}/lib/pkgconfig:${cairo:pkg_config_depends}:${libsigc:location}/lib/pkgconfig
...@@ -29,6 +30,7 @@ environment = ...@@ -29,6 +30,7 @@ environment =
[pangomm] [pangomm]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/pangomm-2.40.1.tar.xz url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/pangomm-2.40.1.tar.xz
md5sum = 874eadd9434613dbacf0272c82c3ac23 md5sum = 874eadd9434613dbacf0272c82c3ac23
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${glibmm:location}/lib/pkgconfig:${glibmm:pkg_config_depends}:${cairomm:location}/lib/pkgconfig pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${glibmm:location}/lib/pkgconfig:${glibmm:pkg_config_depends}:${cairomm:location}/lib/pkgconfig
...@@ -42,6 +44,7 @@ environment = ...@@ -42,6 +44,7 @@ environment =
[atkmm] [atkmm]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/atkmm-2.24.2.tar.xz url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/atkmm-2.24.2.tar.xz
md5sum = d53b60b0f1be597e86070954a49cf0c3 md5sum = d53b60b0f1be597e86070954a49cf0c3
pkg_config_depends = ${atk:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${glibmm:location}/lib/pkgconfig:${libsigc:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig pkg_config_depends = ${atk:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${glibmm:location}/lib/pkgconfig:${libsigc:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
...@@ -55,6 +58,7 @@ environment = ...@@ -55,6 +58,7 @@ environment =
[gtkmm] [gtkmm]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.24/gtkmm-2.24.5.tar.xz url = http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.24/gtkmm-2.24.5.tar.xz
md5sum = 6c59ae8bbff48fad9132f23af347acf1 md5sum = 6c59ae8bbff48fad9132f23af347acf1
pkg_config_depends = ${pangomm:location}/lib/pkgconfig:${pangomm:pkg_config_depends}:${atkmm:location}/lib/pkgconfig:${atkmm:pkg_config_depends}:${gtk-2:location}/lib/pkgconfig:${gtk-2:pkg_config_depends} pkg_config_depends = ${pangomm:location}/lib/pkgconfig:${pangomm:pkg_config_depends}:${atkmm:location}/lib/pkgconfig:${atkmm:pkg_config_depends}:${gtk-2:location}/lib/pkgconfig:${gtk-2:pkg_config_depends}
......
...@@ -25,6 +25,7 @@ extends = ...@@ -25,6 +25,7 @@ extends =
[imagemagick] [imagemagick]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
version = 7.0.2-10 version = 7.0.2-10
url = https://www.imagemagick.org/download/releases/ImageMagick-${:version}.tar.xz url = https://www.imagemagick.org/download/releases/ImageMagick-${:version}.tar.xz
md5sum = e1cb23d9c10a8eff228ef30ee281711a md5sum = e1cb23d9c10a8eff228ef30ee281711a
......
...@@ -26,6 +26,7 @@ extends = ...@@ -26,6 +26,7 @@ extends =
[gsl] [gsl]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = ftp://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz url = ftp://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz
md5sum = bda73a3dd5ff2f30b5956764399db6e7 md5sum = bda73a3dd5ff2f30b5956764399db6e7
configure-options = configure-options =
...@@ -37,6 +38,7 @@ environment = ...@@ -37,6 +38,7 @@ environment =
[inkscape] [inkscape]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://inkscape.org/gallery/item/13330/inkscape-0.92.4_A6N0YOn.tar.bz2 url = https://inkscape.org/gallery/item/13330/inkscape-0.92.4_A6N0YOn.tar.bz2
md5sum = ac30f6d5747fd9c620c00dad500f414f md5sum = ac30f6d5747fd9c620c00dad500f414f
location = @@LOCATION@@ location = @@LOCATION@@
......
...@@ -22,6 +22,7 @@ environment = ...@@ -22,6 +22,7 @@ environment =
[librsvg] [librsvg]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/librsvg-2.40.16.tar.xz url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/librsvg-2.40.16.tar.xz
md5sum = f474fe37177a2bf8050787df2046095c md5sum = f474fe37177a2bf8050787df2046095c
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${zlib:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${zlib:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig
......
...@@ -28,10 +28,11 @@ parts = ...@@ -28,10 +28,11 @@ parts =
[mariadb] [mariadb]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http%3A//fr.mirror.babylon.network/mariadb/?serve url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http%3A//fr.mirror.babylon.network/mariadb/?serve
version = 10.4.12 version = 10.4.12
md5sum = 97d7c0f508c04a31c138fdb24e95dbc4 md5sum = 97d7c0f508c04a31c138fdb24e95dbc4
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = @@LOCATION@@
pre-configure = pre-configure =
set '\bSET(PLUGIN_AUTH_PAM YES)' cmake/build_configurations/mysql_release.cmake set '\bSET(PLUGIN_AUTH_PAM YES)' cmake/build_configurations/mysql_release.cmake
grep -q "$@" grep -q "$@"
...@@ -85,8 +86,12 @@ post-install = ...@@ -85,8 +86,12 @@ post-install =
[mroonga-mariadb] [mroonga-mariadb]
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users. # mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/ # https://mroonga.org/
#
# To use mroonga, configure mariadb instance to use ${mroonga-mariadb:plugin-dir}
# as plugin-dir ( https://mariadb.com/kb/en/server-system-variables/#plugin_dir )
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://packages.groonga.org/source/mroonga/mroonga-9.12.tar.gz url = https://packages.groonga.org/source/mroonga/mroonga-9.12.tar.gz
md5sum = d0af673f1bad3b9ccf33870bb2344a25 md5sum = d0af673f1bad3b9ccf33870bb2344a25
pre-configure = pre-configure =
...@@ -95,13 +100,19 @@ pre-configure = ...@@ -95,13 +100,19 @@ pre-configure =
cd fake_mariadb_source cd fake_mariadb_source
ln -s ${mariadb:location}/wsrep-lib ln -s ${mariadb:location}/wsrep-lib
cp -a ${mariadb:location}/include/mysql/server include cp -a ${mariadb:location}/include/mysql/server include
mv include/private sql cp -a include/private sql
chmod -R a+w include sql # so that buildout can delete this compile-dir after install
mkdir -p ${:plugin-dir}
configure-options = configure-options =
--with-mysql-source=fake_mariadb_source --with-mysql-source=fake_mariadb_source
--with-mysql-config=${mariadb:location}/bin/mysql_config --with-mysql-config=${mariadb:location}/bin/mysql_config
--disable-static --disable-static
--disable-document --disable-document
post-install =
cp -ra ${mariadb:location}/lib/plugin/* ${:plugin-dir}
plugin-dir = @@LOCATION@@/lib/plugin
install-sql = @@LOCATION@@/share/mroonga/install.sql install-sql = @@LOCATION@@/share/mroonga/install.sql
make-targets = plugindir=${:plugin-dir} install
patch-options = -p1 patch-options = -p1
patches = patches =
${:_profile_base_location_}/mroonga_boolean.patch#c818568fe35ca6a4298f18e575d962a0 ${:_profile_base_location_}/mroonga_boolean.patch#c818568fe35ca6a4298f18e575d962a0
......
...@@ -12,7 +12,8 @@ parts += ...@@ -12,7 +12,8 @@ parts +=
[onlyoffice-core] [onlyoffice-core]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
location = ${buildout:parts-directory}/${:_buildout_section_name_} shared = true
location = @@LOCATION@@
# This url contains the hash provided by the DocumentServer core submodule hash. # This url contains the hash provided by the DocumentServer core submodule hash.
# https://github.com/ONLYOFFICE/DocumentServer/ # https://github.com/ONLYOFFICE/DocumentServer/
url = https://lab.nexedi.com/bk/onlyoffice_core/repository/archive.tar.bz2?ref=8a40eb47bd80a40ecde14c223525b21852d2fc9f url = https://lab.nexedi.com/bk/onlyoffice_core/repository/archive.tar.bz2?ref=8a40eb47bd80a40ecde14c223525b21852d2fc9f
......
...@@ -10,10 +10,6 @@ recipe = slapos.recipe.build ...@@ -10,10 +10,6 @@ recipe = slapos.recipe.build
slapos_promise = slapos_promise =
file:phantomjs-slapos file:phantomjs-slapos
depends =
${liberation-fonts:location}
${ipaex-fonts:location}
x86 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88 x86 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88
x86-64 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71 x86-64 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71
......
...@@ -13,6 +13,7 @@ extends = ...@@ -13,6 +13,7 @@ extends =
[poppler] [poppler]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://poppler.freedesktop.org/poppler-0.43.0.tar.xz url = http://poppler.freedesktop.org/poppler-0.43.0.tar.xz
md5sum = 1d2b001663119855cdfbc0713dbfb9c6 md5sum = 1d2b001663119855cdfbc0713dbfb9c6
configure-options = configure-options =
......
...@@ -19,7 +19,9 @@ patch-options = -p1 ...@@ -19,7 +19,9 @@ patch-options = -p1
patch-binary = ${patch:location}/bin/patch patch-binary = ${patch:location}/bin/patch
include-dirs = include-dirs =
${subversion:location}/include/subversion-1 ${subversion:location}/include/subversion-1
${apache:location}/include ${apr:location}/include/apr-1
${apr-util:location}/include/apr-1
library-dirs = library-dirs =
${subversion:location}/lib ${subversion:location}/lib
${apache:location}/lib ${apr:location}/lib
${apr-util:location}/lib
...@@ -8,7 +8,8 @@ parts = ...@@ -8,7 +8,8 @@ parts =
[qt5-qmake] [qt5-qmake]
# XXX work on all systems needs check # XXX work on all systems needs check
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
location = ${buildout:parts-directory}/${:_buildout_section_name_} shared = true
location = @@LOCATION@@
url = http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtbase-opensource-src-5.6.2.tar.gz url = http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtbase-opensource-src-5.6.2.tar.gz
md5sum = 7aa5841b50c411e23e31e8a6cc1c6981 md5sum = 7aa5841b50c411e23e31e8a6cc1c6981
configure-command = ./configure configure-command = ./configure
......
...@@ -9,11 +9,12 @@ extends = ...@@ -9,11 +9,12 @@ extends =
[serf] [serf]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://archive.apache.org/dist/serf/serf-1.2.1.tar.bz2 url = https://archive.apache.org/dist/serf/serf-1.2.1.tar.bz2
md5sum = 4f8e76c9c6567aee1d66aba49f76a58b md5sum = 4f8e76c9c6567aee1d66aba49f76a58b
configure-options = configure-options =
--with-apr=${apache:location}/bin/apr-1-config --with-apr=${apr:location}
--with-apr-util=${apache:location}/bin/apu-1-config --with-apr-util=${apr-util:location}
--with-openssl=${openssl-1.0:location} --with-openssl=${openssl-1.0:location}
environment = environment =
CFLAGS=-I${zlib:location}/include -I${libuuid:location}/include CFLAGS=-I${zlib:location}/include -I${libuuid:location}/include
......
...@@ -6,9 +6,10 @@ parts = ...@@ -6,9 +6,10 @@ parts =
[snappy] [snappy]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/google/snappy/archive/1.1.8.tar.gz url = https://github.com/google/snappy/archive/1.1.8.tar.gz
md5sum = 70e48cba7fecf289153d009791c9977f md5sum = 70e48cba7fecf289153d009791c9977f
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = @@LOCATION@@
configure-command = ${cmake:location}/bin/cmake configure-command = ${cmake:location}/bin/cmake
configure-options = configure-options =
-DCMAKE_INSTALL_PREFIX=${:location} -DCMAKE_INSTALL_PREFIX=${:location}
......
...@@ -20,6 +20,7 @@ parts = ...@@ -20,6 +20,7 @@ parts =
[subversion] [subversion]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true
url = http://apache.mirrors.tds.net/subversion/subversion-1.8.14.tar.bz2 url = http://apache.mirrors.tds.net/subversion/subversion-1.8.14.tar.bz2
md5sum = fe476ba26d6835eba4393780ea907361 md5sum = fe476ba26d6835eba4393780ea907361
# Patch available thanks to gentoo developpers # Patch available thanks to gentoo developpers
...@@ -28,8 +29,8 @@ patches = ...@@ -28,8 +29,8 @@ patches =
${:_profile_base_location_}/subversion-fix-parallel-build-support-for-perl-bindings.patch#fd69f4c932b4882ed98c59eb102be64a ${:_profile_base_location_}/subversion-fix-parallel-build-support-for-perl-bindings.patch#fd69f4c932b4882ed98c59eb102be64a
configure-options = configure-options =
--disable-static --disable-static
--with-apr=${apache:location}/bin/apr-1-config --with-apr=${apr:location}
--with-apr-util=${apache:location}/bin/apu-1-config --with-apr-util=${apr-util:location}
--with-serf=yes --with-serf=yes
--without-apxs --without-apxs
--with-zlib=${zlib:location} --with-zlib=${zlib:location}
...@@ -87,7 +88,7 @@ configure-options = ...@@ -87,7 +88,7 @@ configure-options =
make-options = make-options =
-j1 -j1
make-targets = make-targets =
install install
swig-py swig-py
install-swig-py install-swig-py
......
...@@ -107,7 +107,6 @@ setup(name=name, ...@@ -107,7 +107,6 @@ setup(name=name,
'erp5.promise = slapos.recipe.erp5_promise:Recipe', 'erp5.promise = slapos.recipe.erp5_promise:Recipe',
'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe', 'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe',
'erp5testnode = slapos.recipe.erp5testnode:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe',
'fontconfig = slapos.recipe.fontconfig:Recipe',
'free_port = slapos.recipe.free_port:Recipe', 'free_port = slapos.recipe.free_port:Recipe',
'generate.mac = slapos.recipe.random:Mac', 'generate.mac = slapos.recipe.random:Mac',
'generate.password = slapos.recipe.random:Password', 'generate.password = slapos.recipe.random:Password',
......
...@@ -24,7 +24,7 @@ Here is an example of a section to add in your software.cfg : ...@@ -24,7 +24,7 @@ Here is an example of a section to add in your software.cfg :
openoffice-port = 1235 openoffice-port = 1235
ooo-binary-path = ${directory:libreoffice-bin}/program ooo-binary-path = ${directory:libreoffice-bin}/program
environment = environment =
FONTCONFIG_FILE = ${fontconfig-instance:conf-path} FONTCONFIG_FILE = $${fontconfig-conf:rendered}
PATH = ${binary-link:target-directory} PATH = ${binary-link:target-directory}
ooo-uno-path = ${directory:libreoffice-bin}/basis-link/program ooo-uno-path = ${directory:libreoffice-bin}/basis-link/program
......
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import pkg_resources
import os
import zc.buildout
class Recipe(GenericBaseRecipe):
"""
fontconfig instance configuration.
conf-path -- location of the configuration file
font-system-folder -- fonts installed by software release
font-folder -- location where to download fonts
"""
def install(self):
created_file_list = []
font_folder = self.options['font-folder']
service_folder = self.options['service-folder']
snippet_filename = self.getTemplateFilename(
'fontconfig-snippet.cfg.in')
font_snippet_list = [self.substituteTemplate(snippet_filename,
dict(font_folder_path=self.options['font-system-folder']))]
font_snippet_list.append(self.substituteTemplate(snippet_filename,
dict(font_folder_path=font_folder)))
config = dict(
font_folder_path_snippet=''.join(font_snippet_list),
)
template_filename = self.getTemplateFilename('fontconfig.cfg.in')
configuration_path = self.createFile(
self.options['conf-path'],
self.substituteTemplate(template_filename, config))
created_file_list.append(configuration_path)
return created_file_list
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<cachedir>~/.fontconfig</cachedir>
%(font_folder_path_snippet)s
</fontconfig>
\ No newline at end of file
...@@ -38,6 +38,11 @@ parts += ...@@ -38,6 +38,11 @@ parts +=
proxy-by-url proxy-by-url
http-proxy http-proxy
[apache]
# install apache not shared, so that we can install antiloris modules
shared = true
[extra-eggs] [extra-eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
......
...@@ -18,4 +18,4 @@ md5sum = 6e4431cf4b0a0d034402604b1e2844c0 ...@@ -18,4 +18,4 @@ md5sum = 6e4431cf4b0a0d034402604b1e2844c0
[template-cloudooo-instance] [template-cloudooo-instance]
filename = instance-cloudooo.cfg.in filename = instance-cloudooo.cfg.in
md5sum = 5fc0919cc3eab365f773c6eb73f9c6c3 md5sum = e01ee969a45d44d386653a9eb699cc59
...@@ -167,13 +167,31 @@ recipe = slapos.cookbook:publish.serialised ...@@ -167,13 +167,31 @@ recipe = slapos.cookbook:publish.serialised
{{ family_name }} = {{ scheme ~ '://' ~ ipv4 ~ ':' ~ apache_port }} {{ family_name }} = {{ scheme ~ '://' ~ ipv4 ~ ':' ~ apache_port }}
{% endfor -%} {% endfor -%}
[fontconfig-conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-fonts-conf'] }}
rendered = ${directory:etc}/fonts.conf
context =
key cachedir directory:fontconfig-cache
key fonts :fonts
key includes :includes
fonts =
{% for font in parameter_dict['fonts'].splitlines() %}
{{ font }}
{% endfor%}
${directory:font}
includes =
{% for include in parameter_dict['fontconfig-includes'].splitlines() %}
{{ include }}
{% endfor%}
[cloudooo-base] [cloudooo-base]
recipe = slapos.cookbook:generic.cloudooo recipe = slapos.cookbook:generic.cloudooo
ip = {{ ipv4 }} ip = {{ ipv4 }}
environment = environment =
LD_LIBRARY_PATH = {{ parameter_dict['cairo'] }}/lib:{{ parameter_dict['cups'] }}/lib:{{ parameter_dict['cups'] }}/lib64:{{ parameter_dict['dbus'] }}/lib:{{ parameter_dict['dbus-glib'] }}/lib:{{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['glib'] }}/lib:{{ parameter_dict['glu'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['libexpat'] }}/lib:{{ parameter_dict['libffi'] }}/lib:{{ parameter_dict['libffi'] }}/lib64:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['mesa'] }}/lib:{{ parameter_dict['pixman'] }}/lib:{{ parameter_dict['xdamage'] }}/lib:{{ parameter_dict['xfixes'] }}/lib:{{ parameter_dict['zlib'] }}/lib LD_LIBRARY_PATH = {{ parameter_dict['cairo'] }}/lib:{{ parameter_dict['cups'] }}/lib:{{ parameter_dict['cups'] }}/lib64:{{ parameter_dict['dbus'] }}/lib:{{ parameter_dict['dbus-glib'] }}/lib:{{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['glib'] }}/lib:{{ parameter_dict['glu'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['libexpat'] }}/lib:{{ parameter_dict['libffi'] }}/lib:{{ parameter_dict['libffi'] }}/lib64:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['mesa'] }}/lib:{{ parameter_dict['pixman'] }}/lib:{{ parameter_dict['xdamage'] }}/lib:{{ parameter_dict['xfixes'] }}/lib:{{ parameter_dict['zlib'] }}/lib
FONTCONFIG_FILE = ${fontconfig-instance:conf-path} FONTCONFIG_FILE = ${fontconfig-conf:rendered}
PATH = ${binary-link:target-directory} PATH = ${binary-link:target-directory}
mimetype_entry_addition = mimetype_entry_addition =
{% for entry in mimetype_entry_addition.splitlines() -%} {% for entry in mimetype_entry_addition.splitlines() -%}
...@@ -226,14 +244,6 @@ configuration-file = ${cloudooo-0:configuration-file} ...@@ -226,14 +244,6 @@ configuration-file = ${cloudooo-0:configuration-file}
run-unit-test-binary = {{ bin_directory }}/runCloudoooUnitTest run-unit-test-binary = {{ bin_directory }}/runCloudoooUnitTest
run-test-suite-binary = {{ bin_directory }}/runCloudoooTestSuite run-test-suite-binary = {{ bin_directory }}/runCloudoooTestSuite
[fontconfig-instance]
recipe = slapos.cookbook:fontconfig
conf-path = ${directory:etc}/font.conf
font-system-folder = {{ parameter_dict['fonts'] }}
font-folder = ${directory:font}
service-folder = ${directory:services}
[binary-link] [binary-link]
recipe = slapos.cookbook:symbolic.link recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:bin} target-directory = ${directory:bin}
...@@ -264,6 +274,7 @@ certs = ${:ca-dir}/certs ...@@ -264,6 +274,7 @@ certs = ${:ca-dir}/certs
crl = ${:ca-dir}/crl crl = ${:ca-dir}/crl
etc = ${buildout:directory}/etc etc = ${buildout:directory}/etc
font = ${:srv}/font font = ${:srv}/font
fontconfig-cache = ${buildout:directory}/.fontconfig
log = ${:var}/log log = ${:var}/log
newcerts = ${:ca-dir}/newcerts newcerts = ${:ca-dir}/newcerts
private = ${:ca-dir}/private private = ${:ca-dir}/private
......
...@@ -54,7 +54,23 @@ dbus = ${dbus:location} ...@@ -54,7 +54,23 @@ dbus = ${dbus:location}
dbus-glib = ${dbus-glib:location} dbus-glib = ${dbus-glib:location}
file = ${file:location} file = ${file:location}
fontconfig = ${fontconfig:location} fontconfig = ${fontconfig:location}
fonts = ${fonts:location} template-fonts-conf = ${template-fonts-conf:output}
fonts =
${android-fonts:location}
${ipa-fonts:location}
${ipaex-fonts:location}
${liberation-fonts:location}
${ocrb-fonts:location}
# XXX These fonts have always been missing in cloudooo, but we want
# keep compatibility a little bit more.
# ${dejavu-fonts:location}
# ${libreoffice-bin:location}/share/fonts/
# XXX fonts-include also have always been missing, which causes wrong
# font selections in cloudooo, such as using a serif fonts for Arial
fontconfig-includes =
# ${fontconfig:location}/etc/fonts/conf.d
freetype = ${freetype:location} freetype = ${freetype:location}
glib = ${glib:location} glib = ${glib:location}
glu = ${glu:location} glu = ${glu:location}
......
...@@ -182,6 +182,49 @@ class TestMroonga(MariaDBTestCase): ...@@ -182,6 +182,49 @@ class TestMroonga(MariaDBTestCase):
cnx.store_result().fetch_row(maxrows=2), cnx.store_result().fetch_row(maxrows=2),
) )
def test_mroonga_full_text_normalizer_TokenBigramSplitSymbolAlphaDigit(self):
# Similar to as ERP5's testI18NSearch with erp5_full_text_mroonga_catalog
cnx = self.getDatabaseConnection()
with contextlib.closing(cnx):
cnx.query(
"""
CREATE TABLE `full_text` (
`uid` BIGINT UNSIGNED NOT NULL,
`SearchableText` MEDIUMTEXT,
PRIMARY KEY (`uid`),
FULLTEXT `SearchableText` (`SearchableText`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"'
) ENGINE=mroonga
""")
cnx.store_result()
cnx.query(
"""
INSERT INTO full_text VALUES
(1, "Gabriel Fauré Quick brown fox jumps over the lazy dog"),
(2, "武者小路 実篤 Slow white fox jumps over the diligent dog."),
(3, "( - + )")""")
cnx.store_result()
cnx.query(
"""
SELECT uid
FROM full_text
WHERE MATCH (`full_text`.`SearchableText`) AGAINST ('*D+ Faure' IN BOOLEAN MODE)
""")
self.assertEqual(((1,),), cnx.store_result().fetch_row(maxrows=2))
cnx.query(
"""
SELECT uid
FROM full_text
WHERE MATCH (`full_text`.`SearchableText`) AGAINST ('*D+ 武者' IN BOOLEAN MODE)
""")
self.assertEqual(((2,),), cnx.store_result().fetch_row(maxrows=2))
cnx.query(
"""
SELECT uid
FROM full_text
WHERE MATCH (`full_text`.`SearchableText`) AGAINST ('*D+ +quick +fox +dog' IN BOOLEAN MODE)
""")
self.assertEqual(((1,),), cnx.store_result().fetch_row(maxrows=2))
def test_mroonga_full_text_stem(self): def test_mroonga_full_text_stem(self):
# example from https://mroonga.org//docs/tutorial/storage.html#how-to-specify-the-token-filters # example from https://mroonga.org//docs/tutorial/storage.html#how-to-specify-the-token-filters
cnx = self.getDatabaseConnection() cnx = self.getDatabaseConnection()
......
...@@ -15,12 +15,8 @@ ...@@ -15,12 +15,8 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = f35aa36b41cd197ab3d763dcb884e96a md5sum = d1dff3fc39eefc57b36dbaa195b6890e
[tomcat-server-xml] [tomcat-server-xml]
filename = server.xml.in filename = server.xml.in
md5sum = fdfa7eb249082855039ca98f310324e9 md5sum = fdfa7eb249082855039ca98f310324e9
[font.conf]
filename = font.conf.in
md5sum = caa3463c9c3766ac5f2396a517d6f926
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<cachedir>$${:fontcache}</cachedir>
<!-- installed fonts: $${:installed-fonts} -->
<dir>${fonts:location}</dir>
<dir>$${:fonts}</dir>
<include>${fontconfig:location}/etc/fonts/conf.d</include>
</fontconfig>
\ No newline at end of file
...@@ -10,20 +10,23 @@ offline = true ...@@ -10,20 +10,23 @@ offline = true
extends = ${monitor2-template:rendered} extends = ${monitor2-template:rendered}
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template recipe = slapos.recipe.template:jinja2
url = ${font.conf:output} template = ${template-fonts-conf:output}
output = $${directory:etc}/font.conf rendered = $${directory:etc}/fonts.conf
context =
fonts = $${directory:fonts} key cachedir directory:fontconfig-cache
fontcache = $${directory:fontcache} key fonts :fonts
installed-fonts = key includes :includes
${liberation-fonts:location} fonts =
${ipaex-fonts:location} ${android-fonts:location}
${ipa-fonts:location} ${dejavu-fonts:location}
${ocrb-fonts:location} ${ipa-fonts:location}
${android-fonts:location} ${ipaex-fonts:location}
${dejavu-fonts:location} ${liberation-fonts:location}
${ocrb-fonts:location}
$${directory:fonts}
includes =
${fontconfig:location}/etc/fonts/conf.d
[tomcat-server-xml] [tomcat-server-xml]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${tomcat-server-xml:output} url = ${tomcat-server-xml:output}
...@@ -59,7 +62,7 @@ environment = ...@@ -59,7 +62,7 @@ environment =
JRE_HOME=${java-re-8:location} JRE_HOME=${java-re-8:location}
CATALINA_BASE=$${directory:catalina_base} CATALINA_BASE=$${directory:catalina_base}
GRAPHVIZ_DOT=${graphviz:location}/bin/dot GRAPHVIZ_DOT=${graphviz:location}/bin/dot
FONTCONFIG_FILE=$${fontconfig-conf:output} FONTCONFIG_FILE=$${fontconfig-conf:rendered}
LD_LIBRARY_PATH=${fontconfig:location}/lib:${freetype:location}/lib LD_LIBRARY_PATH=${fontconfig:location}/lib:${freetype:location}/lib
# XXX java is still loading system fonts ... ( even with $JAVA_FONTS or -Djava.awt.fonts ) # XXX java is still loading system fonts ... ( even with $JAVA_FONTS or -Djava.awt.fonts )
# related links: # related links:
...@@ -110,9 +113,8 @@ srv = $${buildout:directory}/srv ...@@ -110,9 +113,8 @@ srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp tmp = $${buildout:directory}/tmp
services = $${:etc}/service services = $${:etc}/service
fontconfig-cache = $${buildout:directory}/.fontconfig
fonts = $${:srv}/fonts/ fonts = $${:srv}/fonts/
fontcache = $${buildout:directory}/.fontcache/
# tomcat directories # tomcat directories
catalina_base = $${:var}/tomcat catalina_base = $${:var}/tomcat
......
...@@ -25,11 +25,6 @@ recipe = slapos.recipe.template ...@@ -25,11 +25,6 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
[font.conf]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:_buildout_section_name_}
[plantuml.war] [plantuml.war]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = https://downloads.sourceforge.net/project/plantuml/1.2018.13/plantuml.1.2018.13.war url = https://downloads.sourceforge.net/project/plantuml/1.2018.13/plantuml.1.2018.13.war
......
...@@ -19,4 +19,4 @@ md5sum = c4ac5de141ae6a64848309af03e51d88 ...@@ -19,4 +19,4 @@ md5sum = c4ac5de141ae6a64848309af03e51d88
[template-selenium] [template-selenium]
filename = instance-selenium.cfg.in filename = instance-selenium.cfg.in
md5sum = 1f0b67d2a542e94380c35afc9cd1946b md5sum = 269ac5ce96695ede3ee917c6ce17ae2d
...@@ -6,15 +6,28 @@ parts = ...@@ -6,15 +6,28 @@ parts =
extends = ${monitor-template:rendered} extends = ${monitor-template:rendered}
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[fontconfig-instance] [fontconfig-conf]
recipe = slapos.cookbook:fontconfig recipe = slapos.recipe.template:jinja2
conf-path = $${directory:etc}/font.conf template = ${template-fonts-conf:output}
font-system-folder = ${fonts:location} rendered = $${directory:etc}/fonts.conf
font-folder = $${directory:fonts} context =
service-folder = $${directory:services} key cachedir directory:fontconfig-cache
key fonts :fonts
key includes :includes
fonts =
${android-fonts:location}
${dejavu-fonts:location}
${ipa-fonts:location}
${ipaex-fonts:location}
${liberation-fonts:location}
${ocrb-fonts:location}
$${directory:fonts}
# XXX we don't include conf.d for now, to keep compatibility with current font selection problems.
includes =
# ${fontconfig:location}/etc/fonts/conf.d
[xvfb-instance] [xvfb-instance]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
...@@ -79,7 +92,7 @@ environment = ...@@ -79,7 +92,7 @@ environment =
PATH=${buildout:bin-directory} PATH=${buildout:bin-directory}
XORG_LOCK_DIR=$${directory:tmp} XORG_LOCK_DIR=$${directory:tmp}
DISPLAY=$${xvfb-instance:display} DISPLAY=$${xvfb-instance:display}
FONTCONFIG_FILE=$${fontconfig-instance:conf-path} FONTCONFIG_FILE=$${fontconfig-conf:rendered}
hostname = $${instance-parameter:ipv4-random} hostname = $${instance-parameter:ipv4-random}
...@@ -331,5 +344,7 @@ tmp = $${buildout:directory}/tmp ...@@ -331,5 +344,7 @@ tmp = $${buildout:directory}/tmp
services = $${:etc}/service services = $${:etc}/service
framebuffer = $${:srv}/framebuffer framebuffer = $${:srv}/framebuffer
fonts = $${:srv}/fonts/ fonts = $${:srv}/fonts/
fontconfig-cache = $${buildout:directory}/.fontconfig
ssh = $${:etc}/ssh ssh = $${:etc}/ssh
run = $${:var}/run run = $${:var}/run
\ No newline at end of file
...@@ -12,6 +12,8 @@ extends = ...@@ -12,6 +12,8 @@ extends =
../../component/java/buildout.cfg ../../component/java/buildout.cfg
../../component/caddy/buildout.cfg ../../component/caddy/buildout.cfg
../../component/openssh/buildout.cfg ../../component/openssh/buildout.cfg
../../component/fonts/buildout.cfg
../../component/fontconfig/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
./buildout.hash.cfg ./buildout.hash.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
......
...@@ -9,6 +9,7 @@ extends = ...@@ -9,6 +9,7 @@ extends =
../component/dbus/buildout.cfg ../component/dbus/buildout.cfg
../component/dcron/buildout.cfg ../component/dcron/buildout.cfg
../component/file/buildout.cfg ../component/file/buildout.cfg
../component/fontconfig/buildout.cfg
../component/fonts/buildout.cfg ../component/fonts/buildout.cfg
../component/git/buildout.cfg ../component/git/buildout.cfg
../component/glib/buildout.cfg ../component/glib/buildout.cfg
...@@ -44,13 +45,6 @@ parts = ...@@ -44,13 +45,6 @@ parts =
libSM libSM
libXrender libXrender
# fonts
liberation-fonts
ipaex-fonts
ipa-fonts
ocrb-fonts
android-fonts
# Dependencies # Dependencies
cups cups
dbus dbus
...@@ -68,7 +62,6 @@ parts = ...@@ -68,7 +62,6 @@ parts =
rdiff-backup rdiff-backup
apache apache
apache-antiloris
haproxy haproxy
cloudooo-develop cloudooo-develop
cloudooo cloudooo
......
...@@ -59,8 +59,6 @@ parts += ...@@ -59,8 +59,6 @@ parts +=
erp5-util-develop erp5-util-develop
slapos-cookbook slapos-cookbook
rdiff-backup rdiff-backup
aspell-en-dictionary
apache-antiloris
mroonga-mariadb mroonga-mariadb
tesseract tesseract
tesseract-eng-traineddata tesseract-eng-traineddata
...@@ -73,13 +71,6 @@ parts += ...@@ -73,13 +71,6 @@ parts +=
testrunner testrunner
test_suite_runner test_suite_runner
# fonts
liberation-fonts
ipaex-fonts
ipa-fonts
ocrb-fonts
android-fonts
# get git repositories # get git repositories
genbt5list genbt5list
...@@ -106,12 +97,6 @@ rendered = ${buildout:directory}/template-jupyter.cfg ...@@ -106,12 +97,6 @@ rendered = ${buildout:directory}/template-jupyter.cfg
<= download-base-neo <= download-base-neo
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[mariadb-start-clone-from-backup] [mariadb-start-clone-from-backup]
<= download-base <= download-base
mode = 755 mode = 755
...@@ -178,6 +163,8 @@ mode = 640 ...@@ -178,6 +163,8 @@ mode = 640
context = context =
key mariadb_link_binary template-mariadb:link-binary key mariadb_link_binary template-mariadb:link-binary
key zope_link_binary template-zope:link-binary key zope_link_binary template-zope:link-binary
key zope_fonts template-zope:fonts
key zope_fontconfig_includes template-zope:fontconfig-includes
key apache_location apache:location key apache_location apache:location
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key buildout_bin_directory buildout:bin-directory key buildout_bin_directory buildout:bin-directory
...@@ -204,6 +191,9 @@ context = ...@@ -204,6 +191,9 @@ context =
key mariadb_slow_query_report_script mariadb-slow-query-report-script:target key mariadb_slow_query_report_script mariadb-slow-query-report-script:target
key mariadb_start_clone_from_backup mariadb-start-clone-from-backup:target key mariadb_start_clone_from_backup mariadb-start-clone-from-backup:target
key mroonga_mariadb_install_sql mroonga-mariadb:install-sql key mroonga_mariadb_install_sql mroonga-mariadb:install-sql
key mroonga_mariadb_plugin_dir mroonga-mariadb:plugin-dir
key groonga_plugin_dir groonga:groonga-plugin-dir
key groonga_mysql_normalizer_plugin_dir groonga-normalizer-mysql:groonga-plugin-dir
key matplotlibrc_location matplotlibrc:location key matplotlibrc_location matplotlibrc:location
key parts_directory buildout:parts-directory key parts_directory buildout:parts-directory
key openssl_location openssl:location key openssl_location openssl:location
...@@ -232,6 +222,7 @@ context = ...@@ -232,6 +222,7 @@ context =
key template_zeo template-zeo:target key template_zeo template-zeo:target
key template_zope template-zope:target key template_zope template-zope:target
key template_zope_conf template-zope-conf:target key template_zope_conf template-zope-conf:target
key template_fonts_conf template-fonts-conf:output
key userhosts_location userhosts:location key userhosts_location userhosts:location
key unixodbc_location unixodbc:location key unixodbc_location unixodbc:location
key wget_location wget:location key wget_location wget:location
...@@ -246,7 +237,7 @@ context = ...@@ -246,7 +237,7 @@ context =
[template-zope] [template-zope]
<= download-base <= download-base
link-binary = link-binary =
${aspell:location}/bin/aspell ${aspell-en-dictionary:bin-aspell}
${dmtx-utils:location}/bin/dmtxwrite ${dmtx-utils:location}/bin/dmtxwrite
${git:location}/bin/git ${git:location}/bin/git
${graphviz:location}/bin/dot ${graphviz:location}/bin/dot
...@@ -264,6 +255,15 @@ link-binary = ...@@ -264,6 +255,15 @@ link-binary =
${sed:location}/bin/sed ${sed:location}/bin/sed
${tesseract:location}/bin/tesseract ${tesseract:location}/bin/tesseract
${w3m:location}/bin/w3m ${w3m:location}/bin/w3m
fonts =
${liberation-fonts:location}
${ipaex-fonts:location}
${ipa-fonts:location}
${ocrb-fonts:location}
${android-fonts:location}
fontconfig-includes =
${fontconfig:location}/etc/fonts/conf.d
[template-balancer] [template-balancer]
<= download-base <= download-base
......
...@@ -26,7 +26,7 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196 ...@@ -26,7 +26,7 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 63bac9fc58537e55a6c8c42d0be54fbe md5sum = bfed6ac56c3ba0e96be4c9474dac6f20
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
...@@ -42,7 +42,7 @@ md5sum = d32417746fcf671d4e86a70379815039 ...@@ -42,7 +42,7 @@ md5sum = d32417746fcf671d4e86a70379815039
[template-my-cnf] [template-my-cnf]
filename = my.cnf.in filename = my.cnf.in
md5sum = 771bfd921aa5e59e1b4712ba113fa84b md5sum = 7944ec58a2c6ee74a56219bacebfd145
[template-mariadb-initial-setup] [template-mariadb-initial-setup]
filename = mariadb_initial_setup.sql.in filename = mariadb_initial_setup.sql.in
...@@ -70,7 +70,7 @@ md5sum = cc19560b9400cecbd23064d55c501eec ...@@ -70,7 +70,7 @@ md5sum = cc19560b9400cecbd23064d55c501eec
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 1a218a5676208dda092e6045f25bf77f md5sum = e19aaec1878f40bf4ddb4c45a4470b21
[monitor-template-dummy] [monitor-template-dummy]
filename = dummy.cfg filename = dummy.cfg
...@@ -86,7 +86,7 @@ md5sum = 0648e38bd5d3a15bb9f93264932740b9 ...@@ -86,7 +86,7 @@ md5sum = 0648e38bd5d3a15bb9f93264932740b9
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = e9032f39c6e5db684342491fdeb4624c md5sum = 2f3ddd328ac1c375e483ecb2ef5ffb57
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -129,6 +129,8 @@ socket = ${directory:run}/mariadb.sock ...@@ -129,6 +129,8 @@ socket = ${directory:run}/mariadb.sock
data-directory = ${directory:srv}/mariadb data-directory = ${directory:srv}/mariadb
tmp-directory = ${directory:tmp} tmp-directory = ${directory:tmp}
etc-directory = ${directory:etc} etc-directory = ${directory:etc}
plugin-directory = {{ dumps(parameter_dict['mroonga-mariadb-plugin-dir']) }}
groonga-plugins-path = {{ parameter_dict['groonga-plugins-path'] }}
pid-file = ${directory:run}/mariadb.pid pid-file = ${directory:run}/mariadb.pid
error-log = ${directory:log}/mariadb_error.log error-log = ${directory:log}/mariadb_error.log
slow-query-log = ${directory:log}/mariadb_slowquery.log slow-query-log = ${directory:log}/mariadb_slowquery.log
...@@ -186,6 +188,7 @@ context = ...@@ -186,6 +188,7 @@ context =
key datadir my-cnf-parameters:data-directory key datadir my-cnf-parameters:data-directory
key environ :environ key environ :environ
environ = environ =
GRN_PLUGINS_PATH='${my-cnf-parameters:groonga-plugins-path}'
ODBCSYSINI='${my-cnf-parameters:etc-directory}' ODBCSYSINI='${my-cnf-parameters:etc-directory}'
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}'{{ parameter_dict['unixodbc-location'] }}/lib' LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}'{{ parameter_dict['unixodbc-location'] }}/lib'
{%- for variable in slapparameter_dict.get('environment-variables', ()) %} {%- for variable in slapparameter_dict.get('environment-variables', ()) %}
...@@ -242,7 +245,7 @@ command = mysql_tzinfo_to_sql ...@@ -242,7 +245,7 @@ command = mysql_tzinfo_to_sql
<= binary-wrap-base <= binary-wrap-base
command-line = "{{ parameter_dict['percona-tools-location'] }}/bin/${:command}" command-line = "{{ parameter_dict['percona-tools-location'] }}/bin/${:command}"
command = pt-query-digest command = pt-query-digest
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -319,7 +322,7 @@ template = {{ parameter_dict['mariadb-slow-query-report-script'] }} ...@@ -319,7 +322,7 @@ template = {{ parameter_dict['mariadb-slow-query-report-script'] }}
rendered = ${directory:bin}/${:filename} rendered = ${directory:bin}/${:filename}
filename = generate-mariadb-slow-query-report filename = generate-mariadb-slow-query-report
mode = 755 mode = 755
context = context =
raw slow_query_path ${directory:srv}/backup/logrotate/mariadb_slowquery.log raw slow_query_path ${directory:srv}/backup/logrotate/mariadb_slowquery.log
raw pt_query_exec ${binary-wrap-pt-digest:wrapper-path} raw pt_query_exec ${binary-wrap-pt-digest:wrapper-path}
raw dash {{ parameter_dict['dash-location'] }}/bin/dash raw dash {{ parameter_dict['dash-location'] }}/bin/dash
......
...@@ -58,6 +58,7 @@ environment += ...@@ -58,6 +58,7 @@ environment +=
MATPLOTLIBRC={{ parameter_dict['matplotlibrc'] }} MATPLOTLIBRC={{ parameter_dict['matplotlibrc'] }}
INSTANCE_HOME=${:instance-home} INSTANCE_HOME=${:instance-home}
CAUCASE={{ slapparameter_dict['caucase-url'] }} CAUCASE={{ slapparameter_dict['caucase-url'] }}
FONTCONFIG_FILE=${fontconfig-conf:rendered}
{% if slapparameter_dict.get('wendelin-core-zblk-fmt') %} {% if slapparameter_dict.get('wendelin-core-zblk-fmt') %}
WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }} WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }}
{% endif %} {% endif %}
...@@ -88,6 +89,24 @@ tmp = ${buildout:directory}/tmp ...@@ -88,6 +89,24 @@ tmp = ${buildout:directory}/tmp
var = ${buildout:directory}/var var = ${buildout:directory}/var
plugin = ${:etc}/plugin plugin = ${:etc}/plugin
unit-test-path = ${:srv}/test-instance/unit_test unit-test-path = ${:srv}/test-instance/unit_test
fontconfig-cache = ${buildout:directory}/.fontconfig
[fontconfig-conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-fonts-conf'] }}
rendered = ${directory:etc}/fonts.conf
context =
key cachedir directory:fontconfig-cache
key fonts :fonts
key includes :includes
fonts =
{% for font in parameter_dict['fonts'].splitlines() %}
{{ font }}
{% endfor %}
includes =
{% for include in parameter_dict['fontconfig-includes'].splitlines() %}
{{ include }}
{% endfor %}
# Used for ERP5 resiliency or (more probably) # Used for ERP5 resiliency or (more probably)
# webrunner resiliency with erp5 inside. # webrunner resiliency with erp5 inside.
...@@ -308,7 +327,7 @@ node-id = {{ dumps(node_id_base ~ (node_id_index_format % index)) }} ...@@ -308,7 +327,7 @@ node-id = {{ dumps(node_id_base ~ (node_id_index_format % index)) }}
{% endfor -%} {% endfor -%}
import-list = {{ dumps(list(import_set)) }} import-list = {{ dumps(list(import_set)) }}
zodb-dict = {{ dumps(zodb_dict) }} zodb-dict = {{ dumps(zodb_dict) }}
large-file-threshold = {{ large_file_threshold }} large-file-threshold = {{ large_file_threshold }}
{% if longrequest_logger_interval > 0 -%} {% if longrequest_logger_interval > 0 -%}
longrequest-logger-file = {{ longrequest_logger_base_path ~ name ~ ".log" }} longrequest-logger-file = {{ longrequest_logger_base_path ~ name ~ ".log" }}
longrequest-logger-timeout = {{ longrequest_logger_timeout }} longrequest-logger-timeout = {{ longrequest_logger_timeout }}
......
...@@ -99,6 +99,9 @@ perl_dbd_mariadb_path = {{ perl_dbd_mariadb_path }} ...@@ -99,6 +99,9 @@ perl_dbd_mariadb_path = {{ perl_dbd_mariadb_path }}
dash = {{ dash_location }} dash = {{ dash_location }}
jsl = {{ jsl_location }} jsl = {{ jsl_location }}
link-binary = {{ dumps(zope_link_binary) }} link-binary = {{ dumps(zope_link_binary) }}
fonts = {{ dumps(zope_fonts) }}
fontconfig-includes = {{ dumps(zope_fontconfig_includes) }}
template-fonts-conf = {{ dumps(template_fonts_conf) }}
userhosts = {{ userhosts_location }} userhosts = {{ userhosts_location }}
site-zcml = {{ site_zcml }} site-zcml = {{ site_zcml }}
extra-path-list = {{ dumps(extra_path_list) }} extra-path-list = {{ dumps(extra_path_list) }}
...@@ -152,6 +155,8 @@ promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-querie ...@@ -152,6 +155,8 @@ promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-querie
percona-tools-location = {{ percona_toolkit_location }} percona-tools-location = {{ percona_toolkit_location }}
unixodbc-location = {{ unixodbc_location }} unixodbc-location = {{ unixodbc_location }}
mroonga-mariadb-install-sql = {{ mroonga_mariadb_install_sql }} mroonga-mariadb-install-sql = {{ mroonga_mariadb_install_sql }}
mroonga-mariadb-plugin-dir = {{ mroonga_mariadb_plugin_dir }}
groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plugin_dir }}
[dynamic-template-mariadb] [dynamic-template-mariadb]
<= jinja2-template-base <= jinja2-template-base
......
...@@ -32,6 +32,7 @@ innodb_file_per_table = {{ parameter_dict['innodb-file-per-table'] }} ...@@ -32,6 +32,7 @@ innodb_file_per_table = {{ parameter_dict['innodb-file-per-table'] }}
default_time_zone = '+00:00' default_time_zone = '+00:00'
plugin_load = ha_mroonga plugin_load = ha_mroonga
plugin-dir = {{ parameter_dict['plugin-directory'] }}
max_connections = {{ parameter_dict['max-connection-count'] }} max_connections = {{ parameter_dict['max-connection-count'] }}
......
...@@ -20,11 +20,8 @@ parts = ...@@ -20,11 +20,8 @@ parts =
extends = extends =
buildout.hash.cfg buildout.hash.cfg
../../component/apache-php/buildout.cfg
../../component/apache/buildout.cfg
../../component/curl/buildout.cfg ../../component/curl/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/dash/buildout.cfg
../../component/dropbear/buildout.cfg ../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg ../../component/git/buildout.cfg
../../component/glib/buildout.cfg ../../component/glib/buildout.cfg
...@@ -38,6 +35,7 @@ extends = ...@@ -38,6 +35,7 @@ extends =
../logrotate/buildout.cfg ../logrotate/buildout.cfg
../resilient/buildout.cfg ../resilient/buildout.cfg
../erp5/buildout.cfg ../erp5/buildout.cfg
../../component/apache-php/buildout.cfg
../slapos.cfg ../slapos.cfg
...@@ -104,6 +102,9 @@ context = ...@@ -104,6 +102,9 @@ context =
key mariadb_slow_query_report_script mariadb-slow-query-report-script:target key mariadb_slow_query_report_script mariadb-slow-query-report-script:target
key mariadb_start_clone_from_backup mariadb-start-clone-from-backup:target key mariadb_start_clone_from_backup mariadb-start-clone-from-backup:target
key mroonga_mariadb_install_sql mroonga-mariadb:install-sql key mroonga_mariadb_install_sql mroonga-mariadb:install-sql
key mroonga_mariadb_plugin_dir mroonga-mariadb:plugin-dir
key groonga_plugin_dir groonga:groonga-plugin-dir
key groonga_mysql_normalizer_plugin_dir groonga-normalizer-mysql:groonga-plugin-dir
key percona_toolkit_location percona-toolkit:location key percona_toolkit_location percona-toolkit:location
key template_php_ini template-php.ini:output key template_php_ini template-php.ini:output
key template_apache_conf template-apache.conf:output key template_apache_conf template-apache.conf:output
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 92a93bb3b9f6663d967b0fb57244a1fa md5sum = 6efa60dd898d3cd568afb4a47b94d573
[instance-apache-php] [instance-apache-php]
filename = instance-apache-php.cfg.in filename = instance-apache-php.cfg.in
......
...@@ -90,6 +90,8 @@ promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-querie ...@@ -90,6 +90,8 @@ promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-querie
percona-tools-location = {{ percona_toolkit_location }} percona-tools-location = {{ percona_toolkit_location }}
unixodbc-location = {{ unixodbc_location }} unixodbc-location = {{ unixodbc_location }}
mroonga-mariadb-install-sql = {{ mroonga_mariadb_install_sql }} mroonga-mariadb-install-sql = {{ mroonga_mariadb_install_sql }}
mroonga-mariadb-plugin-dir = {{ mroonga_mariadb_plugin_dir }}
groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plugin_dir }}
check-computer-memory-binary = {{ bin_directory }}/check-computer-memory check-computer-memory-binary = {{ bin_directory }}/check-computer-memory
bin-directory = {{ bin_directory }} bin-directory = {{ bin_directory }}
......
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