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

Merge branch 'master' into slaprunner

parents 458d32ef 7862e18a
Changes Changes
======= =======
0.46 (Unreleased) 0.53 (Unreleased)
----------------- -----------------
* No change yet. * No change yet.
0.52 (2012-05-16)
-----------------
* Request bugfix: Correct default software_type (was: RootInstanceSoftware).
[Cedric de Saint Martin]
* Request will raise again if requested instance is not ready
[Romain Courteaud]
* Apache Frontend: assume apache is available from standard ports.
Consequence: url connection parameter of slave instance doesn't contain
port. [Cedric de Saint Martin]
* Apache Frontend bugfix: correctly detect slave instance type (zope).
[Cedric de Saint Martin]
* Apache Frontend: "default" slave instances are available through http
in addition to https. [Cedric de Saint Martin]
* Apache Frontend: Configuration: Add mod_deflate and set ProxyPreserveHost
[Cedric de Saint Martin]
0.51 (2012-05-14)
-----------------
* LAMP stack bugfix: Users were losing data when slapgrid is ran (Don't
erase htdocs if it already exist). [Cedric de Saint Martin]
0.50 (2012-05-12)
-----------------
* LAMP stack bugfix: fix a crash where recipe was trying to restart
non-existent httpd process. [Cedric de Saint Martin]
* LAMP stack bugfix: don't erase htdocs at update [Cedric de Saint Martin]
* Apache Frontend: Improve Apache configuration, inspired by Nexedi
production frontend. [Cedric de Saint Martin]
* Allow sysadmin of node to customize frontend instance.
[Cedric de Saint Martin]
* Apache Frontend: Change 'zope=true' option to 'type=zope'.
[Cedric de Saint Martin]
* Apache Frontend: listens to plain http port as well to redirect to https.
[Cedric de Saint Martin]
0.49 (2012-05-10)
-----------------
* Apache Frontend supports Zope and Varnish. [Cedric de Saint Martin]
0.48 (2012-04-26)
-----------------
* New utility recipe: slapos.recipe.generate_output_if_input_not_null.
[Cedric de Saint Martin]
* New promise recipe: slapos.recipe.url_available: check if url returns http
code 200. [Cedric de Saint Martin]
* Fix: slapos.recipe.request won't raise anymore if instance is not ready.
[Cedric de Saint Martin]
* Fix: slapos.recipe.request won't assume instance reference if not
specified. [Cedric de Saint Martin]
0.47 (2012-04-19)
-----------------
* Slap Test Agent [Yingjie Xu]
0.46 (2012/04/12)
-----------------
* xvfb and firefox initial release [Romain Courteaud]
0.45 (2012-03-29) 0.45 (2012-03-29)
----------------- -----------------
......
...@@ -20,8 +20,8 @@ extends = ...@@ -20,8 +20,8 @@ extends =
[apache-php] [apache-php]
# Note: Shall react on each build of apache and reinstall itself # Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://fr2.php.net/distributions/php-5.3.10.tar.gz url = http://fr2.php.net/distributions/php-5.3.13.tar.gz
md5sum = 2b3d2d0ff22175685978fb6a5cbcdc13 md5sum = 179c67ce347680f468edbfc3c425476a
configure-options = configure-options =
--with-apxs2=${apache:location}/bin/apxs --with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location} --with-libxml-dir=${libxml2:location}
......
...@@ -45,6 +45,7 @@ configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_na ...@@ -45,6 +45,7 @@ configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_na
--enable-cgid --enable-cgid
--enable-charset-lite --enable-charset-lite
--enable-disk-cache --enable-disk-cache
--enable-mem-cache
--enable-echo --enable-echo
--enable-exception-hook --enable-exception-hook
--enable-mods-shared=all --enable-mods-shared=all
...@@ -115,3 +116,73 @@ configure-options = -c mod_antiloris.c ...@@ -115,3 +116,73 @@ configure-options = -c mod_antiloris.c
make-binary = ${:configure-command} make-binary = ${:configure-command}
make-options = -i -a -n antiloris mod_antiloris.la make-options = -i -a -n antiloris mod_antiloris.la
make-targets = make-targets =
[apache-2.2]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.22.tar.gz
md5sum = d77fa5af23df96a8af68ea8114fa6ce1
patch-options = -p1
configure-options = --disable-static
--enable-authn-alias
--enable-bucketeer
--enable-cache
--enable-case-filter
--enable-case-filter-in
--enable-cgid
--enable-charset-lite
--enable-disk-cache
--enable-mem-cache
--enable-echo
--enable-exception-hook
--enable-mods-shared=all
--enable-optional-fn-export
--enable-optional-fn-import
--enable-optional-hook-export
--enable-optional-hook-import
--enable-proxy
--enable-proxy-ajp
--enable-proxy-balancer
--enable-proxy-connect
--enable-proxy-ftp
--enable-proxy-http
--enable-proxy-scgi
--enable-dav
--enable-dav-fs
--enable-so
--enable-ssl
--with-included-apr
--with-ssl=${openssl:location}
--with-z=${zlib:location}
--with-expat=${libexpat:location}
--with-pcre=${pcre:location}
--with-sqlite3=${sqlite3:location}
--with-gdbm=${gdbm:location}
--without-lber
--without-ldap
--without-ndbm
--without-berkeley-db
--without-pgsql
--without-mysql
--without-sqlite2
--without-oracle
--without-freedts
--without-odbc
--without-iconv
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS =-I${libuuid:location}/include
LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib
[apache-antiloris-apache-2.2]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
url = http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2/download
md5sum = 66862bf10e9be3a023e475604a28a0b4
configure-command = ${apache-2.2:location}/bin/apxs
configure-options = -c mod_antiloris.c
make-binary = ${:configure-command}
make-options = -i -a -n antiloris mod_antiloris.la
make-targets =
[buildout]
extends =
../openssl/buildout.cfg
../curl/buildout.cfg
../erlang/buildout.cfg
../icu/buildout.cfg
../spidermonkey/buildout.cfg
parts = couchdb
[couchdb]
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz
md5sum = cd126219b9cb69a4c521abd6960807a6
configure-options =
--with-erlang=${erlang:location}/lib/erlang/usr/include
--with-js-include=${spidermonkey-1.7:location}/include
--with-js-lib=${erlang:location}/lib
--enable-js-trunk
environment-section = couchdb-environ
[couchdb-environ]
PATH = ${erlang:location}/bin:${icu4c:location}/bin:${curl:location}/bin:%(PATH)s
# XXX: Gotta put everything on the same line. If not, it won't compile
CFLAGS = -I${icu4c:location}/include -I${spidermonkey-1.7:location}/include -I${curl:location}/include
LDFLAGS = -L${icu4c:location}/lib -Wl,-rpath=${icu4c:location}/lib -L${spidermonkey-1.7:location}/lib -Wl,-rpath=${spidermonkey-1.7:location}/lib -L${curl:location}/lib -Wl,-rpath=${curl:location}/lib
[buildout] [buildout]
parts = extends =
erlang ../openssl/buildout.cfg
../ncurses/buildout.cfg
../zlib/buildout.cfg
../java/buildout.cfg
parts = erlang
[erlang] [erlang]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://www.erlang.org/download/otp_src_R14B03.tar.gz url = http://www.erlang.org/download/otp_src_R14B04.tar.gz
md5sum = 7979e662d11476b97c462feb7c132fb7 md5sum = 4b469729f103f52702bfb1fb24529dc0
configure-options =
--with-ssl=${openssl:location}
--with-java
--enable-dynamic-ssl-lib
--enable-shared-zlib
--enable-native-libs
environment=
PATH=${java-sdk-1.6.0:location}/bin:%(PATH)s
CFLAGS=-I${ncurses:location}/include -I${zlib:location}/include/
LDFLAGS=-L${ncurses:location}/lib/ -L${zlib:location}/lib/ -Wl,-rpath=${ncurses:location}/lib/ -Wl,-rpath=${zlib:location}/lib/
make-options =
-j1
...@@ -6,6 +6,8 @@ extends = ...@@ -6,6 +6,8 @@ extends =
../dbus/buildout.cfg ../dbus/buildout.cfg
../gtk-2/buildout.cfg ../gtk-2/buildout.cfg
../libpng/buildout.cfg ../libpng/buildout.cfg
../dash/buildout.cfg
../openssl/buildout.cfg
parts = parts =
firefox firefox
...@@ -30,11 +32,11 @@ script = ...@@ -30,11 +32,11 @@ script =
self.copyTree(workdir, "%(location)s") self.copyTree(workdir, "%(location)s")
wrapper_location = os.path.join("%(location)s", "firefox-slapos") wrapper_location = os.path.join("%(location)s", "firefox-slapos")
wrapper = open(wrapper_location, 'w') wrapper = open(wrapper_location, 'w')
wrapper.write("""#!/bin/sh wrapper.write("""#!${dash:location}/bin/dash
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:${alsa:location}/lib:%(location)s export LD_LIBRARY_PATH=%(location)s:${libXrender: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 PATH=${fontconfig:location}/bin:$PATH export PATH=${fontconfig:location}/bin:$PATH
%(location)s/firefox $*""") exec %(location)s/firefox $*""")
wrapper.close() wrapper.close()
os.chmod(wrapper_location, 0777) os.chmod(wrapper_location, 0777)
...@@ -6,6 +6,7 @@ extends = ...@@ -6,6 +6,7 @@ extends =
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../bzip2/buildout.cfg ../bzip2/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../bzip2/buildout.cfg
parts = parts =
fontconfig fontconfig
......
...@@ -37,8 +37,8 @@ configure-options = ...@@ -37,8 +37,8 @@ configure-options =
environment = environment =
PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:%(PATH)s PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig::${libXrender:location}/lib/pkgconfig PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig::${libXrender:location}/lib/pkgconfig
CPPFLAGS=-I${cairo:location}/include/cairo CPPFLAGS=-I${cairo:location}/include/cairo -I${libX11:location}/include/X11 -I${libxcb:location}/include/xcb -I${libXau:location}/include/X11 -I${bzip2:location}/include -L${libXrender:location}/include -I${zlib:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${libXrender:location}/lib -Wl,-rpath=${libXrender:location}/lib -lXrender LDFLAGS=-L${cairo:location}/lib -Wl,-rpath=${cairo:location}/lib -L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${libxcb:location}/lib -Wl,-rpath=${libxcb:location}/lib -L${libXau:location}/lib -Wl,-rpath=${libXau:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${libXrender:location}/lib -Wl,-rpath=${libXrender:location}/lib -lXrender -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib:${libXrender:location}/lib LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib:${libXrender:location}/lib
[gdk-pixbuf] [gdk-pixbuf]
...@@ -74,9 +74,10 @@ configure-options = ...@@ -74,9 +74,10 @@ configure-options =
--disable-cups --disable-cups
--disable-papi --disable-papi
--enable-explicit-deps --enable-explicit-deps
--disable-xinerama
environment = environment =
PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gettext:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xcbproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xcbproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig
CPPFLAGS=-I${libtiff:location}/include -I${libjpeg:location}/include -I${libpng:location}/include -I${libX11:location}/include/ -I${xproto:location}/include -I${kbproto:location}/include -I${libXrender:location}/include -I${render:location}/include -I${libXext:location}/include -I${cairo:location}/include/cairo CPPFLAGS=-I${libtiff:location}/include -I${libjpeg:location}/include -I${libpng:location}/include -I${libX11:location}/include/ -I${xproto:location}/include -I${kbproto:location}/include -I${libXrender:location}/include -I${render:location}/include -I${libXext:location}/include -I${cairo:location}/include/cairo -I${zlib:location}/include -I${bzip2:location}/include -I${libXdmcp:location}/include -I${glib:location}/include/gio-unix-2.0 -I${glib:location}/include/glib-2.0 -I${glib:location}/include -I${atk:location}/include/atk-1.0
LDFLAGS=-L${gettext:location}/lib -L${glib:location}/lib -L${libtiff:location}/lib -L${libjpeg:location}/lib -L${libpng:location}/lib -L${zlib:location}/lib -L${libXrender:location}/lib -L${libX11:location}/lib -L${libXext:location}/lib -L${pango:location}/lib LDFLAGS=-L${libtiff:location}/lib -Wl,-rpath=${libtiff:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib -L${libpng:location}/lib -Wl,-rpath=${libpng:location}/lib -L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${xproto:location}/lib -Wl,-rpath=${xproto:location}/lib -L${kbproto:location}/lib -Wl,-rpath=${kbproto:location}/lib -L${libXrender:location}/lib -Wl,-rpath=${libXrender:location}/lib -L${render:location}/lib -Wl,-rpath=${render:location}/lib -L${libXext:location}/lib -Wl,-rpath=${libXext:location}/lib -L${cairo:location}/lib -Wl,-rpath=${cairo:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${libXdmcp:location}/lib -Wl,-rpath=${libXdmcp:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${atk:location}/lib -Wl,-rpath=${atk:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib
LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib:${libX11:location}/lib LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib:${libX11:location}/lib
[buildout]
parts = icu4c
[icu4c]
recipe = hexagonit.recipe.cmmi
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz
md5sum = ea93970a0275be6b42f56953cd332c17
configure-command = source/configure
configure-options = --prefix=${:location}
...@@ -123,14 +123,14 @@ hexagonit.recipe.cmmi = 1.5.0 ...@@ -123,14 +123,14 @@ hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3.4 lxml = 2.3.4
meld3 = 0.6.8 meld3 = 0.6.8
netaddr = 0.7.6 netaddr = 0.7.6
slapos.core = 0.24 slapos.core = 0.25
slapos.libnetworkcache = 0.12 slapos.libnetworkcache = 0.12
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
Flask = 0.8 Flask = 0.8
# Required by: # Required by:
...@@ -138,11 +138,11 @@ Flask = 0.8 ...@@ -138,11 +138,11 @@ Flask = 0.8
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.0
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
# slapos.libnetworkcache==0.12 # slapos.libnetworkcache==0.12
# supervisor==3.0a12 # supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-004 # zc.buildout==1.6.0-dev-SlapOS-004
...@@ -150,9 +150,9 @@ netifaces = 0.8 ...@@ -150,9 +150,9 @@ netifaces = 0.8
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
zope.interface = 3.8.0 zope.interface = 3.8.0
[buildout]
parts = spidermonkey
[spidermonkey-1.7]
recipe = slapos.recipe.build
url = ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
md5sum = 5571134c3863686b623ebe4e6b1f6fe6
slapos_promise =
directory:include/
directory:bin/
file:bin/js
statlib:lib/libjs.a
file:lib/libjs.so
script =
url = self.download(self.options['url'], self.options['md5sum'])
extract_dir = self.extract(url)
workdir = os.path.join(guessworkdir(extract_dir), 'src')
env.update(JS_DIST=self.options['location'])
call(['make', '-f', 'Makefile.ref'], cwd=workdir, env=env)
call(['make', '-f', 'Makefile.ref', 'export'], cwd=workdir, env=env)
[spidermonkey]
<= spidermonkey-1.7
...@@ -7,12 +7,19 @@ extends = ...@@ -7,12 +7,19 @@ extends =
../libxslt/buildout.cfg ../libxslt/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../bzip2/buildout.cfg
../openssl/buildout.cfg ../openssl/buildout.cfg
../gnutls/buildout.cfg
../autoconf/buildout.cfg
../automake/buildout.cfg
../libtool/buildout.cfg
../dash/buildout.cfg
parts = parts =
libXdmcp libXdmcp
libXext libXext
libXau libXau
libXinerama
libSM libSM
libXrender libXrender
...@@ -48,10 +55,21 @@ environment = ...@@ -48,10 +55,21 @@ environment =
PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
[xtrans-tmp-env-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = xtrans_tmp_env.patch
md5sum = 37d82a3b6009113023599632117a6855
[xtrans] [xtrans]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/xtrans-1.2.6.tar.bz2 url = http://www.x.org/releases/X11R7.6/src/lib/xtrans-1.2.6.tar.bz2
md5sum = c66f9ffd2da4fb012220c6c40ebc7609 md5sum = c66f9ffd2da4fb012220c6c40ebc7609
patches =
${xtrans-tmp-env-patch:location}/${xtrans-tmp-env-patch:filename}
patches_md5sum = ${xtrans-tmp-env-patch:md5sum}
patch-options = -p1
configure-options = configure-options =
--disable-docs --disable-docs
--without-xmlto --without-xmlto
...@@ -83,10 +101,21 @@ recipe = hexagonit.recipe.cmmi ...@@ -83,10 +101,21 @@ recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/xcb/libpthread-stubs-0.3.tar.bz2 url = http://www.x.org/releases/X11R7.6/src/xcb/libpthread-stubs-0.3.tar.bz2
md5sum = e8fa31b42e13f87e8f5a7a2b731db7ee md5sum = e8fa31b42e13f87e8f5a7a2b731db7ee
[libxcb-tmp-env-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = xcb_tmp_env.patch
md5sum = 61f39878120ba434a169e24cae2af862
[libxcb] [libxcb]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/xcb/libxcb-1.7.tar.bz2 url = http://www.x.org/releases/X11R7.6/src/xcb/libxcb-1.7.tar.bz2
md5sum = 925699df361b99491165ebc12068056b md5sum = 925699df361b99491165ebc12068056b
patches =
${libxcb-tmp-env-patch:location}/${libxcb-tmp-env-patch:filename}
patches_md5sum = ${libxcb-tmp-env-patch:md5sum}
patch-options = -p1
configure-options = configure-options =
--disable-static --disable-static
--disable-build-docs --disable-build-docs
...@@ -153,7 +182,7 @@ configure-options = ...@@ -153,7 +182,7 @@ configure-options =
--without-xmlto --without-xmlto
--without-fop --without-fop
environment = environment =
PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig:${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
LD_RUN_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib LD_RUN_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
...@@ -243,6 +272,7 @@ environment = ...@@ -243,6 +272,7 @@ environment =
LD_LIBRARY_PATH=${xproto:location}/lib/ LD_LIBRARY_PATH=${xproto:location}/lib/
LD_RUN_PATH=${xproto:location}/lib/ LD_RUN_PATH=${xproto:location}/lib/
CPPFLAGS=-I${xproto:location}/include/ -I${zlib:location}/include CPPFLAGS=-I${xproto:location}/include/ -I${zlib:location}/include
LDFLAGS=-L${xproto:location}/lib -Wl,-rpath=${xproto:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
[libXfont] [libXfont]
...@@ -253,8 +283,8 @@ environment = ...@@ -253,8 +283,8 @@ environment =
PKG_CONFIG_PATH=${fontsproto:location}/lib/pkgconfig:${libfontenc:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${freetype:location}/lib/pkgconfig PKG_CONFIG_PATH=${fontsproto:location}/lib/pkgconfig:${libfontenc:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${freetype:location}/lib/pkgconfig
LD_LIBRARY_PATH=${fontsproto:location}/lib:${libfontenc:location}/lib:${xtrans:location}/include/:${xproto:location}/lib/:${freetype:location}/lib LD_LIBRARY_PATH=${fontsproto:location}/lib:${libfontenc:location}/lib:${xtrans:location}/include/:${xproto:location}/lib/:${freetype:location}/lib
LD_RUN_PATH=${fontsproto:location}/lib:${libfontenc:location}/lib:${xproto:location}/lib/:${xtrans:location}/include/:${freetype:location}/lib LD_RUN_PATH=${fontsproto:location}/lib:${libfontenc:location}/lib:${xproto:location}/lib/:${xtrans:location}/include/:${freetype:location}/lib
LDFLAGS=-L${zlib:location}/lib LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${libfontenc:location}/lib -Wl,-rpath=${libfontenc:location}/lib
CPPFLAGS=-I${zlib:location}/include CPPFLAGS=-I${zlib:location}/include -I${bzip2:location}/include -I${libfontenc:location}/include
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
[libxkbfile] [libxkbfile]
...@@ -308,11 +338,14 @@ md5sum = d43c2afc69937655d13c02588c9ff974 ...@@ -308,11 +338,14 @@ md5sum = d43c2afc69937655d13c02588c9ff974
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://xlibs.freedesktop.org/release/libXrender-0.9.0.tar.bz2 url = http://xlibs.freedesktop.org/release/libXrender-0.9.0.tar.bz2
md5sum = ce7cda009aa0b10a73637941d44ae789 md5sum = ce7cda009aa0b10a73637941d44ae789
configure-options =
--disable-static
environment = environment =
PKG_CONFIG_PATH=${render:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig PKG_CONFIG_PATH=${renderproto:location}/lib/pkgconfig:${xorg-util-macros:location}/share/pkgconfig:${render:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig
CPPFLAGS=-I${libX11:location}/include/ -I${xproto:location}/include -I${kbproto:location}/include CPPFLAGS=-I${renderproto:location}/include/ -I${libX11:location}/include/ -I${libxcb:location}/include -I${libXau:location}/include -I${libXdmcp:location}/include -I${xproto:location}/include -I${kbproto:location}/include
LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib
LD_RUN_PATH=${render:location}/lib LD_RUN_PATH=${render:location}/lib
LDFLAGS=-L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${libxcb:location}/lib -Wl,-rpath=${libxcb:location}/lib -L${libXau:location}/lib -Wl,-rpath=${libXau:location}/lib -L${libXdmcp:location}/lib -Wl,-rpath=${libXdmcp:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
[libXinerama] [libXinerama]
...@@ -350,33 +383,14 @@ environment = ...@@ -350,33 +383,14 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
LIBUUID_CFLAGS=-I${libuuid:location}/include LIBUUID_CFLAGS=-I${libuuid:location}/include
[renderproto]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/proto/renderproto-0.11.1.tar.bz2
md5sum = a914ccc1de66ddeb4b611c6b0686e274
[libXrender]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXrender-0.9.6.tar.bz2
md5sum = 3b3b7d076c2384b6c600c0b5f4ba971f
configure-options =
--disable-static
environment =
PKG_CONFIG_PATH=${libX11:location}/lib/pkgconfig:${renderproto:location}/lib/pkgconfig:${xorg-util-macros:location}/share/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${libX11:location}/include -I${renderproto:location}/include -I${xproto:location}/include
[libXt] [libXt]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXt-1.0.9.tar.bz2 url = http://www.x.org/releases/X11R7.6/src/lib/libXt-1.0.9.tar.bz2
md5sum = 8a414f8f2327aaa616ca2dcac1f5d8c3 md5sum = 8a414f8f2327aaa616ca2dcac1f5d8c3
configure-options =
--disable-static
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${render:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libSM:location}/lib/pkgconfig:${libICE:location}/lib/pkgconfig PKG_CONFIG_PATH=${libSM:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libICE:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig
CPPFLAGS=-I${xproto:location}/include -I${libX11:location}/include -I${libSM:location}/include -I${libICE:location}/include -I${kbproto:location}/include CPPFLAGS=-I${libSM:location}/include -I${kbproto:location}/include -I${libICE:location}/include -I${xproto:location}/include -I${libX11:location}/include
[dri2proto] [dri2proto]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
...@@ -440,11 +454,50 @@ environment = ...@@ -440,11 +454,50 @@ environment =
PKG_CONFIG_PATH=${damageproto:location}/lib/pkgconfig:${xfixes:location}/lib/pkgconfig:${fixesproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig PKG_CONFIG_PATH=${damageproto:location}/lib/pkgconfig:${xfixes:location}/lib/pkgconfig:${fixesproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig
CPPFLAGS=-I${libX11:location}/include -I${xproto:location}/include -I${fixesproto:location}/include -I${xextproto:location}/include -I${damageproto:location}/include -I${xfixes:location}/include CPPFLAGS=-I${libX11:location}/include -I${xproto:location}/include -I${fixesproto:location}/include -I${xextproto:location}/include -I${damageproto:location}/include -I${xfixes:location}/include
[xorg-tmp-env-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = tmp_env.patch
md5sum = 8b60ab8121f0564a681fc00d03101696
[libxmu]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXmu-1.1.0.tar.gz
md5sum = 15e1cb9aaf97eae169bfe6944e0a541e
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libXt:location}/lib/pkgconfig
CPPFLAGS=-I${libX11:location}/include -I${xextproto:location}/include
[libXcursor]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXcursor-1.1.11.tar.gz
md5sum = 55558a41d0bcf9210636858844fa4d2f
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${render:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${fixesproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${xfixes:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig
CPPFLAGS=-I${render:location}/include -I${xproto:location}/include -I${fixesproto:location}/include -I${libX11:location}/include -I${xfixes:location}/include -I${libXrender:location}/include
[xwd]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/app/xwd-1.0.4.tar.gz
md5sum = f8da771069756210833524b5afa1832c
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig:${xproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libxkbfile:location}/lib/pkgconfig
CPPFLAGS=-I${xproto:location}/include -I${libX11:location}/include -I${libxkbfile:location}/include# -I${xfixes:location}/include -I${libXrender:location}/include
LDFLAGS=-L${xproto:location}/lib -Wl,-rpath=${xproto:location}/lib -L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${libxkbfile:location}/lib -Wl,-rpath=${libxkbfile:location}/lib -lX11
[xserver] [xserver]
# Adds Xvfb functionnality # Adds Xvfb functionnality
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/xserver/xorg-server-1.9.3.tar.bz2 url = http://www.x.org/releases/X11R7.6/src/xserver/xorg-server-1.9.3.tar.bz2
md5sum = 5bef6839a76d029204ab31aa2fcb5201 md5sum = 5bef6839a76d029204ab31aa2fcb5201
patches =
${xorg-tmp-env-patch:location}/${xorg-tmp-env-patch:filename}
patches_md5sum = ${xorg-tmp-env-patch:md5sum}
patch-options = -p1
configure-options = configure-options =
--enable-xvfb --enable-xvfb
--disable-aiglx --disable-aiglx
...@@ -454,15 +507,13 @@ configure-options = ...@@ -454,15 +507,13 @@ configure-options =
--disable-dri --disable-dri
--disable-dri2 --disable-dri2
--disable-xorg --disable-xorg
--disable-xprint
--disable-config-hal --disable-config-hal
--disable-tcp-transport
--with-xkb-bin-directory=${xkbcomp:location}/bin --with-xkb-bin-directory=${xkbcomp:location}/bin
--with-xkb-path=${xkeyboard-config:location}/share/X11/xkb --with-xkb-path=${xkeyboard-config:location}/share/X11/xkb
#XXX-Cedric : The following can be safely removed as soon as Xvfb is known as working --with-sha1=libgcrypt
# --with-default-font-path="${xfree86-fonts:location}/share/fonts/X11/Type1,${fontutil:location}/share/fonts/X11/75dpi,${cursor-fonts:location}/share/fonts/X11/misc"
#depends = ${adobe-75dpi-fonts:location}
environment = environment =
PKG_CONFIG_PATH=${pixman:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${xorg-util-macros:location}/share/pkgconfig:${fixesproto:location}/lib/pkgconfig:${damageproto:location}/lib/pkgconfig:${xcmiscproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${bigreqsproto:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${randrproto:location}/lib/pkgconfig:${renderproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${fontsproto:location}/lib/pkgconfig:${videoproto:location}/lib/pkgconfig:${recordproto:location}/lib/pkgconfig:${resourceproto:location}/lib/pkgconfig:${xineramaproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libxkbfile:location}/lib/pkgconfig:${libXfont:location}/lib/pkgconfig PKG_CONFIG_PATH=${pixman:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${xorg-util-macros:location}/share/pkgconfig:${fixesproto:location}/lib/pkgconfig:${damageproto:location}/lib/pkgconfig:${xcmiscproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${bigreqsproto:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${randrproto:location}/lib/pkgconfig:${renderproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${fontsproto:location}/lib/pkgconfig:${videoproto:location}/lib/pkgconfig:${recordproto:location}/lib/pkgconfig:${resourceproto:location}/lib/pkgconfig:${xineramaproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libxkbfile:location}/lib/pkgconfig:${libXfont:location}/lib/pkgconfig:${gpg-error:location}/lib/pkgconfig
CPPFLAGS=-I${xproto:location}/include -I${pixman:location}/include/pixman-1 -I${xextproto:location}/include -I${inputproto:location}/include -I${fontsproto:location}/include -I${kbproto:location}/include -I${xineramaproto:location}/include -I${renderproto:location}/include -I${bigreqsproto:location}/include -I${videoproto:location}/include -I${resourceproto:location}/include -I${xcmiscproto:location}/include -I${xtrans:location}/include -I${libXau:location}/include -I${randrproto:location}/include -I${libxkbfile:location}/include -I${recordproto:location}/include -I${fixesproto:location}/include -I${damageproto:location}/include CPPFLAGS=-I${xproto:location}/include -I${pixman:location}/include/pixman-1 -I${xextproto:location}/include -I${inputproto:location}/include -I${fontsproto:location}/include -I${kbproto:location}/include -I${xineramaproto:location}/include -I${renderproto:location}/include -I${bigreqsproto:location}/include -I${videoproto:location}/include -I${resourceproto:location}/include -I${xcmiscproto:location}/include -I${xtrans:location}/include -I${libXau:location}/include -I${randrproto:location}/include -I${libxkbfile:location}/include -I${recordproto:location}/include -I${fixesproto:location}/include -I${damageproto:location}/include -I${bzip2:location}/include -I${gcrypt:location}/include -I${zlib:location}/include -I${libfontenc:location}/include -I${gpg-error:location}/include
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath,${openssl:location}/lib LDFLAGS=-L${gcrypt:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${gcrypt:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${libfontenc:location}/lib -Wl,-rpath=${libfontenc:location}/lib -L${libXau:location}/lib -Wl,-rpath=${libXau:location}/lib -L${gpg-error:location}/lib -Wl,-rpath=${gpg-error:location}/lib
--- xorg-server-1.9.3/os/utils.c.old 2012-03-29 18:20:02.000000000 +0200
+++ xorg-server-1.9.3/os/utils.c 2012-03-29 18:39:33.000000000 +0200
@@ -226,7 +226,26 @@ OsSignal(int sig, OsSigHandlerPtr handle
* server at a time. This keeps the servers from stomping on each other
* if the user forgets to give them different display numbers.
*/
-#define LOCK_DIR "/tmp"
+char *
+getcompatibleenv(const char *name, const char *compatible)
+{
+ static char path_list[1][PATH_MAX];
+ char *dir;
+
+ if (path_list[0][0]) {
+ return path_list[0];
+ }
+
+ dir = getenv(name);
+ if (dir == NULL) {
+ return strncpy(path_list[0], compatible, PATH_MAX);
+ } else {
+ return strncpy(path_list[0], dir, PATH_MAX);
+ }
+
+}
+
+#define LOCK_DIR getcompatibleenv("TMPDIR", "/tmp")
#define LOCK_TMP_PREFIX "/.tX"
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
--- libxcb-1.7/src/xcb_util.c.back 2012-04-03 13:30:36.000000000 +0200
+++ libxcb-1.7/src/xcb_util.c 2012-04-03 14:47:00.000000000 +0200
@@ -147,11 +147,31 @@
static int _xcb_open_abstract(char *protocol, const char *file, size_t filelen);
#endif
+char *
+_xcb_getandappendcompatibleenv(const char *name, const char *compatible, const char *suffix)
+{
+ static char path_list[1][PATH_MAX];
+ char *dir;
+
+ if (path_list[0][0])
+ {
+ return path_list[0];
+ }
+
+ dir = getenv(name);
+ if (dir == NULL) {
+ strncpy(path_list[0], compatible, PATH_MAX);
+ } else {
+ strncpy(path_list[0], dir, PATH_MAX);
+ }
+ return strncat(path_list[0], suffix, PATH_MAX);
+}
+
static int _xcb_open(const char *host, char *protocol, const int display)
{
int fd;
- static const char unix_base[] = "/tmp/.X11-unix/X";
- const char *base = unix_base;
+ char *base;
+ base = _xcb_getandappendcompatibleenv("TMPDIR", "/tmp", "/.X11-unix/X");
size_t filelen;
char *file = NULL;
int actual_filelen;
--- xtrans-1.2.6/Xtranssock.c.old 2012-03-29 14:25:45.000000000 +0200
+++ xtrans-1.2.6/Xtranssock.c 2012-03-29 18:40:54.000000000 +0200
@@ -207,29 +207,49 @@ static int TRANS(SocketINETClose) (Xtran
#ifdef UNIXCONN
+char *
+getandappendcompatibleenv(const int index, const char *name, const char *compatible, const char *suffix)
+{
+ static char path_list[2][PATH_MAX];
+ char *dir;
+
+ if (path_list[index][0])
+ {
+ return path_list[index];
+ }
+
+ dir = getenv(name);
+ if (dir == NULL) {
+ strncpy(path_list[index], compatible, PATH_MAX);
+ } else {
+ strncpy(path_list[index], dir, PATH_MAX);
+ }
+ return strncat(path_list[index], suffix, PATH_MAX);
+}
+
#if defined(X11_t)
-#define UNIX_PATH "/tmp/.X11-unix/X"
-#define UNIX_DIR "/tmp/.X11-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.X11-unix/X")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.X11-unix")
#endif /* X11_t */
#if defined(XIM_t)
-#define UNIX_PATH "/tmp/.XIM-unix/XIM"
-#define UNIX_DIR "/tmp/.XIM-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.XIM-unix/XIM")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.XIM-unix")
#endif /* XIM_t */
#if defined(FS_t) || defined(FONT_t)
-#define UNIX_PATH "/tmp/.font-unix/fs"
-#define UNIX_DIR "/tmp/.font-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.font-unix/fs")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.font-unix")
#endif /* FS_t || FONT_t */
#if defined(ICE_t)
-#define UNIX_PATH "/tmp/.ICE-unix/"
-#define UNIX_DIR "/tmp/.ICE-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.ICE-unix/")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.ICE-unix")
#endif /* ICE_t */
#if defined(TEST_t)
-#define UNIX_PATH "/tmp/.Test-unix/test"
-#define UNIX_DIR "/tmp/.Test-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.Test-unix/test")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.Test-unix")
#endif
#if defined(LBXPROXY_t)
-#define UNIX_PATH "/tmp/.X11-unix/X"
-#define UNIX_DIR "/tmp/.X11-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.X11-unix/X")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.X11-unix")
#endif
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.46-dev' version = '0.53-dev'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
...@@ -40,6 +40,7 @@ setup(name=name, ...@@ -40,6 +40,7 @@ setup(name=name,
zip_safe=True, zip_safe=True,
entry_points={ entry_points={
'zc.buildout': [ 'zc.buildout': [
'agent = slapos.recipe.agent:Recipe',
'apache.frontend = slapos.recipe.apache_frontend:Recipe', 'apache.frontend = slapos.recipe.apache_frontend:Recipe',
'apachephp = slapos.recipe.apachephp:Recipe', 'apachephp = slapos.recipe.apachephp:Recipe',
'apacheproxy = slapos.recipe.apacheproxy:Recipe', 'apacheproxy = slapos.recipe.apacheproxy:Recipe',
...@@ -47,6 +48,7 @@ setup(name=name, ...@@ -47,6 +48,7 @@ setup(name=name,
'certificate_authority = slapos.recipe.certificate_authority:Recipe', 'certificate_authority = slapos.recipe.certificate_authority:Recipe',
'certificate_authority.request = slapos.recipe.certificate_authority:Request', 'certificate_authority.request = slapos.recipe.certificate_authority:Request',
'check_port_listening = slapos.recipe.check_port_listening:Recipe', 'check_port_listening = slapos.recipe.check_port_listening:Recipe',
'check_url_available = slapos.recipe.check_url_available:Recipe',
'cron = slapos.recipe.dcron:Recipe', 'cron = slapos.recipe.dcron:Recipe',
'cron.d = slapos.recipe.dcron:Part', 'cron.d = slapos.recipe.dcron:Part',
'davstorage = slapos.recipe.davstorage:Recipe', 'davstorage = slapos.recipe.davstorage:Recipe',
...@@ -57,11 +59,13 @@ setup(name=name, ...@@ -57,11 +59,13 @@ setup(name=name,
'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe', 'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe',
'equeue = slapos.recipe.equeue:Recipe', 'equeue = slapos.recipe.equeue:Recipe',
'erp5testnode = slapos.recipe.erp5testnode:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe',
'generate_output_if_input_not_null = slapos.recipe.generate_output_if_input_not_null:Recipe',
'generate.mac = slapos.recipe.generatemac:Recipe', 'generate.mac = slapos.recipe.generatemac:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe', 'nbdserver = slapos.recipe.nbdserver:Recipe',
'generic.onetimeupload = slapos.recipe.generic_onetimeupload:Recipe', 'generic.onetimeupload = slapos.recipe.generic_onetimeupload:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe', 'helloworld = slapos.recipe.helloworld:Recipe',
'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe', 'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe',
'firefox = slapos.recipe.firefox:Recipe',
'fontconfig = slapos.recipe.fontconfig:Recipe', 'fontconfig = slapos.recipe.fontconfig:Recipe',
'java = slapos.recipe.java:Recipe', 'java = slapos.recipe.java:Recipe',
'kumofs = slapos.recipe.kumofs:Recipe', 'kumofs = slapos.recipe.kumofs:Recipe',
...@@ -112,6 +116,7 @@ setup(name=name, ...@@ -112,6 +116,7 @@ setup(name=name,
'urlparse = slapos.recipe._urlparse:Recipe', 'urlparse = slapos.recipe._urlparse:Recipe',
'vifib = slapos.recipe.vifib:Recipe', 'vifib = slapos.recipe.vifib:Recipe',
'waitfor = slapos.recipe.waitfor:Recipe', 'waitfor = slapos.recipe.waitfor:Recipe',
'xvfb = slapos.recipe.xvfb:Recipe',
'xwiki = slapos.recipe.xwiki:Recipe', 'xwiki = slapos.recipe.xwiki:Recipe',
'zabbixagent = slapos.recipe.zabbixagent:Recipe', 'zabbixagent = slapos.recipe.zabbixagent:Recipe',
'generic.zope = slapos.recipe.generic_zope:Recipe', 'generic.zope = slapos.recipe.generic_zope:Recipe',
......
apache_frontend
==========
Frontend using Apache, allowing to rewrite and proxy URLs like
myinstance.myfrontenddomainname.com to real IP/URL of myinstance.
apache_frontend works using the master instance / slave instance design.
It means that a single main instance of Apache will be used to act as frontend
for many slaves.
How to use
========
First, you will need to request a "master" instance of Apache Frontend with
"domain" parameter, like :
<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="domain">moulefrite.com</parameter>
<parameter id="port">443</parameter>
</instance>
Then, it is possible to request many slave instances
(currently only from slapconsole, UI doesn't work yet)
of Apache Frontend, like :
instance = request(
software_release=apache_frontend,
partition_reference='frontend2',
shared=True,
partition_parameter_kw={"url":"https://[1:2:3:4]:1234/someresource"}
)
Those slave instances will be redirected to the "master" instance,
and you will see on the "master" instance the associated RewriteRules of
all slave instances.
Finally, the slave instance will be accessible from :
https://someidentifier.moulefrite.com.
##############################################################################
#
# Copyright (c) 2012 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 os
import sys
import zc.buildout
import slapos.slap
from slapos.recipe.librecipe import BaseSlapRecipe
from slapos.recipe.librecipe import GenericSlapRecipe
import json
import ConfigParser
class Recipe(BaseSlapRecipe, GenericSlapRecipe):
def install(self):
self.path_list = []
self.crond = self.installCrond()
slap = slapos.slap.slap()
computer_id = self.computer_id
computer_partition_id = self.computer_partition_id
server_url = self.server_url
key_file = self.key_file
cert_file = self.cert_file
slap.initializeConnection(server_url, key_file, cert_file)
self.computer_partition = slap.registerComputerPartition(
computer_id, computer_partition_id)
self.parameter_dict = self.computer_partition.getInstanceParameterDict()
configuration_path = os.path.join(self.work_directory, "agent.cfg")
configuration = ConfigParser.SafeConfigParser()
configuration.add_section("agent")
configuration.set("agent", "portal_url", self.parameter_dict["portal_url"])
configuration.set("agent", "master_url", self.parameter_dict["master_url"])
configuration.set("agent", "report_url", self.parameter_dict["report_url"])
key_filepath = os.path.join(self.work_directory, "key")
key_file = open(key_filepath, "w")
key_file.write(self.parameter_dict["key"])
key_file.close()
configuration.set("agent", "key_file", key_filepath)
cert_filepath = os.path.join(self.work_directory, "cert")
cert_file = open(cert_filepath, "w")
cert_file.write(self.parameter_dict["cert"])
cert_file.close()
configuration.set("agent", "cert_file", cert_filepath)
configuration.set("agent", "maximum_software_installation_duration",
self.parameter_dict["maximum_software_installation_duration"])
configuration.set("agent", "software_live_duration",
self.parameter_dict["software_live_duration"])
configuration.set("agent", "computer_list",
self.parameter_dict["computer_list"])
configuration.set("agent", "software_list",
self.parameter_dict["software_list"])
configuration.set("agent", "log_directory", self.options["log_directory"])
configuration.set("agent", "state_file", self.options["state_file"])
state = open(self.options["state_file"], "w")
state.write('')
state.close()
configuration.add_section("software_uri")
software_list = json.loads(self.parameter_dict["software_list"])
for software in software_list:
configuration.set("software_uri", software, self.parameter_dict[software])
configuration.write(open(configuration_path, "w"))
agent_crond_path = os.path.join(self.crond, "agent")
agent_crond = open(agent_crond_path, "w")
agent_crond.write("*/3 * * * * %s -S %s" % \
(self.options["python_binary"],
"%s --pidfile=%s %s" % \
(self.options["agent_binary"], self.options["pidfile"],
configuration_path)))
agent_crond.close()
return self.path_list + [configuration_path, key_filepath, cert_filepath, agent_crond_path]
def installCrond(self):
_, self.ws = self.egg.working_set()
timestamps = self.createDataDirectory('cronstamps')
cron_output = os.path.join(self.log_directory, 'cron-output')
self._createDirectory(cron_output)
catcher = zc.buildout.easy_install.scripts([('catchcron',
__name__ + '.catdatefile', 'catdatefile')], self.ws, sys.executable,
self.bin_directory, arguments=[cron_output])[0]
self.path_list.append(catcher)
cron_d = os.path.join(self.etc_directory, 'cron.d')
crontabs = os.path.join(self.etc_directory, 'crontabs')
self._createDirectory(cron_d)
self._createDirectory(crontabs)
wrapper = zc.buildout.easy_install.scripts([('crond',
'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[
self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs,
'-t', timestamps, '-f', '-l', '5', '-M', catcher]
)[0]
self.path_list.append(wrapper)
return cron_d
import os
import sys
import time
def catdatefile(args):
directory = args[0]
try:
suffix = args[1]
except IndexError:
suffix = '.log'
f = open(os.path.join(directory,
time.strftime('%Y-%m-%d.%H:%M.%s') + suffix), 'aw')
for line in sys.stdin.read():
f.write(line)
f.close()
...@@ -42,6 +42,19 @@ class Recipe(BaseSlapRecipe): ...@@ -42,6 +42,19 @@ class Recipe(BaseSlapRecipe):
'template/%s' % template_name) 'template/%s' % template_name)
def _install(self): def _install(self):
# Check for mandatory arguments
frontend_domain_name = self.parameter_dict.get("domain")
if frontend_domain_name is None:
raise zc.buildout.UserError('No domain name specified. Please define '
'the "domain" instance parameter.')
# Define optional arguments
frontend_port_number = self.parameter_dict.get("port", 4443)
frontend_plain_http_port_number = self.parameter_dict.get(
"plain_http_port", 8080)
base_varnish_port = 26009
slave_instance_list = self.parameter_dict.get("slave_instance_list", [])
self.path_list = [] self.path_list = []
self.requirements, self.ws = self.egg.working_set() self.requirements, self.ws = self.egg.working_set()
...@@ -51,72 +64,59 @@ class Recipe(BaseSlapRecipe): ...@@ -51,72 +64,59 @@ class Recipe(BaseSlapRecipe):
self.killpidfromfile = zc.buildout.easy_install.scripts( self.killpidfromfile = zc.buildout.easy_install.scripts(
[('killpidfromfile', 'slapos.recipe.erp5.killpidfromfile', [('killpidfromfile', 'slapos.recipe.erp5.killpidfromfile',
'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0] 'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0]
self.path_list.append(self.killpidfromfile) self.path_list.append(self.killpidfromfile)
frontend_port_number = self.parameter_dict.get("port", 4443)
frontend_domain_name = self.parameter_dict.get("domain",
"host.vifib.net")
base_varnish_port = 26009
slave_instance_list = self.parameter_dict.get("slave_instance_list", [])
rewrite_rule_list = [] rewrite_rule_list = []
rewrite_rule_zope_list = []
slave_dict = {} slave_dict = {}
service_dict = {} service_dict = {}
if frontend_port_number is 443:
base_url = "%s/" % frontend_domain_name
else:
base_url = "%s:%s/" % (frontend_domain_name, frontend_port_number)
for slave_instance in slave_instance_list: for slave_instance in slave_instance_list:
url = slave_instance.get("url") backend_url = slave_instance.get("url", None)
if url is None:
continue
reference = slave_instance.get("slave_reference") reference = slave_instance.get("slave_reference")
subdomain = reference.replace("-", "").lower() # Set scheme (http? https?)
slave_dict[reference] = "https://%s.%s" % (subdomain, base_url) # Future work may allow to choose between http and https (or both?)
scheme = 'http://'
enable_cache = slave_instance.get("enable_cache", "") self.logger.info('processing slave instance: %s' % reference)
if enable_cache.upper() in ('1', 'TRUE'):
# Varnish should use stunnel to connect to the backend # Check for mandatory slave fields
base_varnish_control_port = base_varnish_port if backend_url is None:
base_varnish_port += 1 self.logger.warn('No "url" parameter is defined for %s slave'\
# Use regex 'instance. Ignoring it.' % reference)
host_regex = "((\[\w*|[0-9]+\.)(\:|)).*(\]|\.[0-9]+)" continue
slave_host = re.search(host_regex, url).group(0)
port_regex = "\w+(\/|)$" # Check for custom domain (like mypersonaldomain.com)
matcher = re.search(port_regex, url) # If no custom domain, use generated one.
if matcher is not None: domain = slave_instance.get('custom_domain',
slave_port = matcher.group(0) "%s.%s" % (reference.replace("-", "").lower(), frontend_domain_name))
slave_port = slave_port.replace("/", "") # Define the URL where the instance will be available
elif url.startswith("https://"): # WARNING: we use default ports (443, 80) here.
slave_port = 443 slave_dict[reference] = "%s%s/" % (scheme, domain)
else:
slave_port = 80 # Check if we want varnish+stunnel cache.
service_name = "varnish_%s" % reference if slave_instance.get("enable_cache", "").upper() in ('1', 'TRUE'):
varnish_ip = self.getLocalIPv4Address() # XXX-Cedric : need to refactor to clean code? (to many variables)
stunnel_port = base_varnish_port + 1 rewrite_rule = self.configureVarnishSlave(
self.installVarnishCache(service_name, base_varnish_port, backend_url, reference, service_dict, domain)
ip=varnish_ip,
port=base_varnish_port,
control_port=base_varnish_control_port,
backend_host=varnish_ip,
backend_port=stunnel_port,
size="1G")
service_dict[service_name] = dict(public_ip=varnish_ip,
public_port=stunnel_port,
private_ip=slave_host.replace("[", "").replace("]", ""),
private_port=slave_port)
rewrite_rule_list.append("%s.%s http://%s:%s" % \
(reference.replace("-", ""), frontend_domain_name,
varnish_ip, base_varnish_port))
base_varnish_port += 2 base_varnish_port += 2
else: else:
rewrite_rule_list.append("%s.%s %s" % (subdomain, frontend_domain_name, rewrite_rule = "%s %s" % (domain, backend_url)
url))
# Finally, if successful, we add the rewrite rule to our list of rules
if rewrite_rule:
# We check if we have a zope slave. It requires different rewrite
# rule structure.
# So we will have one RewriteMap for normal websites, and one
# RewriteMap for Zope Virtual Host Monster websites.
if slave_instance.get("type", "").lower() in ['zope']:
rewrite_rule_zope_list.append(rewrite_rule)
else:
rewrite_rule_list.append(rewrite_rule)
# Certificate stuff
valid_certificate_str = self.parameter_dict.get("domain_ssl_ca_cert") valid_certificate_str = self.parameter_dict.get("domain_ssl_ca_cert")
valid_key_str = self.parameter_dict.get("domain_ssl_ca_key") valid_key_str = self.parameter_dict.get("domain_ssl_ca_key")
if valid_certificate_str is None and valid_key_str is None: if valid_certificate_str is None and valid_key_str is None:
ca_conf = self.installCertificateAuthority() ca_conf = self.installCertificateAuthority()
key, certificate = self.requestCertificate(frontend_domain_name) key, certificate = self.requestCertificate(frontend_domain_name)
...@@ -125,14 +125,13 @@ class Recipe(BaseSlapRecipe): ...@@ -125,14 +125,13 @@ class Recipe(BaseSlapRecipe):
frontend_domain_name, valid_certificate_str, valid_key_str) frontend_domain_name, valid_certificate_str, valid_key_str)
key = ca_conf.pop("key") key = ca_conf.pop("key")
certificate = ca_conf.pop("certificate") certificate = ca_conf.pop("certificate")
if service_dict != {}: if service_dict != {}:
if valid_certificate_str is not None and valid_key_str is not None: if valid_certificate_str is not None and valid_key_str is not None:
self.installCertificateAuthority() self.installCertificateAuthority()
stunnel_key, stunnel_certificate = \ stunnel_key, stunnel_certificate = \
self.requestCertificate(frontend_domain_name) self.requestCertificate(frontend_domain_name)
else: else:
stunnel_key, stunnet_certificate = key, certificate stunnel_key, stunnel_certificate = key, certificate
self.installStunnel(service_dict, self.installStunnel(service_dict,
stunnel_certificate, stunnel_key, stunnel_certificate, stunnel_key,
ca_conf["ca_crl"], ca_conf["ca_crl"],
...@@ -142,19 +141,87 @@ class Recipe(BaseSlapRecipe): ...@@ -142,19 +141,87 @@ class Recipe(BaseSlapRecipe):
ip_list=["[%s]" % self.getGlobalIPv6Address(), ip_list=["[%s]" % self.getGlobalIPv6Address(),
self.getLocalIPv4Address()], self.getLocalIPv4Address()],
port=frontend_port_number, port=frontend_port_number,
plain_http_port=frontend_plain_http_port_number,
name=frontend_domain_name, name=frontend_domain_name,
rewrite_rule_list=rewrite_rule_list, rewrite_rule_list=rewrite_rule_list,
rewrite_rule_zope_list=rewrite_rule_zope_list,
key=key, certificate=certificate) key=key, certificate=certificate)
# Send connection informations about each slave
for reference, url in slave_dict.iteritems(): for reference, url in slave_dict.iteritems():
self.setConnectionDict(dict(site_url=url), reference) self.setConnectionDict(dict(site_url=url), reference)
# Then set it for master instance
self.setConnectionDict( self.setConnectionDict(
dict(site_url=apache_parameter_dict["site_url"], dict(site_url=apache_parameter_dict["site_url"],
domain_ipv6_address=self.getGlobalIPv6Address(), domain_ipv6_address=self.getGlobalIPv6Address(),
domain_ipv4_address=self.getLocalIPv4Address())) domain_ipv4_address=self.getLocalIPv4Address()))
# Promises
promise_config = dict(
hostname=self.getGlobalIPv6Address(),
port=frontend_port_number,
python_path=sys.executable,
)
promise_v6 = self.createPromiseWrapper(
'apache_ipv6',
self.substituteTemplate(
pkg_resources.resource_filename(
'slapos.recipe.check_port_listening',
'template/socket_connection_attempt.py.in'),
promise_config))
self.path_list.append(promise_v6)
promise_config = dict(
hostname=self.getLocalIPv4Address(),
port=frontend_port_number,
python_path=sys.executable,
)
promise_v4 = self.createPromiseWrapper(
'apache_ipv4',
self.substituteTemplate(
pkg_resources.resource_filename(
'slapos.recipe.check_port_listening',
'template/socket_connection_attempt.py.in'),
promise_config))
self.path_list.append(promise_v4)
return self.path_list return self.path_list
def configureVarnishSlave(self, base_varnish_port, url, reference,
service_dict, domain):
# Varnish should use stunnel to connect to the backend
base_varnish_control_port = base_varnish_port
base_varnish_port += 1
# Use regex
host_regex = "((\[\w*|[0-9]+\.)(\:|)).*(\]|\.[0-9]+)"
slave_host = re.search(host_regex, url).group(0)
port_regex = "\w+(\/|)$"
matcher = re.search(port_regex, url)
if matcher is not None:
slave_port = matcher.group(0)
slave_port = slave_port.replace("/", "")
elif url.startswith("https://"):
slave_port = 443
else:
slave_port = 80
service_name = "varnish_%s" % reference
varnish_ip = self.getLocalIPv4Address()
stunnel_port = base_varnish_port + 1
self.installVarnishCache(service_name,
ip=varnish_ip,
port=base_varnish_port,
control_port=base_varnish_control_port,
backend_host=varnish_ip,
backend_port=stunnel_port,
size="1G")
service_dict[service_name] = dict(public_ip=varnish_ip,
public_port=stunnel_port,
private_ip=slave_host.replace("[", "").replace("]", ""),
private_port=slave_port)
return "%s http://%s:%s" % \
(domain, varnish_ip, base_varnish_port)
def installLogrotate(self): def installLogrotate(self):
"""Installs logortate main configuration file and registers its to cron""" """Installs logortate main configuration file and registers its to cron"""
logrotate_d = os.path.abspath(os.path.join(self.etc_directory, logrotate_d = os.path.abspath(os.path.join(self.etc_directory,
...@@ -301,9 +368,9 @@ class Recipe(BaseSlapRecipe): ...@@ -301,9 +368,9 @@ class Recipe(BaseSlapRecipe):
apache_conf['port'] = port apache_conf['port'] = port
apache_conf['server_admin'] = 'admin@' apache_conf['server_admin'] = 'admin@'
apache_conf['error_log'] = os.path.join(self.log_directory, apache_conf['error_log'] = os.path.join(self.log_directory,
name + '-error.log') 'frontend-apache-error.log')
apache_conf['access_log'] = os.path.join(self.log_directory, apache_conf['access_log'] = os.path.join(self.log_directory,
name + '-access.log') 'frontend-apache-access.log')
self.registerLogRotation(name, [apache_conf['error_log'], self.registerLogRotation(name, [apache_conf['error_log'],
apache_conf['access_log']], self.killpidfromfile + ' ' + apache_conf['access_log']], self.killpidfromfile + ' ' +
apache_conf['pid_file'] + ' SIGUSR1') apache_conf['pid_file'] + ' SIGUSR1')
...@@ -383,7 +450,8 @@ class Recipe(BaseSlapRecipe): ...@@ -383,7 +450,8 @@ class Recipe(BaseSlapRecipe):
self.path_list.append(wrapper) self.path_list.append(wrapper)
return stunnel_conf return stunnel_conf
def installFrontendApache(self, ip_list, port, key, certificate, name, def installFrontendApache(self, ip_list, key, certificate, name,
port=4443, plain_http_port=8080,
rewrite_rule_list=[], rewrite_rule_zope_list=[], rewrite_rule_list=[], rewrite_rule_zope_list=[],
access_control_string=None): access_control_string=None):
# Create htdocs, populate it with default 404 document # Create htdocs, populate it with default 404 document
...@@ -395,10 +463,36 @@ class Recipe(BaseSlapRecipe): ...@@ -395,10 +463,36 @@ class Recipe(BaseSlapRecipe):
notfound_file_content = open(notfound_template_file_location, 'r').read() notfound_file_content = open(notfound_template_file_location, 'r').read()
self._writeFile(notfound_file_location, notfound_file_content) self._writeFile(notfound_file_location, notfound_file_content)
# Create mod_ssl cache directory
cache_directory_location = os.path.join(self.var_directory, 'cache')
mod_ssl_cache_location = os.path.join(cache_directory_location,
'httpd_mod_ssl')
self._createDirectory(cache_directory_location)
self._createDirectory(mod_ssl_cache_location)
# Create "custom" apache configuration file if it does not exist.
# Note : This file won't be erased or changed when slapgrid is ran.
# It can be freely customized by node admin.
custom_apache_configuration_directory = os.path.join(
self.data_root_directory, 'apache-conf.d')
self._createDirectory(custom_apache_configuration_directory)
custom_apache_configuration_file_location = os.path.join(
custom_apache_configuration_directory, 'apache_frontend.custom.conf')
f = open(custom_apache_configuration_file_location, 'a')
f.close()
# Create backup of custom apache configuration
backup_path = self.createBackupDirectory('custom_apache_conf_backup')
backup_cron = os.path.join(self.cron_d, 'custom_apache_conf_backup')
open(backup_cron, 'w').write(
'''0 0 * * * %(rdiff_backup)s %(source)s %(destination)s'''%dict(
rdiff_backup=self.options['rdiff_backup_binary'],
source=custom_apache_configuration_directory,
destination=backup_path))
self.path_list.append(backup_cron)
# Create configuration file and rewritemaps # Create configuration file and rewritemaps
apachemap_name = "apachemap.txt" apachemap_name = "apachemap.txt"
# XXX-Cedric : implement zope specific rewrites list. Current apachemap is
# generic and does not use VirtualHost Monster.
apachemapzope_name = "apachemapzope.txt" apachemapzope_name = "apachemapzope.txt"
self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list)) self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list))
self.createConfigurationFile(apachemapzope_name, self.createConfigurationFile(apachemapzope_name,
...@@ -406,9 +500,17 @@ class Recipe(BaseSlapRecipe): ...@@ -406,9 +500,17 @@ class Recipe(BaseSlapRecipe):
apache_conf = self._getApacheConfigurationDict(name, ip_list, port) apache_conf = self._getApacheConfigurationDict(name, ip_list, port)
apache_conf['ssl_snippet'] = self.substituteTemplate( apache_conf['ssl_snippet'] = self.substituteTemplate(
self.getTemplateFilename('apache.ssl-snippet.conf.in'), self.getTemplateFilename('apache.ssl-snippet.conf.in'),
dict(login_certificate=certificate, login_key=key)) dict(login_certificate=certificate,
login_key=key,
httpd_mod_ssl_cache_directory=mod_ssl_cache_location,
)
)
apache_conf["listen"] = "\n".join(["Listen %s:%s" % (ip, port) for ip in ip_list]) apache_conf["listen"] = "\n".join([
"Listen %s:%s" % (ip, port)
for port in (plain_http_port, port)
for ip in ip_list
])
path = self.substituteTemplate( path = self.substituteTemplate(
self.getTemplateFilename('apache.conf.path-protected.in'), self.getTemplateFilename('apache.conf.path-protected.in'),
...@@ -419,7 +521,9 @@ class Recipe(BaseSlapRecipe): ...@@ -419,7 +521,9 @@ class Recipe(BaseSlapRecipe):
apachemap_path=os.path.join(self.etc_directory, apachemap_name), apachemap_path=os.path.join(self.etc_directory, apachemap_name),
apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name), apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name),
apache_domain=name, apache_domain=name,
port=port, https_port=port,
plain_http_port=plain_http_port,
custom_apache_conf=custom_apache_configuration_file_location,
)) ))
apache_conf_string = self.substituteTemplate( apache_conf_string = self.substituteTemplate(
...@@ -427,11 +531,10 @@ class Recipe(BaseSlapRecipe): ...@@ -427,11 +531,10 @@ class Recipe(BaseSlapRecipe):
apache_config_file = self.createConfigurationFile('apache_frontend.conf', apache_config_file = self.createConfigurationFile('apache_frontend.conf',
apache_conf_string) apache_conf_string)
self.path_list.append(apache_config_file) self.path_list.append(apache_config_file)
self.path_list.extend(zc.buildout.easy_install.scripts([( self.path_list.extend(zc.buildout.easy_install.scripts([(
name, 'slapos.recipe.erp5.apache', 'runApache')], self.ws, 'frontend_apache', 'slapos.recipe.erp5.apache', 'runApache')], self.ws,
sys.executable, self.wrapper_directory, arguments=[ sys.executable, self.wrapper_directory, arguments=[
dict( dict(
required_path_list=[key, certificate], required_path_list=[key, certificate],
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# Basic server configuration # Basic server configuration
PidFile "%(pid_file)s" PidFile "%(pid_file)s"
LockFile "%(lock_file)s"
ServerName %(server_name)s ServerName %(server_name)s
DocumentRoot %(document_root)s DocumentRoot %(document_root)s
...@@ -18,8 +17,7 @@ AddType application/x-gzip .gz .tgz ...@@ -18,8 +17,7 @@ AddType application/x-gzip .gz .tgz
# As backend is trusting REMOTE_USER header unset it always # As backend is trusting REMOTE_USER header unset it always
RequestHeader unset REMOTE_USER RequestHeader unset REMOTE_USER
# SSL Configuration ServerTokens Prod
%(ssl_snippet)s
# Log configuration # Log configuration
ErrorLog "%(error_log)s" ErrorLog "%(error_log)s"
...@@ -28,38 +26,15 @@ LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \" ...@@ -28,38 +26,15 @@ LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common CustomLog "%(access_log)s" common
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
%(path_enable)s %(path_enable)s
# Rewrite part
RewriteEngine On
# Define the two rewritemaps : one for zope, one generic
RewriteMap apachemapzope txt:%(apachemapzope_path)s
RewriteMap apachemapgeneric txt:%(apachemap_path)s
# First, we check if we have a zope backend server
# If so, let's use Virtual Host Daemon rewrite
#RewriteCond ${apachemapzope:%%{SERVER_NAME}} >""
#RewriteRule ^/(\w+)($|/.*) ${apachemapzope:$1}/VirtualHostBase/https/%(apache_domain)s:%(port)s/VirtualHostRoot/_vh_$1$2 [L,P]
# If we have generic backend server, let's rewrite without virtual host daemon
RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >""
RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P]
# If nothing exist : put a nice error
ErrorDocument 404 /notfound.html
# List of modules # List of modules
#LoadModule unixd_module modules/mod_unixd.so
#LoadModule access_compat_module modules/mod_access_compat.so
#LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so LoadModule log_config_module modules/mod_log_config.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule setenvif_module modules/mod_setenvif.so LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_module modules/mod_proxy.so
...@@ -71,4 +46,91 @@ LoadModule dav_fs_module modules/mod_dav_fs.so ...@@ -71,4 +46,91 @@ LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so LoadModule headers_module modules/mod_headers.so
LoadModule cache_module modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule antiloris_module modules/mod_antiloris.so LoadModule antiloris_module modules/mod_antiloris.so
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
# Cache directives
CacheEnable mem /
CacheDefaultExpire 3600
MCacheSize 8192
MCacheMaxObjectCount 1000
MCacheMaxObjectSize 8192
MCacheRemovalAlgorithm LRU
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent
# SSL Configuration
%(ssl_snippet)s
<VirtualHost *:%(https_port)s>
SSLEngine on
SSLProxyEngine on
# Rewrite part
ProxyVia On
ProxyPreserveHost On
ProxyTimeout 600
RewriteEngine On
# Define the two rewritemaps : one for zope, one generic
RewriteMap apachemapzope txt:%(apachemapzope_path)s
RewriteMap apachemapgeneric txt:%(apachemap_path)s
# First, we check if we have a zope backend server
# If so, let's use Virtual Host Daemon rewrite
RewriteCond ${apachemapzope:%%{SERVER_NAME}} >""
RewriteRule ^/(.*)$ ${apachemapzope:%%{SERVER_NAME}}/VirtualHostBase/https/%%{SERVER_NAME}:%%{SERVER_PORT}/VirtualHostRoot/$1 [L,P]
# If we have generic backend server, let's rewrite without virtual host daemon
RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >""
RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P]
# If nothing exist : put a nice error
ErrorDocument 404 /notfound.html
</VirtualHost>
<VirtualHost *:%(plain_http_port)s>
RewriteEngine On
ProxyPreserveHost On
# We accept generic (i.e not lamp) backends on http
RewriteMap apachemapgeneric txt:%(apachemap_path)s
RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >""
RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P]
# Not using HTTPS? Ask that guy over there.
# Dummy redirection to https. Note: will work only if https listens
# on standard port (443).
RewriteRule ^/(.*)$ https://%%{SERVER_NAME}%%{REQUEST_URI}
</VirtualHost>
# Include configuration file not operated by slapos. This file won't be erased
# or changed when slapgrid is ran. It can be freely customized by node admin.
Include %(custom_apache_conf)s
SSLEngine on
SSLProxyEngine on
SSLCertificateFile %(login_certificate)s SSLCertificateFile %(login_certificate)s
SSLCertificateKeyFile %(login_key)s SSLCertificateKeyFile %(login_key)s
SSLRandomSeed startup builtin SSLRandomSeed startup builtin
SSLRandomSeed connect builtin SSLRandomSeed connect builtin
SSLSessionCache shmcb:/%(httpd_mod_ssl_cache_directory)s/ssl_scache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup /dev/urandom 256
SSLRandomSeed connect builtin
SSLProtocol -ALL +SSLv3 +TLSv1
SSLHonorCipherOrder On
SSLCipherSuite RC4-SHA:HIGH:!ADH
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
# Accept proxy to sites using self-signed SSL certificates
SSLProxyCheckPeerCN off
SSLProxyCheckPeerExpire off
...@@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe): ...@@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe):
path_list = [] path_list = []
# Copy application # Copy application
shutil.rmtree(self.options['htdocs']) if not os.path.exists(self.options['htdocs']):
shutil.copytree(self.options['source'], shutil.copytree(self.options['source'],
self.options['htdocs']) self.options['htdocs'])
...@@ -112,6 +112,8 @@ class Recipe(GenericBaseRecipe): ...@@ -112,6 +112,8 @@ class Recipe(GenericBaseRecipe):
# Reload apache configuration # Reload apache configuration
with open(self.options['pid-file']) as pid_file: with open(self.options['pid-file']) as pid_file:
pid = int(pid_file.read().strip(), 10) pid = int(pid_file.read().strip(), 10)
try:
os.kill(pid, signal.SIGUSR1) # Graceful restart os.kill(pid, signal.SIGUSR1) # Graceful restart
except OSError:
pass
return path_list return path_list
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import sys
class Recipe(GenericBaseRecipe):
"""
Create script that will check if "url" is available (e.g page answers 200 OK).
"""
def install(self):
config = {
'url': self.options['url'],
'shell_path': self.options['dash_path'],
}
# XXX-Cedric in this script, curl won't check certificate
promise = self.createExecutable(
self.options['path'],
self.substituteTemplate(self.getTemplateFilename('check_url.in'), config)
)
return [promise]
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
URL="%(url)s"
CODE=$(curl -k -sL $URL -w %%{http_code} -o /dev/null)
if [ $CODE -eq 000 ]; then
echo "$URL is not available (server not reachable)" >&2
exit 1
fi
if ! [ $CODE -eq 200 ]; then
echo "$URL is not available (returned $CODE)" >&2
exit 2
fi
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import sys
class Recipe(GenericBaseRecipe):
def install(self):
prefjs = self.createFile(
self.options['prefsjs-path'],
self.substituteTemplate(self.getTemplateFilename('prefs.js'), {}))
config = {
'firefox_binary': self.options['firefox-path'],
'python_path': sys.executable,
'tmp_path': self.options['tmp-path'],
'pref_path': prefjs,
}
runner = self.createExecutable(
self.options['runner-path'],
self.substituteTemplate(self.getTemplateFilename('firefox_run.in'),
config))
return [runner, prefjs]
#!%(python_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
#
import os
from subprocess import Popen, PIPE
import tempfile
import shutil
import sys
import signal
import subprocess
import time
os.environ['MOZ_NO_REMOTE'] = '1'
os.environ['LC_ALL'] = 'C'
os.environ['MOZ_CRASHREPORTER_DISABLE'] = '1'
os.environ['NO_EM_RESTART'] = '1'
os.environ['TMPDIR'] = "%(tmp_path)s"
os.environ['DISPLAY'] = ':0'
# XXX .Xauthority
profile_path = tempfile.mkdtemp()
shutil.copyfile('%(pref_path)s', os.path.join(profile_path, 'pref.js'))
# os.environ['HOME'] = profile_path
child_pg = None
def sig_handler(signal, frame):
if child_pg is not None:
os.killpg(child_pg, signal.SIGHUP)
os.killpg(child_pg, signal.SIGTERM)
sys.exit(0)
signal.signal(signal.SIGINT, sig_handler)
signal.signal(signal.SIGQUIT, sig_handler)
signal.signal(signal.SIGTERM, sig_handler)
def execute_with_signal_translation(args):
"""Run process as children and translate from SIGTERM to another signal"""
child = subprocess.Popen(args, close_fds=True, preexec_fn=os.setsid)
child_pg = child.pid
try:
while True:
time.sleep(2)
finally:
os.killpg(child_pg, signal.SIGHUP)
os.killpg(child_pg, signal.SIGTERM)
try:
execute_with_signal_translation(
["%(firefox_binary)s", "-no-remote", "-profile", profile_path] + sys.argv[1:])
finally:
shutil.rmtree(profile_path)
// Don't ask if we want to switch default browsers
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.startup.homepage_override.mstone", "ignore");
// disable application updates
user_pref("app.update.enabled", false)
// disables the 'know your rights' button from displaying on first run
user_pref("browser.rights.3.shown", true);
// Disable pop-up blocking
user_pref("browser.allowpopups", true);
user_pref("dom.disable_open_during_load", false);
user_pref("browser.tabs.warnOnClose", false);
// Configure us as the local proxy
//user_pref("network.proxy.type", 2);
// Disable security warnings
user_pref("security.warn_submit_insecure", false);
user_pref("security.warn_submit_insecure.show_once", false);
user_pref("security.warn_entering_secure", false);
user_pref("security.warn_entering_secure.show_once", false);
user_pref("security.warn_entering_weak", false);
user_pref("security.warn_entering_weak.show_once", false);
user_pref("security.warn_leaving_secure", false);
user_pref("security.warn_leaving_secure.show_once", false);
user_pref("security.warn_viewing_mixed", false);
user_pref("security.warn_viewing_mixed.show_once", false);
// Disable "do you want to remember this password?"
user_pref("signon.rememberSignons", false);
// increase the timeout before warning of unresponsive script
user_pref("dom.max_script_run_time", 120);
// this is required to upload files
// user_pref("capability.principal.codebase.p1.granted", "UniversalFileRead");
// user_pref("signed.applets.codebase_principal_support", true);
// user_pref("capability.principal.codebase.p1.id", "http://");
// user_pref("capability.principal.codebase.p1.subjectName", "");
user_pref("browser.link.open_external", 3);
user_pref("browser.link.open_newwindow", 3);
// disables the request to send performance data from displaying
user_pref("toolkit.telemetry.prompted", 2);
user_pref("toolkit.telemetry.rejected", true);
user_pref("browser.migration.version", 5);
user_pref("extensions.SelectionUI", true);
user_pref("network.cookie.prefsMigrated", true);
user_pref("browser.bookmarks.restore_default_bookmarks", false);
user_pref("browser.places.smartBookmarksVersion", 2);
user_pref("privacy.sanitize.migrateFx3Prefs", true);
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
"""Generate an output from one or several input and a template.
Take "input-list" buildout parameter as input.
Each input of the list is separated by \n
Each input contains :
1/ The parameter to use (like mybuildoutpart:myparameter)
2/ The name of the input to use as key.
If all parameters in input are found, create an "output" parameter from a
"template" parameter. The "template" parameter is just a string containing
python parameters (like %(mykey)s).
Will produce nothing if one element of "input_list" doesn't exist.
Will raise if any input reference non-existent buildout part.
Example :
[get-output]
recipe = slapos.cookbook:generate_output_if_input_not_null
input-list =
firstkey mybuildoutpart:myparameter
otherkey myotherbuildoutpart:myotherparameter
template = I want to get %(key)s and %(otherkey)s
This example will produce an "output" parameter if myparameter and
myotherparameter are defined.
"""
def __init__(self, buildout, name, options):
# Get all inputs
input_dict = {}
for line in options['input-list'].strip().split('\n'):
key, buildout_parameter = line.split(' ')
buildout_part, parameter_name = buildout_parameter.split(':')
parameter_value = buildout[buildout_part].get(parameter_name)
# If any parameter is not defined, don't do anything
if not parameter_value:
return
input_dict[key] = parameter_value
# Generate output
options['output'] = options['template'] % input_dict
def install(self):
return []
...@@ -236,6 +236,8 @@ class BaseSlapRecipe: ...@@ -236,6 +236,8 @@ class BaseSlapRecipe:
return 'insecure' return 'insecure'
def install(self): def install(self):
self.logger.warning("BaseSlapRecipe has been deprecated. Use " \
"GenericBaseRecipe or GenericSlapRecipe instead.")
self.slap.initializeConnection(self.server_url, self.key_file, self.slap.initializeConnection(self.server_url, self.key_file,
self.cert_file) self.cert_file)
self.computer_partition = self.slap.registerComputerPartition( self.computer_partition = self.slap.registerComputerPartition(
......
...@@ -36,6 +36,10 @@ import pkg_resources ...@@ -36,6 +36,10 @@ import pkg_resources
import zc.buildout import zc.buildout
class GenericBaseRecipe(object): class GenericBaseRecipe(object):
"""Boilerplate class for all Buildout recipes providing helpful methods like
creating configuration file, creating wrappers, generating passwords, etc.
Can be extended in SlapOS recipes to ease development.
"""
TRUE_VALUES = ['y', 'yes', '1', 'true'] TRUE_VALUES = ['y', 'yes', '1', 'true']
FALSE_VALUES = ['n', 'no', '0', 'false'] FALSE_VALUES = ['n', 'no', '0', 'false']
...@@ -145,9 +149,6 @@ class GenericBaseRecipe(object): ...@@ -145,9 +149,6 @@ class GenericBaseRecipe(object):
* if the host is an ipv6 address, brackets will be added to surround it. * if the host is an ipv6 address, brackets will be added to surround it.
""" """
# XXX-Antoine: I didn't find any standard module to join an url with
# login, password, ipv6 host and port.
# So instead of copy and past in every recipe I factorized it right here.
netloc = '' netloc = ''
if auth is not None: if auth is not None:
auth = tuple(auth) auth = tuple(auth)
......
...@@ -30,7 +30,10 @@ import time ...@@ -30,7 +30,10 @@ import time
from generic import GenericBaseRecipe from generic import GenericBaseRecipe
class GenericSlapRecipe(GenericBaseRecipe): class GenericSlapRecipe(GenericBaseRecipe):
"""Base class for all slap.recipe.*""" """Base class for all slap.recipe.* needing SLAP informations like instance
parameters.
recipes that don't explicitely need to retrieve from server informations
should use GenericBaseRecipe."""
def __init__(self, buildout, name, options): def __init__(self, buildout, name, options):
"""Default initialisation""" """Default initialisation"""
......
...@@ -57,7 +57,7 @@ class Recipe(object): ...@@ -57,7 +57,7 @@ class Recipe(object):
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 = 'RootInstanceSoftware' software_type = 'RootSoftwareInstance'
if 'software-type' in options: if 'software-type' in options:
software_type = options['software-type'] software_type = options['software-type']
...@@ -73,7 +73,7 @@ class Recipe(object): ...@@ -73,7 +73,7 @@ class Recipe(object):
options['config-%s' % config_parameter] options['config-%s' % config_parameter]
self.instance = self.request(options['software-url'], software_type, self.instance = self.request(options['software-url'], software_type,
options.get('name', name), partition_parameter_kw=partition_parameter_kw, options['name'], partition_parameter_kw=partition_parameter_kw,
filter_kw=filter_kw, shared=self.isSlave) filter_kw=filter_kw, shared=self.isSlave)
self.failed = None self.failed = None
...@@ -96,8 +96,9 @@ class Recipe(object): ...@@ -96,8 +96,9 @@ class Recipe(object):
# XXX-Cedric : currently raise an error. So swallow it... # XXX-Cedric : currently raise an error. So swallow it...
except AttributeError: except AttributeError:
status = "unknown" status = "unknown"
raise KeyError("Connection parameter %s not found. " self.logger.error("Connection parameter %s not found. "
"Status of requested instance is : %s." % (self.failed, status)) "Status of requested instance is : %s." % (self.failed, status))
raise KeyError("Connection parameter %s not found. " % self.failed)
return [] return []
update = install update = install
...@@ -29,79 +29,19 @@ import os ...@@ -29,79 +29,19 @@ import os
import sys import sys
import zc.buildout import zc.buildout
from slapos.recipe.librecipe import BaseSlapRecipe from slapos.recipe.librecipe import BaseSlapRecipe
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(BaseSlapRecipe): class Recipe(GenericBaseRecipe):
def _install(self): def install(self):
"""Set the connection dictionnary for the computer partition and create a list
of paths to the different wrappers."""
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
self.installTestrunner(self.getDisplay()) runner = self.createPythonScript(
self.linkBinary() self.options['runner-path'],
__name__+'.testrunner.run',
arguments=[self.options['suite-url'],
self.options['report-url'],
self.options['report-project'],
self.options['browser'],
])
return self.path_list return [runner]
def getDisplay(self):
"""Generate display id for the instance."""
display_list = [":%s" % i for i in range(123,144)]
for display_try in display_list:
lock_filepath = '/tmp/.X%s-lock' % display_try.replace(":", "")
if not os.path.exists(lock_filepath):
display = display_try
break
return display
def installTestrunner(self, display):
"""Instanciate a wrapper for the browser and the test reports."""
arguments = dict(
xvfb_binary = self.options['xvfb_binary'],
display = display,
suite_name = self.parameter_dict['suite_name'],
base_url = self.parameter_dict['url'],
browser_argument_list = [],
user = self.parameter_dict['user'],
password = self.parameter_dict['password'],
project = self.parameter_dict['project'],
test_report_instance_url = \
self.parameter_dict['test_report_instance_url'],
etc_directory = self.etc_directory)
# Check wanted browser XXX-Cedric not yet used but can be useful
#if self.parameter_dict.get('browser', None) is None:
arguments['browser_binary'] = self.options['firefox_binary']
#elif self.parameter_dict['browser'].strip().lowercase() == 'chrome' or
# self.parameter_dict['browser'].strip().lowercase() == 'chromium':
# arguments['browser_binary'] = self.options['chromium_binary']
# arguments['browser_argument_list'].extend['--ignore-certificate-errors',
# option_translate = '--disable-translate',
# option_security = '--disable-web-security']
#elif self.parameter_dict['browser'].strip().lowercase() == 'firefox':
# arguments['browser_binary'] = self.options['firefox_binary']
self.path_list.extend(zc.buildout.easy_install.scripts([(
'testrunner',__name__+'.testrunner', 'run')], self.ws,
sys.executable, self.wrapper_directory,
arguments=[arguments]))
def linkBinary(self):
"""Links binaries to instance's bin directory for easier exposal"""
for linkline in self.options.get('link_binary_list', '').splitlines():
if not linkline:
continue
target = linkline.split()
if len(target) == 1:
target = target[0]
path, linkname = os.path.split(target)
else:
linkname = target[1]
target = target[0]
link = os.path.join(self.bin_directory, linkname)
if os.path.lexists(link):
if not os.path.islink(link):
raise zc.buildout.UserError(
'Target link already %r exists but it is not link' % link)
os.unlink(link)
os.symlink(target, link)
self.logger.debug('Created link %r -> %r' % (link, target))
self.path_list.append(link)
...@@ -27,14 +27,30 @@ ...@@ -27,14 +27,30 @@
from datetime import datetime from datetime import datetime
from erp5functionaltestreporthandler import ERP5TestReportHandler from erp5functionaltestreporthandler import ERP5TestReportHandler
from ERP5TypeFunctionalTestCase import Xvfb, Firefox, TimeoutError from ERP5TypeFunctionalTestCase import TimeoutError
from time import sleep from time import sleep
import time import time
import os import os
import urllib2 import urllib2
import urlparse
from subprocess import Popen, PIPE
import signal
def run(args): def run(args):
config = args[0] suite_url = args[0]
report_url = args[1]
project = args[2]
browser_binary = args[3]
suite_parsed = urlparse.urlparse(suite_url)
config = {
'suite_name': suite_parsed.path.split('/')[-1],
'base_url': "%s://%s%s" % (suite_parsed.scheme, suite_parsed.hostname,
'/'.join(suite_parsed.path.split('/')[:-1])),
'user': suite_parsed.username,
'password': suite_parsed.password,
}
test_url = assembleTestUrl(config['base_url'], config['suite_name'], test_url = assembleTestUrl(config['base_url'], config['suite_name'],
config['user'], config['password']) config['user'], config['password'])
...@@ -43,20 +59,17 @@ def run(args): ...@@ -43,20 +59,17 @@ def run(args):
timeout = 2.0 * 60 * 60 timeout = 2.0 * 60 * 60
while True: while True:
erp5_report = ERP5TestReportHandler(config['test_report_instance_url'], erp5_report = ERP5TestReportHandler(report_url,
config['project'] + '@' + config['suite_name']) project + '@' + config['suite_name'])
try: try:
os.environ['DISPLAY'] = config['display']
xvfb = Xvfb(config['etc_directory'], config['xvfb_binary'])
profile_dir = os.path.join(config['etc_directory'], 'profile')
# XXX-Cedric : change Firefox prefs.js generation so that it can take a
# list of websites supposed to be reached instead of config['base_url']
browser = Firefox(profile_dir, config['base_url'], config['browser_binary'])
try: try:
start = time.time() start = time.time()
xvfb.run() print("Running test on: %s" % test_url)
profile_dir = os.path.join(config['etc_directory'], 'profile') process = Popen('%s "%s"' % (browser_binary, test_url),
browser.run(test_url , xvfb.display) stdout=PIPE,
stderr=PIPE,
shell=True,
close_fds=True)
erp5_report.reportStart() erp5_report.reportStart()
while not isTestFinished(config['base_url']): while not isTestFinished(config['base_url']):
time.sleep(10) time.sleep(10)
...@@ -66,8 +79,8 @@ def run(args): ...@@ -66,8 +79,8 @@ def run(args):
except TimeoutError: except TimeoutError:
continue continue
finally: finally:
browser.quit() if process.pid:
xvfb.quit() os.kill(process.pid, signal.SIGTERM)
print("Test has finished and Firefox has been killed.") print("Test has finished and Firefox has been killed.")
erp5_report.reportFinished(getStatus(config['base_url']).encode("utf-8", erp5_report.reportFinished(getStatus(config['base_url']).encode("utf-8",
......
##############################################################################
#
# Copyright (c) 2012 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
class Recipe(GenericBaseRecipe):
def install(self):
config = {
'xvfb_binary': self.options['xvfb-path'],
'shell_path': self.options['shell-path'],
'fbdir_path': self.options['fbdir-path'],
'tmp_path': self.options['tmp-path'],
}
xvfb_path = self.createExecutable(
self.options['runner-path'],
self.substituteTemplate(self.getTemplateFilename('xvfb_run.in'),
config))
result = [xvfb_path]
# Allow to take screenshot if needed
if ('xwd-path' in self.options) and ('xwd-hook-path' in self.options):
config['xwd_binary'] = self.options['xwd-path']
result.append(self.createExecutable(
self.options['xwd-hook-path'],
self.substituteTemplate(self.getTemplateFilename('xwd_run.in'),
config)))
return result
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
export TMPDIR=%(tmp_path)s
exec %(xvfb_binary)s -screen 0 1024x768x24 -fbdir %(fbdir_path)s
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
export DISPLAY=:0
export TMPDIR=%(tmp_path)s
exec %(xwd_binary)s -root -out $1
[buildout]
parts =
rootdirectory
instance
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
agent_binary = ${buildout:directory}/bin/agent
dcrond_binary = ${dcron:location}/sbin/crond
python_binary = ${python2.7:location}/bin/python
pidfile = $${buildout:directory}/agent.pid
log_directory = $${buildout:directory}/var/log
state_file = $${buildout:directory}/state.cfg
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
run = $${rootdirectory:etc}/run/
var = $${buildout:directory}/var/
log = $${rootdirectory:var}/log/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
[buildout]
# develop =
# /opt/slapdev
# /opt/slapos.toolbox
extends =
../../component/dcron/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/lxml-python/buildout.cfg
../../stack/slapos.cfg
parts =
template
eggs
instance-recipe-egg
dcron
python2.7
script
[instance-recipe]
egg = slapos.cookbook
module = agent
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = 2e1a7a68b18de68b163e98a5f92cc776
mode = 0644
[eggs]
python = python2.7
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
slapos.toolbox
[lxml-python]
python = python2.7
[script]
recipe = z3c.recipe.scripts
python = python2.7
eggs =
zc.buildout
${lxml-python:egg}
slapos.core
slapos.cookbook
slapos.toolbox
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
apache_frontend
===============
Frontend system using Apache, allowing to rewrite and proxy URLs like
myinstance.myfrontenddomainname.com to real IP/URL of myinstance.
apache_frontend works using the master instance / slave instance design.
It means that a single main instance of Apache will be used to act as frontend
for many slaves.
How to use
==========
First, you will need to request a "master" instance of Apache Frontend with
"domain" parameter, like::
<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="domain">moulefrite.org</parameter>
<parameter id="port">443</parameter>
</instance>
Then, it is possible to request many slave instances
(currently only from slapconsole, UI doesn't work yet)
of Apache Frontend, like::
instance = request(
software_release=apache_frontend,
partition_reference='frontend2',
shared=True,
partition_parameter_kw={"url":"https://[1:2:3:4]:1234/someresource"}
)
Those slave instances will be redirected to the "master" instance,
and you will see on the "master" instance the associated RewriteRules of
all slave instances.
Finally, the slave instance will be accessible from:
https://someidentifier.moulefrite.org.
Instance Parameters
===================
Master Instance Parameters
--------------------------
domain
~~~~~~
name of the domain to be used (example: mydomain.com). Subdomains of this
domain will be used for the slave instances (example:
instance12345.mydomain.com). It is then recommended to add a wildcard in DNS
for the subdomains of the chosen domain like::
*.mydomain.com. IN A 123.123.123.123
Using the IP given by the Master Instance.
"domain" is a mandatory Parameter.
port
~~~~
Port used by Apache. Optional parameter, defaults to 4443.
plain_http_port
Port used by apache to serve plain http (only used to redirect to https).
Optional parameter, defaults to 8080.
Slave Instance Parameters
-------------------------
url
~~~
url of backend to use.
"url" is a mandatory parameter.
Example: http://mybackend.com/myresource
cache
~~~~~
Specify if slave instance should use a varnish / stunnel to connect to backend.
Possible values: "true", "false".
"cache" is an optional parameter. Defaults to "false".
Example: true
type
~~~~
Specify if slave instance will redirect to a zope backend. If specified, Apache
RewriteRule will use Zope's Virtual Host Daemon.
Possible values: "zope", "default".
"type" is an optional parameter. Defaults to "default".
Example: zope
custom_domain
~~~~~~~~~~~~~
Domain name to use as frontend. The frontend will be accessible from this domain.
"custom_domain" is an optional parameter. Defaults to
[instancereference].[masterdomain].
Example: www.mycustomdomain.com
Advanced example
================
Request slave frontend instance using a Zope backend, with Varnish activated,
listening to a custom domain::
instance = request(
software_release=apache_frontend,
partition_reference='frontend2',
shared=True,
partition_parameter_kw={
"url":"https://[1:2:3:4]:1234/someresource",
"cache":"true",
"type":"zope",
"custom_domain":"mycustomdomain.com",
}
)
Notes
=====
It is not possible with slapos to listen to port <= 1024, because process are
not run as root. It is a good idea then to go on the node where the instance is
and set some iptables rules like (if using default ports)::
iptables -t nat -A PREROUTING -p tcp -d {public ip} --dport 443 -j DNAT --to-destination {listening ip}:4443
iptables -t nat -A PREROUTING -p tcp -d {public_ip} --dport 80 -j DNAT --to-destination {listening ip}:8080
...@@ -7,7 +7,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} ...@@ -7,7 +7,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[instance] [instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = ${instance-recipe:egg}:${instance-recipe:module}
httpd_binary = ${apache:location}/bin/httpd httpd_binary = ${apache-2.2:location}/bin/httpd
logrotate_binary = ${logrotate:location}/usr/sbin/logrotate logrotate_binary = ${logrotate:location}/usr/sbin/logrotate
openssl_binary = ${openssl:location}/bin/openssl openssl_binary = ${openssl:location}/bin/openssl
dcrond_binary = ${dcron:location}/sbin/crond dcrond_binary = ${dcron:location}/sbin/crond
......
...@@ -17,8 +17,8 @@ parts = ...@@ -17,8 +17,8 @@ parts =
template template
binutils binutils
gcc-java-minimal gcc-java-minimal
apache apache-2.2
apache-antiloris apache-antiloris-apache-2.2
stunnel stunnel
varnish-2.1 varnish-2.1
...@@ -50,78 +50,72 @@ eggs = ...@@ -50,78 +50,72 @@ eggs =
# Default template for apache instance. # Default template for apache instance.
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
md5sum = 17180caef7d1c477fbb037d28b705e8b md5sum = 74c0f41246d167c020854a212e919ce4
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[versions] [versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-004
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
buildout-versions = 1.7 buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.8 meld3 = 0.6.8
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.recipe.template = 2.2 slapos.cookbook = 0.52
slapos.cookbook = 0.40.1 slapos.recipe.template = 2.3
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
Flask = 0.8 Flask = 0.8
# Required by: # Required by:
# slapos.cookbook==0.40.1 # slapos.cookbook==0.52
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # slapos.cookbook==0.52
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.40.1
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.40.1 # slapos.cookbook==0.52
# slapos.core==0.23 # slapos.core==0.24
# xml-marshaller==0.9.7 # xml-marshaller==0.9.7
lxml = 2.3.3 lxml = 2.3.4
# Required by: # Required by:
# slapos.cookbook==0.40.1 # slapos.cookbook==0.52
netaddr = 0.7.6 netaddr = 0.7.6
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.cookbook==0.40.1 # slapos.cookbook==0.52
# slapos.core==0.23 # slapos.core==0.24
# zc.buildout==1.6.0-dev-SlapOS-004 # zc.buildout==1.6.0-dev-SlapOS-004
# zc.recipe.egg==1.3.2 # zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.40.1 # slapos.cookbook==0.52
slapos.core = 0.23 slapos.core = 0.24
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.40.1 # slapos.cookbook==0.52
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.40.1 # slapos.cookbook==0.52
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
zope.interface = 3.8.0 zope.interface = 4.0.0
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # Cedric de Saint Martin signature certificate
......
...@@ -9,6 +9,7 @@ parts = ...@@ -9,6 +9,7 @@ parts =
certificate-authority certificate-authority
kvm-promise kvm-promise
novnc-promise novnc-promise
frontend-promise
publish-kvm-connection-information publish-kvm-connection-information
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
...@@ -59,6 +60,7 @@ path = $${basedirectory:promises}/vnc_promise ...@@ -59,6 +60,7 @@ path = $${basedirectory:promises}/vnc_promise
hostname = $${kvm-instance:vnc-ip} hostname = $${kvm-instance:vnc-ip}
port = $${kvm-instance:vnc-port} port = $${kvm-instance:vnc-port}
[novnc-instance] [novnc-instance]
recipe = slapos.cookbook:novnc recipe = slapos.cookbook:novnc
path = $${ca-novnc:executable} path = $${ca-novnc:executable}
...@@ -104,23 +106,20 @@ path = $${basedirectory:promises}/novnc_promise ...@@ -104,23 +106,20 @@ path = $${basedirectory:promises}/novnc_promise
hostname = $${novnc-instance:ip} hostname = $${novnc-instance:ip}
port = $${novnc-instance:port} port = $${novnc-instance:port}
[kvm-monitor] [kvm-monitor]
recipe = slapos.cookbook:generic.slapmonitor recipe = slapos.cookbook:generic.slapmonitor
db-path = $${rootdirectory:srv}/slapmonitor_database db-path = $${rootdirectory:srv}/slapmonitor_database
[request-common]
[request-slave-frontend]
recipe = slapos.cookbook:request recipe = slapos.cookbook:request
software-url = $${slap-connection:software-release-url} software-url = $${slap-connection:software-release-url}
sla = computer_guid
sla-computer_guid = $${slap-connection:computer-id}
server-url = $${slap-connection:server-url} server-url = $${slap-connection:server-url}
key-file = $${slap-connection:key-file} key-file = $${slap-connection:key-file}
cert-file = $${slap-connection:cert-file} cert-file = $${slap-connection:cert-file}
computer-id = $${slap-connection:computer-id} computer-id = $${slap-connection:computer-id}
partition-id = $${slap-connection:partition-id} partition-id = $${slap-connection:partition-id}
[request-slave-frontend]
<=request-common
name = SlaveFrontend name = SlaveFrontend
software-type = frontend software-type = frontend
slave = true slave = true
...@@ -129,8 +128,27 @@ config-host = $${novnc-instance:ip} ...@@ -129,8 +128,27 @@ config-host = $${novnc-instance:ip}
config-port = $${novnc-instance:port} config-port = $${novnc-instance:port}
return = url resource port domainname return = url resource port domainname
# Will generate, if existing, URL to reach KVM using frontend
[get-slave-connection-url]
recipe = slapos.cookbook:generate_output_if_input_not_null
input-list =
frontend-url request-slave-frontend:connection-url
frontend-port request-slave-frontend:connection-port
frontend-resource request-slave-frontend:connection-resource
frontend-domainname request-slave-frontend:connection-domainname
template = %(frontend-url)s/vnc_auto.html?host=%(frontend-domainname)s&port=%(frontend-port)s&encrypt=1&path=%(frontend-resource)s
# This is default output, if slave is not ready yet
output = Not ready yet. Please use backend URL if possible or wait a few minutes.
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend_promise
url = $${get-slave-connection-url:output}
dash_path = ${dash:location}/bin/dash
[publish-kvm-connection-information] [publish-kvm-connection-information]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
backend_url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1 backend_url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1
url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-slave-frontend:connection-domainname}&port=$${request-slave-frontend:connection-port}&encrypt=1&path=$${request-slave-frontend:connection-resource} url = $${get-slave-connection-url:output}
password = $${kvm-instance:passwd} password = $${kvm-instance:passwd}
...@@ -132,7 +132,7 @@ command = ...@@ -132,7 +132,7 @@ command =
[template-kvm] [template-kvm]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg url = ${:_profile_base_location_}/instance-kvm.cfg
md5sum = b6572c018e44d4676e76805116bcade0 md5sum = 8d67a6cabe4fbce2bd44aa006a0d0cf8
output = ${buildout:directory}/template-kvm.cfg output = ${buildout:directory}/template-kvm.cfg
mode = 0644 mode = 0644
...@@ -199,53 +199,53 @@ signature-certificate-list = ...@@ -199,53 +199,53 @@ signature-certificate-list =
[versions] [versions]
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.8.0 apache-libcloud = 0.9.1
async = 0.6.1 async = 0.6.1
buildout-versions = 1.7 buildout-versions = 1.7
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3.3 lxml = 2.3.4
meld3 = 0.6.8 meld3 = 0.6.8
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.5 pycrypto = 2.5
slapos.cookbook = 0.41 slapos.cookbook = 0.48
slapos.recipe.build = 0.7 slapos.recipe.build = 0.7
slapos.recipe.template = 2.2 slapos.recipe.template = 2.3
slapos.toolbox = 0.18 slapos.toolbox = 0.24
smmap = 0.8.2 smmap = 0.8.2
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
# slapos.toolbox==0.18 # slapos.toolbox==0.24
Flask = 0.8 Flask = 0.8
# Required by: # Required by:
# slapos.toolbox==0.18 # slapos.toolbox==0.24
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.cookbook==0.41 # slapos.cookbook==0.48
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
# slapos.toolbox==0.18 # slapos.toolbox==0.24
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.18 # slapos.toolbox==0.24
feedparser = 5.1.1 feedparser = 5.1.1
# Required by: # Required by:
# slapos.cookbook==0.41 # slapos.cookbook==0.48
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.41 # slapos.cookbook==0.48
netaddr = 0.7.6 netaddr = 0.7.6
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
...@@ -253,37 +253,37 @@ netifaces = 0.8 ...@@ -253,37 +253,37 @@ netifaces = 0.8
numpy = 1.6.1 numpy = 1.6.1
# Required by: # Required by:
# slapos.toolbox==0.18 # slapos.toolbox==0.24
paramiko = 1.7.7.1 paramiko = 1.7.7.1
# Required by: # Required by:
# slapos.toolbox==0.18 # slapos.toolbox==0.24
psutil = 0.4.1 psutil = 0.4.1
# Required by: # Required by:
# slapos.cookbook==0.41 # slapos.cookbook==0.48
# slapos.core==0.23 # slapos.core==0.24
# slapos.toolbox==0.18 # slapos.toolbox==0.24
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.41 # slapos.cookbook==0.48
# slapos.toolbox==0.18 # slapos.toolbox==0.24
slapos.core = 0.23 slapos.core = 0.24
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.41 # slapos.cookbook==0.48
# slapos.toolbox==0.18 # slapos.toolbox==0.24
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.41 # slapos.cookbook==0.48
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.23 # slapos.core==0.24
zope.interface = 3.8.0 zope.interface = 3.8.0
[buildout] [buildout]
extensions =
slapos.zcbworkarounds
slapos.rebootstrap
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
extends = extends =
../../component/memcached/buildout.cfg ../../component/memcached/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/stunnel/buildout.cfg ../../component/stunnel/buildout.cfg
../../component/rdiff-backup/buildout.cfg ../../component/rdiff-backup/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../stack/shacache-client.cfg ../../stack/slapos.cfg
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
versions = versions
parts = parts =
# Create instance template # Create instance template
#TODO : list here all parts.
template template
libxslt
eggs eggs
instance-recipe-egg instance-recipe-egg
# XXX: Workaround of SlapOS limitation
# Unzippig of eggs is required, as SlapOS do not yet provide nicely working
# development / fast switching environment for whole software
unzip = true
[rebootstrap]
# Default first version of rebootstrapped python
version = 2
section = python2.7
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
module = memcached module = memcached
[instance-recipe-egg] [instance-recipe-egg]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg} eggs = ${instance-recipe:egg}
[eggs] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.7
eggs = eggs =
${lxml-python:egg} ${lxml-python:egg}
...@@ -85,5 +48,55 @@ hexagonit.recipe.cmmi = 1.5.0 ...@@ -85,5 +48,55 @@ hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1 plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout Jinja2 = 2.6
zc.buildout = 1.5.3-dev-SlapOS-009 Werkzeug = 0.8.3
buildout-versions = 1.7
meld3 = 0.6.8
slapos.recipe.template = 2.3
# Required by:
# slapos.core==0.2
Flask = 0.8
# Required by:
# slapos.cookbook==0.7
PyXML = 0.8.4
# Required by:
# slapos.cookbook==0.7
# slapos.core==0.2
# xml-marshaller==0.9.7
lxml = 2.3.4
# Required by:
# slapos.core==0.2
netifaces = 0.8
# Required by:
# slapos.core==0.2
supervisor = 3.0a12
# Required by:
# slapos.cookbook==0.7
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.8.0
[networkcache]
# Cedric de Saint Martin signature certificate
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
[buildout]
parts =
selenium-instance
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[selenium-instance]
recipe = slapos.cookbook:seleniumrunner
runner-path = $${basedirectory:services}/selenium-runner
browser = $${firefox-instance:runner-path}
suite-url = $${slap-parameter:suite-url}
report-url = $${slap-parameter:report-url}
report-project = $${slap-parameter:report-project}
[firefox-instance]
recipe = slapos.cookbook:firefox
runner-path = $${rootdirectory:bin}/firefox-sandboxed
firefox-path = ${firefox:location}/firefox-slapos
prefsjs-path = $${rootdirectory:etc}/prefs.js
shell-path = ${dash:location}/bin/dash
tmp-path = $${xvfb-instance:tmp-path}
[xvfb-instance]
recipe = slapos.cookbook:xvfb
runner-path = $${basedirectory:services}/xvfb
xvfb-path = ${xserver:location}/bin/Xvfb
fbdir-path = $${basedirectory:framebuffer}
tmp-path = $${basedirectory:run}
shell-path = ${dash:location}/bin/dash
xwd-path = ${xwd:location}/bin/xwd
xwd-hook-path = $${rootdirectory:bin}/xwd
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
run = $${rootdirectory:var}/run
framebuffer = $${rootdirectory:srv}/framebuffer
[buildout] [buildout]
parts = parts =
seleniuminstance switch-softwaretype
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[seleniuminstance] [switch-softwaretype]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = slapos.cookbook:softwaretype
xvfb_binary = ${xserver:location}/bin/Xvfb default = ${template-selenium:output}
firefox_binary = ${firefox:location}/firefox-slapos
\ No newline at end of file [slap-connection]
# part to migrate to new - separated words
computer-id = $${slap_connection:computer_id}
partition-id = $${slap_connection:partition_id}
server-url = $${slap_connection:server_url}
software-release-url = $${slap_connection:software_release_url}
key-file = $${slap_connection:key_file}
cert-file = $${slap_connection:cert_file}
...@@ -6,8 +6,11 @@ extends = ...@@ -6,8 +6,11 @@ extends =
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/python-2.7/buildout.cfg ../../component/python-2.7/buildout.cfg
../../component/firefox/buildout.cfg ../../component/firefox/buildout.cfg
../../component/dash/buildout.cfg
../../stack/shacache-client.cfg ../../stack/shacache-client.cfg
# develop += /opt/slapdev
versions = versions versions = versions
find-links += find-links +=
...@@ -19,6 +22,7 @@ parts = ...@@ -19,6 +22,7 @@ parts =
instance-recipe-egg instance-recipe-egg
xserver xserver
firefox firefox
xwd
versions = versions versions = versions
...@@ -43,10 +47,101 @@ eggs = ...@@ -43,10 +47,101 @@ eggs =
# Default template for the instance. # Default template for the instance.
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
md5sum = 5fc198144831525a196d7394e4b15f80 md5sum = c4ac5de141ae6a64848309af03e51d88
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[template-selenium]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-selenium.cfg
md5sum = 8be91f4515decef0f8af5910e43e0e52
output = ${buildout:directory}/template-selenium.cfg
mode = 0644
[versions] [versions]
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010 zc.buildout = 1.6.0-dev-SlapOS-004
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.8
slapos.cookbook = 0.46
slapos.recipe.build = 0.7
slapos.recipe.template = 2.2
# Required by:
# slapos.core==0.23
Flask = 0.8
# Required by:
# slapos.cookbook==0.42
PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.42
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.42
# slapos.core==0.23
# xml-marshaller==0.9.7
lxml = 2.3.4
# Required by:
# slapos.cookbook==0.42
netaddr = 0.7.6
# Required by:
# slapos.core==0.23
netifaces = 0.8
# Required by:
# slapos.cookbook==0.42
# slapos.core==0.23
# zc.buildout==1.5.3-dev-SlapOS-010
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.42
slapos.core = 0.23
# Required by:
# slapos.core==0.23
supervisor = 3.0a12
# Required by:
# slapos.cookbook==0.42
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.42
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.23
zope.interface = 3.8.0
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
...@@ -28,7 +28,7 @@ recipe = slapos.recipe.template ...@@ -28,7 +28,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
md5sum = 0854024ef4638257dbd508919768b9c2 md5sum = 7cfd248cdc6fa6cbb4957d25a0aed884
[eggs] [eggs]
eggs += eggs +=
...@@ -53,3 +53,100 @@ signature-certificate-list = ...@@ -53,3 +53,100 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-003
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.8.0
async = 0.6.1
buildout-versions = 1.7
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.8
plone.recipe.command = 1.1
pycrypto = 2.5
slapos.cookbook = 0.45
slapos.libnetworkcache = 0.12
slapos.recipe.template = 2.3
slapos.toolbox = 0.20
smmap = 0.8.2
# Required by:
# slapos.core==0.24
Flask = 0.8
# Required by:
# slapos.toolbox==0.20
GitPython = 0.3.2.RC1
# Required by:
# slapos.cookbook==0.45
PyXML = 0.8.4
# Required by:
# slapos.toolbox==0.20
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.20
feedparser = 5.1.1
# Required by:
# slapos.cookbook==0.45
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.45
# slapos.core==0.24
# xml-marshaller==0.9.7
lxml = 2.3.4
# Required by:
# slapos.cookbook==0.45
netaddr = 0.7.6
# Required by:
# slapos.core==0.24
netifaces = 0.8
# Required by:
# slapos.toolbox==0.20
paramiko = 1.7.7.1
# Required by:
# slapos.toolbox==0.20
psutil = 0.4.1
# Required by:
# slapos.cookbook==0.45
# slapos.core==0.24
# slapos.libnetworkcache==0.12
# slapos.toolbox==0.20
# supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-003
# zc.recipe.egg==1.3.2
# zope.interface==3.8.0
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.45
slapos.core = 0.24
# Required by:
# slapos.core==0.24
supervisor = 3.0a12
# Required by:
# slapos.cookbook==0.45
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.45
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.24
zope.interface = 3.8.0
...@@ -13,7 +13,7 @@ url = http://wordpress.org/latest.tar.gz ...@@ -13,7 +13,7 @@ url = http://wordpress.org/latest.tar.gz
[application-template] [application-template]
recipe = slapos.recipe.download recipe = slapos.recipe.download
url = ${:_profile_base_location_}/wp-config.php.in url = ${:_profile_base_location_}/wp-config.php.in
md5sum = ${application-configuration:md5sum} md5sum = 0d62b28125ca3c780db0b547199953f2
download-only = True download-only = True
filename = template.in filename = template.in
mode = 0644 mode = 0644
...@@ -21,8 +21,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} ...@@ -21,8 +21,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration] [application-configuration]
location = wp-config.php location = wp-config.php
md5sum = 3859841a4ad6ed23744d6bc5a01321e0
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-003
...@@ -88,3 +88,5 @@ if ( !defined('ABSPATH') ) ...@@ -88,3 +88,5 @@ if ( !defined('ABSPATH') )
/** Sets up WordPress vars and included files. */ /** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php'); require_once(ABSPATH . 'wp-settings.php');
remove_action( 'template_redirect', 'redirect_canonical' );
\ No newline at end of file
...@@ -34,7 +34,8 @@ eggs = ...@@ -34,7 +34,8 @@ eggs =
keep-compile-dir = false keep-compile-dir = false
[networkcache] [networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou signature certificate # Romain Courteaud + Sebastien Robin + Alain Takoudjou
# + Cedric de Saint Martin signature certificate
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
...@@ -75,6 +76,19 @@ signature-certificate-list = ...@@ -75,6 +76,19 @@ signature-certificate-list =
dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2 dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2
n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
[versions] [versions]
# Generated automatically by buildout-versions # Generated automatically by buildout-versions
......
...@@ -19,6 +19,7 @@ extends = ...@@ -19,6 +19,7 @@ extends =
../../component/mariadb/buildout.cfg ../../component/mariadb/buildout.cfg
../../component/apache/buildout.cfg ../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg ../../component/apache-php/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/git/buildout.cfg ../../component/git/buildout.cfg
../../component/glib/buildout.cfg ../../component/glib/buildout.cfg
...@@ -38,8 +39,6 @@ extends = ...@@ -38,8 +39,6 @@ extends =
# python-2.7 component is here only for compatibility with old software.cfg. # python-2.7 component is here only for compatibility with old software.cfg.
# It is not needed and should not be used in LAMP-based software.cfg # It is not needed and should not be used in LAMP-based software.cfg
versions = versions
[mariadb] [mariadb]
# Compile dir is for plugins, there's no plugin in LAMP # Compile dir is for plugins, there's no plugin in LAMP
keep-compile-dir = false keep-compile-dir = false
...@@ -68,7 +67,7 @@ mode = 0644 ...@@ -68,7 +67,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-php.cfg url = ${:_profile_base_location_}/instance-apache-php.cfg
output = ${buildout:directory}/template-apache-php.cfg output = ${buildout:directory}/template-apache-php.cfg
md5sum = 8ebed1e26127c066e5b69372e69e6c38 md5sum = f8a1599f19a67d948f4a1f32f3bd3e2f
mode = 0644 mode = 0644
[template-apache-backup] [template-apache-backup]
...@@ -125,3 +124,159 @@ recipe = zc.recipe.egg ...@@ -125,3 +124,159 @@ recipe = zc.recipe.egg
eggs = eggs =
${lxml-python:egg} ${lxml-python:egg}
slapos.toolbox slapos.toolbox
[networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
# + Cedric de Saint Martin signature certificate
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV
BAMMB3RzeGRldjMwHhcNMTExMDE0MTIxNjIzWhcNMTIxMDEzMTIxNjIzWjASMRAw
DgYDVQQDDAd0c3hkZXYzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrPbh+
YGmo6mWmhVb1vTqX0BbeU0jCTB8TK3i6ep3tzSw2rkUGSx3niXn9LNTFNcIn3MZN
XHqbb4AS2Zxyk/2tr3939qqOrS4YRCtXBwTCuFY6r+a7pZsjiTNddPsEhuj4lEnR
L8Ax5mmzoi9nE+hiPSwqjRwWRU1+182rzXmN4QIDAQABo1AwTjAdBgNVHQ4EFgQU
/4XXREzqBbBNJvX5gU8tLWxZaeQwHwYDVR0jBBgwFoAU/4XXREzqBbBNJvX5gU8t
LWxZaeQwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQA07q/rKoE7fAda
FED57/SR00OvY9wLlFEF2QJ5OLu+O33YUXDDbGpfUSF9R8l0g9dix1JbWK9nQ6Yd
R/KCo6D0sw0ZgeQv1aUXbl/xJ9k4jlTxmWbPeiiPZEqU1W9wN5lkGuLxV4CEGTKU
hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9DCCAV2gAwIBAgIJAL392bEdqpFQMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjM0MB4XDTExMTEwOTE1MzA0M1oXDTEyMTEwODE1MzA0M1owEzER
MA8GA1UEAwwIQ09NUC0yMzQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMRR
T0cacZKztie/DaRRjq3mgcqfPKoGXu6zXmeRQI+6Y4bnzjf8h/jAuPzR552P0xK5
psxhavXA8hOGRLFDtvDMQLepVHWfwqtFtcp5vNf2+KWqOYy0OxHfVIlnatvCqTZN
NG1vRsSOAQ+v7QNFHh6NBbiSrjBBfg4vkfzqnsUvAgMBAAGjUDBOMB0GA1UdDgQW
BBTGGw+ASoDi9kqPElDkC0Q5RtAfRjAfBgNVHSMEGDAWgBTGGw+ASoDi9kqPElDk
C0Q5RtAfRjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIOuR1OqXLke
LLzH0kRnlIOe60dYJvRya53wDx5x2g4/qkXZPLx2RcbaUrX/SCbL70vfr+apUPss
dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2
n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
[versions]
# Automatically picked by buildout-versions
Jinja2 = 2.6
Pygments = 1.5
Sphinx = 1.1.3
Werkzeug = 0.8.3
apache-libcloud = 0.9.1
async = 0.6.1
buildout-versions = 1.7
docutils = 0.9
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.8
pycrypto = 2.5
rdiff-backup = 1.0.5
slapos.cookbook = 0.52
slapos.recipe.build = 0.7
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.3
slapos.toolbox = 0.24
smmap = 0.8.2
# Required by:
# slapos.core==0.24
# slapos.toolbox==0.24
Flask = 0.8
# Required by:
# slapos.toolbox==0.24
GitPython = 0.3.2.RC1
# Required by:
# slapos.cookbook==0.52
PyXML = 0.8.4
# Required by:
# slapos.toolbox==0.24
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.24
feedparser = 5.1.2
# Required by:
# slapos.cookbook==0.52
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.52
# slapos.core==0.24
# xml-marshaller==0.9.7
lxml = 2.3.4
# Required by:
# slapos.cookbook==0.52
netaddr = 0.7.6
# Required by:
# slapos.core==0.24
netifaces = 0.8
# Required by:
# slapos.toolbox==0.24
paramiko = 1.7.7.1
# Required by:
# slapos.toolbox==0.24
psutil = 0.4.1
# Required by:
# slapos.cookbook==0.52
# slapos.core==0.24
# slapos.toolbox==0.24
# zc.buildout==1.6.0-dev-SlapOS-003
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.52
# slapos.toolbox==0.24
slapos.core = 0.24
# Required by:
# slapos.core==0.24
supervisor = 3.0a12
# Required by:
# slapos.cookbook==0.52
# slapos.toolbox==0.24
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.52
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.24
zope.interface = 4.0.0
[buildout] [buildout]
parts = parts =
url
request-mariadb
apache-php
stunnel
certificate-authority certificate-authority
ca-stunnel ca-stunnel
logrotate logrotate
...@@ -13,21 +9,30 @@ parts = ...@@ -13,21 +9,30 @@ parts =
cron cron
cron-entry-logrotate cron-entry-logrotate
promise promise
frontend-promise
publish-connection-informations
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[url]
recipe = slapos.cookbook:publishurl
url = http://[$${apache-php:ip}]:$${apache-php:port}/
[promise] [promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/apache path = $${basedirectory:promises}/apache
hostname = $${apache-php:ip} hostname = $${apache-php:ip}
port = $${apache-php:port} port = $${apache-php:port}
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = $${apache-php:url}
url = $${request-frontend:connection-site_url}
[mariadb-urlparse] [mariadb-urlparse]
recipe = slapos.cookbook:urlparse recipe = slapos.cookbook:urlparse
url = $${request-mariadb:connection-url} url = $${request-mariadb:connection-url}
...@@ -38,11 +43,12 @@ source = ${application:location} ...@@ -38,11 +43,12 @@ source = ${application:location}
template = ${application-template:location}/${application-template:filename} template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location} configuration = ${application-configuration:location}
htdocs = $${directory:htdocs} htdocs = $${rootdirectory:srv}/www/
pid-file = $${basedirectory:run}/apache.pid pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
port = 8080 port = 8080
url = http://[$${:ip}]:$${:port}/
error-log = $${directory:httpd-log}/error.log error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log access-log = $${directory:httpd-log}/access.log
php-ini-dir = $${directory:php-ini-dir} php-ini-dir = $${directory:php-ini-dir}
...@@ -109,6 +115,17 @@ software-url = $${slap-connection:software-release-url} ...@@ -109,6 +115,17 @@ software-url = $${slap-connection:software-release-url}
software-type = mariadb software-type = mariadb
return = url return = url
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:request
name = Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
return = site_url
[logrotate] [logrotate]
recipe = slapos.cookbook:logrotate recipe = slapos.cookbook:logrotate
# Binaries # Binaries
...@@ -184,7 +201,6 @@ promises = $${rootdirectory:etc}/promise/ ...@@ -184,7 +201,6 @@ promises = $${rootdirectory:etc}/promise/
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
ca-dir = $${rootdirectory:srv}/ssl/ ca-dir = $${rootdirectory:srv}/ssl/
htdocs = $${rootdirectory:srv}/www/
httpd-log = $${basedirectory:log}/apache/ httpd-log = $${basedirectory:log}/apache/
php-ini-dir = $${rootdirectory:etc}/php/ php-ini-dir = $${rootdirectory:etc}/php/
tmp-php = $${rootdirectory:tmp}/php/ tmp-php = $${rootdirectory:tmp}/php/
......
[buildout]
extends =
../component/python-2.6/buildout.cfg
../component/lxml-python/buildout.cfg
../component/zlib/buildout.cfg
../component/git/buildout.cfg
# Python2.6 needed by Flask and pyopenssl
extensions =
slapos.rebootstrap
parts +=
nbdserver
pyOpenSSL-python
eggs
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
[rebootstrap]
section = python2.6
version = 3
eggs = slapos.libnetworkcache
[nbdserver]
# XXX-Cedric : use official tarball from kvm website
# (new kvm code does not seem to need special patch)
recipe = hexagonit.recipe.cmmi
path = ${nbdserversource:location}/
configure-options =
--disable-system
--disable-kvm
--extra-cflags="-I${zlib:location}/include"
--extra-ldflags="-L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib"
--disable-werror
[nbdserversource]
recipe=plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
command =
(${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.kvm.git ${:location} ) || (rm -fr ${:location} ; exit 1)
update-command =
cd ${:location} && ${git:location}/bin/git pull --quiet origin master
[instance-recipe]
egg = slapos.cookbook
module = nbdserver
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.toolbox
slapos.cookbook
pyOpenSSL
[pyOpenSSL-python]
recipe = zc.recipe.egg:custom
egg = pyOpenSSL
include-dirs =
${openssl:location}/include/
${python2.6:location}/include/
library-dirs =
${openssl:location}/lib/
${python2.6:location}/lib/
rpath =
${openssl:location}/lib/
${python2.6:location}/lib/
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
Jinja2 = 2.5.5
Werkzeug = 0.6.2
apache-libcloud = 0.5.2
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.7
plone.recipe.command = 1.1
pyOpenSSL = 0.12
pycrypto = 2.3
slapos.cookbook = 0.14
slapos.recipe.template = 1.1
slapos.toolbox = 0.6
# Required by:
# slapos.core==0.9
# slapos.toolbox==0.6
Flask = 0.7.2
# Required by:
# slapos.cookbook==0.14
PyXML = 0.8.4
# Required by:
# slapos.core==0.9
argparse = 1.1
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.14
# slapos.core==0.9
# slapos.toolbox==0.6
# xml-marshaller==0.9.7
lxml = 2.3
# Required by:
# slapos.cookbook==0.14
netaddr = 0.7.5
# Required by:
# slapos.core==0.9
netifaces = 0.4
# Required by:
# slapos.toolbox==0.6
paramiko = 1.7.7.1
# Required by:
# slapos.toolbox==0.6
psutil = 0.3.0
# Required by:
# slapos.cookbook==0.14
# slapos.core==0.9
# slapos.toolbox==0.6
# zc.buildout==1.5.3-dev-SlapOS-005
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.14
# slapos.toolbox==0.6
slapos.core = 0.9
# Required by:
# slapos.core==0.9
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.14
# slapos.toolbox==0.6
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.14
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.9
zope.interface = 3.6.4
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
extensions += extensions +=
buildout-versions buildout-versions
# Use shacache # Use shacache and lxml
extends = extends =
shacache-client.cfg shacache-client.cfg
../component/lxml-python/buildout.cfg
# Separate from site eggs # Separate from site eggs
allowed-eggs-from-site-packages = allowed-eggs-from-site-packages =
...@@ -40,8 +41,17 @@ allow-hosts += ...@@ -40,8 +41,17 @@ allow-hosts +=
# development / fast switching environment for whole software # development / fast switching environment for whole software
unzip = true unzip = true
parts += slapos-cookbook
versions = versions versions = versions
# Install slapos.cookbook containing all officials recipes
[slapos-cookbook]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
[versions] [versions]
# Use patched hexagonit.recipe.download from # Use patched hexagonit.recipe.download from
# https://github.com/SlapOS/hexagonit.recipe.download # https://github.com/SlapOS/hexagonit.recipe.download
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment