Commit e8344ec2 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge branch 'master' into cubrid

parents 458ec378 9e30d34b
Changes
=======
0.19 (Unreleased)
0.30 (unreleased)
-----------------
* No change yet.
* LAMP : Update apache and php configuration files to work with a lot of different
PHP software. [Alain Takoudjou Kamdem]
0.29 (2011-09-28)
-----------------
* mysql: bug fix on database recovering (avoid importing dump two times). [Antoine Catton]
0.28 (2011-09-27)
-----------------
* lamp.request: requesting the mariadb software release instead of itself. [Antoine Catton]
* lamp.request: adding support of remote backup repo (using a different
software type). The default remote backup is a davstorage. [Antoine Catton]
0.27 (2011-09-27)
-----------------
* mysql: add backup and backup recovering using different software type. [Antoine Catton]
0.26 (2011-09-27)
-----------------
* Davstorage: returning more explicit url (using webdav scheme). [Antoine Catton]
* Other mysql minor fixes. [Antoine Catton]
0.25 (2011-09-21)
-----------------
* mysql: Restore to default behaviour. [Antoine Catton]
* mysql: Use mysqldump instead of non trustable backup system. [Antoine Catton]
0.24 (2011-09-19)
-----------------
* mysql: Unhardcode the requested url. [Antoine Catton]
0.23 (2011-09-19)
-----------------
* Clean code in mysql recipe [Cedric de Saint Martin]
* librecipe: Provide createPromiseWrapper method. [Antoine Catton]
* kvm: Expose promisee checks to slapgrid. [Antoine Catton]
* davstorage: Initial version. [Antoine Catton]
* mysql: Support DAV backup. [Antoine Catton]
0.22 (2011-09-12)
-----------------
* Fix haproxy setup for erp5 [Sebastien Robin]
0.21 (2011-09-12)
-----------------
* Update PHP configuration to set session and date options.
[Alain Takoudjou Kamdem]
* Improve logrotate policy and haproxy config for erp5
[Sebastien Robin]
0.20 (2011-09-07)
-----------------
* Update and fix KVM/noVNC installation to be compatible with new WebSocket
protocol (HyBi-10) required by Chrome >= 14 and Firefox >= 7.
[Cedric de Saint Martin]
0.19 (2011-09-06)
-----------------
* Update PHP configuration to disable debug logging. [Cedric de Saint Martin]
0.18 (2011-08-25)
-----------------
* Repackage egg to include needed .bin files.
* Repackage egg to include needed .bin files. [Cedric de Saint Martin]
0.17 (2011-08-25)
-----------------
......
......@@ -3,6 +3,8 @@ parts = apache-php
extends =
../apache/buildout.cfg
../mariadb/buildout.cfg
../libtool/buildout.cfg
[apache-php]
# Note: Shall react on each build of apache and reinstall itself
......@@ -15,9 +17,9 @@ configure-options =
--with-mysql=${mariadb:location}
--with-zlib-dir=${zlib:location}
--with-mcrypt=${libmcrypt:location}
--enable-libxml
--enable-mbstring
--enable-session
--disable-all
environment =
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
......
......@@ -16,8 +16,8 @@ extends =
[apache-no-ssl]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.21.tar.bz2
md5sum = 1696ae62cd879ab1d4dd9ff021a470f2
configure-options = --enable-authn-alias
--enable-bucketeer
--enable-cache
......@@ -41,14 +41,15 @@ configure-options = --enable-authn-alias
--enable-proxy-http
--enable-proxy-scgi
--enable-so
--enable-dav
--enable-dav-fs
--disable-ssl
--with-included-apr
--with-z=${zlib:location}
--with-expat=${libexpat:location}
--with-pcre=${pcre:location}
--with-sqlite3=${sqlite3:location}
--with-dbm=gdbm
--with-gdm=${gdbm:location}
--with-gdbm=${gdbm:location}
--without-ssl
--without-lber
--without-ldap
......@@ -65,8 +66,8 @@ configure-options = --enable-authn-alias
[apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.21.tar.bz2
md5sum = 1696ae62cd879ab1d4dd9ff021a470f2
configure-options = --disable-static
--enable-authn-alias
--enable-bucketeer
......@@ -90,6 +91,8 @@ configure-options = --disable-static
--enable-proxy-ftp
--enable-proxy-http
--enable-proxy-scgi
--enable-dav
--enable-dav-fs
--enable-so
--enable-ssl
--with-included-apr
......@@ -98,8 +101,7 @@ configure-options = --disable-static
--with-expat=${libexpat:location}
--with-pcre=${pcre:location}
--with-sqlite3=${sqlite3:location}
--with-dbm=gdbm
--with-gdm=${gdbm:location}
--with-gdbm=${gdbm:location}
--without-lber
--without-ldap
--without-ndbm
......
[buildout]
parts =
bash
[bash]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
md5sum = 3fb927c7c33022f1c327f14a81c0d4b0
########################################################
# Dropbear - a secure shell client and server for *nix #
# #
# http://matt.ucc.asn.au/dropbear/dropbear.html #
########################################################
[buildout]
extends =
../zlib/buildout.cfg
parts =
dropbear
[dropbear-userspace-patch]
recipe = hexagonit.recipe.download
md5sum = 89f575b9a9586b04ef9073c9c3af13ae
url = ${:_profile_base_location_}/${:filename}
filename = userspace.patch
download-only = true
[dropbear-ipv6-patch]
recipe = hexagonit.recipe.download
md5sum = b30dd58d68829a80eee69188134382ef
url = ${:_profile_base_location_}/${:filename}
filename = ipv6-support.patch
download-only = true
[dropbear]
recipe = hexagonit.recipe.cmmi
md5sum = 0284ea239083f04c8b874e08e1aca243
url = http://matt.ucc.asn.au/dropbear/dropbear-0.53.1.tar.bz2
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--with-zlib=${zlib:location}
CFLAGS="-DENABLE_SINGLEUSER "
environment =
CPPFLAGS =-I${zlib:location}/include
LDFLAGS =-Wl,-rpath=${zlib:location}/lib -L${zlib:location}/lib
patches=
${dropbear-userspace-patch:location}/${dropbear-userspace-patch:filename}
${dropbear-ipv6-patch:location}/${dropbear-ipv6-patch:filename}
patch-options=
-p1
@@ -0,0 +1,56 @@
--- dropbear-0.52.orig/svr-runopts.c Wed May 13 20:56:03 2009
+++ dropbear-0.52/svr-runopts.c Wed May 13 22:20:22 2009
@@ -311,27 +311,39 @@
static void addportandaddress(char* spec) {
char *myspec = NULL;
+ char *p = NULL;
if (svr_opts.portcount < DROPBEAR_MAX_PORTS) {
/* We don't free it, it becomes part of the runopt state */
myspec = m_strdup(spec);
- /* search for ':', that separates address and port */
- svr_opts.ports[svr_opts.portcount] = strchr(myspec, ':');
-
- if (svr_opts.ports[svr_opts.portcount] == NULL) {
- /* no ':' -> the whole string specifies just a port */
- svr_opts.ports[svr_opts.portcount] = myspec;
- } else {
- /* Split the address/port */
- svr_opts.ports[svr_opts.portcount][0] = '\0';
- svr_opts.ports[svr_opts.portcount]++;
+ /* [ipv6]:port */
+ if (myspec[0] == '[' && (p = strchr(myspec, ']')) != NULL && *(p+1) == ':') {
+ *p = '\0';
+ p+=2;
+ myspec++;
+ svr_opts.ports[svr_opts.portcount] = p;
svr_opts.addresses[svr_opts.portcount] = myspec;
- }
-
- if (svr_opts.addresses[svr_opts.portcount] == NULL) {
- /* no address given -> fill in the default address */
+ } else if ((p = strchr(myspec, '.')) != NULL) {
+ if ((p = strchr(p, ':')) == NULL) {
+ /* ipv4 */
+ svr_opts.ports[svr_opts.portcount] = m_strdup(DROPBEAR_DEFPORT);
+ svr_opts.addresses[svr_opts.portcount] = myspec;
+ } else {
+ /* ipv4:port */
+ *p = '\0';
+ p++;
+ svr_opts.ports[svr_opts.portcount] = p;
+ svr_opts.addresses[svr_opts.portcount] = myspec;
+ }
+ } else if ((p = strchr(myspec, ':')) != NULL && (p = strchr(p, ':')) != NULL) {
+ /* ipv6 */
+ svr_opts.ports[svr_opts.portcount] = m_strdup(DROPBEAR_DEFPORT);
+ svr_opts.addresses[svr_opts.portcount] = myspec;
+ } else {
+ /* port */
+ svr_opts.ports[svr_opts.portcount] = myspec;
svr_opts.addresses[svr_opts.portcount] = m_strdup(DROPBEAR_DEFADDRESS);
}
diff --git a/options.h b/options.h
index d309ab4..63048e1 100644
--- a/options.h
+++ b/options.h
@@ -287,6 +287,12 @@ be overridden at runtime with -I. 0 disables idle timeouts */
/* The default path. This will often get replaced by the shell */
#define DEFAULT_PATH "/usr/bin:/bin"
+/* The prefix of dropbear environment variable overriding. */
+#define DROPBEAR_OVERRIDE_PREFIX "DROPBEAR_OVERRIDE_"
+#define DROPBEAR_OVERRIDE_PASSWORD DROPBEAR_OVERRIDE_PREFIX "PASSWORD"
+#define DROPBEAR_OVERRIDE_HOME DROPBEAR_OVERRIDE_PREFIX "HOME"
+#define DROPBEAR_OVERRIDE_SHELL DROPBEAR_OVERRIDE_PREFIX "SHELL"
+
/* Some other defines (that mostly should be left alone) are defined
* in sysoptions.h */
#include "sysoptions.h"
diff --git a/runopts.h b/runopts.h
index 83b5861..f8999b9 100644
--- a/runopts.h
+++ b/runopts.h
@@ -86,6 +86,15 @@ typedef struct svr_runopts {
int noauthpass;
int norootpass;
+#ifdef ENABLE_SINGLEUSER
+ int singleuser;
+ struct {
+ char *password;
+ char *home;
+ char *shell;
+ } singleuserenv;
+#endif /* ifdef ENABLE_SINGLEUSER */
+
#ifdef ENABLE_SVR_REMOTETCPFWD
int noremotetcp;
#endif
diff --git a/svr-auth.c b/svr-auth.c
index 87e3c5e..adb2e8b 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -126,6 +126,14 @@ void recv_msg_userauth_request() {
username = buf_getstring(ses.payload, &userlen);
+#ifdef ENABLE_SINGLEUSER
+ /* If userspace enabled, ignore username */
+ if (svr_opts.singleuser) {
+ m_free(username);
+ /* Get the current login of the user running dropbear */
+ username = m_strdup(getlogin());
+ }
+#endif /* ifdef ENABLE_SINGLEUSER */
servicename = buf_getstring(ses.payload, &servicelen);
methodname = buf_getstring(ses.payload, &methodlen);
@@ -228,6 +236,18 @@ static int checkusername(unsigned char *username, unsigned int userlen) {
}
authclear();
fill_passwd(username);
+#ifdef ENABLE_SINGLEUSER
+ if (svr_opts.singleuser) {
+ if (svr_opts.singleuserenv.home != NULL) {
+ m_free(ses.authstate.pw_dir);
+ ses.authstate.pw_dir = m_strdup(svr_opts.singleuserenv.home);
+ }
+ if (svr_opts.singleuserenv.shell != NULL) {
+ m_free(ses.authstate.pw_shell);
+ ses.authstate.pw_shell = m_strdup(svr_opts.singleuserenv.shell);
+ }
+ }
+#endif /* ifdef ENABLE_SINGLEUSER */
ses.authstate.username = m_strdup(username);
}
diff --git a/svr-runopts.c b/svr-runopts.c
index 2e836d2..1c21d7c 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -83,6 +83,9 @@ static void printhelp(const char * progname) {
"-W <receive_window_buffer> (default %d, larger may be faster, max 1MB)\n"
"-K <keepalive> (0 is never, default %d)\n"
"-I <idle_timeout> (0 is never, default %d)\n"
+#ifdef ENABLE_SINGLEUSER
+ "-n Enable the single user mode.\n"
+#endif /* ifdef ENABLE_SINGLEUSER */
#ifdef DEBUG_TRACE
"-v verbose (compiled with DEBUG_TRACE)\n"
#endif
@@ -128,6 +131,12 @@ void svr_getopts(int argc, char ** argv) {
#ifndef DISABLE_ZLIB
opts.enable_compress = 1;
#endif
+#ifdef ENABLE_SINGLEUSER
+ svr_opts.singleuser = 0;
+ svr_opts.singleuserenv.password = NULL;
+ svr_opts.singleuserenv.home = NULL;
+ svr_opts.singleuserenv.shell = NULL;
+#endif /* ifdef ENABLE_SINGLEUSER */
/* not yet
opts.ipv4 = 1;
opts.ipv6 = 1;
@@ -242,6 +251,17 @@ void svr_getopts(int argc, char ** argv) {
case 'u':
/* backwards compatibility with old urandom option */
break;
+#ifdef ENABLE_SINGLEUSER
+ case 'n':
+#ifndef ENABLE_SINGLEUSER_ROOT
+ /* If current user is root */
+ if (getuid() == 0) {
+ dropbear_log(LOG_ERR, "Can't enable singleuser mode as root.");
+ }
+#endif /* ifndef ENABLE_SINGLEUSER_ROOT */
+ svr_opts.singleuser = 1;
+ break;
+#endif /* ifdef ENABLE_SINGLEUSER */
#ifdef DEBUG_TRACE
case 'v':
debug_trace = 1;
@@ -313,6 +333,20 @@ void svr_getopts(int argc, char ** argv) {
}
opts.idle_timeout_secs = val;
}
+#ifdef ENABLE_SINGLEUSER
+ if (svr_opts.singleuser) {
+ dropbear_log(LOG_INFO, "Starting dropbear as single user mode.");
+ svr_opts.singleuserenv.password = getenv(DROPBEAR_OVERRIDE_PASSWORD);
+ svr_opts.singleuserenv.home = getenv(DROPBEAR_OVERRIDE_HOME);
+ if (svr_opts.singleuserenv.home != NULL) {
+ dropbear_log(LOG_INFO, "Single user home is '%s'", svr_opts.singleuserenv.home);
+ }
+ svr_opts.singleuserenv.shell = getenv(DROPBEAR_OVERRIDE_SHELL);
+ if (svr_opts.singleuserenv.shell != NULL) {
+ dropbear_log(LOG_INFO, "Single user shell is '%s'", svr_opts.singleuserenv.shell);
+ }
+ }
+#endif /* ifdef ENABLE_SINGLEUSER */
}
static void addportandaddress(char* spec) {
[buildout]
extends =
../librsync/buildout.cfg
../patch/buildout.cfg
parts =
duplicity
[duplicity]
recipe = slapos.recipe.build
url = http://code.launchpad.net/duplicity/0.6-series/0.6.15/+download/duplicity-0.6.15.tar.gz
md5sum = 88f3c990f41fde86cd7d5af5a1bc7b81
patch = ${:_profile_base_location_}/duplicity-ipv6.patch 32c44816a9a59401e233ef622bf50223
script =
import os
import tempfile
import sys
workingdir = guessworkdir(self.extract(self.download(%(url)r, %(md5sum)r)))
os.chdir(workingdir)
self.applyPatchList('${:patch}', patch_binary='${patch:location}/bin/patch', patch_options='-p0', cwd=workingdir)
call([sys.executable, os.path.join(workingdir, 'setup.py'),
'build_ext',
'--include-dirs', os.path.join('${librsync:location}', 'include'),
'--library-dirs', os.path.join('${librsync:location}', 'lib'),
'--rpath', os.path.join('${librsync:location}', 'lib')])
call([sys.executable, os.path.join(workingdir, 'setup.py'),
'install',
'--prefix', %(location)r])
os.chdir(os.path.join(%(location)r, 'bin'))
paths = [os.path.join(%(location)r, 'lib', 'python%%s.%%s' %% sys.version_info[:2], 'site-packages')]
from zc.buildout.easy_install import scripts
scripts([('duplicity', '__builtin__', 'execfile')], [], sys.executable, '${buildout:bin-directory}', arguments='%%r' %% os.path.abspath('duplicity'), extra_paths=paths)
scripts([('rdiffdir', '__builtin__', 'execfile')], [], sys.executable, '${buildout:bin-directory}', arguments='%%r' %% os.path.abspath('rdiffdir'), extra_paths=paths)
=== modified file 'src/urlparse_2_5.py'
--- src/urlparse_2_5.py 2011-03-06 15:12:33 +0000
+++ src/urlparse_2_5.py 2011-08-31 14:21:06 +0000
@@ -109,18 +109,19 @@
password = property(get_password)
def get_hostname(self):
- netloc = self.netloc
- if "@" in netloc:
- netloc = _rsplit(netloc, "@", 1)[1]
- if ":" in netloc:
- netloc = netloc.split(":", 1)[0]
- return netloc.lower() or None
+ netloc = self.netloc.split('@')[-1]
+ if '[' in netloc and ']' in netloc:
+ return netloc.split(']')[0][1:].lower()
+ elif ':' in netloc:
+ return netloc.split(':')[0].lower()
+ elif netloc == '':
+ return None
+ else:
+ return netloc.lower()
hostname = property(get_hostname)
def get_port(self):
- netloc = self.netloc
- if "@" in netloc:
- netloc = _rsplit(netloc, "@", 1)[1]
+ netloc = self.netloc.split('@')[-1].split(']')[-1]
if ":" in netloc:
port = netloc.split(":", 1)[1]
return int(port, 10)
......@@ -12,8 +12,8 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[liberation-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-1.06.0.20100721.tar.gz
md5sum = ca4870d899fd7e943ffc310a5421ad4d
url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-1.07.0.tar.gz
md5sum = 8150db1c6e27cacdfd524b563b85b69e
destination = ${fonts:location}/${:_buildout_section_name_}
# IPAex Font - Japanese fonts provided by IPA
......
......@@ -10,8 +10,8 @@ parts =
[freetype]
recipe = hexagonit.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.5.tar.bz2
md5sum = 90428a6d8ec4876cd1eb94858c2a59b0
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.6.tar.bz2
md5sum = 5e6510613f612809d2d7862592b92ab7
configure-options =
--disable-static
environment =
......
......@@ -6,17 +6,20 @@ extends =
../zip/buildout.cfg
parts =
gcc-java
gcc
[gmp]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
md5sum = 0bbaedc82fb30315b06b1588b9077cd3
# we should use version 4.x for ppl-0.10
url = ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2
md5sum = dd60683d7057917e34630b4a787932e8
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--build=`uname -m`-linux
--enable-cxx
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
......@@ -26,9 +29,9 @@ url = http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2
md5sum = bfbecb2eacb6d48432ead5cfc3f7390a
configure-options =
--with-gmp=${gmp:location}
--disable-static
environment =
CPPFLAGS =-I${gmp:location}/include
LDFLAGS =-L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
LDFLAGS=-Wl,-rpath=${gmp:location}/lib
[mpc]
recipe = hexagonit.recipe.cmmi
......@@ -37,9 +40,34 @@ md5sum = 0d6acab8d214bd7d1fbbc593e83dd00d
configure-options =
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--disable-static
environment =
CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include
LDFLAGS =-L${mpfr:location}/lib -Wl,-rpath=${mpfr:location}/lib -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib
[ppl]
recipe = hexagonit.recipe.cmmi
# we should use version 0.10.x for gcc-4.5
url = http://www.cs.unipr.it/ppl/Download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2
md5sum = 5667111f53150618b0fa522ffc53fc3e
configure-options =
--with-libgmp-prefix=${gmp:location}
--with-libgmpxx-prefix=${gmp:location}
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=${gmp:location}/lib
[cloog-ppl]
recipe = hexagonit.recipe.cmmi
url = ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.9.tar.gz
md5sum = 806e001d1b1a6b130069ff6274900af5
configure-options =
--with-gmp=${gmp:location}
--with-ppl=${ppl:location}
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${ppl:location}/lib
[ecj]
recipe = hexagonit.recipe.download
......@@ -53,33 +81,42 @@ recipe = hexagonit.recipe.download
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2
md5sum = 8e0b5c12212e185f3e4383106bfa9cc6
strip-top-level-dir = True
destination = ${gcc-java-source:location}
destination = ${gcc-source:location}
[gcc-java-download]
recipe = hexagonit.recipe.download
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-java-4.5.3.tar.bz2
md5sum = 08e045fdbdc22ac9af3aec3b8d16dbab
strip-top-level-dir = True
destination = ${gcc-java-source:location}
destination = ${gcc-source:location}
ignore-existing = true
[gcc-java-source]
[gcc-source]
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[gcc-java]
[gcc-multiarch.patch]
recipe = hexagonit.recipe.download
md5sum = 819e6735270c8a432b0512b49f40219f
url = ${:_profile_base_location_}/${:filename}
filename = ${:_buildout_section_name_}
download-only = true
[gcc-java-minimal]
depends =
${gcc-download:location}
${gcc-java-download:location}
recipe = hexagonit.recipe.cmmi
path = ${gcc-java-source:location}
path = ${gcc-source:location}
md5sum = bb3265edf0fa7543e50cedb93e04e427
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--disable-bootstrap
--build=`uname -m`-linux
--enable-languages=java
--disable-multilib
--with-gmp=${gmp:location}
......@@ -87,6 +124,8 @@ configure-options =
--with-mpc=${mpc:location}
--with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--without-ppl
--without-cloog
environment =
CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include -I${mpc:location}/include
......@@ -94,3 +133,35 @@ environment =
PATH=${zip:location}/bin:%(PATH)s
# make install does not work when several core are used
make-targets = install -j1
[gcc]
depends =
${gcc-download:location}
${gcc-java-download:location}
recipe = hexagonit.recipe.cmmi
path = ${gcc-source:location}
md5sum = bb3265edf0fa7543e50cedb93e04e427
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--disable-bootstrap
--enable-languages="c,c++,java"
--disable-multilib
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--with-ppl=${ppl:location}
--with-cloog=${cloog-ppl:location}
--with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${ppl:location}/lib -Wl,-rpath=${cloog-ppl:location}/lib
PATH=${zip:location}/bin:%(PATH)s
# make install does not work when several core are used
make-targets = install -j1
# DP: Add multiarch support to GCC.
# DP:
# DP: Convert the multilib option to a target triplet,
# DP: add multiarch include directories and libraries path:
# DP: /usr/local/include/<arch>-linux-gnu
# DP: /usr/include/<arch>-linux-gnu
# DP: /usr/lib/<arch>-linux-gnu
# DP: to the system paths.
# DP:
# DP: Original patch:
# DP: http://anonscm.debian.org/viewvc/gcccvs/branches/sid/gcc-4.5/debian/patches/gcc-multiarch.diff?revision=5086&view=co
2011-08-05 Arnaud Fontaine <arnaud.fontaine@nexedi.com>
* Enable multiarch unconditionally.
2011-03-08 Steve Langasek <steve.langasek@linaro.org>
* Canonicalize x86 to i386 everywhere, not i486/i686
2009-03-24 Arthur Loiret <aloiret@debian.org>
* configure.ac: Handle --enable-multiarch and --with-multiarch-defaults.
* config.gcc: Define MULTIARCH_DEFAULTS if multiarch is enabled.
* config.in [!USED_FOR_TARGET]: Undef ENABLE_MULTIARCH.
* gcc.c: include multiarch.h.
(set_multiarch_dir): New function. Adds the multiarch directories to
the library path.
[ENABLE_MULTIARCH]: Use it.
* cppdefault.c [LOCAL_INCLUDE_DIR, STANDARD_INCLUDE_DIR] Add an include
directory for multiarch directories.
* incpath.c: include multiarch.h
[ENABLE_MULTIARCH]: Add the multiarch directory to include directories.
* Makefile.in (MULTIARCH_H): New. Use it for incpath.o and gcc.o.
* multiarch.h: New file.
---
gcc/Makefile.in | 7 ++--
gcc/config.gcc | 9 +++++
gcc/config.in | 4 ++
gcc/configure.ac | 13 ++++++++
gcc/cppdefault.c | 6 +++
gcc/gcc.c | 41 ++++++++++++++++++++++++
gcc/incpath.c | 28 ++++++++++++++++
gcc/multiarch.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 196 insertions(+), 3 deletions(-)
--- a/src/gcc/gcc.c.orig 2009-12-20
+++ b/src/gcc/gcc.c 2009-12-20
@@ -71,6 +71,7 @@
#include "system.h"
#include "coretypes.h"
#include "multilib.h" /* before tm.h */
+#include "multiarch.h"
#include "tm.h"
#include <signal.h>
#if ! defined( SIGCHLD ) && defined( SIGCLD )
@@ -375,6 +376,7 @@
static int used_arg (const char *, int);
static int default_arg (const char *, int);
static void set_multilib_dir (void);
+static void set_multiarch_dir (void);
static void print_multilib_info (void);
static void perror_with_name (const char *);
static void fatal_ice (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
@@ -7354,6 +7358,9 @@
xputenv (XOBFINISH (&collect_obstack, char *));
}
+ /* Add the multiarch directories to libraries path. */
+ set_multiarch_dir ();
+
/* Warn about any switches that no pass was interested in. */
for (i = 0; (int) i < n_switches; i++)
@@ -8515,6 +8524,25 @@
multilib_os_dir = multilib_dir;
}
+/* Add the multiarch directories to libraries path. This uses the converted
+ multiarch triplet from the multilib value.
+ For example, if the target supports -m32/-m64 as multilib option and
+ defaults to 64, it will add /usr/lib/$triplet_target64/lib to library
+ path if either -m64 or no multilib option at all is set. And it will
+ add /usr/lib/$triplet_target32 if -m32 is set. Triplets are defined in
+ multiarch.def. */
+
+static void
+set_multiarch_dir (void)
+{
+ const char *path;
+
+ path = concat (STANDARD_STARTFILE_PREFIX_2, MULTIARCH_DEFAULTS,
+ dir_separator_str, NULL);
+ add_prefix (&startfile_prefixes, path, NULL,
+ PREFIX_PRIORITY_LAST, 0, 1);
+}
+
/* Print out the multiple library subdirectory selection
information. This prints out a series of lines. Each line looks
like SUBDIRECTORY;@OPTION@OPTION, with as many options as is
--- a/src/gcc/config.gcc.orig 2009-12-20
+++ b/src/gcc/config.gcc 2009-12-20
@@ -3371,3 +3371,10 @@
target_cpu_default=$target_cpu_default2
fi
fi
+
+multiarch_defaults=`echo ${target_noncanonical} | sed -e 's/unknown-//'`
+multiarch_define="__`echo ${multiarch_defaults} | tr '-' '_'`__"
+if test x${with_multiarch_defaults} != x; then
+ multiarch_defaults=${with_multiarch_defaults}
+fi
+tm_defines="${tm_defines} ${multiarch_define}=1 MULTIARCH_DEFAULTS=\\\"${multiarch_defaults}\\\""
--- a/src/gcc/Makefile.in.orig 2009-12-20
+++ b/src/gcc/Makefile.in 2009-12-20
@@ -949,6 +949,7 @@
$(HASHTAB_H)
PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
PLUGIN_VERSION_H = plugin-version.h configargs.h
+MULTIARCH_H = multiarch.h
#
# Now figure out from those variables how to compile and link.
@@ -1955,8 +1956,8 @@
-cp -p $^ $(srcdir)
incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
- intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \
- $(MACHMODE_H)
+ intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(MULTIARCH_H) \
+ $(TARGET_H) $(MACHMODE_H)
c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \
@@ -2107,7 +2108,7 @@
gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \
Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \
- configargs.h $(OBSTACK_H) opts.h
+ configargs.h $(OBSTACK_H) opts.h $(MULTIARCH_H)
(SHLIB_LINK='$(SHLIB_LINK)'; \
$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$(DRIVER_DEFINES) \
--- a/src/gcc/incpath.c.orig 2009-11-30
+++ b/src/gcc/incpath.c 2009-12-20
@@ -30,6 +30,7 @@
#include "intl.h"
#include "incpath.h"
#include "cppdefault.h"
+#include "multiarch.h"
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
@@ -132,6 +133,7 @@
const struct default_include *p;
int relocated = cpp_relocated();
size_t len;
+ const char *multiarch;
if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
{
@@ -150,8 +154,15 @@
if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
{
char *str = concat (iprefix, p->fname + len, NULL);
+ if (p->multilib == 1 && imultilib)
+ str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ multiarch = multilib_to_multiarch (imultilib);
+ if (!multiarch)
+ continue;
+ str = concat (str, dir_separator_str, multiarch, NULL);
+ }
- if (p->multilib && imultilib)
- str = concat (str, dir_separator_str, imultilib, NULL);
add_path (str, SYSTEM, p->cxx_aware, false);
}
}
@@ -195,8 +211,15 @@
else
str = update_path (p->fname, p->component);
+ if (p->multilib == 1 && imultilib)
+ str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ multiarch = multilib_to_multiarch (imultilib);
+ if (!multiarch)
+ continue;
+ str = concat (str, dir_separator_str, multiarch, NULL);
+ }
- if (p->multilib && imultilib)
- str = concat (str, dir_separator_str, imultilib, NULL);
add_path (str, SYSTEM, p->cxx_aware, false);
}
--- a/src/gcc/multiarch.h.orig 2009-12-20
+++ b/src/gcc/multiarch.h 2009-12-20
@@ -0,0 +1,93 @@
+/* Header for multiarch handling (include directories, libraries path).
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ Contributed by Arthur Loiret <aloiret@debian.org>
+
+This file is part of GCC.
+
+GCC 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, or (at your option) any later
+version.
+
+GCC 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 GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_MULTIARCH_H
+#define GCC_MULTIARCH_H
+
+#include "tm.h"
+
+struct multiarch_mapping
+{
+ const char *const multilib;
+ const char *const multiarch;
+};
+
+const struct multiarch_mapping multiarch_mappings[] = {
+ { "", MULTIARCH_DEFAULTS },
+# if defined(__x86_64_linux_gnu__)
+ { "32", "i386-linux-gnu" },
+# endif
+# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__)
+ { "64", "x86_64-linux-gnu" },
+# endif
+# if defined(__powerpc64_linux_gnu__)
+ { "32", "powerpc-linux-gnu" },
+# endif
+# if defined(__powerpc_linux_gnu__)
+ { "64", "powerpc64-linux-gnu" },
+# endif
+# if defined(__sparc64_linux_gnu__)
+ { "32", "sparc-linux-gnu" },
+# endif
+# if defined(__sparc_linux_gnu__)
+ { "64", "sparc64-linux-gnu" },
+# endif
+# if defined(__s390x_linux_gnu__)
+ { "31", "s390-linux-gnu" },
+# endif
+# if defined(__s390_linux_gnu__)
+ { "64", "s390x-linux-gnu" },
+# endif
+# if defined(__mips_linux_gnu__)
+ { "n32", "mips64-linux-gnuabin32" },
+ { "64", "mips64-linux-gnuabi64" },
+# endif
+# if defined(__mipsel_linux_gnu__)
+ { "n32", "mips64el-linux-gnuabin32" },
+ { "64", "mips64el-linux-gnuabi64" },
+# endif
+# if defined(__x86_64_kfreebsd_gnu__)
+ { "32", "i386-kfreebsd-gnu" },
+# endif
+# if defined(__sh4_linux_gnu__)
+ { "m4", "sh4-linux-gnu" },
+ { "m4-nofpu", "sh4_nofpu-linux-gnu" },
+# endif
+ { 0, 0 }
+};
+
+/* Convert the multilib option to the corresponding target triplet.
+ See multiarch.def and config.gcc for multilib/multiarch pairs.
+ When the default multilib is used, the corresponding multilib/multiarch
+ pair is { "", $target_tripplet }. */
+static inline const char*
+multilib_to_multiarch (const char *imultilib)
+{
+ const struct multiarch_mapping *p;
+
+ for (p = multiarch_mappings; p->multiarch; p++)
+ {
+ if (!strcmp(p->multilib, imultilib ? imultilib : ""))
+ return p->multiarch;
+ }
+ return NULL;
+}
+
+#endif /* GCC_MULTIARCH_H */
--- a/src/gcc/cppdefault.c.orig 2008-07-21
+++ b/src/gcc/cppdefault.c 2009-12-20
@@ -60,6 +60,7 @@
#endif
#ifdef LOCAL_INCLUDE_DIR
/* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
{ LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
#endif
#ifdef PREFIX_INCLUDE_DIR
@@ -95,6 +98,7 @@
#endif
#ifdef STANDARD_INCLUDE_DIR
/* /usr/include comes dead last. */
+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 },
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 },
#endif
{ 0, 0, 0, 0, 0, 0 }
......@@ -13,7 +13,9 @@ parts =
[git]
recipe = hexagonit.recipe.cmmi
url = http://kernel.org/pub/software/scm/git/git-1.7.4.5.tar.bz2
# url = http://kernel.org/pub/software/scm/git/git-1.7.4.5.tar.bz2
# Circumvent kernel.org downtime
url = http://ftp.free.fr/mirrors/ftp.kernel.org/software/scm/git/git-1.7.4.5.tar.bz2
md5sum = 2fa6c4c847ed87523cf55de54af457eb
configure-options =
--with-curl=${curl:location}
......
# mroonga - a MySQL storage engine using full-text search engine groonga
# http://mroonga.github.com/
# http://groonga.org/
[buildout]
parts =
groonga
[groonga]
recipe = hexagonit.recipe.cmmi
url = http://packages.groonga.org/source/groonga/groonga-1.2.5.tar.gz
md5sum = 7e608406677b7a3f91e287acc0c718c0
configure-options =
--disable-static
--disable-glibtest
--without-mecab
......@@ -3,8 +3,8 @@ parts = haproxy
[haproxy]
recipe = hexagonit.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.15.tar.gz
md5sum = c1b4fc6028c6d8e23dde8c91ff47eabe
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.18.tar.gz
md5sum = 4ac88bb1a76c4b84ed4f6131183bedbe
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
......
[buildout]
extends = ../cpio/buildout.cfg
extends =
../cpio/buildout.cfg
../rpm2cpio/buildout.cfg
parts =
libreoffice-bin
find-links =
http://www.nexedi.org/static/packages/source/
versions = versions
[versions]
# special version of z3c.recipe.openoffice with architecture autodetection
z3c.recipe.openoffice = 0.3.1dev8
[libreoffice-bin]
recipe = z3c.recipe.openoffice
install-javafilter = no
install-pyuno-egg = no
hack-openoffice-python = no
flavour = libreoffice
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
# base-url = http://download.documentfoundation.org/libreoffice/stable/3.3.2/rpm/%s/LibO_3.3.2_Linux_%s_install-rpm_en-US.tar.gz
url = http://download.documentfoundation.org/libreoffice/stable/3.4.3/rpm/%s/LibO_3.4.3_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums
md5sum_x86 = ae1b2b387dcef513c378cc95b255affc
md5sum_x86-64 = b2d6a902182c1af82ca088fbb665d0e3
# where office code can be found?
officedir = libreoffice3.4
# script to install
script =
location = %(location)r
self.failIfPathExists(location)
import sys
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
platform = guessPlatform()
url = self.options['url'] %% (ARCH_DIR_MAP[platform], platform)
md5sum = self.options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir)
storagedir = os.path.join(workdir, 'storage')
os.mkdir(storagedir)
rpmsdir = os.path.join(workdir, [q for q in os.listdir(workdir) if q == 'RPMS'][0])
rpmlist = [os.path.join(rpmsdir, q) for q in os.listdir(rpmsdir) if q.endswith('.rpm') and 'javafilter' not in q and 'xsltfilter' not in q]
[self.pipeCommand([[sys.executable, '${:rpm2cpio}', rpm], ['${:cpio}', '-idum']], cwd=storagedir) for rpm in rpmlist]
self.copyTree(os.path.join(storagedir, 'opt', '${:officedir}'), location, ['basis3.4', 'basis3.3', 'ure'])
# helper binaries
cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:target}
......@@ -9,7 +9,9 @@ parts =
[libtiff]
recipe = hexagonit.recipe.cmmi
url = http://download.osgeo.org/libtiff/tiff-3.9.5.tar.gz
#url = http://download.osgeo.org/libtiff/tiff-3.9.5.tar.gz
# server is down - circumvent
url = http://www.imagemagick.org/download/delegates/tiff-3.9.5.tar.gz
md5sum = 8fc7ce3b4e1d0cc8a319336967815084
configure-options =
--disable-static
......
......@@ -4,7 +4,7 @@ parts =
[libuuid]
recipe = hexagonit.recipe.cmmi
url = http://ftp.kernel.org/pub/linux/utils/util-linux/v2.18/util-linux-ng-2.18.tar.bz2
url = http://mirror.be.gbxs.net/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-2.18.tar.bz2
md5sum = 2f5f71e6af969d041d73ab778c141a77
configure-options =
--disable-static
......
......@@ -4,7 +4,9 @@
[buildout]
extends =
../zlib/buildout.cfg
../groonga/buildout.cfg
../ncurses/buildout.cfg
../pkgconfig/buildout.cfg
../readline/buildout.cfg
parts =
......@@ -12,15 +14,16 @@ parts =
[mariadb]
recipe = hexagonit.recipe.cmmi
version = 5.2.7
url = http://www.percona.com/downloads/MariaDB/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz
md5sum = 06b9b102946a3606b38348c0ebf18367
version = 5.3.1-beta
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://mirror.layerjet.com/mariadb
md5sum = 5b3a94de1c1fcaa193edbbc8d7f8ffe4
# compile directory is required to build mysql plugins.
keep-compile-dir = true
# configure: how to avoid searching for my.cnf?
# - like in mysql part in http://svn.zope.org/zodbshootout/trunk/buildout.cfg?view=markup
# we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine.
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static
--enable-thread-safe-client
--enable-local-infile
......@@ -36,3 +39,16 @@ configure-options =
environment =
CPPFLAGS =-I${ncurses:location}/include -I${readline:location}/include
LDFLAGS =-L${readline:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib
[groonga-storage-engine-mariadb]
recipe = hexagonit.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.5.tar.gz
md5sum = 52fed75d97a91f239750a1011ea9e468
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
LDFLAGS=-L${groonga:location}/lib
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
......@@ -27,27 +27,37 @@ download-only = true
md5sum = 3418477f64500cd2a8dce046f5d72fec
[memcached]
<= memcached-1.4.5
<= memcached-1.4.6
[memcached-1.4.6]
<= memcached-common
url = http://memcached.googlecode.com/files/memcached-1.4.6.tar.gz
md5sum = 243e5d82de27e6e45caf0ebfd400e41a
patches =
${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename}
[memcached-1.4.5]
<= memcached-common
url = http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
md5sum = 583441a25f937360624024f2881e5ea8
patches =
${memcached-strict-aliasing-patch:location}/${memcached-strict-aliasing-patch:filename}
${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename}
${memcached-gcc4.6.patch:location}/${memcached-gcc4.6.patch:filename}
[memcached-1.4.4]
<= memcached-common
url = http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
md5sum = 5ca5b24de347e97ac1f48f3785b4178a
patches =
${memcached-strict-aliasing-patch:location}/${memcached-strict-aliasing-patch:filename}
${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename}
${memcached-gcc4.6.patch:location}/${memcached-gcc4.6.patch:filename}
[memcached-common]
recipe = hexagonit.recipe.cmmi
configure-options =
--with-libevent=${libevent:location}
patches =
${memcached-strict-aliasing-patch:location}/${memcached-strict-aliasing-patch:filename}
${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename}
${memcached-gcc4.6.patch:location}/${memcached-gcc4.6.patch:filename}
patch-options = -p1
environment =
LDFLAGS =-Wl,-rpath=${libevent:location}/lib
# mroonga - a MySQL storage engine using full-text search engine groonga
# http://mroonga.github.com/
# http://groonga.org/
[buildout]
parts =
mroonga
extends =
../mariadb/buildout.cfg
../pkgconfig/buildout.cfg
[groonga]
recipe = hexagonit.recipe.cmmi
url = http://groonga.org/files/groonga/groonga-1.1.0.tar.gz
md5sum = a5a381db446e017f172bf6b003a4fed9
configure-options =
--without-mecab
[mroonga-mariadb-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = da2457b9f8006cddb279a165128479e5
filename = groonga-storage-engine-0.4.mariadb.patch
download-only = true
[mroonga]
recipe = hexagonit.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.4.tar.gz
md5sum = eb39ddaebb5a295f103bb1f66d5b33da
patch-options = -p1
patches =
${mroonga-mariadb-patch:location}/${mroonga-mariadb-patch:filename}
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
LDFLAGS=-L${groonga:location}/lib
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
......@@ -5,8 +5,10 @@ extends =
../zlib/buildout.cfg
../bison/buildout.cfg
../flex/buildout.cfg
../groonga/buildout.cfg
../libtool/buildout.cfg
../ncurses/buildout.cfg
../pkgconfig/buildout.cfg
../readline/buildout.cfg
parts =
......@@ -15,15 +17,15 @@ parts =
[mysql-5.1-sphinx-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 6580393ca93ecf564cad0552b91a563e
filename = mysql-5.1.49-sphinx-1.10.diff
md5sum = eefcd08c400c58d3e89542ab482a8429
filename = mysql-5.1-sphinx-2.0.1-beta.diff
download-only = true
[mysql-5.1]
recipe = hexagonit.recipe.cmmi
version = 5.1.57
version = 5.1.58
url = http://mysql.he.net/Downloads/MySQL-5.1/mysql-${:version}.tar.gz
md5sum = 8d6998ef0f2e2d1dac2a761348c71c21
md5sum = ae5aef506088e521e4b1cc4f668e96d2
# compile directory is required to build mysql plugins.
keep-compile-dir = true
# configure: how to avoid searching for my.cnf?
......@@ -39,6 +41,7 @@ configure-command =
# we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine.
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static
--enable-thread-safe-client
--enable-local-infile
--enable-assembler
......@@ -54,10 +57,23 @@ configure-options =
make-options =
LIBTOOL=libtool
patch-options = -p1
patch-options = -p0
patches =
${mysql-5.1-sphinx-patch:location}/${mysql-5.1-sphinx-patch:filename}
environment =
PATH =${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${bison:location}/bin:${flex:location}/bin:%(PATH)s
CPPFLAGS =-I${ncurses:location}/include -I${readline:location}/include
LDFLAGS =-L${readline:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib
[groonga-storage-engine-mysql-5.1]
recipe = hexagonit.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.9.tar.gz
md5sum = 78fe07122dc376796a5aede476f50cfd
configure-options =
--with-mysql-source=${mysql-5.1:location}__compile__/mysql-${mysql-5.1:version}
--with-mysql-config=${mysql-5.1:location}/bin/mysql_config
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
LDFLAGS=-L${groonga:location}/lib
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
# This patch is based on:
# http://www.sphinxsearch.com/downloads/sphinx-1.10-beta.tar.gz
diff -uNr mysql-5.1.49.orig/storage/sphinx/CMakeLists.txt mysql-5.1.49/storage/sphinx/CMakeLists.txt
--- mysql-5.1.49.orig/storage/sphinx/CMakeLists.txt 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/CMakeLists.txt 2008-02-15 01:37:44.000000000 +0900
diff -uNr storage/CMakeLists.txt storage/sphinx//CMakeLists.txt
--- storage/sphinx/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/CMakeLists.txt 2008-02-14 17:37:44.000000000 +0100
@@ -0,0 +1,11 @@
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
......@@ -16,9 +13,9 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/CMakeLists.txt mysql-5.1.49/storage/s
+
+SET(SPHINX_SOURCES ha_sphinx.cc)
+ADD_LIBRARY(sphinx ha_sphinx.cc)
diff -uNr mysql-5.1.49.orig/storage/sphinx/gen_data.php mysql-5.1.49/storage/sphinx/gen_data.php
--- mysql-5.1.49.orig/storage/sphinx/gen_data.php 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/gen_data.php 2006-06-07 16:28:43.000000000 +0900
diff -uNr storage/gen_data.php storage/sphinx//gen_data.php
--- storage/sphinx/gen_data.php 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/gen_data.php 2006-06-07 09:28:43.000000000 +0200
@@ -0,0 +1,37 @@
+<?php
+
......@@ -57,17 +54,17 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/gen_data.php mysql-5.1.49/storage/sph
+
+
+?>
diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sphinx/ha_sphinx.cc
--- mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/ha_sphinx.cc 2010-07-08 20:05:08.000000000 +0900
@@ -0,0 +1,3363 @@
diff -uNr storage/ha_sphinx.cc storage/sphinx//ha_sphinx.cc
--- storage/sphinx/ha_sphinx.cc 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/ha_sphinx.cc 2011-03-29 10:21:05.000000000 +0200
@@ -0,0 +1,3510 @@
+//
+// $Id: ha_sphinx.cc 2391 2010-07-08 11:05:08Z tomat $
+// $Id: ha_sphinx.cc 2752 2011-03-29 08:21:05Z tomat $
+//
+
+//
+// Copyright (c) 2001-2010, Andrew Aksyonoff
+// Copyright (c) 2008-2010, Sphinx Technologies Inc
+// Copyright (c) 2001-2011, Andrew Aksyonoff
+// Copyright (c) 2008-2011, Sphinx Technologies Inc
+// All rights reserved
+//
+// This program is free software; you can redistribute it and/or modify
......@@ -198,7 +195,7 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+#define SPHINXSE_MAX_ALLOC (16*1024*1024)
+#define SPHINXSE_MAX_KEYWORDSTATS 4096
+
+#define SPHINXSE_VERSION "0.9.9 ($Revision: 2391 $)"
+#define SPHINXSE_VERSION "0.9.9 ($Revision: 2752 $)"
+
+// FIXME? the following is cut-n-paste from sphinx.h and searchd.cpp
+// cut-n-paste is somewhat simpler that adding dependencies however..
......@@ -247,6 +244,7 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ SPH_RANK_PROXIMITY = 4, ///< phrase proximity
+ SPH_RANK_MATCHANY = 5, ///< emulate old match-any weighting
+ SPH_RANK_FIELDMASK = 6, ///< sets bits where there were matches
+ SPH_RANK_SPH04 = 7, ///< codename SPH04, phrase proximity + bm25 + head/exact boost
+
+ SPH_RANK_TOTAL,
+ SPH_RANK_DEFAULT = SPH_RANK_PROXIMITY_BM25
......@@ -474,10 +472,20 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+
+ CHARSET_INFO * m_pQueryCharset;
+
+ bool m_bReplace; ///< are we doing an INSERT or REPLACE
+
+ bool m_bCondId; ///< got a value from condition pushdown
+ longlong m_iCondId; ///< value acquired from id=value condition pushdown
+ bool m_bCondDone; ///< index_read() is now over
+
+ CSphSEThreadData ()
+ : m_bStats ( false )
+ , m_bQuery ( false )
+ , m_pQueryCharset ( NULL )
+ , m_bReplace ( false )
+ , m_bCondId ( false )
+ , m_iCondId ( 0 )
+ , m_bCondDone ( false )
+ {}
+};
+
......@@ -1420,11 +1428,13 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ m_sQuery = sField;
+ m_bQuery = true;
+
+ // unescape
+ // unescape only 1st one
+ char *s = sField, *d = sField;
+ int iSlashes = 0;
+ while ( *s )
+ {
+ if ( *s!='\\' ) *d++ = *s;
+ iSlashes = ( *s=='\\' ) ? iSlashes+1 : 0;
+ if ( ( iSlashes%2 )==0 ) *d++ = *s;
+ s++;
+ }
+ *d = '\0';
......@@ -1485,6 +1495,7 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ else if ( !strcmp ( sValue, "proximity" ) ) m_eRanker = SPH_RANK_PROXIMITY;
+ else if ( !strcmp ( sValue, "matchany" ) ) m_eRanker = SPH_RANK_MATCHANY;
+ else if ( !strcmp ( sValue, "fieldmask" ) ) m_eRanker = SPH_RANK_FIELDMASK;
+ else if ( !strcmp ( sValue, "sph04" ) ) m_eRanker = SPH_RANK_SPH04;
+ else
+ {
+ snprintf ( m_sParseError, sizeof(m_sParseError), "unknown ranking mode '%s'", sValue );
......@@ -1828,6 +1839,8 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ pCur = pNext;
+ }
+
+ SPH_DEBUG ( "q [[ %s ]]", m_sQuery );
+
+ SPH_RET(true);
+}
+
......@@ -2243,6 +2256,20 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+}
+
+
+int ha_sphinx::extra ( enum ha_extra_function op )
+{
+ CSphSEThreadData * pTls = GetTls();
+ if ( pTls )
+ {
+ if ( op==HA_EXTRA_WRITE_CAN_REPLACE )
+ pTls->m_bReplace = true;
+ else if ( op==HA_EXTRA_WRITE_CANNOT_REPLACE )
+ pTls->m_bReplace = false;
+ }
+ return 0;
+}
+
+
+int ha_sphinx::write_row ( byte * )
+{
+ SPH_ENTER_METHOD();
......@@ -2258,7 +2285,8 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ sQuery.length ( 0 );
+ sValue.length ( 0 );
+
+ sQuery.append ( "INSERT INTO " );
+ CSphSEThreadData * pTls = GetTls ();
+ sQuery.append ( pTls && pTls->m_bReplace ? "REPLACE INTO " : "INSERT INTO " );
+ sQuery.append ( m_pShare->m_sIndex );
+ sQuery.append ( " (" );
+
......@@ -2324,14 +2352,66 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+}
+
+
+int ha_sphinx::update_row ( const byte *, byte * )
+static inline bool IsIntegerFieldType ( enum_field_types eType )
+{
+ return eType==MYSQL_TYPE_LONG || eType==MYSQL_TYPE_LONGLONG;
+}
+
+
+static inline bool IsIDField ( Field * pField )
+{
+ enum_field_types eType = pField->type();
+
+ if ( eType==MYSQL_TYPE_LONGLONG )
+ return true;
+
+ if ( eType==MYSQL_TYPE_LONG && ((Field_num*)pField)->unsigned_flag )
+ return true;
+
+ return false;
+}
+
+
+int ha_sphinx::delete_row ( const byte * )
+{
+ SPH_ENTER_METHOD();
+ if ( !m_pShare || !m_pShare->m_bSphinxQL )
+ SPH_RET ( HA_ERR_WRONG_COMMAND );
+
+ char sQueryBuf[1024];
+ String sQuery ( sQueryBuf, sizeof(sQueryBuf), &my_charset_bin );
+ sQuery.length ( 0 );
+
+ sQuery.append ( "DELETE FROM " );
+ sQuery.append ( m_pShare->m_sIndex );
+ sQuery.append ( " WHERE id=" );
+
+ char sValue[32];
+ snprintf ( sValue, sizeof(sValue), "%lld", table->field[0]->val_int() );
+ sQuery.append ( sValue );
+
+ // FIXME? pretty inefficient to reconnect every time under high load,
+ // but this was intentionally written for a low load scenario..
+ MYSQL * pConn = mysql_init ( NULL );
+ if ( !pConn )
+ SPH_RET ( ER_OUT_OF_RESOURCES );
+
+ unsigned int uTimeout = 1;
+ mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout );
+
+ if ( !mysql_real_connect ( pConn, m_pShare->m_sHost, "root", "", "", m_pShare->m_iPort, m_pShare->m_sSocket, 0 ) )
+ SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) );
+
+ if ( mysql_real_query ( pConn, sQuery.ptr(), sQuery.length() ) )
+ SPH_RET ( HandleMysqlError ( pConn, ER_QUERY_ON_FOREIGN_DATA_SOURCE ) );
+
+ // all ok!
+ mysql_close ( pConn );
+ SPH_RET(0);
+}
+
+
+int ha_sphinx::delete_row ( const byte * )
+int ha_sphinx::update_row ( const byte *, byte * )
+{
+ SPH_ENTER_METHOD();
+ SPH_RET ( HA_ERR_WRONG_COMMAND );
......@@ -2344,6 +2424,11 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+{
+ SPH_ENTER_METHOD();
+ active_index = keynr;
+
+ CSphSEThreadData * pTls = GetTls();
+ if ( pTls )
+ pTls->m_bCondDone = false;
+
+ SPH_RET(0);
+}
+
......@@ -2357,7 +2442,7 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+
+uint32 ha_sphinx::UnpackDword ()
+{
+ if ( m_pCur+sizeof(uint32)>m_pResponseEnd )
+ if ( m_pCur+sizeof(uint32)>m_pResponseEnd ) // NOLINT
+ {
+ m_pCur = m_pResponseEnd;
+ m_bUnpackError = true;
......@@ -2365,7 +2450,7 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ }
+
+ uint32 uRes = ntohl ( sphUnalignedRead ( *(uint32*)m_pCur ) );
+ m_pCur += sizeof(uint32);
+ m_pCur += sizeof(uint32); // NOLINT
+ return uRes;
+}
+
......@@ -2527,10 +2612,10 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ assert ( pStats );
+
+ char * pCurSave = m_pCur;
+ for ( uint i=0; i<m_iMatchesTotal && m_pCur<m_pResponseEnd-sizeof(uint32); i++ )
+ for ( uint i=0; i<m_iMatchesTotal && m_pCur<m_pResponseEnd-sizeof(uint32); i++ ) // NOLINT
+ {
+ m_pCur += m_bId64 ? 12 : 8; // skip id+weight
+ for ( uint32 i=0; i<m_iAttrs && m_pCur<m_pResponseEnd-sizeof(uint32); i++ )
+ for ( uint32 i=0; i<m_iAttrs && m_pCur<m_pResponseEnd-sizeof(uint32); i++ ) // NOLINT
+ {
+ if ( m_dAttrs[i].m_uType & SPH_ATTR_MULTI )
+ {
......@@ -2586,25 +2671,45 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ if ( condf->functype()!=Item_func::EQ_FUNC || condf->argument_count()!=2 )
+ break;
+
+ // get my tls
+ CSphSEThreadData * pTls = GetTls ();
+ if ( !pTls )
+ break;
+
+ Item ** args = condf->arguments();
+ if ( args[0]->type()!=COND::FIELD_ITEM || args[1]->type()!=COND::STRING_ITEM )
+ if ( !m_pShare->m_bSphinxQL )
+ {
+ // on non-QL tables, intercept query=value condition for SELECT
+ if (!( args[0]->type()==COND::FIELD_ITEM && args[1]->type()==COND::STRING_ITEM ))
+ break;
+
+ Item_field * pField = (Item_field *) args[0];
+ if ( pField->field->field_index!=2 ) // FIXME! magic key index
+ break;
+
+ // get my tls
+ CSphSEThreadData * pTls = GetTls ();
+ if ( !pTls )
+ break;
+
+ // copy the query, and let know that we intercepted this condition
+ Item_string * pString = (Item_string *) args[1];
+ pTls->m_bQuery = true;
+ strncpy ( pTls->m_sQuery, pString->str_value.c_ptr(), sizeof(pTls->m_sQuery) );
+ pTls->m_sQuery[sizeof(pTls->m_sQuery)-1] = '\0';
+ pTls->m_pQueryCharset = pString->str_value.charset();
+
+ } else
+ {
+ if (!( args[0]->type()==COND::FIELD_ITEM && args[1]->type()==COND::INT_ITEM ))
+ break;
+
+ // on QL tables, intercept id=value condition for DELETE
+ Item_field * pField = (Item_field *) args[0];
+ if ( pField->field->field_index!=0 ) // FIXME! magic key index
+ break;
+
+ Item_int * pVal = (Item_int *) args[1];
+ pTls->m_iCondId = pVal->val_int();
+ pTls->m_bCondId = true;
+ }
+
+ // we intercepted this condition
+ return NULL;
+ }
+
......@@ -2617,9 +2722,8 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+void ha_sphinx::cond_pop ()
+{
+ CSphSEThreadData * pTls = GetTls ();
+ if ( pTls && pTls->m_bQuery )
+ if ( pTls )
+ pTls->m_bQuery = false;
+ return;
+}
+
+
......@@ -2660,6 +2764,38 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ }
+ pTls->m_tStats.Reset ();
+
+ // sphinxql table, just return the key once
+ if ( m_pShare->m_bSphinxQL )
+ {
+ // over and out
+ if ( pTls->m_bCondDone )
+ SPH_RET ( HA_ERR_END_OF_FILE );
+
+ // return a value from pushdown, if any
+ if ( pTls->m_bCondId )
+ {
+ table->field[0]->store ( pTls->m_iCondId, 1 );
+ pTls->m_bCondDone = true;
+ SPH_RET(0);
+ }
+
+ // return a value from key
+ longlong iRef = 0;
+ if ( key_len==4 )
+ iRef = uint4korr ( key );
+ else if ( key_len==8 )
+ iRef = uint8korr ( key );
+ else
+ {
+ my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: unexpected key length" );
+ SPH_RET ( HA_ERR_END_OF_FILE );
+ }
+
+ table->field[0]->store ( iRef, 1 );
+ pTls->m_bCondDone = true;
+ SPH_RET(0);
+ }
+
+ // parse query
+ if ( pTls->m_bQuery )
+ {
......@@ -3117,12 +3253,6 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+}
+
+
+static inline bool IsIntegerFieldType ( enum_field_types eType )
+{
+ return eType==MYSQL_TYPE_LONG || eType==MYSQL_TYPE_LONGLONG;
+}
+
+
+// create() is called to create a database. The variable name will have the name
+// of the table. When create() is called you do not need to worry about opening
+// the table. Also, the FRM file will have already been created so adjusting
......@@ -3151,7 +3281,7 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ break;
+ }
+
+ if ( !IsIntegerFieldType ( table->field[0]->type() ) || !((Field_num *)table->field[0])->unsigned_flag )
+ if ( !IsIDField ( table->field[0] ) )
+ {
+ my_snprintf ( sError, sizeof(sError), "%s: 1st column (docid) MUST be unsigned integer or bigint", name );
+ break;
......@@ -3207,10 +3337,32 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ for ( ; tInfo.m_bSphinxQL; )
+ {
+ sError[0] = '\0';
+ bool bId = false;
+
+ // check column types, and also for presence of an id column
+ for ( int i=0; i<(int)table->s->fields; i++ )
+ // check that 1st column is id, is of int type, and has an index
+ if ( strcmp ( table->field[0]->field_name, "id" ) )
+ {
+ my_snprintf ( sError, sizeof(sError), "%s: 1st column must be called 'id'", name );
+ break;
+ }
+
+ if ( !IsIDField ( table->field[0] ) )
+ {
+ my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be INT UNSIGNED or BIGINT", name );
+ break;
+ }
+
+ // check index
+ if (
+ table->s->keys!=1 ||
+ table->key_info[0].key_parts!=1 ||
+ strcasecmp ( table->key_info[0].key_part[0].field->field_name, "id" ) )
+ {
+ my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be indexed", name );
+ break;
+ }
+
+ // check column types
+ for ( int i=1; i<(int)table->s->fields; i++ )
+ {
+ enum_field_types eType = table->field[i]->type();
+ if ( eType!=MYSQL_TYPE_TIMESTAMP && !IsIntegerFieldType(eType) && eType!=MYSQL_TYPE_VARCHAR && eType!=MYSQL_TYPE_FLOAT )
......@@ -3219,18 +3371,10 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+ name, i+1, table->field[i]->field_name );
+ break;
+ }
+ if ( strcmp ( table->field[i]->field_name, "id" )==0 )
+ bId = true;
+ }
+ if ( sError[0] )
+ break;
+
+ if ( !bId )
+ {
+ my_snprintf ( sError, sizeof(sError), "%s: id column not found", name );
+ break;
+ }
+
+ // all good
+ break;
+ }
......@@ -3422,14 +3566,14 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sph
+#endif // >50100
+
+//
+// $Id: ha_sphinx.cc 2391 2010-07-08 11:05:08Z tomat $
+// $Id: ha_sphinx.cc 2752 2011-03-29 08:21:05Z tomat $
+//
diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.h mysql-5.1.49/storage/sphinx/ha_sphinx.h
--- mysql-5.1.49.orig/storage/sphinx/ha_sphinx.h 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/ha_sphinx.h 2010-06-30 07:48:24.000000000 +0900
@@ -0,0 +1,166 @@
diff -uNr storage/ha_sphinx.h storage/sphinx//ha_sphinx.h
--- storage/sphinx/ha_sphinx.h 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/ha_sphinx.h 2010-08-03 13:38:09.000000000 +0200
@@ -0,0 +1,167 @@
+//
+// $Id: ha_sphinx.h 2379 2010-06-29 22:48:24Z shodan $
+// $Id: ha_sphinx.h 2428 2010-08-03 11:38:09Z shodan $
+//
+
+#ifdef USE_PRAGMA_INTERFACE
......@@ -3515,6 +3659,7 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.h mysql-5.1.49/storage/sphi
+ int write_row ( byte * buf );
+ int update_row ( const byte * old_data, byte * new_data );
+ int delete_row ( const byte * buf );
+ int extra ( enum ha_extra_function op );
+
+ int index_init ( uint keynr, bool sorted ); // 5.1.x
+ int index_init ( uint keynr ) { return index_init ( keynr, false ); } // 5.0.x
......@@ -3592,11 +3737,11 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.h mysql-5.1.49/storage/sphi
+int sphinx_showfunc_words ( THD *, SHOW_VAR *, char * );
+
+//
+// $Id: ha_sphinx.h 2379 2010-06-29 22:48:24Z shodan $
+// $Id: ha_sphinx.h 2428 2010-08-03 11:38:09Z shodan $
+//
diff -uNr mysql-5.1.49.orig/storage/sphinx/INSTALL mysql-5.1.49/storage/sphinx/INSTALL
--- mysql-5.1.49.orig/storage/sphinx/INSTALL 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/INSTALL 2010-07-08 01:12:02.000000000 +0900
diff -uNr storage/INSTALL storage/sphinx//INSTALL
--- storage/sphinx/INSTALL 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/INSTALL 2010-07-07 18:12:02.000000000 +0200
@@ -0,0 +1,48 @@
+Building MySQL with SphinxSE
+=============================
......@@ -3646,9 +3791,9 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/INSTALL mysql-5.1.49/storage/sphinx/I
+win/build-vs8
+
+--eof--
diff -uNr mysql-5.1.49.orig/storage/sphinx/Makefile.am mysql-5.1.49/storage/sphinx/Makefile.am
--- mysql-5.1.49.orig/storage/sphinx/Makefile.am 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/Makefile.am 2009-02-14 06:26:46.000000000 +0900
diff -uNr storage/Makefile.am storage/sphinx//Makefile.am
--- storage/sphinx/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/Makefile.am 2009-02-13 22:26:46.000000000 +0100
@@ -0,0 +1,59 @@
+# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+#
......@@ -3709,9 +3854,9 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/Makefile.am mysql-5.1.49/storage/sphi
+EXTRA_DIST = cmakelists.txt
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff -uNr mysql-5.1.49.orig/storage/sphinx/make-patch.sh mysql-5.1.49/storage/sphinx/make-patch.sh
--- mysql-5.1.49.orig/storage/sphinx/make-patch.sh 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/make-patch.sh 2008-09-06 03:06:30.000000000 +0900
diff -uNr storage/make-patch.sh storage/sphinx//make-patch.sh
--- storage/sphinx/make-patch.sh 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/make-patch.sh 2008-09-05 20:06:30.000000000 +0200
@@ -0,0 +1,36 @@
+#!/bin/sh
+
......@@ -3749,26 +3894,26 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/make-patch.sh mysql-5.1.49/storage/sp
+for name in $FILES; do
+ diff -BNru "$ORIG$name" "$NEW$name" >> $OUT
+done
diff -uNr mysql-5.1.49.orig/storage/sphinx/plug.in mysql-5.1.49/storage/sphinx/plug.in
--- mysql-5.1.49.orig/storage/sphinx/plug.in 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/plug.in 2006-06-07 16:28:43.000000000 +0900
diff -uNr storage/plug.in storage/sphinx//plug.in
--- storage/sphinx/plug.in 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/plug.in 2006-06-07 09:28:43.000000000 +0200
@@ -0,0 +1,5 @@
+MYSQL_STORAGE_ENGINE(sphinx,, [Sphinx Storage Engine],
+ [Sphinx Storage Engines], [max,max-no-ndb])
+MYSQL_PLUGIN_DIRECTORY(sphinx, [storage/sphinx])
+MYSQL_PLUGIN_STATIC(sphinx, [libsphinx.a])
+MYSQL_PLUGIN_DYNAMIC(sphinx, [ha_sphinx.la])
diff -uNr mysql-5.1.49.orig/storage/sphinx/snippets_udf.cc mysql-5.1.49/storage/sphinx/snippets_udf.cc
--- mysql-5.1.49.orig/storage/sphinx/snippets_udf.cc 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/snippets_udf.cc 2010-01-05 04:17:57.000000000 +0900
diff -uNr storage/snippets_udf.cc storage/sphinx//snippets_udf.cc
--- storage/sphinx/snippets_udf.cc 1970-01-01 01:00:00.000000000 +0100
+++ storage/sphinx/snippets_udf.cc 2011-01-01 03:33:06.000000000 +0100
@@ -0,0 +1,768 @@
+//
+// $Id: snippets_udf.cc 2153 2010-01-04 19:17:57Z shodan $
+// $Id: snippets_udf.cc 2616 2011-01-01 02:33:06Z shodan $
+//
+
+//
+// Copyright (c) 2001-2010, Andrew Aksyonoff
+// Copyright (c) 2008-2010, Sphinx Technologies Inc
+// Copyright (c) 2001-2011, Andrew Aksyonoff
+// Copyright (c) 2008-2011, Sphinx Technologies Inc
+// All rights reserved
+//
+// This program is free software; you can redistribute it and/or modify
......@@ -4528,1327 +4673,5 @@ diff -uNr mysql-5.1.49.orig/storage/sphinx/snippets_udf.cc mysql-5.1.49/storage/
+}
+
+//
+// $Id: snippets_udf.cc 2153 2010-01-04 19:17:57Z shodan $
+// $Id: snippets_udf.cc 2616 2011-01-01 02:33:06Z shodan $
+//
diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.22.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.22.diff
--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.22.diff 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/sphinx.5.0.22.diff 2006-06-07 16:28:43.000000000 +0900
@@ -0,0 +1,284 @@
+diff -B -N -r -u mysql-5.0.22/config/ac-macros/ha_sphinx.m4 mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4
+--- mysql-5.0.22/config/ac-macros/ha_sphinx.m4 1970-01-01 01:00:00.000000000 +0100
++++ mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 2006-06-06 19:49:38.000000000 +0200
+@@ -0,0 +1,30 @@
++dnl ---------------------------------------------------------------------------
++dnl Macro: MYSQL_CHECK_EXAMPLEDB
++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used
++dnl ---------------------------------------------------------------------------
++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [
++ AC_ARG_WITH([sphinx-storage-engine],
++ [
++ --with-sphinx-storage-engine
++ Enable the Sphinx Storage Engine],
++ [sphinxdb="$withval"],
++ [sphinxdb=no])
++ AC_MSG_CHECKING([for example storage engine])
++
++ case "$sphinxdb" in
++ yes )
++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine])
++ AC_MSG_RESULT([yes])
++ [sphinxdb=yes]
++ ;;
++ * )
++ AC_MSG_RESULT([no])
++ [sphinxdb=no]
++ ;;
++ esac
++
++])
++dnl ---------------------------------------------------------------------------
++dnl END OF MYSQL_CHECK_EXAMPLE SECTION
++dnl ---------------------------------------------------------------------------
++
+diff -B -N -r -u mysql-5.0.22/configure.in mysql-5.0.22.sx/configure.in
+--- mysql-5.0.22/configure.in 2006-05-25 10:56:45.000000000 +0200
++++ mysql-5.0.22.sx/configure.in 2006-06-06 19:49:38.000000000 +0200
+@@ -41,6 +41,7 @@
+ sinclude(config/ac-macros/ha_berkeley.m4)
+ sinclude(config/ac-macros/ha_blackhole.m4)
+ sinclude(config/ac-macros/ha_example.m4)
++sinclude(config/ac-macros/ha_sphinx.m4)
+ sinclude(config/ac-macros/ha_federated.m4)
+ sinclude(config/ac-macros/ha_innodb.m4)
+ sinclude(config/ac-macros/ha_ndbcluster.m4)
+@@ -2450,6 +2451,7 @@
+ MYSQL_CHECK_BDB
+ MYSQL_CHECK_INNODB
+ MYSQL_CHECK_EXAMPLEDB
++MYSQL_CHECK_SPHINXDB
+ MYSQL_CHECK_ARCHIVEDB
+ MYSQL_CHECK_CSVDB
+ MYSQL_CHECK_BLACKHOLEDB
+diff -B -N -r -u mysql-5.0.22/libmysqld/Makefile.am mysql-5.0.22.sx/libmysqld/Makefile.am
+--- mysql-5.0.22/libmysqld/Makefile.am 2006-05-25 10:56:55.000000000 +0200
++++ mysql-5.0.22.sx/libmysqld/Makefile.am 2006-06-06 19:49:38.000000000 +0200
+@@ -27,7 +27,7 @@
+ -DSHAREDIR="\"$(MYSQLSHAREdir)\""
+ INCLUDES= @bdb_includes@ \
+ -I$(top_builddir)/include -I$(top_srcdir)/include \
+- -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \
++ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/sql/sphinx \
+ -I$(top_srcdir)/regex \
+ $(openssl_includes) $(yassl_includes) @ZLIB_INCLUDES@
+
+@@ -38,6 +38,7 @@
+ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
+ my_time.c
+ sqlexamplessources = ha_example.cc ha_tina.cc
++sqlsphinxsources = ha_sphinx.cc
+
+ noinst_HEADERS = embedded_priv.h emb_qcache.h
+
+@@ -65,7 +66,7 @@
+ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
+ ha_blackhole.cc ha_archive.cc my_user.c
+
+-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources)
++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources)
+ libmysqld_a_SOURCES=
+
+ # automake misses these
+@@ -133,12 +134,16 @@
+ rm -f $$f; \
+ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \
+ done; \
++ for f in $(sqlsphinxsources); do \
++ rm -f $$f; \
++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \
++ done; \
+ rm -f client_settings.h; \
+ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h
+
+
+ clean-local:
+- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \
++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \
+ $(top_srcdir)/linked_libmysqld_sources; \
+ rm -f client_settings.h
+
+diff -B -N -r -u mysql-5.0.22/sql/handler.cc mysql-5.0.22.sx/sql/handler.cc
+--- mysql-5.0.22/sql/handler.cc 2006-05-25 10:56:42.000000000 +0200
++++ mysql-5.0.22.sx/sql/handler.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -78,6 +78,15 @@
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ HTON_NO_FLAGS };
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++extern handlerton sphinx_hton;
++#else
++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine",
++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ HTON_NO_FLAGS };
++#endif
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ extern handlerton innobase_hton;
+@@ -147,6 +156,7 @@
+ &example_hton,
+ &archive_hton,
+ &tina_hton,
++ &sphinx_hton,
+ &ndbcluster_hton,
+ &federated_hton,
+ &myisammrg_hton,
+@@ -345,6 +355,12 @@
+ return new (alloc) ha_tina(table);
+ return NULL;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case DB_TYPE_SPHINX_DB:
++ if (have_sphinx_db == SHOW_OPTION_YES)
++ return new (alloc) ha_sphinx(table);
++ return NULL;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ case DB_TYPE_NDBCLUSTER:
+ if (have_ndbcluster == SHOW_OPTION_YES)
+diff -B -N -r -u mysql-5.0.22/sql/handler.h mysql-5.0.22.sx/sql/handler.h
+--- mysql-5.0.22/sql/handler.h 2006-05-25 10:56:55.000000000 +0200
++++ mysql-5.0.22.sx/sql/handler.h 2006-06-06 19:49:38.000000000 +0200
+@@ -183,8 +183,9 @@
+ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB,
+ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER,
+ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB,
+- DB_TYPE_FEDERATED_DB,
++ DB_TYPE_FEDERATED_DB,
+ DB_TYPE_BLACKHOLE_DB,
++ DB_TYPE_SPHINX_DB,
+ DB_TYPE_DEFAULT // Must be last
+ };
+
+diff -B -N -r -u mysql-5.0.22/sql/Makefile.am mysql-5.0.22.sx/sql/Makefile.am
+--- mysql-5.0.22/sql/Makefile.am 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/Makefile.am 2006-06-06 19:49:38.000000000 +0200
+@@ -66,6 +66,7 @@
+ sql_array.h sql_cursor.h \
+ examples/ha_example.h ha_archive.h \
+ examples/ha_tina.h ha_blackhole.h \
++ sphinx/ha_sphinx.h \
+ ha_federated.h
+ mysqld_SOURCES = sql_lex.cc sql_handler.cc \
+ item.cc item_sum.cc item_buff.cc item_func.cc \
+@@ -102,6 +103,7 @@
+ sp_cache.cc parse_file.cc sql_trigger.cc \
+ examples/ha_example.cc ha_archive.cc \
+ examples/ha_tina.cc ha_blackhole.cc \
++ sphinx/ha_sphinx.cc \
+ ha_federated.cc
+
+ gen_lex_hash_SOURCES = gen_lex_hash.cc
+diff -B -N -r -u mysql-5.0.22/sql/mysqld.cc mysql-5.0.22.sx/sql/mysqld.cc
+--- mysql-5.0.22/sql/mysqld.cc 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/mysqld.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -6420,6 +6420,11 @@
+ #else
+ have_csv_db= SHOW_OPTION_NO;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ have_sphinx_db= SHOW_OPTION_YES;
++#else
++ have_sphinx_db= SHOW_OPTION_NO;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ have_ndbcluster=SHOW_OPTION_DISABLED;
+ #else
+@@ -7457,6 +7462,7 @@
+ #undef have_example_db
+ #undef have_archive_db
+ #undef have_csv_db
++#undef have_sphinx_db
+ #undef have_federated_db
+ #undef have_partition_db
+ #undef have_blackhole_db
+@@ -7467,6 +7473,7 @@
+ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO;
++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
+diff -B -N -r -u mysql-5.0.22/sql/mysql_priv.h mysql-5.0.22.sx/sql/mysql_priv.h
+--- mysql-5.0.22/sql/mysql_priv.h 2006-05-25 10:56:43.000000000 +0200
++++ mysql-5.0.22.sx/sql/mysql_priv.h 2006-06-06 19:49:38.000000000 +0200
+@@ -1279,6 +1279,12 @@
+ #else
+ extern SHOW_COMP_OPTION have_csv_db;
+ #endif
++#ifdef HAVE_SPHINX_DB
++extern handlerton sphinx_hton;
++#define have_sphinx_db sphinx_hton.state
++#else
++extern SHOW_COMP_OPTION have_sphinx_db;
++#endif
+ #ifdef HAVE_FEDERATED_DB
+ extern handlerton federated_hton;
+ #define have_federated_db federated_hton.state
+diff -B -N -r -u mysql-5.0.22/sql/set_var.cc mysql-5.0.22.sx/sql/set_var.cc
+--- mysql-5.0.22/sql/set_var.cc 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/set_var.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -809,6 +809,7 @@
+ {"have_compress", (char*) &have_compress, SHOW_HAVE},
+ {"have_crypt", (char*) &have_crypt, SHOW_HAVE},
+ {"have_csv", (char*) &have_csv_db, SHOW_HAVE},
++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE},
+ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE},
+ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE},
+ {"have_geometry", (char*) &have_geometry, SHOW_HAVE},
+diff -B -N -r -u mysql-5.0.22/sql/sql_lex.h mysql-5.0.22.sx/sql/sql_lex.h
+--- mysql-5.0.22/sql/sql_lex.h 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/sql_lex.h 2006-06-06 19:49:38.000000000 +0200
+@@ -58,6 +58,7 @@
+ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS,
+ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS,
+ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS,
++ SQLCOM_SHOW_SPHINX_STATUS,
+ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT,
+ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS,
+ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS,
+diff -B -N -r -u mysql-5.0.22/sql/sql_parse.cc mysql-5.0.22.sx/sql/sql_parse.cc
+--- mysql-5.0.22/sql/sql_parse.cc 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/sql_parse.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -25,6 +25,9 @@
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++#endif
+
+ #ifdef HAVE_NDBCLUSTER_DB
+ #include "ha_ndbcluster.h"
+@@ -2722,6 +2725,15 @@
+ break;
+ }
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case SQLCOM_SHOW_SPHINX_STATUS:
++ {
++ if (check_global_access(thd, SUPER_ACL))
++ goto error;
++ res = sphinx_show_status(thd);
++ break;
++ }
++#endif
+ #ifdef HAVE_REPLICATION
+ case SQLCOM_LOAD_MASTER_TABLE:
+ {
+diff -B -N -r -u mysql-5.0.22/sql/sql_yacc.yy mysql-5.0.22.sx/sql/sql_yacc.yy
+--- mysql-5.0.22/sql/sql_yacc.yy 2006-05-25 10:56:43.000000000 +0200
++++ mysql-5.0.22.sx/sql/sql_yacc.yy 2006-06-06 19:49:38.000000000 +0200
+@@ -6584,6 +6584,9 @@
+ case DB_TYPE_INNODB:
+ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS;
+ break;
++ case DB_TYPE_SPHINX_DB:
++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS;
++ break;
+ default:
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS");
+ YYABORT;
diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.27.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.27.diff
--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.27.diff 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/sphinx.5.0.27.diff 2006-12-15 08:13:25.000000000 +0900
@@ -0,0 +1,284 @@
+diff -B -N -r -u mysql-5.0.22/config/ac-macros/ha_sphinx.m4 mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4
+--- mysql-5.0.22/config/ac-macros/ha_sphinx.m4 1970-01-01 01:00:00.000000000 +0100
++++ mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 2006-06-06 19:49:38.000000000 +0200
+@@ -0,0 +1,30 @@
++dnl ---------------------------------------------------------------------------
++dnl Macro: MYSQL_CHECK_EXAMPLEDB
++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used
++dnl ---------------------------------------------------------------------------
++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [
++ AC_ARG_WITH([sphinx-storage-engine],
++ [
++ --with-sphinx-storage-engine
++ Enable the Sphinx Storage Engine],
++ [sphinxdb="$withval"],
++ [sphinxdb=no])
++ AC_MSG_CHECKING([for example storage engine])
++
++ case "$sphinxdb" in
++ yes )
++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine])
++ AC_MSG_RESULT([yes])
++ [sphinxdb=yes]
++ ;;
++ * )
++ AC_MSG_RESULT([no])
++ [sphinxdb=no]
++ ;;
++ esac
++
++])
++dnl ---------------------------------------------------------------------------
++dnl END OF MYSQL_CHECK_EXAMPLE SECTION
++dnl ---------------------------------------------------------------------------
++
+diff -B -N -r -u mysql-5.0.22/configure.in mysql-5.0.22.sx/configure.in
+--- mysql-5.0.22/configure.in 2006-05-25 10:56:45.000000000 +0200
++++ mysql-5.0.22.sx/configure.in 2006-06-06 19:49:38.000000000 +0200
+@@ -41,6 +41,7 @@
+ sinclude(config/ac-macros/ha_berkeley.m4)
+ sinclude(config/ac-macros/ha_blackhole.m4)
+ sinclude(config/ac-macros/ha_example.m4)
++sinclude(config/ac-macros/ha_sphinx.m4)
+ sinclude(config/ac-macros/ha_federated.m4)
+ sinclude(config/ac-macros/ha_innodb.m4)
+ sinclude(config/ac-macros/ha_ndbcluster.m4)
+@@ -2450,6 +2451,7 @@
+ MYSQL_CHECK_BDB
+ MYSQL_CHECK_INNODB
+ MYSQL_CHECK_EXAMPLEDB
++MYSQL_CHECK_SPHINXDB
+ MYSQL_CHECK_ARCHIVEDB
+ MYSQL_CHECK_CSVDB
+ MYSQL_CHECK_BLACKHOLEDB
+diff -B -N -r -u mysql-5.0.22/libmysqld/Makefile.am mysql-5.0.22.sx/libmysqld/Makefile.am
+--- mysql-5.0.22/libmysqld/Makefile.am 2006-05-25 10:56:55.000000000 +0200
++++ mysql-5.0.22.sx/libmysqld/Makefile.am 2006-06-06 19:49:38.000000000 +0200
+@@ -27,7 +27,7 @@
+ -DSHAREDIR="\"$(MYSQLSHAREdir)\""
+ INCLUDES= @bdb_includes@ \
+ -I$(top_builddir)/include -I$(top_srcdir)/include \
+- -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \
++ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/sql/sphinx \
+ -I$(top_srcdir)/regex \
+ $(openssl_includes) $(yassl_includes) @ZLIB_INCLUDES@
+
+@@ -38,6 +38,7 @@
+ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
+ my_time.c
+ sqlexamplessources = ha_example.cc ha_tina.cc
++sqlsphinxsources = ha_sphinx.cc
+
+ noinst_HEADERS = embedded_priv.h emb_qcache.h
+
+@@ -65,7 +66,7 @@
+ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
+ ha_blackhole.cc ha_archive.cc my_user.c
+
+-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources)
++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources)
+ libmysqld_a_SOURCES=
+
+ # automake misses these
+@@ -133,12 +134,16 @@
+ rm -f $$f; \
+ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \
+ done; \
++ for f in $(sqlsphinxsources); do \
++ rm -f $$f; \
++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \
++ done; \
+ rm -f client_settings.h; \
+ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h
+
+
+ clean-local:
+- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \
++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \
+ $(top_srcdir)/linked_libmysqld_sources; \
+ rm -f client_settings.h
+
+diff -B -N -r -u mysql-5.0.22/sql/handler.cc mysql-5.0.22.sx/sql/handler.cc
+--- mysql-5.0.22/sql/handler.cc 2006-05-25 10:56:42.000000000 +0200
++++ mysql-5.0.22.sx/sql/handler.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -78,6 +78,15 @@
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ HTON_NO_FLAGS };
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++extern handlerton sphinx_hton;
++#else
++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine",
++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ HTON_NO_FLAGS };
++#endif
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ extern handlerton innobase_hton;
+@@ -147,6 +156,7 @@
+ &example_hton,
+ &archive_hton,
+ &tina_hton,
++ &sphinx_hton,
+ &ndbcluster_hton,
+ &federated_hton,
+ &myisammrg_hton,
+@@ -345,6 +355,12 @@
+ return new (alloc) ha_tina(table);
+ return NULL;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case DB_TYPE_SPHINX_DB:
++ if (have_sphinx_db == SHOW_OPTION_YES)
++ return new (alloc) ha_sphinx(table);
++ return NULL;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ case DB_TYPE_NDBCLUSTER:
+ if (have_ndbcluster == SHOW_OPTION_YES)
+diff -B -N -r -u mysql-5.0.22/sql/handler.h mysql-5.0.22.sx/sql/handler.h
+--- mysql-5.0.22/sql/handler.h 2006-05-25 10:56:55.000000000 +0200
++++ mysql-5.0.22.sx/sql/handler.h 2006-06-06 19:49:38.000000000 +0200
+@@ -183,8 +183,9 @@
+ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB,
+ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER,
+ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB,
+- DB_TYPE_FEDERATED_DB,
++ DB_TYPE_FEDERATED_DB,
+ DB_TYPE_BLACKHOLE_DB,
++ DB_TYPE_SPHINX_DB,
+ DB_TYPE_DEFAULT // Must be last
+ };
+
+diff -B -N -r -u mysql-5.0.22/sql/Makefile.am mysql-5.0.22.sx/sql/Makefile.am
+--- mysql-5.0.22/sql/Makefile.am 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/Makefile.am 2006-06-06 19:49:38.000000000 +0200
+@@ -66,6 +66,7 @@
+ sql_array.h sql_cursor.h \
+ examples/ha_example.h ha_archive.h \
+ examples/ha_tina.h ha_blackhole.h \
++ sphinx/ha_sphinx.h \
+ ha_federated.h
+ mysqld_SOURCES = sql_lex.cc sql_handler.cc \
+ item.cc item_sum.cc item_buff.cc item_func.cc \
+@@ -102,6 +103,7 @@
+ sp_cache.cc parse_file.cc sql_trigger.cc \
+ examples/ha_example.cc ha_archive.cc \
+ examples/ha_tina.cc ha_blackhole.cc \
++ sphinx/ha_sphinx.cc \
+ ha_federated.cc
+
+ gen_lex_hash_SOURCES = gen_lex_hash.cc
+diff -B -N -r -u mysql-5.0.22/sql/mysqld.cc mysql-5.0.22.sx/sql/mysqld.cc
+--- mysql-5.0.22/sql/mysqld.cc 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/mysqld.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -6420,6 +6420,11 @@
+ #else
+ have_csv_db= SHOW_OPTION_NO;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ have_sphinx_db= SHOW_OPTION_YES;
++#else
++ have_sphinx_db= SHOW_OPTION_NO;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ have_ndbcluster=SHOW_OPTION_DISABLED;
+ #else
+@@ -7457,6 +7462,7 @@
+ #undef have_example_db
+ #undef have_archive_db
+ #undef have_csv_db
++#undef have_sphinx_db
+ #undef have_federated_db
+ #undef have_partition_db
+ #undef have_blackhole_db
+@@ -7467,6 +7473,7 @@
+ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO;
++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
+diff -B -N -r -u mysql-5.0.22/sql/mysql_priv.h mysql-5.0.22.sx/sql/mysql_priv.h
+--- mysql-5.0.22/sql/mysql_priv.h 2006-05-25 10:56:43.000000000 +0200
++++ mysql-5.0.22.sx/sql/mysql_priv.h 2006-06-06 19:49:38.000000000 +0200
+@@ -1279,6 +1279,12 @@
+ #else
+ extern SHOW_COMP_OPTION have_csv_db;
+ #endif
++#ifdef HAVE_SPHINX_DB
++extern handlerton sphinx_hton;
++#define have_sphinx_db sphinx_hton.state
++#else
++extern SHOW_COMP_OPTION have_sphinx_db;
++#endif
+ #ifdef HAVE_FEDERATED_DB
+ extern handlerton federated_hton;
+ #define have_federated_db federated_hton.state
+diff -B -N -r -u mysql-5.0.22/sql/set_var.cc mysql-5.0.22.sx/sql/set_var.cc
+--- mysql-5.0.22/sql/set_var.cc 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/set_var.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -864,6 +864,7 @@
+ {"have_compress", (char*) &have_compress, SHOW_HAVE},
+ {"have_crypt", (char*) &have_crypt, SHOW_HAVE},
+ {"have_csv", (char*) &have_csv_db, SHOW_HAVE},
++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE},
+ {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE},
+ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE},
+ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE},
+diff -B -N -r -u mysql-5.0.22/sql/sql_lex.h mysql-5.0.22.sx/sql/sql_lex.h
+--- mysql-5.0.22/sql/sql_lex.h 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/sql_lex.h 2006-06-06 19:49:38.000000000 +0200
+@@ -58,6 +58,7 @@
+ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS,
+ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS,
+ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS,
++ SQLCOM_SHOW_SPHINX_STATUS,
+ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT,
+ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS,
+ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS,
+diff -B -N -r -u mysql-5.0.22/sql/sql_parse.cc mysql-5.0.22.sx/sql/sql_parse.cc
+--- mysql-5.0.22/sql/sql_parse.cc 2006-05-25 10:56:41.000000000 +0200
++++ mysql-5.0.22.sx/sql/sql_parse.cc 2006-06-06 19:49:38.000000000 +0200
+@@ -25,6 +25,9 @@
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++#endif
+
+ #ifdef HAVE_NDBCLUSTER_DB
+ #include "ha_ndbcluster.h"
+@@ -2722,6 +2725,15 @@
+ break;
+ }
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case SQLCOM_SHOW_SPHINX_STATUS:
++ {
++ if (check_global_access(thd, SUPER_ACL))
++ goto error;
++ res = sphinx_show_status(thd);
++ break;
++ }
++#endif
+ #ifdef HAVE_REPLICATION
+ case SQLCOM_LOAD_MASTER_TABLE:
+ {
+diff -B -N -r -u mysql-5.0.22/sql/sql_yacc.yy mysql-5.0.22.sx/sql/sql_yacc.yy
+--- mysql-5.0.22/sql/sql_yacc.yy 2006-05-25 10:56:43.000000000 +0200
++++ mysql-5.0.22.sx/sql/sql_yacc.yy 2006-06-06 19:49:38.000000000 +0200
+@@ -6584,6 +6584,9 @@
+ case DB_TYPE_INNODB:
+ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS;
+ break;
++ case DB_TYPE_SPHINX_DB:
++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS;
++ break;
+ default:
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS");
+ YYABORT;
diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.37.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.37.diff
--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.37.diff 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/sphinx.5.0.37.diff 2009-02-14 22:57:42.000000000 +0900
@@ -0,0 +1,338 @@
+--- mysql-5.0.67/config/ac-macros/ha_sphinx.m4 1970-01-01 10:00:00.000000000 +1000
++++ mysql-5.0.67-sphinx/config/ac-macros/ha_sphinx.m4 2009-02-14 09:15:48.000000000 +1000
+@@ -0,0 +1,30 @@
++dnl ---------------------------------------------------------------------------
++dnl Macro: MYSQL_CHECK_EXAMPLEDB
++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used
++dnl ---------------------------------------------------------------------------
++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [
++ AC_ARG_WITH([sphinx-storage-engine],
++ [
++ --with-sphinx-storage-engine
++ Enable the Sphinx Storage Engine],
++ [sphinxdb="$withval"],
++ [sphinxdb=no])
++ AC_MSG_CHECKING([for example storage engine])
++
++ case "$sphinxdb" in
++ yes )
++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine])
++ AC_MSG_RESULT([yes])
++ [sphinxdb=yes]
++ ;;
++ * )
++ AC_MSG_RESULT([no])
++ [sphinxdb=no]
++ ;;
++ esac
++
++])
++dnl ---------------------------------------------------------------------------
++dnl END OF MYSQL_CHECK_EXAMPLE SECTION
++dnl ---------------------------------------------------------------------------
++
+--- mysql-5.0.67/configure.in 2008-08-04 23:19:07.000000000 +1100
++++ mysql-5.0.67-sphinx/configure.in 2009-02-14 09:15:48.000000000 +1000
+@@ -58,6 +58,7 @@
+ sinclude(config/ac-macros/ha_berkeley.m4)
+ sinclude(config/ac-macros/ha_blackhole.m4)
+ sinclude(config/ac-macros/ha_example.m4)
++sinclude(config/ac-macros/ha_sphinx.m4)
+ sinclude(config/ac-macros/ha_federated.m4)
+ sinclude(config/ac-macros/ha_innodb.m4)
+ sinclude(config/ac-macros/ha_ndbcluster.m4)
+@@ -2625,6 +2626,7 @@
+ MYSQL_CHECK_BDB
+ MYSQL_CHECK_INNODB
+ MYSQL_CHECK_EXAMPLEDB
++MYSQL_CHECK_SPHINXDB
+ MYSQL_CHECK_ARCHIVEDB
+ MYSQL_CHECK_CSVDB
+ MYSQL_CHECK_BLACKHOLEDB
+--- mysql-5.0.67/libmysqld/Makefile.am 2008-08-04 23:19:18.000000000 +1100
++++ mysql-5.0.67-sphinx/libmysqld/Makefile.am 2009-02-14 09:15:48.000000000 +1000
+@@ -29,6 +29,7 @@
+ -I$(top_builddir)/include -I$(top_srcdir)/include \
+ -I$(top_builddir)/sql -I$(top_srcdir)/sql \
+ -I$(top_srcdir)/sql/examples \
++ -I$(top_srcdir)/sql/sphinx \
+ -I$(top_srcdir)/regex \
+ $(openssl_includes) @ZLIB_INCLUDES@
+
+@@ -39,6 +40,7 @@
+ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
+ my_time.c
+ sqlexamplessources = ha_example.cc ha_tina.cc
++sqlsphinxsources = ha_sphinx.cc
+
+ noinst_HEADERS = embedded_priv.h emb_qcache.h
+
+@@ -67,7 +69,7 @@
+ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
+ ha_blackhole.cc ha_archive.cc my_user.c
+
+-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources)
++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources)
+ libmysqld_a_SOURCES=
+
+ # automake misses these
+@@ -147,12 +149,16 @@
+ rm -f $$f; \
+ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \
+ done; \
++ for f in $(sqlsphinxsources); do \
++ rm -f $$f; \
++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \
++ done; \
+ rm -f client_settings.h; \
+ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h
+
+
+ clean-local:
+- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \
++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \
+ $(top_srcdir)/linked_libmysqld_sources; \
+ rm -f client_settings.h
+
+--- mysql-5.0.67/sql/handler.cc 2008-08-04 23:20:04.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/handler.cc 2009-02-14 09:15:48.000000000 +1000
+@@ -77,6 +77,15 @@
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ HTON_NO_FLAGS };
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++extern handlerton sphinx_hton;
++#else
++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine",
++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ HTON_NO_FLAGS };
++#endif
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ extern handlerton innobase_hton;
+@@ -141,6 +150,7 @@
+ &example_hton,
+ &archive_hton,
+ &tina_hton,
++ &sphinx_hton,
+ &ndbcluster_hton,
+ &federated_hton,
+ &myisammrg_hton,
+@@ -341,6 +351,12 @@
+ return new (alloc) ha_tina(table);
+ return NULL;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case DB_TYPE_SPHINX_DB:
++ if (have_sphinx_db == SHOW_OPTION_YES)
++ return new (alloc) ha_sphinx(table);
++ return NULL;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ case DB_TYPE_NDBCLUSTER:
+ if (have_ndbcluster == SHOW_OPTION_YES)
+--- mysql-5.0.67/sql/handler.h 2008-08-04 23:20:04.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/handler.h 2009-02-14 09:15:48.000000000 +1000
+@@ -186,8 +186,9 @@
+ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB,
+ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER,
+ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB,
+- DB_TYPE_FEDERATED_DB,
++ DB_TYPE_FEDERATED_DB,
+ DB_TYPE_BLACKHOLE_DB,
++ DB_TYPE_SPHINX_DB,
+ DB_TYPE_DEFAULT // Must be last
+ };
+
+--- mysql-5.0.67/sql/Makefile.am 2008-08-04 23:20:02.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/Makefile.am 2009-02-14 09:23:28.000000000 +1000
+@@ -68,6 +68,7 @@
+ sql_array.h sql_cursor.h \
+ examples/ha_example.h ha_archive.h \
+ examples/ha_tina.h ha_blackhole.h \
++ sphinx/ha_sphinx.h \
+ ha_federated.h
+ mysqld_SOURCES = sql_lex.cc sql_handler.cc \
+ item.cc item_sum.cc item_buff.cc item_func.cc \
+@@ -105,6 +106,7 @@
+ sp_cache.cc parse_file.cc sql_trigger.cc \
+ examples/ha_example.cc ha_archive.cc \
+ examples/ha_tina.cc ha_blackhole.cc \
++ sphinx/ha_sphinx.cc \
+ ha_federated.cc
+
+ gen_lex_hash_SOURCES = gen_lex_hash.cc
+@@ -174,6 +176,10 @@
+ udf_example_la_SOURCES= udf_example.c
+ udf_example_la_LDFLAGS= -module -rpath $(pkglibdir)
+
++pkglib_LTLIBRARIES = sphinx/sphinx.la
++sphinx_sphinx_la_SOURCES = sphinx/snippets_udf.cc
++sphinx_sphinx_la_LDFLAGS = -module
++
+
+ # Don't update the files from bitkeeper
+ %::SCCS/s.%
+--- mysql-5.0.67/sql/mysqld.cc 2008-08-04 23:20:07.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/mysqld.cc 2009-02-14 09:15:48.000000000 +1000
+@@ -36,6 +36,10 @@
+ #include <sys/prctl.h>
+ #endif
+
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++#endif
++
+ #ifdef HAVE_INNOBASE_DB
+ #define OPT_INNODB_DEFAULT 1
+ #else
+@@ -6633,6 +6637,13 @@
+ {"Threads_running", (char*) &thread_running, SHOW_INT_CONST},
+ {"Uptime", (char*) 0, SHOW_STARTTIME},
+ {"Uptime_since_flush_status",(char*) 0, SHOW_FLUSHTIME},
++#ifdef HAVE_SPHINX_DB
++ {"sphinx_total", (char *)sphinx_showfunc_total, SHOW_SPHINX_FUNC},
++ {"sphinx_total_found", (char *)sphinx_showfunc_total_found, SHOW_SPHINX_FUNC},
++ {"sphinx_time", (char *)sphinx_showfunc_time, SHOW_SPHINX_FUNC},
++ {"sphinx_word_count", (char *)sphinx_showfunc_word_count, SHOW_SPHINX_FUNC},
++ {"sphinx_words", (char *)sphinx_showfunc_words, SHOW_SPHINX_FUNC},
++#endif
+ {NullS, NullS, SHOW_LONG}
+ };
+
+@@ -6875,6 +6886,11 @@
+ #else
+ have_csv_db= SHOW_OPTION_NO;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ have_sphinx_db= SHOW_OPTION_YES;
++#else
++ have_sphinx_db= SHOW_OPTION_NO;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ have_ndbcluster=SHOW_OPTION_DISABLED;
+ #else
+@@ -7983,6 +7999,7 @@
+ #undef have_example_db
+ #undef have_archive_db
+ #undef have_csv_db
++#undef have_sphinx_db
+ #undef have_federated_db
+ #undef have_partition_db
+ #undef have_blackhole_db
+@@ -7993,6 +8010,7 @@
+ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO;
++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
+--- mysql-5.0.67/sql/mysql_priv.h 2008-08-04 23:20:07.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/mysql_priv.h 2009-02-14 09:15:48.000000000 +1000
+@@ -1439,6 +1439,12 @@
+ #else
+ extern SHOW_COMP_OPTION have_csv_db;
+ #endif
++#ifdef HAVE_SPHINX_DB
++extern handlerton sphinx_hton;
++#define have_sphinx_db sphinx_hton.state
++#else
++extern SHOW_COMP_OPTION have_sphinx_db;
++#endif
+ #ifdef HAVE_FEDERATED_DB
+ extern handlerton federated_hton;
+ #define have_federated_db federated_hton.state
+--- mysql-5.0.67/sql/set_var.cc 2008-08-04 23:20:08.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/set_var.cc 2009-02-14 09:15:48.000000000 +1000
+@@ -888,6 +888,7 @@
+ {"have_compress", (char*) &have_compress, SHOW_HAVE},
+ {"have_crypt", (char*) &have_crypt, SHOW_HAVE},
+ {"have_csv", (char*) &have_csv_db, SHOW_HAVE},
++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE},
+ {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE},
+ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE},
+ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE},
+--- mysql-5.0.67/sql/sql_lex.h 2008-08-04 23:20:10.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/sql_lex.h 2009-02-14 09:15:48.000000000 +1000
+@@ -57,6 +57,7 @@
+ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS,
+ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS,
+ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS,
++ SQLCOM_SHOW_SPHINX_STATUS,
+ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT,
+ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS,
+ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS,
+--- mysql-5.0.67/sql/sql_parse.cc 2008-08-04 23:20:10.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/sql_parse.cc 2009-02-14 09:15:48.000000000 +1000
+@@ -24,6 +24,9 @@
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++#endif
+
+ #ifdef HAVE_NDBCLUSTER_DB
+ #include "ha_ndbcluster.h"
+@@ -3006,6 +3009,15 @@
+ break;
+ }
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case SQLCOM_SHOW_SPHINX_STATUS:
++ {
++ if (check_global_access(thd, SUPER_ACL))
++ goto error;
++ res = sphinx_show_status(thd);
++ break;
++ }
++#endif
+ #ifdef HAVE_REPLICATION
+ case SQLCOM_LOAD_MASTER_TABLE:
+ {
+--- mysql-5.0.67/sql/sql_yacc.yy 2008-08-04 23:20:12.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/sql_yacc.yy 2009-02-14 09:15:48.000000000 +1000
+@@ -7393,6 +7393,9 @@
+ case DB_TYPE_INNODB:
+ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS;
+ break;
++ case DB_TYPE_SPHINX_DB:
++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS;
++ break;
+ default:
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS");
+ MYSQL_YYABORT;
+--- mysql-5.0.67/sql/structs.h 2008-08-04 23:20:12.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/structs.h 2009-02-14 09:15:48.000000000 +1000
+@@ -188,6 +188,9 @@
+ SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL,
+ SHOW_SSL_GET_CIPHER_LIST,
+ #endif /* HAVE_OPENSSL */
++#ifdef HAVE_SPHINX_DB
++ SHOW_SPHINX_FUNC,
++#endif
+ SHOW_NET_COMPRESSION,
+ SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS,
+ SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG,
+--- mysql-5.0.67/sql/sql_show.cc 2008-08-04 23:20:11.000000000 +1100
++++ mysql-5.0.67-sphinx/sql/sql_show.cc 2009-02-14 09:15:48.000000000 +1000
+@@ -1473,6 +1473,16 @@
+ value= (char*) ((sys_var*) value)->value_ptr(thd, value_type,
+ &null_lex_str);
+ }
++ #ifdef HAVE_SPHINX_DB
++ else if (show_type == SHOW_SPHINX_FUNC)
++ {
++ SHOW_VAR var;
++ ((int (*)(THD *, SHOW_VAR *, char *))value)(thd, &var, buff);
++
++ value = var.value;
++ show_type = var.type;
++ }
++ #endif /* HAVE_SPHINX_DB */
+
+ pos= end= buff;
+ switch (show_type) {
diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.91.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.91.diff
--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.91.diff 1970-01-01 09:00:00.000000000 +0900
+++ mysql-5.1.49/storage/sphinx/sphinx.5.0.91.diff 2010-07-07 05:03:30.000000000 +0900
@@ -0,0 +1,400 @@
+diff -r 319c65835581 CMakeLists.txt
+--- a/CMakeLists.txt Sun Jun 20 15:15:01 2010 +0400
++++ b/CMakeLists.txt Sun Jun 20 15:59:31 2010 +0400
+@@ -70,6 +70,10 @@
+ ADD_DEFINITIONS(-DHAVE_INNOBASE_DB)
+ ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
+
++IF(WITH_SPHINX_STORAGE_ENGINE)
++ ADD_DEFINITIONS(-DHAVE_SPHINX_DB)
++ENDIF(WITH_SPHINX_STORAGE_ENGINE)
++
+ SET(localstatedir "C:\\mysql\\data")
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh
+ ${CMAKE_SOURCE_DIR}/support-files/my-huge.ini @ONLY)
+diff -r 319c65835581 configure.in
+--- a/configure.in Sun Jun 20 15:15:01 2010 +0400
++++ b/configure.in Sun Jun 20 15:59:31 2010 +0400
+@@ -60,6 +60,7 @@
+ sinclude(config/ac-macros/ha_berkeley.m4)
+ sinclude(config/ac-macros/ha_blackhole.m4)
+ sinclude(config/ac-macros/ha_example.m4)
++sinclude(config/ac-macros/ha_sphinx.m4)
+ sinclude(config/ac-macros/ha_federated.m4)
+ sinclude(config/ac-macros/ha_innodb.m4)
+ sinclude(config/ac-macros/ha_ndbcluster.m4)
+@@ -2696,6 +2697,7 @@
+ MYSQL_CHECK_BDB
+ MYSQL_CHECK_INNODB
+ MYSQL_CHECK_EXAMPLEDB
++MYSQL_CHECK_SPHINXDB
+ MYSQL_CHECK_ARCHIVEDB
+ MYSQL_CHECK_CSVDB
+ MYSQL_CHECK_BLACKHOLEDB
+diff -r 319c65835581 libmysqld/Makefile.am
+--- a/libmysqld/Makefile.am Sun Jun 20 15:15:01 2010 +0400
++++ b/libmysqld/Makefile.am Sun Jun 20 15:59:31 2010 +0400
+@@ -29,6 +29,7 @@
+ -I$(top_builddir)/include -I$(top_srcdir)/include \
+ -I$(top_builddir)/sql -I$(top_srcdir)/sql \
+ -I$(top_srcdir)/sql/examples \
++ -I$(top_srcdir)/sql/sphinx \
+ -I$(top_srcdir)/regex \
+ $(openssl_includes) @ZLIB_INCLUDES@
+
+@@ -39,6 +40,7 @@
+ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
+ my_time.c
+ sqlexamplessources = ha_example.cc ha_tina.cc
++sqlsphinxsources = ha_sphinx.cc
+
+ noinst_HEADERS = embedded_priv.h emb_qcache.h
+
+@@ -67,7 +69,7 @@
+ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
+ ha_blackhole.cc ha_archive.cc my_user.c
+
+-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources)
++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources)
+ libmysqld_a_SOURCES=
+
+ # automake misses these
+@@ -147,12 +149,16 @@
+ rm -f $$f; \
+ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \
+ done; \
++ for f in $(sqlsphinxsources); do \
++ rm -f $$f; \
++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \
++ done; \
+ rm -f client_settings.h; \
+ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h
+
+
+ clean-local:
+- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \
++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \
+ $(top_srcdir)/linked_libmysqld_sources; \
+ rm -f client_settings.h
+
+diff -r 319c65835581 sql/CMakeLists.txt
+--- a/sql/CMakeLists.txt Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/CMakeLists.txt Sun Jun 20 15:59:31 2010 +0400
+@@ -50,6 +50,7 @@
+ filesort.cc gstream.cc ha_blackhole.cc
+ ha_archive.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc
+ ha_innodb.cc ha_federated.cc ha_berkeley.cc
++ sphinx/ha_sphinx.cc
+ handler.cc hash_filo.cc hash_filo.h
+ hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc
+ item_create.cc item_func.cc item_geofunc.cc item_row.cc
+diff -r 319c65835581 sql/Makefile.am
+--- a/sql/Makefile.am Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/Makefile.am Sun Jun 20 15:59:31 2010 +0400
+@@ -68,6 +68,7 @@
+ sql_array.h sql_cursor.h \
+ examples/ha_example.h ha_archive.h \
+ examples/ha_tina.h ha_blackhole.h \
++ sphinx/ha_sphinx.h \
+ ha_federated.h
+ mysqld_SOURCES = sql_lex.cc sql_handler.cc \
+ item.cc item_sum.cc item_buff.cc item_func.cc \
+@@ -105,6 +106,7 @@
+ sp_cache.cc parse_file.cc sql_trigger.cc \
+ examples/ha_example.cc ha_archive.cc \
+ examples/ha_tina.cc ha_blackhole.cc \
++ sphinx/ha_sphinx.cc \
+ ha_federated.cc
+
+ gen_lex_hash_SOURCES = gen_lex_hash.cc
+@@ -175,6 +177,10 @@
+ udf_example_la_SOURCES= udf_example.c
+ udf_example_la_LDFLAGS= -module -rpath $(pkglibdir)
+
++pkglib_LTLIBRARIES = sphinx/sphinx.la
++sphinx_sphinx_la_SOURCES = sphinx/snippets_udf.cc
++sphinx_sphinx_la_LDFLAGS = -module
++
+
+ # Don't update the files from bitkeeper
+ %::SCCS/s.%
+diff -r 319c65835581 sql/handler.cc
+--- a/sql/handler.cc Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/handler.cc Sun Jun 20 15:59:31 2010 +0400
+@@ -77,6 +77,15 @@
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ HTON_NO_FLAGS };
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++extern handlerton sphinx_hton;
++#else
++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine",
++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ HTON_NO_FLAGS };
++#endif
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ extern handlerton innobase_hton;
+@@ -141,6 +150,7 @@
+ &example_hton,
+ &archive_hton,
+ &tina_hton,
++ &sphinx_hton,
+ &ndbcluster_hton,
+ &federated_hton,
+ &myisammrg_hton,
+@@ -342,6 +352,12 @@
+ return new (alloc) ha_tina(table);
+ return NULL;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case DB_TYPE_SPHINX_DB:
++ if (have_sphinx_db == SHOW_OPTION_YES)
++ return new (alloc) ha_sphinx(table);
++ return NULL;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ case DB_TYPE_NDBCLUSTER:
+ if (have_ndbcluster == SHOW_OPTION_YES)
+diff -r 319c65835581 sql/handler.h
+--- a/sql/handler.h Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/handler.h Sun Jun 20 15:59:31 2010 +0400
+@@ -186,8 +186,9 @@
+ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB,
+ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER,
+ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB,
+- DB_TYPE_FEDERATED_DB,
++ DB_TYPE_FEDERATED_DB,
+ DB_TYPE_BLACKHOLE_DB,
++ DB_TYPE_SPHINX_DB,
+ DB_TYPE_DEFAULT // Must be last
+ };
+
+diff -r 319c65835581 sql/mysql_priv.h
+--- a/sql/mysql_priv.h Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/mysql_priv.h Sun Jun 20 15:59:31 2010 +0400
+@@ -1462,6 +1462,12 @@
+ #else
+ extern SHOW_COMP_OPTION have_csv_db;
+ #endif
++#ifdef HAVE_SPHINX_DB
++extern handlerton sphinx_hton;
++#define have_sphinx_db sphinx_hton.state
++#else
++extern SHOW_COMP_OPTION have_sphinx_db;
++#endif
+ #ifdef HAVE_FEDERATED_DB
+ extern handlerton federated_hton;
+ #define have_federated_db federated_hton.state
+diff -r 319c65835581 sql/mysqld.cc
+--- a/sql/mysqld.cc Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/mysqld.cc Sun Jun 20 15:59:31 2010 +0400
+@@ -36,6 +36,10 @@
+ #include <sys/prctl.h>
+ #endif
+
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++#endif
++
+ #ifdef HAVE_INNOBASE_DB
+ #define OPT_INNODB_DEFAULT 1
+ #else
+@@ -6721,6 +6725,13 @@
+ #ifdef COMMUNITY_SERVER
+ {"Uptime_since_flush_status",(char*) 0, SHOW_FLUSHTIME},
+ #endif
++#ifdef HAVE_SPHINX_DB
++ {"sphinx_total", (char *)sphinx_showfunc_total, SHOW_SPHINX_FUNC},
++ {"sphinx_total_found", (char *)sphinx_showfunc_total_found, SHOW_SPHINX_FUNC},
++ {"sphinx_time", (char *)sphinx_showfunc_time, SHOW_SPHINX_FUNC},
++ {"sphinx_word_count", (char *)sphinx_showfunc_word_count, SHOW_SPHINX_FUNC},
++ {"sphinx_words", (char *)sphinx_showfunc_words, SHOW_SPHINX_FUNC},
++#endif
+ {NullS, NullS, SHOW_LONG}
+ };
+
+@@ -6964,6 +6975,11 @@
+ #else
+ have_csv_db= SHOW_OPTION_NO;
+ #endif
++#ifdef HAVE_SPHINX_DB
++ have_sphinx_db= SHOW_OPTION_YES;
++#else
++ have_sphinx_db= SHOW_OPTION_NO;
++#endif
+ #ifdef HAVE_NDBCLUSTER_DB
+ have_ndbcluster=SHOW_OPTION_DISABLED;
+ #else
+@@ -8087,6 +8103,7 @@
+ #undef have_example_db
+ #undef have_archive_db
+ #undef have_csv_db
++#undef have_sphinx_db
+ #undef have_federated_db
+ #undef have_partition_db
+ #undef have_blackhole_db
+@@ -8097,6 +8114,7 @@
+ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO;
++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO;
+ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
+diff -r 319c65835581 sql/set_var.cc
+--- a/sql/set_var.cc Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/set_var.cc Sun Jun 20 15:59:31 2010 +0400
+@@ -913,6 +913,7 @@
+ {"have_profiling", (char*) &have_profiling, SHOW_HAVE},
+ {"have_crypt", (char*) &have_crypt, SHOW_HAVE},
+ {"have_csv", (char*) &have_csv_db, SHOW_HAVE},
++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE},
+ {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE},
+ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE},
+ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE},
+diff -r 319c65835581 sql/sql_lex.h
+--- a/sql/sql_lex.h Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/sql_lex.h Sun Jun 20 15:59:31 2010 +0400
+@@ -57,6 +57,7 @@
+ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS,
+ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS,
+ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS,
++ SQLCOM_SHOW_SPHINX_STATUS,
+ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT,
+ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS,
+ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS,
+diff -r 319c65835581 sql/sql_parse.cc
+--- a/sql/sql_parse.cc Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/sql_parse.cc Sun Jun 20 15:59:31 2010 +0400
+@@ -24,6 +24,9 @@
+ #ifdef HAVE_INNOBASE_DB
+ #include "ha_innodb.h"
+ #endif
++#ifdef HAVE_SPHINX_DB
++#include "sphinx/ha_sphinx.h"
++#endif
+
+ #ifdef HAVE_NDBCLUSTER_DB
+ #include "ha_ndbcluster.h"
+@@ -3166,6 +3169,15 @@
+ break;
+ }
+ #endif
++#ifdef HAVE_SPHINX_DB
++ case SQLCOM_SHOW_SPHINX_STATUS:
++ {
++ if (check_global_access(thd, SUPER_ACL))
++ goto error;
++ res = sphinx_show_status(thd);
++ break;
++ }
++#endif
+ #ifdef HAVE_REPLICATION
+ case SQLCOM_LOAD_MASTER_TABLE:
+ {
+diff -r 319c65835581 sql/sql_show.cc
+--- a/sql/sql_show.cc Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/sql_show.cc Sun Jun 20 15:59:31 2010 +0400
+@@ -1500,6 +1500,16 @@
+ value= (char*) var->value_ptr(thd, value_type, &null_lex_str);
+ charset= var->charset(thd);
+ }
++ #ifdef HAVE_SPHINX_DB
++ else if (show_type == SHOW_SPHINX_FUNC)
++ {
++ SHOW_VAR var;
++ ((int (*)(THD *, SHOW_VAR *, char *))value)(thd, &var, buff);
++
++ value = var.value;
++ show_type = var.type;
++ }
++ #endif /* HAVE_SPHINX_DB */
+
+ pos= end= buff;
+ switch (show_type) {
+diff -r 319c65835581 sql/sql_yacc.yy
+--- a/sql/sql_yacc.yy Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/sql_yacc.yy Sun Jun 20 15:59:31 2010 +0400
+@@ -8342,6 +8342,9 @@
+ case DB_TYPE_INNODB:
+ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS;
+ break;
++ case DB_TYPE_SPHINX_DB:
++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS;
++ break;
+ default:
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS");
+ MYSQL_YYABORT;
+diff -r 319c65835581 sql/sql_yacc.cc
+--- a/sql/sql_yacc.cc Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/sql_yacc.cc Sun Jun 20 15:59:31 2010 +0400
+@@ -27003,6 +27003,9 @@
+ case DB_TYPE_INNODB:
+ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS;
+ break;
++ case DB_TYPE_SPHINX_DB:
++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS;
++ break;
+ default:
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS");
+ MYSQL_YYABORT;
+diff -r 319c65835581 sql/structs.h
+--- a/sql/structs.h Sun Jun 20 15:15:01 2010 +0400
++++ b/sql/structs.h Sun Jun 20 15:59:31 2010 +0400
+@@ -194,6 +194,9 @@
+ SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL,
+ SHOW_SSL_GET_CIPHER_LIST,
+ #endif /* HAVE_OPENSSL */
++#ifdef HAVE_SPHINX_DB
++ SHOW_SPHINX_FUNC,
++#endif
+ SHOW_NET_COMPRESSION,
+ SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS,
+ SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG,
+diff -r 319c65835581 win/configure.js
+--- a/win/configure.js Sun Jun 20 15:15:01 2010 +0400
++++ b/win/configure.js Sun Jun 20 15:59:31 2010 +0400
+@@ -45,6 +45,7 @@
+ case "WITH_EXAMPLE_STORAGE_ENGINE":
+ case "WITH_FEDERATED_STORAGE_ENGINE":
+ case "WITH_INNOBASE_STORAGE_ENGINE":
++ case "WITH_SPHINX_STORAGE_ENGINE":
+ case "__NT__":
+ case "DISABLE_GRANT_OPTIONS":
+ case "EMBED_MANIFESTS":
+--- mysql-5.0.67/config/ac-macros/ha_sphinx.m4 1970-01-01 10:00:00.000000000 +1000
++++ mysql-5.0.67-sphinx/config/ac-macros/ha_sphinx.m4 2009-02-14 09:15:48.000000000 +1000
+@@ -0,0 +1,30 @@
++dnl ---------------------------------------------------------------------------
++dnl Macro: MYSQL_CHECK_EXAMPLEDB
++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used
++dnl ---------------------------------------------------------------------------
++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [
++ AC_ARG_WITH([sphinx-storage-engine],
++ [
++ --with-sphinx-storage-engine
++ Enable the Sphinx Storage Engine],
++ [sphinxdb="$withval"],
++ [sphinxdb=no])
++ AC_MSG_CHECKING([for example storage engine])
++
++ case "$sphinxdb" in
++ yes )
++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine])
++ AC_MSG_RESULT([yes])
++ [sphinxdb=yes]
++ ;;
++ * )
++ AC_MSG_RESULT([no])
++ [sphinxdb=no]
++ ;;
++ esac
++
++])
++dnl ---------------------------------------------------------------------------
++dnl END OF MYSQL_CHECK_EXAMPLE SECTION
++dnl ---------------------------------------------------------------------------
++
......@@ -11,11 +11,14 @@ configure-options =
--with-shared
--without-normal
--without-debug
--without-gpm
--enable-rpath
# tricky way to rerun with --enable-widec
make-targets =
install && (for i in curses unctrl eti form menu panel term; do ln -sf ncurses/$i.h ${buildout:parts-directory}/${:_buildout_section_name_}/include/$i.h; done) && ./configure ${:configure-options} --enable-widec && make install
# pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user
environment =
LDFLAGS =-Wl,--as-needed
LDCONFIG=/bin/echo
make-options =
-j1
......@@ -4,5 +4,5 @@ parts =
[noVNC]
recipe = hexagonit.recipe.download
url = https://github.com/kanaka/noVNC/tarball/v0.1
url = https://github.com/kanaka/noVNC/tarball/master
strip-top-level-dir = true
################################################################
# OpenSSH Portable - a secure shell client and server for *nix #
# #
# http://www.openssh.com/ #
################################################################
[buildout]
extends =
../openssl/buildout.cfg
parts =
openssh
[openssh]
recipe = hexagonit.recipe.cmmi
md5sum = 0541579adf9d55abb15ef927048d372e
url = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.8p2.tar.gz
configure-option =
-I${zlib:location}/include
-L${zlib:location}/lib
-I${openssl:location}/include
-L${openssl:location}/lib
--with-ssl-dir=${openssl:location}/lib
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--libdir=lib
......@@ -12,8 +12,8 @@ parts =
[openssl]
recipe = hexagonit.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.0d.tar.gz
md5sum = 40b6ea380cc8a5bf9734c2f8bf7e701e
url = https://www.openssl.org/source/openssl-1.0.0e.tar.gz
md5sum = 7040b89c4c58c7a1016c0dfa6e821c86
configure-command = ./config
configure-options =
-I${zlib:location}/include
......
......@@ -39,6 +39,6 @@ make-options =
pre-make-hook = ${pdftk-hooks-download:location}/${pdftk-hooks-download:filename}:pre_make_hook
environment =
PATH=${gcc-java:location}/bin:${fastjar:location}/bin:%(PATH)s
LDFLAGS=-L${gcc-java:location}/lib -Wl,-rpath=${gcc-java:location}/lib -L${gcc-java:location}/lib64 -Wl,-rpath=${gcc-java:location}/lib64
LD_LIBRARY_PATH=${gcc-java:location}/lib:${gcc-java:location}/lib64
PATH=${gcc-java-minimal:location}/bin:${fastjar:location}/bin:%(PATH)s
LDFLAGS=-L${gcc-java-minimal:location}/lib -Wl,-rpath=${gcc-java-minimal:location}/lib -L${gcc-java-minimal:location}/lib64 -Wl,-rpath=${gcc-java-minimal:location}/lib64
LD_LIBRARY_PATH=${gcc-java-minimal:location}/lib:${gcc-java-minimal:location}/lib64
......@@ -15,8 +15,8 @@ extends =
[poppler-0.17.1]
recipe = hexagonit.recipe.cmmi
md5sum = 8d7276d1943078c76aabe9f2ec52d50b
url = http://poppler.freedesktop.org/poppler-0.17.1.tar.gz
md5sum = b566d1fbaa29b9257bf0ecc130e7b2ca
url = http://poppler.freedesktop.org/poppler-0.17.2.tar.gz
configure-options =
--disable-cairo-output
--disable-cms
......@@ -26,6 +26,7 @@ configure-options =
--disable-poppler-cpp
--disable-poppler-glib
--disable-poppler-qt4
--disable-static
--enable-zlib
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
......
[buildout]
parts =
rpm2cpio
[rpm2cpio]
recipe = slapos.recipe.build:download
url = http://ruda.googlecode.com/hg/rpm/rpm2cpio.py
md5sum = 06001f57616581312f9599e104f2473a
[buildout]
extends =
../../stack/shacache-client.cfg
../m2crypto/buildout.cfg
../bison/buildout.cfg
../bzip2/buildout.cfg
../gdbm/buildout.cfg
../gettext/buildout.cfg
../glib/buildout.cfg
../libxml2/buildout.cfg
../libxslt/buildout.cfg
../lxml-python/buildout.cfg
../m4/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
../pkgconfig/buildout.cfg
../popt/buildout.cfg
../python-2.7/buildout.cfg
../readline/buildout.cfg
../sqlite3/buildout.cfg
../swig/buildout.cfg
../zlib/buildout.cfg
parts =
slapos
cfg-environment
sh-environment
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
......@@ -27,22 +44,58 @@ include-site-packages = false
exec-sitecustomize = false
allowed-eggs-from-site-packages =
[lxml-python]
python = python2.7
[environment]
# Note: For now original PATH is appeneded to the end, as not all tools are
# provided by SlapOS
PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:$PATH
CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${popt:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include
CPPFLAGS=${:CFLAGS}
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${popt:location}/lib/pkgconfig:${python2.7:location}/lib/pkconfig:${sqlite3:location}/lib/pkconfig
LD_LIBRARY_PATH=${bzip2:location}/lib:${gdbm:location}/lib:${gettext:location}/lib:${glib:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${ncurses:location}/lib:${openssl:location}/lib:${popt:location}/lib:${readline:location}/lib:${sqlite3:location}/lib:${zlib:location}/lib
[cfg-environment]
# Section exposes SlapOS default environment as configuration file.
recipe = collective.recipe.template
input = inline:
[environment]
PATH=${environment:PATH}
CFLAGS=${environment:CFLAGS}
CPPFLAGS=${environment:CPPFLAGS}
LDFLAGS=${environment:LDFLAGS}
PKG_CONFIG_PATH=${environment:PKG_CONFIG_PATH}
LD_LIBRARY_PATH=${environment:LD_LIBRARY_PATH}
output = ${buildout:directory}/environment.cfg
[M2Crypto]
[sh-environment]
# Section exposes SlapOS default environment as sh file.
recipe = collective.recipe.template
input = inline:
export PATH="${environment:PATH}"
export CFLAGS="${environment:CFLAGS}"
export CPPFLAGS="${environment:CPPFLAGS}"
export LDFLAGS="${environment:LDFLAGS}"
export PKG_CONFIG_PATH="${environment:PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH="${environment:LD_LIBRARY_PATH}"
export PS1="[SlapOS env Active] $PS1"
output = ${buildout:directory}/environment.sh
[lxml-python]
python = python2.7
[slapos]
recipe = z3c.recipe.scripts
python = python2.7
eggs =
${M2Crypto:egg}
slapos.libnetworkcache
zc.buildout
${lxml-python:egg}
slapos.core
initialization =
import os
os.environ['PATH'] = os.path.expandvars('${environment:PATH}')
# control scripts generation in order to avoid reinstalling bin/buildout
scripts =
generate-signature-key = slapos.signature:run
......@@ -50,32 +103,31 @@ scripts =
slapos-request = slapos.console:request
slapformat = slapos.format:main
slapgrid = slapos.grid.slapgrid:run
slapgrid-sr = slapos.grid.slapgrid:runSoftwareRelease
slapgrid-cp = slapos.grid.slapgrid:runComputerPartition
slapgrid-sr = slapos.grid.slapgrid:runSoftwareRelease
slapgrid-ur = slapos.grid.slapgrid:runUsageReport
slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl
slapgrid-supervisord = slapos.grid.svcbackend:supervisord
slapproxy = slapos.proxy:main
[versions]
zc.buildout = 1.5.3-dev-SlapOS-005
zc.buildout = 1.5.3-dev-SlapOS-009
Jinja2 = 2.6
M2Crypto = 0.21.1
Werkzeug = 0.7.1
buildout-versions = 1.6
collective.recipe.template = 1.9
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
netaddr = 0.7.5
setuptools = 0.6c12dev-r88846
slapos.core = 0.12
slapos.libnetworkcache = 0.4
slapos.core = 0.14
slapos.libnetworkcache = 0.9
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.12
# slapos.core==0.14
Flask = 0.7.2
# Required by:
......@@ -83,13 +135,14 @@ Flask = 0.7.2
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.core==0.12
# slapos.core==0.14
netifaces = 0.5
# Required by:
# slapos.core==0.12
# slapos.core==0.14
supervisor = 3.0a10
# Required by:
# slapos.core==0.12
# slapos.core==0.14
zope.interface = 3.7.0
......@@ -5,8 +5,8 @@ parts =
[sqlite3]
recipe = hexagonit.recipe.cmmi
url = http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz
md5sum = 554026fe7fac47b1cf61c18d5fe43419
url = http://www.sqlite.org/sqlite-autoconf-3070800.tar.gz
md5sum = 6bfb46d73caaa1bbbcd2b52184b6c542
configure-options =
--disable-static
--enable-readline
......
......@@ -17,8 +17,8 @@ filename = stunnel-4-hooks.py
[stunnel-4]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.stunnel.org/stunnel/stunnel-4.39.tar.gz
md5sum = 853739119a8364daea750154af6d7e79
url = http://mirror.bit.nl/stunnel/stunnel-4.44.tar.gz
md5sum = c9dd51fc02b913ce5bf7b3fc12f9cb4a
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options =
--enable-ipv6
......
......@@ -9,11 +9,6 @@ extends =
parts =
w3m
versions = versions
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
[w3m-w3m.gcc.forward.compat.patch]
recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename}
......@@ -50,7 +45,3 @@ environment =
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS=-I${ncurses:location}/include/ -I${zlib:location}/include/
LDFLAGS=-Wl,--as-needed -L${garbage-collector:location}/lib -Wl,-rpath=${garbage-collector:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
From 700c7896b832d6e4fb0185f0d5382b01f94e7141 Mon Sep 17 00:00:00 2001
From: Alan Hourihane <alanh@vmware.com>
Date: Fri, 25 Feb 2011 11:05:27 +0000
Subject: Add _X_HIDDEN to xgeExtRegister to fix build problems on 64bit
---
diff --git a/src/Xge.c b/src/Xge.c
index 0655e00..d28a4f0 100644
--- a/src/Xge.c
+++ b/src/Xge.c
@@ -292,7 +292,7 @@ _xgeEventToWire(Display* dpy, XEvent* re, xEvent* event)
* Extensions need to register callbacks for their events.
*/
Bool
-xgeExtRegister(Display* dpy, int offset, XExtensionHooks* callbacks)
+_X_HIDDEN xgeExtRegister(Display* dpy, int offset, XExtensionHooks* callbacks)
{
XGEExtNode* newExt;
XGEData* xge_data;
--
cgit v0.8.3-6-g21f6
......@@ -2,6 +2,7 @@
[buildout]
extends =
../freetype/buildout.cfg
../libuuid/buildout.cfg
../libxml2/buildout.cfg
../libxslt/buildout.cfg
../pkgconfig/buildout.cfg
......@@ -11,7 +12,8 @@ parts =
libXdmcp
libXext
libXau
libX11
libXinerama
libSM
[xorg-aclocal]
ACLOCAL=${xorg-util-macros:location}/share/aclocal
......@@ -56,8 +58,6 @@ configure-options =
--disable-static
environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib
LD_RUN_PATH=${xproto:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
[xcbproto]
......@@ -82,8 +82,6 @@ configure-options =
--disable-build-docs
environment =
PKG_CONFIG_PATH=${xcbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${libxslt:location}/lib
LD_RUN_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${libxslt:location}/lib
PATH=${pkgconfig:location}/bin:${libxslt:location}/bin:%(PATH)s
PYTHON=${buildout:executable}
# Python note: libxcb requires python with ElementTree. In case of appliance
......@@ -97,8 +95,6 @@ url = http://www.x.org/releases/X11R7.6/src/lib/libXext-1.2.0.tar.bz2
md5sum = 9bb236ff0193e9fc1c1fb504dd840331
environment =
PKG_CONFIG_PATH=${xcbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib
LD_RUN_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
# Warning: do *not* enable -fPIC CFLAGS for this library. Even if it fails and ld asks you to enable it. This will not solve your problem, and create an unexpected (by build chain) setup (all .o will be position-independant code).
# CFLAGS=-fPIC
......@@ -113,8 +109,9 @@ patch-options = -p1
[libXext-patch-link-error]
# Fixes libXext.la link error
# http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
recipe = hexagonit.recipe.download
url = http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = 700c7896b832d6e4fb0185f0d5382b01f94e7141.patch
md5sum = 52635ef694ee6f1acb642a77ee8eb010
......@@ -133,14 +130,9 @@ configure-options =
--disable-specs
--without-xmlto
--without-fop
environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
LD_RUN_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
CFLAGS=-I${xproto:location}/include
CPPFLAGS=-I${xproto:location}/include
[libXdmcp]
recipe = hexagonit.recipe.cmmi
......@@ -148,10 +140,48 @@ url = http://www.x.org/releases/X11R7.6/src/lib/libXdmcp-1.1.0.tar.bz2
md5sum = 762b6bbaff7b7d0831ddb4f072f939a5
environment =
PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig:${xproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib
LD_RUN_PATH=${xproto:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options =
--disable-static
--without-xmlto
--without-fop
[xineramaproto]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/proto/xineramaproto-1.2.tar.bz2
md5sum = a8aadcb281b9c11a91303e24cdea45f5
[libXinerama]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXinerama-1.1.1.tar.bz2
md5sum = ecd4839ad01f6f637c6fb5327207f89b
environment =
PKG_CONFIG_PATH=${libX11:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xineramaproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options =
--disable-static
[libICE]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libICE-1.0.7.tar.bz2
md5sum = bb72a732b15e9dc25c3036559387eed5
configure-options =
--disable-static
--without-xmlto
--without-fop
environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
[libSM]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libSM-1.2.0.tar.bz2
md5sum = e78c447bf1790552b644eca81b542742
configure-options =
--disable-static
--without-xmlto
--without-fop
environment =
PKG_CONFIG_PATH=${libICE:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
LIBUUID_CFLAGS=-I${libuuid:location}/include
......@@ -15,17 +15,12 @@ extends =
parts =
xtrabackup
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
[xtrabackup-build-patch-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = e018df8bb3ed672891388556b8e91e35
md5sum = 95b2c2ef625f88d85bf8876269a19372
download-only = true
filename = xtrabackup_build.patch
filename = xtrabackup-1.6.2_build.patch
[allow_force_ibbackup.patch]
recipe = hexagonit.recipe.download
......@@ -36,8 +31,8 @@ filename = ${:_buildout_section_name_}
[xtrabackup]
recipe = hexagonit.recipe.cmmi
url = http://www.percona.com/redir/downloads/XtraBackup/XtraBackup-1.6/source/xtrabackup-1.6.tar.gz
md5sum = 7c263723312cba36539df4cd7a119744
url = http://www.percona.com/redir/downloads/XtraBackup/xtrabackup-1.6.2/source/xtrabackup-1.6.2.tar.gz
md5sum = 933243ae362156c98f1211eb87b3b4ea
make-binary = true
patches =
${xtrabackup-build-patch-download:location}/${xtrabackup-build-patch-download:filename}
......@@ -51,7 +46,3 @@ environment =
PATH=${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${flex:location}/bin:%(PATH)s:${bison:location}/bin
make-options =
-j1
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-001
diff --git a/Makefile b/Makefile
index dbb15d5..852a627 100644
--- a/Makefile
+++ b/Makefile
@@ -137,5 +137,5 @@ $(TARGET): xtrabackup.o $(INNODBOBJS) $(MYSQLOBJS)
diff -ur xtrabackup-1.6.2.orig/Makefile xtrabackup-1.6.2/Makefile
--- xtrabackup-1.6.2.orig/Makefile 2011-07-19 05:16:22.000000000 +0900
+++ xtrabackup-1.6.2/Makefile 2011-07-27 17:58:38.108925111 +0900
@@ -137,5 +137,5 @@
clean:
rm -f *.o xtrabackup_*
install:
- install -m 755 innobackupex-1.5.1 $(BIN_DIR)
+ install -m 755 innobackupex-1.5.1 $(BIN_DIR)/innobackupex
install -m 755 xtrabackup_* $(BIN_DIR)
diff --git a/utils/build.sh b/utils/build.sh
index 3f0cee7..c41dc89 100755
--- a/utils/build.sh
+++ b/utils/build.sh
@@ -21,12 +21,14 @@ function usage()
diff -ur xtrabackup-1.6.2.orig/utils/build.sh xtrabackup-1.6.2/utils/build.sh
--- xtrabackup-1.6.2.orig/utils/build.sh 2011-07-19 05:16:22.000000000 +0900
+++ xtrabackup-1.6.2/utils/build.sh 2011-07-27 18:01:53.809212142 +0900
@@ -21,12 +21,14 @@
{
echo "Build an xtrabackup binary against the specified InnoDB flavor."
echo
......@@ -29,7 +27,7 @@ index 3f0cee7..c41dc89 100755
exit -1
}
@@ -79,7 +81,12 @@ function build_server()
@@ -79,7 +81,12 @@
{
echo "Configuring the server"
cd $server_dir
......@@ -43,19 +41,22 @@ index 3f0cee7..c41dc89 100755
eval $configure_cmd
echo "Building the server"
@@ -92,9 +99,10 @@ function build_xtrabackup()
@@ -92,12 +99,13 @@
echo "Building XtraBackup"
mkdir $build_dir
cp $top_dir/Makefile $top_dir/xtrabackup.c $build_dir
+ cp $top_dir/innobackupex $build_dir/innobackupex-1.5.1
# Read XTRABACKUP_VERSION from the VERSION file
. $top_dir/VERSION
cd $build_dir
- $MAKE_CMD $xtrabackup_target
+ $MAKE_CMD PREFIX=$1 $xtrabackup_target
- $MAKE_CMD $xtrabackup_target XTRABACKUP_VERSION=$XTRABACKUP_VERSION
+ $MAKE_CMD $xtrabackup_target XTRABACKUP_VERSION=$XTRABACKUP_VERSION PREFIX=$1
cd $top_dir
}
@@ -103,11 +111,36 @@ function build_tar4ibd()
@@ -106,11 +114,36 @@
echo "Building tar4ibd"
unpack_and_patch libtar-1.2.11.tar.gz tar4ibd_libtar-1.2.11.patch
cd libtar-1.2.11
......@@ -93,7 +94,7 @@ index 3f0cee7..c41dc89 100755
################################################################################
# Do all steps to build the server, xtrabackup and tar4ibd
# Expects the following variables to be set before calling:
@@ -136,9 +169,15 @@ function build_all()
@@ -141,9 +174,15 @@
build_server
......@@ -111,7 +112,7 @@ index 3f0cee7..c41dc89 100755
}
if ! test -f xtrabackup.c
@@ -148,6 +187,15 @@ then
@@ -153,6 +192,15 @@
fi
type=$1
......@@ -127,12 +128,12 @@ index 3f0cee7..c41dc89 100755
top_dir=`pwd`
case "$type" in
@@ -161,9 +209,10 @@ case "$type" in
@@ -166,9 +214,10 @@
--with-plugins=innobase \
--with-zlib-dir=bundled \
--enable-shared \
- --with-extra-charsets=complex"
+ --with-extra-charsets=complex \
- --with-extra-charsets=all"
+ --with-extra-charsets=all \
+ --prefix=$2"
- build_all
......@@ -140,7 +141,7 @@ index 3f0cee7..c41dc89 100755
;;
"innodb55" | "5.5")
@@ -225,7 +274,7 @@ case "$type" in
@@ -230,7 +279,7 @@
build_server
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.19-dev'
version = '0.30-dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -41,6 +41,7 @@ setup(name=name,
'zc.buildout': [
'cubrid = slapos.recipe.cubrid:Recipe',
'download = slapos.recipe.download:Recipe',
'davstorage = slapos.recipe.davstorage:Recipe',
'erp5 = slapos.recipe.erp5:Recipe',
'erp5testnode = slapos.recipe.erp5testnode:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe',
......@@ -53,10 +54,10 @@ setup(name=name,
'mysql = slapos.recipe.mysql:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe',
'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed',
'osoeslaptraining = slapos.recipe.osoeslaptraining:Request',
'osoeslaptraining.request = slapos.recipe.osoeslaptraining:Request',
'osoeslaptraining.static = slapos.recipe.osoeslaptraining:Static',
'osoeslaptraining.simple = slapos.recipe.osoeslaptraining:Simple',
'lamp = slapos.recipe.lamp:Request',
'lamp.request = slapos.recipe.lamp:Request',
'lamp.static = slapos.recipe.lamp:Static',
'lamp.simple = slapos.recipe.lamp:Simple',
'proactive = slapos.recipe.proactive:Recipe',
'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed',
'siptester = slapos.recipe.siptester:SipTesterRecipe',
......
##############################################################################
#
# Copyright (c) 2010 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 BaseSlapRecipe
import os
import subprocess
import pkg_resources
import zc.buildout
import zc.recipe.egg
import sys
class Recipe(BaseSlapRecipe):
def getTemplateFilename(self, template_name):
return pkg_resources.resource_filename(__name__,
'template/%s' % template_name)
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
document_root = self.createDataDirectory('www')
apache_config = self.installApache(document_root)
self.setConnectionUrl(scheme='webdavs',
host=apache_config['ip'],
port=apache_config['port'],
auth=(apache_config['user'],
apache_config['password']))
return self.path_list
def installApache(self, document_root, ip=None, port=None):
if ip is None:
ip=self.getGlobalIPv6Address()
if port is None:
port = '9080'
htpasswd_config = self.createHtpasswd()
ssl_config = self.createCertificate(size=2048)
apache_config = dict(
pid_file=os.path.join(self.run_directory, 'httpd.pid'),
lock_file=os.path.join(self.run_directory, 'httpd.lock'),
davlock_db=os.path.join(self.run_directory, 'davdb.lock'),
ip=ip,
port=port,
error_log=os.path.join(self.log_directory, 'httpd-error.log'),
access_log=os.path.join(self.log_directory, 'httpd-access.log'),
document_root=document_root,
modules_dir=self.options['apache_modules_dir'],
mime_types=self.options['apache_mime_file'],
server_root=self.work_directory,
email_address='admin@vifib.net',
htpasswd_file=htpasswd_config['htpasswd_file'],
ssl_certificate=ssl_config['certificate'],
ssl_key=ssl_config['key'],
)
httpd_config_file = self.createConfigurationFile('httpd.conf',
self.substituteTemplate(self.getTemplateFilename('httpd.conf.in'),
apache_config))
self.path_list.append(httpd_config_file)
apache_runner = zc.buildout.easy_install.scripts(
[('httpd', 'slapos.recipe.librecipe.execute', 'execute')],
self.ws, sys.executable, self.wrapper_directory,
arguments=[self.options['apache_binary'],
'-f', httpd_config_file,
'-DFOREGROUND',
]
)[0]
self.path_list.append(apache_runner)
return dict(ip=apache_config['ip'],
port=apache_config['port'],
user=htpasswd_config['user'],
password=htpasswd_config['password']
)
def createHtpasswd(self):
htpasswd = self.createConfigurationFile('htpasswd', '')
self.path_list.append(htpasswd)
password = self.generatePassword()
user = 'user'
subprocess.check_call([self.options['apache_htpasswd'],
'-bc', htpasswd,
user, password
])
return dict(htpasswd_file=htpasswd,
user=user,
password=password)
def createCertificate(self, size=1024, subject='/C=FR/L=Marcq-en-Baroeul/O=Nexedi'):
key_file = os.path.join(self.etc_directory, 'httpd.key')
self.path_list.append(key_file)
certificate_file = os.path.join(self.etc_directory, 'httpd.crt')
self.path_list.append(certificate_file)
subprocess.check_call([self.options['openssl_binary'],
'req', '-x509', '-nodes',
'-newkey', 'rsa:%s' % size,
'-subj', str(subject),
'-out', certificate_file,
'-keyout', key_file
])
return dict(key=key_file,
certificate=certificate_file)
ServerRoot "%(server_root)s"
Listen [%(ip)s]:%(port)s
# Needed modules
LoadModule authn_file_module "%(modules_dir)s/mod_authn_file.so"
LoadModule authz_host_module "%(modules_dir)s/mod_authz_host.so"
LoadModule authz_user_module "%(modules_dir)s/mod_authz_user.so"
LoadModule auth_basic_module "%(modules_dir)s/mod_auth_basic.so"
LoadModule auth_digest_module "%(modules_dir)s/mod_auth_digest.so"
LoadModule log_config_module "%(modules_dir)s/mod_log_config.so"
LoadModule headers_module "%(modules_dir)s/mod_headers.so"
LoadModule setenvif_module "%(modules_dir)s/mod_setenvif.so"
LoadModule ssl_module "%(modules_dir)s/mod_ssl.so"
LoadModule mime_module "%(modules_dir)s/mod_mime.so"
LoadModule dav_module "%(modules_dir)s/mod_dav.so"
LoadModule dav_fs_module "%(modules_dir)s/mod_dav_fs.so"
LoadModule dir_module "%(modules_dir)s/mod_dir.so"
ServerAdmin %(email_address)s
# Quiet Server header (if not, Apache give its life history)
# It's safer
ServerTokens ProductOnly
DocumentRoot "%(document_root)s"
PidFile "%(pid_file)s"
LockFile "%(lock_file)s"
DavLockDB "%(davlock_db)s"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory %(document_root)s>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
Dav On
# Security Rules to avoid DDoS Attacks
DavDepthInfinity Off
LimitXMLRequestBody 0
# Cross-Origin Resources Sharing
Header always set Access-Control-Max-Age "0"
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "OPTIONS, GET, HEAD, POST, PUT, DELETE, PROPFIND"
Header always set Access-Control-Allow-Headers "Content-Type, X-Requested-With, X-HTTP-Method-Override, Accept, Authorization, Depth"
SetEnvIf Origin "(.+)" ORIGIN=$1
Header always set Access-Control-Allow-Origin %%{ORIGIN}e
AuthType Basic
AuthName "WebDAV Storage"
AuthUserFile "%(htpasswd_file)s"
<LimitExcept OPTIONS>
Require valid-user
</LimitExcept>
</Directory>
ErrorLog "%(error_log)s"
LogLevel warn
LogFormat "%%h %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common
DefaultType text/plain
TypesConfig "%(mime_types)s"
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLEngine on
SSLCertificateFile "%(ssl_certificate)s"
SSLCertificateKeyFile "%(ssl_key)s"
......@@ -74,10 +74,11 @@ class Recipe(BaseSlapRecipe):
if self.parameter_dict.get("slap_software_type", "").lower() == "cluster":
# Site access is done by HAProxy
zope_access, site_access = self.installZopeCluster()
zope_access, site_access, key_access = self.installZopeCluster(ca_conf)
else:
zope_access = self.installZopeStandalone()
site_access = zope_access
key_access = None
key, certificate = self.requestCertificate('Login Based Access')
apache_conf = dict(
......@@ -96,9 +97,9 @@ class Recipe(BaseSlapRecipe):
self.requestCertificate(frontend_name)
connection_dict["site_url"] = self.installFrontendZopeApache(
ip=self.getGlobalIPv6Address(), port=13001, name=frontend_name,
frontend_path='/%s' % self.site_id, backend_path='/%s' % self.site_id,
backend_url="http://%s" % site_access, key=frontend_key,
ip=self.getGlobalIPv6Address(), port=4443, name=frontend_name,
frontend_path='/', backend_path='',
backend_url=apache_conf['apache_login'], key=frontend_key,
certificate=frontend_certificate)
default_bt5_list = []
......@@ -107,7 +108,7 @@ class Recipe(BaseSlapRecipe):
self.installERP5Site(user, password, zope_access, mysql_conf,
conversion_server_conf, memcached_conf, kumo_conf,
self.site_id, default_bt5_list)
self.site_id, default_bt5_list, ca_conf)
self.installTestRunner(ca_conf, mysql_conf, conversion_server_conf,
memcached_conf, kumo_conf)
......@@ -120,6 +121,11 @@ class Recipe(BaseSlapRecipe):
memcached_url=memcached_conf['memcached_url'],
kumo_url=kumo_conf['kumo_address']
))
if key_access is not None:
connection_dict['key_access'] = key_access
if self.options.get('fulltext_search', None) == 'sphinx':
sphinx_searchd = self.installSphinxSearchd(ip=self.getLocalIPv4Address())
connection_dict.update(**sphinx_searchd)
self.setConnectionDict(connection_dict)
return self.path_list
......@@ -128,19 +134,82 @@ class Recipe(BaseSlapRecipe):
"""
zodb_dir = os.path.join(self.data_root_directory, 'zodb')
self._createDirectory(zodb_dir)
zodb_root_path = os.path.join(zodb_dir, 'root.fs')
zodb_root_path = os.path.join(zodb_dir, 'main.fs')
thread_amount_per_zope = int(self.options.get(
'single_zope_thread_amount', 4))
zodb_cache_size = int(self.options.get('zodb_cache_size', 5000))
return self.installZope(ip=self.getLocalIPv4Address(),
port=12000 + 1, name='zope_%s' % 1,
zodb_configuration_string=self.substituteTemplate(
self.getTemplateFilename('zope-zodb-snippet.conf.in'),
dict(zodb_root_path=zodb_root_path)), with_timerservice=True,
dict(zodb_root_path=zodb_root_path,
zodb_cache_size=zodb_cache_size)),
with_timerservice=True,
thread_amount=thread_amount_per_zope)
def installZopeCluster(self):
def installKeyAuthorisationApache(self, ipv6, port, backend, key, certificate,
ca_conf, key_auth_path='/'):
if ipv6:
ip = self.getGlobalIPv6Address()
else:
ip = self.getLocalIPv4Address()
ssl_template = """SSLEngine on
SSLVerifyClient require
RequestHeader set REMOTE_USER %%{SSL_CLIENT_S_DN_CN}s
SSLCertificateFile %(key_auth_certificate)s
SSLCertificateKeyFile %(key_auth_key)s
SSLCACertificateFile %(ca_certificate)s
SSLCARevocationPath %(ca_crl)s"""
apache_conf = self._getApacheConfigurationDict('key_auth_apache', ip, port)
apache_conf['ssl_snippet'] = ssl_template % dict(
key_auth_certificate=certificate,
key_auth_key=key,
ca_certificate=ca_conf['ca_certificate'],
ca_crl=ca_conf['ca_crl']
)
prefix = 'ssl_key_auth_apache'
rewrite_rule_template = \
"RewriteRule (.*) http://%(backend)s%(key_auth_path)s$1 [L,P]"
path_template = pkg_resources.resource_string('slapos.recipe.erp5',
'template/apache.zope.conf.path.in')
path = path_template % dict(path='/')
d = dict(
path=path,
backend=backend,
backend_path='/',
port=apache_conf['port'],
vhname=path.replace('/', ''),
key_auth_path=key_auth_path,
)
rewrite_rule = rewrite_rule_template % d
apache_conf.update(**dict(
path_enable=path,
rewrite_rule=rewrite_rule
))
apache_config_file = self.createConfigurationFile(prefix + '.conf',
pkg_resources.resource_string('slapos.recipe.erp5',
'template/apache.zope.conf.in') % apache_conf)
self.path_list.append(apache_config_file)
self.path_list.extend(zc.buildout.easy_install.scripts([(
'key_auth_apache',
'slapos.recipe.erp5.apache', 'runApache')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
dict(
required_path_list=[certificate, key, ca_conf['ca_certificate'],
ca_conf['ca_crl']],
binary=self.options['httpd_binary'],
config=apache_config_file
)
]))
if ipv6:
return 'https://[%(ip)s:%(port)s]' % apache_conf
else:
return 'https://%(ip)s:%(port)s' % apache_conf
def installZopeCluster(self, ca_conf=None):
""" Install ERP5 using ZEO Cluster
"""
site_check_path = '/%s/getId' % self.site_id
......@@ -153,6 +222,9 @@ class Recipe(BaseSlapRecipe):
user_node_amount = int(self.options.get(
"cluster_user_node_amount", 2))
key_auth_node_amount = int(self.options.get(
"key_auth_node_amount", 0))
ip = self.getLocalIPv4Address()
storage_dict = self._requestZeoFileStorage('Zeo Server 1', 'main')
......@@ -161,6 +233,8 @@ class Recipe(BaseSlapRecipe):
# XXX How to define good values for this?
mount_point = '/'
zodb_cache_size = 5000
zeo_client_cache_size = '20MB'
check_path = '/erp5/account_module'
known_tid_storage_identifier_dict = {}
......@@ -172,7 +246,8 @@ class Recipe(BaseSlapRecipe):
self.getTemplateFilename('zope-zeo-snippet.conf.in'), dict(
storage_name=storage_dict['storage_name'],
address='%s:%s' % (storage_dict['ip'], storage_dict['port']),
mount_point=mount_point
mount_point=mount_point, zodb_cache_size=zodb_cache_size,
zeo_client_cache_size=zeo_client_cache_size
))
zope_port = 12000
......@@ -203,11 +278,28 @@ class Recipe(BaseSlapRecipe):
login_haproxy = self.installHaproxy(ip, 15001, 'login',
site_check_path, login_url_list)
key_access = None
if key_auth_node_amount > 0:
service_url_list = []
for i in range(key_auth_node_amount):
zope_port += 1
service_url_list.append(self.installZope(ip, zope_port,
'zope_service_%s' % i, with_timerservice=False,
zodb_configuration_string=zodb_configuration_string,
tidstorage_config=tidstorage_config))
service_haproxy = self.installHaproxy(ip, 15000, 'service',
site_check_path, service_url_list)
key_auth_key, key_auth_certificate = self.requestCertificate(
'Key Based Access')
key_access = self.installKeyAuthorisationApache(True, 15500,
service_haproxy, key_auth_key, key_auth_certificate, ca_conf)
self.installTidStorage(tidstorage_config['host'],
tidstorage_config['port'],
known_tid_storage_identifier_dict, 'http://' + login_haproxy)
return login_url_list[-1], login_haproxy
return login_url_list[-1], login_haproxy, key_access
def _requestZeoFileStorage(self, server_name, storage_name):
"""Local, slap.request compatible, call to ask for filestorage on Zeo
......@@ -342,6 +434,27 @@ class Recipe(BaseSlapRecipe):
memcached_ip=config['memcached_ip'],
memcached_port=config['memcached_port'])
def installSphinxSearchd(self, ip, port=9312, sql_port=9306):
data_directory = self.createDataDirectory('sphinx')
sphinx_conf_path = self.createConfigurationFile('sphinx.conf',
self.substituteTemplate(self.getTemplateFilename('sphinx.conf.in'), dict(
ip_address=ip,
port=port,
sql_port=sql_port,
data_directory=data_directory,
log_directory=self.log_directory,
)))
self.path_list.append(sphinx_conf_path)
wrapper = zc.buildout.easy_install.scripts([('sphinx_searchd',
'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[
self.options['sphinx_searchd_binary'].strip(), '-c', sphinx_conf_path, '--nodetach']
)[0]
self.path_list.append(wrapper)
return dict(sphinx_searchd_ip=ip,
sphinx_searchd_port=port,
sphinx_searchd_sql_port=sql_port)
def installTestRunner(self, ca_conf, mysql_conf, conversion_server_conf,
memcached_conf, kumo_conf):
"""Installs bin/runUnitTest executable to run all tests using
......@@ -546,14 +659,24 @@ class Recipe(BaseSlapRecipe):
}
def installHaproxy(self, ip, port, name, server_check_path, url_list):
server_template = """ server %(name)s %(address)s cookie %(name)s check inter 20s rise 2 fall 4"""
# inter must be quite short in order to detect quickly an unresponsive node
# and to detect quickly a node which is back
# rise must be minimal possible : 1, indeed, a node which is back don't need
# to sleep more time and we can give him work immediately
# fall should be quite sort. with inter at 3, and fall at 2, a node will be
# considered as dead after 6 seconds.
# maxconn should be set as the maximum thread we have per zope, like this
# haproxy will manage the queue of request with the possibility to
# move a request to another node if the initially selected one is dead
server_template = """ server %(name)s %(address)s cookie %(name)s check inter 3s rise 1 fall 2 maxconn %(cluster_zope_thread_amount)s"""
config = dict(name=name, ip=ip, port=port,
server_check_path=server_check_path,)
i = 1
server_list = []
cluster_zope_thread_amount = self.options.get('cluster_zope_thread_amount', 1)
for url in url_list:
server_list.append(server_template % dict(name='%s_%s' % (name, i),
address=url))
address=url, cluster_zope_thread_amount=cluster_zope_thread_amount))
i += 1
config['server_text'] = '\n'.join(server_list)
haproxy_conf_path = self.createConfigurationFile('haproxy_%s.cfg' % name,
......@@ -640,10 +763,14 @@ class Recipe(BaseSlapRecipe):
return user, password
def installERP5Site(self, user, password, zope_access, mysql_conf,
conversion_server_conf=None, memcached_conf=None, kumo_conf=None,
erp5_site_id='erp5', default_bt5_list=[]):
""" Create a script controlled by supervisor, which creates a erp5
site on current available zope and mysql environment"""
conversion_server_conf=None, memcached_conf=None,
kumo_conf=None,
erp5_site_id='erp5', default_bt5_list=[], ca_conf={},
supervisor_controlled=True):
"""
Create a script to automatically set up an erp5 site (controlled by
supervisor by default) on available zope and mysql environments.
"""
conversion_server = None
if conversion_server_conf is not None:
conversion_server = "%s:%s" % (conversion_server_conf['conversion_server_ip'],
......@@ -660,9 +787,12 @@ class Recipe(BaseSlapRecipe):
bt5_repository_list = self.parameter_dict.get("bt5_repository_list", "").split() \
or getattr(self, 'bt5_repository_list', [])
self.path_list.extend(zc.buildout.easy_install.scripts([('erp5_update',
erp5_update_directory = supervisor_controlled and self.wrapper_directory or \
self.bin_directory
script = zc.buildout.easy_install.scripts([('erp5_update',
__name__ + '.erp5', 'updateERP5')], self.ws,
sys.executable, self.wrapper_directory,
sys.executable, erp5_update_directory,
arguments=[erp5_site_id,
mysql_connection_string,
[user, password, zope_access],
......@@ -670,7 +800,12 @@ class Recipe(BaseSlapRecipe):
conversion_server,
kumo_conf.get("kumo_address"),
bt5_list,
bt5_repository_list]))
bt5_repository_list,
ca_conf.get('certificate_authority_path'),
self.options.get('openssl_binary')])
self.path_list.extend(script)
return []
def installZeo(self, ip):
......@@ -713,6 +848,26 @@ class Recipe(BaseSlapRecipe):
self.path_list.append(wrapper)
return zeo_configuration_dict
def installRepozo(self, zodb_root_path):
"""
Add only repozo to cron (e.g. without tidstorage) allowing full
and incremental backups.
"""
backup_path = self.createBackupDirectory('zodb')
repozo_cron_path = os.path.join(self.cron_d, 'repozo')
repozo_cron_file = open(repozo_cron_path, 'w')
try:
repozo_cron_file.write('''
0 0 * * 0 %(repozo_binary)s --backup --full --file="%(zodb_root_path)s" --repository="%(backup_path)s"
0 * * * * %(repozo_binary)s --backup --file="%(zodb_root_path)s" --repository="%(backup_path)s"
''' % dict(repozo_binary=self.options['repozo_binary'],
zodb_root_path=zodb_root_path,
backup_path=backup_path))
finally:
repozo_cron_file.close()
self.path_list.append(repozo_cron_path)
def installTidStorage(self, ip, port, known_tid_storage_identifier_dict,
access_url):
"""Install TidStorage with all required backup tools
......@@ -825,10 +980,6 @@ class Recipe(BaseSlapRecipe):
self.erp5_directory, 'Products'))
zope_config['products'] = '\n'.join(prefixed_products)
zope_config['address'] = '%s:%s' % (ip, port)
zope_environment_list = []
for envk, envv in zope_environment.iteritems():
zope_environment_list.append('%s %s' % (envk, envv))
zope_config['environment'] = "\n".join(zope_environment_list)
zope_wrapper_template_location = self.getTemplateFilename('zope.conf.in')
zope_conf_content = self.substituteTemplate(
......@@ -851,10 +1002,11 @@ class Recipe(BaseSlapRecipe):
self.path_list.append(zope_conf_path)
# Create init script
wrapper = zc.buildout.easy_install.scripts([(name,
'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
'slapos.recipe.librecipe.execute', 'executee')], self.ws, sys.executable,
self.wrapper_directory, arguments=[
self.options['runzope_binary'].strip(), '-C', zope_conf_path]
)[0]
[self.options['runzope_binary'].strip(), '-C', zope_conf_path],
zope_environment
])[0]
self.path_list.append(wrapper)
return zope_config['address']
......@@ -915,9 +1067,6 @@ class Recipe(BaseSlapRecipe):
'template/apache.ssl-snippet.conf.in') % dict(
login_certificate=certificate, login_key=key)
rewrite_rule_template = \
"RewriteRule ^%(path)s($|/.*) %(backend_url)s/VirtualHostBase/https/%(server_name)s:%(port)s%(backend_path)s/VirtualHostRoot/_vh_%(vhname)s$1 [L,P]\n"
path = pkg_resources.resource_string(__name__,
'template/apache.zope.conf.path-protected.in') % \
dict(path='/', access_control_string='none')
......@@ -931,14 +1080,24 @@ class Recipe(BaseSlapRecipe):
'template/apache.zope.conf.path-protected.in')
path += path_template % dict(path=frontend_path,
access_control_string=access_control_string)
d = dict(
rewrite_rule_template = \
"RewriteRule ^%(path)s($|/.*) %(backend_url)s/VirtualHostBase/https/%(server_name)s:%(port)s%(backend_path)s/VirtualHostRoot/%(vhname)s$1 [L,P]\n"
if frontend_path not in ["", None, "/"]:
vhname = "_vh_%s" % frontend_path.replace('/', '')
else:
vhname = ""
frontend_path = ""
rewrite_rule = rewrite_rule_template % dict(
path=frontend_path,
backend_url=backend_url,
backend_path=backend_path,
port=apache_conf['port'],
vhname=frontend_path.replace('/', ''),
vhname=vhname,
server_name=name)
rewrite_rule = rewrite_rule_template % d
apache_conf.update(**dict(
path_enable=path,
rewrite_rule=rewrite_rule
......
......@@ -37,12 +37,14 @@ class ERP5Updater(object):
erp5_catalog_storage = "erp5_mysql_innodb_catalog"
header_dict = {}
sleeping_time = 120
sleeping_time = 300
short_sleeping_time = 60
def __init__(self, user, password, host,
site_id, mysql_url, memcached_address,
conversion_server_address, persistent_cache_address,
bt5_list, bt5_repository_list):
bt5_list, bt5_repository_list, certificate_authority_path,
openssl_binary):
authentication_string = '%s:%s' % (user, password)
base64string = base64.encodestring(authentication_string).strip()
......@@ -54,13 +56,17 @@ class ERP5Updater(object):
self.business_template_repository_list = bt5_repository_list
self.business_template_list = bt5_list
self.memcached_address = memcached_address
self.persintent_cached_address = persistent_cache_address
self.persistent_cached_address = persistent_cache_address
self.mysql_url = mysql_url
host, port = conversion_server_address.split(":")
self.conversion_server_address = host
self.conversion_server_port = int(port)
# Certificate Authority Tool configuration
self.certificate_authority_path = certificate_authority_path
self.openssl_binary = openssl_binary
def log(self, level, message):
date = time.strftime("%a, %d %b %Y %H:%M:%S +0000")
print "%s - %s : %s" % (date, level, message)
......@@ -147,34 +153,25 @@ class ERP5Updater(object):
return [i for i in self.business_template_repository_list
if i not in found_list]
def getMissingBusinessTemplateList(self):
bt5_dict = self.getSystemSignatureDict("business_template_dict", [])
found_bt5_list = bt5_dict.keys()
return [bt for bt in self.business_template_list\
if bt not in found_bt5_list]
def isBusinessTemplateUpdated(self):
return len(self.getMissingBusinessTemplateList()) == 0
def isBusinessTemplateRepositoryUpdated(self):
return len(self.getMissingBusinessTemplateRepositoryList()) == 0
def getMissingBusinessTemplateSet(self):
found_dict = self.getSystemSignatureDict("business_template_dict", {})
return set(self.business_template_list).difference(found_dict)
def updateBusinessTemplateList(self):
""" Update Business Template Configuration, including the repositories
"""
if not self.isBusinessTemplateUpdated():
# Before update the business templates, it is required to make
# sure the repositories are updated.
if not self.isBusinessTemplateRepositoryUpdated():
# Require to update Business template Repository
missing_business_template_set = self.getMissingBusinessTemplateSet()
if missing_business_template_set:
# Before updating the business templates, it is required to make sure
# the repositories are updated, thus update them even if they are
# already present because there may be new business templates...
repository_list = self.getSystemSignatureDict(
"business_template_repository_list", [])
repository_list.extend(self.getMissingBusinessTemplateRepositoryList())
self._setRepositoryList(repository_list)
# Require to update Business template
for bt in self.getMissingBusinessTemplateList():
self._installBusinessTemplateList([bt])
self._installBusinessTemplateList(list(missing_business_template_set))
return True
return False
......@@ -186,18 +183,20 @@ class ERP5Updater(object):
def _installBusinessTemplateList(self, name_list, update_catalog=False):
""" Install a Business Template on Remote ERP5 setup """
set_path = "/%s/portal_templates/installBusinessTemplatesFromRepositories" % self.site_id
set_path = "/%s/portal_templates/installBusinessTemplateListFromRepository" % self.site_id
self.POST(set_path, {"template_list": name_list,
"only_newer": 1,
"update_catalog": int(update_catalog)})
"update_catalog": int(update_catalog),
"activate": 1,
"install_dependency": 1})
def _createActiveSystemPreference(self):
def _createActiveSystemPreference(self, edit_kw={}):
""" Assert that at least one enabled System Preference is present on
the erp5 instance.
"""
self.log("INFO", "Try to create New System Preference into ERP5!")
path = "/%s/portal_preferences/createActiveSystemPreference" % self.site_id
status, data = self.POST(path, {})
status, data = self.POST(path, edit_kw)
if status != 200:
self.log("ERROR", "Unable to create System Preference, an error ocurred %s." % data)
......@@ -217,18 +216,62 @@ class ERP5Updater(object):
if None in [host_key, port_key]:
self.log("ERROR", "Unable to find the Active System Preference to Update!")
self._createActiveSystemPreference()
self._createActiveSystemPreference(
{"preferred_ooodoc_server_address" : self.conversion_server_address,
"preferred_ooodoc_server_port_number": self.conversion_server_port })
return True
is_updated = self._assertAndUpdateDocument(host_key, self.conversion_server_address,
"setPreferredOoodocServerAddress")
is_updated = is_updated or self._assertAndUpdateDocument(port_key,
is_updated = self._assertAndUpdateDocument(port_key,
self.conversion_server_port,
"setPreferredOoodocServerPortNumber")
"setPreferredOoodocServerPortNumber") or is_updated
return is_updated
def updateCertificateAuthority(self):
""" Update the certificate authority only if is not configured yet """
if self.isCertificateAuthorityAvailable():
if self.isCertificateAuthorityConfigured():
return True
path = "/%s/portal_certificate_authority/" \
"manage_editCertificateAuthorityTool" % self.site_id
self.POST(path, {"certificate_authority_path": self.certificate_authority_path,
"openssl_binary": self.openssl_binary})
def isCertificateAuthorityAvailable(self):
""" Check if certificate Authority is available. """
external_connection_dict = self.system_signature_dict[
'external_connection_dict']
if 'portal_certificate_authority/certificate_authority_path' in \
external_connection_dict:
return True
return False
def isCertificateAuthorityConfigured(self):
""" Check if certificate Authority is configured correctly. """
external_connection_dict = self.system_signature_dict[
'external_connection_dict']
if self.certificate_authority_path == external_connection_dict.get(
'portal_certificate_authority/certificate_authority_path') and \
self.openssl_binary == external_connection_dict.get(
'portal_certificate_authority/openssl_binary'):
return True
return False
def isCertificateAuthorityConfigured(self):
""" Check if certificate Authority is configured correctly. """
external_connection_dict = self.system_signature_dict[
'external_connection_dict']
if self.certificate_authority_path == external_connection_dict.get(
'portal_certificate_authority/certificate_authority_path') and \
self.openssl_binary == external_connection_dict.get(
'portal_certificate_authority/openssl_binary'):
return True
return False
def updateMemcached(self):
# Assert Memcached configuration
self._assertAndUpdateDocument(
......@@ -239,7 +282,7 @@ class ERP5Updater(object):
# Assert Persistent cache configuration (Kumofs)
self._assertAndUpdateDocument(
"portal_memcached/persistent_memcached_plugin/getUrlString",
self.persintent_cached_address,
self.persistent_cached_address,
"setUrlString")
def _assertAndUpdateDocument(self, key, expected_value, update_method):
......@@ -258,24 +301,9 @@ class ERP5Updater(object):
return True
return False
def updateMysql(self):
""" This API is not implemented yet, because it is not needed to
update Mysql Connection on ERP5 Sites.
"""
pass
def updatePortalActivities(self):
""" This API is not implemented yet, because it is not needed for
a single instance configuration. This method should define which
instances will handle activities, which one will distribute
activities
"""
pass
def updateERP5Site(self):
if not self.isERP5Present():
url = '/manage_addProduct/ERP5/manage_addERP5Site'
self.POST(url, {
self.POST('/manage_addProduct/ERP5/manage_addERP5Site', {
"id": self.site_id,
"erp5_catalog_storage": self.erp5_catalog_storage,
"erp5_sql_connection_string": self.mysql_url,
......@@ -286,54 +314,30 @@ class ERP5Updater(object):
def _hasActivityPresent(self):
activity_dict = self.getSystemSignatureDict("activity_dict")
if activity_dict["total"] > 0:
self.log("DEBUG", "Waiting for activities on ERP5...")
return True
return False
def _hasFailureActivity(self):
activity_dict = self.getSystemSignatureDict("activity_dict")
if activity_dict["failure"] > 0:
self.log("ERROR", "Update progress found Failure activities" +\
"and it will not be able to progress until" +\
" activites issue be solved")
return True
def _updatePreRequiredBusinessTemplateList(self):
""" Update only the first part of bt5."""
# This list contains the minimal set of bt5 required to install
# portal_introspections. Move portal_introspection to erp5_core
# can remove this set.
pre_required_business_template_list = [i for i in self.business_template_list\
if i.startswith("erp5_full_text") or i == "erp5_base"]
if len(self.business_template_repository_list) > 0 and \
len(pre_required_business_template_list):
pre_required_business_template_list.insert(0, "erp5_core_proxy_field_legacy")
self._setRepositoryList(self.business_template_repository_list)
time.sleep(30)
for bt in pre_required_business_template_list:
update_catalog = bt.endswith("_catalog")
self._installBusinessTemplateList([bt], update_catalog)
else:
self.log("ERROR", "Unable to install erp5_base, it is not on your " +\
"requested business templates list. Once it is installed " +\
"setup will continue")
return False
def run(self):
""" Keep running until kill"""
while 1:
time.sleep(30)
time.sleep(self.short_sleeping_time)
if not self.updateERP5Site():
self.loadSystemSignatureDict()
if self.getSystemSignatureDict() is None:
self.log("INFO", "The erp5_base is not installed yet, trying to " +\
"install it before continue.")
self._updatePreRequiredBusinessTemplateList()
time.sleep(60)
if self._hasFailureActivity():
time.sleep(self.sleeping_time)
continue
if self._hasActivityPresent():
self.log("DEBUG", "Waiting for activities on ERP5...")
if self._hasFailureActivity():
self.log("ERROR", "Update progress found " +\
"Failure activities and it will not progress until " +\
" activites issue be solved")
continue
if self.updateBusinessTemplateList():
......@@ -341,11 +345,8 @@ class ERP5Updater(object):
self.updateMemcached()
if self.updateConversionServer():
# If update Conversion Server adds a bit more delay to continue
# To wait for activiies.
time.sleep(60)
continue
self.updateCertificateAuthority()
time.sleep(self.sleeping_time)
def updateERP5(argument_list):
......@@ -356,6 +357,8 @@ def updateERP5(argument_list):
conversion_server_address = argument_list[4]
persistent_cache_provider = argument_list[5]
bt5_list = argument_list[6]
certificate_authority_path = argument_list[8]
openssl_binary = argument_list[9]
bt5_repository_list = []
if len(argument_list) > 7:
......@@ -374,6 +377,8 @@ def updateERP5(argument_list):
conversion_server_address=conversion_server_address,
persistent_cache_address=persistent_cache_provider,
bt5_list=bt5_list,
bt5_repository_list=bt5_repository_list)
bt5_repository_list=bt5_repository_list,
certificate_authority_path=certificate_authority_path,
openssl_binary=openssl_binary)
erp5_upgrader.run()
......@@ -4,3 +4,4 @@ SSLCertificateKeyFile %(login_key)s
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLProxyEngine On
......@@ -34,9 +34,9 @@ RequestHeader unset REMOTE_USER
# Log configuration
ErrorLog "%(error_log)s"
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common
# Default apache log format with request time in microsecond at the end
LogFormat "%%h %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\" %%D" combined
CustomLog "%(access_log)s" combined
# Directory protection
<Directory />
......
......@@ -9,10 +9,25 @@ defaults
retries 1
option redispatch
maxconn 2000
timeout server 3000s
timeout queue 5s
timeout connect 10s
timeout client 3600s
# it is useless to have timeout much bigger than the one of apache.
# By default apache use 300s, so we set slightly more in order to
# make sure that apache will first stop the connection.
timeout server 305s
# Stop waiting in queue for a zope to become available.
# If no zope can be reached after one minute, consider the request will
# never succeed.
timeout queue 60s
# The connection should be immediate on LAN,
# so we should not set more than 5 seconds, and it could be already too much
timeout connect 5s
# As requested in haproxy doc, make this "at least equal to timeout server".
timeout client 305s
# Use "option httpclose" to not preserve client & server persistent connections
# while handling every incoming request individually, dispatching them one after
# another to servers, in HTTP close mode. This is really needed when haproxy
# is configured with maxconn to 1, without this options browser are unable
# to render a page
option httpclose
listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert
......
CREATE DATABASE IF NOT EXISTS %(mysql_database)s;
GRANT ALL PRIVILEGES ON %(mysql_database)s.* TO %(mysql_user)s@'%%' IDENTIFIED BY '%(mysql_password)s';
GRANT ALL PRIVILEGES ON %(mysql_database)s.* TO %(mysql_user)s@'localhost' IDENTIFIED BY '%(mysql_password)s';
%(file_list)s {
daily
dateext
rotate 30
rotate 3650
compress
notifempty
sharedscripts
......
#############################################################################
## index definition
#############################################################################
# realtime index
#
# you can run INSERT, REPLACE, and DELETE on this index on the fly
# using MySQL protocol (see 'listen' directive below)
index erp5
{
# 'rt' index type must be specified to use RT index
type = rt
# index files path and file name, without extension
# mandatory, path must be writable, extensions will be auto-appended
path = %(data_directory)s/erp5
# RAM chunk size limit
# RT index will keep at most this much data in RAM, then flush to disk
# optional, default is 32M
#
# rt_mem_limit = 512M
# full-text field declaration
# multi-value, mandatory
rt_field = SearchableText
# unsigned integer attribute declaration
# multi-value (an arbitrary number of attributes is allowed), optional
# declares an unsigned 32-bit attribute
rt_attr_uint = uid
# RT indexes currently support the following attribute types:
# uint, bigint, float, timestamp, string
#
# rt_attr_bigint = guid
# rt_attr_float = gpa
# rt_attr_timestamp = ts_added
# rt_attr_string = author
# document attribute values (docinfo) storage mode
# optional, default is 'extern'
# known values are 'none', 'extern' and 'inline'
# docinfo = extern
# memory locking for cached data (.spa and .spi), to prevent swapping
# optional, default is 0 (do not mlock)
# requires searchd to be run from root
# mlock = 0
# a list of morphology preprocessors to apply
# optional, default is empty
#
# builtin preprocessors are 'none', 'stem_en', 'stem_ru', 'stem_enru',
# 'soundex', and 'metaphone'; additional preprocessors available from
# libstemmer are 'libstemmer_XXX', where XXX is algorithm code
# (see libstemmer_c/libstemmer/modules.txt)
#
# morphology = stem_en, stem_ru, soundex
# morphology = libstemmer_german
# morphology = libstemmer_sv
morphology = stem_en
# minimum word length at which to enable stemming
# optional, default is 1 (stem everything)
#
# min_stemming_len = 1
# stopword files list (space separated)
# optional, default is empty
# contents are plain text, charset_table and stemming are both applied
#
# stopwords = %(data_directory)s/erp5/stopwords.txt
# wordforms file, in "mapfrom > mapto" plain text format
# optional, default is empty
#
# wordforms = %(data_directory)s/erp5/wordforms.txt
# tokenizing exceptions file
# optional, default is empty
#
# plain text, case sensitive, space insensitive in map-from part
# one "Map Several Words => ToASingleOne" entry per line
#
# exceptions = %(data_directory)s/erp5/exceptions.txt
# minimum indexed word length
# default is 1 (index everything)
min_word_len = 1
# charset encoding type
# optional, default is 'sbcs'
# known types are 'sbcs' (Single Byte CharSet) and 'utf-8'
charset_type = utf-8
# charset definition and case folding rules "table"
# optional, default value depends on charset_type
#
# defaults are configured to include English and Russian characters only
# you need to change the table to include additional ones
# this behavior MAY change in future versions
#
# 'sbcs' default value is
# charset_table = 0..9, A..Z->a..z, _, a..z, U+A8->U+B8, U+B8, U+C0..U+DF->U+E0..U+FF, U+E0..U+FF
#
# 'utf-8' default value is
# charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
charset_table = \
U+00C0->a, U+00C1->a, U+00C2->a, U+00C3->a, U+00C4->a, U+00C5->a, U+00E0->a, U+00E1->a, U+00E2->a, U+00E3->a, U+00E4->a, U+00E5->a, U+0100->a, U+0101->a, U+0102->a, U+0103->a, U+010300->a, U+0104->a, U+0105->a, U+01CD->a, U+01CE->a, U+01DE->a, U+01DF->a, \
U+01E0->a, U+01E1->a, U+01FA->a, U+01FB->a, U+0200->a, U+0201->a, U+0202->a, U+0203->a, U+0226->a, U+0227->a, U+023A->a, U+0250->a, U+04D0->a, U+04D1->a, U+1D2C->a, U+1D43->a, U+1D44->a, U+1D8F->a, U+1E00->a, U+1E01->a, U+1E9A->a, U+1EA0->a, U+1EA1->a, \
U+1EA2->a, U+1EA3->a, U+1EA4->a, U+1EA5->a, U+1EA6->a, U+1EA7->a, U+1EA8->a, U+1EA9->a, U+1EAA->a, U+1EAB->a, U+1EAC->a, U+1EAD->a, U+1EAE->a, U+1EAF->a, U+1EB0->a, U+1EB1->a, U+1EB2->a, U+1EB3->a, U+1EB4->a, U+1EB5->a, U+1EB6->a, U+1EB7->a, U+2090->a, \
U+2C65->a, U+0180->b, U+0181->b, U+0182->b, U+0183->b, U+0243->b, U+0253->b, U+0299->b, U+16D2->b, U+1D03->b, U+1D2E->b, U+1D2F->b, U+1D47->b, U+1D6C->b, U+1D80->b, U+1E02->b, U+1E03->b, U+1E04->b, U+1E05->b, U+1E06->b, U+1E07->b, U+00C7->c, U+00E7->c, \
U+0106->c, U+0107->c, U+0108->c, U+0109->c, U+010A->c, U+010B->c, U+010C->c, U+010D->c, U+0187->c, U+0188->c, U+023B->c, U+023C->c, U+0255->c, U+0297->c, U+1D9C->c, U+1D9D->c, U+1E08->c, U+1E09->c, U+212D->c, U+2184->c, U+010E->d, U+010F->d, U+0110->d, \
U+0111->d, U+0189->d, U+018A->d, U+018B->d, U+018C->d, U+01C5->d, U+01F2->d, U+0221->d, U+0256->d, U+0257->d, U+1D05->d, U+1D30->d, U+1D48->d, U+1D6D->d, U+1D81->d, U+1D91->d, U+1E0A->d, U+1E0B->d, U+1E0C->d, U+1E0D->d, U+1E0E->d, U+1E0F->d, U+1E10->d, \
U+1E11->d, U+1E12->d, U+1E13->d, U+00C8->e, U+00C9->e, U+00CA->e, U+00CB->e, U+00E8->e, U+00E9->e, U+00EA->e, U+00EB->e, U+0112->e, U+0113->e, U+0114->e, U+0115->e, U+0116->e, U+0117->e, U+0118->e, U+0119->e, U+011A->e, U+011B->e, U+018E->e, U+0190->e, \
U+01DD->e, U+0204->e, U+0205->e, U+0206->e, U+0207->e, U+0228->e, U+0229->e, U+0246->e, U+0247->e, U+0258->e, U+025B->e, U+025C->e, U+025D->e, U+025E->e, U+029A->e, U+1D07->e, U+1D08->e, U+1D31->e, U+1D32->e, U+1D49->e, U+1D4B->e, U+1D4C->e, U+1D92->e, \
U+1D93->e, U+1D94->e, U+1D9F->e, U+1E14->e, U+1E15->e, U+1E16->e, U+1E17->e, U+1E18->e, U+1E19->e, U+1E1A->e, U+1E1B->e, U+1E1C->e, U+1E1D->e, U+1EB8->e, U+1EB9->e, U+1EBA->e, U+1EBB->e, U+1EBC->e, U+1EBD->e, U+1EBE->e, U+1EBF->e, U+1EC0->e, U+1EC1->e, \
U+1EC2->e, U+1EC3->e, U+1EC4->e, U+1EC5->e, U+1EC6->e, U+1EC7->e, U+2091->e, U+0191->f, U+0192->f, U+1D6E->f, U+1D82->f, U+1DA0->f, U+1E1E->f, U+1E1F->f, U+011C->g, U+011D->g, U+011E->g, U+011F->g, U+0120->g, U+0121->g, U+0122->g, U+0123->g, U+0193->g, \
U+01E4->g, U+01E5->g, U+01E6->g, U+01E7->g, U+01F4->g, U+01F5->g, U+0260->g, U+0261->g, U+0262->g, U+029B->g, U+1D33->g, U+1D4D->g, U+1D77->g, U+1D79->g, U+1D83->g, U+1DA2->g, U+1E20->g, U+1E21->g, U+0124->h, U+0125->h, U+0126->h, U+0127->h, U+021E->h, \
U+021F->h, U+0265->h, U+0266->h, U+029C->h, U+02AE->h, U+02AF->h, U+02B0->h, U+02B1->h, U+1D34->h, U+1DA3->h, U+1E22->h, U+1E23->h, U+1E24->h, U+1E25->h, U+1E26->h, U+1E27->h, U+1E28->h, U+1E29->h, U+1E2A->h, U+1E2B->h, U+1E96->h, U+210C->h, U+2C67->h, \
U+2C68->h, U+2C75->h, U+2C76->h, U+00CC->i, U+00CD->i, U+00CE->i, U+00CF->i, U+00EC->i, U+00ED->i, U+00EE->i, U+00EF->i, U+010309->i, U+0128->i, U+0129->i, U+012A->i, U+012B->i, U+012C->i, U+012D->i, U+012E->i, U+012F->i, U+0130->i, U+0131->i, U+0197->i, \
U+01CF->i, U+01D0->i, U+0208->i, U+0209->i, U+020A->i, U+020B->i, U+0268->i, U+026A->i, U+040D->i, U+0418->i, U+0419->i, U+0438->i, U+0439->i, U+0456->i, U+1D09->i, U+1D35->i, U+1D4E->i, U+1D62->i, U+1D7B->i, U+1D96->i, U+1DA4->i, U+1DA6->i, U+1DA7->i, \
U+1E2C->i, U+1E2D->i, U+1E2E->i, U+1E2F->i, U+1EC8->i, U+1EC9->i, U+1ECA->i, U+1ECB->i, U+2071->i, U+2111->i, U+0134->j, U+0135->j, U+01C8->j, U+01CB->j, U+01F0->j, U+0237->j, U+0248->j, U+0249->j, U+025F->j, U+0284->j, U+029D->j, U+02B2->j, U+1D0A->j, \
U+1D36->j, U+1DA1->j, U+1DA8->j, U+0136->k, U+0137->k, U+0198->k, U+0199->k, U+01E8->k, U+01E9->k, U+029E->k, U+1D0B->k, U+1D37->k, U+1D4F->k, U+1D84->k, U+1E30->k, U+1E31->k, U+1E32->k, U+1E33->k, U+1E34->k, U+1E35->k, U+2C69->k, U+2C6A->k, U+0139->l, \
U+013A->l, U+013B->l, U+013C->l, U+013D->l, U+013E->l, U+013F->l, U+0140->l, U+0141->l, U+0142->l, U+019A->l, U+01C8->l, U+0234->l, U+023D->l, U+026B->l, U+026C->l, U+026D->l, U+029F->l, U+02E1->l, U+1D0C->l, U+1D38->l, U+1D85->l, U+1DA9->l, U+1DAA->l, \
U+1DAB->l, U+1E36->l, U+1E37->l, U+1E38->l, U+1E39->l, U+1E3A->l, U+1E3B->l, U+1E3C->l, U+1E3D->l, U+2C60->l, U+2C61->l, U+2C62->l, U+019C->m, U+026F->m, U+0270->m, U+0271->m, U+1D0D->m, U+1D1F->m, U+1D39->m, U+1D50->m, U+1D5A->m, U+1D6F->m, U+1D86->m, \
U+1DAC->m, U+1DAD->m, U+1E3E->m, U+1E3F->m, U+1E40->m, U+1E41->m, U+1E42->m, U+1E43->m, U+00D1->n, U+00F1->n, U+0143->n, U+0144->n, U+0145->n, U+0146->n, U+0147->n, U+0148->n, U+0149->n, U+019D->n, U+019E->n, U+01CB->n, U+01F8->n, U+01F9->n, U+0220->n, \
U+0235->n, U+0272->n, U+0273->n, U+0274->n, U+1D0E->n, U+1D3A->n, U+1D3B->n, U+1D70->n, U+1D87->n, U+1DAE->n, U+1DAF->n, U+1DB0->n, U+1E44->n, U+1E45->n, U+1E46->n, U+1E47->n, U+1E48->n, U+1E49->n, U+1E4A->n, U+1E4B->n, U+207F->n, U+00D2->o, U+00D3->o, \
U+00D4->o, U+00D5->o, U+00D6->o, U+00D8->o, U+00F2->o, U+00F3->o, U+00F4->o, U+00F5->o, U+00F6->o, U+00F8->o, U+01030F->o, U+014C->o, U+014D->o, U+014E->o, U+014F->o, U+0150->o, U+0151->o, U+0186->o, U+019F->o, U+01A0->o, U+01A1->o, U+01D1->o, U+01D2->o, \
U+01EA->o, U+01EB->o, U+01EC->o, U+01ED->o, U+01FE->o, U+01FF->o, U+020C->o, U+020D->o, U+020E->o, U+020F->o, U+022A->o, U+022B->o, U+022C->o, U+022D->o, U+022E->o, U+022F->o, U+0230->o, U+0231->o, U+0254->o, U+0275->o, U+043E->o, U+04E6->o, U+04E7->o, \
U+04E8->o, U+04E9->o, U+04EA->o, U+04EB->o, U+1D0F->o, U+1D10->o, U+1D11->o, U+1D12->o, U+1D13->o, U+1D16->o, U+1D17->o, U+1D3C->o, U+1D52->o, U+1D53->o, U+1D54->o, U+1D55->o, U+1D97->o, U+1DB1->o, U+1E4C->o, U+1E4D->o, U+1E4E->o, U+1E4F->o, U+1E50->o, \
U+1E51->o, U+1E52->o, U+1E53->o, U+1ECC->o, U+1ECD->o, U+1ECE->o, U+1ECF->o, U+1ED0->o, U+1ED1->o, U+1ED2->o, U+1ED3->o, U+1ED4->o, U+1ED5->o, U+1ED6->o, U+1ED7->o, U+1ED8->o, U+1ED9->o, U+1EDA->o, U+1EDB->o, U+1EDC->o, U+1EDD->o, U+1EDE->o, U+1EDF->o, \
U+1EE0->o, U+1EE1->o, U+1EE2->o, U+1EE3->o, U+2092->o, U+2C9E->o, U+2C9F->o, U+01A4->p, U+01A5->p, U+1D18->p, U+1D3E->p, U+1D56->p, U+1D71->p, U+1D7D->p, U+1D88->p, U+1E54->p, U+1E55->p, U+1E56->p, U+1E57->p, U+2C63->p, U+024A->q, U+024B->q, U+02A0->q, \
U+0154->r, U+0155->r, U+0156->r, U+0157->r, U+0158->r, U+0159->r, U+0210->r, U+0211->r, U+0212->r, U+0213->r, U+024C->r, U+024D->r, U+0279->r, U+027A->r, U+027B->r, U+027C->r, U+027D->r, U+027E->r, U+027F->r, U+0280->r, U+0281->r, U+02B3->r, U+02B4->r, \
U+02B5->r, U+02B6->r, U+1D19->r, U+1D1A->r, U+1D3F->r, U+1D63->r, U+1D72->r, U+1D73->r, U+1D89->r, U+1DCA->r, U+1E58->r, U+1E59->r, U+1E5A->r, U+1E5B->r, U+1E5C->r, U+1E5D->r, U+1E5E->r, U+1E5F->r, U+211C->r, U+2C64->r, U+00DF->s, U+015A->s, U+015B->s, \
U+015C->s, U+015D->s, U+015E->s, U+015F->s, U+0160->s, U+0161->s, U+017F->s, U+0218->s, U+0219->s, U+023F->s, U+0282->s, U+02E2->s, U+1D74->s, U+1D8A->s, U+1DB3->s, U+1E60->s, U+1E61->s, U+1E62->s, U+1E63->s, U+1E64->s, U+1E65->s, U+1E66->s, U+1E67->s, \
U+1E68->s, U+1E69->s, U+1E9B->s, U+0162->t, U+0163->t, U+0164->t, U+0165->t, U+0166->t, U+0167->t, U+01AB->t, U+01AC->t, U+01AD->t, U+01AE->t, U+021A->t, U+021B->t, U+0236->t, U+023E->t, U+0287->t, U+0288->t, U+1D1B->t, U+1D40->t, U+1D57->t, U+1D75->t, \
U+1DB5->t, U+1E6A->t, U+1E6B->t, U+1E6C->t, U+1E6D->t, U+1E6E->t, U+1E6F->t, U+1E70->t, U+1E71->t, U+1E97->t, U+2C66->t, U+00D9->u, U+00DA->u, U+00DB->u, U+00DC->u, U+00F9->u, U+00FA->u, U+00FB->u, U+00FC->u, U+010316->u, U+0168->u, U+0169->u, U+016A->u, \
U+016B->u, U+016C->u, U+016D->u, U+016E->u, U+016F->u, U+0170->u, U+0171->u, U+0172->u, U+0173->u, U+01AF->u, U+01B0->u, U+01D3->u, U+01D4->u, U+01D5->u, U+01D6->u, U+01D7->u, U+01D8->u, U+01D9->u, U+01DA->u, U+01DB->u, U+01DC->u, U+0214->u, U+0215->u, \
U+0216->u, U+0217->u, U+0244->u, U+0289->u, U+1D1C->u, U+1D1D->u, U+1D1E->u, U+1D41->u, U+1D58->u, U+1D59->u, U+1D64->u, U+1D7E->u, U+1D99->u, U+1DB6->u, U+1DB8->u, U+1E72->u, U+1E73->u, U+1E74->u, U+1E75->u, U+1E76->u, U+1E77->u, U+1E78->u, U+1E79->u, \
U+1E7A->u, U+1E7B->u, U+1EE4->u, U+1EE5->u, U+1EE6->u, U+1EE7->u, U+1EE8->u, U+1EE9->u, U+1EEA->u, U+1EEB->u, U+1EEC->u, U+1EED->u, U+1EEE->u, U+1EEF->u, U+1EF0->u, U+1EF1->u, U+01B2->v, U+0245->v, U+028B->v, U+028C->v, U+1D20->v, U+1D5B->v, U+1D65->v, \
U+1D8C->v, U+1DB9->v, U+1DBA->v, U+1E7C->v, U+1E7D->v, U+1E7E->v, U+1E7F->v, U+2C74->v, U+0174->w, U+0175->w, U+028D->w, U+02B7->w, U+1D21->w, U+1D42->w, U+1E80->w, U+1E81->w, U+1E82->w, U+1E83->w, U+1E84->w, U+1E85->w, U+1E86->w, U+1E87->w, U+1E88->w, \
U+1E89->w, U+1E98->w, U+02E3->x, U+1D8D->x, U+1E8A->x, U+1E8B->x, U+1E8C->x, U+1E8D->x, U+2093->x, U+00DD->y, U+00FD->y, U+00FF->y, U+0176->y, U+0177->y, U+0178->y, U+01B3->y, U+01B4->y, U+0232->y, U+0233->y, U+024E->y, U+024F->y, U+028E->y, U+028F->y, \
U+02B8->y, U+1E8E->y, U+1E8F->y, U+1E99->y, U+1EF2->y, U+1EF3->y, U+1EF4->y, U+1EF5->y, U+1EF6->y, U+1EF7->y, U+1EF8->y, U+1EF9->y, U+0179->z, U+017A->z, U+017B->z, U+017C->z, U+017D->z, U+017E->z, U+01B5->z, U+01B6->z, U+0224->z, U+0225->z, U+0240->z, \
U+0290->z, U+0291->z, U+1D22->z, U+1D76->z, U+1D8E->z, U+1DBB->z, U+1DBC->z, U+1DBD->z, U+1E90->z, U+1E91->z, U+1E92->z, U+1E93->z, U+1E94->z, U+1E95->z, U+2128->z, U+2C6B->z, U+2C6C->z, U+00C6->U+00E6, U+01E2->U+00E6, U+01E3->U+00E6, U+01FC->U+00E6, \
U+01FD->U+00E6, U+1D01->U+00E6, U+1D02->U+00E6, U+1D2D->U+00E6, U+1D46->U+00E6, U+00E6, U+0622->U+0627, U+0623->U+0627, U+0624->U+0648, U+0625->U+0627, U+0626->U+064A, U+06C0->U+06D5, U+06C2->U+06C1, U+06D3->U+06D2, U+FB50->U+0671, U+FB51->U+0671, U+FB52->U+067B, \
U+FB53->U+067B, U+FB54->U+067B, U+FB56->U+067E, U+FB57->U+067E, U+FB58->U+067E, U+FB5A->U+0680, U+FB5B->U+0680, U+FB5C->U+0680, U+FB5E->U+067A, U+FB5F->U+067A, U+FB60->U+067A, U+FB62->U+067F, U+FB63->U+067F, U+FB64->U+067F, U+FB66->U+0679, U+FB67->U+0679, \
U+FB68->U+0679, U+FB6A->U+06A4, U+FB6B->U+06A4, U+FB6C->U+06A4, U+FB6E->U+06A6, U+FB6F->U+06A6, U+FB70->U+06A6, U+FB72->U+0684, U+FB73->U+0684, U+FB74->U+0684, U+FB76->U+0683, U+FB77->U+0683, U+FB78->U+0683, U+FB7A->U+0686, U+FB7B->U+0686, U+FB7C->U+0686, \
U+FB7E->U+0687, U+FB7F->U+0687, U+FB80->U+0687, U+FB82->U+068D, U+FB83->U+068D, U+FB84->U+068C, U+FB85->U+068C, U+FB86->U+068E, U+FB87->U+068E, U+FB88->U+0688, U+FB89->U+0688, U+FB8A->U+0698, U+FB8B->U+0698, U+FB8C->U+0691, U+FB8D->U+0691, U+FB8E->U+06A9, \
U+FB8F->U+06A9, U+FB90->U+06A9, U+FB92->U+06AF, U+FB93->U+06AF, U+FB94->U+06AF, U+FB96->U+06B3, U+FB97->U+06B3, U+FB98->U+06B3, U+FB9A->U+06B1, U+FB9B->U+06B1, U+FB9C->U+06B1, U+FB9E->U+06BA, U+FB9F->U+06BA, U+FBA0->U+06BB, U+FBA1->U+06BB, U+FBA2->U+06BB, \
U+FBA4->U+06C0, U+FBA5->U+06C0, U+FBA6->U+06C1, U+FBA7->U+06C1, U+FBA8->U+06C1, U+FBAA->U+06BE, U+FBAB->U+06BE, U+FBAC->U+06BE, U+FBAE->U+06D2, U+FBAF->U+06D2, U+FBB0->U+06D3, U+FBB1->U+06D3, U+FBD3->U+06AD, U+FBD4->U+06AD, U+FBD5->U+06AD, U+FBD7->U+06C7, \
U+FBD8->U+06C7, U+FBD9->U+06C6, U+FBDA->U+06C6, U+FBDB->U+06C8, U+FBDC->U+06C8, U+FBDD->U+0677, U+FBDE->U+06CB, U+FBDF->U+06CB, U+FBE0->U+06C5, U+FBE1->U+06C5, U+FBE2->U+06C9, U+FBE3->U+06C9, U+FBE4->U+06D0, U+FBE5->U+06D0, U+FBE6->U+06D0, U+FBE8->U+0649, \
U+FBFC->U+06CC, U+FBFD->U+06CC, U+FBFE->U+06CC, U+0621, U+0627..U+063A, U+0641..U+064A, U+0660..U+0669, U+066E, U+066F, U+0671..U+06BF, U+06C1, U+06C3..U+06D2, U+06D5, U+06EE..U+06FC, U+06FF, U+0750..U+076D, U+FB55, U+FB59, U+FB5D, U+FB61, U+FB65, U+FB69, \
U+FB6D, U+FB71, U+FB75, U+FB79, U+FB7D, U+FB81, U+FB91, U+FB95, U+FB99, U+FB9D, U+FBA3, U+FBA9, U+FBAD, U+FBD6, U+FBE7, U+FBE9, U+FBFF, U+0531..U+0556->U+0561..U+0586, U+0561..U+0586, U+0587, U+09DC->U+09A1, U+09DD->U+09A2, U+09DF->U+09AF, U+09F0->U+09AC, \
U+09F1->U+09AC, U+0985..U+0990, U+0993..U+09B0, U+09B2, U+09B6..U+09B9, U+09CE, U+09E0, U+09E1, U+09E6..U+09EF, U+F900->U+8C48, U+F901->U+66F4, U+F902->U+8ECA, U+F903->U+8CC8, U+F904->U+6ED1, U+F905->U+4E32, U+F906->U+53E5, U+F907->U+9F9C, U+F908->U+9F9C, \
U+F909->U+5951, U+F90A->U+91D1, U+F90B->U+5587, U+F90C->U+5948, U+F90D->U+61F6, U+F90E->U+7669, U+F90F->U+7F85, U+F910->U+863F, U+F911->U+87BA, U+F912->U+88F8, U+F913->U+908F, U+F914->U+6A02, U+F915->U+6D1B, U+F916->U+70D9, U+F917->U+73DE, U+F918->U+843D, \
U+F919->U+916A, U+F91A->U+99F1, U+F91B->U+4E82, U+F91C->U+5375, U+F91D->U+6B04, U+F91E->U+721B, U+F91F->U+862D, U+F920->U+9E1E, U+F921->U+5D50, U+F922->U+6FEB, U+F923->U+85CD, U+F924->U+8964, U+F925->U+62C9, U+F926->U+81D8, U+F927->U+881F, U+F928->U+5ECA, \
U+F929->U+6717, U+F92A->U+6D6A, U+F92B->U+72FC, U+F92C->U+90CE, U+F92D->U+4F86, U+F92E->U+51B7, U+F92F->U+52DE, U+F930->U+64C4, U+F931->U+6AD3, U+F932->U+7210, U+F933->U+76E7, U+F934->U+8001, U+F935->U+8606, U+F936->U+865C, U+F937->U+8DEF, U+F938->U+9732, \
U+F939->U+9B6F, U+F93A->U+9DFA, U+F93B->U+788C, U+F93C->U+797F, U+F93D->U+7DA0, U+F93E->U+83C9, U+F93F->U+9304, U+F940->U+9E7F, U+F941->U+8AD6, U+F942->U+58DF, U+F943->U+5F04, U+F944->U+7C60, U+F945->U+807E, U+F946->U+7262, U+F947->U+78CA, U+F948->U+8CC2, \
U+F949->U+96F7, U+F94A->U+58D8, U+F94B->U+5C62, U+F94C->U+6A13, U+F94D->U+6DDA, U+F94E->U+6F0F, U+F94F->U+7D2F, U+F950->U+7E37, U+F951->U+964B, U+F952->U+52D2, U+F953->U+808B, U+F954->U+51DC, U+F955->U+51CC, U+F956->U+7A1C, U+F957->U+7DBE, U+F958->U+83F1, \
U+F959->U+9675, U+F95A->U+8B80, U+F95B->U+62CF, U+F95C->U+6A02, U+F95D->U+8AFE, U+F95E->U+4E39, U+F95F->U+5BE7, U+F960->U+6012, U+F961->U+7387, U+F962->U+7570, U+F963->U+5317, U+F964->U+78FB, U+F965->U+4FBF, U+F966->U+5FA9, U+F967->U+4E0D, U+F968->U+6CCC, \
U+F969->U+6578, U+F96A->U+7D22, U+F96B->U+53C3, U+F96C->U+585E, U+F96D->U+7701, U+F96E->U+8449, U+F96F->U+8AAA, U+F970->U+6BBA, U+F971->U+8FB0, U+F972->U+6C88, U+F973->U+62FE, U+F974->U+82E5, U+F975->U+63A0, U+F976->U+7565, U+F977->U+4EAE, U+F978->U+5169, \
U+F979->U+51C9, U+F97A->U+6881, U+F97B->U+7CE7, U+F97C->U+826F, U+F97D->U+8AD2, U+F97E->U+91CF, U+F97F->U+52F5, U+F980->U+5442, U+F981->U+5973, U+F982->U+5EEC, U+F983->U+65C5, U+F984->U+6FFE, U+F985->U+792A, U+F986->U+95AD, U+F987->U+9A6A, U+F988->U+9E97, \
U+F989->U+9ECE, U+F98A->U+529B, U+F98B->U+66C6, U+F98C->U+6B77, U+F98D->U+8F62, U+F98E->U+5E74, U+F98F->U+6190, U+F990->U+6200, U+F991->U+649A, U+F992->U+6F23, U+F993->U+7149, U+F994->U+7489, U+F995->U+79CA, U+F996->U+7DF4, U+F997->U+806F, U+F998->U+8F26, \
U+F999->U+84EE, U+F99A->U+9023, U+F99B->U+934A, U+F99C->U+5217, U+F99D->U+52A3, U+F99E->U+54BD, U+F99F->U+70C8, U+F9A0->U+88C2, U+F9A1->U+8AAA, U+F9A2->U+5EC9, U+F9A3->U+5FF5, U+F9A4->U+637B, U+F9A5->U+6BAE, U+F9A6->U+7C3E, U+F9A7->U+7375, U+F9A8->U+4EE4, \
U+F9A9->U+56F9, U+F9AA->U+5BE7, U+F9AB->U+5DBA, U+F9AC->U+601C, U+F9AD->U+73B2, U+F9AE->U+7469, U+F9AF->U+7F9A, U+F9B0->U+8046, U+F9B1->U+9234, U+F9B2->U+96F6, U+F9B3->U+9748, U+F9B4->U+9818, U+F9B5->U+4F8B, U+F9B6->U+79AE, U+F9B7->U+91B4, U+F9B8->U+96B8, \
U+F9B9->U+60E1, U+F9BA->U+4E86, U+F9BB->U+50DA, U+F9BC->U+5BEE, U+F9BD->U+5C3F, U+F9BE->U+6599, U+F9BF->U+6A02, U+F9C0->U+71CE, U+F9C1->U+7642, U+F9C2->U+84FC, U+F9C3->U+907C, U+F9C4->U+9F8D, U+F9C5->U+6688, U+F9C6->U+962E, U+F9C7->U+5289, U+F9C8->U+677B, \
U+F9C9->U+67F3, U+F9CA->U+6D41, U+F9CB->U+6E9C, U+F9CC->U+7409, U+F9CD->U+7559, U+F9CE->U+786B, U+F9CF->U+7D10, U+F9D0->U+985E, U+F9D1->U+516D, U+F9D2->U+622E, U+F9D3->U+9678, U+F9D4->U+502B, U+F9D5->U+5D19, U+F9D6->U+6DEA, U+F9D7->U+8F2A, U+F9D8->U+5F8B, \
U+F9D9->U+6144, U+F9DA->U+6817, U+F9DB->U+7387, U+F9DC->U+9686, U+F9DD->U+5229, U+F9DE->U+540F, U+F9DF->U+5C65, U+F9E0->U+6613, U+F9E1->U+674E, U+F9E2->U+68A8, U+F9E3->U+6CE5, U+F9E4->U+7406, U+F9E5->U+75E2, U+F9E6->U+7F79, U+F9E7->U+88CF, U+F9E8->U+88E1, \
U+F9E9->U+91CC, U+F9EA->U+96E2, U+F9EB->U+533F, U+F9EC->U+6EBA, U+F9ED->U+541D, U+F9EE->U+71D0, U+F9EF->U+7498, U+F9F0->U+85FA, U+F9F1->U+96A3, U+F9F2->U+9C57, U+F9F3->U+9E9F, U+F9F4->U+6797, U+F9F5->U+6DCB, U+F9F6->U+81E8, U+F9F7->U+7ACB, U+F9F8->U+7B20, \
U+F9F9->U+7C92, U+F9FA->U+72C0, U+F9FB->U+7099, U+F9FC->U+8B58, U+F9FD->U+4EC0, U+F9FE->U+8336, U+F9FF->U+523A, U+FA00->U+5207, U+FA01->U+5EA6, U+FA02->U+62D3, U+FA03->U+7CD6, U+FA04->U+5B85, U+FA05->U+6D1E, U+FA06->U+66B4, U+FA07->U+8F3B, U+FA08->U+884C, \
U+FA09->U+964D, U+FA0A->U+898B, U+FA0B->U+5ED3, U+FA0C->U+5140, U+FA0D->U+55C0, U+FA10->U+585A, U+FA12->U+6674, U+FA15->U+51DE, U+FA16->U+732A, U+FA17->U+76CA, U+FA18->U+793C, U+FA19->U+795E, U+FA1A->U+7965, U+FA1B->U+798F, U+FA1C->U+9756, U+FA1D->U+7CBE, \
U+FA1E->U+7FBD, U+FA20->U+8612, U+FA22->U+8AF8, U+FA25->U+9038, U+FA26->U+90FD, U+FA2A->U+98EF, U+FA2B->U+98FC, U+FA2C->U+9928, U+FA2D->U+9DB4, U+FA30->U+4FAE, U+FA31->U+50E7, U+FA32->U+514D, U+FA33->U+52C9, U+FA34->U+52E4, U+FA35->U+5351, U+FA36->U+559D, \
U+FA37->U+5606, U+FA38->U+5668, U+FA39->U+5840, U+FA3A->U+58A8, U+FA3B->U+5C64, U+FA3C->U+5C6E, U+FA3D->U+6094, U+FA3E->U+6168, U+FA3F->U+618E, U+FA40->U+61F2, U+FA41->U+654F, U+FA42->U+65E2, U+FA43->U+6691, U+FA44->U+6885, U+FA45->U+6D77, U+FA46->U+6E1A, \
U+FA47->U+6F22, U+FA48->U+716E, U+FA49->U+722B, U+FA4A->U+7422, U+FA4B->U+7891, U+FA4C->U+793E, U+FA4D->U+7949, U+FA4E->U+7948, U+FA4F->U+7950, U+FA50->U+7956, U+FA51->U+795D, U+FA52->U+798D, U+FA53->U+798E, U+FA54->U+7A40, U+FA55->U+7A81, U+FA56->U+7BC0, \
U+FA57->U+7DF4, U+FA58->U+7E09, U+FA59->U+7E41, U+FA5A->U+7F72, U+FA5B->U+8005, U+FA5C->U+81ED, U+FA5D->U+8279, U+FA5E->U+8279, U+FA5F->U+8457, U+FA60->U+8910, U+FA61->U+8996, U+FA62->U+8B01, U+FA63->U+8B39, U+FA64->U+8CD3, U+FA65->U+8D08, U+FA66->U+8FB6, \
U+FA67->U+9038, U+FA68->U+96E3, U+FA69->U+97FF, U+FA6A->U+983B, U+FA70->U+4E26, U+FA71->U+51B5, U+FA72->U+5168, U+FA73->U+4F80, U+FA74->U+5145, U+FA75->U+5180, U+FA76->U+52C7, U+FA77->U+52FA, U+FA78->U+559D, U+FA79->U+5555, U+FA7A->U+5599, U+FA7B->U+55E2, \
U+FA7C->U+585A, U+FA7D->U+58B3, U+FA7E->U+5944, U+FA7F->U+5954, U+FA80->U+5A62, U+FA81->U+5B28, U+FA82->U+5ED2, U+FA83->U+5ED9, U+FA84->U+5F69, U+FA85->U+5FAD, U+FA86->U+60D8, U+FA87->U+614E, U+FA88->U+6108, U+FA89->U+618E, U+FA8A->U+6160, U+FA8B->U+61F2, \
U+FA8C->U+6234, U+FA8D->U+63C4, U+FA8E->U+641C, U+FA8F->U+6452, U+FA90->U+6556, U+FA91->U+6674, U+FA92->U+6717, U+FA93->U+671B, U+FA94->U+6756, U+FA95->U+6B79, U+FA96->U+6BBA, U+FA97->U+6D41, U+FA98->U+6EDB, U+FA99->U+6ECB, U+FA9A->U+6F22, U+FA9B->U+701E, \
U+FA9C->U+716E, U+FA9D->U+77A7, U+FA9E->U+7235, U+FA9F->U+72AF, U+FAA0->U+732A, U+FAA1->U+7471, U+FAA2->U+7506, U+FAA3->U+753B, U+FAA4->U+761D, U+FAA5->U+761F, U+FAA6->U+76CA, U+FAA7->U+76DB, U+FAA8->U+76F4, U+FAA9->U+774A, U+FAAA->U+7740, U+FAAB->U+78CC, \
U+FAAC->U+7AB1, U+FAAD->U+7BC0, U+FAAE->U+7C7B, U+FAAF->U+7D5B, U+FAB0->U+7DF4, U+FAB1->U+7F3E, U+FAB2->U+8005, U+FAB3->U+8352, U+FAB4->U+83EF, U+FAB5->U+8779, U+FAB6->U+8941, U+FAB7->U+8986, U+FAB8->U+8996, U+FAB9->U+8ABF, U+FABA->U+8AF8, U+FABB->U+8ACB, \
U+FABC->U+8B01, U+FABD->U+8AFE, U+FABE->U+8AED, U+FABF->U+8B39, U+FAC0->U+8B8A, U+FAC1->U+8D08, U+FAC2->U+8F38, U+FAC3->U+9072, U+FAC4->U+9199, U+FAC5->U+9276, U+FAC6->U+967C, U+FAC7->U+96E3, U+FAC8->U+9756, U+FAC9->U+97DB, U+FACA->U+97FF, U+FACB->U+980B, \
U+FACC->U+983B, U+FACD->U+9B12, U+FACE->U+9F9C, U+FACF->U+2284A, U+FAD0->U+22844, U+FAD1->U+233D5, U+FAD2->U+3B9D, U+FAD3->U+4018, U+FAD4->U+4039, U+FAD5->U+25249, U+FAD6->U+25CD0, U+FAD7->U+27ED3, U+FAD8->U+9F43, U+FAD9->U+9F8E, U+2F800->U+4E3D, U+2F801->U+4E38, \
U+2F802->U+4E41, U+2F803->U+20122, U+2F804->U+4F60, U+2F805->U+4FAE, U+2F806->U+4FBB, U+2F807->U+5002, U+2F808->U+507A, U+2F809->U+5099, U+2F80A->U+50E7, U+2F80B->U+50CF, U+2F80C->U+349E, U+2F80D->U+2063A, U+2F80E->U+514D, U+2F80F->U+5154, U+2F810->U+5164, \
U+2F811->U+5177, U+2F812->U+2051C, U+2F813->U+34B9, U+2F814->U+5167, U+2F815->U+518D, U+2F816->U+2054B, U+2F817->U+5197, U+2F818->U+51A4, U+2F819->U+4ECC, U+2F81A->U+51AC, U+2F81B->U+51B5, U+2F81C->U+291DF, U+2F81D->U+51F5, U+2F81E->U+5203, U+2F81F->U+34DF, \
U+2F820->U+523B, U+2F821->U+5246, U+2F822->U+5272, U+2F823->U+5277, U+2F824->U+3515, U+2F825->U+52C7, U+2F826->U+52C9, U+2F827->U+52E4, U+2F828->U+52FA, U+2F829->U+5305, U+2F82A->U+5306, U+2F82B->U+5317, U+2F82C->U+5349, U+2F82D->U+5351, U+2F82E->U+535A, \
U+2F82F->U+5373, U+2F830->U+537D, U+2F831->U+537F, U+2F832->U+537F, U+2F833->U+537F, U+2F834->U+20A2C, U+2F835->U+7070, U+2F836->U+53CA, U+2F837->U+53DF, U+2F838->U+20B63, U+2F839->U+53EB, U+2F83A->U+53F1, U+2F83B->U+5406, U+2F83C->U+549E, U+2F83D->U+5438, \
U+2F83E->U+5448, U+2F83F->U+5468, U+2F840->U+54A2, U+2F841->U+54F6, U+2F842->U+5510, U+2F843->U+5553, U+2F844->U+5563, U+2F845->U+5584, U+2F846->U+5584, U+2F847->U+5599, U+2F848->U+55AB, U+2F849->U+55B3, U+2F84A->U+55C2, U+2F84B->U+5716, U+2F84C->U+5606, \
U+2F84D->U+5717, U+2F84E->U+5651, U+2F84F->U+5674, U+2F850->U+5207, U+2F851->U+58EE, U+2F852->U+57CE, U+2F853->U+57F4, U+2F854->U+580D, U+2F855->U+578B, U+2F856->U+5832, U+2F857->U+5831, U+2F858->U+58AC, U+2F859->U+214E4, U+2F85A->U+58F2, U+2F85B->U+58F7, \
U+2F85C->U+5906, U+2F85D->U+591A, U+2F85E->U+5922, U+2F85F->U+5962, U+2F860->U+216A8, U+2F861->U+216EA, U+2F862->U+59EC, U+2F863->U+5A1B, U+2F864->U+5A27, U+2F865->U+59D8, U+2F866->U+5A66, U+2F867->U+36EE, U+2F868->U+36FC, U+2F869->U+5B08, U+2F86A->U+5B3E, \
U+2F86B->U+5B3E, U+2F86C->U+219C8, U+2F86D->U+5BC3, U+2F86E->U+5BD8, U+2F86F->U+5BE7, U+2F870->U+5BF3, U+2F871->U+21B18, U+2F872->U+5BFF, U+2F873->U+5C06, U+2F874->U+5F53, U+2F875->U+5C22, U+2F876->U+3781, U+2F877->U+5C60, U+2F878->U+5C6E, U+2F879->U+5CC0, \
U+2F87A->U+5C8D, U+2F87B->U+21DE4, U+2F87C->U+5D43, U+2F87D->U+21DE6, U+2F87E->U+5D6E, U+2F87F->U+5D6B, U+2F880->U+5D7C, U+2F881->U+5DE1, U+2F882->U+5DE2, U+2F883->U+382F, U+2F884->U+5DFD, U+2F885->U+5E28, U+2F886->U+5E3D, U+2F887->U+5E69, U+2F888->U+3862, \
U+2F889->U+22183, U+2F88A->U+387C, U+2F88B->U+5EB0, U+2F88C->U+5EB3, U+2F88D->U+5EB6, U+2F88E->U+5ECA, U+2F88F->U+2A392, U+2F890->U+5EFE, U+2F891->U+22331, U+2F892->U+22331, U+2F893->U+8201, U+2F894->U+5F22, U+2F895->U+5F22, U+2F896->U+38C7, U+2F897->U+232B8, \
U+2F898->U+261DA, U+2F899->U+5F62, U+2F89A->U+5F6B, U+2F89B->U+38E3, U+2F89C->U+5F9A, U+2F89D->U+5FCD, U+2F89E->U+5FD7, U+2F89F->U+5FF9, U+2F8A0->U+6081, U+2F8A1->U+393A, U+2F8A2->U+391C, U+2F8A3->U+6094, U+2F8A4->U+226D4, U+2F8A5->U+60C7, U+2F8A6->U+6148, \
U+2F8A7->U+614C, U+2F8A8->U+614E, U+2F8A9->U+614C, U+2F8AA->U+617A, U+2F8AB->U+618E, U+2F8AC->U+61B2, U+2F8AD->U+61A4, U+2F8AE->U+61AF, U+2F8AF->U+61DE, U+2F8B0->U+61F2, U+2F8B1->U+61F6, U+2F8B2->U+6210, U+2F8B3->U+621B, U+2F8B4->U+625D, U+2F8B5->U+62B1, \
U+2F8B6->U+62D4, U+2F8B7->U+6350, U+2F8B8->U+22B0C, U+2F8B9->U+633D, U+2F8BA->U+62FC, U+2F8BB->U+6368, U+2F8BC->U+6383, U+2F8BD->U+63E4, U+2F8BE->U+22BF1, U+2F8BF->U+6422, U+2F8C0->U+63C5, U+2F8C1->U+63A9, U+2F8C2->U+3A2E, U+2F8C3->U+6469, U+2F8C4->U+647E, \
U+2F8C5->U+649D, U+2F8C6->U+6477, U+2F8C7->U+3A6C, U+2F8C8->U+654F, U+2F8C9->U+656C, U+2F8CA->U+2300A, U+2F8CB->U+65E3, U+2F8CC->U+66F8, U+2F8CD->U+6649, U+2F8CE->U+3B19, U+2F8CF->U+6691, U+2F8D0->U+3B08, U+2F8D1->U+3AE4, U+2F8D2->U+5192, U+2F8D3->U+5195, \
U+2F8D4->U+6700, U+2F8D5->U+669C, U+2F8D6->U+80AD, U+2F8D7->U+43D9, U+2F8D8->U+6717, U+2F8D9->U+671B, U+2F8DA->U+6721, U+2F8DB->U+675E, U+2F8DC->U+6753, U+2F8DD->U+233C3, U+2F8DE->U+3B49, U+2F8DF->U+67FA, U+2F8E0->U+6785, U+2F8E1->U+6852, U+2F8E2->U+6885, \
U+2F8E3->U+2346D, U+2F8E4->U+688E, U+2F8E5->U+681F, U+2F8E6->U+6914, U+2F8E7->U+3B9D, U+2F8E8->U+6942, U+2F8E9->U+69A3, U+2F8EA->U+69EA, U+2F8EB->U+6AA8, U+2F8EC->U+236A3, U+2F8ED->U+6ADB, U+2F8EE->U+3C18, U+2F8EF->U+6B21, U+2F8F0->U+238A7, U+2F8F1->U+6B54, \
U+2F8F2->U+3C4E, U+2F8F3->U+6B72, U+2F8F4->U+6B9F, U+2F8F5->U+6BBA, U+2F8F6->U+6BBB, U+2F8F7->U+23A8D, U+2F8F8->U+21D0B, U+2F8F9->U+23AFA, U+2F8FA->U+6C4E, U+2F8FB->U+23CBC, U+2F8FC->U+6CBF, U+2F8FD->U+6CCD, U+2F8FE->U+6C67, U+2F8FF->U+6D16, U+2F900->U+6D3E, \
U+2F901->U+6D77, U+2F902->U+6D41, U+2F903->U+6D69, U+2F904->U+6D78, U+2F905->U+6D85, U+2F906->U+23D1E, U+2F907->U+6D34, U+2F908->U+6E2F, U+2F909->U+6E6E, U+2F90A->U+3D33, U+2F90B->U+6ECB, U+2F90C->U+6EC7, U+2F90D->U+23ED1, U+2F90E->U+6DF9, U+2F90F->U+6F6E, \
U+2F910->U+23F5E, U+2F911->U+23F8E, U+2F912->U+6FC6, U+2F913->U+7039, U+2F914->U+701E, U+2F915->U+701B, U+2F916->U+3D96, U+2F917->U+704A, U+2F918->U+707D, U+2F919->U+7077, U+2F91A->U+70AD, U+2F91B->U+20525, U+2F91C->U+7145, U+2F91D->U+24263, U+2F91E->U+719C, \
U+2F91F->U+243AB, U+2F920->U+7228, U+2F921->U+7235, U+2F922->U+7250, U+2F923->U+24608, U+2F924->U+7280, U+2F925->U+7295, U+2F926->U+24735, U+2F927->U+24814, U+2F928->U+737A, U+2F929->U+738B, U+2F92A->U+3EAC, U+2F92B->U+73A5, U+2F92C->U+3EB8, U+2F92D->U+3EB8, \
U+2F92E->U+7447, U+2F92F->U+745C, U+2F930->U+7471, U+2F931->U+7485, U+2F932->U+74CA, U+2F933->U+3F1B, U+2F934->U+7524, U+2F935->U+24C36, U+2F936->U+753E, U+2F937->U+24C92, U+2F938->U+7570, U+2F939->U+2219F, U+2F93A->U+7610, U+2F93B->U+24FA1, U+2F93C->U+24FB8, \
U+2F93D->U+25044, U+2F93E->U+3FFC, U+2F93F->U+4008, U+2F940->U+76F4, U+2F941->U+250F3, U+2F942->U+250F2, U+2F943->U+25119, U+2F944->U+25133, U+2F945->U+771E, U+2F946->U+771F, U+2F947->U+771F, U+2F948->U+774A, U+2F949->U+4039, U+2F94A->U+778B, U+2F94B->U+4046, \
U+2F94C->U+4096, U+2F94D->U+2541D, U+2F94E->U+784E, U+2F94F->U+788C, U+2F950->U+78CC, U+2F951->U+40E3, U+2F952->U+25626, U+2F953->U+7956, U+2F954->U+2569A, U+2F955->U+256C5, U+2F956->U+798F, U+2F957->U+79EB, U+2F958->U+412F, U+2F959->U+7A40, U+2F95A->U+7A4A, \
U+2F95B->U+7A4F, U+2F95C->U+2597C, U+2F95D->U+25AA7, U+2F95E->U+25AA7, U+2F95F->U+7AEE, U+2F960->U+4202, U+2F961->U+25BAB, U+2F962->U+7BC6, U+2F963->U+7BC9, U+2F964->U+4227, U+2F965->U+25C80, U+2F966->U+7CD2, U+2F967->U+42A0, U+2F968->U+7CE8, U+2F969->U+7CE3, \
U+2F96A->U+7D00, U+2F96B->U+25F86, U+2F96C->U+7D63, U+2F96D->U+4301, U+2F96E->U+7DC7, U+2F96F->U+7E02, U+2F970->U+7E45, U+2F971->U+4334, U+2F972->U+26228, U+2F973->U+26247, U+2F974->U+4359, U+2F975->U+262D9, U+2F976->U+7F7A, U+2F977->U+2633E, U+2F978->U+7F95, \
U+2F979->U+7FFA, U+2F97A->U+8005, U+2F97B->U+264DA, U+2F97C->U+26523, U+2F97D->U+8060, U+2F97E->U+265A8, U+2F97F->U+8070, U+2F980->U+2335F, U+2F981->U+43D5, U+2F982->U+80B2, U+2F983->U+8103, U+2F984->U+440B, U+2F985->U+813E, U+2F986->U+5AB5, U+2F987->U+267A7, \
U+2F988->U+267B5, U+2F989->U+23393, U+2F98A->U+2339C, U+2F98B->U+8201, U+2F98C->U+8204, U+2F98D->U+8F9E, U+2F98E->U+446B, U+2F98F->U+8291, U+2F990->U+828B, U+2F991->U+829D, U+2F992->U+52B3, U+2F993->U+82B1, U+2F994->U+82B3, U+2F995->U+82BD, U+2F996->U+82E6, \
U+2F997->U+26B3C, U+2F998->U+82E5, U+2F999->U+831D, U+2F99A->U+8363, U+2F99B->U+83AD, U+2F99C->U+8323, U+2F99D->U+83BD, U+2F99E->U+83E7, U+2F99F->U+8457, U+2F9A0->U+8353, U+2F9A1->U+83CA, U+2F9A2->U+83CC, U+2F9A3->U+83DC, U+2F9A4->U+26C36, U+2F9A5->U+26D6B, \
U+2F9A6->U+26CD5, U+2F9A7->U+452B, U+2F9A8->U+84F1, U+2F9A9->U+84F3, U+2F9AA->U+8516, U+2F9AB->U+273CA, U+2F9AC->U+8564, U+2F9AD->U+26F2C, U+2F9AE->U+455D, U+2F9AF->U+4561, U+2F9B0->U+26FB1, U+2F9B1->U+270D2, U+2F9B2->U+456B, U+2F9B3->U+8650, U+2F9B4->U+865C, \
U+2F9B5->U+8667, U+2F9B6->U+8669, U+2F9B7->U+86A9, U+2F9B8->U+8688, U+2F9B9->U+870E, U+2F9BA->U+86E2, U+2F9BB->U+8779, U+2F9BC->U+8728, U+2F9BD->U+876B, U+2F9BE->U+8786, U+2F9BF->U+45D7, U+2F9C0->U+87E1, U+2F9C1->U+8801, U+2F9C2->U+45F9, U+2F9C3->U+8860, \
U+2F9C4->U+8863, U+2F9C5->U+27667, U+2F9C6->U+88D7, U+2F9C7->U+88DE, U+2F9C8->U+4635, U+2F9C9->U+88FA, U+2F9CA->U+34BB, U+2F9CB->U+278AE, U+2F9CC->U+27966, U+2F9CD->U+46BE, U+2F9CE->U+46C7, U+2F9CF->U+8AA0, U+2F9D0->U+8AED, U+2F9D1->U+8B8A, U+2F9D2->U+8C55, \
U+2F9D3->U+27CA8, U+2F9D4->U+8CAB, U+2F9D5->U+8CC1, U+2F9D6->U+8D1B, U+2F9D7->U+8D77, U+2F9D8->U+27F2F, U+2F9D9->U+20804, U+2F9DA->U+8DCB, U+2F9DB->U+8DBC, U+2F9DC->U+8DF0, U+2F9DD->U+208DE, U+2F9DE->U+8ED4, U+2F9DF->U+8F38, U+2F9E0->U+285D2, U+2F9E1->U+285ED, \
U+2F9E2->U+9094, U+2F9E3->U+90F1, U+2F9E4->U+9111, U+2F9E5->U+2872E, U+2F9E6->U+911B, U+2F9E7->U+9238, U+2F9E8->U+92D7, U+2F9E9->U+92D8, U+2F9EA->U+927C, U+2F9EB->U+93F9, U+2F9EC->U+9415, U+2F9ED->U+28BFA, U+2F9EE->U+958B, U+2F9EF->U+4995, U+2F9F0->U+95B7, \
U+2F9F1->U+28D77, U+2F9F2->U+49E6, U+2F9F3->U+96C3, U+2F9F4->U+5DB2, U+2F9F5->U+9723, U+2F9F6->U+29145, U+2F9F7->U+2921A, U+2F9F8->U+4A6E, U+2F9F9->U+4A76, U+2F9FA->U+97E0, U+2F9FB->U+2940A, U+2F9FC->U+4AB2, U+2F9FD->U+29496, U+2F9FE->U+980B, U+2F9FF->U+980B, \
U+2FA00->U+9829, U+2FA01->U+295B6, U+2FA02->U+98E2, U+2FA03->U+4B33, U+2FA04->U+9929, U+2FA05->U+99A7, U+2FA06->U+99C2, U+2FA07->U+99FE, U+2FA08->U+4BCE, U+2FA09->U+29B30, U+2FA0A->U+9B12, U+2FA0B->U+9C40, U+2FA0C->U+9CFD, U+2FA0D->U+4CCE, U+2FA0E->U+4CED, \
U+2FA0F->U+9D67, U+2FA10->U+2A0CE, U+2FA11->U+4CF8, U+2FA12->U+2A105, U+2FA13->U+2A20E, U+2FA14->U+2A291, U+2FA15->U+9EBB, U+2FA16->U+4D56, U+2FA17->U+9EF9, U+2FA18->U+9EFE, U+2FA19->U+9F05, U+2FA1A->U+9F0F, U+2FA1B->U+9F16, U+2FA1C->U+9F3B, U+2FA1D->U+2A600, \
U+2F00->U+4E00, U+2F01->U+4E28, U+2F02->U+4E36, U+2F03->U+4E3F, U+2F04->U+4E59, U+2F05->U+4E85, U+2F06->U+4E8C, U+2F07->U+4EA0, U+2F08->U+4EBA, U+2F09->U+513F, U+2F0A->U+5165, U+2F0B->U+516B, U+2F0C->U+5182, U+2F0D->U+5196, U+2F0E->U+51AB, U+2F0F->U+51E0, \
U+2F10->U+51F5, U+2F11->U+5200, U+2F12->U+529B, U+2F13->U+52F9, U+2F14->U+5315, U+2F15->U+531A, U+2F16->U+5338, U+2F17->U+5341, U+2F18->U+535C, U+2F19->U+5369, U+2F1A->U+5382, U+2F1B->U+53B6, U+2F1C->U+53C8, U+2F1D->U+53E3, U+2F1E->U+56D7, U+2F1F->U+571F, \
U+2F20->U+58EB, U+2F21->U+5902, U+2F22->U+590A, U+2F23->U+5915, U+2F24->U+5927, U+2F25->U+5973, U+2F26->U+5B50, U+2F27->U+5B80, U+2F28->U+5BF8, U+2F29->U+5C0F, U+2F2A->U+5C22, U+2F2B->U+5C38, U+2F2C->U+5C6E, U+2F2D->U+5C71, U+2F2E->U+5DDB, U+2F2F->U+5DE5, \
U+2F30->U+5DF1, U+2F31->U+5DFE, U+2F32->U+5E72, U+2F33->U+5E7A, U+2F34->U+5E7F, U+2F35->U+5EF4, U+2F36->U+5EFE, U+2F37->U+5F0B, U+2F38->U+5F13, U+2F39->U+5F50, U+2F3A->U+5F61, U+2F3B->U+5F73, U+2F3C->U+5FC3, U+2F3D->U+6208, U+2F3E->U+6236, U+2F3F->U+624B, \
U+2F40->U+652F, U+2F41->U+6534, U+2F42->U+6587, U+2F43->U+6597, U+2F44->U+65A4, U+2F45->U+65B9, U+2F46->U+65E0, U+2F47->U+65E5, U+2F48->U+66F0, U+2F49->U+6708, U+2F4A->U+6728, U+2F4B->U+6B20, U+2F4C->U+6B62, U+2F4D->U+6B79, U+2F4E->U+6BB3, U+2F4F->U+6BCB, \
U+2F50->U+6BD4, U+2F51->U+6BDB, U+2F52->U+6C0F, U+2F53->U+6C14, U+2F54->U+6C34, U+2F55->U+706B, U+2F56->U+722A, U+2F57->U+7236, U+2F58->U+723B, U+2F59->U+723F, U+2F5A->U+7247, U+2F5B->U+7259, U+2F5C->U+725B, U+2F5D->U+72AC, U+2F5E->U+7384, U+2F5F->U+7389, \
U+2F60->U+74DC, U+2F61->U+74E6, U+2F62->U+7518, U+2F63->U+751F, U+2F64->U+7528, U+2F65->U+7530, U+2F66->U+758B, U+2F67->U+7592, U+2F68->U+7676, U+2F69->U+767D, U+2F6A->U+76AE, U+2F6B->U+76BF, U+2F6C->U+76EE, U+2F6D->U+77DB, U+2F6E->U+77E2, U+2F6F->U+77F3, \
U+2F70->U+793A, U+2F71->U+79B8, U+2F72->U+79BE, U+2F73->U+7A74, U+2F74->U+7ACB, U+2F75->U+7AF9, U+2F76->U+7C73, U+2F77->U+7CF8, U+2F78->U+7F36, U+2F79->U+7F51, U+2F7A->U+7F8A, U+2F7B->U+7FBD, U+2F7C->U+8001, U+2F7D->U+800C, U+2F7E->U+8012, U+2F7F->U+8033, \
U+2F80->U+807F, U+2F81->U+8089, U+2F82->U+81E3, U+2F83->U+81EA, U+2F84->U+81F3, U+2F85->U+81FC, U+2F86->U+820C, U+2F87->U+821B, U+2F88->U+821F, U+2F89->U+826E, U+2F8A->U+8272, U+2F8B->U+8278, U+2F8C->U+864D, U+2F8D->U+866B, U+2F8E->U+8840, U+2F8F->U+884C, \
U+2F90->U+8863, U+2F91->U+897E, U+2F92->U+898B, U+2F93->U+89D2, U+2F94->U+8A00, U+2F95->U+8C37, U+2F96->U+8C46, U+2F97->U+8C55, U+2F98->U+8C78, U+2F99->U+8C9D, U+2F9A->U+8D64, U+2F9B->U+8D70, U+2F9C->U+8DB3, U+2F9D->U+8EAB, U+2F9E->U+8ECA, U+2F9F->U+8F9B, \
U+2FA0->U+8FB0, U+2FA1->U+8FB5, U+2FA2->U+9091, U+2FA3->U+9149, U+2FA4->U+91C6, U+2FA5->U+91CC, U+2FA6->U+91D1, U+2FA7->U+9577, U+2FA8->U+9580, U+2FA9->U+961C, U+2FAA->U+96B6, U+2FAB->U+96B9, U+2FAC->U+96E8, U+2FAD->U+9751, U+2FAE->U+975E, U+2FAF->U+9762, \
U+2FB0->U+9769, U+2FB1->U+97CB, U+2FB2->U+97ED, U+2FB3->U+97F3, U+2FB4->U+9801, U+2FB5->U+98A8, U+2FB6->U+98DB, U+2FB7->U+98DF, U+2FB8->U+9996, U+2FB9->U+9999, U+2FBA->U+99AC, U+2FBB->U+9AA8, U+2FBC->U+9AD8, U+2FBD->U+9ADF, U+2FBE->U+9B25, U+2FBF->U+9B2F, \
U+2FC0->U+9B32, U+2FC1->U+9B3C, U+2FC2->U+9B5A, U+2FC3->U+9CE5, U+2FC4->U+9E75, U+2FC5->U+9E7F, U+2FC6->U+9EA5, U+2FC7->U+9EBB, U+2FC8->U+9EC3, U+2FC9->U+9ECD, U+2FCA->U+9ED1, U+2FCB->U+9EF9, U+2FCC->U+9EFD, U+2FCD->U+9F0E, U+2FCE->U+9F13, U+2FCF->U+9F20, \
U+2FD0->U+9F3B, U+2FD1->U+9F4A, U+2FD2->U+9F52, U+2FD3->U+9F8D, U+2FD4->U+9F9C, U+2FD5->U+9FA0, U+3042->U+3041, U+3044->U+3043, U+3046->U+3045, U+3048->U+3047, U+304A->U+3049, U+304C->U+304B, U+304E->U+304D, U+3050->U+304F, U+3052->U+3051, U+3054->U+3053, \
U+3056->U+3055, U+3058->U+3057, U+305A->U+3059, U+305C->U+305B, U+305E->U+305D, U+3060->U+305F, U+3062->U+3061, U+3064->U+3063, U+3065->U+3063, U+3067->U+3066, U+3069->U+3068, U+3070->U+306F, U+3071->U+306F, U+3073->U+3072, U+3074->U+3072, U+3076->U+3075, \
U+3077->U+3075, U+3079->U+3078, U+307A->U+3078, U+307C->U+307B, U+307D->U+307B, U+3084->U+3083, U+3086->U+3085, U+3088->U+3087, U+308F->U+308E, U+3094->U+3046, U+3095->U+304B, U+3096->U+3051, U+30A2->U+30A1, U+30A4->U+30A3, U+30A6->U+30A5, U+30A8->U+30A7, \
U+30AA->U+30A9, U+30AC->U+30AB, U+30AE->U+30AD, U+30B0->U+30AF, U+30B2->U+30B1, U+30B4->U+30B3, U+30B6->U+30B5, U+30B8->U+30B7, U+30BA->U+30B9, U+30BC->U+30BB, U+30BE->U+30BD, U+30C0->U+30BF, U+30C2->U+30C1, U+30C5->U+30C4, U+30C7->U+30C6, U+30C9->U+30C8, \
U+30D0->U+30CF, U+30D1->U+30CF, U+30D3->U+30D2, U+30D4->U+30D2, U+30D6->U+30D5, U+30D7->U+30D5, U+30D9->U+30D8, U+30DA->U+30D8, U+30DC->U+30DB, U+30DD->U+30DB, U+30E4->U+30E3, U+30E6->U+30E5, U+30E8->U+30E7, U+30EF->U+30EE, U+30F4->U+30A6, U+30AB->U+30F5, \
U+30B1->U+30F6, U+30F7->U+30EF, U+30F8->U+30F0, U+30F9->U+30F1, U+30FA->U+30F2, U+30AF->U+31F0, U+30B7->U+31F1, U+30B9->U+31F2, U+30C8->U+31F3, U+30CC->U+31F4, U+30CF->U+31F5, U+30D2->U+31F6, U+30D5->U+31F7, U+30D8->U+31F8, U+30DB->U+31F9, U+30E0->U+31FA, \
U+30E9->U+31FB, U+30EA->U+31FC, U+30EB->U+31FD, U+30EC->U+31FE, U+30ED->U+31FF, U+FF66->U+30F2, U+FF67->U+30A1, U+FF68->U+30A3, U+FF69->U+30A5, U+FF6A->U+30A7, U+FF6B->U+30A9, U+FF6C->U+30E3, U+FF6D->U+30E5, U+FF6E->U+30E7, U+FF6F->U+30C3, U+FF71->U+30A1, \
U+FF72->U+30A3, U+FF73->U+30A5, U+FF74->U+30A7, U+FF75->U+30A9, U+FF76->U+30AB, U+FF77->U+30AD, U+FF78->U+30AF, U+FF79->U+30B1, U+FF7A->U+30B3, U+FF7B->U+30B5, U+FF7C->U+30B7, U+FF7D->U+30B9, U+FF7E->U+30BB, U+FF7F->U+30BD, U+FF80->U+30BF, U+FF81->U+30C1, \
U+FF82->U+30C3, U+FF83->U+30C6, U+FF84->U+30C8, U+FF85->U+30CA, U+FF86->U+30CB, U+FF87->U+30CC, U+FF88->U+30CD, U+FF89->U+30CE, U+FF8A->U+30CF, U+FF8B->U+30D2, U+FF8C->U+30D5, U+FF8D->U+30D8, U+FF8E->U+30DB, U+FF8F->U+30DE, U+FF90->U+30DF, U+FF91->U+30E0, \
U+FF92->U+30E1, U+FF93->U+30E2, U+FF94->U+30E3, U+FF95->U+30E5, U+FF96->U+30E7, U+FF97->U+30E9, U+FF98->U+30EA, U+FF99->U+30EB, U+FF9A->U+30EC, U+FF9B->U+30ED, U+FF9C->U+30EF, U+FF9D->U+30F3, U+FFA0->U+3164, U+FFA1->U+3131, U+FFA2->U+3132, U+FFA3->U+3133, \
U+FFA4->U+3134, U+FFA5->U+3135, U+FFA6->U+3136, U+FFA7->U+3137, U+FFA8->U+3138, U+FFA9->U+3139, U+FFAA->U+313A, U+FFAB->U+313B, U+FFAC->U+313C, U+FFAD->U+313D, U+FFAE->U+313E, U+FFAF->U+313F, U+FFB0->U+3140, U+FFB1->U+3141, U+FFB2->U+3142, U+FFB3->U+3143, \
U+FFB4->U+3144, U+FFB5->U+3145, U+FFB6->U+3146, U+FFB7->U+3147, U+FFB8->U+3148, U+FFB9->U+3149, U+FFBA->U+314A, U+FFBB->U+314B, U+FFBC->U+314C, U+FFBD->U+314D, U+FFBE->U+314E, U+FFC2->U+314F, U+FFC3->U+3150, U+FFC4->U+3151, U+FFC5->U+3152, U+FFC6->U+3153, \
U+FFC7->U+3154, U+FFCA->U+3155, U+FFCB->U+3156, U+FFCC->U+3157, U+FFCD->U+3158, U+FFCE->U+3159, U+FFCF->U+315A, U+FFD2->U+315B, U+FFD3->U+315C, U+FFD4->U+315D, U+FFD5->U+315E, U+FFD6->U+315F, U+FFD7->U+3160, U+FFDA->U+3161, U+FFDB->U+3162, U+FFDC->U+3163, \
U+3131->U+1100, U+3132->U+1101, U+3133->U+11AA, U+3134->U+1102, U+3135->U+11AC, U+3136->U+11AD, U+3137->U+1103, U+3138->U+1104, U+3139->U+1105, U+313A->U+11B0, U+313B->U+11B1, U+313C->U+11B2, U+313D->U+11B3, U+313E->U+11B4, U+313F->U+11B5, U+3140->U+111A, \
U+3141->U+1106, U+3142->U+1107, U+3143->U+1108, U+3144->U+1121, U+3145->U+1109, U+3146->U+110A, U+3147->U+110B, U+3148->U+110C, U+3149->U+110D, U+314A->U+110E, U+314B->U+110F, U+314C->U+1110, U+314D->U+1111, U+314E->U+1112, U+314F->U+1161, U+3150->U+1162, \
U+3151->U+1163, U+3152->U+1164, U+3153->U+1165, U+3154->U+1166, U+3155->U+1167, U+3156->U+1168, U+3157->U+1169, U+3158->U+116A, U+3159->U+116B, U+315A->U+116C, U+315B->U+116D, U+315C->U+116E, U+315D->U+116F, U+315E->U+1170, U+315F->U+1171, U+3160->U+1172, \
U+3161->U+1173, U+3162->U+1174, U+3163->U+1175, U+3165->U+1114, U+3166->U+1115, U+3167->U+11C7, U+3168->U+11C8, U+3169->U+11CC, U+316A->U+11CE, U+316B->U+11D3, U+316C->U+11D7, U+316D->U+11D9, U+316E->U+111C, U+316F->U+11DD, U+3170->U+11DF, U+3171->U+111D, \
U+3172->U+111E, U+3173->U+1120, U+3174->U+1122, U+3175->U+1123, U+3176->U+1127, U+3177->U+1129, U+3178->U+112B, U+3179->U+112C, U+317A->U+112D, U+317B->U+112E, U+317C->U+112F, U+317D->U+1132, U+317E->U+1136, U+317F->U+1140, U+3180->U+1147, U+3181->U+114C, \
U+3182->U+11F1, U+3183->U+11F2, U+3184->U+1157, U+3185->U+1158, U+3186->U+1159, U+3187->U+1184, U+3188->U+1185, U+3189->U+1188, U+318A->U+1191, U+318B->U+1192, U+318C->U+1194, U+318D->U+119E, U+318E->U+11A1, U+A490->U+A408, U+A491->U+A1B9, U+4E00..U+9FBB, \
U+3400..U+4DB5, U+20000..U+2A6D6, U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28, U+FA29, U+3105..U+312C, U+31A0..U+31B7, U+3041, U+3043, U+3045, U+3047, U+3049, U+304B, U+304D, U+304F, U+3051, U+3053, U+3055, U+3057, \
U+3059, U+305B, U+305D, U+305F, U+3061, U+3063, U+3066, U+3068, U+306A..U+306F, U+3072, U+3075, U+3078, U+307B, U+307E..U+3083, U+3085, U+3087, U+3089..U+308E, U+3090..U+3093, U+30A1, U+30A3, U+30A5, U+30A7, U+30A9, U+30AD, U+30AF, U+30B3, U+30B5, U+30BB, \
U+30BD, U+30BF, U+30C1, U+30C3, U+30C4, U+30C6, U+30CA, U+30CB, U+30CD, U+30CE, U+30DE, U+30DF, U+30E1, U+30E2, U+30E3, U+30E5, U+30E7, U+30EE, U+30F0..U+30F3, U+30F5, U+30F6, U+31F0, U+31F1, U+31F2, U+31F3, U+31F4, U+31F5, U+31F6, U+31F7, U+31F8, U+31F9, \
U+31FA, U+31FB, U+31FC, U+31FD, U+31FE, U+31FF, U+AC00..U+D7A3, U+1100..U+1159, U+1161..U+11A2, U+11A8..U+11F9, U+A000..U+A48C, U+A492..U+A4C6, U+2C80->U+2C81, U+2C81, U+2C82->U+2C83, U+2C83, U+2C84->U+2C85, U+2C85, U+2C86->U+2C87, U+2C87, U+2C88->U+2C89, \
U+2C89, U+2C8A->U+2C8B, U+2C8B, U+2C8C->U+2C8D, U+2C8D, U+2C8E->U+2C8F, U+2C8F, U+2C90->U+2C91, U+2C91, U+2C92->U+2C93, U+2C93, U+2C94->U+2C95, U+2C95, U+2C96->U+2C97, U+2C97, U+2C98->U+2C99, U+2C99, U+2C9A->U+2C9B, U+2C9B, U+2C9C->U+2C9D, U+2C9D, U+2C9E->U+2C9F, \
U+2C9F, U+2CA0->U+2CA1, U+2CA1, U+2CA2->U+2CA3, U+2CA3, U+2CA4->U+2CA5, U+2CA5, U+2CA6->U+2CA7, U+2CA7, U+2CA8->U+2CA9, U+2CA9, U+2CAA->U+2CAB, U+2CAB, U+2CAC->U+2CAD, U+2CAD, U+2CAE->U+2CAF, U+2CAF, U+2CB0->U+2CB1, U+2CB1, U+2CB2->U+2CB3, U+2CB3, U+2CB4->U+2CB5, \
U+2CB5, U+2CB6->U+2CB7, U+2CB7, U+2CB8->U+2CB9, U+2CB9, U+2CBA->U+2CBB, U+2CBB, U+2CBC->U+2CBD, U+2CBD, U+2CBE->U+2CBF, U+2CBF, U+2CC0->U+2CC1, U+2CC1, U+2CC2->U+2CC3, U+2CC3, U+2CC4->U+2CC5, U+2CC5, U+2CC6->U+2CC7, U+2CC7, U+2CC8->U+2CC9, U+2CC9, U+2CCA->U+2CCB, \
U+2CCB, U+2CCC->U+2CCD, U+2CCD, U+2CCE->U+2CCF, U+2CCF, U+2CD0->U+2CD1, U+2CD1, U+2CD2->U+2CD3, U+2CD3, U+2CD4->U+2CD5, U+2CD5, U+2CD6->U+2CD7, U+2CD7, U+2CD8->U+2CD9, U+2CD9, U+2CDA->U+2CDB, U+2CDB, U+2CDC->U+2CDD, U+2CDD, U+2CDE->U+2CDF, U+2CDF, U+2CE0->U+2CE1, \
U+2CE1, U+2CE2->U+2CE3, U+2CE3, U+0400->U+0435, U+0401->U+0435, U+0402->U+0452, U+0452, U+0403->U+0433, U+0404->U+0454, U+0454, U+0405->U+0455, U+0455, U+0406->U+0456, U+0407->U+0456, U+0457->U+0456, U+0456, U+0408..U+040B->U+0458..U+045B, U+0458..U+045B, \
U+040C->U+043A, U+040D->U+0438, U+040E->U+0443, U+040F->U+045F, U+045F, U+0450->U+0435, U+0451->U+0435, U+0453->U+0433, U+045C->U+043A, U+045D->U+0438, U+045E->U+0443, U+0460->U+0461, U+0461, U+0462->U+0463, U+0463, U+0464->U+0465, U+0465, U+0466->U+0467, \
U+0467, U+0468->U+0469, U+0469, U+046A->U+046B, U+046B, U+046C->U+046D, U+046D, U+046E->U+046F, U+046F, U+0470->U+0471, U+0471, U+0472->U+0473, U+0473, U+0474->U+0475, U+0476->U+0475, U+0477->U+0475, U+0475, U+0478->U+0479, U+0479, U+047A->U+047B, U+047B, \
U+047C->U+047D, U+047D, U+047E->U+047F, U+047F, U+0480->U+0481, U+0481, U+048A->U+0438, U+048B->U+0438, U+048C->U+044C, U+048D->U+044C, U+048E->U+0440, U+048F->U+0440, U+0490->U+0433, U+0491->U+0433, U+0490->U+0433, U+0491->U+0433, U+0492->U+0433, U+0493->U+0433, \
U+0494->U+0433, U+0495->U+0433, U+0496->U+0436, U+0497->U+0436, U+0498->U+0437, U+0499->U+0437, U+049A->U+043A, U+049B->U+043A, U+049C->U+043A, U+049D->U+043A, U+049E->U+043A, U+049F->U+043A, U+04A0->U+043A, U+04A1->U+043A, U+04A2->U+043D, U+04A3->U+043D, \
U+04A4->U+043D, U+04A5->U+043D, U+04A6->U+043F, U+04A7->U+043F, U+04A8->U+04A9, U+04A9, U+04AA->U+0441, U+04AB->U+0441, U+04AC->U+0442, U+04AD->U+0442, U+04AE->U+0443, U+04AF->U+0443, U+04B0->U+0443, U+04B1->U+0443, U+04B2->U+0445, U+04B3->U+0445, U+04B4->U+04B5, \
U+04B5, U+04B6->U+0447, U+04B7->U+0447, U+04B8->U+0447, U+04B9->U+0447, U+04BA->U+04BB, U+04BB, U+04BC->U+04BD, U+04BE->U+04BD, U+04BF->U+04BD, U+04BD, U+04C0->U+04CF, U+04CF, U+04C1->U+0436, U+04C2->U+0436, U+04C3->U+043A, U+04C4->U+043A, U+04C5->U+043B, \
U+04C6->U+043B, U+04C7->U+043D, U+04C8->U+043D, U+04C9->U+043D, U+04CA->U+043D, U+04CB->U+0447, U+04CC->U+0447, U+04CD->U+043C, U+04CE->U+043C, U+04D0->U+0430, U+04D1->U+0430, U+04D2->U+0430, U+04D3->U+0430, U+04D4->U+00E6, U+04D5->U+00E6, U+04D6->U+0435, \
U+04D7->U+0435, U+04D8->U+04D9, U+04DA->U+04D9, U+04DB->U+04D9, U+04D9, U+04DC->U+0436, U+04DD->U+0436, U+04DE->U+0437, U+04DF->U+0437, U+04E0->U+04E1, U+04E1, U+04E2->U+0438, U+04E3->U+0438, U+04E4->U+0438, U+04E5->U+0438, U+04E6->U+043E, U+04E7->U+043E, \
U+04E8->U+043E, U+04E9->U+043E, U+04EA->U+043E, U+04EB->U+043E, U+04EC->U+044D, U+04ED->U+044D, U+04EE->U+0443, U+04EF->U+0443, U+04F0->U+0443, U+04F1->U+0443, U+04F2->U+0443, U+04F3->U+0443, U+04F4->U+0447, U+04F5->U+0447, U+04F6->U+0433, U+04F7->U+0433, \
U+04F8->U+044B, U+04F9->U+044B, U+04FA->U+0433, U+04FB->U+0433, U+04FC->U+0445, U+04FD->U+0445, U+04FE->U+0445, U+04FF->U+0445, U+0410..U+0418->U+0430..U+0438, U+0419->U+0438, U+0430..U+0438, U+041A..U+042F->U+043A..U+044F, U+043A..U+044F, U+0929->U+0928, \
U+0931->U+0930, U+0934->U+0933, U+0958->U+0915, U+0959->U+0916, U+095A->U+0917, U+095B->U+091C, U+095C->U+0921, U+095D->U+0922, U+095E->U+092B, U+095F->U+092F, U+0904..U+0928, U+092A..U+0930, U+0932, U+0933, U+0935..U+0939, U+0960, U+0961, U+0966..U+096F, \
U+097B..U+097F, U+10FC->U+10DC, U+10D0..U+10FA, U+10A0..U+10C5->U+2D00..U+2D25, U+2D00..U+2D25, U+0386->U+03B1, U+0388->U+03B5, U+0389->U+03B7, U+038A->U+03B9, U+038C->U+03BF, U+038E->U+03C5, U+038F->U+03C9, U+0390->U+03B9, U+03AA->U+03B9, U+03AB->U+03C5, \
U+03AC->U+03B1, U+03AD->U+03B5, U+03AE->U+03B7, U+03AF->U+03B9, U+03B0->U+03C5, U+03CA->U+03B9, U+03CB->U+03C5, U+03CC->U+03BF, U+03CD->U+03C5, U+03CE->U+03C9, U+03D0->U+03B2, U+03D1->U+03B8, U+03D2->U+03C5, U+03D3->U+03C5, U+03D4->U+03C5, U+03D5->U+03C6, \
U+03D6->U+03C0, U+03D8->U+03D9, U+03DA->U+03DB, U+03DC->U+03DD, U+03DE->U+03DF, U+03E0->U+03E1, U+03E2->U+03E3, U+03E4->U+03E5, U+03E6->U+03E7, U+03E8->U+03E9, U+03EA->U+03EB, U+03EC->U+03ED, U+03EE->U+03EF, U+03F0->U+03BA, U+03F1->U+03C1, U+03F2->U+03C3, \
U+03F4->U+03B8, U+03F5->U+03B5, U+03F6->U+03B5, U+03F7->U+03F8, U+03F9->U+03C3, U+03FA->U+03FB, U+1F00->U+03B1, U+1F01->U+03B1, U+1F02->U+03B1, U+1F03->U+03B1, U+1F04->U+03B1, U+1F05->U+03B1, U+1F06->U+03B1, U+1F07->U+03B1, U+1F08->U+03B1, U+1F09->U+03B1, \
U+1F0A->U+03B1, U+1F0B->U+03B1, U+1F0C->U+03B1, U+1F0D->U+03B1, U+1F0E->U+03B1, U+1F0F->U+03B1, U+1F10->U+03B5, U+1F11->U+03B5, U+1F12->U+03B5, U+1F13->U+03B5, U+1F14->U+03B5, U+1F15->U+03B5, U+1F18->U+03B5, U+1F19->U+03B5, U+1F1A->U+03B5, U+1F1B->U+03B5, \
U+1F1C->U+03B5, U+1F1D->U+03B5, U+1F20->U+03B7, U+1F21->U+03B7, U+1F22->U+03B7, U+1F23->U+03B7, U+1F24->U+03B7, U+1F25->U+03B7, U+1F26->U+03B7, U+1F27->U+03B7, U+1F28->U+03B7, U+1F29->U+03B7, U+1F2A->U+03B7, U+1F2B->U+03B7, U+1F2C->U+03B7, U+1F2D->U+03B7, \
U+1F2E->U+03B7, U+1F2F->U+03B7, U+1F30->U+03B9, U+1F31->U+03B9, U+1F32->U+03B9, U+1F33->U+03B9, U+1F34->U+03B9, U+1F35->U+03B9, U+1F36->U+03B9, U+1F37->U+03B9, U+1F38->U+03B9, U+1F39->U+03B9, U+1F3A->U+03B9, U+1F3B->U+03B9, U+1F3C->U+03B9, U+1F3D->U+03B9, \
U+1F3E->U+03B9, U+1F3F->U+03B9, U+1F40->U+03BF, U+1F41->U+03BF, U+1F42->U+03BF, U+1F43->U+03BF, U+1F44->U+03BF, U+1F45->U+03BF, U+1F48->U+03BF, U+1F49->U+03BF, U+1F4A->U+03BF, U+1F4B->U+03BF, U+1F4C->U+03BF, U+1F4D->U+03BF, U+1F50->U+03C5, U+1F51->U+03C5, \
U+1F52->U+03C5, U+1F53->U+03C5, U+1F54->U+03C5, U+1F55->U+03C5, U+1F56->U+03C5, U+1F57->U+03C5, U+1F59->U+03C5, U+1F5B->U+03C5, U+1F5D->U+03C5, U+1F5F->U+03C5, U+1F60->U+03C9, U+1F61->U+03C9, U+1F62->U+03C9, U+1F63->U+03C9, U+1F64->U+03C9, U+1F65->U+03C9, \
U+1F66->U+03C9, U+1F67->U+03C9, U+1F68->U+03C9, U+1F69->U+03C9, U+1F6A->U+03C9, U+1F6B->U+03C9, U+1F6C->U+03C9, U+1F6D->U+03C9, U+1F6E->U+03C9, U+1F6F->U+03C9, U+1F70->U+03B1, U+1F71->U+03B1, U+1F72->U+03B5, U+1F73->U+03B5, U+1F74->U+03B7, U+1F75->U+03B7, \
U+1F76->U+03B9, U+1F77->U+03B9, U+1F78->U+03BF, U+1F79->U+03BF, U+1F7A->U+03C5, U+1F7B->U+03C5, U+1F7C->U+03C9, U+1F7D->U+03C9, U+1F80->U+03B1, U+1F81->U+03B1, U+1F82->U+03B1, U+1F83->U+03B1, U+1F84->U+03B1, U+1F85->U+03B1, U+1F86->U+03B1, U+1F87->U+03B1, \
U+1F88->U+03B1, U+1F89->U+03B1, U+1F8A->U+03B1, U+1F8B->U+03B1, U+1F8C->U+03B1, U+1F8D->U+03B1, U+1F8E->U+03B1, U+1F8F->U+03B1, U+1F90->U+03B7, U+1F91->U+03B7, U+1F92->U+03B7, U+1F93->U+03B7, U+1F94->U+03B7, U+1F95->U+03B7, U+1F96->U+03B7, U+1F97->U+03B7, \
U+1F98->U+03B7, U+1F99->U+03B7, U+1F9A->U+03B7, U+1F9B->U+03B7, U+1F9C->U+03B7, U+1F9D->U+03B7, U+1F9E->U+03B7, U+1F9F->U+03B7, U+1FA0->U+03C9, U+1FA1->U+03C9, U+1FA2->U+03C9, U+1FA3->U+03C9, U+1FA4->U+03C9, U+1FA5->U+03C9, U+1FA6->U+03C9, U+1FA7->U+03C9, \
U+1FA8->U+03C9, U+1FA9->U+03C9, U+1FAA->U+03C9, U+1FAB->U+03C9, U+1FAC->U+03C9, U+1FAD->U+03C9, U+1FAE->U+03C9, U+1FAF->U+03C9, U+1FB0->U+03B1, U+1FB1->U+03B1, U+1FB2->U+03B1, U+1FB3->U+03B1, U+1FB4->U+03B1, U+1FB6->U+03B1, U+1FB7->U+03B1, U+1FB8->U+03B1, \
U+1FB9->U+03B1, U+1FBA->U+03B1, U+1FBB->U+03B1, U+1FBC->U+03B1, U+1FC2->U+03B7, U+1FC3->U+03B7, U+1FC4->U+03B7, U+1FC6->U+03B7, U+1FC7->U+03B7, U+1FC8->U+03B5, U+1FC9->U+03B5, U+1FCA->U+03B7, U+1FCB->U+03B7, U+1FCC->U+03B7, U+1FD0->U+03B9, U+1FD1->U+03B9, \
U+1FD2->U+03B9, U+1FD3->U+03B9, U+1FD6->U+03B9, U+1FD7->U+03B9, U+1FD8->U+03B9, U+1FD9->U+03B9, U+1FDA->U+03B9, U+1FDB->U+03B9, U+1FE0->U+03C5, U+1FE1->U+03C5, U+1FE2->U+03C5, U+1FE3->U+03C5, U+1FE4->U+03C1, U+1FE5->U+03C1, U+1FE6->U+03C5, U+1FE7->U+03C5, \
U+1FE8->U+03C5, U+1FE9->U+03C5, U+1FEA->U+03C5, U+1FEB->U+03C5, U+1FEC->U+03C1, U+1FF2->U+03C9, U+1FF3->U+03C9, U+1FF4->U+03C9, U+1FF6->U+03C9, U+1FF7->U+03C9, U+1FF8->U+03BF, U+1FF9->U+03BF, U+1FFA->U+03C9, U+1FFB->U+03C9, U+1FFC->U+03C9, U+0391..U+03A1->U+03B1..U+03C1, \
U+03B1..U+03C1, U+03A3..U+03A9->U+03C3..U+03C9, U+03C3..U+03C9, U+03C2, U+03D9, U+03DB, U+03DD, U+03DF, U+03E1, U+03E3, U+03E5, U+03E7, U+03E9, U+03EB, U+03ED, U+03EF, U+03F3, U+03F8, U+03FB, U+0A85..U+0A8C, U+0A8F, U+0A90, U+0A93..U+0AB0, U+0AB2, U+0AB3, \
U+0AB5..U+0AB9, U+0AE0, U+0AE1, U+0AE6..U+0AEF, U+0A33->U+0A32, U+0A36->U+0A38, U+0A59->U+0A16, U+0A5A->U+0A17, U+0A5B->U+0A1C, U+0A5E->U+0A2B, U+0A05..U+0A0A, U+0A0F, U+0A10, U+0A13..U+0A28, U+0A2A..U+0A30, U+0A32, U+0A35, U+0A38, U+0A39, U+0A5C, U+0A66..U+0A6F, \
U+FB1D->U+05D9, U+FB1F->U+05F2, U+FB20->U+05E2, U+FB21->U+05D0, U+FB22->U+05D3, U+FB23->U+05D4, U+FB24->U+05DB, U+FB25->U+05DC, U+FB26->U+05DD, U+FB27->U+05E8, U+FB28->U+05EA, U+FB2A->U+05E9, U+FB2B->U+05E9, U+FB2C->U+05E9, U+FB2D->U+05E9, U+FB2E->U+05D0, \
U+FB2F->U+05D0, U+FB30->U+05D0, U+FB31->U+05D1, U+FB32->U+05D2, U+FB33->U+05D3, U+FB34->U+05D4, U+FB35->U+05D5, U+FB36->U+05D6, U+FB38->U+05D8, U+FB39->U+05D9, U+FB3A->U+05DA, U+FB3B->U+05DB, U+FB3C->U+05DC, U+FB3E->U+05DE, U+FB40->U+05E0, U+FB41->U+05E1, \
U+FB43->U+05E3, U+FB44->U+05E4, U+FB46->U+05E6, U+FB47->U+05E7, U+FB48->U+05E8, U+FB49->U+05E9, U+FB4A->U+05EA, U+FB4B->U+05D5, U+FB4C->U+05D1, U+FB4D->U+05DB, U+FB4E->U+05E4, U+FB4F->U+05D0, U+05D0..U+05F2, U+0C85..U+0C8C, U+0C8E..U+0C90, U+0C92..U+0CA8, \
U+0CAA..U+0CB3, U+0CB5..U+0CB9, U+0CE0, U+0CE1, U+0CE6..U+0CEF, U+1900..U+191C, U+1930..U+1938, U+1946..U+194F, U+0D05..U+0D0C, U+0D0E..U+0D10, U+0D12..U+0D28, U+0D2A..U+0D39, U+0D60, U+0D61, U+0D66..U+0D6F, U+0B94->U+0B92, U+0B85..U+0B8A, U+0B8E..U+0B90, \
U+0B92, U+0B93, U+0B95, U+0B99, U+0B9A, U+0B9C, U+0B9E, U+0B9F, U+0BA3, U+0BA4, U+0BA8..U+0BAA, U+0BAE..U+0BB9, U+0BE6..U+0BEF, U+0E01..U+0E30, U+0E32, U+0E33, U+0E40..U+0E46, U+0E50..U+0E5B, U+FF10..U+FF19->0..9, U+FF21..U+FF3A->a..z, U+FF41..U+FF5A->a..z, \
0..9, A..Z->a..z, a..z
# ignored characters list
# optional, default value is empty
#
# ignore_chars = U+00AD
# minimum word prefix length to index
# optional, default is 0 (do not index prefixes)
#
# min_prefix_len = 0
# minimum word infix length to index
# optional, default is 0 (do not index infixes)
#
# min_infix_len = 0
# list of fields to limit prefix/infix indexing to
# optional, default value is empty (index all fields in prefix/infix mode)
#
# prefix_fields = filename
# infix_fields = url, domain
# enable star-syntax (wildcards) when searching prefix/infix indexes
# search-time only, does not affect indexing, can be 0 or 1
# optional, default is 0 (do not use wildcard syntax)
#
# enable_star = 1
# expand keywords with exact forms and/or stars when searching fit indexes
# search-time only, does not affect indexing, can be 0 or 1
# optional, default is 0 (do not expand keywords)
#
# expand_keywords = 1
# n-gram length to index, for CJK indexing
# only supports 0 and 1 for now, other lengths to be implemented
# optional, default is 0 (disable n-grams)
#
ngram_len = 1
# n-gram characters list, for CJK indexing
# optional, default is empty
#
ngram_chars = U+4E00..U+9FBB, U+3400..U+4DB5, U+20000..U+2A6D6, U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28, U+FA29, U+3105..U+312C, U+31A0..U+31B7, U+3041, U+3043, U+3045, U+3047, U+3049, U+304B, U+304D, U+304F, U+3051, U+3053, U+3055, U+3057, U+3059, U+305B, U+305D, U+305F, U+3061, U+3063, U+3066, U+3068, U+306A..U+306F, U+3072, U+3075, U+3078, U+307B, U+307E..U+3083, U+3085, U+3087, U+3089..U+308E, U+3090..U+3093, U+30A1, U+30A3, U+30A5, U+30A7, U+30A9, U+30AD, U+30AF, U+30B3, U+30B5, U+30BB, U+30BD, U+30BF, U+30C1, U+30C3, U+30C4, U+30C6, U+30CA, U+30CB, U+30CD, U+30CE, U+30DE, U+30DF, U+30E1, U+30E2, U+30E3, U+30E5, U+30E7, U+30EE, U+30F0..U+30F3, U+30F5, U+30F6, U+31F0, U+31F1, U+31F2, U+31F3, U+31F4, U+31F5, U+31F6, U+31F7, U+31F8, U+31F9, U+31FA, U+31FB, U+31FC, U+31FD, U+31FE, U+31FF, U+AC00..U+D7A3, U+1100..U+1159, U+1161..U+11A2, U+11A8..U+11F9, U+A000..U+A48C, U+A492..U+A4C6
# phrase boundary characters list
# optional, default is empty
#
# phrase_boundary = ., ?, !, U+2026 # horizontal ellipsis
# phrase boundary word position increment
# optional, default is 0
#
# phrase_boundary_step = 100
# blended characters list
# blended chars are indexed both as separators and valid characters
# for instance, AT&T will results in 3 tokens ("at", "t", and "at&t")
# optional, default is empty
#
# blend_chars = +, &, U+23
# blended token indexing mode
# a comma separated list of blended token indexing variants
# known variants are trim_none, trim_head, trim_tail, trim_both, skip_pure
# optional, default is trim_none
#
# blend_mode = trim_tail, skip_pure
# whether to strip HTML tags from incoming documents
# known values are 0 (do not strip) and 1 (do strip)
# optional, default is 0
html_strip = 0
# what HTML attributes to index if stripping HTML
# optional, default is empty (do not index anything)
#
# html_index_attrs = img=alt,title; a=title;
# what HTML elements contents to strip
# optional, default is empty (do not strip element contents)
#
# html_remove_elements = style, script
# whether to preopen index data files on startup
# optional, default is 0 (do not preopen), searchd-only
#
# preopen = 1
# whether to keep dictionary (.spi) on disk, or cache it in RAM
# optional, default is 0 (cache in RAM), searchd-only
#
# ondisk_dict = 1
# whether to enable in-place inversion (2x less disk, 90-95% speed)
# optional, default is 0 (use separate temporary files), indexer-only
#
# inplace_enable = 1
# in-place fine-tuning options
# optional, defaults are listed below
#
# inplace_hit_gap = 0 # preallocated hitlist gap size
# inplace_docinfo_gap = 0 # preallocated docinfo gap size
# inplace_reloc_factor = 0.1 # relocation buffer size within arena
# inplace_write_factor = 0.1 # write buffer size within arena
# whether to index original keywords along with stemmed versions
# enables "=exactform" operator to work
# optional, default is 0
#
# index_exact_words = 1
# position increment on overshort (less that min_word_len) words
# optional, allowed values are 0 and 1, default is 1
#
# overshort_step = 1
# position increment on stopword
# optional, allowed values are 0 and 1, default is 1
#
# stopword_step = 1
# hitless words list
# positions for these keywords will not be stored in the index
# optional, allowed values are 'all', or a list file name
#
# hitless_words = all
# hitless_words = hitless.txt
# detect and index sentence and paragraph boundaries
# required for the SENTENCE and PARAGRAPH operators to work
# optional, allowed values are 0 and 1, default is 0
#
# index_sp = 1
# index zones, delimited by HTML/XML tags
# a comma separated list of tags and wildcards
# required for the ZONE operator to work
# optional, default is empty string (do not index zones)
#
# index_zones = title, h*, th
}
#############################################################################
## searchd settings
#############################################################################
searchd
{
# [hostname:]port[:protocol], or /unix/socket/path to listen on
# known protocols are 'sphinx' (SphinxAPI) and 'mysql41' (SphinxQL)
#
# multi-value, multiple listen points are allowed
# optional, defaults are 9312:sphinx and 9306:mysql41, as below
#
# listen = 127.0.0.1
# listen = 192.168.0.1:9312
# listen = 9312
# listen = /var/run/searchd.sock
listen = %(ip_address)s:%(port)s:sphinx
listen = %(ip_address)s:%(sql_port)s:mysql41
# log file, searchd run info is logged here
# optional, default is 'searchd.log'
log = %(log_directory)s/sphinx-searchd.log
# query log file, all search queries are logged here
# optional, default is empty (do not log queries)
query_log = %(log_directory)s/sphinx-query.log
# client read timeout, seconds
# optional, default is 5
read_timeout = 5
# request timeout, seconds
# optional, default is 5 minutes
client_timeout = 300
# maximum amount of children to fork (concurrent searches to run)
# optional, default is 0 (unlimited)
max_children = 30
# PID file, searchd process ID file name
# mandatory
pid_file = %(data_directory)s/sphinx-searchd.pid
# max amount of matches the daemon ever keeps in RAM, per-index
# WARNING, THERE'S ALSO PER-QUERY LIMIT, SEE SetLimits() API CALL
# default is 1000 (just like Google)
max_matches = 1000
# seamless rotate, prevents rotate stalls if precaching huge datasets
# optional, default is 1
seamless_rotate = 1
# whether to forcibly preopen all indexes on startup
# optional, default is 0 (do not preopen)
preopen_indexes = 0
# whether to unlink .old index copies on succesful rotation.
# optional, default is 1 (do unlink)
unlink_old = 1
# attribute updates periodic flush timeout, seconds
# updates will be automatically dumped to disk this frequently
# optional, default is 0 (disable periodic flush)
#
# attr_flush_period = 900
# instance-wide ondisk_dict defaults (per-index value take precedence)
# optional, default is 0 (precache all dictionaries in RAM)
#
# ondisk_dict_default = 1
# MVA updates pool size
# shared between all instances of searchd, disables attr flushes!
# optional, default size is 1M
mva_updates_pool = 1M
# max allowed network packet size
# limits both query packets from clients, and responses from agents
# optional, default size is 8M
max_packet_size = 8M
# crash log path
# searchd will (try to) log crashed query to 'crash_log_path.PID' file
# optional, default is empty (do not create crash logs)
#
# crash_log_path = %(log_directory)s
# max allowed per-query filter count
# optional, default is 256
max_filters = 256
# max allowed per-filter values count
# optional, default is 4096
max_filter_values = 4096
# socket listen queue length
# optional, default is 5
#
# listen_backlog = 5
# per-keyword read buffer size
# optional, default is 256K
#
# read_buffer = 256K
# unhinted read size (currently used when reading hits)
# optional, default is 32K
#
# read_unhinted = 32K
# max allowed per-batch query count (aka multi-query count)
# optional, default is 32
max_batch_queries = 32
# max common subtree document cache size, per-query
# optional, default is 0 (disable subtree optimization)
#
# subtree_docs_cache = 4M
# max common subtree hit cache size, per-query
# optional, default is 0 (disable subtree optimization)
#
# subtree_hits_cache = 8M
# multi-processing mode (MPM)
# known values are none, fork, prefork, and threads
# optional, default is fork
#
workers = threads # for RT to work
# max threads to create for searching local parts of a distributed index
# optional, default is 0, which means disable multi-threaded searching
# should work with all MPMs (ie. does NOT require workers=threads)
#
# dist_threads = 4
# binlog files path; use empty string to disable binlog
# optional, default is build-time configured data directory
#
binlog_path = # disable logging
# binlog_path = %(data_directory)s # binlog.001 etc will be created there
# binlog flush/sync mode
# 0 means flush and sync every second
# 1 means flush and sync every transaction
# 2 means flush every transaction, sync every second
# optional, default is 2
#
# binlog_flush = 2
# binlog per-file size limit
# optional, default is 128M, 0 means no limit
#
# binlog_max_log_size = 256M
}
# ZEO configuration file generated by SlapOS
<zeo>
address %(zeo_ip)s:%(zeo_port)s
read-only false
invalidation-queue-size 100
pid-filename %(zeo_pid)s
</zeo>
......@@ -10,6 +8,7 @@
<eventlog>
<logfile>
dateformat
path %(zeo_event_log)s
</logfile>
</eventlog>
<zodb_db %(storage_name)s>
cache-size %(zodb_cache_size)d
mount-point %(mount_point)s
<zeoclient>
cache-size %(zeo_client_cache_size)s
server %(address)s
storage %(storage_name)s
name %(storage_name)s
......
<zodb_db root>
cache-size %(zodb_cache_size)d
<filestorage>
path %(zodb_root_path)s
</filestorage>
......
......@@ -7,10 +7,8 @@ instancehome $INSTANCE
# Used products
%(products)s
# Environment override
<environment>
%(environment)s
</environment>
# Environment is setup in running wrapper script
# Reason: zope.conf is read too late for some componets
# No need to debug
debug-mode off
......@@ -34,11 +32,13 @@ lock-filename %(lock-filename)s
# Logging configuration
<eventlog>
<logfile>
dateformat
path %(event_log)s
</logfile>
</eventlog>
<logger access>
<logfile>
dateformat
path %(z2_log)s
</logfile>
</logger>
......
......@@ -37,6 +37,9 @@ import hashlib
class Recipe(BaseSlapRecipe):
# To avoid magic numbers
VNC_BASE_PORT = 5900
def _install(self):
"""
Set the connection dictionnary for the computer partition and create a list
......@@ -54,15 +57,30 @@ class Recipe(BaseSlapRecipe):
self.ca_conf = self.installCertificateAuthority()
self.key_path, self.certificate_path = self.requestCertificate('noVNC')
# Install the socket_connection_attempt script
catcher = zc.buildout.easy_install.scripts(
[('check_port_listening', __name__ + 'socket_connection_attempt', 'connection_attempt')],
self.ws,
sys.executable,
self.bin_directory,
)
# Save the check_port_listening script path
check_port_listening_script = catcher[0]
# Get the port_listening_promise template path, and save it
self.port_listening_promise_path = pkg_resources.resource_filename(
__name__, 'template/port_listening_promise.in')
self.port_listening_promise_conf = dict(
check_port_listening_script=check_port_listening_script,
)
kvm_conf = self.installKvm(vnc_ip = self.getLocalIPv4Address())
vnc_port = 5900 + kvm_conf['vnc_display']
vnc_port = Recipe.VNC_BASE_PORT + kvm_conf['vnc_display']
noVNC_conf = self.installNoVnc(source_ip = self.getGlobalIPv6Address(),
source_port = 6080,
target_ip = kvm_conf['vnc_ip'],
target_port = vnc_port,
python_path = kvm_conf['python_path'])
target_port = vnc_port)
self.linkBinary()
self.computer_partition.setConnectionDict(dict(
......@@ -137,8 +155,7 @@ class Recipe(BaseSlapRecipe):
# Instanciate KVM
kvm_template_location = pkg_resources.resource_filename(
__name__, os.path.join(
'template', 'kvm_run.in'))
__name__, 'template/kvm_run.in')
kvm_runner_path = self.createRunningWrapper("kvm",
self.substituteTemplate(kvm_template_location,
......@@ -148,9 +165,7 @@ class Recipe(BaseSlapRecipe):
# Instanciate KVM controller
kvm_controller_template_location = pkg_resources.resource_filename(
__name__, os.path.join(
'template',
'kvm_controller_run.in' ))
__name__, 'template/kvm_controller_run.in')
kvm_controller_runner_path = self.createRunningWrapper("kvm_controller",
self.substituteTemplate(kvm_controller_template_location,
......@@ -165,10 +180,20 @@ class Recipe(BaseSlapRecipe):
##slapreport_runner_path = self.instanciate_wrapper("slapreport",
# [database_path, python_path])
# Add VNC promise
self.port_listening_promise_conf.update(
hostname=kvm_conf['vnc_ip'],
port=Recipe.VNC_BASE_PORT + kvm_conf['vnc_display'],
)
self.createPromiseWrapper("vnc_promise",
self.substituteTemplate(self.port_listening_promise_path,
self.port_listening_promise_conf,
)
)
return kvm_conf
def installNoVnc(self, source_ip, source_port, target_ip, target_port,
python_path):
def installNoVnc(self, source_ip, source_port, target_ip, target_port):
"""
Create noVNC configuration dictionnary and instanciate Websockify proxy
......@@ -184,11 +209,17 @@ class Recipe(BaseSlapRecipe):
noVNC_conf['source_ip'] = source_ip
noVNC_conf['source_port'] = source_port
# Install numpy.
# XXX-Cedric : this looks like a hack. Do we have better solution, knowing
# That websockify is not an egg?
numpy = zc.buildout.easy_install.install(['numpy'], self.options['eggs-directory'])
environment = dict(PYTHONPATH='%s' % numpy.entries[0])
# Instanciate Websockify
websockify_runner_path = zc.buildout.easy_install.scripts([('websockify',
'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws,
'slapos.recipe.librecipe.execute', 'executee_wait')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
[python_path.strip(),
[sys.executable.strip(),
self.options['websockify_path'],
'--web',
self.options['noVNC_location'],
......@@ -197,11 +228,22 @@ class Recipe(BaseSlapRecipe):
'--ssl-only',
'%s:%s' % (source_ip, source_port),
'%s:%s' % (target_ip, target_port)],
[self.certificate_path, self.key_path]]
[self.certificate_path, self.key_path],
environment]
)[0]
self.path_list.append(websockify_runner_path)
# Add noVNC promise
self.port_listening_promise_conf.update(hostname=noVNC_conf['source_ip'],
port=noVNC_conf['source_port'],
)
self.createPromiseWrapper("novnc_promise",
self.substituteTemplate(self.port_listening_promise_path,
self.port_listening_promise_conf,
)
)
return noVNC_conf
def linkBinary(self):
......
import socket
import sys
def connection_attempt():
try:
hostname, port = sys.argv[1:3]
except ValueError:
print >> sys.stderr, """Bad command line.
Usage: %s hostname|ip port""" % sys.argv[0]
sys.exit(1)
connection_okay = False
try:
s = socket.create_connection((hostname, port))
connection_okay = True
s.close()
except (socket.error, socket.timeout):
connection_okay = False
if not connection_okay:
print >> sys.stderr, "%(port)s on %(ip)s isn't listening" % {
'port': port, 'ip': hostname
}
sys.exit(127)
#!/usr/bin/env sh
"%(check_port_listening_script)s" "%(hostname)s" "%(port)s"
exit $?
......@@ -31,8 +31,13 @@ import pkg_resources
import zc.buildout
import sys
import zc.recipe.egg
import urlparse
class BaseRecipe(BaseSlapRecipe):
def getTemplateFilename(self, template_name):
return pkg_resources.resource_filename(__name__,
'template/%s' % template_name)
def installMysqlServer(self, ip=None, port=None):
if ip is None:
ip = self.getLocalIPv4Address()
......@@ -124,7 +129,7 @@ class BaseRecipe(BaseSlapRecipe):
self.path_list.append(config_file)
self.path_list.append(self.createConfigurationFile('php.ini',
self.substituteTemplate(pkg_resources.resource_filename(__name__,
'template/php.ini.in'), {})))
'template/php.ini.in'), dict(tmp_directory=self.tmp_directory))))
self.path_list.extend(zc.buildout.easy_install.scripts([(
'httpd',
__name__ + '.apache', 'runApache')], self.ws,
......@@ -179,28 +184,60 @@ class Request(BaseRecipe):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
software_type = self.parameter_dict['slap_software_type']
if software_type == 'RootSoftwareInstance':
document_root = self.createDataDirectory('htdocs')
self.createHtdocs(self.options['source'].strip(), document_root)
mysql = self.request(self.software_release_url, 'MySQL Server', 'mysql')
mysql_conf = dict(
mysql_host=mysql.getConnectionParameter('mysql_host'),
mysql_port=mysql.getConnectionParameter('mysql_port'),
mysql_user=mysql.getConnectionParameter('mysql_user'),
mysql_password=mysql.getConnectionParameter('mysql_password'),
mysql_database=mysql.getConnectionParameter('mysql_database'),
)
if software_type == 'Backuped':
davstorage = self.request(self.options['davstorage-software-url'],
software_type, 'Backup Server').getConnectionParameter('url')
parameters = {'remote_backup': davstorage}
elif software_type == 'PersonnalBackup':
parameters = {'remote_backup': self.parameter_dict['remote_backup']}
else:
parameters = {}
mysql = self.request(self.options['mariadb-software-url'],
software_type, 'MariaDB Server', partition_parameter_kw=parameters
).getConnectionParameter('url')
mysql_parsed = urlparse.urlparse(mysql)
mysql_host, mysql_port = mysql_parsed.hostname, mysql_parsed.port
if mysql_parsed.scheme == 'mysqls': # Listen over stunnel
mysql_host, mysql_port = self.installStunnelClient(mysql_host,
mysql_port)
mysql_conf = dict(mysql_database=mysql_parsed.path.strip('/'),
mysql_user=mysql_parsed.username,
mysql_password=mysql_parsed.password,
mysql_host='%s:%s' % (mysql_host,mysql_port))
url = self.installApache(document_root)
self.setConnectionDict(dict(
url=url,
))
self.createConfiguration(self.options['template'], document_root,
self.options['configuration'], mysql_conf)
elif software_type == 'MySQL Server':
mysql_conf = self.installMysqlServer()
self.setConnectionDict(dict(
**mysql_conf
))
else:
raise zc.buildout.UserError('Uknown software type %r' % software_type)
return self.path_list
def installStunnelClient(self, remote_host, remote_port):
local_host = self.getLocalIPv4Address()
local_port = 8888
stunnel_conf_path = self.createConfigurationFile('stunnel.conf',
self.substituteTemplate(
self.getTemplateFilename('stunnel.conf.in'), {
'log': os.path.join(self.log_directory, 'stunnel.log'),
'pid_file': os.path.join(self.run_directory, 'stunnel.pid'),
'remote_host': remote_host, 'remote_port': remote_port,
'local_host': local_host, 'local_port': local_port,
}))
wrapper = zc.buildout.easy_install.scripts([('stunnel',
'slapos.recipe.librecipe.execute', 'execute')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
self.options['stunnel_binary'].strip(), stunnel_conf_path]
)[0]
self.path_list.append(wrapper)
return (local_host, local_port,)
......@@ -53,3 +53,4 @@ LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
LoadModule alias_module modules/mod_alias.so
[PHP]
engine = On
safe_mode = Off
expose_php = On
error_reporting = E_ALL | E_STRICT
expose_php = Off
error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING)
display_errors = On
display_startup_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
session.save_path = "%(tmp_directory)s"
session.auto_start = 0
date.timezone = Europe/Paris
file_uploads = On
upload_max_filesize = 8M
post_max_size = 8M
magic_quotes_gpc=0ff
foreground = yes
output = %(log)s
pid = %(pid_file)s
syslog = no
[service]
client = yes
accept = %(local_host)s:%(local_port)s
connect = %(remote_host)s:%(remote_port)s
......@@ -33,6 +33,8 @@ from hashlib import md5
import stat
import netaddr
import time
import re
import urlparse
class BaseSlapRecipe:
"""Base class for all slap.recipe.*"""
......@@ -60,6 +62,7 @@ class BaseSlapRecipe:
'xml_report')
self.destroy_script_location = os.path.join(self, self.work_directory,
'sbin', 'destroy')
self.promise_directory = os.path.join(self.etc_directory, 'promise')
# default directory structure information
self.default_directory_list = [
......@@ -71,6 +74,7 @@ class BaseSlapRecipe:
self.etc_directory, # CP/etc - configuration container
self.wrapper_directory, # CP/etc/run - for wrappers
self.wrapper_report_directory, # CP/etc/report - for report wrappers
self.promise_directory, # CP/etc/promise - for promise checking scripts
self.var_directory, # CP/var - partition "internal" container for logs,
# and another metadata
self.wrapper_xml_report_directory, # CP/var/xml_report - for xml_report wrappers
......@@ -81,12 +85,12 @@ class BaseSlapRecipe:
# SLAP related information
slap_connection = buildout['slap_connection']
self.computer_id=slap_connection['computer_id']
self.computer_partition_id=slap_connection['partition_id']
self.server_url=slap_connection['server_url']
self.software_release_url=slap_connection['software_release_url']
self.key_file=slap_connection.get('key_file')
self.cert_file=slap_connection.get('cert_file')
self.computer_id = slap_connection['computer_id']
self.computer_partition_id = slap_connection['partition_id']
self.server_url = slap_connection['server_url']
self.software_release_url = slap_connection['software_release_url']
self.key_file = slap_connection.get('key_file')
self.cert_file = slap_connection.get('cert_file')
# setup egg to give possibility to generate scripts
self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options)
......@@ -243,3 +247,45 @@ class BaseSlapRecipe:
def _install(self):
"""Hook which shall be implemented in children class"""
raise NotImplementedError('Shall be implemented by subclass')
def createPromiseWrapper(self, promise_name, file_content):
"""Create a promise wrapper.
This wrapper aim to check if the software release is doing its job.
Return the promise file path.
"""
promise_path = os.path.join(self.promise_directory, promise_name)
self._writeExecutable(promise_path, file_content)
return promise_path
def setConnectionUrl(self, scheme, host, path='', params='', query='',
fragment='', port=None, auth=None):
"""Set the ConnectionDict to a dict with only one Universal Resource
Locator.
auth can be either a login string or a tuple (login, password).
"""
# XXX-Antoine: I didn't find any standard module to join an url with
# login, password, ipv6 host and port.
# So instead of copy and past in every recipe I factorized it right here.
netloc = ''
if auth is not None:
auth = tuple(auth)
netloc = str(auth[0]) # Login
if len(auth) > 1:
netloc += ':%s' % auth[1] # Password
netloc += '@'
# host is an ipv6 address whithout brackets
if ':' in host and not re.match(r'^\[.*\]$', host):
netloc += '[%s]' % host
else:
netloc += str(host)
if port is not None:
netloc += ':%s' % port
url = urlparse.urlunparse((scheme, netloc, path, params, query, fragment))
self.setConnectionDict(dict(url=url))
......@@ -39,6 +39,25 @@ def executee(args):
env[k] = v
os.execve(exec_list[0], exec_list + sys.argv[1:], env)
def executee_wait(args):
"""Portable execution with process replacement and environment manipulation"""
exec_list = list(args[0])
file_list = list(args[1])
environment = args[2]
env = os.environ.copy()
for k,v in environment.iteritems():
env[k] = v
sleep = 60
while True:
ready = True
for f in file_list:
if not os.path.exists(f):
print 'File %r does not exists, sleeping for %s' % (f, sleep)
ready = False
if ready:
break
time.sleep(sleep)
os.execve(exec_list[0], exec_list + sys.argv[1:], env)
def sig_handler(signal, frame):
print 'Received signal %r, killing children and exiting' % signal
......
......@@ -31,13 +31,20 @@ import pkg_resources
import sys
import zc.buildout
import ConfigParser
import re
class Recipe(BaseSlapRecipe):
def getTemplateFilename(self, template_name):
return pkg_resources.resource_filename(__name__,
'template/%s' % template_name)
def parseCmdArgument(self, arg):
if any([(i in arg) for i in ["'", ' ', "\\"]]):
return "'%s'" % re.sub(r"(\\|\')", r'\\\1', arg)
return arg
def _install(self):
self.software_type = self.parameter_dict['slap_software_type']
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
......@@ -46,6 +53,7 @@ class Recipe(BaseSlapRecipe):
self.logrotate_d, self.logrotate_backup = self.installLogrotate()
mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678)
self.mysql_backup_directory = mysql_conf['backup_directory']
ca_conf = self.installCertificateAuthority()
key, certificate = self.requestCertificate('MySQL')
......@@ -56,13 +64,12 @@ class Recipe(BaseSlapRecipe):
ca_conf['certificate_authority_path'])
self.linkBinary()
self.setConnectionDict(dict(
stunnel_ip = stunnel_conf['public_ip'],
stunnel_port = stunnel_conf['public_port'],
mysql_database = mysql_conf['mysql_database'],
mysql_user = mysql_conf['mysql_user'],
mysql_password = mysql_conf['mysql_password'],
))
self.setConnectionUrl(scheme='mysqls',
host=stunnel_conf['public_ip'],
port=stunnel_conf['public_port'],
auth=(mysql_conf['mysql_user'],
mysql_conf['mysql_password']),
path=mysql_conf['mysql_database'])
return self.path_list
def linkBinary(self):
......@@ -134,7 +141,6 @@ class Recipe(BaseSlapRecipe):
def installCertificateAuthority(self, ca_country_code='XX',
ca_email='xx@example.com', ca_state='State', ca_city='City',
ca_company='Company'):
backup_path = self.createBackupDirectory('ca')
self.ca_dir = os.path.join(self.data_root_directory, 'ca')
self._createDirectory(self.ca_dir)
self.ca_request_dir = os.path.join(self.ca_dir, 'requests')
......@@ -175,15 +181,6 @@ class Recipe(BaseSlapRecipe):
crl=os.path.join(self.ca_crl),
request_dir=self.ca_request_dir
)]))
# configure backup
backup_cron = os.path.join(self.cron_d, 'ca_rdiff_backup')
open(backup_cron, 'w').write(
'''0 0 * * * %(rdiff_backup)s %(source)s %(destination)s'''%dict(
rdiff_backup=self.options['rdiff_backup_binary'],
source=self.ca_dir,
destination=backup_path))
self.path_list.append(backup_cron)
return dict(
ca_certificate=os.path.join(config['ca_dir'], 'cacert.pem'),
ca_crl=os.path.join(config['ca_dir'], 'crl'),
......@@ -223,6 +220,7 @@ class Recipe(BaseSlapRecipe):
stunnel_conf_path = self.createConfigurationFile("stunnel.conf",
self.substituteTemplate(template_filename,
stunnel_conf))
self.path_list.append(stunnel_conf_path)
wrapper = zc.buildout.easy_install.scripts([('stunnel',
'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
......@@ -267,16 +265,11 @@ class Recipe(BaseSlapRecipe):
mysql_conf))
mysql_script_list = []
for x_database, x_user, x_password in \
[(mysql_conf['mysql_database'],
mysql_conf['mysql_user'],
mysql_conf['mysql_password']),
]:
mysql_script_list.append(pkg_resources.resource_string(__name__,
'template/initmysql.sql.in') % {
'mysql_database': x_database,
'mysql_user': x_user,
'mysql_password': x_password})
'mysql_database': mysql_conf['mysql_database'],
'mysql_user': mysql_conf['mysql_user'],
'mysql_password': mysql_conf['mysql_password']})
mysql_script_list.append('EXIT')
mysql_script = '\n'.join(mysql_script_list)
self.path_list.extend(zc.buildout.easy_install.scripts([('mysql_update',
......@@ -301,35 +294,60 @@ class Recipe(BaseSlapRecipe):
# backup configuration
backup_directory = self.createBackupDirectory('mysql')
full_backup = os.path.join(backup_directory, 'full')
incremental_backup = os.path.join(backup_directory, 'incremental')
self._createDirectory(full_backup)
self._createDirectory(incremental_backup)
innobackupex_argument_list = [self.options['perl_binary'],
self.options['innobackupex_binary'],
'--defaults-file=%s' % mysql_conf_path,
'--socket=%s' %mysql_conf['socket'].strip(), '--user=root']
environment = dict(PATH='%s' % self.bin_directory)
innobackupex_incremental = zc.buildout.easy_install.scripts([(
'innobackupex_incremental', 'slapos.recipe.librecipe.execute', 'executee')],
self.ws, sys.executable, self.bin_directory, arguments=[
innobackupex_argument_list + ['--incremental'],
environment])[0]
self.path_list.append(innobackupex_incremental)
innobackupex_full = zc.buildout.easy_install.scripts([('innobackupex_full',
'slapos.recipe.librecipe.execute', 'executee')], self.ws,
sys.executable, self.bin_directory, arguments=[
innobackupex_argument_list,
environment])[0]
self.path_list.append(innobackupex_full)
backup_controller = zc.buildout.easy_install.scripts([
('innobackupex_controller', __name__ + '.innobackupex', 'controller')],
self.ws, sys.executable, self.bin_directory,
arguments=[innobackupex_incremental, innobackupex_full, full_backup,
incremental_backup])[0]
self.path_list.append(backup_controller)
tmp_backup_directory = self.createBackupDirectory('mysql_pending')
mysqldump_cmdline_list = [self.options['mysqldump_binary'],
mysql_conf['mysql_database'],
'-u', 'root',
'-S', mysql_conf['socket'].strip(),
'--single-transaction', '--opt',
]
mysqldump_cmdline_str = ' '.join(
[self.parseCmdArgument(arg) for arg in mysqldump_cmdline_list]
)
dump_filename = 'dump.sql.gz'
dump_file = os.path.join(backup_directory, dump_filename)
tmpdump_file = os.path.join(tmp_backup_directory, dump_filename)
mysql_backup_cron = os.path.join(self.cron_d, 'mysql_backup')
open(mysql_backup_cron, 'w').write('0 0 * * * ' + backup_controller)
with open(mysql_backup_cron, 'w') as file_:
file_.write('0 0 * * * %(mysqldump)s | %(gzip)s > %(tmpdump)s' \
'&& mv -f %(tmpdump)s %(dumpfile)s' % {
'mysqldump': mysqldump_cmdline_str,
'gzip': self.options['gzip_binary'],
'tmpdump': self.parseCmdArgument(tmpdump_file),
'dumpfile': self.parseCmdArgument(dump_file),
}
)
self.path_list.append(mysql_backup_cron)
mysql_conf.update(backup_directory=backup_directory)
# Remote backup
if self.software_type in ['Backuped', 'Recover']:
remote_url = self.parameter_dict['remote_backup']
remote_backup_bin = zc.buildout.easy_install.scripts([('remote_backup',
'slapos.recipe.librecipe.execute', 'execute')], self.ws,
sys.executable, self.bin_directory, arguments=[
self.options['duplicity_binary'], '--no-encryption',
backup_directory, remote_url]
)[0]
self.path_list.append(remote_backup_bin)
remote_backup_cron = os.path.join(self.cron_d, 'remote_backup')
self.path_list.append(remote_backup_cron)
with open(remote_backup_cron, 'w') as file_:
file_.write('1 0 * * * %s' % self.parseCmdArgument(
remote_backup_bin))
if self.software_type == 'Recover':
zc.buildout.easy_install.scripts([('import_backup',
__name__+'.recover', 'import_remote_dump')], self.ws,
sys.executable, self.wrapper_directory, arguments={
'lock_file': os.path.join(self.work_directory,
'import_done'),
'database': mysql_conf['mysql_database'],
'mysql_binary': self.options['mysql_binary'],
'mysql_socket': mysql_conf['socket'],
'duplicity_binary': self.options['duplicity_binary'],
'remote_backup': remote_url,
'local_directory': backup_directory,
'dump_name': dump_filename,
'zcat_binary': self.options['zcat_binary'],
})
# The return could be more explicit database, user ...
return mysql_conf
import os
import sys
import time
def catdatefile(args):
directory = args[0]
try:
suffix = args[1]
except IndexError:
suffix = '.log'
f = open(os.path.join(directory,
time.strftime('%Y-%m-%d.%H:%M.%s') + suffix), 'aw')
for line in sys.stdin.read():
f.write(line)
f.close()
......@@ -16,8 +16,8 @@ def runMysql(args):
# XXX: Protect with proper root password
# XXX: Follow http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
popen = subprocess.Popen([conf['mysql_install_binary'],
'--skip-name-resolve', '--no-defaults', '--datadir=%s' %
conf['data_directory']],
'--skip-name-resolve', '--skip-host-cache', '--no-defaults',
'--datadir=%s' % conf['data_directory']],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = popen.communicate()[0]
if popen.returncode is None or popen.returncode != 0:
......
import sys
import os
import time
import subprocess
def import_remote_dump(kwargs):
# Get data from kwargs
lock_file = kwargs['lock_file']
database = kwargs['database']
mysql_binary = kwargs['mysql_binary']
mysql_socket = kwargs['mysql_socket']
duplicity_binary = kwargs['duplicity_binary']
remote_backup = kwargs['remote_backup']
local_directory = kwargs['local_directory']
dump_name = kwargs['dump_name']
zcat_binary = kwargs['zcat_binary']
# The script start really here
if os.path.exists(lock_file):
sys.exit(127)
while subprocess.call([mysql_binary, '--socket=%s' % mysql_socket,
'-u', 'root', '-e', 'use %s;' % database]) != 0:
time.sleep(10)
subprocess.check_call([duplicity_binary, 'restore', '--no-encryption',
remote_backup, local_directory])
zcat = subprocess.Popen([zcat_binary, os.path.join(local_directory,
dump_name)],
stdout=subprocess.PIPE)
mysql = subprocess.Popen([mysql_binary, '--socket=%s' % mysql_socket,
'-D', database, '-u', 'root'],
stdin=zcat.stdout)
zcat.stdout.close()
returncode = mysql.poll()
if returncode == 0:
open(lock_file, 'w').close() # Just a touch
sys.exit(returncode)
......@@ -34,58 +34,6 @@ class Recipe(slapos.recipe.erp5.Recipe):
default_bt5_list = []
def installKeyAuthorisationApache(self, ip, port, backend, key, certificate,
ca_conf, key_auth_path='/erp5/portal_slap'):
ssl_template = """SSLEngine on
SSLVerifyClient require
RequestHeader set REMOTE_USER %%{SSL_CLIENT_S_DN_CN}s
SSLCertificateFile %(key_auth_certificate)s
SSLCertificateKeyFile %(key_auth_key)s
SSLCACertificateFile %(ca_certificate)s
SSLCARevocationPath %(ca_crl)s"""
apache_conf = self._getApacheConfigurationDict('key_auth_apache', ip, port)
apache_conf['ssl_snippet'] = ssl_template % dict(
key_auth_certificate=certificate,
key_auth_key=key,
ca_certificate=ca_conf['ca_certificate'],
ca_crl=ca_conf['ca_crl']
)
prefix = 'ssl_key_auth_apache'
rewrite_rule_template = \
"RewriteRule (.*) http://%(backend)s%(key_auth_path)s$1 [L,P]"
path_template = pkg_resources.resource_string('slapos.recipe.erp5',
'template/apache.zope.conf.path.in')
path = path_template % dict(path='/')
d = dict(
path=path,
backend=backend,
backend_path='/',
port=apache_conf['port'],
vhname=path.replace('/', ''),
key_auth_path=key_auth_path,
)
rewrite_rule = rewrite_rule_template % d
apache_conf.update(**dict(
path_enable=path,
rewrite_rule=rewrite_rule
))
apache_config_file = self.createConfigurationFile(prefix + '.conf',
pkg_resources.resource_string('slapos.recipe.erp5',
'template/apache.zope.conf.in') % apache_conf)
self.path_list.append(apache_config_file)
self.path_list.extend(zc.buildout.easy_install.scripts([(
'key_auth_apache',
'slapos.recipe.erp5.apache', 'runApache')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
dict(
required_path_list=[certificate, key, ca_conf['ca_certificate'],
ca_conf['ca_crl']],
binary=self.options['httpd_binary'],
config=apache_config_file
)
]))
return 'https://%(ip)s:%(port)s' % apache_conf
def _getZeoClusterDict(self):
site_path = '/erp5/'
return {
......@@ -119,8 +67,8 @@ SSLCARevocationPath %(ca_crl)s"""
self.getTemplateFilename('zope-zeo-snippet.conf.in'), dict(
storage_name=storage_dict['storage_name'],
address='%s:%s' % (storage_dict['ip'], storage_dict['port']),
mount_point=mount_point
)))
mount_point=mount_point, zodb_cache_size=self.zodb_cache_size,
zeo_client_cache_size=self.zeo_client_cache_size)))
tidstorage_config = dict(host=self.getLocalIPv4Address(), port='6001')
zodb_configuration_string = '\n'.join(zodb_configuration_list)
zope_port = 12000
......@@ -150,9 +98,15 @@ SSLCARevocationPath %(ca_crl)s"""
login_url_list)
apache_login = self.installBackendApache(self.getGlobalIPv6Address(), 15000,
login_haproxy, backend_key, backend_certificate)
# Install Frontend
frontend_domain_name = self.parameter_dict.get("domain_name", 'vifib')
frontend_key, frontend_certificate = \
self.requestCertificate(frontend_domain_name)
apache_frontend_login = self.installFrontendZopeApache(
self.getGlobalIPv6Address(), 4443, 'vifib', '/',
apache_login, '/', backend_key, backend_certificate)
self.getGlobalIPv6Address(), 4443, frontend_domain_name, '/',
apache_login, '', frontend_key, frontend_certificate)
# Four Web Service Nodes (Machine access)
service_url_list = []
for i in (1, 2, 3, 4):
......@@ -166,9 +120,9 @@ SSLCARevocationPath %(ca_crl)s"""
key_auth_key, key_auth_certificate = self.requestCertificate(
'Key Based Access')
apache_keyauth = self.installKeyAuthorisationApache(
self.getLocalIPv4Address(), 15500, service_haproxy, key_auth_key,
key_auth_certificate, ca_conf, key_auth_path=self.key_auth_path)
apache_keyauth = self.installKeyAuthorisationApache(False, 15500,
service_haproxy, key_auth_key, key_auth_certificate, ca_conf,
key_auth_path=self.key_auth_path)
memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(),
port=11000)
kumo_conf = self.installKumo(self.getLocalIPv4Address())
......@@ -179,7 +133,7 @@ SSLCARevocationPath %(ca_crl)s"""
# Connect direct to Zope to create the instance.
self.installERP5Site(user, password, service_url_list[-1], mysql_conf,
conversion_server_conf, memcached_conf, kumo_conf,
self.site_id, self.default_bt5_list)
self.site_id, self.default_bt5_list, ca_conf)
self.setConnectionDict(dict(
front_end_url=apache_frontend_login,
......@@ -191,12 +145,6 @@ SSLCARevocationPath %(ca_crl)s"""
kumo_url=kumo_conf['kumo_address'],
conversion_server_url='%(conversion_server_ip)s:%(conversion_server_port)s' %
conversion_server_conf,
# openssl binary might be removed, as soon as CP environment will be
# fully controlled
openssl_binary=self.options['openssl_binary'],
# As soon as there would be Vifib ERP5 configuration and possibility to
# call it over the network this can be removed
certificate_authority_path=ca_conf['certificate_authority_path'],
# as installERP5Site is not trusted (yet) and this recipe is production
# ready expose more information
mysql_url='%(mysql_database)s@%(ip)s:%(tcp_port)s %(mysql_user)s %(mysql_password)s' % mysql_conf,
......@@ -213,13 +161,14 @@ SSLCARevocationPath %(ca_crl)s"""
user, password = self.installERP5()
zodb_dir = os.path.join(self.data_root_directory, 'zodb')
self._createDirectory(zodb_dir)
zodb_root_path = os.path.join(zodb_dir, 'root.fs')
zodb_root_path = os.path.join(zodb_dir, 'main.fs')
ip = self.getLocalIPv4Address()
zope_port = '18080'
zope_access = self.installZope(ip, zope_port, 'zope_development',
zodb_configuration_string=self.substituteTemplate(
self.getTemplateFilename('zope-zodb-snippet.conf.in'),
dict(zodb_root_path=zodb_root_path)),
dict(zodb_root_path=zodb_root_path,
zodb_cache_size=self.zodb_cache_size)),
thread_amount=8, with_timerservice=True)
service_haproxy = self.installHaproxy(ip, 15000, 'service',
self.site_check_path, [zope_access])
......@@ -238,7 +187,7 @@ SSLCARevocationPath %(ca_crl)s"""
self.linkBinary()
self.installERP5Site(user, password, zope_access, mysql_conf,
conversion_server_conf, memcached_conf, kumo_conf,
self.site_id, self.default_bt5_list)
self.site_id, self.default_bt5_list, ca_conf)
self.setConnectionDict(dict(
development_zope='http://%s:%s/' % (ip, zope_port),
......@@ -249,12 +198,6 @@ SSLCARevocationPath %(ca_crl)s"""
kumo_url=kumo_conf['kumo_address'],
conversion_server_url='%(conversion_server_ip)s:%(conversion_server_port)s' %
conversion_server_conf,
# openssl binary might be removed, as soon as CP environment will be
# fully controlled
openssl_binary=self.options['openssl_binary'],
# As soon as there would be Vifib ERP5 configuration and possibility to
# call it over the network this can be removed
certificate_authority_path=ca_conf['certificate_authority_path'],
# as installERP5Site is not trusted (yet) and this recipe is production
# ready expose more information
mysql_url='%(mysql_database)s@%(ip)s:%(tcp_port)s %(mysql_user)s %(mysql_password)s' % mysql_conf,
......@@ -267,6 +210,9 @@ SSLCARevocationPath %(ca_crl)s"""
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
# self.cron_d is a directory, where cron jobs can be registered
self.zodb_cache_size = int(self.options.get('zodb_cache_size', 5000))
self.zeo_client_cache_size = self.options.get('zeo_client_cache_size',
'20MB')
self.cron_d = self.installCrond()
self.logrotate_d, self.logrotate_backup = self.installLogrotate()
self.killpidfromfile = zc.buildout.easy_install.scripts(
......@@ -276,8 +222,6 @@ SSLCARevocationPath %(ca_crl)s"""
if self.parameter_dict.get("flavour", "default") == 'configurator':
self.default_bt5_list = self.options.get("configurator_bt5_list", '').split()
if self.parameter_dict.get('development', 'false').lower() == 'true':
return self.installDevelopment()
if self.parameter_dict.get('production', 'false').lower() == 'true':
return self.installProduction()
raise NotImplementedError('Flavour of instance have to be given.')
return self.installDevelopment()
K 25
svn:wc:ra_dav:version-url
V 101
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template
END
my.cnf.in
K 25
svn:wc:ra_dav:version-url
V 111
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/my.cnf.in
END
tomcat-server.xml.in
K 25
svn:wc:ra_dav:version-url
V 122
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/tomcat-server.xml.in
END
mysqld.bin
K 25
svn:wc:ra_dav:version-url
V 112
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/mysqld.bin
END
hibernate.cfg.xml.in
K 25
svn:wc:ra_dav:version-url
V 122
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/hibernate.cfg.xml.in
END
initmysql.sql.in
K 25
svn:wc:ra_dav:version-url
V 118
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/initmysql.sql.in
END
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
my.cnf.in
file
2011-04-15T12:07:28.105799Z
4e14aadbd4cc702f79be73d30e43910a
2011-04-08T10:52:53.516084Z
45235
luke
1748
tomcat-server.xml.in
file
2011-04-15T12:07:28.106799Z
e2f38e13d03651be5e315648486d5037
2011-04-08T10:52:53.516084Z
45235
luke
6832
mysqld.bin
file
2011-04-15T12:07:28.106799Z
c8d25b8de5d48ec743ef96765510295c
2011-04-08T10:52:53.516084Z
45235
luke
70
hibernate.cfg.xml.in
file
2011-04-15T12:07:28.106799Z
6b232131d3aa1cf19c9b1bf07db98aaf
2011-04-08T10:52:53.516084Z
45235
luke
7107
initmysql.sql.in
file
2011-04-15T12:07:28.106799Z
0b2a21fe9fb6578bfa7756978cabd26e
2011-04-08T10:52:53.516084Z
45235
luke
129
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Please refer to the installation guide on
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your
database. You'll need to do 2 things:
1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory
2) Uncomment the properties below for your specific DB (and comment the default
database configuration if it doesn't match your DB)
-->
<!-- Generic parameters common to all Databases -->
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="dbcp.defaultAutoCommit">false</property>
<property name="dbcp.maxActive">50</property>
<property name="dbcp.maxIdle">5</property>
<property name="dbcp.maxWait">30000</property>
<property name="dbcp.whenExhaustedAction">1</property>
<property name="dbcp.ps.whenExhaustedAction">1</property>
<property name="dbcp.ps.maxActive">20</property>
<property name="dbcp.ps.maxWait">120000</property>
<property name="dbcp.ps.maxIdle">20</property>
<!-- Without it, some queries fail in MS SQL. XWiki doesn't need scrollable result sets, anyway. -->
<property name="jdbc.use_scrollable_resultset">false</property>
<!-- Configuration for the default database.
Comment out this section and uncomment other sections below if you want to use another database.
Note that the database tables will be created automatically if they don't already exist.
<property name="connection.url">jdbc:hsqldb:file:database/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database configurations.
We need to set the sql_mode to a less strict value, see XWIKI-1945
-->
<property name="connection.url">jdbc:mysql://%(mysql_ip)s:%(mysql_port)s/xwiki?useServerPrepStmts=false&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<!-- HSQLDB configuration.
Uncomment if you want to use HSQLDB and comment out other database configurations.
<property name="connection.url">jdbc:hsqldb:file:/some/path/xwikidb;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- PostgreSQL configuration.
Uncomment if you want to use PostgreSQL and comment out other database configurations.
<property name="connection.url">jdbc:postgresql:xwiki</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- Oracle configuration.
Uncomment if you want to use Oracle and comment out other database configurations.
Note: the 2 properties named "hibernate.connection.SetBigStringTryClob" and
"hibernate.jdbc.batch_size". They are required to tell Oracle to allow CLOBs larger than
32K.
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<property name="hibernate.connection.SetBigStringTryClob">true</property>
<property name="hibernate.jdbc.batch_size">0</property>
<mapping resource="xwiki.oracle.hbm.xml"/>
<mapping resource="feeds.oracle.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- Derby configuration.
Uncomment if you want to use Derby and comment out other database configurations.
<property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</property>
<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="dialect">org.hibernate.dialect.DerbyDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.derby.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
</session-factory>
</hibernate-configuration>
CREATE DATABASE IF NOT EXISTS xwiki;
GRANT ALL PRIVILEGES ON %(database)s.* TO %(user)s@'%%' IDENTIFIED BY '%(password)s';
EXIT
# ERP5 buildout my.cnf template based on my-huge.cnf shipped with mysql
# The MySQL server
[mysqld]
# ERP5 by default requires InnoDB storage. MySQL by default fallbacks to using
# different engine, like MyISAM. Such behaviour generates problems only, when
# tables requested as InnoDB are silently created with MyISAM engine.
#
# Loud fail is really required in such case.
sql-mode="NO_ENGINE_SUBSTITUTION"
skip-show-database
port = %(tcp_port)s
bind-address = %(ip)s
socket = %(socket)s
datadir = %(data_directory)s
pid-file = %(pid_file)s
log-error = %(error_log)s
log-slow-queries = %(slow_query_log)s
long_query_time = 5
skip-locking
key_buffer = 384M
max_allowed_packet = 128M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Disable Federated by default
skip-federated
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Force utf8 usage
collation_server = utf8_unicode_ci
character_set_server = utf8
default-character-set = utf8
skip-character-set-client-handshake
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
socket = %(socket)s
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
#!/bin/sh
exec %(real_binary)s --defaults-file=%(configuration_file)s
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="-1" shutdown="SHUTDOWN">
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector address="%(http_address)s" port="%(http_port)s" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector address="%(ajp_address)s" port="%(ajp_port)s" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
</Host>
</Engine>
</Service>
</Server>
......@@ -79,35 +79,50 @@ class Recipe(BaseSlapRecipe):
self.path_list.append(wrapper)
return cron_d
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
# self.cron_d is a directory, where cron jobs can be registered
self.cron_d = self.installCrond()
self.logrotate_d, self.logrotate_backup = self.installLogrotate()
zabbix_log_file = os.path.join(self.log_directory, 'zabbix_agentd.log')
self.registerLogRotation('zabbix_agentd', [zabbix_log_file])
zabbix_agentd = dict(
def installZabbixAgentd(self, ip, port, hostname, server_ip,
user_parameter_string=''):
log_file = os.path.join(self.log_directory, 'zabbix_agentd.log')
self.registerLogRotation('zabbix_agentd', [log_file])
zabbix_agentd_conf = dict(
pid_file=os.path.join(self.run_directory, "zabbix_agentd.pid"),
log_file=zabbix_log_file,
ip=self.getGlobalIPv6Address(),
server=self.parameter_dict['server'],
hostname=self.parameter_dict['hostname'],
port='10050'
)
zabbix_agentd_conf = self.createConfigurationFile("zabbix_agentd.conf",
pkg_resources.resource_string(__name__,
'template/zabbix_agentd.conf.in') % zabbix_agentd)
self.path_list.append(zabbix_agentd_conf)
log_file=log_file,
ip=ip,
server=server_ip,
hostname=hostname,
port=port,
user_parameter_string=user_parameter_string)
zabbix_agentd_path = self.createConfigurationFile(
"zabbix_agentd.conf",
pkg_resources.resource_string(
__name__, 'template/zabbix_agentd.conf.in') % zabbix_agentd_conf)
self.path_list.append(zabbix_agentd_path)
wrapper = zc.buildout.easy_install.scripts([('zabbixagentd',
'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.bin_directory, arguments=[
self.options['zabbix_agentd_binary'].strip(), '-c',
zabbix_agentd_conf])[0]
zabbix_agentd_path])[0]
self.path_list.extend(zc.buildout.easy_install.scripts([
('zabbixagentd', __name__ + '.svcdaemon', 'svcdaemon')],
self.ws, sys.executable, self.wrapper_directory, arguments=[dict(
real_binary=wrapper, pid_file=zabbix_agentd['pid_file'])]))
self.setConnectionDict(dict(ip=zabbix_agentd['ip'],
name=zabbix_agentd['hostname'], port=zabbix_agentd['port']))
real_binary=wrapper, pid_file=zabbix_agentd_conf['pid_file'])]))
return zabbix_agentd_conf
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
# self.cron_d is a directory, where cron jobs can be registered
self.cron_d = self.installCrond()
self.logrotate_d, self.logrotate_backup = self.installLogrotate()
zabbix_agentd_conf = self.installZabbixAgentd(self.getGlobalIPv6Address(),
10050,
self.parameter_dict['hostname'],
self.parameter_dict['server'])
self.setConnectionDict(dict(ip=zabbix_agentd_conf['ip'],
name=zabbix_agentd_conf['hostname'], port=zabbix_agentd_conf['port']))
return self.path_list
......@@ -229,3 +229,5 @@ ListenIP=%(ip)s
# Mandatory: no
# Default:
# UserParameter=
%(user_parameter_string)s
......@@ -23,4 +23,4 @@ link_binary_list =
${pdftk:location}/bin/pdftk
environment =
LD_LIBRARY_PATH = ${file:location}/lib:${zlib:location}/lib:${freetype:location}/lib:${libXext:location}/lib:${libXau:location}/lib:${libX11:location}/lib:${libXdmcp:location}/lib:${libxcb:location}/lib
LD_LIBRARY_PATH = ${file:location}/lib:${fontconfig:location}/lib:${freetype:location}/lib:${libICE:location}/lib:${libSM:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXdmcp:location}/lib:${libXext:location}/lib:${libXinerama:location}/lib:${libxcb:location}/lib:${zlib:location}/lib
......@@ -33,6 +33,6 @@ module = cloudooo
# Default template for erp5 instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 45d8de2ca15f126506ad5c08357c5a26
md5sum = 2a38a928deb5870e02a8271b34341f5b
output = ${buildout:directory}/template.cfg
mode = 0644
[buildout]
parts =
instance
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
dcrond_binary = ${dcron:location}/sbin/crond
logrotate_binary = ${logrotate:location}/usr/sbin/logrotate
apache_binary = ${apache:location}/bin/httpd
apache_modules_dir = ${apache:location}/modules/
apache_mime_file = ${apache:location}/conf/mime.types
apache_htpasswd = ${apache:location}/bin/htpasswd
openssl_binary = ${openssl:location}/bin/openssl
[buildout]
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
extends =
../../component/apache/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../stack/shacache-client.cfg
../../component/lxml-python/buildout.cfg
../../component/python-2.7/buildout.cfg
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
parts =
template
lxml-python
apache
logrotate
dcron
eggs
instance-recipe-egg
unzip= true
[eggs]
recipe = zc.recipe.egg
eggs =
[instance-recipe]
egg = slapos.cookbook
module = davstorage
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 51b6213889573ae7b1dec0bd65384432
output = ${buildout:directory}/template.cfg
mode = 0644
[lxml-python]
python = python2.7
[versions]
zc.buildout = 1.5.3-dev-SlapOS-010
Jinja2 = 2.6
Werkzeug = 0.7.1
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0
meld3 = 0.6.7
slapos.cookbook = 0.26
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.14
Flask = 0.7.2
# Required by:
# slapos.cookbook==0.24
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.9
# Required by:
# slapos.cookbook==0.24
# slapos.core==0.14
# xml-marshaller==0.9.7
lxml = 2.3
# Required by:
# slapos.cookbook==0.24
netaddr = 0.7.6
# Required by:
# slapos.core==0.14
netifaces = 0.4
# Required by:
# slapos.cookbook==0.24
# slapos.core==0.14
# zc.buildout==1.5.3-dev-SlapOS-009
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.24
slapos.core = 0.14
# Required by:
# slapos.core==0.14
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.24
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.24
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.14
zope.interface = 3.7.0
......@@ -29,10 +29,11 @@ runTestSuite_binary = ${buildout:bin-directory}/runTestSuite
runUnitTest_binary = ${buildout:bin-directory}/runUnitTest
runzeo_binary = ${buildout:bin-directory}/runzeo
runzope_binary = ${buildout:bin-directory}/runzope
sphinx_searchd_binary = ${sphinx:location}/bin/searchd
tidstorage_repozo_binary = ${buildout:bin-directory}/tidstorage_repozo
tidstoraged_binary = ${buildout:bin-directory}/tidstoraged
xtrabackup_binary = ${xtrabackup:location}/bin/xtrabackup_51
zabbix_agent_binary = ${zabbix-agent:location}/sbin/zabbix_agent
zabbix_agentd_binary = ${zabbix-agent:location}/sbin/zabbix_agentd
mk-variable-advisor_binary = ${perl:siteprefix}/bin/mk-variable-advisor
mk-table-usage_binary = ${perl:siteprefix}/bin/mk-table-usage
mk-visual-explain_binary = ${perl:siteprefix}/bin/mk-visual-explain
......@@ -74,7 +75,7 @@ link_binary_list =
# availability in software's eggs
products = ${products:list}
environment =
LD_LIBRARY_PATH = ${file:location}/lib:${zlib:location}/lib:${freetype:location}/lib:${libXext:location}/lib:${libXau:location}/lib:${libX11:location}/lib:${libXdmcp:location}/lib:${libxcb:location}/lib
LD_LIBRARY_PATH = ${file:location}/lib:${fontconfig:location}/lib:${freetype:location}/lib:${libICE:location}/lib:${libSM:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXdmcp:location}/lib:${libXext:location}/lib:${libXinerama:location}/lib:${libxcb:location}/lib:${zlib:location}/lib
bt5_repository_list = ${bt5-repository:list}
......
......@@ -28,7 +28,7 @@ configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catal
# Default template for erp5 instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 77062d472e88aca0fe632bdee4f9bb21
md5sum = 53f225e13bf7ebcd88bbc2b038c83b6f
output = ${buildout:directory}/template.cfg
mode = 0644
......@@ -43,7 +43,7 @@ mode = 0644
[versions]
MySQL-python = 1.2.3
Paste = 1.7.5.1
PasteScript = 1.7.3
PasteScript = 1.7.4.2
Products.CMFActionIcons = 2.1.3
Products.CMFCalendar = 2.2.2
Products.CMFCore = 2.2.4
......@@ -53,13 +53,13 @@ Products.CMFUid = 2.2.1
Products.DCWorkflowGraph = 0.4nxd001
Products.ExternalEditor = 1.1.0
Products.GenericSetup = 1.6.3
Products.MimetypesRegistry = 2.0.2
Products.MimetypesRegistry = 2.0.3
Products.PluggableAuthService = 1.7.5
Products.PluginRegistry = 1.3b1
Products.TIDStorage = 5.4.7.dev-r45842
Products.Zelenium = 1.0.3
StructuredText = 2.11.1
Werkzeug = 0.6.2
Werkzeug = 0.7.1
buildout-versions = 1.6
cElementTree = 1.0.5-20051216
chardet = 1.0.1
......@@ -68,32 +68,31 @@ cloudooo.handler.ffmpeg = 0.1
cloudooo.handler.imagemagick = 0.1
cloudooo.handler.ooo = 0.2
cloudooo.handler.pdf = 0.1
csp-eventlet = 0.6.0
csp-eventlet = 0.7.0
elementtree = 1.2.7-20070827-preview
erp5.conflictresolver = 0.3
erp5.recipe.cmmiforcei686 = 0.1.3
erp5diff = 0.8.1.3
erp5diff = 0.8.1.5
eventlet = 0.9.16
feedparser = 5.0.1
five.localsitemanager = 2.0.5
greenlet = 0.3.1
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0
http-parser = 0.6.2
ipdb = 0.4
http-parser = 0.7.0
ipdb = 0.6
meld3 = 0.6.7
mr.developer = 1.17
ordereddict = 1.1
paramiko = 1.7.7.1
plone.recipe.command = 1.1
ply = 3.4
psutil = 0.3.0
pycrypto = 2.3
python-ldap = 2.4.1
python-memcached = 1.45
restkit = 3.3.0
python-ldap = 2.4.3
python-memcached = 1.47
restkit = 3.3.1
rtjp-eventlet = 0.3.2
slapos.cookbook = 0.16
slapos.cookbook = 0.25
slapos.recipe.build = 0.6
slapos.recipe.template = 1.1
threadframe = 0.2
timerserver = 2.0.2
......@@ -103,11 +102,11 @@ validictory = 0.7.1
xupdate-processor = 0.4
# Required by:
# slapos.core==0.12
# slapos.core==0.14
Flask = 0.7.2
# Required by:
# PasteScript==1.7.3
# PasteScript==1.7.4.2
# cloudooo==1.2.3
PasteDeploy = 1.5.0
......@@ -117,27 +116,27 @@ WSGIUtils = 0.7
# Required by:
# cloudooo==1.2.3
# slapos.core==0.12
# slapos.core==0.14
argparse = 1.1
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
collective.recipe.template = 1.9
# Required by:
# SOAPpy==0.12.0nxd001
fpconst = 0.7.2
# Required by:
# ipdb==0.4
ipython = 0.10.2
# ipdb==0.6
ipython = 0.11
# Required by:
# slapos.cookbook==0.16
netaddr = 0.7.5
# slapos.cookbook==0.25
netaddr = 0.7.6
# Required by:
# slapos.core==0.12
# slapos.core==0.14
netifaces = 0.4
# Required by:
......@@ -145,38 +144,20 @@ netifaces = 0.4
python-magic = 0.4.0.1
# Required by:
# Products.CMFActionIcons==2.1.3
# Products.CMFCalendar==2.2.2
# Products.CMFCore==2.2.4
# Products.CMFDefault==2.2.2
# Products.CMFTopic==2.2.1
# Products.CMFUid==2.2.1
# Products.DCWorkflow==2.2.3nxd002
# Products.DCWorkflowGraph==0.4nxd001
# Products.ExternalEditor==1.1.0
# Products.GenericSetup==1.6.3
# Products.MimetypesRegistry==2.0.2
# Products.PluggableAuthService==1.7.5
# Products.PluginRegistry==1.3b1
# Products.TIDStorage==5.4.7.dev-r45842
# Products.Zelenium==1.0.3
# Zope2==2.12.19
# five.localsitemanager==2.0.5
# mr.developer==1.17
# python-ldap==2.4.1
# zc.buildout==1.5.3-dev-SlapOS-005
# zope.deprecation==3.4.0
# zope.structuredtext==3.4.0
# slapos.cookbook==0.25
# slapos.core==0.14
# zc.buildout==1.5.3-dev-SlapOS-010
# zc.recipe.egg==1.2.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.16
slapos.core = 0.12
# slapos.cookbook==0.25
slapos.core = 0.14
# Required by:
# slapos.core==0.12
# slapos.core==0.14
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.16
# slapos.cookbook==0.25
xml-marshaller = 0.9.7
......@@ -77,4 +77,4 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
zc.buildout = 1.5.3-dev-SlapOS-010
......@@ -15,71 +15,63 @@ command =
update-command =
[versions]
Jinja2 = 2.5.5
Werkzeug = 0.6.2
Jinja2 = 2.6
Werkzeug = 0.7.1
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
numpy = 1.6.1
plone.recipe.command = 1.1
slapos.cookbook = 0.15
slapos.recipe.template = 1.1
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.9
# slapos.core==0.14
Flask = 0.7.2
# Required by:
# slapos.cookbook==0.15
# slapos.cookbook==0.20
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
collective.recipe.template = 1.9
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.15
# slapos.cookbook==0.20
netaddr = 0.7.5
# Required by:
# slapos.core==0.9
# slapos.core==0.14
netifaces = 0.5
# Required by:
# slapos.cookbook==0.15
# slapos.core==0.9
# slapos.cookbook==0.20
# slapos.core==0.14
# zc.buildout==1.5.3-dev-SlapOS-005
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.15
slapos.core = 0.9
# slapos.cookbook==0.20
slapos.core = 0.14
# Required by:
# slapos.core==0.9
# slapos.core==0.14
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.15
# slapos.cookbook==0.20
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.15
# slapos.cookbook==0.20
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.9
zope.interface = 3.6.4
# Required by:
# novnc==0.1
numpy = 1.6.1
# XXX-CEDRIC Quick and dirty workaround to avoid m2crypto problems.
# should not be used elsewhere unless for urgent cases.
slapos.libnetworkcache = 0.2
# slapos.core==0.14
zope.interface = 3.7.0
......@@ -22,7 +22,7 @@ url = Student shall put here url of zipped or tarballed web page or application
[instance-recipe]
egg = slapos.cookbook
module = osoeslaptraining.static
module = lamp.static
[template]
# Default template for the instance.
......
......@@ -34,7 +34,7 @@ location = Student shall put here relative path to application top level directo
[instance-recipe]
egg = slapos.cookbook
module = osoeslaptraining.simple
module = lamp.simple
[template]
# Default template for the instance.
......
......@@ -8,13 +8,15 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
dcrond_binary = ${dcron:location}/sbin/crond
innobackupex_binary = ${xtrabackup:location}/bin/innobackupex
logrotate_binary = ${logrotate:location}/usr/sbin/logrotate
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
mysqldump_binary = ${mariadb:location}/bin/mysqldump
openssl_binary = ${openssl:location}/bin/openssl
perl_binary = ${perl:location}/bin/perl
rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup
stunnel_binary = ${stunnel:location}/bin/stunnel
gzip_binary = ${gzip:location}/bin/gzip
duplicity_binary = ${buildout:bin-directory}/duplicity
gzip_binary = ${gzip:location}/bin/gzip
zcat_binary = ${gzip:location}/bin/zcat
......@@ -2,7 +2,6 @@
extensions =
slapos.zcbworkarounds
slapos.rebootstrap
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
......@@ -13,10 +12,9 @@ extends =
../../component/logrotate/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/perl/buildout.cfg
../../component/xtrabackup/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/gzip/buildout.cfg
../../component/duplicity/buildout.cfg
../../stack/shacache-client.cfg
# Use only quite well working sites.
......@@ -33,13 +31,15 @@ allow-hosts =
versions = versions
parts +=
parts =
# Create instance template
#TODO : list here all parts.
template
libxslt
eggs
gzip
instance-recipe-egg
duplicity
# XXX: Workaround of SlapOS limitation
# Unzippig of eggs is required, as SlapOS do not yet provide nicely working
......@@ -70,14 +70,15 @@ eggs =
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 69c32a67c5640d36ee042d2cfc35843d
md5sum = 426f3cf33899a1f78de8b6ff35917852
output = ${buildout:directory}/template.cfg
mode = 0644
dollar = $
[versions]
slapos.cookbook = 0.9
slapos.cookbook = 0.29
# Required by slapos.cookbook==0.9
# Required by slapos.cookbook==0.25
slapos.core = 0.4
collective.recipe.template = 1.8
netaddr = 0.7.5
......@@ -89,4 +90,4 @@ hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
zc.buildout = 1.5.3-dev-SlapOS-010
......@@ -86,4 +86,4 @@ hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
zc.buildout = 1.5.3-dev-SlapOS-009
......@@ -66,24 +66,69 @@ output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
zc.buildout = 1.5.3-dev-SlapOS-009
slapos.cookbook = 0.13
# Required by slapos.cookbook==0.13
slapos.core = 0.4
collective.recipe.template = 1.8
netaddr = 0.7.5
xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795
Jinja2 = 2.6
Werkzeug = 0.7.1
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.7
rdiff-backup = 1.0.5
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.14
Flask = 0.7.2
# Required by:
# slapos.cookbook==0.13
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.9
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
# Required by:
# slapos.cookbook==0.13
# slapos.core==0.14
# xml-marshaller==0.9.7
lxml = 2.3
# Required by:
# slapos.cookbook==0.13
netaddr = 0.7.6
# Required by:
# slapos.core==0.14
netifaces = 0.4
# Required by:
# slapos.cookbook==0.13
# slapos.core==0.14
# zc.buildout==1.5.3-dev-SlapOS-009
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.13
slapos.core = 0.14
# Required by:
# slapos.core==0.14
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.13
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.13
zc.recipe.egg = 1.3.2
# XXX: Very dirty workaround
# XXX: Pin slapos.libnetworkcache, as version higher than 0.3 depends on
# XXX: M2Crypto which installation is not defined yet
# XXX: Note, that slapos.libnetworkcache is buildout "internal" dependency
slapos.libnetworkcache = 0.3
# Required by:
# slapos.core==0.14
zope.interface = 3.7.0
\ No newline at end of file
......@@ -39,7 +39,7 @@ location = config.inc.php
[instance-recipe]
egg = slapos.cookbook
module = osoeslaptraining.simple
module = lamp.simple
[instance-recipe-egg]
recipe = zc.recipe.egg
......
......@@ -51,4 +51,4 @@ plone.recipe.command = 1.1
slapos.libnetworkcache = 0.2
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
zc.buildout = 1.5.3-dev-SlapOS-009
......@@ -20,7 +20,8 @@ repository_id_list += vifib/master
[vifib]
<= erp5
repository = http://git.erp5.org/repos/slapos.core.git
revision = 3f766ab93c5312c75b7315a60238c1c5b3e4170d
# tag: vifib-0.2
revision = f42ad28f0aa47d8cdb028ce6a1796eb7ef6f066e
[local-bt5-repository]
# XXX: workaround for zc.buildout bug, as list += ends up with adding new entry
......
......@@ -11,7 +11,6 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
stunnel_binary = ${stunnel:location}/bin/stunnel
davstorage-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.52:/software/davstorage/software.cfg
mariadb-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.54:/software/mariadb/software.cfg
......@@ -4,12 +4,11 @@ versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
../../stack/apache-php.cfg
../../stack/shacache-client.cfg
[application]
......@@ -30,7 +29,7 @@ location = wp-config.php
[instance-recipe]
egg = slapos.cookbook
module = osoeslaptraining.request
module = lamp.request
[instance-recipe-egg]
recipe = zc.recipe.egg
......@@ -41,12 +40,12 @@ eggs = ${instance-recipe:egg}
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = efdb8509f40c86b1b73924fc1ce92f13
md5sum = c821944d1ab8d8c0305b08ea7c09c2e0
output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
slapos.cookbook = 0.12
slapos.cookbook = 0.28
# Required by slapos.cookbook==0.12
slapos.core = 0.8
......@@ -60,4 +59,4 @@ hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
zc.buildout = 1.5.3-dev-SlapOS-010
......@@ -34,7 +34,6 @@ slapos.cookbook = 0.18
# Required by slapos.cookbook==0.18
slapos.core = 0.13
slapos.libnetworkcache = 0.2
collective.recipe.template = 1.8
netaddr = 0.7.5
xml-marshaller = 0.9.7
......@@ -45,4 +44,4 @@ hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
\ No newline at end of file
zc.buildout = 1.5.3-dev-SlapOS-009
......@@ -20,9 +20,9 @@ parts =
mariadb
eggs
instance-recipe-egg
stunnel
extends =
../component/mariadb/buildout.cfg
../component/apache/buildout.cfg
../component/apache-php/buildout.cfg
../component/dcron/buildout.cfg
......@@ -30,12 +30,9 @@ extends =
../component/glib/buildout.cfg
../component/logrotate/buildout.cfg
../component/python-2.7/buildout.cfg
../component/perl/buildout.cfg
../component/sqlite3/buildout.cfg
../component/xtrabackup/buildout.cfg
../component/rdiff-backup/buildout.cfg
../component/lxml-python/buildout.cfg
../component/zlib/buildout.cfg
../component/stunnel/buildout.cfg
[application]
recipe = hexagonit.recipe.download
......
......@@ -30,7 +30,8 @@ parts =
libXdmcp
libXext
libXau
libX11
libXinerama
libSM
# fonts
liberation-fonts
......
......@@ -3,7 +3,6 @@ extensions =
slapos.rebootstrap
slapos.zcbworkarounds
buildout-versions
mr.developer
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
......@@ -113,7 +112,8 @@ parts =
libXdmcp
libXext
libXau
libX11
libXinerama
libSM
# fonts
liberation-fonts
......@@ -129,6 +129,10 @@ parts =
erp5
genbt5list
# fix products path (Zeo needs ERP5 Products to be available for
# conflict resolution)
fix-products-paths
[bt5-repository]
# Format:
# <url or path> [...]
......@@ -198,14 +202,8 @@ svn_param =--trust-server-cert --non-interactive --quiet
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
command =
${subversion:location}/bin/svn checkout ${:svn_param} https://svn.plone.org/svn/collective/ExtFile/trunk ${:location}/ExtFile &&
${git:location}/bin/git clone --quiet git://git.hforge.org/Localizer.git ${:location}/Localizer
update-command =
if ${buildout:newest}; then
${subversion:location}/bin/svn checkout ${:svn_param} https://svn.plone.org/svn/collective/ExtFile/trunk ${:location}/ExtFile &&
cd ${:location}/Localizer &&
${git:location}/bin/git pull --quiet
fi
${subversion:location}/bin/svn checkout -r 98997 ${:svn_param} https://svn.plone.org/svn/collective/ExtFile/trunk ${:location}/ExtFile &&
${git:location}/bin/git clone --quiet git://git.hforge.org/Localizer.git ${:location}/Localizer && cd ${:location}/Localizer && ${git:location}/bin/git reset --quiet --hard dacb6ba0ae559cd9bdb8822812d24a12a21e9e37
[erp5_repository_list]
repository_id_list = erp5
......@@ -220,14 +218,22 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
repository = http://git.erp5.org/repos/erp5.git
branch = master
revision = dd36cf064495e04f2ad0eaa9c527a2c3246e9ecb
revision = f1bc8fdc0e4ce17530b32468c2affda8a6e9e896
command = ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location} && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
[products]
# XXX: ERP5 related products are not defined as python distributions, so it is
# required to configure them in declarative manner
list = ${products-deps:location} ${buildout:parts-directory}/erp5/product
list =
[fix-products-paths]
recipe = plone.recipe.command
stop-on-error = true
command =
for DIR in "${products-deps:location}"; do cd "$DIR"; rm -f Products ; ln -s . Products; touch __init__.py; done
for DIR in "${erp5:location}"; do cd "$DIR"; rm -f Products ; ln -s product Products; touch product/__init__.py; done
update-command = ${:command}
[testrunner]
# XXX: Workaround for fact ERP5Type is not an distribution and does not
......@@ -237,28 +243,29 @@ python = python2.6
eggs = ${eggs:eggs}
extra-paths = ${eggs:extra-paths}
entry-points =
runUnitTest=Products.ERP5Type.tests.runUnitTest:main
runUnitTest=runUnitTest:main
scripts = runUnitTest
initialization =
import os
import sys
import glob, imp, os, sys
import App # prevent Testing from importing Zope2.App instead of App
import Products
[Products.__path__.insert(0, p) for p in reversed(os.environ.get('INSERT_PRODUCTS_PATH', '').split(':')) if p]
Products.__path__[:0] = filter(None,
os.getenv('INSERT_PRODUCTS_PATH', '').split(os.pathsep))
Products.__path__.extend(reversed('''${products:list}'''.split()))
import Zope2
os.environ['SOFTWARE_HOME'] = os.path.abspath(os.path.dirname(os.path.dirname(Zope2.__file__)))
os.environ['SOFTWARE_HOME'] = os.path.abspath(imp.find_module('Zope2')[1])
os.environ['ZOPE_SCRIPTS'] = ''
parts_directory = '''${buildout:parts-directory}'''
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
temp_bt5_path_list = ['/'.join([parts_directory, x, 'bt5']) for x in repository_id_list]
bt5_path_list = []
[bt5_path_list.extend([bt5_path, '%s/*' % bt5_path]) for bt5_path in temp_bt5_path_list]
os.environ['erp5_tests_bt5_path'] = ','.join(bt5_path_list)
sys.path[0:0] = ['/'.join([parts_directory, x, 'tests']) for x in repository_id_list]
import glob
product_test_path_list = []
[product_test_path_list.extend(glob.glob('/'.join([parts_directory, x, 'product/*/tests']))) for x in repository_id_list]
sys.path[0:0] = product_test_path_list
repository_id_list = \
'''${erp5_repository_list:repository_id_list}'''.split()[::-1]
os.environ['erp5_tests_bt5_path'] = ','.join(sum((
[bt5_path, os.path.join(bt5_path, '*')]
for bt5_path in (os.path.join(parts_directory, x, 'bt5')
for x in repository_id_list)), []))
sys.path[:0] = [os.path.join(parts_directory, x, 'tests')
for x in repository_id_list]
sys.path[:0] = sum((
glob.glob(os.path.join(parts_directory, x, 'product', '*', 'tests'))
for x in repository_id_list), [])
[test_suite_runner]
# XXX: Workaround for fact ERP5Type is not an distribution and does not
......@@ -288,7 +295,6 @@ python = python2.6
eggs =
# instantiation egg
${instance-recipe:egg}
erp5.conflictresolver
[eggs]
recipe = zc.recipe.egg
......@@ -369,6 +375,8 @@ scripts =
extra-paths =
${itools:location}/lib
${products-deps:location}
${erp5:location}
[mysql-python]
python = python2.6
......@@ -398,13 +406,7 @@ scripts =
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
# XXX: Very dirty workaround
# XXX: Pin slapos.libnetworkcache, as version higher than 0.3 depends on
# XXX: M2Crypto which installation is not defined yet
# XXX: Note, that slapos.libnetworkcache is buildout "internal" dependency
slapos.libnetworkcache = 0.3
zc.buildout = 1.5.3-dev-SlapOS-010
# pin Acquisition and Products.DCWorkflow to Nexedi flavour of eggs
Acquisition = 2.13.7nxd001
......
......@@ -25,10 +25,6 @@ extends =
# Websockify (socket <-> websocket proxy server) when it is ready.
# May solve previous XXX depending on the implementation.
#XXX-Cedric: Check status of
# https://www.tiolive.com/nexedi/bug_module/20110819-11F4F70 for
# Chrome >= 14 and Firefox >=7 can access to noVNC.
parts =
template
gnutls
......@@ -105,4 +101,4 @@ eggs =
numpy
[versions]
zc.buildout = 1.5.3-dev-SlapOS-005
zc.buildout = 1.5.3-dev-SlapOS-009
......@@ -35,7 +35,7 @@ parts =
[hsql]
recipe = hexagonit.recipe.download
url = http://hsqldb.org/support/hsqldb_16.zip
md5sum = 34cac21d39bca03846a5382cef809104
md5sum = 80db09c75053085dad198590daf0785c
[jdbc]
recipe = hexagonit.recipe.download
......
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