Commit 6c87c047 authored by Łukasz Nowak's avatar Łukasz Nowak

Merge branch 'master' into erp5testnode

Conflicts:
	stack/erp5.cfg
parents 05cd5f07 7d45a338
......@@ -8,3 +8,4 @@ downloads/
eggs/
parts/
slapos.cookbook.egg-info
.*.swp
Changes
=======
0.25 (unreleased)
0.35 (2011-11-10)
-----------------
* No changes yet.
* KVM : Promise are now working properly. [Łukasz Nowak]
* KVM : Use NoVNC with automatic login. [Cedric de Saint Martin]
* KVM : Use websockify egg and remove numpy hack. [Cedric de Saint Martin]
0.34 (2011-11-08)
-----------------
* Any LAMP software can specify its own php.ini [Alain Takoudjou]
* LAMP : Fix bug where buildout does not has sufficient rights to update
application parts. [Alain Takoudjou]
* LAMP : Update formatting when returning list of renamed files.
[Alain Takoudjou]
0.33 (2011-10-31)
-----------------
* erp5 : use percona toolkit instead of maatkit [Sebastien Robin]
0.32 (2011-10-28)
-----------------
* LAMP : Recipe can now call lampconfigure from slapos.toolbox which will
configure PHP application instance when needed. [Alain Takoudjou Kamdem]
0.31 (2011-10-16)
-----------------
* Split big redundant recipes into small ones. In order to factorize the code
and have everything in the buildout file. [Antoine Catton, Romain Courteaud,
Łukasz Nowak]
* LAMP : Update apache and php configuration files to work with a lot of different
PHP software. [Alain Takoudjou Kamdem]
* LAMP : Recipe can launch scripts, move or remove files or directories
when a given condition is filled. Useful when PHP apps require you to
remove "admin" directory after configuration for example.
[Alain Takoudjou Kamdem]
0.30 (2011-10-06)
-----------------
* LAMP : Update apache and php configuration files to work with a lot of different
PHP software. [Alain Takoudjou Kamdem]
0.29 (2011-09-28)
-----------------
* mysql: bug fix on database recovering (avoid importing dump two times). [Antoine Catton]
0.28 (2011-09-27)
-----------------
* lamp.request: requesting the mariadb software release instead of itself. [Antoine Catton]
* lamp.request: adding support of remote backup repo (using a different
software type). The default remote backup is a davstorage. [Antoine Catton]
0.27 (2011-09-27)
-----------------
* mysql: add backup and backup recovering using different software type. [Antoine Catton]
0.26 (2011-09-27)
-----------------
* Davstorage: returning more explicit url (using webdav scheme). [Antoine Catton]
* Other mysql minor fixes. [Antoine Catton]
0.25 (2011-09-21)
-----------------
* mysql: Restore to default behaviour. [Antoine Catton]
* mysql: Use mysqldump instead of non trustable backup system. [Antoine Catton]
0.24 (2011-09-19)
-----------------
......
......@@ -3,47 +3,57 @@ parts = apache-php
extends =
../apache/buildout.cfg
../cclient/buildout.cfg
../curl/buildout.cfg
../freetype/buildout.cfg
../gettext/buildout.cfg
../libiconv/buildout.cfg
../libjpeg/buildout.cfg
../libpng/buildout.cfg
../libtool/buildout.cfg
../mariadb/buildout.cfg
../openldap/buildout.cfg
../pkgconfig/buildout.cfg
../zip/buildout.cfg
[apache-php]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
url = http://fr2.php.net/get/php-5.3.6.tar.bz2/from/this/mirror
md5sum = 2286f5a82a6e8397955a0025c1c2ad98
url = http://fr2.php.net/distributions/php-5.3.8.tar.gz
md5sum = f4ce40d5d156ca66a996dbb8a0e7666a
configure-options =
--with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location}
--with-mysql=${mariadb:location}
--with-zlib-dir=${zlib:location}
--with-mcrypt=${libmcrypt:location}
--enable-libxml
--enable-mbstring
--enable-session
environment =
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
PATH=${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/lib
[apache-php-xmlrpc-gd]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
url = http://fr2.php.net/get/php-5.3.6.tar.bz2/from/this/mirror
md5sum = 2286f5a82a6e8397955a0025c1c2ad98
configure-options =
--with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location}
--with-gd
--with-zlib-dir=${zlib:location}
--with-mcrypt=${libmcrypt:location}
--with-xmlrpc=${xml-rpc:location}
--with-jpeg-dir=${libjpeg:location}
--with-png-dir=${libpng:location}
--enable-gd-native-ttf
--with-ttf
--with-freetype-dir=${freetype:location}
--with-pdo-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-curl=${curl:location}
--with-zip-dir=${zip:location}
--with-imap=${cclient:location}
--with-iconv-dir=${libiconv:location}
--with-gettext=${gettext:location}
--with-ldap=${openldap:location}
--with-imap-ssl
--with-openssl=${openssl:location}
--enable-libxml
--enable-mbstring
--enable-session
--disable-all
--enable-exif
--enable-zip
--enable-ftp
environment =
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
PATH=${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${xml-rpc:location}/lib -Wl,-rpath -Wl,${xml-rpc:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/lib
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/libblkid
[libmcrypt]
......
......@@ -16,8 +16,8 @@ extends =
[apache-no-ssl]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.21.tar.bz2
md5sum = 1696ae62cd879ab1d4dd9ff021a470f2
configure-options = --enable-authn-alias
--enable-bucketeer
--enable-cache
......@@ -66,8 +66,8 @@ configure-options = --enable-authn-alias
[apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.21.tar.bz2
md5sum = 1696ae62cd879ab1d4dd9ff021a470f2
configure-options = --disable-static
--enable-authn-alias
--enable-bucketeer
......
[buildout]
parts =
bash
[bash]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
md5sum = 3fb927c7c33022f1c327f14a81c0d4b0
# libc-client - UW IMAP server
# ftp://ftp.cac.washington.edu/imap/
[buildout]
extends =
../openssl/buildout.cfg
parts =
cclient-patch
cclient
[cclient-patch]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/imap-2007f.patch
md5sum = 42c77fdd5d7a976fc302b93aadb3da98
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = imap-2007f.patch
[cclient]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
md5sum = 2126fd125ea26b73b20f01fcd5940369
configure-command = true
# cclient does not support parallel compilation
make-options =
slx
SSLTYPE=unix
SSLDIR=${openssl:location}
SSLCRYPTO=-lcrypto
IP=6
SSLLIB=${openssl:location}/lib
EXTRACFLAGS=-fPIC
CCLIENT=${buildout:parts-directory}
-j1
patches =
${cclient-patch:location}/${cclient-patch:filename}
patch-options = -p1
--- old/Makefile 2011-09-22 13:19:53.000000000 +0100
+++ new/Makefile 2011-11-09 15:02:54.038306922 +0100
@@ -280,7 +280,11 @@
SYSTEM=unix
TOOLS=tools
TOUCH=touch
-
+IMAPDIR=$(CCLIENT)/cclient
+COMPILEDIR = $(CCLIENT)/cclient__compile__/imap-2007f
+CP=cp -r
+INSTALL=install
+FOR=for
# Primary build command
@@ -580,7 +584,6 @@
@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo
@echo Do you want to continue this build anyway? Type y or n please:
- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac'
nounenc:
@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -639,7 +642,7 @@
@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo
@echo Do you want to build with IPv6 anyway? Type y or n please:
- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make noip6;exit 1);; esac'
+ #@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make noip6;exit 1);; esac'
@echo OK, I will remember that you really want to build with IPv6.
@echo You will not see this message again.
@$(TOUCH) ip6
@@ -731,6 +734,24 @@
$(SH) -c '$(RM) an ua OSTYPE SPECIALS c-client mtest imapd ipopd mailutil mlock dmail tmail || true'
$(CD) tools;$(MAKE) clean
+install:
+ $(INSTALL) -v -d $(IMAPDIR)/include
+ $(INSTALL) -v -d $(IMAPDIR)/lib
+ $(INSTALL) -v -m 644 $(COMPILEDIR)/c-client/*.h $(IMAPDIR)/include
+ $(INSTALL) -v -m 644 $(COMPILEDIR)/c-client/c-client.a $(IMAPDIR)/lib
+ $(CP) $(COMPILEDIR)/ipopd $(COMPILEDIR)/mailutil $(COMPILEDIR)/imapd \
+ $(COMPILEDIR)/dmail $(COMPILEDIR)/mlock $(COMPILEDIR)/mtest $(COMPILEDIR)/tmail $(IMAPDIR)
+ $(RM) $(IMAPDIR)/ipopd/*.h $(IMAPDIR)/ipopd/*.c $(IMAPDIR)/ipopd/Makefile;
+ $(RM) $(IMAPDIR)/mailutil/*.h $(IMAPDIR)/mailutil/*.c $(IMAPDIR)/mailutil/Makefile;
+ $(RM) $(IMAPDIR)/imapd/*.h $(IMAPDIR)/imapd/*.c $(IMAPDIR)/imapd/Makefile;
+ $(RM) $(IMAPDIR)/tmail/*.h $(IMAPDIR)/tmail/*.c $(IMAPDIR)/tmail/Makefile;
+ $(RM) $(IMAPDIR)/mlock/*.h $(IMAPDIR)/mlock/*.c $(IMAPDIR)/mlock/Makefile;
+ $(RM) $(IMAPDIR)/mtest/*.h $(IMAPDIR)/mtest/*.c $(IMAPDIR)/mtest/Makefile;
+ $(RM) $(IMAPDIR)/dmail/*.h $(IMAPDIR)/dmail/*.c $(IMAPDIR)/dmail/Makefile;
+ $(INSTALL) -v -m 644 $(COMPILEDIR)/ip6 $(IMAPDIR)
+ $(INSTALL) -v -m 644 $(COMPILEDIR)/OSTYPE $(IMAPDIR)
+ $(INSTALL) -v -m 644 $(COMPILEDIR)/SPECIALS $(IMAPDIR)
+
# A monument to a hack of long ago and far away...
love:
......@@ -12,8 +12,8 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[liberation-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-1.06.0.20100721.tar.gz
md5sum = ca4870d899fd7e943ffc310a5421ad4d
url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-1.07.0.tar.gz
md5sum = 8150db1c6e27cacdfd524b563b85b69e
destination = ${fonts:location}/${:_buildout_section_name_}
# IPAex Font - Japanese fonts provided by IPA
......
......@@ -10,8 +10,8 @@ parts =
[freetype]
recipe = hexagonit.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.5.tar.bz2
md5sum = 90428a6d8ec4876cd1eb94858c2a59b0
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.6.tar.bz2
md5sum = 5e6510613f612809d2d7862592b92ab7
configure-options =
--disable-static
environment =
......
......@@ -3,22 +3,11 @@
[buildout]
extends =
../m4/buildout.cfg
../gmp/buildout.cfg
../zip/buildout.cfg
parts =
gcc-java
[gmp]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
md5sum = 0bbaedc82fb30315b06b1588b9077cd3
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--build=`uname -m`-linux
environment =
PATH=${m4:location}/bin:%(PATH)s
gcc
[mpfr]
recipe = hexagonit.recipe.cmmi
......@@ -26,9 +15,9 @@ url = http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2
md5sum = bfbecb2eacb6d48432ead5cfc3f7390a
configure-options =
--with-gmp=${gmp:location}
--disable-static
environment =
CPPFLAGS =-I${gmp:location}/include
LDFLAGS =-L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
LDFLAGS=-Wl,-rpath=${gmp:location}/lib
[mpc]
recipe = hexagonit.recipe.cmmi
......@@ -37,9 +26,34 @@ md5sum = 0d6acab8d214bd7d1fbbc593e83dd00d
configure-options =
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--disable-static
environment =
CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include
LDFLAGS =-L${mpfr:location}/lib -Wl,-rpath=${mpfr:location}/lib -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib
[ppl]
recipe = hexagonit.recipe.cmmi
# we should use version 0.10.x for gcc-4.5
url = http://www.cs.unipr.it/ppl/Download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2
md5sum = 5667111f53150618b0fa522ffc53fc3e
configure-options =
--with-libgmp-prefix=${gmp:location}
--with-libgmpxx-prefix=${gmp:location}
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=${gmp:location}/lib
[cloog-ppl]
recipe = hexagonit.recipe.cmmi
url = ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.9.tar.gz
md5sum = 806e001d1b1a6b130069ff6274900af5
configure-options =
--with-gmp=${gmp:location}
--with-ppl=${ppl:location}
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${ppl:location}/lib
[ecj]
recipe = hexagonit.recipe.download
......@@ -53,33 +67,42 @@ recipe = hexagonit.recipe.download
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2
md5sum = 8e0b5c12212e185f3e4383106bfa9cc6
strip-top-level-dir = True
destination = ${gcc-java-source:location}
destination = ${gcc-source:location}
[gcc-java-download]
recipe = hexagonit.recipe.download
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-java-4.5.3.tar.bz2
md5sum = 08e045fdbdc22ac9af3aec3b8d16dbab
strip-top-level-dir = True
destination = ${gcc-java-source:location}
destination = ${gcc-source:location}
ignore-existing = true
[gcc-java-source]
[gcc-source]
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[gcc-java]
[gcc-multiarch.patch]
recipe = hexagonit.recipe.download
md5sum = 819e6735270c8a432b0512b49f40219f
url = ${:_profile_base_location_}/${:filename}
filename = ${:_buildout_section_name_}
download-only = true
[gcc-java-minimal]
depends =
${gcc-download:location}
${gcc-java-download:location}
recipe = hexagonit.recipe.cmmi
path = ${gcc-java-source:location}
path = ${gcc-source:location}
md5sum = bb3265edf0fa7543e50cedb93e04e427
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--disable-bootstrap
--build=`uname -m`-linux
--enable-languages=java
--disable-multilib
--with-gmp=${gmp:location}
......@@ -87,6 +110,8 @@ configure-options =
--with-mpc=${mpc:location}
--with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--without-ppl
--without-cloog
environment =
CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include -I${mpc:location}/include
......@@ -94,3 +119,35 @@ environment =
PATH=${zip:location}/bin:%(PATH)s
# make install does not work when several core are used
make-targets = install -j1
[gcc]
depends =
${gcc-download:location}
${gcc-java-download:location}
recipe = hexagonit.recipe.cmmi
path = ${gcc-source:location}
md5sum = bb3265edf0fa7543e50cedb93e04e427
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--disable-bootstrap
--enable-languages="c,c++,java"
--disable-multilib
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--with-ppl=${ppl:location}
--with-cloog=${cloog-ppl:location}
--with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${ppl:location}/lib -Wl,-rpath=${cloog-ppl:location}/lib
PATH=${zip:location}/bin:%(PATH)s
# make install does not work when several core are used
make-targets = install -j1
This diff is collapsed.
[buildout]
extends =
../m4/buildout.cfg
parts =
gmp
[gmp]
recipe = hexagonit.recipe.cmmi
# we should use version 4.x for ppl-0.10
url = ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2
md5sum = dd60683d7057917e34630b4a787932e8
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--build=`uname -m`-linux
--enable-cxx
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
# mroonga - a MySQL storage engine using full-text search engine groonga
# http://mroonga.github.com/
# http://groonga.org/
[buildout]
parts =
groonga
[groonga]
recipe = hexagonit.recipe.cmmi
url = http://packages.groonga.org/source/groonga/groonga-1.2.5.tar.gz
md5sum = 7e608406677b7a3f91e287acc0c718c0
configure-options =
--disable-static
--disable-glibtest
--without-mecab
......@@ -3,8 +3,8 @@ parts = haproxy
[haproxy]
recipe = hexagonit.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.15.tar.gz
md5sum = c1b4fc6028c6d8e23dde8c91ff47eabe
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.18.tar.gz
md5sum = 4ac88bb1a76c4b84ed4f6131183bedbe
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
......
......@@ -35,8 +35,8 @@ filename = imagemagick-6.6.7-4-without-lzma.patch
[imagemagick]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.6.9-10.tar.bz2
md5sum = 985bd453c3e502f2771af5329c1cc384
url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.2-10.tar.bz2
md5sum = 073ec5d7f2a22db96a0e87e4322b75f9
configure-options =
--disable-static
--without-x
......
[buildout]
parts =
parts =
java
[jdk-6u27-no-user-interaction-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = jdk-6u27-no-user-interaction.patch
md5sum = 4c4303240647a114d07f3c411b2e6b5b
[java]
<= java-re
[java-re]
<= java-re-1.6.0
[java-sdk]
<= java-sdk-1.6.0
[java-re-1.6.0]
recipe = slapos.recipe.build
slapos_promisee =
directory:bin
......@@ -28,3 +44,49 @@ script =
self.cleanup_dir_list.append(extract_dir)
workdir = guessworkdir(extract_dir)
self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s")
[java-sdk-1.6.0]
recipe = slapos.recipe.build
slapos_promisee =
directory:bin
directory:lib
directory:man
directory:plugin
directory:javaws
file:jre/lib/rt.jar
file:bin/java
x86 = http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-i586.bin bdb5f05bd20c6aa9a4729726191bf6fd
x86-64 = http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-x64.bin 94f93a3ff03f824a238ecd79ad90433e
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
download_file = self.download(self.options['url'], self.options.get('md5sum'))
extract_dir = tempfile.mkdtemp(self.name)
os.chdir(extract_dir)
(download_dir, filename) = os.path.split(download_file)
auto_extract_bin = os.path.join(extract_dir, filename)
shutil.move(download_file, auto_extract_bin)
os.chmod(auto_extract_bin, 0777)
subprocess.call(["patch", auto_extract_bin, "-i", "${jdk-6u27-no-user-interaction-patch:location}/${jdk-6u27-no-user-interaction-patch:filename}"])
subprocess.call([auto_extract_bin])
self.cleanup_dir_list.append(extract_dir)
workdir = guessworkdir(extract_dir)
self.copyTree(os.path.join(workdir, "jdk1.6.0_27"), "%(location)s")
[java-sdk-1.7.0]
recipe = slapos.recipe.build
slapos_promisee =
directory:bin
directory:lib
directory:man
directory:jre
file:jre/lib/rt.jar
file:bin/java
file:bin/javac
x86 = http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz f97244a104f03731e5ff69f0dd5a9927
x86-64 = http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz b3c1ef5faea7b180469c129a49762b64
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
--- jdk-6u27-linux-x64.bin.orig 2011-09-27 11:02:14.000000000 +0200
+++ jdk-6u27-linux-x64.bin 2011-09-27 10:38:01.000000000 +0200
@@ -81,7 +81,7 @@
trap 'rm -f $outname; exit 1' HUP INT QUIT TERM
echo "Unpacking..."
tail ${tail_args} +189 "$0" > $outname
-if [ -x /usr/bin/sum ]; then
+if [ -x /usr/bin/null ]; then
echo "Checksumming..."
sum=`/usr/bin/sum $outname`
@@ -169,7 +169,7 @@
fi
# Service Tag support and JDK product registration
- register_JDK "$javahome" "${BINARY_NAME}" "$1"
+ # register_JDK "$javahome" "${BINARY_NAME}" "$1"
else
if [ "$1" = "-x" ]; then
[buildout]
parts =
libiconv
[libiconv]
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
md5sum = e34509b1623cec449dfeb73d7ce9c6c6
[buildout]
extends = ../cpio/buildout.cfg
extends =
../cpio/buildout.cfg
../rpm2cpio/buildout.cfg
parts =
libreoffice-bin
find-links =
http://www.nexedi.org/static/packages/source/
versions = versions
[versions]
# special version of z3c.recipe.openoffice with architecture autodetection
z3c.recipe.openoffice = 0.3.1dev8
[libreoffice-bin]
recipe = z3c.recipe.openoffice
install-javafilter = no
install-pyuno-egg = no
hack-openoffice-python = no
flavour = libreoffice
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
#base-url = http://download.documentfoundation.org/libreoffice/stable/3.3.2/rpm/%s/LibO_3.3.2_Linux_%s_install-rpm_en-US.tar.gz
base-url = http://download.documentfoundation.org/libreoffice/stable/3.3.4/rpm/%s/LibO_3.3.4_Linux_%s_install-rpm_en-US.tar.gz
url = http://download.documentfoundation.org/libreoffice/stable/3.4.3/rpm/%s/LibO_3.4.3_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums
md5sum_x86 = ae1b2b387dcef513c378cc95b255affc
md5sum_x86-64 = b2d6a902182c1af82ca088fbb665d0e3
# where office code can be found?
officedir = libreoffice3.4
# script to install
script =
location = %(location)r
self.failIfPathExists(location)
import sys
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
platform = guessPlatform()
url = self.options['url'] %% (ARCH_DIR_MAP[platform], platform)
md5sum = self.options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir)
storagedir = os.path.join(workdir, 'storage')
os.mkdir(storagedir)
rpmsdir = os.path.join(workdir, [q for q in os.listdir(workdir) if q == 'RPMS'][0])
rpmlist = [os.path.join(rpmsdir, q) for q in os.listdir(rpmsdir) if q.endswith('.rpm') and 'javafilter' not in q and 'xsltfilter' not in q]
[self.pipeCommand([[sys.executable, '${:rpm2cpio}', rpm], ['${:cpio}', '-idum']], cwd=storagedir) for rpm in rpmlist]
self.copyTree(os.path.join(storagedir, 'opt', '${:officedir}'), location, ['basis3.4', 'basis3.3', 'ure'])
# helper binaries
cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:target}
......@@ -4,7 +4,9 @@
[buildout]
extends =
../zlib/buildout.cfg
../groonga/buildout.cfg
../ncurses/buildout.cfg
../pkgconfig/buildout.cfg
../readline/buildout.cfg
parts =
......@@ -21,6 +23,7 @@ keep-compile-dir = true
# - like in mysql part in http://svn.zope.org/zodbshootout/trunk/buildout.cfg?view=markup
# we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine.
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static
--enable-thread-safe-client
--enable-local-infile
......@@ -36,3 +39,16 @@ configure-options =
environment =
CPPFLAGS =-I${ncurses:location}/include -I${readline:location}/include
LDFLAGS =-L${readline:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib
[groonga-storage-engine-mariadb]
recipe = hexagonit.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.5.tar.gz
md5sum = 52fed75d97a91f239750a1011ea9e468
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
LDFLAGS=-L${groonga:location}/lib
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
# mroonga - a MySQL storage engine using full-text search engine groonga
# http://mroonga.github.com/
# http://groonga.org/
[buildout]
parts =
mroonga
extends =
../mariadb/buildout.cfg
../pkgconfig/buildout.cfg
[groonga]
recipe = hexagonit.recipe.cmmi
url = http://groonga.org/files/groonga/groonga-1.1.0.tar.gz
md5sum = a5a381db446e017f172bf6b003a4fed9
configure-options =
--without-mecab
[mroonga-mariadb-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = da2457b9f8006cddb279a165128479e5
filename = groonga-storage-engine-0.4.mariadb.patch
download-only = true
[mroonga]
recipe = hexagonit.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.4.tar.gz
md5sum = eb39ddaebb5a295f103bb1f66d5b33da
patch-options = -p1
patches =
${mroonga-mariadb-patch:location}/${mroonga-mariadb-patch:filename}
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
LDFLAGS=-L${groonga:location}/lib
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
......@@ -5,8 +5,10 @@ extends =
../zlib/buildout.cfg
../bison/buildout.cfg
../flex/buildout.cfg
../groonga/buildout.cfg
../libtool/buildout.cfg
../ncurses/buildout.cfg
../pkgconfig/buildout.cfg
../readline/buildout.cfg
parts =
......@@ -15,15 +17,15 @@ parts =
[mysql-5.1-sphinx-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 6580393ca93ecf564cad0552b91a563e
filename = mysql-5.1.49-sphinx-1.10.diff
md5sum = eefcd08c400c58d3e89542ab482a8429
filename = mysql-5.1-sphinx-2.0.1-beta.diff
download-only = true
[mysql-5.1]
recipe = hexagonit.recipe.cmmi
version = 5.1.57
version = 5.1.58
url = http://mysql.he.net/Downloads/MySQL-5.1/mysql-${:version}.tar.gz
md5sum = 8d6998ef0f2e2d1dac2a761348c71c21
md5sum = ae5aef506088e521e4b1cc4f668e96d2
# compile directory is required to build mysql plugins.
keep-compile-dir = true
# configure: how to avoid searching for my.cnf?
......@@ -39,6 +41,7 @@ configure-command =
# we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine.
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static
--enable-thread-safe-client
--enable-local-infile
--enable-assembler
......@@ -54,10 +57,23 @@ configure-options =
make-options =
LIBTOOL=libtool
patch-options = -p1
patch-options = -p0
patches =
${mysql-5.1-sphinx-patch:location}/${mysql-5.1-sphinx-patch:filename}
environment =
PATH =${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${bison:location}/bin:${flex:location}/bin:%(PATH)s
CPPFLAGS =-I${ncurses:location}/include -I${readline:location}/include
LDFLAGS =-L${readline:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib
[groonga-storage-engine-mysql-5.1]
recipe = hexagonit.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.9.tar.gz
md5sum = 78fe07122dc376796a5aede476f50cfd
configure-options =
--with-mysql-source=${mysql-5.1:location}__compile__/mysql-${mysql-5.1:version}
--with-mysql-config=${mysql-5.1:location}/bin/mysql_config
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
LDFLAGS=-L${groonga:location}/lib
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
......@@ -11,11 +11,14 @@ configure-options =
--with-shared
--without-normal
--without-debug
--without-gpm
--enable-rpath
# tricky way to rerun with --enable-widec
make-targets =
install && (for i in curses unctrl eti form menu panel term; do ln -sf ncurses/$i.h ${buildout:parts-directory}/${:_buildout_section_name_}/include/$i.h; done) && ./configure ${:configure-options} --enable-widec && make install
# pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user
environment =
LDFLAGS =-Wl,--as-needed
LDCONFIG=/bin/echo
make-options =
-j1
......@@ -4,5 +4,5 @@ parts =
[noVNC]
recipe = hexagonit.recipe.download
url = https://github.com/kanaka/noVNC/tarball/v0.1
url = https://github.com/kanaka/noVNC/tarball/master
strip-top-level-dir = true
......@@ -12,8 +12,8 @@ parts =
[openssl]
recipe = hexagonit.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.0d.tar.gz
md5sum = 40b6ea380cc8a5bf9734c2f8bf7e701e
url = https://www.openssl.org/source/openssl-1.0.0e.tar.gz
md5sum = 7040b89c4c58c7a1016c0dfa6e821c86
configure-command = ./config
configure-options =
-I${zlib:location}/include
......
......@@ -39,6 +39,6 @@ make-options =
pre-make-hook = ${pdftk-hooks-download:location}/${pdftk-hooks-download:filename}:pre_make_hook
environment =
PATH=${gcc-java:location}/bin:${fastjar:location}/bin:%(PATH)s
LDFLAGS=-L${gcc-java:location}/lib -Wl,-rpath=${gcc-java:location}/lib -L${gcc-java:location}/lib64 -Wl,-rpath=${gcc-java:location}/lib64
LD_LIBRARY_PATH=${gcc-java:location}/lib:${gcc-java:location}/lib64
PATH=${gcc-java-minimal:location}/bin:${fastjar:location}/bin:%(PATH)s
LDFLAGS=-L${gcc-java-minimal:location}/lib -Wl,-rpath=${gcc-java-minimal:location}/lib -L${gcc-java-minimal:location}/lib64 -Wl,-rpath=${gcc-java-minimal:location}/lib64
LD_LIBRARY_PATH=${gcc-java-minimal:location}/lib:${gcc-java-minimal:location}/lib64
......@@ -15,8 +15,8 @@ extends =
[poppler-0.17.1]
recipe = hexagonit.recipe.cmmi
md5sum = 8d7276d1943078c76aabe9f2ec52d50b
url = http://poppler.freedesktop.org/poppler-0.17.1.tar.gz
md5sum = b566d1fbaa29b9257bf0ecc130e7b2ca
url = http://poppler.freedesktop.org/poppler-0.17.2.tar.gz
configure-options =
--disable-cairo-output
--disable-cms
......@@ -26,6 +26,7 @@ configure-options =
--disable-poppler-cpp
--disable-poppler-glib
--disable-poppler-qt4
--disable-static
--enable-zlib
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
......
[buildout]
extends =
../gmp/buildout.cfg
parts =
pycrypto-python
versions = versions
[pycrypto-python]
recipe = zc.recipe.egg:custom
egg = pycrypto
include-dirs =
${gmp:location}/include
library-dirs =
${gmp:location}/lib
rpath =
${gmp:location}/lib
[versions]
# pycrypto 2.4 does not work with setuptools/buildout
pycrypto = 2.3
[buildout]
parts =
rpm2cpio
[rpm2cpio]
recipe = slapos.recipe.build:download
url = http://ruda.googlecode.com/hg/rpm/rpm2cpio.py
md5sum = 06001f57616581312f9599e104f2473a
......@@ -98,6 +98,7 @@ initialization =
# control scripts generation in order to avoid reinstalling bin/buildout
scripts =
bang = slapos.bang:main
generate-signature-key = slapos.signature:run
slapconsole = slapos.console:run
slapos-request = slapos.console:request
......@@ -111,38 +112,38 @@ scripts =
slapproxy = slapos.proxy:main
[versions]
zc.buildout = 1.5.3-dev-SlapOS-009
zc.buildout = 1.6.0-dev-SlapOS-002
Jinja2 = 2.6
Werkzeug = 0.7.1
Werkzeug = 0.8.1
collective.recipe.template = 1.9
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
ipython = 0.11
lxml = 2.3.1
meld3 = 0.6.7
netaddr = 0.7.5
netaddr = 0.7.6
setuptools = 0.6c12dev-r88846
slapos.core = 0.14
slapos.libnetworkcache = 0.9
slapos.core = 0.19
slapos.libnetworkcache = 0.10
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.14
Flask = 0.7.2
# slapos.core==0.19
Flask = 0.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.core==0.14
netifaces = 0.5
# slapos.core==0.19
netifaces = 0.6
# Required by:
# slapos.core==0.14
# slapos.core==0.19
supervisor = 3.0a10
# Required by:
# slapos.core==0.14
zope.interface = 3.7.0
# slapos.core==0.19
zope.interface = 3.8.0
......@@ -5,8 +5,8 @@ parts =
[sqlite3]
recipe = hexagonit.recipe.cmmi
url = http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz
md5sum = 554026fe7fac47b1cf61c18d5fe43419
url = http://www.sqlite.org/sqlite-autoconf-3070800.tar.gz
md5sum = 6bfb46d73caaa1bbbcd2b52184b6c542
configure-options =
--disable-static
--enable-readline
......
......@@ -17,8 +17,8 @@ filename = stunnel-4-hooks.py
[stunnel-4]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.bit.nl/mirror/stunnel/obsolete/4.x/stunnel-4.42.tar.gz
md5sum = f64a7426166d397dd826deef33bb6aa0
url = http://mirror.bit.nl/stunnel/stunnel-4.46.tar.gz
md5sum = 978030ff42f087ec26eb8a095ab69994
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options =
--enable-ipv6
......
......@@ -9,11 +9,6 @@ extends =
parts =
w3m
versions = versions
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
[w3m-w3m.gcc.forward.compat.patch]
recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename}
......@@ -50,7 +45,3 @@ environment =
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS=-I${ncurses:location}/include/ -I${zlib:location}/include/
LDFLAGS=-Wl,--as-needed -L${garbage-collector:location}/lib -Wl,-rpath=${garbage-collector:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
......@@ -2,6 +2,7 @@
[buildout]
extends =
../freetype/buildout.cfg
../libuuid/buildout.cfg
../libxml2/buildout.cfg
../libxslt/buildout.cfg
../pkgconfig/buildout.cfg
......@@ -11,7 +12,8 @@ parts =
libXdmcp
libXext
libXau
libX11
libXinerama
libSM
[xorg-aclocal]
ACLOCAL=${xorg-util-macros:location}/share/aclocal
......@@ -56,8 +58,6 @@ configure-options =
--disable-static
environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib
LD_RUN_PATH=${xproto:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
[xcbproto]
......@@ -82,8 +82,6 @@ configure-options =
--disable-build-docs
environment =
PKG_CONFIG_PATH=${xcbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${libxslt:location}/lib
LD_RUN_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${libxslt:location}/lib
PATH=${pkgconfig:location}/bin:${libxslt:location}/bin:%(PATH)s
PYTHON=${buildout:executable}
# Python note: libxcb requires python with ElementTree. In case of appliance
......@@ -97,8 +95,6 @@ url = http://www.x.org/releases/X11R7.6/src/lib/libXext-1.2.0.tar.bz2
md5sum = 9bb236ff0193e9fc1c1fb504dd840331
environment =
PKG_CONFIG_PATH=${xcbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib
LD_RUN_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
# Warning: do *not* enable -fPIC CFLAGS for this library. Even if it fails and ld asks you to enable it. This will not solve your problem, and create an unexpected (by build chain) setup (all .o will be position-independant code).
# CFLAGS=-fPIC
......@@ -113,8 +109,8 @@ patch-options = -p1
[libXext-patch-link-error]
# Fixes libXext.la link error
# http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
recipe = hexagonit.recipe.download
#url = http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = 700c7896b832d6e4fb0185f0d5382b01f94e7141.patch
......@@ -134,14 +130,9 @@ configure-options =
--disable-specs
--without-xmlto
--without-fop
environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
LD_RUN_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
CFLAGS=-I${xproto:location}/include
CPPFLAGS=-I${xproto:location}/include
[libXdmcp]
recipe = hexagonit.recipe.cmmi
......@@ -149,10 +140,48 @@ url = http://www.x.org/releases/X11R7.6/src/lib/libXdmcp-1.1.0.tar.bz2
md5sum = 762b6bbaff7b7d0831ddb4f072f939a5
environment =
PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig:${xproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib
LD_RUN_PATH=${xproto:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options =
--disable-static
--without-xmlto
--without-fop
[xineramaproto]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/proto/xineramaproto-1.2.tar.bz2
md5sum = a8aadcb281b9c11a91303e24cdea45f5
[libXinerama]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXinerama-1.1.1.tar.bz2
md5sum = ecd4839ad01f6f637c6fb5327207f89b
environment =
PKG_CONFIG_PATH=${libX11:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xineramaproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options =
--disable-static
[libICE]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libICE-1.0.7.tar.bz2
md5sum = bb72a732b15e9dc25c3036559387eed5
configure-options =
--disable-static
--without-xmlto
--without-fop
environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
[libSM]
recipe = hexagonit.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libSM-1.2.0.tar.bz2
md5sum = e78c447bf1790552b644eca81b542742
configure-options =
--disable-static
--without-xmlto
--without-fop
environment =
PKG_CONFIG_PATH=${libICE:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
LIBUUID_CFLAGS=-I${libuuid:location}/include
......@@ -15,11 +15,6 @@ extends =
parts =
xtrabackup
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
[xtrabackup-build-patch-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
......@@ -51,7 +46,3 @@ environment =
PATH=${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${flex:location}/bin:%(PATH)s:${bison:location}/bin
make-options =
-j1
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-001
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.25-dev'
version = '0.35'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -39,8 +39,12 @@ setup(name=name,
zip_safe=True,
entry_points={
'zc.buildout': [
'download = slapos.recipe.download:Recipe',
'certificate_authority = slapos.recipe.certificate_authority:Recipe',
'certificate_authority.request = slapos.recipe.certificate_authority:Request',
'cron = slapos.recipe.dcron:Recipe',
'cron.d = slapos.recipe.dcron:Part',
'davstorage = slapos.recipe.davstorage:Recipe',
'duplicity = slapos.recipe.duplicity:Recipe',
'erp5 = slapos.recipe.erp5:Recipe',
'erp5testnode = slapos.recipe.erp5testnode:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe',
......@@ -51,16 +55,24 @@ setup(name=name,
'libcloudrequest = slapos.recipe.libcloudrequest:Recipe',
'memcached = slapos.recipe.memcached:Recipe',
'mysql = slapos.recipe.mysql:Recipe',
'mkdirectory = slapos.recipe.mkdirectory:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe',
'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed',
'lamp = slapos.recipe.lamp:Request',
'lamp.request = slapos.recipe.lamp:Request',
'lamp.static = slapos.recipe.lamp:Static',
'lamp.simple = slapos.recipe.lamp:Simple',
'logrotate = slapos.recipe.logrotate:Recipe',
'logrotate.d = slapos.recipe.logrotate:Part',
'publishurl = slapos.recipe.publishurl:Recipe',
'proactive = slapos.recipe.proactive:Recipe',
'request = slapos.recipe.request:Recipe',
'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed',
'softwaretype = slapos.recipe.softwaretype:Recipe',
'siptester = slapos.recipe.siptester:SipTesterRecipe',
'simplelogger = slapos.recipe.simplelogger:Recipe',
'slaprunner = slapos.recipe.slaprunner:Recipe',
'stunnel = slapos.recipe.stunnel:Recipe',
'testnode = slapos.recipe.testnode:Recipe',
'vifib = slapos.recipe.vifib:Recipe',
'xwiki = slapos.recipe.xwiki:Recipe',
......
download
========
Extremely simple recipe to download using zc.buildout download utility.
Usage
-----
::
[buildout]
parts =
download
[download]
recipe = slapos.cookbook:download
url = https://some.url/file
Such profile will download https://some.url/file and put it in
buildout:parts-directory/download/download
filename parameter can be used to change destination named filename.
destination parameter allows to put explicit destination.
md5sum parameter allows pass md5sum.
mode (octal, so for rw-r--r-- use 0644) allows to set mode
Exposes target attribute which is path to downloaded file.
Notes
-----
This recipe suffers from buildout download utility issue, which will do not
try to redownload resource with wrong md5sum.
lamp
=====
The lamp recipe helps you to deploy simply a php based application on slapos. This recipe is
able to setup mariadb, apache and apache-php for your php application, and is also capable of
configuring your software during installation to ensure a full compatibility.
How to use?
-----------
just add this part in your software.cfg to use the lamp.simple module
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
you also need to extend lamp.cfg
extends =
http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.50:/stack/lamp.cfg
lamp.runner
=====
When you install some software (such as prestashop) you need to remove or rename folder, with slapos you can not
access to the www-data directory. to do this, you need to tell to lamp recipe to remove or/and it when software
will be instantiated. Some software requires more than rename or delete a folder (manualy create database etc...)
in this case you need to write a python script and lamp recipe must run it when installing your software.
How to use?
-----------
this part of lamp recipe work with slapos.toolbox, Therefore you must add it to your recipe.
in software.cfg, replace instance-recipe-egg part by
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
and add into your instance.cfg
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
CONDITION
--------
the action (delete, rename, script, chmod) only starts when the condition is filled.
in instance.cfg, add
file_token = path_of_file
and the action will begin when path_of_www-data/path_of_file will be created
you can also use database to check condition. add
table_name = name_of_table
constraint = sql_where_condition
name_of_table is the full or partial name(in some cases we can not know the prefix used to create tables) of table
into mariadb databse for example table_name = admin. if you use
name_of_table = **, the action will begin when database is ready.
constraint is the sql_condition to use when search entry into name_of_table for example constraint = `admin_id`=1
you can't use file_token and table_name at the same time, otherwise file_token will be used in priority. Beware of conditions that will never be satisfied.
ACTION
-------
The action starts when condition is true
1- delete file or folder
into instance.cfg, use
delete = file_or_folder1, file_or_folder2, file_or_folder3 ...
for example delete = admin
2- rename file or folder
into instance.cfg, use
rename_chmod = mode (optional)
rename = old_name1 => new_name1, old_name2 => new_name2, ...
you can also use
rename = old_name1, old_name2 => new_name2, ... in this case old_name1 will be rename and the new name will be chose
by joining old_name1 and mysql_user: this should give
rename = old_name1 => old_name1-mysql_user, old_name2 => new_name2, ...
use rename_chmod to apply a mode to new_name1, new_name2, ...
3- Change mode of file or directory
this is usefull if you want to change the mode of files into your www-data, use
chmod = file1, file2, ....
mode = mode_to_apply (ex= 0644)
4- Launch python script
use script = ${configure-script:location}/${configure-script:filename} into instance.cfg, add part configure-script
into software.cfg
parts = configure-script
[configure-script]
recipe = hexagonit.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = url_of_script_name.py
filename = script_name.py
download-only = True
The script_name.py should contain a main function, sys.argv is given to the main. you can write script_name.py like this
....
def setup(args):
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
.......
if __name__ == '__main__':
setup(sys.argv[1:])
base_url: is the url of php software
htdocs: is the path of www-data directory
mysql_user, mysql_password, mysql_database, mysql_host: is the mariadb parameters
you can also use "import MySQLdb" if you want to access to database via your python script
\ No newline at end of file
mkdirectory
===========
mkdirectory loops on its options and create the directory joined
.. Note::
Use a slash ``/`` as directory separator. Don't use system dependent separator.
The slash will be parsed and replace by the operating system right separator.
Only use relative directory to the buildout root directory.
The created directory won't be added to path list.
##############################################################################
#
# 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.
#
##############################################################################
import os
import hashlib
import ConfigParser
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def setPath(self):
self.ca_dir = self.options['ca-dir']
self.request_directory = self.options['requests-directory']
self.ca_private = self.options['ca-private']
self.ca_certs = self.options['ca-certs']
self.ca_newcerts = self.options['ca-newcerts']
self.ca_crl = self.options['ca-crl']
self.ca_key_ext = '.key'
self.ca_crt_ext = '.crt'
def install(self):
path_list = []
# XXX: We gotta find better a way to get these options
ca_country_code = 'XX'
ca_email = 'xx@example.com'
ca_state = 'State',
ca_city = 'City'
ca_company = 'Company'
# XXX: end
self.setPath()
config = dict(ca_dir=self.ca_dir, request_dir=self.request_directory)
for f in ['crlnumber', 'serial']:
if not os.path.exists(os.path.join(self.ca_dir, f)):
open(os.path.join(self.ca_dir, f), 'w').write('01')
if not os.path.exists(os.path.join(self.ca_dir, 'index.txt')):
open(os.path.join(self.ca_dir, 'index.txt'), 'w').write('')
openssl_configuration = os.path.join(self.ca_dir, 'openssl.cnf')
config.update(
working_directory=self.ca_dir,
country_code=ca_country_code,
state=ca_state,
city=ca_city,
company=ca_company,
email_address=ca_email,
)
self.createFile(openssl_configuration, self.substituteTemplate(
self.getTemplateFilename('openssl.cnf.ca.in'), config))
ca_wrapper = self.createPythonScript(
self.options['wrapper'],
'%s.certificate_authority.runCertificateAuthority' % __name__,
dict(
openssl_configuration=openssl_configuration,
openssl_binary=self.options['openssl-binary'],
certificate=os.path.join(self.ca_dir, 'cacert.pem'),
key=os.path.join(self.ca_private, 'cakey.pem'),
crl=self.ca_crl,
request_dir=self.request_directory
)
)
path_list.append(ca_wrapper)
return path_list
class Request(Recipe):
def _options(self, options):
if 'name' not in options:
options['name'] = self.name
def install(self):
self.setPath()
key_file = self.options['key-file']
cert_file = self.options['cert-file']
name = self.options['name']
hash_ = hashlib.sha512(name).hexdigest()
key = os.path.join(self.ca_private, hash_ + self.ca_key_ext)
certificate = os.path.join(self.ca_certs, hash_ + self.ca_crt_ext)
parser = ConfigParser.RawConfigParser()
parser.add_section('certificate')
parser.set('certificate', 'name', name)
parser.set('certificate', 'key_file', key)
parser.set('certificate', 'certificate_file', certificate)
parser.write(open(os.path.join(self.request_directory, hash_), 'w'))
for link in [key_file, cert_file]:
if os.path.islink(link):
os.unlink(link)
elif os.path.exists(link):
raise OSError("%r file should be a symbolic link.")
os.symlink(key, key_file)
os.symlink(certificate, cert_file)
wrapper = self.createPythonScript(
self.options['wrapper'],
'slapos.recipe.librecipe.execute.execute_wait',
[ [self.options['executable']],
[certificate, key] ],
)
return [key_file, cert_file, wrapper]
......@@ -101,12 +101,17 @@ class CertificateAuthority:
'certificate_file')):
print 'Created certificate %r' % parser.get('certificate', 'name')
def runCertificateAuthority(args):
ca_conf = args[0]
def runCertificateAuthority(ca_conf):
ca = CertificateAuthority(ca_conf['key'], ca_conf['certificate'],
ca_conf['openssl_binary'], ca_conf['openssl_configuration'],
ca_conf['request_dir'])
while True:
ca.checkAuthority()
ca.checkRequestDir()
# XXX
# Antoine: I really don't like that at all. It wastes useful CPU time.
# I think it would be a greater idea to use pyinotify
# <http://pyinotify.sourceforge.net/>
# Or we could use select() with socket as well.
time.sleep(60)
# end XXX
......@@ -41,13 +41,12 @@ class Recipe(BaseSlapRecipe):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
document_root = self.createDataDirectory('www')
self.apache_config = self.installApache(document_root)
self.setConnectionDict(
dict(url='https://[%s]:%s/' % (self.apache_config['ip'],
self.apache_config['port']),
user=self.apache_config['user'],
password=self.apache_config['password']),
)
apache_config = self.installApache(document_root)
self.setConnectionUrl(scheme='webdavs',
host=apache_config['ip'],
port=apache_config['port'],
auth=(apache_config['user'],
apache_config['password']))
return self.path_list
def installApache(self, document_root, ip=None, port=None):
......
##############################################################################
#
# 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.
#
##############################################################################
import os
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
self.logger.info("Installing dcron...")
path_list = []
cronstamps = self.options['cronstamps']
cron_d = self.options['cron-entries']
crontabs = self.options['crontabs']
catcher = self.options['catcher']
binary = self.options['binary']
script = self.createPythonScript(binary,
'slapos.recipe.librecipe.execute.execute',
[self.options['dcrond-binary'].strip(), '-s', cron_d, '-c', crontabs,
'-t', cronstamps, '-f', '-l', '5', '-M', catcher]
)
path_list.append(script)
self.logger.debug('Main cron executable created at : %r', script)
self.logger.info("dcron successfully installed.")
return path_list
class Part(GenericBaseRecipe):
def _options(self, options):
if 'name' not in options:
options['name'] = self.name
def install(self):
cron_d = self.options['cron-entries']
filename = os.path.join(cron_d, 'name')
with open(filename, 'w') as part:
part.write('%(frequency)s %(command)s\n' % {
'frequency': self.options['frequency'],
'command': self.options['command'],
})
return [filename]
##############################################################################
#
# 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):
def install(self):
remote_url = self.options['remote_backup']
backup_directory = self.options['directory']
wrapper = self.createPythonScript(
self.options['wrapper'],
'slapos.recipe.librecipe.execute.execute',
[self.options['duplicity_binary'], '--no-encryption',
backup_directory, remote_url]
)
return [wrapper]
This diff is collapsed.
This diff is collapsed.
......@@ -4,3 +4,4 @@ SSLCertificateKeyFile %(login_key)s
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLProxyEngine On
......@@ -9,10 +9,25 @@ defaults
retries 1
option redispatch
maxconn 2000
timeout server 3000s
timeout queue 5s
timeout connect 10s
timeout client 3600s
# it is useless to have timeout much bigger than the one of apache.
# By default apache use 300s, so we set slightly more in order to
# make sure that apache will first stop the connection.
timeout server 305s
# Stop waiting in queue for a zope to become available.
# If no zope can be reached after one minute, consider the request will
# never succeed.
timeout queue 60s
# The connection should be immediate on LAN,
# so we should not set more than 5 seconds, and it could be already too much
timeout connect 5s
# As requested in haproxy doc, make this "at least equal to timeout server".
timeout client 305s
# Use "option httpclose" to not preserve client & server persistent connections
# while handling every incoming request individually, dispatching them one after
# another to servers, in HTTP close mode. This is really needed when haproxy
# is configured with maxconn to 1, without this options browser are unable
# to render a page
option httpclose
listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert
......
CREATE DATABASE IF NOT EXISTS %(mysql_database)s;
GRANT ALL PRIVILEGES ON %(mysql_database)s.* TO %(mysql_user)s@'%%' IDENTIFIED BY '%(mysql_password)s';
GRANT ALL PRIVILEGES ON %(mysql_database)s.* TO %(mysql_user)s@'localhost' IDENTIFIED BY '%(mysql_password)s';
%(file_list)s {
daily
dateext
rotate 3650
compress
notifempty
sharedscripts
......
This diff is collapsed.
# ZEO configuration file generated by SlapOS
<zeo>
address %(zeo_ip)s:%(zeo_port)s
read-only false
invalidation-queue-size 100
pid-filename %(zeo_pid)s
</zeo>
......@@ -10,6 +8,7 @@
<eventlog>
<logfile>
dateformat
path %(zeo_event_log)s
</logfile>
</eventlog>
<zodb_db %(storage_name)s>
cache-size %(zodb_cache_size)d
mount-point %(mount_point)s
<zeoclient>
cache-size %(zeo_client_cache_size)s
server %(address)s
storage %(storage_name)s
name %(storage_name)s
......
<zodb_db root>
cache-size %(zodb_cache_size)d
<filestorage>
path %(zodb_root_path)s
</filestorage>
......
......@@ -7,10 +7,8 @@ instancehome $INSTANCE
# Used products
%(products)s
# Environment override
<environment>
%(environment)s
</environment>
# Environment is setup in running wrapper script
# Reason: zope.conf is read too late for some componets
# No need to debug
debug-mode off
......@@ -34,11 +32,13 @@ lock-filename %(lock-filename)s
# Logging configuration
<eventlog>
<logfile>
dateformat
path %(event_log)s
</logfile>
</eventlog>
<logger access>
<logfile>
dateformat
path %(z2_log)s
</logfile>
</logger>
......
......@@ -59,7 +59,8 @@ class Recipe(BaseSlapRecipe):
# Install the socket_connection_attempt script
catcher = zc.buildout.easy_install.scripts(
[('check_port_listening', __name__ + 'socket_connection_attempt', 'connection_attempt')],
[('check_port_listening', 'slapos.recipe.kvm.socket_connection_attempt',
'connection_attempt')],
self.ws,
sys.executable,
self.bin_directory,
......@@ -84,11 +85,11 @@ class Recipe(BaseSlapRecipe):
self.linkBinary()
self.computer_partition.setConnectionDict(dict(
url = "https://[%s]:%s/vnc.html?host=[%s]&port=%s&encrypt=1" % (noVNC_conf['source_ip'],
noVNC_conf['source_port'],
noVNC_conf['source_ip'],
noVNC_conf['source_port']
),
url = "https://[%s]:%s/vnc_auto.html?host=[%s]&port=%s&encrypt=1" % (
noVNC_conf['source_ip'],
noVNC_conf['source_port'],
noVNC_conf['source_ip'],
noVNC_conf['source_port']),
password = kvm_conf['vnc_passwd']))
return self.path_list
......@@ -155,7 +156,8 @@ class Recipe(BaseSlapRecipe):
# Instanciate KVM
kvm_template_location = pkg_resources.resource_filename(
__name__, 'template/kvm_run.in')
__name__, os.path.join(
'template', 'kvm_run.in'))
kvm_runner_path = self.createRunningWrapper("kvm",
self.substituteTemplate(kvm_template_location,
......@@ -165,7 +167,9 @@ class Recipe(BaseSlapRecipe):
# Instanciate KVM controller
kvm_controller_template_location = pkg_resources.resource_filename(
__name__, 'template/kvm_controller_run.in')
__name__, os.path.join(
'template',
'kvm_controller_run.in' ))
kvm_controller_runner_path = self.createRunningWrapper("kvm_controller",
self.substituteTemplate(kvm_controller_template_location,
......@@ -205,34 +209,24 @@ class Recipe(BaseSlapRecipe):
"""
noVNC_conf = {}
noVNC_conf['source_ip'] = source_ip
noVNC_conf['source_port'] = source_port
# Install numpy.
# XXX-Cedric : this looks like a hack. Do we have better solution, knowing
# That websockify is not an egg?
numpy = zc.buildout.easy_install.install(['numpy'], self.options['eggs-directory'])
environment = dict(PYTHONPATH='%s' % numpy.entries[0])
# Instanciate Websockify
websockify_runner_path = zc.buildout.easy_install.scripts([('websockify',
'slapos.recipe.librecipe.execute', 'executee_wait')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
[sys.executable.strip(),
self.options['websockify_path'],
'--web',
self.options['noVNC_location'],
'--key=%s' % (self.key_path),
'--cert=%s' % (self.certificate_path),
'--ssl-only',
'%s:%s' % (source_ip, source_port),
'%s:%s' % (target_ip, target_port)],
[self.certificate_path, self.key_path],
environment]
)[0]
self.path_list.append(websockify_runner_path)
execute_arguments = [[
self.options['websockify'].strip(),
'--web',
self.options['noVNC_location'],
'--key=%s' % (self.key_path),
'--cert=%s' % (self.certificate_path),
'--ssl-only',
'%s:%s' % (source_ip, source_port),
'%s:%s' % (target_ip, target_port)],
[self.certificate_path, self.key_path]]
self.path_list.extend(zc.buildout.easy_install.scripts([('websockify',
'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws, sys.executable,
self.wrapper_directory, arguments=execute_arguments))
# Add noVNC promise
self.port_listening_promise_conf.update(hostname=noVNC_conf['source_ip'],
......
......@@ -31,8 +31,13 @@ import pkg_resources
import zc.buildout
import sys
import zc.recipe.egg
import urlparse
class BaseRecipe(BaseSlapRecipe):
def getTemplateFilename(self, template_name):
return pkg_resources.resource_filename(__name__,
'template/%s' % template_name)
def installMysqlServer(self, ip=None, port=None):
if ip is None:
ip = self.getLocalIPv4Address()
......@@ -55,8 +60,8 @@ class BaseRecipe(BaseSlapRecipe):
self._createDirectory(mysql_conf['data_directory'])
mysql_conf_path = self.createConfigurationFile("my.cnf",
self.substituteTemplate(pkg_resources.resource_filename(__name__, 'template/my.cnf.in'),
mysql_conf))
self.substituteTemplate(pkg_resources.resource_filename(__name__,
'template/my.cnf.in'), mysql_conf))
mysql_script = pkg_resources.resource_string(__name__,
'template/mysqlinit.sql.in') % mysql_conf
......@@ -122,9 +127,11 @@ class BaseRecipe(BaseSlapRecipe):
self.substituteTemplate(pkg_resources.resource_filename(__name__,
'template/apache.in'), apache_config))
self.path_list.append(config_file)
php_ini = pkg_resources.resource_filename(__name__, 'template/php.ini.in')
if self.options.has_key('php_ini'):
php_ini = os.path.join(self.options['php_ini'], 'php.ini.in')
self.path_list.append(self.createConfigurationFile('php.ini',
self.substituteTemplate(pkg_resources.resource_filename(__name__,
'template/php.ini.in'), dict(tmp_directory=self.tmp_directory))))
self.substituteTemplate(php_ini, dict(tmp_directory=self.tmp_directory))))
self.path_list.extend(zc.buildout.easy_install.scripts([(
'httpd',
__name__ + '.apache', 'runApache')], self.ws,
......@@ -148,6 +155,60 @@ class BaseRecipe(BaseSlapRecipe):
destination = os.path.join(path, file)
open(destination, 'w').write(open(template, 'r').read() % d)
def configureInstallation(self, document_root, url, mysql_conf):
"""Start process which can launch python scripts, move or remove files or
directories when installing software.
"""
if not self.options.has_key('delete') and not self.options.has_key('rename') and not\
self.options.has_key('chmod') and not self.options.has_key('script'):
return ""
delete = []
chmod = []
data = []
rename = []
rename_list = ""
argument = [self.options['lampconfigure_directory'].strip(),
"-H", mysql_conf['mysql_host'], "-P", mysql_conf['mysql_port'],
"-p", mysql_conf['mysql_password'], "-u", mysql_conf['mysql_user']]
if not self.options.has_key('file_token'):
argument = argument + ["-d", mysql_conf['mysql_database'],
"--table", self.options['table_name'].strip(), "--cond",
self.options['constraint'].strip()]
else:
argument = argument + ["-f", self.options['file_token'].strip()]
argument += ["-t", document_root]
if self.options.has_key('delete'):
delete = ["delete"]
for fname in self.options['delete'].split(','):
delete.append(fname.strip())
if self.options.has_key('rename'):
for fname in self.options['rename'].split(','):
if fname.find("=>") < 0:
old_name = fname
fname = []
fname.append(old_name)
fname.append(old_name + '-' + mysql_conf['mysql_user'])
else:
fname = fname.split("=>")
cmd = ["rename"]
if self.options.has_key('rename_chmod'):
cmd += ["--chmod", self.options['rename_chmod'].strip()]
rename.append(cmd + [fname[0].strip(), fname[1].strip()])
rename_list += fname[0] + " to " + fname[1] + " "
if self.options.has_key('chmod'):
chmod = ["chmod", self.options['mode'].strip()]
for fname in self.options['chmod'].split(','):
chmod.append(fname.strip())
if self.options.has_key('script') and \
self.options['script'].strip().endswith(".py"):
data = ["run", self.options['script'].strip(), "-v", mysql_conf['mysql_database'], url, document_root]
self.path_list.extend(zc.buildout.easy_install.scripts(
[('configureInstall', __name__ + '.runner', 'executeRunner')], self.ws,
sys.executable, self.wrapper_directory, arguments=[argument, delete, rename,
chmod, data]))
return rename_list
class Static(BaseRecipe):
def _install(self):
self.path_list = []
......@@ -166,12 +227,17 @@ class Simple(BaseRecipe):
self.createHtdocs(self.options['source'].strip(), document_root)
mysql_conf = self.installMysqlServer()
url = self.installApache(document_root)
self.setConnectionDict(dict(
url=url,
renamed = self.configureInstallation(document_root, url, mysql_conf)
connectionDict = dict(
url=url,
**mysql_conf
))
self.createConfiguration(self.options['template'], document_root,
self.options['configuration'], mysql_conf)
)
if not renamed == "":
connectionDict['rename'] = renamed
self.setConnectionDict(connectionDict)
if self.options.has_key('template') and self.options.has_key('configuration'):
self.createConfiguration(self.options['template'], document_root,
self.options['configuration'], mysql_conf)
return self.path_list
class Request(BaseRecipe):
......@@ -179,28 +245,60 @@ class Request(BaseRecipe):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
software_type = self.parameter_dict['slap_software_type']
if software_type == 'RootSoftwareInstance':
document_root = self.createDataDirectory('htdocs')
self.createHtdocs(self.options['source'].strip(), document_root)
mysql = self.request(self.software_release_url, 'MySQL Server', 'mysql')
mysql_conf = dict(
mysql_host=mysql.getConnectionParameter('mysql_host'),
mysql_port=mysql.getConnectionParameter('mysql_port'),
mysql_user=mysql.getConnectionParameter('mysql_user'),
mysql_password=mysql.getConnectionParameter('mysql_password'),
mysql_database=mysql.getConnectionParameter('mysql_database'),
)
url = self.installApache(document_root)
self.setConnectionDict(dict(
url=url,
))
self.createConfiguration(self.options['template'], document_root,
self.options['configuration'], mysql_conf)
elif software_type == 'MySQL Server':
mysql_conf = self.installMysqlServer()
self.setConnectionDict(dict(
**mysql_conf
))
document_root = self.createDataDirectory('htdocs')
self.createHtdocs(self.options['source'].strip(), document_root)
if software_type == 'Backuped':
davstorage = self.request(self.options['davstorage-software-url'],
software_type, 'Backup Server').getConnectionParameter('url')
parameters = {'remote_backup': davstorage}
elif software_type == 'PersonnalBackup':
parameters = {'remote_backup': self.parameter_dict['remote_backup']}
else:
raise zc.buildout.UserError('Uknown software type %r' % software_type)
parameters = {}
mysql = self.request(self.options['mariadb-software-url'],
software_type, 'MariaDB Server', partition_parameter_kw=parameters
).getConnectionParameter('url')
mysql_parsed = urlparse.urlparse(mysql)
mysql_host, mysql_port = mysql_parsed.hostname, mysql_parsed.port
if mysql_parsed.scheme == 'mysqls': # Listen over stunnel
mysql_host, mysql_port = self.installStunnelClient(mysql_host,
mysql_port)
mysql_conf = dict(mysql_database=mysql_parsed.path.strip('/'),
mysql_user=mysql_parsed.username,
mysql_password=mysql_parsed.password,
mysql_host='%s:%s' % (mysql_host,mysql_port))
url = self.installApache(document_root)
self.setConnectionDict(dict(
url=url,
))
self.createConfiguration(self.options['template'], document_root,
self.options['configuration'], mysql_conf)
return self.path_list
def installStunnelClient(self, remote_host, remote_port):
local_host = self.getLocalIPv4Address()
local_port = 8888
stunnel_conf_path = self.createConfigurationFile('stunnel.conf',
self.substituteTemplate(
self.getTemplateFilename('stunnel.conf.in'), {
'log': os.path.join(self.log_directory, 'stunnel.log'),
'pid_file': os.path.join(self.run_directory, 'stunnel.pid'),
'remote_host': remote_host, 'remote_port': remote_port,
'local_host': local_host, 'local_port': local_port,
}))
wrapper = zc.buildout.easy_install.scripts([('stunnel',
'slapos.recipe.librecipe.execute', 'execute')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
self.options['stunnel_binary'].strip(), stunnel_conf_path]
)[0]
self.path_list.append(wrapper)
return (local_host, local_port,)
import sys
import subprocess
def executeRunner(args):
"""Start the instance configure. this may run a python script, move or/and rename
file or directory when dondition is filled. the condition may be when file exist or when an entry
exist into database.
"""
arguments, delete, rename, chmod, data = args
if delete != []:
print "Calling lampconfigure with 'delete' arguments"
result = subprocess.Popen(arguments + delete)
result.wait()
if rename != []:
for parameters in rename:
print "Calling lampconfigure with 'rename' arguments"
result = subprocess.Popen(arguments + parameters)
result.wait()
if chmod != []:
print "Calling lampconfigure with 'chmod' arguments"
result = subprocess.Popen(arguments + chmod)
result.wait()
if data != []:
print "Calling lampconfigure with 'run' arguments"
result = subprocess.Popen(arguments + data)
result.wait()
return
......@@ -53,3 +53,6 @@ LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
LoadModule alias_module modules/mod_alias.so
LoadModule env_module modules/mod_env.so
LoadModule autoindex_module modules/mod_autoindex.so
......@@ -2,13 +2,17 @@
engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL | E_STRICT
display_errors = Off
error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING)
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
session.save_path = "%(tmp_directory)s"
session.auto_start = 1
date.timezone = Europe/Paris
\ No newline at end of file
session.auto_start = 0
date.timezone = Europe/Paris
file_uploads = On
upload_max_filesize = 16M
post_max_size = 16M
magic_quotes_gpc=Off
This diff is collapsed.
This diff is collapsed.
......@@ -23,6 +23,8 @@ def execute_wait(args):
ready = False
if ready:
break
# XXX: It's the same as ../ca/certificate_authoritiy.py
# We should use pyinotify as well. Or select() on socket.
time.sleep(sleep)
os.execv(exec_list[0], exec_list + sys.argv[1:])
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment