Commit da2381e5 authored by Łukasz Nowak's avatar Łukasz Nowak

Merge branch 'master' into slapos

parents 293bd5d3 19ec1b8c
Changes
=======
0.17 (unreleased)
0.19 (Unreleased)
-----------------
* No changes yet.
* No change yet.
0.18 (2011-08-25)
-----------------
* Repackage egg to include needed .bin files.
0.17 (2011-08-25)
-----------------
* Add XWiki software release [Cedric de Saint Martin]
0.16 (2011-07-15)
-----------------
......
include CHANGES.txt
include slapos/recipe/erp5/template/site.zcml
recursive-include slapos/recipe *.in
recursive-include slapos/recipe *.bin
recursive-include slapos/recipe README.*.txt
......@@ -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.19.tar.bz2
md5sum = 832f96a6ec4b8fc7cf49b9efd4e89060
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56
configure-options = --enable-authn-alias
--enable-bucketeer
--enable-cache
......@@ -41,6 +41,7 @@ configure-options = --enable-authn-alias
--enable-proxy-http
--enable-proxy-scgi
--enable-so
--enable-dav
--disable-ssl
--with-included-apr
--with-z=${zlib:location}
......@@ -65,8 +66,8 @@ configure-options = --enable-authn-alias
[apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.19.tar.bz2
md5sum = 832f96a6ec4b8fc7cf49b9efd4e89060
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.20.tar.bz2
md5sum = 1ac251431c8c4285f6b085c1d156bb56
configure-options = --disable-static
--enable-authn-alias
--enable-bucketeer
......@@ -90,6 +91,7 @@ configure-options = --disable-static
--enable-proxy-ftp
--enable-proxy-http
--enable-proxy-scgi
--enable-dav
--enable-so
--enable-ssl
--with-included-apr
......
[buildout]
parts =
java
[java]
recipe = slapos.recipe.build
slapos_promisee =
directory:bin
directory:lib
directory:man
directory:plugin
directory:javaws
file:lib/rt.jar
file:bin/java
x86 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=52240 0bd27d325c5ce11ce863d982ad052f7f
x86-64 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=52242 a4d929bc4d6511290c07c3745477b77b
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([auto_extract_bin])
self.cleanup_dir_list.append(extract_dir)
workdir = guessworkdir(extract_dir)
self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s")
From 700c7896b832d6e4fb0185f0d5382b01f94e7141 Mon Sep 17 00:00:00 2001
From: Alan Hourihane <alanh@vmware.com>
Date: Fri, 25 Feb 2011 11:05:27 +0000
Subject: Add _X_HIDDEN to xgeExtRegister to fix build problems on 64bit
---
diff --git a/src/Xge.c b/src/Xge.c
index 0655e00..d28a4f0 100644
--- a/src/Xge.c
+++ b/src/Xge.c
@@ -292,7 +292,7 @@ _xgeEventToWire(Display* dpy, XEvent* re, xEvent* event)
* Extensions need to register callbacks for their events.
*/
Bool
-xgeExtRegister(Display* dpy, int offset, XExtensionHooks* callbacks)
+_X_HIDDEN xgeExtRegister(Display* dpy, int offset, XExtensionHooks* callbacks)
{
XGEExtNode* newExt;
XGEData* xge_data;
--
cgit v0.8.3-6-g21f6
......@@ -114,7 +114,8 @@ patch-options = -p1
[libXext-patch-link-error]
# Fixes libXext.la link error
recipe = hexagonit.recipe.download
url = http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
#url = http://cgit.freedesktop.org/xorg/lib/libXext/patch/?id=700c7896b832d6e4fb0185f0d5382b01f94e7141
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = 700c7896b832d6e4fb0185f0d5382b01f94e7141.patch
md5sum = 52635ef694ee6f1acb642a77ee8eb010
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.17-dev'
version = '0.19-dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......
java
====
This recipe downloads and installs java in your buildout.
Buildout configuration:
-----------------------
Add this section to your buildout configuration::
[buildout]
parts =
... your other parts ...
java
...
[java]
recipe = slapos.cookbook:java
By default it will fetch Java 6u25, but you might want to install from another location or another version like this::
[java]
recipe = slapos.cookbook:java
download-url = ftp://location/to/self-extracting/java.bin
Or you can install openjdk instead.
[java]
recipe = slapos.cookbook:java
flavour = openjdk
Notes:
------
This recipe only works with linux at the moment
This recipe requires rpm2cpio and cpio to be installed on your system.
Authors:
--------
Original author: Cedric de Saint Martin - cedric.dsm [ at ] tiolive [ dot ] com
Inspired by : z3c.recipe.openoffice made by Jean-Francois Roche - jfroche@affinitic.be
import logging
import os
import shutil
import zc.buildout.easy_install
import zc.buildout.download
from platform import uname
import subprocess
JAVA_URLS = {
'x86': "http://javadl.sun.com/webapps/download/AutoDL?BundleId=48334",
'x86-64': "http://javadl.sun.com/webapps/download/AutoDL?BundleId=48338"
}
# See http://java.com/en/download/manual.jsp
ARCH_MAP = {
'i386': 'x86',
'i586': 'x86',
'i686': 'x86',
'x86_64': 'x86-64'
}
ARCH_DIR_MAP = {
'x86':'x86',
'x86-64': 'x86_64'
}
class Recipe(object):
def __init__(self, buildout, name, options):
self.buildout = buildout
self.name = name
self.options = options
self.logger = logging.getLogger(self.name)
options['location'] = os.path.join(
buildout['buildout']['parts-directory'],
self.name)
options.setdefault('cpio', 'cpio')
options.setdefault('tmp-storage', options['location'] + '__unpack__')
if not options.get('download-url'):
options.setdefault('platform', self._guessPackagePlatform())
options.setdefault(
'flavour',
'oracle-jdk') # or 'openjdk'
if options['flavour'] == 'openjdk':
raise Exception('OpenJDK is not yet supported.')
else:
options['download-url'] = JAVA_URLS[options['platform']]
def _guessPackagePlatform(self):
arch = uname()[-2]
target = ARCH_MAP.get(arch)
assert target, 'Unknown architecture'
return target
def install(self):
location = self.options['location']
if os.path.exists(location):
return location
storage = self.options['tmp-storage']
download_file, is_temp = self.download()
self.extract(storage, download_file)
self.copy(storage)
shutil.rmtree(storage)
return [location,]
def download(self):
"""Download tarball. Caching if required.
"""
url = self.options['download-url']
namespace = self.options['recipe']
download = zc.buildout.download.Download(self.buildout['buildout'],
namespace=namespace,
logger=self.logger)
return download(url)
def extract(self, storage, download_file):
# Creates parts/java__something temp dir
if os.path.exists(storage):
shutil.rmtree(storage)
os.mkdir(storage)
os.chdir(storage)
# Move downloaded file into temp dir
(download_dir, filename) = os.path.split(download_file)
auto_extract_bin = os.path.join(storage, filename)
shutil.move(download_file, auto_extract_bin)
# Run auto-extract bin file
os.chmod(auto_extract_bin, 0777)
subprocess.call([auto_extract_bin])
def copy(self, storage):
"""Copy java installation into parts directory.
"""
location = self.options['location']
if os.path.exists(location):
self.logger.info('No need to re-install java part')
return False
self.logger.info("Copying unpacked contents")
java_dir = ''
for java_dir in ('java', 'jre1.6.0_25'):
if os.path.isdir(os.path.join(storage, java_dir)):
break
assert java_dir, 'Java directory seems missing.'
ignore_dir_list = []
if 'ignore' in shutil.copytree.func_code.co_varnames:
shutil.copytree(os.path.join(storage, java_dir),
location,
ignore=lambda src,names:ignore_dir_list)
else:
shutil.copytree(os.path.join(storage, java_dir),
location)
for ignore_dir in ignore_dir_list:
ignore_dir = os.path.join(location, ignore_dir)
if os.path.exists(ignore_dir):
shutil.rmtree(ignore_dir)
return True
def update(self):
pass
......@@ -35,11 +35,12 @@ import zc.buildout
class Recipe(BaseSlapRecipe):
def _install(self):
self.requirements, self.ws = self.egg.working_set()
parameter_dict = self.computer_partition.getInstanceParameterDict()
ipv4 = self.getLocalIPv4Address(parameter_dict)
ipv6 = self.getGlobalIPv6Address(parameter_dict)
ipv4 = self.getLocalIPv4Address()
ipv6 = self.getGlobalIPv6Address()
self.install_mysql_server_configuration(self.getLocalIPv4Address(parameter_dict))
self.install_mysql_server_configuration(ipv4)
port = '8900'
tomcat_home = os.path.join(self.data_root_directory, 'tomcat')
......@@ -56,8 +57,8 @@ class Recipe(BaseSlapRecipe):
shtuil.rmtree(dst)
raise
shutil.copy(self.options['hsql_location'].strip(), os.path.join(tomcat_lib,
'hsqldb.jar'))
shutil.copy(self.options['jdbc_location'].strip(), os.path.join(tomcat_lib,
'jdbc.jar'))
# headless mode
self._writeFile(os.path.join(tomcat_home, 'bin', 'setenv.sh'), '''#!/bin/sh
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
......
......@@ -49,7 +49,7 @@
Uncomment if you want to use MySQL and comment out other database configurations.
We need to set the sql_mode to a less strict value, see XWIKI-1945
-->
<property name="connection.url">jdbc:mysql://%(mysql_ip)s:%(mysql_port)s/xwiki?useServerPrepStmts=false&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</property>
<property name="connection.url">jdbc:mysql://%(mysql_ip)s:%(mysql_port)s/xwiki?useServerPrepStmts=false&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;sessionVariables=&amp;sql_mode=''</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
......
......@@ -30,9 +30,6 @@ query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Disable Federated by default
skip-federated
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
......
......@@ -81,3 +81,9 @@ plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
# XXX: Very dirty workaround
# XXX: Pin slapos.libnetworkcache, as version higher than 0.3 depends on
# XXX: M2Crypto which installation is not defined yet
# XXX: Note, that slapos.libnetworkcache is buildout "internal" dependency
slapos.libnetworkcache = 0.3
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
jdbc_location = ${jdbc:location}/mysql-connector-java-5.1.17/mysql-connector-java-5.1.17-bin.jar
tomcat_location = ${tomcat:location}
xwiki_location = ${xwiki:location}
java_home = ${java:location}
mysqld_binary = ${mysql-5.1:location}/libexec/mysqld
mysql_binary = ${mysql-5.1:location}/bin/mysql
mysql_install_binary = ${mysql-5.1:location}/bin/mysql_install_db
[buildout]
extends =
../../stack/tomcat.cfg
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
[instance-recipe]
egg = slapos.cookbook
module = xwiki
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = dbdc297502f0258c85fe7dfbddc8e501
output = ${buildout:directory}/template.cfg
mode = 0644
[xwiki]
recipe = hexagonit.recipe.download
url = http://download.forge.objectweb.org/xwiki/xwiki-enterprise-web-2.7.war
md5sum = c56e2cde96d28c5899a16a8270b6ff88
[versions]
slapos.cookbook = 0.18
# Required by slapos.cookbook==0.18
slapos.core = 0.13
slapos.libnetworkcache = 0.2
collective.recipe.template = 1.8
netaddr = 0.7.5
xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88846
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
\ No newline at end of file
......@@ -400,6 +400,12 @@ scripts =
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005
# XXX: Very dirty workaround
# XXX: Pin slapos.libnetworkcache, as version higher than 0.3 depends on
# XXX: M2Crypto which installation is not defined yet
# XXX: Note, that slapos.libnetworkcache is buildout "internal" dependency
slapos.libnetworkcache = 0.3
# pin Acquisition and Products.DCWorkflow to Nexedi flavour of eggs
Acquisition = 2.13.7nxd001
Products.DCWorkflow = 2.2.3nxd002
......
[buildout]
extends =
../component/lxml-python/buildout.cfg
../component/java/buildout.cfg
../component/mysql-5.1/buildout.cfg
../component/python-2.7/buildout.cfg
../stack/shacache-client.cfg
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
parts =
template
libxslt
eggs
instance-recipe-egg
tomcat
java
hsql
jdbc
mysql-5.1
[hsql]
recipe = hexagonit.recipe.download
url = http://hsqldb.org/support/hsqldb_16.zip
md5sum = 34cac21d39bca03846a5382cef809104
[jdbc]
recipe = hexagonit.recipe.download
url = http://download.softagency.net/mysql/Downloads/Connector-J/mysql-connector-java-5.1.17.zip
md5sum = 22e1aff6104bb9006f8744a02bf73124
[tomcat]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = http://apache.multidist.com/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip
md5sum = 082a0707985b6c029920d4d6d5ec11cd
[eggs]
recipe = zc.recipe.egg
python = python2.7
eggs =
${lxml-python:egg}
slapos.cookbook
\ No newline at end of file
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