Commit 9f913f30 authored by Alain Takoudjou's avatar Alain Takoudjou

Merge branch 'master' into grid-computing

Conflicts:
	software/ajaxplorer/software.cfg
parents e4c1d202 95eb1ab3
...@@ -9,3 +9,5 @@ eggs/ ...@@ -9,3 +9,5 @@ eggs/
parts/ parts/
slapos.cookbook.egg-info slapos.cookbook.egg-info
.*.swp .*.swp
*~
\#*\#
\ No newline at end of file
Changes Changes
======= =======
0.78.4.dev (2013-07-18)
-----------------------
0.78.3 (2013-07-18)
-------------------
* slapos.cookbook:publish: Add support to publish information for slaves. [Cedric Le Ninivin]
0.78.2 (2013-07-18)
-------------------
* Fix slapos.cookbook:request: Add backward compatiblity about getInstanceGuid(). [Cedric de Saint Martin]
* slapos.cookbook:check_* promises: Add timeout to curl that is not otherwise killed by slapos promise subsystem. [Cedric de Saint Martin]
* Cloudooo: Allow any environment variables. [Yusei Tahara]
* ERP5: disable MariaDB query cache completely by 'query_cache_type = 0' for ERP5. [Kazuhiko Shiozaki]
* ERP5: enable haproxy admin socket and install haproxyctl script. [Kazuhiko Shiozaki]
* ERP5: increase the maximum number of open file descriptors before starting mysqld. [Kazuhiko Shiozaki]
* python 2.7: updated to 2.7.5 [Cedric de Saint Martin]
0.78.1 (2013-05-31)
-------------------
* Add boinc recipe: Allow to deploy an empty BOINC project. [Alain Takoudjou]
* Add boinc.app recipe: Allow to deploy and update a BOINC application into existing BOINC server instance . [Alain Takoudjou]
* Add boinc.client recipe: Allow to deploy a BOINC Client instance on SlapOS. [Alain Takoudjou]
* Add condor recipe: Allow to deploy Condor Manager or Condor worker instance on SlapOS. [Alain Takoudjou]
* Add condor.submit recipe: Allow to deploy or update application into existing Condor Manager instance. [Alain Takoudjou]
* Add redis.server recipe: Allow to deploy Redis server. [Alain Takoudjou]
* Add trac recipe: for deploying Trac and manage project with support of SVN and GIT. [Alain Takoudjou]
* Add bonjourgrid recipe: for deploying BonjourGrid Master and submit BOINC or Condor project. [Alain Takoudjou]
* Add bonjourgrid.client recipe: for deploying BonjourGrid Worker instance and execute BOINC or Condor Jobs. [Alain Takoudjou]
0.78.0 (2013-04-28) 0.78.0 (2013-04-28)
------------------- -------------------
......
...@@ -23,6 +23,7 @@ extends = ...@@ -23,6 +23,7 @@ extends =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
depends = depends =
${mariadb:version} ${mariadb:version}
${libpng:so_version}
url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2 url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2
md5sum = 5c7b614242ae12e9cacca21c8ab84818 md5sum = 5c7b614242ae12e9cacca21c8ab84818
configure-options = configure-options =
...@@ -71,6 +72,7 @@ environment = ...@@ -71,6 +72,7 @@ environment =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
depends = depends =
${postgresql:url} ${postgresql:url}
${libpng:so_version}
url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2 url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2
md5sum = 5c7b614242ae12e9cacca21c8ab84818 md5sum = 5c7b614242ae12e9cacca21c8ab84818
configure-options = configure-options =
......
[buildout]
extends =
../apache/buildout.cfg
../python-2.7/buildout.cfg
../bzip2/buildout.cfg
../gdbm/buildout.cfg
../gettext/buildout.cfg
../libexpat/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
../readline/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
../file/buildout.cfg
parts =
apache-wsgi
[python2.7]
configure-options =
--enable-shared
--disable-static
--enable-ipv6
--enable-unicode=ucs4
--with-system-expat
--with-threads
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file:location}/lib
LD_RUN_PATH=${buildout:parts-directory}/${:_buildout_section_name_}/lib
[apache-wsgi]
recipe = hexagonit.recipe.cmmi
url = http://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
md5sum = f42d69190ea0c337ef259cbe8d94d985
configure-options =
--with-apxs=${apache:location}/bin/apxs
--with-python=${python2.7:location}/bin/python2.7
environment =
CPPFLAGS = -I${python2.7:location}/include/python2.7
LDFLAGS = -L${python2.7:location}/lib
...@@ -120,8 +120,9 @@ make-targets = ...@@ -120,8 +120,9 @@ make-targets =
[apache-2.2] [apache-2.2]
# 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 = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.24.tar.gz version = 2.2.25
md5sum = 64a3392018ad60583209a16d728180d3 url = http://mir2.ovh.net/ftp.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 9ebe3070c0bb4311f21a0cd0e34f0045
patch-options = -p1 patch-options = -p1
configure-options = --disable-static configure-options = --disable-static
--enable-authn-alias --enable-authn-alias
...@@ -182,6 +183,8 @@ environment = ...@@ -182,6 +183,8 @@ environment =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2/download url = http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2/download
md5sum = 66862bf10e9be3a023e475604a28a0b4 md5sum = 66862bf10e9be3a023e475604a28a0b4
depends =
${apache-2.2:version}
configure-command = ${apache-2.2:location}/bin/apxs configure-command = ${apache-2.2:location}/bin/apxs
configure-options = -c mod_antiloris.c configure-options = -c mod_antiloris.c
make-binary = ${:configure-command} make-binary = ${:configure-command}
......
...@@ -47,15 +47,17 @@ filename = boinc-abs-path.patch ...@@ -47,15 +47,17 @@ filename = boinc-abs-path.patch
[boinc-package] [boinc-package]
recipe = plone.recipe.command recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
tarball = ${buildout:parts-directory}/boinc.tar.gz
svnversion = ${subversion:location}/bin/svnversion svnversion = ${subversion:location}/bin/svnversion
command = ${subversion:location}/bin/svn co http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \ command = ${subversion:location}/bin/svn co --revision 26162 http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command =
# Compile now boinc client # Compile now boinc client
[boinc] [boinc]
recipe = hexagonit.recipe.cmmi recipe = slapos.recipe.cmmi
url = ${boinc-package:location} url = ${boinc-package:tarball}
source = ${buildout:parts-directory}/${:_buildout_section_name_}__compile__
configure-command = configure-command =
echo 'AC_PROG_OBJCXX' >> configure.ac echo 'AC_PROG_OBJCXX' >> configure.ac
aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal
......
...@@ -26,16 +26,24 @@ keep-compile-dir = false ...@@ -26,16 +26,24 @@ keep-compile-dir = false
[boinc-package] [boinc-package]
recipe = plone.recipe.command recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
tarball = ${buildout:parts-directory}/boinc.tar.gz
svnversion = ${subversion:location}/bin/svnversion svnversion = ${subversion:location}/bin/svnversion
command = ${subversion:location}/bin/svn co http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \ command = ${subversion:location}/bin/svn co --revision 26162 http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
sed -i "20i\#include <unistd.h>" ${:location}/tools/process_input_template.cpp && \
sed -i "25i\#include <unistd.h>" ${:location}/sched/single_job_assimilator.cpp && \
sed -i "27i\#include <unistd.h>" ${:location}/tools/create_work.cpp && \
sed -i 's#--prefix=$(prefix)#--prefix=/$(prefix)#' ${:location}/py/Makefile.am && \
sed -i 's#parent::base_escape_string#@parent::base_escape_string#' ${:location}/html/inc/boinc_db.inc
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command =
# Compile now boinc # Compile now boinc
# When installing boinc python module, path /srv/slapgrid/... is strip to srv/slapgrid... It is why # When installing boinc python module, path /srv/slapgrid/... is strip to srv/slapgrid... It is why
# we need to set --prefix="/${buildout:parts-directory}/${:_buildout_section_name_}" # we need to set --prefix="/${buildout:parts-directory}/${:_buildout_section_name_}"
[boinc] [boinc]
recipe = hexagonit.recipe.cmmi recipe = slapos.recipe.cmmi
url = ${boinc-package:location} url = ${boinc-package:tarball}
keep-compile-dir = true keep-compile-dir = true
source = ${buildout:parts-directory}/${:_buildout_section_name_}__compile__ source = ${buildout:parts-directory}/${:_buildout_section_name_}__compile__
configure-command = configure-command =
...@@ -44,11 +52,10 @@ configure-command = ...@@ -44,11 +52,10 @@ configure-command =
./_autosetup ./_autosetup
./configure ./configure
configure-options = configure-options =
--prefix="/${buildout:parts-directory}/${:_buildout_section_name_}" --prefix="${buildout:parts-directory}/${:_buildout_section_name_}"
--disable-fcgi --disable-fcgi
--disable-shared --disable-shared
--enable-static --enable-static
--with-pic
--disable-manager --disable-manager
--disable-client --disable-client
--with-pkg-config --with-pkg-config
...@@ -59,13 +66,14 @@ configure-options = ...@@ -59,13 +66,14 @@ configure-options =
--with-libcurl=${curl:location}/lib --with-libcurl=${curl:location}/lib
--with-x=no --with-x=no
environment = environment =
PATH=${pkgconfig:location}/bin:${automake:location}/bin:${autoconf:location}/bin:${libtool:location}/bin:${subversion:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:${automake:location}/bin:${autoconf:location}/bin:${libtool:location}/bin:${subversion:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
M4=${m4:location}/bin/m4 M4=${m4:location}/bin/m4
CFLAGS=-fPIC
CPPFLAGS=-I${openssl:location}/include -I${mariadb:location}/include CPPFLAGS=-I${openssl:location}/include -I${mariadb:location}/include
LDFLAGS = -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${mariadb:location}/lib -Wl,-rpath=${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS = -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${mariadb:location}/lib -Wl,-rpath=${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
MYSQL_CONFIG=${mariadb:location}/bin/mysql_config MYSQL_CONFIG=${mariadb:location}/bin/mysql_config
ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${libtool:location}/share/aclocal ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${libtool:location}/share/aclocal
\ No newline at end of file
...@@ -36,7 +36,7 @@ script = ...@@ -36,7 +36,7 @@ script =
wrapper_location = os.path.join("%(location)s", "chrome-slapos") wrapper_location = os.path.join("%(location)s", "chrome-slapos")
wrapper = open(wrapper_location, 'w') wrapper = open(wrapper_location, 'w')
wrapper.write("""#!/bin/sh wrapper.write("""#!/bin/sh
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng:location}/lib:%(location)s export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng15:location}/lib:%(location)s
%(location)s/chrome""") %(location)s/chrome""")
wrapper.flush() wrapper.flush()
wrapper.close() wrapper.close()
......
...@@ -22,7 +22,7 @@ git-executable = ${git:location}/bin/git ...@@ -22,7 +22,7 @@ git-executable = ${git:location}/bin/git
[cloudooo] [cloudooo]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.6 python = python2.7
extra-paths = ${cloudooo-repository:location} extra-paths = ${cloudooo-repository:location}
eggs = eggs =
${lxml-python:egg} ${lxml-python:egg}
......
...@@ -2,13 +2,6 @@ ...@@ -2,13 +2,6 @@
parts = parts =
condor condor
libexpat
kerberos
perl
openldap
java
dash
zlib
extends = extends =
../libexpat/buildout.cfg ../libexpat/buildout.cfg
...@@ -21,7 +14,33 @@ extends = ...@@ -21,7 +14,33 @@ extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
[condor] [condor]
recipe = hexagonit.recipe.download recipe = slapos.recipe.build
url = https://doc-0c-60-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/5sp63u5v03ie9nu49dfodreb2dcomstb/1369231200000/01656987990562299665/*/0B9HYL8A0vSryTTIxX29rM0N6N28?e=download slapos_promise =
md5sum = e7d96746fc9102ca4583f8cd5eb472e0 directory:bin
strip-top-level-dir = true directory:etc
directory:examples
directory:include
directory:lib
directory:libexec
directory:man
directory:src
directory:sbin
depends =
${libexpat:location}
${kerberos:location}
${perl:location}
${openldap:location}
${java:location}
${dash:location}
${zlib:location}
x86 = http://parrot.cs.wisc.edu//symlink/20130530031504/7/7.9/7.9.5/28b36a94ad1a405bac689a76b6c353a7/condor-7.9.5-x86_Debian6-unstripped.tar.gz 227059bb9bebc9033665bb246d90a7bb
x86-64 = http://parrot.cs.wisc.edu//symlink/20130530031504/7/7.9/7.9.5/7000a12f9a22765b457e2958762871d5/condor-7.9.5-x86_64_Debian6-stripped.tar.gz 30fa4cebabb8ff4971c769f4ef74ba68
script =
if not self.options.get('path'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
extends = extends =
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
parts = parts =
coreutils coreutils-output
[coreutils] [coreutils]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
...@@ -13,3 +13,13 @@ configure-options = ...@@ -13,3 +13,13 @@ configure-options =
environment = environment =
PATH=${xz-utils:location}/bin:%(PATH)s PATH=${xz-utils:location}/bin:%(PATH)s
LDFLAGS =-Wl,--as-needed LDFLAGS =-Wl,--as-needed
[coreutils-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${:test} -x ${:test} -a -x ${:cat} -a -x ${:rm}
test = ${coreutils:location}/bin/test
cat = ${coreutils:location}/bin/cat
rm = ${coreutils:location}/bin/rm
...@@ -11,8 +11,8 @@ parts = ...@@ -11,8 +11,8 @@ parts =
[curl] [curl]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://curl.haxx.se/download/curl-7.30.0.tar.bz2 url = http://curl.haxx.se/download/curl-7.31.0.tar.bz2
md5sum = 0db5ec03a5001b42a2edc03bf63b5ceb md5sum = b7bea20579ac2f696338ae03f2c19ba5
configure-options = configure-options =
--disable-static --disable-static
--disable-ldap --disable-ldap
......
[buildout] [buildout]
extends =
../coreutils/buildout.cfg
parts = dash parts = dash-output
[dash] [dash]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
...@@ -10,3 +12,11 @@ configure-options = ...@@ -10,3 +12,11 @@ configure-options =
--disable-static --disable-static
--disable-fnmatch --disable-fnmatch
--disable-glob --disable-glob
[dash-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:dash}
dash = ${dash:location}/bin/dash
[buildout] [buildout]
parts = dcron extends =
../coreutils/buildout.cfg
parts = dcron-output
[dcron-hooks-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 860e914dff4108b47565965fe5ebc7b5
download-only = true
filename = dcron-hooks.py
[dcron-patch-nonroot] [dcron-patch-nonroot]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
md5sum = 2f5b22dc1cbe81060a9c28e6f5c06e8b md5sum = d5408ab682b65cc1eda40d588fcd7db8
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
filename = dcron-4.4.noroot.no.globals.patch filename = dcron-4.4.noroot.no.globals.patch
download-only = true download-only = true
...@@ -18,3 +28,13 @@ patches = ...@@ -18,3 +28,13 @@ patches =
patch-options = -p1 patch-options = -p1
make-options = make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_} PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
post-make-hook = ${dcron-hooks-download:location}/${dcron-hooks-download:filename}:post_make_hook
[dcron-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:crond} -a -x ${:crontab} -a ! -u ${:crontab}
crond = ${dcron:location}/sbin/crond
crontab = ${dcron:location}/bin/crontab
# Patch for making dcron usable without root user, as a local service
diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c
--- dcron-4.4.org/chuser.c 2010-01-18 16:27:31.000000000 +0100 --- dcron-4.4.org/chuser.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/chuser.c 2011-04-01 11:19:19.000000000 +0200 +++ dcron-4.4/chuser.c 2013-07-18 18:17:16.342147418 +0200
@@ -14,47 +14,6 @@ @@ -14,47 +14,6 @@
int int
ChangeUser(const char *user, char *dochdir) ChangeUser(const char *user, char *dochdir)
...@@ -53,7 +52,16 @@ diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c ...@@ -53,7 +52,16 @@ diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c
diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c
--- dcron-4.4.org/crontab.c 2010-01-18 16:27:31.000000000 +0100 --- dcron-4.4.org/crontab.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/crontab.c 2011-04-01 11:19:19.000000000 +0200 +++ dcron-4.4/crontab.c 2013-07-18 18:18:07.768535485 +0200
@@ -88,7 +88,7 @@
break;
case 'c':
/* getopt guarantees optarg != 0 here */
- if (*optarg != 0 && getuid() == geteuid()) {
+ if (*optarg != 0) {
CDir = optarg;
} else {
printlogf(0, "-c option: superuser only");
@@ -316,9 +316,6 @@ @@ -316,9 +316,6 @@
close(filedes[0]); close(filedes[0]);
...@@ -75,7 +83,7 @@ diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c ...@@ -75,7 +83,7 @@ diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c
ptr = PATH_VI; ptr = PATH_VI;
diff -ru dcron-4.4.org/job.c dcron-4.4/job.c diff -ru dcron-4.4.org/job.c dcron-4.4/job.c
--- dcron-4.4.org/job.c 2010-01-18 16:27:31.000000000 +0100 --- dcron-4.4.org/job.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/job.c 2011-04-01 11:19:19.000000000 +0200 +++ dcron-4.4/job.c 2013-07-18 18:17:16.342147418 +0200
@@ -62,14 +62,6 @@ @@ -62,14 +62,6 @@
* Change running state to the user in question * Change running state to the user in question
*/ */
...@@ -108,7 +116,7 @@ diff -ru dcron-4.4.org/job.c dcron-4.4/job.c ...@@ -108,7 +116,7 @@ diff -ru dcron-4.4.org/job.c dcron-4.4/job.c
/* /*
diff -ru dcron-4.4.org/Makefile dcron-4.4/Makefile diff -ru dcron-4.4.org/Makefile dcron-4.4/Makefile
--- dcron-4.4.org/Makefile 2010-01-18 16:27:31.000000000 +0100 --- dcron-4.4.org/Makefile 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/Makefile 2011-04-01 11:19:35.000000000 +0200 +++ dcron-4.4/Makefile 2013-07-18 18:17:16.342147418 +0200
@@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
# these variables can be configured by e.g. `make SCRONTABS=/different/path` # these variables can be configured by e.g. `make SCRONTABS=/different/path`
......
import os
import shutil
def post_make_hook(options, buildout):
crontab_path = os.path.join(options['location'], 'bin', 'crontab')
os.chmod(crontab_path, 0750)
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
[buildout] [buildout]
extends = extends =
../zlib/buildout.cfg ../zlib/buildout.cfg
../coreutils/buildout.cfg
parts = parts =
dropbear dropbear-output
[dropbear-userspace-patch] [dropbear-userspace-patch]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
...@@ -63,3 +64,12 @@ patches= ...@@ -63,3 +64,12 @@ patches=
patch-options= patch-options=
-p1 -p1
[dropbear-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:ssh} -a -x ${:keygen}
ssh = ${dropbear:location}/bin/dbclient
keygen = ${dropbear:location}/bin/dropbearkey
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
extends = extends =
../bzip2/buildout.cfg ../bzip2/buildout.cfg
../libpng/buildout.cfg ../libpng/buildout.cfg
../patch/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
...@@ -28,14 +29,25 @@ environment = ...@@ -28,14 +29,25 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig
[libtheora-png_sizeof.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = libtheora-png_sizeof.patch
md5sum = eaa1454081b50f05b59495a12f52b0d5
download-only = true
[libtheora] [libtheora]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2 url = http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
md5sum = 292ab65cedd5021d6b7ddd117e07cd8e md5sum = 292ab65cedd5021d6b7ddd117e07cd8e
depends =
${libpng:so_version}
patches = ${libtheora-png_sizeof.patch:location}/${libtheora-png_sizeof.patch:filename}
patch-options = -p1
configure-options = configure-options =
--disable-static --disable-static
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${patch:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libvorbis:location}/lib/pkgconfig PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libvorbis:location}/lib/pkgconfig
[yasm] [yasm]
......
--- libtheora-1.1.1/examples/png2theora.c.orig 2009-08-23 03:14:04.000000000 +0900
+++ libtheora-1.1.1/examples/png2theora.c 2013-07-16 12:40:07.629087870 +0900
@@ -462,9 +462,9 @@
png_set_strip_alpha(png_ptr);
row_data = (png_bytep)png_malloc(png_ptr,
- 3*height*width*png_sizeof(*row_data));
+ 3*height*width*sizeof(*row_data));
row_pointers = (png_bytep *)png_malloc(png_ptr,
- height*png_sizeof(*row_pointers));
+ height*sizeof(*row_pointers));
for(y = 0; y < height; y++) {
row_pointers[y] = row_data + y*(3*width);
}
...@@ -34,7 +34,7 @@ script = ...@@ -34,7 +34,7 @@ script =
wrapper = open(wrapper_location, 'w') wrapper = open(wrapper_location, 'w')
wrapper.write("""#!${dash:location}/bin/dash wrapper.write("""#!${dash:location}/bin/dash
cd %(location)s cd %(location)s
export LD_LIBRARY_PATH=%(location)s:${libXrender:location}/lib/:{dbus:location}/lib/:${dbus-glib:location}/lib/:${freetype:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${bzip2:location}/lib/:${libXext:location}/lib/:${libXt:location}/lib/:${zlib:location}/lib/:${libXcursor:location}/lib/:${gtk-2:location}/lib/:${cairo:location}/lib/:${pango:location}/lib/:${glib:location}/lib/:${atk:location}/lib/:${gdk-pixbuf:location}/lib/:${alsa:location}/lib/:${libpng:location}/lib/:${libSM:location}/lib/:${libICE:location}/lib:${libxml2:location}/lib:${openssl:location}/lib export LD_LIBRARY_PATH=%(location)s:${libXrender:location}/lib/:{dbus:location}/lib/:${dbus-glib:location}/lib/:${freetype:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${bzip2:location}/lib/:${libXext:location}/lib/:${libXt:location}/lib/:${zlib:location}/lib/:${libXcursor:location}/lib/:${gtk-2:location}/lib/:${cairo:location}/lib/:${pango:location}/lib/:${glib:location}/lib/:${atk:location}/lib/:${gdk-pixbuf:location}/lib/:${alsa:location}/lib/:${libpng15:location}/lib/:${libSM:location}/lib/:${libICE:location}/lib:${libxml2:location}/lib:${openssl:location}/lib
export PATH=${fontconfig:location}/bin:$PATH export PATH=${fontconfig:location}/bin:$PATH
exec %(location)s/firefox $*""") exec %(location)s/firefox $*""")
wrapper.close() wrapper.close()
......
...@@ -19,18 +19,18 @@ md5sum = 5c781723a0d9ed6188960defba8e91cf ...@@ -19,18 +19,18 @@ md5sum = 5c781723a0d9ed6188960defba8e91cf
destination = ${fonts:location}/${:_buildout_section_name_} destination = ${fonts:location}/${:_buildout_section_name_}
# IPAex and IPA Font - Japanese fonts provided by IPA # IPAex and IPA Font - Japanese fonts provided by IPA
# http://ossipedia.ipa.go.jp/ipafont/index.html # http://ipafont.ipa.go.jp/
[ipaex-fonts] [ipaex-fonts]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
strip-top-level-dir = true strip-top-level-dir = true
url = http://ossipedia.ipa.go.jp/ipafont/ipaexfont/IPAexfont00201.php url = http://ipafont.ipa.go.jp/ipaexfont/IPAexfont00201.php
md5sum = 7bf84182a04a9632268dbcb03f100d05 md5sum = 7bf84182a04a9632268dbcb03f100d05
destination = ${fonts:location}/${:_buildout_section_name_} destination = ${fonts:location}/${:_buildout_section_name_}
[ipa-fonts] [ipa-fonts]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
strip-top-level-dir = true strip-top-level-dir = true
url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAfont00303.zip url = http://ipafont.ipa.go.jp/ipafont/IPAfont00303.php
md5sum = 39a828acf27790adbe4944dfb4d94bb1 md5sum = 39a828acf27790adbe4944dfb4d94bb1
destination = ${fonts:location}/${:_buildout_section_name_} destination = ${fonts:location}/${:_buildout_section_name_}
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
[buildout] [buildout]
extends = extends =
../bzip2/buildout.cfg ../bzip2/buildout.cfg
../libpng/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
parts = parts =
...@@ -11,10 +12,13 @@ parts = ...@@ -11,10 +12,13 @@ parts =
[freetype] [freetype]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.bz2 url = http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.1.tar.bz2
md5sum = b93435488942486c8d0ca22e8f768034 md5sum = c72e9010b1d986d556fc0b2b5fcbf31a
depends =
${libpng:so_version}
configure-options = configure-options =
--disable-static --disable-static
environment = environment =
CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PATH=${libpng:location}/bin:%(PATH)s
...@@ -33,7 +33,7 @@ environment = ...@@ -33,7 +33,7 @@ environment =
[ppl] [ppl]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
# we should use version 0.10.x for gcc-4.5 # 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 url = http://bugseng.com/products/ppl/download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2
md5sum = 5667111f53150618b0fa522ffc53fc3e md5sum = 5667111f53150618b0fa522ffc53fc3e
configure-options = configure-options =
--with-libgmp-prefix=${gmp:location} --with-libgmp-prefix=${gmp:location}
...@@ -85,9 +85,6 @@ patches = ...@@ -85,9 +85,6 @@ patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename} ${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2 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
# as slapos.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options = configure-options =
--disable-bootstrap --disable-bootstrap
--enable-languages="c,c++" --enable-languages="c,c++"
...@@ -97,12 +94,30 @@ configure-options = ...@@ -97,12 +94,30 @@ configure-options =
--with-mpc=${mpc:location} --with-mpc=${mpc:location}
--with-ppl=${ppl:location} --with-ppl=${ppl:location}
--with-cloog=${cloog-ppl:location} --with-cloog=${cloog-ppl:location}
--with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
environment = 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 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
[gcc-minimal]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-core-4.5.4.tar.bz2
md5sum = ca62e442629a9a7710f5d797bf1b521c
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-options =
--disable-bootstrap
--enable-languages=c
--disable-multilib
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--without-ppl
--without-cloog
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib
# 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
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
[buildout] [buildout]
extends = extends =
../curl/buildout.cfg ../curl/buildout.cfg
../gettext/buildout.cfg
../libexpat/buildout.cfg ../libexpat/buildout.cfg
../openssl/buildout.cfg ../openssl/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
...@@ -12,8 +13,8 @@ parts = ...@@ -12,8 +13,8 @@ parts =
[git] [git]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.12.tar.gz url = http://git-core.googlecode.com/files/git-1.8.2.3.tar.gz
md5sum = ceb1a6b17a3e33bbc70eadf8fce5876c md5sum = 03ebfd403a8cf355da0e3f15e53b8925
configure-options = configure-options =
--with-curl=${curl:location} --with-curl=${curl:location}
--with-openssl=${openssl:location} --with-openssl=${openssl:location}
......
...@@ -17,3 +17,7 @@ environment = ...@@ -17,3 +17,7 @@ environment =
CPPFLAGS=-I${zlib:location}/include -I${gettext:location}/include CPPFLAGS=-I${zlib:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib
PATH=${gettext:location}/bin:%(PATH)s PATH=${gettext:location}/bin:%(PATH)s
[x86-cygwin-glib]
patches =
${:_profile_base_location_}/cygwin-glib-2.28.8-src.patch
--- glib/gstrfuncs.c~ 2012-12-30 14:51:30.000000000 +0800
+++ glib/gstrfuncs.c 2012-12-30 14:51:50.203125000 +0800
@@ -1423,7 +1423,7 @@
#ifdef HAVE_STRSIGNAL
const char *msg_locale;
-#if defined(G_OS_BEOS) || defined(G_WITH_CYGWIN)
+#if defined(G_OS_BEOS)
extern const char *strsignal(int);
#else
/* this is declared differently (const) in string.h on BeOS */
...@@ -16,6 +16,8 @@ extends = ...@@ -16,6 +16,8 @@ extends =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz
md5sum = 8d26c1171f30ca3b1dc1b429f7937e58 md5sum = 8d26c1171f30ca3b1dc1b429f7937e58
depends =
${libpng:so_version}
configure-options = configure-options =
--with-included-ltdl --with-included-ltdl
--with-pngincludedir=${libpng:location}/include --with-pngincludedir=${libpng:location}/include
......
[buildout] [buildout]
extends = extends =
../pcre/buildout.cfg ../pcre/buildout.cfg
../coreutils/buildout.cfg
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
parts = parts =
grep grep-output
[grep] [grep]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
...@@ -13,3 +14,11 @@ environment = ...@@ -13,3 +14,11 @@ environment =
PATH=${xz-utils:location}/bin:%(PATH)s PATH=${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${pcre:location}/include CPPFLAGS=-I${pcre:location}/include
LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib
[grep-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:grep}
grep = ${grep:location}/bin/grep
...@@ -11,9 +11,9 @@ extends = ...@@ -11,9 +11,9 @@ extends =
[groonga] [groonga]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
version = 3.0.3 version = 3.0.5
url = http://packages.groonga.org/source/groonga/groonga-${:version}.tar.gz url = http://packages.groonga.org/source/groonga/groonga-${:version}.tar.gz
md5sum = 19dbee5393b2f9c793c4caae5ba81bec md5sum = 2894bbdd2275cb3c62aea14446dc2561
configure-options = configure-options =
--disable-static --disable-static
--disable-glibtest --disable-glibtest
...@@ -27,9 +27,9 @@ environment = ...@@ -27,9 +27,9 @@ environment =
[groonga-normalizer-mysql] [groonga-normalizer-mysql]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
version = 1.0.3 version = 1.0.5
url = http://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-${:version}.tar.gz url = http://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-${:version}.tar.gz
md5sum = 3f266c608017eb1b2e24b6bac1801ab2 md5sum = 88c0ab0d07c761877a5271e4a7f18551
location = ${groonga:location} location = ${groonga:location}
depends = depends =
${groonga:version} ${groonga:version}
......
...@@ -18,6 +18,8 @@ parts = ...@@ -18,6 +18,8 @@ parts =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://cairographics.org/releases/cairo-1.10.2.tar.gz url = http://cairographics.org/releases/cairo-1.10.2.tar.gz
md5sum = f101a9e88b783337b20b2e26dfd26d5f md5sum = f101a9e88b783337b20b2e26dfd26d5f
depends =
${libpng:so_version}
configure-options = configure-options =
--enable-tee=yes --enable-tee=yes
--enable-xlib=no --enable-xlib=no
...@@ -32,6 +34,8 @@ environment = ...@@ -32,6 +34,8 @@ environment =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/pango/1.29/pango-1.29.3.tar.bz2 url = http://ftp.gnome.org/pub/gnome/sources/pango/1.29/pango-1.29.3.tar.bz2
md5sum = be4e3891353fae6b62a6f8d7689c4266 md5sum = be4e3891353fae6b62a6f8d7689c4266
depends =
${libpng:so_version}
configure-options = configure-options =
--disable-static --disable-static
# XXX-Cedric : Why, god, why do I have to supply the -lXrender option to linker? # XXX-Cedric : Why, god, why do I have to supply the -lXrender option to linker?
...@@ -70,6 +74,8 @@ environment = ...@@ -70,6 +74,8 @@ environment =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.6.tar.bz2 url = http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.6.tar.bz2
md5sum = 421100f6597e613234f8dead6091a9fe md5sum = 421100f6597e613234f8dead6091a9fe
depends =
${libpng:so_version}
configure-options = configure-options =
--disable-static --disable-static
--disable-cups --disable-cups
......
...@@ -6,7 +6,7 @@ parts = ...@@ -6,7 +6,7 @@ parts =
[gzip] [gzip]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/pub/gnu/gzip/gzip-1.5.tar.xz url = ftp://ftp.gnu.org/pub/gnu/gzip/gzip-1.6.tar.xz
md5sum = 2a431e169b6f62f7332ef6d47cc53bae md5sum = da981f86677d58a106496e68de6f8995
environment = environment =
PATH=${xz-utils:location}/bin:%(PATH)s PATH=${xz-utils:location}/bin:%(PATH)s
...@@ -9,8 +9,8 @@ parts = haproxy ...@@ -9,8 +9,8 @@ parts = haproxy
[haproxy] [haproxy]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.23.tar.gz url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.24.tar.gz
md5sum = 6535d5e58037ada4b58b439cebe03c79 md5sum = 86422620faa9759907563d5e0524b98c
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,6 +35,8 @@ url = http://ftp.vim.org/ImageMagick/ImageMagick-6.8.2-6.tar.xz ...@@ -35,6 +35,8 @@ url = http://ftp.vim.org/ImageMagick/ImageMagick-6.8.2-6.tar.xz
md5sum = ee01558201041a9978dd14b1db946ce8 md5sum = ee01558201041a9978dd14b1db946ce8
depends = depends =
${libtiff:version} ${libtiff:version}
${libpng:so_version}
${webp:so_version}
configure-options = configure-options =
--disable-static --disable-static
--without-x --without-x
......
...@@ -13,6 +13,9 @@ extends = ...@@ -13,6 +13,9 @@ extends =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://leptonica.googlecode.com/files/leptonica-1.68.tar.gz url = http://leptonica.googlecode.com/files/leptonica-1.68.tar.gz
md5sum = 5cd7092f9ff2ca7e3f3e73bfcd556403 md5sum = 5cd7092f9ff2ca7e3f3e73bfcd556403
depends =
${libpng:so_version}
${webp:so_version}
configure-command = configure-command =
./autogen.sh ./autogen.sh
./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static ./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static
......
...@@ -6,6 +6,7 @@ extends = ...@@ -6,6 +6,7 @@ extends =
../bzip2/buildout.cfg ../bzip2/buildout.cfg
../imagemagick/buildout.cfg ../imagemagick/buildout.cfg
../jbigkit/buildout.cfg ../jbigkit/buildout.cfg
../libpng/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
parts = parts =
libdmtx libdmtx
...@@ -22,6 +23,8 @@ configure-options = ...@@ -22,6 +23,8 @@ configure-options =
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libdmtx/dmtx-utils-0.7.4.tar.bz2 url = http://prdownloads.sourceforge.net/libdmtx/dmtx-utils-0.7.4.tar.bz2
md5sum = b132ab9fb1d289869469b8bb4959a08a md5sum = b132ab9fb1d289869469b8bb4959a08a
depends =
${libpng:so_version}
configure-options = configure-options =
--disable-static --disable-static
environment = environment =
......
...@@ -21,7 +21,13 @@ environment = ...@@ -21,7 +21,13 @@ environment =
url = http://download.sourceforge.net/libpng/libpng-1.2.50.tar.bz2 url = http://download.sourceforge.net/libpng/libpng-1.2.50.tar.bz2
md5sum = 717caa58e9c71a80820eb38c4f4d6ec3 md5sum = 717caa58e9c71a80820eb38c4f4d6ec3
[libpng15]
<= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.5.16.tar.xz
md5sum = fd85af68f84cbdf549147811006488c1
[libpng] [libpng]
<= libpng-common <= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.5.14.tar.xz url = http://download.sourceforge.net/libpng/libpng-1.6.2.tar.xz
md5sum = 94284b01d62ca43c5eb3f6702db08ed8 md5sum = 9d838f6fca9948a9f360a0cc1b516d5f
so_version = 16
...@@ -12,11 +12,11 @@ find-links = ...@@ -12,11 +12,11 @@ find-links =
[libreoffice-bin] [libreoffice-bin]
recipe = slapos.recipe.build 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). # here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
version = 3.6.5 version = 3.6.6
url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums # supported architectures md5sums
md5sum_x86 = 9575c9a567d48a9feeaed2f915bfdf7f md5sum_x86 = 922935201a350a7e0d3f83c08f739ee2
md5sum_x86-64 = 302e326f2b2a524a78994705ea782770 md5sum_x86-64 = fa41089ce29eb03cdfb34d06a1e786db
# where office code can be found? # where office code can be found?
officedir = libreoffice3.6 officedir = libreoffice3.6
......
...@@ -3,6 +3,7 @@ parts = librsvg ...@@ -3,6 +3,7 @@ parts = librsvg
extends = extends =
../bzip2/buildout.cfg ../bzip2/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../libpng/buildout.cfg
../libxml2/buildout.cfg ../libxml2/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../gtk-2/buildout.cfg ../gtk-2/buildout.cfg
...@@ -23,6 +24,8 @@ recipe = slapos.recipe.cmmi ...@@ -23,6 +24,8 @@ recipe = slapos.recipe.cmmi
version = 2.36.1 version = 2.36.1
url = http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.36/librsvg-2.36.4.tar.xz url = http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.36/librsvg-2.36.4.tar.xz
md5sum = 3c94524c8ccf668e30b236f409239f54 md5sum = 3c94524c8ccf668e30b236f409239f54
depends =
${libpng:so_version}
configure-options = configure-options =
--disable-static --disable-static
--disable-gtk-theme --disable-gtk-theme
......
...@@ -25,10 +25,10 @@ download-only = true ...@@ -25,10 +25,10 @@ download-only = true
[mariadb] [mariadb]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
version = 5.5.30 version = 5.5.32
revision = 1 revision = 1
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb
md5sum = 39d4da4dabc8bda012517b3587dee6f8 md5sum = 565c2dce6a2fb027c9d0ffbae4934135
# compile directory is required to build mysql plugins. # compile directory is required to build mysql plugins.
keep-compile-dir = true keep-compile-dir = true
patch-options = -p0 patch-options = -p0
...@@ -62,8 +62,8 @@ environment = ...@@ -62,8 +62,8 @@ environment =
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users. # mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/ # http://mroonga.github.com/
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://packages.groonga.org/source/mroonga/mroonga-3.03.tar.gz url = http://packages.groonga.org/source/mroonga/mroonga-3.05.tar.gz
md5sum = daa1547259145b05b4cdee6b513bf8c8 md5sum = ba4cbd79274d832b9343a0b2fe7d0787
configure-options = configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version} --with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config --with-mysql-config=${mariadb:location}/bin/mysql_config
......
...@@ -14,8 +14,8 @@ parts = ...@@ -14,8 +14,8 @@ parts =
[nodejs-0.8] [nodejs-0.8]
# Server-side Javascript. # Server-side Javascript.
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gz url = http://nodejs.org/dist/v0.8.23/node-v0.8.23.tar.gz
md5sum = 284fd2c7578064c339d9cf6a3a475ac7 md5sum = 22fe54ac365f52d3d80ecf748e7323d5
configure-options = configure-options =
--openssl-includes=${openssl:location}/include --openssl-includes=${openssl:location}/include
--openssl-libpath=${openssl:location}/lib --openssl-libpath=${openssl:location}/lib
......
...@@ -51,4 +51,4 @@ configure-options = ...@@ -51,4 +51,4 @@ configure-options =
make-options = make-options =
-j1 -j1
make-targets = make-targets =
install && rm -f ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/* && for i in ${ca-certificates:location}/certs/*/*.crt; do ln -sv $i ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/`${buildout:parts-directory}/${:_buildout_section_name_}/bin/openssl x509 -hash -noout -in $i`.0; done; true all install_sw && rm -f ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/* && for i in ${ca-certificates:location}/certs/*/*.crt; do ln -sv $i ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/`${buildout:parts-directory}/${:_buildout_section_name_}/bin/openssl x509 -hash -noout -in $i`.0; done; true
...@@ -31,7 +31,7 @@ script = ...@@ -31,7 +31,7 @@ script =
wrapper = open(wrapper_location, 'w') wrapper = open(wrapper_location, 'w')
wrapper.write("""#!/bin/sh wrapper.write("""#!/bin/sh
cd %(location)s cd %(location)s
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng:location}/lib:${libSM:location}/lib:${libICE:location}/lib:%(location)s export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng15:location}/lib:${libSM:location}/lib:${libICE:location}/lib:%(location)s
export PATH=${fontconfig:location}/bin:$PATH export PATH=${fontconfig:location}/bin:$PATH
%(location)s/opera $*""") %(location)s/opera $*""")
wrapper.close() wrapper.close()
......
...@@ -13,10 +13,11 @@ extends = ...@@ -13,10 +13,11 @@ extends =
[poppler] [poppler]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
md5sum = be915388eaad6865cee5a156c8119ec1 url = http://poppler.freedesktop.org/poppler-0.22.5.tar.gz
url = http://poppler.freedesktop.org/poppler-0.22.3.tar.gz md5sum = 1cd27460f7e3379d1eb109cfd7bcdb39
depends = depends =
${libtiff:version} ${libtiff:version}
${libpng:so_version}
configure-options = configure-options =
--disable-cairo-output --disable-cairo-output
--disable-cms --disable-cms
......
...@@ -8,3 +8,6 @@ url = ftp://anduin.linuxfromscratch.org/BLFS/svn/p/popt-1.16.tar.gz ...@@ -8,3 +8,6 @@ url = ftp://anduin.linuxfromscratch.org/BLFS/svn/p/popt-1.16.tar.gz
md5sum = 3743beefa3dd6247a73f8f7a32c14c33 md5sum = 3743beefa3dd6247a73f8f7a32c14c33
configure-options = configure-options =
--disable-static --disable-static
[x86-cygwin-popt]
patches = ${:_profile_base_location_}/cygwin-popt-1.16-src.patch
\ No newline at end of file
--- poptconfig.c~ 2011-09-10 22:49:30.802250000 +0800
+++ poptconfig.c 2011-09-10 23:46:30.572048000 +0800
@@ -45,8 +45,9 @@ extern int glob_pattern_p (const char *_
#if !defined(__GLIBC__)
/* Return nonzero if PATTERN contains any metacharacters.
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
+#define glob_pattern_p glob_pattern_p_s
static int
-glob_pattern_p (const char * pattern, int quote)
+glob_pattern_p_s(const char * pattern, int quote)
/*@*/
{
const char * p;
...@@ -25,9 +25,9 @@ python = python2.7 ...@@ -25,9 +25,9 @@ python = python2.7
[python2.7] [python2.7]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
package_version = 2.7.4 package_version = 2.7.5
package_version_suffix = package_version_suffix =
md5sum = 62704ea0f125923208d84ff0568f7d50 md5sum = 6334b666b7ff2038c761d7b27ba699c1
depends = depends =
${gdbm:version} ${gdbm:version}
...@@ -44,6 +44,9 @@ configure-options = ...@@ -44,6 +44,9 @@ configure-options =
--enable-unicode=ucs4 --enable-unicode=ucs4
--with-system-expat --with-system-expat
--with-threads --with-threads
# Profiled build:
make-binary =
make-targets = make profile-opt && make install
# the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic, # the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic,
# which would otherwise load the system libmagic.so with ctypes # which would otherwise load the system libmagic.so with ctypes
......
[buildout]
extends =
../openssl/buildout.cfg
parts =
python-openssl
[python-openssl]
recipe = zc.recipe.egg:custom
egg = pyOpenSSL
library-dirs =
${openssl:location}/lib/
rpath =
${openssl:location}/lib/
...@@ -15,6 +15,8 @@ recipe = slapos.recipe.cmmi ...@@ -15,6 +15,8 @@ recipe = slapos.recipe.cmmi
# qemu-kvm and qemu are now the same since 1.3. # qemu-kvm and qemu are now the same since 1.3.
url = http://wiki.qemu-project.org/download/qemu-1.4.1.tar.bz2 url = http://wiki.qemu-project.org/download/qemu-1.4.1.tar.bz2
md5sum = eb2d696956324722b5ecfa46e41f9a75 md5sum = eb2d696956324722b5ecfa46e41f9a75
depends =
${libpng:so_version}
configure-options = configure-options =
--target-list="" --target-list=""
--disable-sdl --disable-sdl
......
[buildout] [buildout]
extends = extends =
../librsync/buildout.cfg ../librsync/buildout.cfg
../coreutils/buildout.cfg
parts = parts =
rdiff-backup rdiff-backup-output
[rdiff-backup-build] [rdiff-backup-build]
recipe = zc.recipe.egg:custom recipe = zc.recipe.egg:custom
...@@ -24,3 +25,11 @@ eggs = ...@@ -24,3 +25,11 @@ eggs =
entry-points = entry-points =
rdiff-backup=rdiff_backup.Main:Main rdiff-backup=rdiff_backup.Main:Main
arguments = sys.argv[1:] arguments = sys.argv[1:]
[rdiff-backup-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:rdiff-backup}
rdiff-backup = ${buildout:directory}/bin/rdiff-backup
...@@ -6,4 +6,4 @@ parts = ...@@ -6,4 +6,4 @@ parts =
# https://github.com/ruda/rpm2cpio # https://github.com/ruda/rpm2cpio
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_} url = ${:_profile_base_location_}/${:_buildout_section_name_}
md5sum = c5bb6227d99e1ff5df880f997cbed2e3 md5sum = aa3a5920a1d8963592be0c2666ee05e2
...@@ -3,7 +3,33 @@ ...@@ -3,7 +3,33 @@
# #
# Standalone RPM to CPIO converter # Standalone RPM to CPIO converter
# Copyright (c) 2012 Rudá Moura # Copyright (c) 2012 Rudá Moura
# https://github.com/ruda/rpm2cpio
# #
# Impove gzip header detection thanks to
# http://afb.users.sourceforge.net/centos/rpm2cpio.py
#
# Copyright (C) 1997,1998,1999, Roger Espel Llima
# Copyright (C) 2000, Sergey Babkin
# Copyright (C) 2009, Alex Kozlov
# Copyright (C) 2010, Anders F Bjorklund
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and any associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# SOFTWARE'S COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE
'''Extract cpio archive from RPM package. '''Extract cpio archive from RPM package.
...@@ -21,6 +47,7 @@ rpm2cpio < adjtimex-1.20-2.1.i386.rpm | cpio -it ...@@ -21,6 +47,7 @@ rpm2cpio < adjtimex-1.20-2.1.i386.rpm | cpio -it
''' '''
import sys import sys
import struct
import StringIO import StringIO
import gzip import gzip
...@@ -31,12 +58,32 @@ def rpm2cpio(stream_in=sys.stdin, stream_out=sys.stdout): ...@@ -31,12 +58,32 @@ def rpm2cpio(stream_in=sys.stdin, stream_out=sys.stdout):
lead = stream_in.read(96) lead = stream_in.read(96)
if lead[0:4] != RPM_MAGIC: if lead[0:4] != RPM_MAGIC:
raise IOError, 'the input is not a RPM package' raise IOError, 'the input is not a RPM package'
data = stream_in.read() lead = stream_in.read(16)
idx = data.find(GZIP_MAGIC) if not lead:
if idx == -1: raise IOError, 'No header'
raise IOError, 'could not find compressed cpio archive'
gzstream = StringIO.StringIO(data[idx:]) while True:
gzipper = gzip.GzipFile(fileobj=gzstream) (magic, ignore, sections, bytes) = struct.unpack("!LLLL", lead)
(smagic, smagic2) = struct.unpack("!HL", lead[0:6])
if smagic == 0x1f8b:
break
# skip the headers
stream_in.seek(16 * sections + bytes, 1)
while True:
lead = stream_in.read(1)
if lead == "":
raise IOError, 'No header'
if (0,) == struct.unpack("B", lead):
continue
break
lead += stream_in.read(15)
if lead == "":
raise IOError, 'No header'
stream_in.seek(-len(lead), 1)
gzipper = gzip.GzipFile(fileobj=stream_in)
data = gzipper.read() data = gzipper.read()
stream_out.write(data) stream_out.write(data)
......
...@@ -44,6 +44,8 @@ allow-hosts = ...@@ -44,6 +44,8 @@ allow-hosts =
github.com github.com
peak.telecommunity.com peak.telecommunity.com
unzip = true
# separate from system python # separate from system python
include-site-packages = false include-site-packages = false
exec-sitecustomize = false exec-sitecustomize = false
...@@ -137,14 +139,15 @@ zc.recipe.egg = 1.3.2 ...@@ -137,14 +139,15 @@ zc.recipe.egg = 1.3.2
# Use own version of h.r.download to be able to open archives not supported by python2.x: .xz # Use own version of h.r.download to be able to open archives not supported by python2.x: .xz
hexagonit.recipe.download = 1.6nxd002 hexagonit.recipe.download = 1.6nxd002
Jinja2 = 2.6 Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.8.3 Werkzeug = 0.8.3
buildout-versions = 1.7 buildout-versions = 1.7
collective.recipe.template = 1.10 collective.recipe.template = 1.10
lxml = 3.1.2 lxml = 3.1.2
meld3 = 0.6.10 meld3 = 0.6.10
netaddr = 0.7.10 netaddr = 0.7.10
slapos.libnetworkcache = 0.13.3 slapos.libnetworkcache = 0.13.4
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
...@@ -166,9 +169,8 @@ setuptools = 0.6c12dev-r88846 ...@@ -166,9 +169,8 @@ setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.35.2-dev # slapos.core==0.35.2-dev
supervisor = 3.0b1 supervisor = 3.0b2
# Required by: # Required by:
# slapos.core==0.35.2-dev # slapos.core==0.35.2-dev
zope.interface = 4.0.5 zope.interface = 4.0.5
...@@ -5,8 +5,8 @@ parts = ...@@ -5,8 +5,8 @@ parts =
[sqlite3] [sqlite3]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://www.sqlite.org/2013/sqlite-autoconf-3071601.tar.gz url = http://www.sqlite.org/2013/sqlite-autoconf-3071700.tar.gz
md5sum = 8860d1a1ed26d40f07e3c7ae035b644a md5sum = 18c285053e9562b848209cb0ee16d4ab
configure-options = configure-options =
--disable-static --disable-static
--enable-readline --enable-readline
......
...@@ -17,12 +17,13 @@ filename = stunnel-4-hooks.py ...@@ -17,12 +17,13 @@ filename = stunnel-4-hooks.py
[stunnel-4] [stunnel-4]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = ftp://ftp.stunnel.org/stunnel/archive/4.x/stunnel-4.55.tar.gz url = https://www.stunnel.org/downloads/stunnel-4.56.tar.gz
md5sum = ebe6670368d30c6a01ca33b9c50cb239 md5sum = ac4c4a30bd7a55b6687cbd62d864054c
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
--disable-libwrap --disable-libwrap
--disable-fips
--with-ssl=${openssl:location} --with-ssl=${openssl:location}
environment = environment =
CPPFLAGS=-I${zlib:location}/include CPPFLAGS=-I${zlib:location}/include
......
...@@ -10,6 +10,7 @@ extends = ...@@ -10,6 +10,7 @@ extends =
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../sqlite3/buildout.cfg ../sqlite3/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../swig/buildout.cfg
parts = parts =
subversion subversion
...@@ -59,3 +60,45 @@ environment = ...@@ -59,3 +60,45 @@ environment =
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib
[subversion-1.9]
recipe = hexagonit.recipe.cmmi
url = http://www.apache.org/dist/subversion/subversion-1.7.9.tar.gz
md5sum = dfb083e8bfac88aa28d606168b08e4ff
configure-options =
--disable-static
--with-apr=${apache:location}/bin/apr-1-config
--with-apr-util=${apache:location}/bin/apu-1-config
--with-apxs=${apache:location}/bin/apxs
--with-zlib=${zlib:location}
--with-sqlite=${sqlite3:location}
--with-neon=${neon:location}
--with-swig=${swig:location}/bin/swig
--without-berkeley-db
--without-sasl
--without-apr_memcache
--without-gnome-keyring
--without-kwallet
--without-jdk
--without-jikes
--without-junit
--without-ctypesgen
--without-ruby-sitedir
--without-ruby-test-verbose
--disable-nls
# it seems that parallel build sometimes fails.
make-options =
-j1
make-targets =
install
swig-py
install-swig-py
environment =
PATH=${pkgconfig:location}/bin:${neon:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib
[buildout] [buildout]
extends = extends =
../automake/buildout.cfg ../automake/buildout.cfg
../libpng/buildout.cfg
../libtool/buildout.cfg ../libtool/buildout.cfg
../leptonica/buildout.cfg ../leptonica/buildout.cfg
../jbigkit/buildout.cfg ../jbigkit/buildout.cfg
../webp/buildout.cfg
parts = parts =
tesseract tesseract
...@@ -26,6 +28,9 @@ md5sum = 2e691858cb492b7c17d23bf0912b3d24 ...@@ -26,6 +28,9 @@ md5sum = 2e691858cb492b7c17d23bf0912b3d24
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz url = http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz
md5sum = 1ba496e51a42358fb9d3ffe781b2d20a md5sum = 1ba496e51a42358fb9d3ffe781b2d20a
depends =
${libpng:so_version}
${webp:so_version}
patch-options = patch-options =
-p1 -p1
patches = patches =
......
...@@ -10,6 +10,7 @@ extends = ...@@ -10,6 +10,7 @@ extends =
../ncurses/buildout.cfg ../ncurses/buildout.cfg
../pcre/buildout.cfg ../pcre/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../readline/buildout.cfg
[varnish] [varnish]
<= varnish-2.0 <= varnish-2.0
...@@ -35,10 +36,10 @@ configure-options = ...@@ -35,10 +36,10 @@ configure-options =
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${pcre:location}/lib/pkgconfig PKG_CONFIG_PATH=${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${ncurses:location}/include CPPFLAGS=-I${ncurses:location}/include -I${readline:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib
[varnish-3.0] [varnish-3.0]
<= varnish-2.1 <= varnish-2.1
url = http://repo.varnish-cache.org/source/varnish-3.0.3.tar.gz url = http://repo.varnish-cache.org/source/varnish-3.0.4.tar.gz
md5sum = 714310c83fdbd2061d897dacd3f63d8b md5sum = a130ce9c3504b9603a46542635e18701
...@@ -10,8 +10,11 @@ extends = ...@@ -10,8 +10,11 @@ extends =
[webp] [webp]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://webp.googlecode.com/files/libwebp-0.1.3.tar.gz url = https://webp.googlecode.com/files/libwebp-0.3.0.tar.gz
md5sum = 254d4670e14e9ed881f0536b006ab336 md5sum = 4183f4f51ada98976f14e7bd51f30938
depends =
${libpng:so_version}
so_version = 4
configure-options = configure-options =
--disable-static --disable-static
--with-jpegincludedir=${libjpeg:location}/include --with-jpegincludedir=${libjpeg:location}/include
......
--- a/Makefile.am 2012-05-13 16:44:48.000000000 +0200
+++ b/Makefile.am 2013-06-21 15:05:07.519274542 +0200
@@ -41,7 +41,7 @@
ACLOCAL_AMFLAGS = -I m4
# subdirectories in the distribution
-SUBDIRS = lib src doc po tests util
+SUBDIRS = lib src po tests util
EXTRA_DIST = ChangeLog.README MAILING-LIST \
msdos/ChangeLog msdos/config.h msdos/Makefile.DJ \
--- a/Makefile.in 2012-08-05 22:17:17.000000000 +0200
+++ b/Makefile.in 2013-06-21 15:05:04.351269286 +0200
@@ -1195,7 +1195,7 @@
ACLOCAL_AMFLAGS = -I m4
# subdirectories in the distribution
-SUBDIRS = lib src doc po tests util
+SUBDIRS = lib src po tests util
EXTRA_DIST = ChangeLog.README MAILING-LIST \
msdos/ChangeLog msdos/config.h msdos/Makefile.DJ \
msdos/Makefile.WC ABOUT-NLS \
...@@ -8,6 +8,14 @@ extends = ...@@ -8,6 +8,14 @@ extends =
parts = parts =
wget wget
[wget-doc.makefile.patch]
recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename}
filename = Makefile.patch
download-only = true
md5sum = 2b89644c63a0dfe96290471d28a554f2
[wget] [wget]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz url = http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz
...@@ -20,6 +28,13 @@ configure-options = ...@@ -20,6 +28,13 @@ configure-options =
--with-libssl-prefix=${openssl:location} --with-libssl-prefix=${openssl:location}
--with-zlib-lib=${zlib:location} --with-zlib-lib=${zlib:location}
patch-options =
-p1
patches =
${wget-doc.makefile.patch:location}/${wget-doc.makefile.patch:filename}
environment = environment =
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
......
...@@ -346,7 +346,7 @@ recipe = slapos.recipe.cmmi ...@@ -346,7 +346,7 @@ recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXinerama-1.1.1.tar.bz2 url = http://www.x.org/releases/X11R7.6/src/lib/libXinerama-1.1.1.tar.bz2
md5sum = ecd4839ad01f6f637c6fb5327207f89b md5sum = ecd4839ad01f6f637c6fb5327207f89b
environment = 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 PKG_CONFIG_PATH=${kbproto:location}/lib/pkgconfig:${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 PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options = configure-options =
--disable-static --disable-static
......
...@@ -4,5 +4,5 @@ parts = ...@@ -4,5 +4,5 @@ parts =
[zlib] [zlib]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libpng/zlib-1.2.6.tar.bz2?download url = http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
md5sum = dc2cfa0d2313ca77224b4d932b2911e9 md5sum = 44d667c142d7cda120332623eab69f40
...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages ...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.78.1.dev' version = '0.78.4.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"
...@@ -188,6 +188,8 @@ setup(name=name, ...@@ -188,6 +188,8 @@ setup(name=name,
'slapreport = slapos.recipe.slapreport:Recipe', 'slapreport = slapos.recipe.slapreport:Recipe',
'slaprunner = slapos.recipe.slaprunner:Recipe', 'slaprunner = slapos.recipe.slaprunner:Recipe',
'slaprunner.test = slapos.recipe.slaprunner:Test', 'slaprunner.test = slapos.recipe.slaprunner:Test',
'slaprunner.export = slapos.recipe.slaprunner.backup:ExportRecipe',
'slaprunner.import = slapos.recipe.slaprunner.backup:ImportRecipe',
'softwaretype = slapos.recipe.softwaretype:Recipe', 'softwaretype = slapos.recipe.softwaretype:Recipe',
'sphinx= slapos.recipe.sphinx:Recipe', 'sphinx= slapos.recipe.sphinx:Recipe',
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', 'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe',
...@@ -195,6 +197,7 @@ setup(name=name, ...@@ -195,6 +197,7 @@ setup(name=name,
'stunnel = slapos.recipe.stunnel:Recipe', 'stunnel = slapos.recipe.stunnel:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe', 'symbolic.link = slapos.recipe.symbolic_link:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe', 'tidstorage = slapos.recipe.tidstorage:Recipe',
'trac = slapos.recipe.trac:Recipe',
'urlparse = slapos.recipe._urlparse:Recipe', 'urlparse = slapos.recipe._urlparse:Recipe',
'uuid = slapos.recipe._uuid:Recipe', 'uuid = slapos.recipe._uuid:Recipe',
'vifib = slapos.recipe.vifib:Recipe', 'vifib = slapos.recipe.vifib:Recipe',
......
...@@ -12,15 +12,14 @@ On slap console, you can instanciate varnish like this: ...@@ -12,15 +12,14 @@ On slap console, you can instanciate varnish like this:
instance = request( instance = request(
software_type='varnish', software_type='varnish',
partition_parameter_kw={ partition_parameter_kw={
'tidstorage-url':'http://[your tidstrage address]:your tid strage port', 'backend-url':'https://[your_backend_address]:your_backend_port',
'web-checker-frontend-url':'http://www.example.com', 'web-checker-frontend-url':'http://www.example.com',
'web-checker-mail-address':'web-checker-result@example.com', 'web-checker-mail-address':'web-checker-result@example.com',
'web-checker-smtp-host':'mail.example.com', 'web-checker-smtp-host':'mail.example.com',
} }
) )
tidstrage-url is the backend url that varnish will cache. It is expected that backend-url is the backend url that varnish will cache.
the backend is created by tidstorage recipe.
web-checker-frontend-url is the entry-point-url that web checker will check web-checker-frontend-url is the entry-point-url that web checker will check
the HTTP headers of all the pages in the web site. the HTTP headers of all the pages in the web site.
......
...@@ -31,10 +31,10 @@ KVM with Remote and gzipped Image ...@@ -31,10 +31,10 @@ KVM with Remote and gzipped Image
gzip = true gzip = true
# Use -hda instead -drive arg # Use -hda instead -drive arg
# Default is drive (see Options bellow) # Default is drive (see Options below)
image_type = hda image_type = hda
### Common Configuration bellow. ### ### Common Configuration below. ###
# VNC is optional # VNC is optional
kvm_vnc = <SOME-IP>:<VNC-DISPLAY> kvm_vnc = <SOME-IP>:<VNC-DISPLAY>
......
...@@ -76,8 +76,7 @@ class Recipe(GenericBaseRecipe): ...@@ -76,8 +76,7 @@ class Recipe(GenericBaseRecipe):
'vhosts': ''.join(self.substituteTemplate(vhost_template_name, { 'vhosts': ''.join(self.substituteTemplate(vhost_template_name, {
'ip': ip, 'ip': ip,
'port': port, 'port': port,
'backend': backend, 'backend': ('%s/%s' % (backend.rstrip('/'), backend_path.strip('/'))).rstrip('/'),
'backend-path': backend_path,
'ssl_enable': ssl_enable, 'ssl_enable': ssl_enable,
}) for (port, backend) in backend_list), }) for (port, backend) in backend_list),
}, },
......
Listen %(ip)s:%(port)s Listen %(ip)s:%(port)s
<VirtualHost *:%(port)s> <VirtualHost *:%(port)s>
%(ssl_enable)s %(ssl_enable)s
RewriteRule (.*) %(backend)s%(backend-path)s$1 [L,P] RewriteRule ^/(.*) %(backend)s/$1 [L,P]
</VirtualHost> </VirtualHost>
...@@ -44,6 +44,7 @@ class Recipe(GenericBaseRecipe): ...@@ -44,6 +44,7 @@ class Recipe(GenericBaseRecipe):
root = options['installroot'].strip() root = options['installroot'].strip()
options['home_page'] = url_base + "/" + project options['home_page'] = url_base + "/" + project
options['admin_page'] = url_base + "/" + project + "_ops/" options['admin_page'] = url_base + "/" + project + "_ops/"
options['result_page'] = url_base + "/" + project + "_result/"
options['cronjob'] = os.path.join(root, project+'.cronjob') options['cronjob'] = os.path.join(root, project+'.cronjob')
return GenericBaseRecipe.__init__(self, buildout, name, options) return GenericBaseRecipe.__init__(self, buildout, name, options)
......
...@@ -172,6 +172,7 @@ def services(args): ...@@ -172,6 +172,7 @@ def services(args):
languages, compiled, user_profile) languages, compiled, user_profile)
os.system("chmod g+w -R " + args['installroot']) os.system("chmod g+w -R " + args['installroot'])
os.system(cmd) os.system(cmd)
os.system("chmod 700 %s" % os.path.join(args['installroot'], 'keys'))
os.system("chmod o+x " + inc) os.system("chmod o+x " + inc)
os.system("chmod -R o+r " + inc) os.system("chmod -R o+r " + inc)
os.system("chmod o+x " + languages) os.system("chmod o+x " + languages)
......
...@@ -10,7 +10,7 @@ if [ -z $URL ]; then ...@@ -10,7 +10,7 @@ if [ -z $URL ]; then
exit 3 exit 3
fi fi
%(curl_path)s -k -sL $URL | grep "$MATCH" > /dev/null %(curl_path)s -k -sL $URL --max-time 10 | grep "$MATCH" > /dev/null
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "Content at $URL seems to be corrupted" >&2 echo "Content at $URL seems to be corrupted" >&2
......
...@@ -9,7 +9,7 @@ if [ -z $URL ]; then ...@@ -9,7 +9,7 @@ if [ -z $URL ]; then
exit 3 exit 3
fi fi
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} -o /dev/null) CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} --max-time 10 -o /dev/null)
if [ $? -eq 3 ]; then if [ $? -eq 3 ]; then
echo "URL malformed: $URL." >&2 echo "URL malformed: $URL." >&2
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
import subprocess import subprocess
import httplib import httplib
import base64 import base64
import os
import shutil
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
...@@ -50,13 +52,29 @@ class Recipe(GenericBaseRecipe): ...@@ -50,13 +52,29 @@ class Recipe(GenericBaseRecipe):
user, password user, password
]) ])
htdocs_location = self.options['htdocs']
if not (os.path.exists(htdocs_location) and os.listdir(htdocs_location)):
try:
os.rmdir(htdocs_location)
except:
pass
shutil.copytree(self.options['source'], htdocs_location)
# Install php.ini
php_ini = self.createFile(os.path.join(self.options['php-ini-dir'],
'php.ini'),
self.substituteTemplate(self.getTemplateFilename('php.ini.in'),
dict(tmp_directory=self.options['tmp-dir']))
)
path_list.append(php_ini)
apache_config = dict( apache_config = dict(
pid_file=self.options['pid-file'], pid_file=self.options['pid-file'],
lock_file=self.options['lock-file'], lock_file=self.options['lock-file'],
davlock_db=self.options['davdb-lock'], davlock_db=self.options['davdb-lock'],
ip=self.options['ip'], ip=self.options['ip'],
port=self.options['port'], port_webdav=self.options['port_webdav'],
port_ajax=self.options['port_ajax'],
error_log=self.options['error-log'], error_log=self.options['error-log'],
access_log=self.options['access-log'], access_log=self.options['access-log'],
document_root=self.options['htdocs'], document_root=self.options['htdocs'],
...@@ -67,6 +85,7 @@ class Recipe(GenericBaseRecipe): ...@@ -67,6 +85,7 @@ class Recipe(GenericBaseRecipe):
htpasswd_file=htpasswd_file, htpasswd_file=htpasswd_file,
ssl_certificate=self.options['cert-file'], ssl_certificate=self.options['cert-file'],
ssl_key=self.options['key-file'], ssl_key=self.options['key-file'],
php_ini_dir=self.options['php-ini-dir']
) )
# Create logfiles # Create logfiles
...@@ -86,7 +105,7 @@ class Recipe(GenericBaseRecipe): ...@@ -86,7 +105,7 @@ class Recipe(GenericBaseRecipe):
promise = self.createPythonScript(self.options['promise'], promise = self.createPythonScript(self.options['promise'],
__name__ + '.promise', __name__ + '.promise',
dict(host=self.options['ip'], port=int(self.options['port']), dict(host=self.options['ip'], port=int(self.options['port_webdav']),
user=self.options['user'], password=self.options['password']) user=self.options['user'], password=self.options['password'])
) )
path_list.append(promise) path_list.append(promise)
......
ServerRoot "%(server_root)s" ServerRoot "%(server_root)s"
Listen [%(ip)s]:%(port)s Listen [%(ip)s]:%(port_webdav)s
Listen [%(ip)s]:%(port_ajax)s
NameVirtualHost [%(ip)s]:%(port_webdav)s
NameVirtualHost [%(ip)s]:%(port_ajax)s
# Needed modules # Needed modules
LoadModule unixd_module modules/mod_unixd.so LoadModule unixd_module "%(modules_dir)s/mod_unixd.so"
LoadModule access_compat_module modules/mod_access_compat.so LoadModule access_compat_module "%(modules_dir)s/mod_access_compat.so"
LoadModule authz_core_module modules/mod_authz_core.so LoadModule authn_core_module "%(modules_dir)s/mod_authn_core.so"
LoadModule authz_core_module "%(modules_dir)s/mod_authz_core.so"
LoadModule authn_file_module "%(modules_dir)s/mod_authn_file.so" LoadModule authn_file_module "%(modules_dir)s/mod_authn_file.so"
LoadModule authz_host_module "%(modules_dir)s/mod_authz_host.so" LoadModule authz_host_module "%(modules_dir)s/mod_authz_host.so"
LoadModule authz_user_module "%(modules_dir)s/mod_authz_user.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_basic_module "%(modules_dir)s/mod_auth_basic.so"
LoadModule auth_digest_module "%(modules_dir)s/mod_auth_digest.so" # Comment auth_digest since we don't use it
#LoadModule auth_digest_module "%(modules_dir)s/mod_auth_digest.so"
LoadModule log_config_module "%(modules_dir)s/mod_log_config.so" LoadModule log_config_module "%(modules_dir)s/mod_log_config.so"
LoadModule headers_module "%(modules_dir)s/mod_headers.so" LoadModule headers_module "%(modules_dir)s/mod_headers.so"
LoadModule setenvif_module "%(modules_dir)s/mod_setenvif.so" LoadModule setenvif_module "%(modules_dir)s/mod_setenvif.so"
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so LoadModule socache_shmcb_module "%(modules_dir)s/mod_socache_shmcb.so"
LoadModule ssl_module "%(modules_dir)s/mod_ssl.so" LoadModule ssl_module "%(modules_dir)s/mod_ssl.so"
LoadModule mime_module "%(modules_dir)s/mod_mime.so" LoadModule mime_module "%(modules_dir)s/mod_mime.so"
LoadModule dav_module "%(modules_dir)s/mod_dav.so" LoadModule dav_module "%(modules_dir)s/mod_dav.so"
LoadModule dav_fs_module "%(modules_dir)s/mod_dav_fs.so" LoadModule dav_fs_module "%(modules_dir)s/mod_dav_fs.so"
LoadModule dir_module "%(modules_dir)s/mod_dir.so" LoadModule dir_module "%(modules_dir)s/mod_dir.so"
LoadModule php5_module "%(modules_dir)s/libphp5.so"
ServerAdmin %(email_address)s ServerAdmin %(email_address)s
# Quiet Server header (if not, Apache give its life history) # Quiet Server header (if not, Apache give its life history)
# It's safer # It's safer
ServerTokens ProductOnly ServerTokens ProductOnly
PidFile "%(pid_file)s"
PHPINIDir "%(php_ini_dir)s"
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
<VirtualHost [%(ip)s]:%(port_ajax)s>
#ServerName www.example.com
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory %(document_root)s>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot "%(document_root)s"
DirectoryIndex index.html index.php
SSLEngine on
SSLCertificateFile "%(ssl_certificate)s"
SSLCertificateKeyFile "%(ssl_key)s"
</VirtualHost>
<VirtualHost [%(ip)s]:%(port_webdav)s>
DocumentRoot "%(document_root)s" DocumentRoot "%(document_root)s"
PidFile "%(pid_file)s"
DavLockDB "%(davlock_db)s" DavLockDB "%(davlock_db)s"
<Directory /> <Directory />
...@@ -66,6 +103,12 @@ DavLockDB "%(davlock_db)s" ...@@ -66,6 +103,12 @@ DavLockDB "%(davlock_db)s"
</Directory> </Directory>
SSLEngine on
SSLCertificateFile "%(ssl_certificate)s"
SSLCertificateKeyFile "%(ssl_key)s"
</VirtualHost>
ErrorLog "%(error_log)s" ErrorLog "%(error_log)s"
LogLevel warn LogLevel warn
...@@ -77,9 +120,5 @@ DefaultType text/plain ...@@ -77,9 +120,5 @@ DefaultType text/plain
TypesConfig "%(mime_types)s" TypesConfig "%(mime_types)s"
AddType application/x-compress .Z AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phtml .php5 .php4
SSLRandomSeed startup builtin AddType application/x-httpd-php-source .phps
SSLRandomSeed connect builtin \ No newline at end of file
SSLEngine on
SSLCertificateFile "%(ssl_certificate)s"
SSLCertificateKeyFile "%(ssl_key)s"
[PHP]
engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING)
display_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=Off
output_buffering=Off
\ No newline at end of file
...@@ -34,19 +34,23 @@ class Recipe(GenericBaseRecipe): ...@@ -34,19 +34,23 @@ class Recipe(GenericBaseRecipe):
""" """
def install(self): def install(self):
promise_parser = ConfigParser.RawConfigParser() promise_parser = ConfigParser.RawConfigParser()
for section_name, option_id_list in (
promise_parser.add_section('portal_templates') ('portal_templates', (
promise_parser.set('portal_templates', 'repository', self.options['bt5-repository-url']) ('repository', 'bt5-repository-url'),
promise_parser.set('portal_templates', 'expected_bt5', self.options['bt5']) ('expected_bt5', 'bt5'),
)),
promise_parser.add_section('external_service') ('external_service', (
promise_parser.set('external_service', 'cloudooo_url', self.options['cloudooo-url']) ('cloudooo_url', 'cloudooo-url'),
promise_parser.set('external_service', 'memcached_url', self.options['memcached-url']) ('memcached_url', 'memcached-url'),
promise_parser.set('external_service', 'kumofs_url', self.options['kumofs-url']) ('kumofs_url', 'kumofs-url'),
promise_parser.set('external_service', 'smtp_url', self.options['smtp-url']) ('smtp_url', 'smtp-url'),
)),
):
promise_parser.add_section(section_name)
for internal_id, option_id in option_id_list:
option = self.options.get(option_id)
if option:
promise_parser.set(section_name, internal_id, option)
promise_parser.write(open(self.options['promise-path'], 'w')) promise_parser.write(open(self.options['promise-path'], 'w'))
return [self.options['promise-path']] return [self.options['promise-path']]
...@@ -38,16 +38,20 @@ class Recipe(GenericBaseRecipe): ...@@ -38,16 +38,20 @@ class Recipe(GenericBaseRecipe):
port=int(self.options['port']), port=int(self.options['port']),
openoffice_port=int(self.options['openoffice-port']), openoffice_port=int(self.options['openoffice-port']),
) )
environment_variable_list = []
for env_line in self.options['environment'].splitlines(): for env_line in self.options['environment'].splitlines():
env_line = env_line.strip() env_line = env_line.strip()
if not env_line: if not env_line:
continue continue
if '=' in env_line: if '=' in env_line:
env_key, env_value = env_line.split('=') env_key, env_value = env_line.split('=')
conversion_server_dict[env_key.strip()] = env_value.strip() environment_variable_list.append((env_key.strip(), env_value.strip()))
else: else:
raise zc.buildout.UserError('Line %r in environment parameter is ' raise zc.buildout.UserError('Line %r in environment parameter is '
'incorrect' % env_line) 'incorrect' % env_line)
conversion_server_dict['ENVIRONMENT_VARIABLE_LIST'] = '\n'.join(
['env-%s = %s' % (key, value) for key, value in environment_variable_list]
)
config_file = self.createFile(self.options['configuration-file'], config_file = self.createFile(self.options['configuration-file'],
self.substituteTemplate(self.getTemplateFilename('cloudooo.cfg.in'), self.substituteTemplate(self.getTemplateFilename('cloudooo.cfg.in'),
conversion_server_dict)) conversion_server_dict))
......
...@@ -33,9 +33,9 @@ application_hostname = %(ip)s ...@@ -33,9 +33,9 @@ application_hostname = %(ip)s
# OpenOffice Port # OpenOffice Port
openoffice_port = %(openoffice_port)s openoffice_port = %(openoffice_port)s
# LD_LIBRARY_PATH passed to OpenOffice # LD_LIBRARY_PATH and other environment variables
env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s # passed to OpenOffice
env-FONTCONFIG_FILE = %(FONTCONFIG_FILE)s %(ENVIRONMENT_VARIABLE_LIST)s
# #
# Mimetype Registry # Mimetype Registry
......
...@@ -34,6 +34,22 @@ def runMysql(args): ...@@ -34,6 +34,22 @@ def runMysql(args):
print "Starting %r" % mysqld_wrapper_list[0] print "Starting %r" % mysqld_wrapper_list[0]
sys.stdout.flush() sys.stdout.flush()
sys.stderr.flush() sys.stderr.flush()
# try to increase the maximum number of open file descriptors.
# it seems that mysqld requires (max_connections + 810) file descriptors.
# to make it possible, you need to set the hard limit of nofile in
# /etc/security/limits.conf like the following :
# @slapsoft hard nofile 2048
try:
import resource
required_nofile = 2048 # XXX hardcoded value more than 1000 + 810
nofile_limit_list = [max(x, required_nofile) for x in resource.getrlimit(resource.RLIMIT_NOFILE)]
resource.setrlimit(resource.RLIMIT_NOFILE, nofile_limit_list)
except ImportError:
# resource library is only available on Unix platform.
pass
except ValueError:
# 'ValueError: not allowed to raise maximum limit'
pass
os.execl(mysqld_wrapper_list[0], *mysqld_wrapper_list) os.execl(mysqld_wrapper_list[0], *mysqld_wrapper_list)
......
...@@ -23,6 +23,7 @@ slow_query_log_file = %(slow_query_log)s ...@@ -23,6 +23,7 @@ slow_query_log_file = %(slow_query_log)s
long_query_time = 1 long_query_time = 1
max_allowed_packet = 128M max_allowed_packet = 128M
query_cache_size = 0 query_cache_size = 0
query_cache_type = 0
plugin-load = ha_mroonga.so;handlersocket.so plugin-load = ha_mroonga.so;handlersocket.so
......
...@@ -37,11 +37,35 @@ class Recipe(GenericSlapRecipe): ...@@ -37,11 +37,35 @@ class Recipe(GenericSlapRecipe):
""" """
def _install(self): def _install(self):
ip = self.options['ip'] ip = self.options['ip']
backend_url = self.parameter_dict['tidstorage-url'] backend_url = self.options.get('backend-url',
# BBB: Peeking in partition parameters directly. Eew.
self.parameter_dict.get('backend-url',
self.parameter_dict.get('tidstorage-url') # BBB
)
)
backend_server, backend_port = self._getBackendServer(backend_url) backend_server, backend_port = self._getBackendServer(backend_url)
path_list = []
if backend_url.startswith('https://'):
config = dict(
stunnel_binary=self.options['stunnel-binary'],
stunnel_server=ip,
stunnel_port=int(self.options['stunnel-port']),
stunnel_pid_file=self.options['stunnel-pid-file'],
stunnel_conf_file=self.options['stunnel-conf-file'],
shell_path=self.options['shell-path'],
backend_server=backend_server.replace('[', '').replace(']', ''),
backend_port=backend_port,
)
path_list.append(self.createExecutable(self.options['stunnel-wrapper'],
self.substituteTemplate(self.getTemplateFilename('stunnel.in'),
config)))
path_list.append(self.createFile(self.options['stunnel-conf-file'],
self.substituteTemplate(self.getTemplateFilename('stunnel.conf.in'),
config)))
backend_server = ip
backend_port = int(self.options['stunnel-port'])
varnishd_manager_port = int(self.options['manager-port']) varnishd_manager_port = int(self.options['manager-port'])
varnishd_server_port = int(self.options['server-port']) varnishd_server_port = int(self.options['server-port'])
path_list = []
config = dict( config = dict(
varnishd_binary=self.options['varnishd-binary'], varnishd_binary=self.options['varnishd-binary'],
varnish_ip=ip, varnish_ip=ip,
...@@ -51,6 +75,7 @@ class Recipe(GenericSlapRecipe): ...@@ -51,6 +75,7 @@ class Recipe(GenericSlapRecipe):
varnishd_pid_file=self.options['pid-file'], varnishd_pid_file=self.options['pid-file'],
varnish_instance_name=self.options['varnish-instance-name'], varnish_instance_name=self.options['varnish-instance-name'],
varnish_data=self.options['varnish-data'], varnish_data=self.options['varnish-data'],
gcc_location=self.options['gcc-location'],
shell_path=self.options['shell-path'], shell_path=self.options['shell-path'],
vcl_file=self.options['vcl-file'], vcl_file=self.options['vcl-file'],
backend_port=backend_port, backend_port=backend_port,
......
...@@ -33,149 +33,110 @@ sub vcl_recv { ...@@ -33,149 +33,110 @@ sub vcl_recv {
req.request != "PURGE" && req.request != "PURGE" &&
req.request != "DELETE") { req.request != "DELETE") {
/* Non-RFC2616 or CONNECT which is weird. */ /* Non-RFC2616 or CONNECT which is weird. */
return(pipe); return (pipe);
} }
# Pass anything other than GET and HEAD and PURGE directly. # Pass anything other than GET and HEAD directly.
if (req.request != "GET" && req.request != "HEAD" && req.request != "PURGE") { if (req.request != "GET" && req.request != "HEAD") {
/* We only deal with GET and HEAD by default */ return (pass);
return(pass);
} }
if (req.http.Authorization) { if (req.http.Authorization) {
/* Not cacheable by default */ /* Not cacheable by default */
return (pass); return (pass);
} }
# no need to have cookies for the resources # No need to have cookies for static resources
if (req.url ~ "\.(css|js|ico)$") { if (req.url ~ "\.(css|gif|ico|jpg|js|png)$") {
unset req.http.cookie; unset req.http.Cookie;
} }
# remove bogus cookies # Remove bogus cookies
if (req.http.Cookie) { if (req.http.Cookie) {
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__utm.=[^;]+;? *", "\1"); set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__utm.=[^;]+;? *", "\1");
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac_name=\x22\x22;? *", "\1"); set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac_name=\x22\x22;? *", "\1");
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac=\x22Og.3D.3D\x22;? *", "\1"); set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac=\x22Og.3D.3D\x22;? *", "\1");
} }
if (req.http.Cookie == "") { if (req.http.Cookie == "") {
remove req.http.Cookie; unset req.http.Cookie;
} }
if (req.http.Cookie && req.http.Cookie ~ "(^|; ) *__ac=") { if (req.http.Cookie && req.http.Cookie ~ "(^|; ) *__ac=") {
/* Not cacheable for authorised users,
but KM images are cacheable */
if (!(req.url ~ "/km_img/.*\.(png|gif)$")) {
return (pass); return (pass);
} }
}
# XXX Is it OK to remove this of all the case?
remove req.http.Set-Cookie;
if (req.http.Accept-Encoding) {
if (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} elsif (req.http.Accept-Encoding ~ "deflate") {
set req.http.Accept-Encoding = "deflate";
} else {
# unkown algorithm
remove req.http.Accept-Encoding;
}
}
# We do not care about Accept-Language, this is url controlled
remove req.http.Accept-Language;
## XXX login form can defer based on __ac_name cookie value # We do not care about Accept-Encoding, because we don't use varnish as the front most HTTP server.
if (req.url ~ "/(login_form|WebSite_viewLoginDialog)($|\?)") { unset req.http.Accept-Encoding;
return (pass);
}
if (req.backend.healthy) { if (req.backend.healthy) {
set req.grace = 1h; set req.grace = 1h;
} else { } else {
set req.grace = 1w; set req.grace = 1w;
} }
return(lookup); return (lookup);
}
# Run after a pass in vcl_recv OR after a lookup that returned a hitpass
sub vcl_pass {
# unset If-Modified-Since to avoid reusing anonymous's browser cache
# after login.
unset req.http.If-Modified-Since;
return (pass);
} }
# Creates the varnish cache key by the url # Creates the varnish cache key by the url
sub vcl_hash { sub vcl_hash {
# We use url only for hash.
hash_data(req.url); hash_data(req.url);
return(hash); return (hash);
} }
# Called after a cache lookup if the requested document was found in the cache # Called after a cache lookup if the requested document was found in the cache
sub vcl_hit { sub vcl_hit {
# According Vary Header do not return those headers return (deliver);
remove req.http.Accept-Language;
remove req.http.Accept-Encoding;
remove req.http.Cookie;
return(deliver);
} }
# Called after a cache lookup if the requested document was not found in the cache # Called after a cache lookup if the requested document was not found in the cache
sub vcl_miss { sub vcl_miss {
return(fetch); return (fetch);
} }
# Called after a document has been successfully retrieved from the backend # Called after a document has been successfully retrieved from the backend
sub vcl_fetch { sub vcl_fetch {
# we only cache 200 (OK) and 304 (Not Modified) responses. # Unset Expires that is always overridden by Cache-Control.
if (beresp.status != 200 && beresp.status != 304) { unset beresp.http.Expires;
set beresp.ttl = 0s;
} # Unset Pragma that is obsolete.
unset beresp.http.Pragma;
if (beresp.http.cache-control ~ "no-cache") { # We only cache 200 (OK) and 304 (Not Modified) responses.
if (beresp.status != 200 && beresp.status != 304) {
set beresp.ttl = 0s; set beresp.ttl = 0s;
} }
if (beresp.ttl == 0s) { # If max-age is 0 or not set, we want no browser cache.
unset beresp.http.expires; if (beresp.ttl <= 0s) {
set beresp.http.cache-control = "no-cache"; set beresp.http.Cache-Control = "no-store";
return(hit_for_pass); # Mark as hit_for_pass for the next 2 minutes.
set beresp.ttl = 120s;
return (hit_for_pass);
} }
# we don't care haproxy's cookie. # We don't care haproxy's cookie.
if (beresp.http.Set-Cookie && beresp.http.Set-Cookie !~ "^SERVERID=[^;]+; path=/$") { if (beresp.http.Set-Cookie && beresp.http.Set-Cookie !~ "^SERVERID=[^;]+; path=/$") {
return(hit_for_pass); return (hit_for_pass);
} } else {
unset beresp.http.Set-Cookie;
if (req.url ~ "\.(css|js|ico)$") {
unset beresp.http.set-cookie;
set beresp.http.cache-control = regsub(beresp.http.cache-control, "^", "public,");
set beresp.http.cache-control = regsub(beresp.http.cache-control, ",$", "");
}
# remove some headers added by caching policy manager to avoid
# '304 Not Modified' in case of login <-> logout switching.
if (beresp.http.content-type ~ "^text/html") {
unset beresp.http.last-modified;
} }
# We set long enough grace for cachable objects.
set beresp.grace = 1w; set beresp.grace = 1w;
/* Never send request to backend even if client ask refreshed content */
if (beresp.ttl > 0s) {
/* Setup grace period for 30days for all cacheable contents */
set beresp.grace = 30d;
# /* Set the clients TTL on this object */
# set beresp.http.cache-control = "max-age = 300";
/* Set how long Varnish will keep it */
set beresp.ttl = 1w;
/* marker for vcl_deliver to reset Age: */
set beresp.http.magicmarker = "1";
}
return(deliver); return (deliver);
} }
# Called before a cached object is delivered to the client # Called before a cached object is delivered to the client
sub vcl_deliver { sub vcl_deliver {
if (resp.http.magicmarker) {
/* Remove the magic marker */
unset resp.http.magicmarker;
/* By definition we have a fresh object */
set resp.http.age = "0";
}
if (obj.hits > 0) { if (obj.hits > 0) {
set resp.http.X-Cache = obj.hits; set resp.http.X-Cache = obj.hits;
} else { } else {
set resp.http.X-Cache = "MISS"; set resp.http.X-Cache = "MISS";
} }
return(deliver); return (deliver);
} }
foreground = yes
pid = %(stunnel_pid_file)s
debug = 4
[remote]
accept = %(stunnel_server)s:%(stunnel_port)s
client = yes
connect = %(backend_server)s:%(backend_port)s
sni = %(stunnel_server)s
#!%(shell_path)s
DAEMON_OPTS="%(stunnel_conf_file)s"
exec %(stunnel_binary)s ${DAEMON_OPTS} 2>&1
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
DAEMON_OPTS="-F \ DAEMON_OPTS="-F \
-a %(varnish_ip)s:%(varnishd_server_port)s \ -a %(varnish_ip)s:%(varnishd_server_port)s \
-T %(varnish_ip)s:%(varnishd_manager_port)s \ -T %(varnish_ip)s:%(varnishd_manager_port)s \
-t 0 \
-p nuke_limit=500 \
-n %(varnish_instance_name)s \ -n %(varnish_instance_name)s \
-f %(vcl_file)s \ -f %(vcl_file)s \
-s file,%(varnish_data)s/varnish_storage.bin,1G" -s file,%(varnish_data)s/varnish_storage.bin,1G"
PIDFILE=%(varnishd_pid_file)s PIDFILE=%(varnishd_pid_file)s
# exporting PATH here so that we will pass the PATH variable to the subprocess # exporting PATH here so that we will pass the PATH variable to the subprocess
export PATH export PATH="%(gcc_location)s:$PATH"
output=$(/bin/tempfile -s.varnish) exec %(varnishd_binary)s -P ${PIDFILE} ${DAEMON_OPTS} 2>&1
exec %(varnishd_binary)s -P ${PIDFILE} ${DAEMON_OPTS} > ${output} 2>&1
...@@ -18,5 +18,4 @@ if [ -z "${VARNISHLOG_ENABLED}" ] || \ ...@@ -18,5 +18,4 @@ if [ -z "${VARNISHLOG_ENABLED}" ] || \
exit 0; exit 0;
fi fi
output=$(/bin/tempfile -s.varnish) exec %(varnishlog_binary)s ${DAEMON_OPTS} 2>&1
exec %(varnishlog_binary)s ${DAEMON_OPTS} > ${output} 2>&1
...@@ -35,11 +35,22 @@ _isurl = re.compile('([a-zA-Z0-9+.-]+)://').match ...@@ -35,11 +35,22 @@ _isurl = re.compile('([a-zA-Z0-9+.-]+)://').match
# based on Zope2.utilities.mkzopeinstance.write_inituser # based on Zope2.utilities.mkzopeinstance.write_inituser
def Zope2InitUser(path, username, password): def Zope2InitUser(path, username, password):
# Set password only once
# Currently, rely on existence of a simple file:
# Create it the first time, then next time, detect this file and do no-op.
inituser_done_path = '%s_done' % path
if os.path.exists(inituser_done_path):
return
if os.path.exists(path):
return
open(path, 'w').write('') open(path, 'w').write('')
os.chmod(path, 0600) os.chmod(path, 0600)
open(path, "w").write('%s:{SHA}%s\n' % ( open(path, 'w').write('%s:{SHA}%s\n' % (
username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1])) username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1]))
open(inituser_done_path, 'w').write('"inituser" file already created once.')
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
def _options(self, options): def _options(self, options):
options['password'] = self.generatePassword() options['password'] = self.generatePassword()
......
...@@ -25,6 +25,9 @@ rest-input-encoding utf-8 ...@@ -25,6 +25,9 @@ rest-input-encoding utf-8
rest-output-encoding utf-8 rest-output-encoding utf-8
default-zpublisher-encoding utf-8 default-zpublisher-encoding utf-8
# Disable ownership checking to execute codes generated by alarm
skip-ownership-checking on
# Temporary storage database (for sessions) # Temporary storage database (for sessions)
<zodb_db temporary> <zodb_db temporary>
<temporarystorage> <temporarystorage>
......
...@@ -35,11 +35,22 @@ _isurl = re.compile('([a-zA-Z0-9+.-]+)://').match ...@@ -35,11 +35,22 @@ _isurl = re.compile('([a-zA-Z0-9+.-]+)://').match
# based on Zope2.utilities.mkzopeinstance.write_inituser # based on Zope2.utilities.mkzopeinstance.write_inituser
def Zope2InitUser(path, username, password): def Zope2InitUser(path, username, password):
# Set password only once
# Currently, rely on existence of a simple file:
# Create it the first time, then next time, detect this file and do no-op.
inituser_done_path = '%s_done' % path
if os.path.exists(inituser_done_path):
return
if os.path.exists(path):
return
open(path, 'w').write('') open(path, 'w').write('')
os.chmod(path, 0600) os.chmod(path, 0600)
open(path, "w").write('%s:{SHA}%s\n' % ( open(path, 'w').write('%s:{SHA}%s\n' % (
username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1])) username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1]))
open(inituser_done_path, 'w').write('"inituser" file already created once.')
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
def _options(self, options): def _options(self, options):
options['password'] = self.generatePassword() options['password'] = self.generatePassword()
......
...@@ -25,6 +25,9 @@ rest-input-encoding utf-8 ...@@ -25,6 +25,9 @@ rest-input-encoding utf-8
rest-output-encoding utf-8 rest-output-encoding utf-8
default-zpublisher-encoding utf-8 default-zpublisher-encoding utf-8
# Disable ownership checking to execute codes generated by alarm
skip-ownership-checking on
# Temporary storage database (for sessions) # Temporary storage database (for sessions)
<zodb_db temporary> <zodb_db temporary>
<temporarystorage> <temporarystorage>
......
...@@ -36,8 +36,12 @@ class Recipe(GenericBaseRecipe): ...@@ -36,8 +36,12 @@ class Recipe(GenericBaseRecipe):
binary-path -- location of the haproxy command binary-path -- location of the haproxy command
ctl-path -- location of the haproxy control script
conf-path -- location of the configuration file conf-path -- location of the configuration file
socket-path -- location of the socket file for administration
ip -- ip of the haproxy server ip -- ip of the haproxy server
port -- port of the haproxy server port -- port of the haproxy server
...@@ -83,7 +87,11 @@ class Recipe(GenericBaseRecipe): ...@@ -83,7 +87,11 @@ class Recipe(GenericBaseRecipe):
'haproxy-listen-snippet.cfg.in') 'haproxy-listen-snippet.cfg.in')
server_snippet = "" server_snippet = ""
ip = self.options['ip'] ip = self.options['ip']
server_check_path = self.options['server-check-path'] server_check_path = self.options.get('server-check-path', None)
if server_check_path:
httpchk = 'option httpchk GET %s' % server_check_path
else:
httpchk = ''
# FIXME: maxconn must be provided per-backend, not globally # FIXME: maxconn must be provided per-backend, not globally
maxconn = self.options['maxconn'] maxconn = self.options['maxconn']
i = 0 i = 0
...@@ -93,7 +101,7 @@ class Recipe(GenericBaseRecipe): ...@@ -93,7 +101,7 @@ class Recipe(GenericBaseRecipe):
'name': name, 'name': name,
'ip': ip, 'ip': ip,
'port': port, 'port': port,
'server_check_path': server_check_path, 'httpchk': httpchk,
}) })
for address in backend_list: for address in backend_list:
i += 1 i += 1
...@@ -108,11 +116,16 @@ class Recipe(GenericBaseRecipe): ...@@ -108,11 +116,16 @@ class Recipe(GenericBaseRecipe):
self.options['conf-path'], self.options['conf-path'],
self.substituteTemplate( self.substituteTemplate(
self.getTemplateFilename('haproxy.cfg.in'), self.getTemplateFilename('haproxy.cfg.in'),
{'server_text': server_snippet}, {'socket_path': self.options['socket-path'],
'server_text': server_snippet},
) )
) )
wrapper_path = self.createPythonScript( wrapper_path = self.createPythonScript(
self.options['wrapper-path'], self.options['wrapper-path'],
'slapos.recipe.librecipe.execute.execute', 'slapos.recipe.librecipe.execute.execute',
arguments=[self.options['binary-path'].strip(), '-f', configuration_path],) arguments=[self.options['binary-path'].strip(), '-f', configuration_path],)
return [configuration_path, wrapper_path] ctl_path = self.createPythonScript(
self.options['ctl-path'],
'%s.haproxy.haproxyctl' % __name__,
{'socket_path':self.options['socket-path']})
return [configuration_path, wrapper_path, ctl_path]
import socket
try:
import readline
except ImportError:
pass
def haproxyctl(conf):
while True:
try:
l = raw_input('> ')
except EOFError:
print
break
if l == 'quit':
break
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(conf['socket_path'])
s.send('%s\n' % l)
while True:
r = s.recv(1024)
if not r:
break
print r
s.close()
listen %(name)s %(ip)s:%(port)s listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert cookie SERVERID insert
balance roundrobin balance roundrobin
option httpchk GET %(server_check_path)s %(httpchk)s
stats uri /haproxy stats uri /haproxy
stats realm Global\ statistics stats realm Global\ statistics
global global
maxconn 4096 maxconn 4096
stats socket %(socket_path)s level admin
defaults defaults
log global log global
......
...@@ -156,7 +156,7 @@ class GenericBaseRecipe(object): ...@@ -156,7 +156,7 @@ class GenericBaseRecipe(object):
if parameters_extra: if parameters_extra:
# pass-through further parameters # pass-through further parameters
lines[-1] += ' \\' lines[-1] += ' \\'
lines.append('\t$@') lines.append('\t"$@"')
content = '\n'.join(lines) + '\n' content = '\n'.join(lines) + '\n'
return self.createFile(name, content, 0700) return self.createFile(name, content, 0700)
......
...@@ -79,7 +79,7 @@ class Part(GenericBaseRecipe): ...@@ -79,7 +79,7 @@ class Part(GenericBaseRecipe):
log = self.options['log'] log = self.options['log']
part_path = self.createFile(os.path.join(logrotate_d, self.options['name']), part_path = self.createFile(os.path.join(logrotate_d, self.options['name']),
"%(logfiles)s {\n%(conf)s\n}" % { "%(logfiles)s {\n%(conf)s\n}\n" % {
'logfiles': log, 'logfiles': log,
'conf': '\n'.join(conf), 'conf': '\n'.join(conf),
} }
......
##############################################################################
#
# Copyright (c) 2012-2013 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
class NeoBaseRecipe(GenericBaseRecipe): class NeoBaseRecipe(GenericBaseRecipe):
...@@ -13,7 +40,7 @@ class NeoBaseRecipe(GenericBaseRecipe): ...@@ -13,7 +40,7 @@ class NeoBaseRecipe(GenericBaseRecipe):
# allocated. # allocated.
# Only then can this recipe start succeeding and actually doing anything # Only then can this recipe start succeeding and actually doing anything
# useful, as per NEO deploying constraints. # useful, as per NEO deploying constraints.
raise Exception('"masters" parameter is mandatory') raise UserError('"masters" parameter is mandatory')
option_list = [ option_list = [
options['binary'], options['binary'],
'-l', options['logfile'], '-l', options['logfile'],
...@@ -23,8 +50,6 @@ class NeoBaseRecipe(GenericBaseRecipe): ...@@ -23,8 +50,6 @@ class NeoBaseRecipe(GenericBaseRecipe):
#'-n', options['name'], #'-n', options['name'],
'-c', options['cluster'], '-c', options['cluster'],
] ]
if options['verbose']:
option_list.append('-v')
option_list.extend(self._getOptionList()) option_list.extend(self._getOptionList())
return [self.createPythonScript( return [self.createPythonScript(
options['wrapper'], options['wrapper'],
......
...@@ -35,20 +35,22 @@ class Recipe(GenericSlapRecipe): ...@@ -35,20 +35,22 @@ class Recipe(GenericSlapRecipe):
publish_dict = dict() publish_dict = dict()
options = self.options.copy() options = self.options.copy()
del options['recipe'] del options['recipe']
slave_reference = options.pop('-slave-reference', None)
for k, v in options.iteritems(): for k, v in options.iteritems():
if k[:1] == '-':
continue
publish_dict[k] = v publish_dict[k] = v
self._setConnectionDict(publish_dict) self._setConnectionDict(publish_dict, slave_reference)
return [] return []
def _setConnectionDict(self, publish_dict): def _setConnectionDict(self, publish_dict, slave_reference=None):
return self.setConnectionDict(publish_dict) return self.setConnectionDict(publish_dict, slave_reference)
SERIALISED_MAGIC_KEY = '_' SERIALISED_MAGIC_KEY = '_'
class Serialised(Recipe): class Serialised(Recipe):
def _setConnectionDict(self, publish_dict): def _setConnectionDict(self, publish_dict, slave_reference=None):
return super(Serialised, self)._setConnectionDict(wrap(publish_dict)) return super(Serialised, self)._setConnectionDict(wrap(publish_dict), slave_reference)
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# By default Redis does not run as a daemon. Use 'yes' if you need it. # By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes daemonize no
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here. # default. You can specify a custom pid file location here.
......
...@@ -33,6 +33,12 @@ import traceback ...@@ -33,6 +33,12 @@ import traceback
DEFAULT_SOFTWARE_TYPE = 'RootSoftwareInstance' DEFAULT_SOFTWARE_TYPE = 'RootSoftwareInstance'
def getListOption(option_dict, key, default=()):
result = option_dict.get(key, default)
if isinstance(result, basestring):
result = result.split()
return result
class Recipe(object): class Recipe(object):
""" """
Request a partition to a slap master. Request a partition to a slap master.
...@@ -91,18 +97,18 @@ class Recipe(object): ...@@ -91,18 +97,18 @@ class Recipe(object):
self.logger = logging.getLogger(name) self.logger = logging.getLogger(name)
software_url = options['software-url'] software_url = options['software-url']
name = options['name'] name = options['name']
return_parameters = options.get('return', '').split() return_parameters = getListOption(options, 'return')
if not return_parameters: if not return_parameters:
self.logger.debug("No parameter to return to main instance." self.logger.debug("No parameter to return to main instance."
"Be careful about that...") "Be careful about that...")
software_type = options.get('software-type', DEFAULT_SOFTWARE_TYPE) software_type = options.get('software-type', DEFAULT_SOFTWARE_TYPE)
filter_kw = dict( filter_kw = dict(
(x, options['sla-' + x]) for x in options.get('sla', '').split() (x, options['sla-' + x]) for x in getListOption(options, 'sla')
if options['sla-' + x] if options['sla-' + x]
) )
partition_parameter_kw = self._filterForStorage(dict( partition_parameter_kw = self._filterForStorage(dict(
(x, options['config-' + x]) (x, options['config-' + x])
for x in options.get('config', '').split() for x in getListOption(options, 'config')
)) ))
slave = options.get('slave', 'false').lower() in \ slave = options.get('slave', 'false').lower() in \
librecipe.GenericBaseRecipe.TRUE_VALUES librecipe.GenericBaseRecipe.TRUE_VALUES
......
##############################################################################
#
# Copyright (c) 2013 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.
#
##############################################################################
import textwrap
from slapos.recipe.librecipe import GenericBaseRecipe
class ExportRecipe(GenericBaseRecipe):
"""\
This recipe creates an exporter script for using with the resilient stack.
Required options:
backup-directory
folder that will contain the dump file.
srv-directory
folder that contain the runner directory.
wrapper
full path of the exporter script to create.
"""
def install(self):
wrapper = self.options['wrapper']
self.createBackupScript(wrapper)
return [wrapper]
def createBackupScript(self, wrapper):
"""\
Create a script to backup the database in 'custom' format.
"""
content = textwrap.dedent("""\
#!%(shell-binary)s
umask 077
sync_element () {
path=$1
backup_path=$2
shift 2
element_list=$*
for element in $element_list
do
cd $path;
if [ -f $element ] || [ -d $element ]; then
%(rsync-binary)s -avz --safe-links --delete $element $backup_path;
fi
done
}
sync_element %(srv-directory)s/runner %(backup-directory)s/runner/ instance project proxy.db softwareLink
sync_element %(etc-directory)s %(backup-directory)s/etc/ .rcode .project .users ssh
if [ -d %(backup-directory)s/runner/software ]; then
rm %(backup-directory)s/runner/software/*
fi
""" % self.options)
self.createExecutable(wrapper, content=content)
class ImportRecipe(GenericBaseRecipe):
"""\
This recipe creates an importer script for using with the resilient stack.
Required options:
backup-directory
folder that will contain the dump file.
srv-directory
folder that contain the runner directory.
wrapper
full path of the exporter script to create.
"""
def install(self):
wrapper = self.options['wrapper']
self.createRestoreScript(wrapper)
return [wrapper]
def createRestoreScript(self, wrapper):
"""\
Create a script to restore the database from 'custom' format.
"""
content = textwrap.dedent("""\
#!%(shell-binary)s
umask 077
restore_element () {
backup_path=$1
restore_path=$2
shift 2
element_list=$*
for element in $element_list
do
cd $backup_path;
if [ -f $element ] || [ -d $element ]; then
%(rsync-binary)s -avz --delete $backup_path/$element $restore_path;
fi
done
}
restore_element %(backup-directory)s/runner/ %(srv-directory)s/runner instance project proxy.db softwareLink
restore_element %(backup-directory)s/etc/ %(etc-directory)s .rcode .project .users ssh
ifs=$IFS IFS=';'
read user pass remaining < %(etc-directory)s/.users
IFS=$ifs
%(curl-binary)s -vg6L -F clogin="$user" -F cpwd="$pass" --dump-header login_cookie %(backend-url)s/doLogin;
%(curl-binary)s -vg6LX POST --cookie login_cookie --max-time 5 %(backend-url)s/runSoftwareProfile;
rm -f login_cookie
""" % self.options)
self.createExecutable(wrapper, content=content)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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