Commit b4f9afde authored by root's avatar root

Merge branch 'master' into selenium

parents 68b7b42f af93196e
Changes Changes
======= =======
0.23 (unreleased) 0.30 (Unreleased)
----------------- -----------------
* No change yet. * No change yet.
0.30 (2011-10-06)
-----------------
* 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) 0.22 (2011-09-12)
----------------- -----------------
* Fix haproxy setup for erp5 [Sebastien Robin] * Fix haproxy setup for erp5 [Sebastien Robin]
0.21 (2011-09-12) 0.21 (2011-09-12)
----------------- -----------------
......
...@@ -3,6 +3,8 @@ parts = apache-php ...@@ -3,6 +3,8 @@ parts = apache-php
extends = extends =
../apache/buildout.cfg ../apache/buildout.cfg
../mariadb/buildout.cfg
../libtool/buildout.cfg
[apache-php] [apache-php]
# Note: Shall react on each build of apache and reinstall itself # Note: Shall react on each build of apache and reinstall itself
......
...@@ -16,8 +16,8 @@ extends = ...@@ -16,8 +16,8 @@ extends =
[apache-no-ssl] [apache-no-ssl]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/ # inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2 url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.21.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56 md5sum = 1696ae62cd879ab1d4dd9ff021a470f2
configure-options = --enable-authn-alias configure-options = --enable-authn-alias
--enable-bucketeer --enable-bucketeer
--enable-cache --enable-cache
...@@ -42,14 +42,14 @@ configure-options = --enable-authn-alias ...@@ -42,14 +42,14 @@ configure-options = --enable-authn-alias
--enable-proxy-scgi --enable-proxy-scgi
--enable-so --enable-so
--enable-dav --enable-dav
--enable-dav-fs
--disable-ssl --disable-ssl
--with-included-apr --with-included-apr
--with-z=${zlib:location} --with-z=${zlib:location}
--with-expat=${libexpat:location} --with-expat=${libexpat:location}
--with-pcre=${pcre:location} --with-pcre=${pcre:location}
--with-sqlite3=${sqlite3:location} --with-sqlite3=${sqlite3:location}
--with-dbm=gdbm --with-gdbm=${gdbm:location}
--with-gdm=${gdbm:location}
--without-ssl --without-ssl
--without-lber --without-lber
--without-ldap --without-ldap
...@@ -66,8 +66,8 @@ configure-options = --enable-authn-alias ...@@ -66,8 +66,8 @@ configure-options = --enable-authn-alias
[apache] [apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/ # inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2 url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.21.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56 md5sum = 1696ae62cd879ab1d4dd9ff021a470f2
configure-options = --disable-static configure-options = --disable-static
--enable-authn-alias --enable-authn-alias
--enable-bucketeer --enable-bucketeer
...@@ -92,6 +92,7 @@ configure-options = --disable-static ...@@ -92,6 +92,7 @@ configure-options = --disable-static
--enable-proxy-http --enable-proxy-http
--enable-proxy-scgi --enable-proxy-scgi
--enable-dav --enable-dav
--enable-dav-fs
--enable-so --enable-so
--enable-ssl --enable-ssl
--with-included-apr --with-included-apr
...@@ -100,8 +101,7 @@ configure-options = --disable-static ...@@ -100,8 +101,7 @@ configure-options = --disable-static
--with-expat=${libexpat:location} --with-expat=${libexpat:location}
--with-pcre=${pcre:location} --with-pcre=${pcre:location}
--with-sqlite3=${sqlite3:location} --with-sqlite3=${sqlite3:location}
--with-dbm=gdbm --with-gdbm=${gdbm:location}
--with-gdm=${gdbm:location}
--without-lber --without-lber
--without-ldap --without-ldap
--without-ndbm --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_} ...@@ -12,8 +12,8 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[liberation-fonts] [liberation-fonts]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
strip-top-level-dir = true strip-top-level-dir = true
url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-1.06.0.20100721.tar.gz url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-1.07.0.tar.gz
md5sum = ca4870d899fd7e943ffc310a5421ad4d md5sum = 8150db1c6e27cacdfd524b563b85b69e
destination = ${fonts:location}/${:_buildout_section_name_} destination = ${fonts:location}/${:_buildout_section_name_}
# IPAex Font - Japanese fonts provided by IPA # IPAex Font - Japanese fonts provided by IPA
......
...@@ -10,8 +10,8 @@ parts = ...@@ -10,8 +10,8 @@ parts =
[freetype] [freetype]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.5.tar.bz2 url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.6.tar.bz2
md5sum = 90428a6d8ec4876cd1eb94858c2a59b0 md5sum = 5e6510613f612809d2d7862592b92ab7
configure-options = configure-options =
--disable-static --disable-static
environment = environment =
......
...@@ -6,17 +6,20 @@ extends = ...@@ -6,17 +6,20 @@ extends =
../zip/buildout.cfg ../zip/buildout.cfg
parts = parts =
gcc-java gcc
[gmp] [gmp]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2 # we should use version 4.x for ppl-0.10
md5sum = 0bbaedc82fb30315b06b1588b9077cd3 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 # GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses # as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working # backticks are working
configure-options = configure-options =
--build=`uname -m`-linux --build=`uname -m`-linux
--enable-cxx
--disable-static
environment = environment =
PATH=${m4:location}/bin:%(PATH)s 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 ...@@ -26,9 +29,9 @@ url = http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2
md5sum = bfbecb2eacb6d48432ead5cfc3f7390a md5sum = bfbecb2eacb6d48432ead5cfc3f7390a
configure-options = configure-options =
--with-gmp=${gmp:location} --with-gmp=${gmp:location}
--disable-static
environment = environment =
CPPFLAGS =-I${gmp:location}/include LDFLAGS=-Wl,-rpath=${gmp:location}/lib
LDFLAGS =-L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
[mpc] [mpc]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
...@@ -37,9 +40,34 @@ md5sum = 0d6acab8d214bd7d1fbbc593e83dd00d ...@@ -37,9 +40,34 @@ md5sum = 0d6acab8d214bd7d1fbbc593e83dd00d
configure-options = configure-options =
--with-gmp=${gmp:location} --with-gmp=${gmp:location}
--with-mpfr=${mpfr:location} --with-mpfr=${mpfr:location}
--disable-static
environment = environment =
CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib
LDFLAGS =-L${mpfr:location}/lib -Wl,-rpath=${mpfr:location}/lib -L${gmp: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] [ecj]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
...@@ -53,33 +81,42 @@ 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 url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2
md5sum = 8e0b5c12212e185f3e4383106bfa9cc6 md5sum = 8e0b5c12212e185f3e4383106bfa9cc6
strip-top-level-dir = True strip-top-level-dir = True
destination = ${gcc-java-source:location} destination = ${gcc-source:location}
[gcc-java-download] [gcc-java-download]
recipe = hexagonit.recipe.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 url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-java-4.5.3.tar.bz2
md5sum = 08e045fdbdc22ac9af3aec3b8d16dbab md5sum = 08e045fdbdc22ac9af3aec3b8d16dbab
strip-top-level-dir = True strip-top-level-dir = True
destination = ${gcc-java-source:location} destination = ${gcc-source:location}
ignore-existing = true ignore-existing = true
[gcc-java-source] [gcc-source]
location = ${buildout:parts-directory}/${:_buildout_section_name_} 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 = depends =
${gcc-download:location} ${gcc-download:location}
${gcc-java-download:location} ${gcc-java-download:location}
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
path = ${gcc-java-source:location} path = ${gcc-source:location}
md5sum = bb3265edf0fa7543e50cedb93e04e427 md5sum = bb3265edf0fa7543e50cedb93e04e427
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given # GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses # as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working # backticks are working
configure-options = configure-options =
--disable-bootstrap --disable-bootstrap
--build=`uname -m`-linux
--enable-languages=java --enable-languages=java
--disable-multilib --disable-multilib
--with-gmp=${gmp:location} --with-gmp=${gmp:location}
...@@ -87,6 +124,8 @@ configure-options = ...@@ -87,6 +124,8 @@ configure-options =
--with-mpc=${mpc:location} --with-mpc=${mpc:location}
--with-ecj-jar=${ecj:location}/${ecj:filename} --with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--without-ppl
--without-cloog
environment = environment =
CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include -I${mpc:location}/include CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include -I${mpc:location}/include
...@@ -94,3 +133,35 @@ environment = ...@@ -94,3 +133,35 @@ environment =
PATH=${zip:location}/bin:%(PATH)s PATH=${zip:location}/bin:%(PATH)s
# make install does not work when several core are used # make install does not work when several core are used
make-targets = install -j1 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
This diff is collapsed.
...@@ -13,7 +13,9 @@ parts = ...@@ -13,7 +13,9 @@ parts =
[git] [git]
recipe = hexagonit.recipe.cmmi 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 md5sum = 2fa6c4c847ed87523cf55de54af457eb
configure-options = configure-options =
--with-curl=${curl:location} --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 ...@@ -3,8 +3,8 @@ parts = haproxy
[haproxy] [haproxy]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.15.tar.gz url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.18.tar.gz
md5sum = c1b4fc6028c6d8e23dde8c91ff47eabe md5sum = 4ac88bb1a76c4b84ed4f6131183bedbe
configure-command = true configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET, # If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic". # otherwise use "generic".
......
...@@ -35,8 +35,8 @@ filename = imagemagick-6.6.7-4-without-lzma.patch ...@@ -35,8 +35,8 @@ filename = imagemagick-6.6.7-4-without-lzma.patch
[imagemagick] [imagemagick]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.6.9-10.tar.bz2 url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.2-10.tar.bz2
md5sum = 985bd453c3e502f2771af5329c1cc384 md5sum = 073ec5d7f2a22db96a0e87e4322b75f9
configure-options = configure-options =
--disable-static --disable-static
--without-x --without-x
......
[buildout] [buildout]
extends = ../cpio/buildout.cfg extends =
../cpio/buildout.cfg
../rpm2cpio/buildout.cfg
parts = parts =
libreoffice-bin libreoffice-bin
find-links = find-links =
http://www.nexedi.org/static/packages/source/ 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] [libreoffice-bin]
recipe = z3c.recipe.openoffice recipe = slapos.recipe.build
install-javafilter = no
install-pyuno-egg = no
hack-openoffice-python = no
flavour = libreoffice
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64). # 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 cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:target}
...@@ -9,7 +9,9 @@ parts = ...@@ -9,7 +9,9 @@ parts =
[libtiff] [libtiff]
recipe = hexagonit.recipe.cmmi 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 md5sum = 8fc7ce3b4e1d0cc8a319336967815084
configure-options = configure-options =
--disable-static --disable-static
......
...@@ -4,7 +4,7 @@ parts = ...@@ -4,7 +4,7 @@ parts =
[libuuid] [libuuid]
recipe = hexagonit.recipe.cmmi 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 md5sum = 2f5f71e6af969d041d73ab778c141a77
configure-options = configure-options =
--disable-static --disable-static
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
[buildout] [buildout]
extends = extends =
../zlib/buildout.cfg ../zlib/buildout.cfg
../groonga/buildout.cfg
../ncurses/buildout.cfg ../ncurses/buildout.cfg
../pkgconfig/buildout.cfg
../readline/buildout.cfg ../readline/buildout.cfg
parts = parts =
...@@ -12,15 +14,16 @@ parts = ...@@ -12,15 +14,16 @@ parts =
[mariadb] [mariadb]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
version = 5.2.7 version = 5.3.1-beta
url = http://www.percona.com/downloads/MariaDB/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://mirror.layerjet.com/mariadb
md5sum = 06b9b102946a3606b38348c0ebf18367 md5sum = 5b3a94de1c1fcaa193edbbc8d7f8ffe4
# compile directory is required to build mysql plugins. # compile directory is required to build mysql plugins.
keep-compile-dir = true keep-compile-dir = true
# configure: how to avoid searching for my.cnf? # configure: how to avoid searching for my.cnf?
# - like in mysql part in http://svn.zope.org/zodbshootout/trunk/buildout.cfg?view=markup # - 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. # we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine.
configure-options = configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static --disable-static
--enable-thread-safe-client --enable-thread-safe-client
--enable-local-infile --enable-local-infile
...@@ -36,3 +39,16 @@ configure-options = ...@@ -36,3 +39,16 @@ configure-options =
environment = environment =
CPPFLAGS =-I${ncurses:location}/include -I${readline:location}/include 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 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 ...@@ -27,27 +27,37 @@ download-only = true
md5sum = 3418477f64500cd2a8dce046f5d72fec md5sum = 3418477f64500cd2a8dce046f5d72fec
[memcached] [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-1.4.5]
<= memcached-common <= memcached-common
url = http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz url = http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
md5sum = 583441a25f937360624024f2881e5ea8 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-1.4.4]
<= memcached-common <= memcached-common
url = http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz url = http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
md5sum = 5ca5b24de347e97ac1f48f3785b4178a 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] [memcached-common]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
configure-options = configure-options =
--with-libevent=${libevent:location} --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 patch-options = -p1
environment = environment =
LDFLAGS =-Wl,-rpath=${libevent:location}/lib 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 = ...@@ -5,8 +5,10 @@ extends =
../zlib/buildout.cfg ../zlib/buildout.cfg
../bison/buildout.cfg ../bison/buildout.cfg
../flex/buildout.cfg ../flex/buildout.cfg
../groonga/buildout.cfg
../libtool/buildout.cfg ../libtool/buildout.cfg
../ncurses/buildout.cfg ../ncurses/buildout.cfg
../pkgconfig/buildout.cfg
../readline/buildout.cfg ../readline/buildout.cfg
parts = parts =
...@@ -15,15 +17,15 @@ parts = ...@@ -15,15 +17,15 @@ parts =
[mysql-5.1-sphinx-patch] [mysql-5.1-sphinx-patch]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
md5sum = 6580393ca93ecf564cad0552b91a563e md5sum = eefcd08c400c58d3e89542ab482a8429
filename = mysql-5.1.49-sphinx-1.10.diff filename = mysql-5.1-sphinx-2.0.1-beta.diff
download-only = true download-only = true
[mysql-5.1] [mysql-5.1]
recipe = hexagonit.recipe.cmmi 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 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. # compile directory is required to build mysql plugins.
keep-compile-dir = true keep-compile-dir = true
# configure: how to avoid searching for my.cnf? # configure: how to avoid searching for my.cnf?
...@@ -39,6 +41,7 @@ configure-command = ...@@ -39,6 +41,7 @@ configure-command =
# we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine. # we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine.
configure-options = configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static
--enable-thread-safe-client --enable-thread-safe-client
--enable-local-infile --enable-local-infile
--enable-assembler --enable-assembler
...@@ -54,10 +57,23 @@ configure-options = ...@@ -54,10 +57,23 @@ configure-options =
make-options = make-options =
LIBTOOL=libtool LIBTOOL=libtool
patch-options = -p1 patch-options = -p0
patches = patches =
${mysql-5.1-sphinx-patch:location}/${mysql-5.1-sphinx-patch:filename} ${mysql-5.1-sphinx-patch:location}/${mysql-5.1-sphinx-patch:filename}
environment = environment =
PATH =${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${bison:location}/bin:${flex:location}/bin:%(PATH)s 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 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 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
...@@ -11,11 +11,14 @@ configure-options = ...@@ -11,11 +11,14 @@ configure-options =
--with-shared --with-shared
--without-normal --without-normal
--without-debug --without-debug
--without-gpm
--enable-rpath --enable-rpath
# tricky way to rerun with --enable-widec # tricky way to rerun with --enable-widec
make-targets = 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 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 = environment =
LDFLAGS =-Wl,--as-needed LDFLAGS =-Wl,--as-needed
LDCONFIG=/bin/echo
make-options = make-options =
-j1 -j1
...@@ -4,5 +4,5 @@ parts = ...@@ -4,5 +4,5 @@ parts =
[noVNC] [noVNC]
recipe = hexagonit.recipe.download 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 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 = ...@@ -12,8 +12,8 @@ parts =
[openssl] [openssl]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.0d.tar.gz url = https://www.openssl.org/source/openssl-1.0.0e.tar.gz
md5sum = 40b6ea380cc8a5bf9734c2f8bf7e701e md5sum = 7040b89c4c58c7a1016c0dfa6e821c86
configure-command = ./config configure-command = ./config
configure-options = configure-options =
-I${zlib:location}/include -I${zlib:location}/include
......
...@@ -39,6 +39,6 @@ make-options = ...@@ -39,6 +39,6 @@ make-options =
pre-make-hook = ${pdftk-hooks-download:location}/${pdftk-hooks-download:filename}:pre_make_hook pre-make-hook = ${pdftk-hooks-download:location}/${pdftk-hooks-download:filename}:pre_make_hook
environment = environment =
PATH=${gcc-java:location}/bin:${fastjar:location}/bin:%(PATH)s PATH=${gcc-java-minimal: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 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:location}/lib:${gcc-java:location}/lib64 LD_LIBRARY_PATH=${gcc-java-minimal:location}/lib:${gcc-java-minimal:location}/lib64
...@@ -15,8 +15,8 @@ extends = ...@@ -15,8 +15,8 @@ extends =
[poppler-0.17.1] [poppler-0.17.1]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
md5sum = 8d7276d1943078c76aabe9f2ec52d50b md5sum = b566d1fbaa29b9257bf0ecc130e7b2ca
url = http://poppler.freedesktop.org/poppler-0.17.1.tar.gz url = http://poppler.freedesktop.org/poppler-0.17.2.tar.gz
configure-options = configure-options =
--disable-cairo-output --disable-cairo-output
--disable-cms --disable-cms
...@@ -26,6 +26,7 @@ configure-options = ...@@ -26,6 +26,7 @@ configure-options =
--disable-poppler-cpp --disable-poppler-cpp
--disable-poppler-glib --disable-poppler-glib
--disable-poppler-qt4 --disable-poppler-qt4
--disable-static
--enable-zlib --enable-zlib
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s 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
...@@ -5,8 +5,8 @@ parts = ...@@ -5,8 +5,8 @@ parts =
[sqlite3] [sqlite3]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz url = http://www.sqlite.org/sqlite-autoconf-3070800.tar.gz
md5sum = 554026fe7fac47b1cf61c18d5fe43419 md5sum = 6bfb46d73caaa1bbbcd2b52184b6c542
configure-options = configure-options =
--disable-static --disable-static
--enable-readline --enable-readline
......
...@@ -17,8 +17,8 @@ filename = stunnel-4-hooks.py ...@@ -17,8 +17,8 @@ filename = stunnel-4-hooks.py
[stunnel-4] [stunnel-4]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://ftp.stunnel.org/stunnel/stunnel-4.39.tar.gz url = http://mirror.bit.nl/stunnel/stunnel-4.44.tar.gz
md5sum = 853739119a8364daea750154af6d7e79 md5sum = c9dd51fc02b913ce5bf7b3fc12f9cb4a
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options = configure-options =
--enable-ipv6 --enable-ipv6
......
...@@ -9,11 +9,6 @@ extends = ...@@ -9,11 +9,6 @@ extends =
parts = parts =
w3m w3m
versions = versions
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
[w3m-w3m.gcc.forward.compat.patch] [w3m-w3m.gcc.forward.compat.patch]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename} url =${:_profile_base_location_}/${:filename}
...@@ -50,7 +45,3 @@ environment = ...@@ -50,7 +45,3 @@ environment =
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS=-I${ncurses:location}/include/ -I${zlib:location}/include/ 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 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
...@@ -12,7 +12,8 @@ parts = ...@@ -12,7 +12,8 @@ parts =
libXdmcp libXdmcp
libXext libXext
libXau libXau
libX11 libXinerama
libSM
[xorg-aclocal] [xorg-aclocal]
ACLOCAL=${xorg-util-macros:location}/share/aclocal ACLOCAL=${xorg-util-macros:location}/share/aclocal
...@@ -61,8 +62,6 @@ configure-options = ...@@ -61,8 +62,6 @@ configure-options =
--disable-static --disable-static
environment = environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig 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 PATH=${pkgconfig:location}/bin:%(PATH)s
[xcbproto] [xcbproto]
...@@ -87,8 +86,6 @@ configure-options = ...@@ -87,8 +86,6 @@ configure-options =
--disable-build-docs --disable-build-docs
environment = 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 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 PATH=${pkgconfig:location}/bin:${libxslt:location}/bin:%(PATH)s
PYTHON=${buildout:executable} PYTHON=${buildout:executable}
# Python note: libxcb requires python with ElementTree. In case of appliance # Python note: libxcb requires python with ElementTree. In case of appliance
...@@ -119,8 +116,8 @@ patch-options = -p1 ...@@ -119,8 +116,8 @@ patch-options = -p1
[libXext-patch-link-error] [libXext-patch-link-error]
# Fixes libXext.la link error # Fixes libXext.la link error
# http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
#url = http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
download-only = true download-only = true
filename = 700c7896b832d6e4fb0185f0d5382b01f94e7141.patch filename = 700c7896b832d6e4fb0185f0d5382b01f94e7141.patch
...@@ -139,14 +136,11 @@ configure-options = ...@@ -139,14 +136,11 @@ configure-options =
--disable-specs --disable-specs
--without-xmlto --without-xmlto
--without-fop --without-fop
environment = 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:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig 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:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
LD_RUN_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 PATH=${pkgconfig:location}/bin:%(PATH)s
CFLAGS=-I${xproto:location}/include
CPPFLAGS=-I${xproto:location}/include
[inputproto] [inputproto]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
...@@ -164,8 +158,6 @@ url = http://www.x.org/releases/X11R7.6/src/lib/libXdmcp-1.1.0.tar.bz2 ...@@ -164,8 +158,6 @@ url = http://www.x.org/releases/X11R7.6/src/lib/libXdmcp-1.1.0.tar.bz2
md5sum = 762b6bbaff7b7d0831ddb4f072f939a5 md5sum = 762b6bbaff7b7d0831ddb4f072f939a5
environment = environment =
PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig:${xproto:location}/lib/pkgconfig 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 PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options = configure-options =
--disable-static --disable-static
......
...@@ -15,17 +15,12 @@ extends = ...@@ -15,17 +15,12 @@ extends =
parts = parts =
xtrabackup xtrabackup
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
[xtrabackup-build-patch-download] [xtrabackup-build-patch-download]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
md5sum = e018df8bb3ed672891388556b8e91e35 md5sum = 95b2c2ef625f88d85bf8876269a19372
download-only = true download-only = true
filename = xtrabackup_build.patch filename = xtrabackup-1.6.2_build.patch
[allow_force_ibbackup.patch] [allow_force_ibbackup.patch]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
...@@ -36,8 +31,8 @@ filename = ${:_buildout_section_name_} ...@@ -36,8 +31,8 @@ filename = ${:_buildout_section_name_}
[xtrabackup] [xtrabackup]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://www.percona.com/redir/downloads/XtraBackup/XtraBackup-1.6/source/xtrabackup-1.6.tar.gz url = http://www.percona.com/redir/downloads/XtraBackup/xtrabackup-1.6.2/source/xtrabackup-1.6.2.tar.gz
md5sum = 7c263723312cba36539df4cd7a119744 md5sum = 933243ae362156c98f1211eb87b3b4ea
make-binary = true make-binary = true
patches = patches =
${xtrabackup-build-patch-download:location}/${xtrabackup-build-patch-download:filename} ${xtrabackup-build-patch-download:location}/${xtrabackup-build-patch-download:filename}
...@@ -51,7 +46,3 @@ environment = ...@@ -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 PATH=${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${flex:location}/bin:%(PATH)s:${bison:location}/bin
make-options = make-options =
-j1 -j1
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-001
diff --git a/Makefile b/Makefile diff -ur xtrabackup-1.6.2.orig/Makefile xtrabackup-1.6.2/Makefile
index dbb15d5..852a627 100644 --- xtrabackup-1.6.2.orig/Makefile 2011-07-19 05:16:22.000000000 +0900
--- a/Makefile +++ xtrabackup-1.6.2/Makefile 2011-07-27 17:58:38.108925111 +0900
+++ b/Makefile @@ -137,5 +137,5 @@
@@ -137,5 +137,5 @@ $(TARGET): xtrabackup.o $(INNODBOBJS) $(MYSQLOBJS)
clean: clean:
rm -f *.o xtrabackup_* rm -f *.o xtrabackup_*
install: install:
- install -m 755 innobackupex-1.5.1 $(BIN_DIR) - install -m 755 innobackupex-1.5.1 $(BIN_DIR)
+ install -m 755 innobackupex-1.5.1 $(BIN_DIR)/innobackupex + install -m 755 innobackupex-1.5.1 $(BIN_DIR)/innobackupex
install -m 755 xtrabackup_* $(BIN_DIR) install -m 755 xtrabackup_* $(BIN_DIR)
diff --git a/utils/build.sh b/utils/build.sh diff -ur xtrabackup-1.6.2.orig/utils/build.sh xtrabackup-1.6.2/utils/build.sh
index 3f0cee7..c41dc89 100755 --- xtrabackup-1.6.2.orig/utils/build.sh 2011-07-19 05:16:22.000000000 +0900
--- a/utils/build.sh +++ xtrabackup-1.6.2/utils/build.sh 2011-07-27 18:01:53.809212142 +0900
+++ b/utils/build.sh @@ -21,12 +21,14 @@
@@ -21,12 +21,14 @@ function usage()
{ {
echo "Build an xtrabackup binary against the specified InnoDB flavor." echo "Build an xtrabackup binary against the specified InnoDB flavor."
echo echo
...@@ -29,7 +27,7 @@ index 3f0cee7..c41dc89 100755 ...@@ -29,7 +27,7 @@ index 3f0cee7..c41dc89 100755
exit -1 exit -1
} }
@@ -79,7 +81,12 @@ function build_server() @@ -79,7 +81,12 @@
{ {
echo "Configuring the server" echo "Configuring the server"
cd $server_dir cd $server_dir
...@@ -43,19 +41,22 @@ index 3f0cee7..c41dc89 100755 ...@@ -43,19 +41,22 @@ index 3f0cee7..c41dc89 100755
eval $configure_cmd eval $configure_cmd
echo "Building the server" echo "Building the server"
@@ -92,9 +99,10 @@ function build_xtrabackup() @@ -92,12 +99,13 @@
echo "Building XtraBackup" echo "Building XtraBackup"
mkdir $build_dir mkdir $build_dir
cp $top_dir/Makefile $top_dir/xtrabackup.c $build_dir cp $top_dir/Makefile $top_dir/xtrabackup.c $build_dir
+ cp $top_dir/innobackupex $build_dir/innobackupex-1.5.1 + cp $top_dir/innobackupex $build_dir/innobackupex-1.5.1
# Read XTRABACKUP_VERSION from the VERSION file
. $top_dir/VERSION
cd $build_dir cd $build_dir
- $MAKE_CMD $xtrabackup_target - $MAKE_CMD $xtrabackup_target XTRABACKUP_VERSION=$XTRABACKUP_VERSION
+ $MAKE_CMD PREFIX=$1 $xtrabackup_target + $MAKE_CMD $xtrabackup_target XTRABACKUP_VERSION=$XTRABACKUP_VERSION PREFIX=$1
cd $top_dir cd $top_dir
} }
@@ -103,11 +111,36 @@ function build_tar4ibd() @@ -106,11 +114,36 @@
echo "Building tar4ibd" echo "Building tar4ibd"
unpack_and_patch libtar-1.2.11.tar.gz tar4ibd_libtar-1.2.11.patch unpack_and_patch libtar-1.2.11.tar.gz tar4ibd_libtar-1.2.11.patch
cd libtar-1.2.11 cd libtar-1.2.11
...@@ -93,7 +94,7 @@ index 3f0cee7..c41dc89 100755 ...@@ -93,7 +94,7 @@ index 3f0cee7..c41dc89 100755
################################################################################ ################################################################################
# Do all steps to build the server, xtrabackup and tar4ibd # Do all steps to build the server, xtrabackup and tar4ibd
# Expects the following variables to be set before calling: # Expects the following variables to be set before calling:
@@ -136,9 +169,15 @@ function build_all() @@ -141,9 +174,15 @@
build_server build_server
...@@ -111,7 +112,7 @@ index 3f0cee7..c41dc89 100755 ...@@ -111,7 +112,7 @@ index 3f0cee7..c41dc89 100755
} }
if ! test -f xtrabackup.c if ! test -f xtrabackup.c
@@ -148,6 +187,15 @@ then @@ -153,6 +192,15 @@
fi fi
type=$1 type=$1
...@@ -127,12 +128,12 @@ index 3f0cee7..c41dc89 100755 ...@@ -127,12 +128,12 @@ index 3f0cee7..c41dc89 100755
top_dir=`pwd` top_dir=`pwd`
case "$type" in case "$type" in
@@ -161,9 +209,10 @@ case "$type" in @@ -166,9 +214,10 @@
--with-plugins=innobase \ --with-plugins=innobase \
--with-zlib-dir=bundled \ --with-zlib-dir=bundled \
--enable-shared \ --enable-shared \
- --with-extra-charsets=complex" - --with-extra-charsets=all"
+ --with-extra-charsets=complex \ + --with-extra-charsets=all \
+ --prefix=$2" + --prefix=$2"
- build_all - build_all
...@@ -140,7 +141,7 @@ index 3f0cee7..c41dc89 100755 ...@@ -140,7 +141,7 @@ index 3f0cee7..c41dc89 100755
;; ;;
"innodb55" | "5.5") "innodb55" | "5.5")
@@ -225,7 +274,7 @@ case "$type" in @@ -230,7 +279,7 @@
build_server build_server
......
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.23-dev' version = '0.31-dev'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
...@@ -40,6 +40,7 @@ setup(name=name, ...@@ -40,6 +40,7 @@ setup(name=name,
entry_points={ entry_points={
'zc.buildout': [ 'zc.buildout': [
'download = slapos.recipe.download:Recipe', 'download = slapos.recipe.download:Recipe',
'davstorage = slapos.recipe.davstorage:Recipe',
'erp5 = slapos.recipe.erp5:Recipe', 'erp5 = slapos.recipe.erp5:Recipe',
'erp5testnode = slapos.recipe.erp5testnode:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe', 'helloworld = slapos.recipe.helloworld:Recipe',
......
##############################################################################
#
# 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"
This diff is collapsed.
This diff is collapsed.
...@@ -4,3 +4,4 @@ SSLCertificateKeyFile %(login_key)s ...@@ -4,3 +4,4 @@ SSLCertificateKeyFile %(login_key)s
SSLRandomSeed startup builtin SSLRandomSeed startup builtin
SSLRandomSeed connect builtin SSLRandomSeed connect builtin
SSLProxyEngine On
...@@ -9,10 +9,25 @@ defaults ...@@ -9,10 +9,25 @@ defaults
retries 1 retries 1
option redispatch option redispatch
maxconn 2000 maxconn 2000
timeout server 3000s # it is useless to have timeout much bigger than the one of apache.
timeout queue 5s # By default apache use 300s, so we set slightly more in order to
timeout connect 10s # make sure that apache will first stop the connection.
timeout client 3600s 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 listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert cookie SERVERID insert
......
CREATE DATABASE IF NOT EXISTS %(mysql_database)s; 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@'%%' 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 { %(file_list)s {
daily daily
dateext dateext
rotate 3650
compress compress
notifempty notifempty
sharedscripts sharedscripts
......
This diff is collapsed.
# ZEO configuration file generated by SlapOS # ZEO configuration file generated by SlapOS
<zeo> <zeo>
address %(zeo_ip)s:%(zeo_port)s address %(zeo_ip)s:%(zeo_port)s
read-only false
invalidation-queue-size 100
pid-filename %(zeo_pid)s pid-filename %(zeo_pid)s
</zeo> </zeo>
...@@ -10,6 +8,7 @@ ...@@ -10,6 +8,7 @@
<eventlog> <eventlog>
<logfile> <logfile>
dateformat
path %(zeo_event_log)s path %(zeo_event_log)s
</logfile> </logfile>
</eventlog> </eventlog>
<zodb_db %(storage_name)s> <zodb_db %(storage_name)s>
cache-size %(zodb_cache_size)d
mount-point %(mount_point)s mount-point %(mount_point)s
<zeoclient> <zeoclient>
cache-size %(zeo_client_cache_size)s
server %(address)s server %(address)s
storage %(storage_name)s storage %(storage_name)s
name %(storage_name)s name %(storage_name)s
......
<zodb_db root> <zodb_db root>
cache-size %(zodb_cache_size)d
<filestorage> <filestorage>
path %(zodb_root_path)s path %(zodb_root_path)s
</filestorage> </filestorage>
......
...@@ -7,10 +7,8 @@ instancehome $INSTANCE ...@@ -7,10 +7,8 @@ instancehome $INSTANCE
# Used products # Used products
%(products)s %(products)s
# Environment override # Environment is setup in running wrapper script
<environment> # Reason: zope.conf is read too late for some componets
%(environment)s
</environment>
# No need to debug # No need to debug
debug-mode off debug-mode off
...@@ -34,11 +32,13 @@ lock-filename %(lock-filename)s ...@@ -34,11 +32,13 @@ lock-filename %(lock-filename)s
# Logging configuration # Logging configuration
<eventlog> <eventlog>
<logfile> <logfile>
dateformat
path %(event_log)s path %(event_log)s
</logfile> </logfile>
</eventlog> </eventlog>
<logger access> <logger access>
<logfile> <logfile>
dateformat
path %(z2_log)s path %(z2_log)s
</logfile> </logfile>
</logger> </logger>
......
This diff is collapsed.
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)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
exec %(real_binary)s --defaults-file=%(configuration_file)s
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment