Commit 9b3be87f authored by Łukasz Nowak's avatar Łukasz Nowak

- reorganise internal structure

Put software and instance profiles in grouped directories.
Cleanup official.cfg extends.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32608 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d7619557
......@@ -17,22 +17,22 @@ mysql_cnf_file = ${buildout:etc-directory}/my.cnf
[mysql-bin]
recipe = collective.recipe.template
input = ${buildout:directory}/mysql-instance/templates/mysql.in
input = ${buildout:directory}/templates/mysql.in
output = ${buildout:data-bin-directory}/mysql
[mysql-admin]
recipe = collective.recipe.template
input = ${buildout:directory}/mysql-instance/templates/mysqladmin.in
input = ${buildout:directory}/templates/mysqladmin.in
output = ${buildout:data-bin-directory}/mysqladmin
[mysqld_safe-bin]
recipe = collective.recipe.template
input = ${buildout:directory}/mysql-instance/templates/mysqld_safe.in
input = ${buildout:directory}/templates/mysqld_safe.in
output = ${buildout:data-bin-directory}/mysqld_safe
[mysql-cnf]
recipe = collective.recipe.template
input = ${buildout:directory}/mysql-instance/templates/my.cnf.in
input = ${buildout:directory}/templates/my.cnf.in
output = ${configuration:mysql_cnf_file}
[mysql-instance]
......
[buildout]
extends =
profiles/versions.cfg
erp5-software/buildout.cfg
zope-instance/buildout.cfg
software-profiles/erp5.cfg
instance-profiles/zope.cfg
parts =
cmf15
......
This diff is collapsed.
Introduction
============
This is a buildout to create instance for MySQL Tritonn
Usage
=======
Afterwards, type:
$ bin/supervisord -e debug -n
If everything looks good:
$ bin/supervisord
Configure
=========
You can change the default ports by editing buildout.cfg:
[ports]
supervisor = 9001
mysql = 3306
Then rerun buildout:
$ bin/buildout
This diff is collapsed.
Introduction
============
This is a buildout to compile MySQL with Senna
[buildout]
extends =
profiles/versions.cfg
apache/buildout.cfg
erp5-software/buildout.cfg
haproxy/buildout.cfg
mysql-tritonn-5.0/buildout.cfg
mysql-instance/buildout.cfg
oood/buildout.cfg
imagemagick/buildout.cfg
openoffice-bin/buildout.cfg
python-2.4/buildout.cfg
varnish/buildout.cfg
zope-2.8/buildout.cfg
zope-instance/buildout.cfg
software-profiles/apache.cfg
software-profiles/erp5.cfg
software-profiles/haproxy.cfg
software-profiles/mysql-tritonn-5.0.cfg
software-profiles/openoffice-bin.cfg
software-profiles/oood.cfg
software-profiles/imagemagick.cfg
software-profiles/python-2.4.cfg
software-profiles/varnish.cfg
software-profiles/zope-2.8.cfg
var-directory = ${:directory}/var
etc-directory = ${:var-directory}/etc
......
......@@ -22,8 +22,8 @@ download-only = true
[mysql-tritonn-5.0]
recipe = hexagonit.recipe.cmmi
url = http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.87.tar.gz
pre-configure-hook = ${buildout:directory}/mysql-tritonn-5.0/src/mysql_hooks.py:pre_configure_hook
post-make-hook = ${buildout:directory}/mysql-tritonn-5.0/src/mysql_hooks.py:post_make_hook
pre-configure-hook = ${buildout:directory}/hooks/mysql-tritonn-hooks.py:pre_configure_hook
post-make-hook = ${buildout:directory}/hooks/mysql-tritonn-hooks.py:post_make_hook
# configure: how to avoid searching for my.cnf?
# - like in mysql part in http://svn.zope.org/zodbshootout/trunk/buildout.cfg?view=markup
configure-options =
......
diff -urN Zope-2.8.0-final.orig/lib/python/Acquisition/_Acquisition.c Zope-2.8.0-final/lib/python/Acquisition/_Acquisition.c
--- Zope-2.8.0-final.orig/lib/python/Acquisition/_Acquisition.c 2005-06-11 08:24:02.000000000 +0200
+++ Zope-2.8.0-final/lib/python/Acquisition/_Acquisition.c 2005-06-17 16:26:00.742556205 +0200
@@ -410,6 +410,64 @@
int explicit, int containment);
static PyObject *
+Wrapper_GetAttr(PyObject *self, PyObject *attr_name, PyObject *orig)
+{
+ /* This function retrieves an attribute from an object by PyObject_GetAttr.
+
+ The main difference between Wrapper_GetAttr and PyObject_GetAttr is that
+ Wrapper_GetAttr calls _aq_dynamic to generate an attribute dynamically, if
+ the attribute is not found.
+ */
+ PyObject *r, *v, *tb;
+ PyObject *d, *m;
+ PyObject *o;
+
+ if (isWrapper (self))
+ o = WRAPPER(self)->obj;
+ else
+ o = self;
+
+ /* Try to get an attribute in the normal way first. */
+ r = PyObject_GetAttr(o, attr_name);
+ if (r)
+ return r;
+
+ /* If an unexpected error happens, return immediately. */
+ PyErr_Fetch(&r,&v,&tb);
+ if (r != PyExc_AttributeError)
+ {
+ PyErr_Restore(r,v,tb);
+ return NULL;
+ }
+
+ /* Try to get _aq_dynamic. */
+ m = PyObject_GetAttrString(o, "_aq_dynamic");
+ if (! m) {
+ PyErr_Restore(r,v,tb);
+ return NULL;
+ }
+
+ /* Call _aq_dynamic in the context of the original acquisition wrapper. */
+ if (PyECMethod_Check(m) && PyECMethod_Self(m)==o)
+ ASSIGN(m,PyECMethod_New(m,OBJECT(self)));
+ else if (has__of__(m)) ASSIGN(m,__of__(m,OBJECT(self)));
+ d = PyObject_CallFunction(m, "O", attr_name);
+ Py_DECREF(m);
+
+ /* In the case of None, assume that the attribute is not found. */
+ if (d == Py_None) {
+ Py_DECREF(d);
+ PyErr_Restore(r,v,tb);
+ return NULL;
+ }
+
+ Py_XDECREF(r);
+ Py_XDECREF(v);
+ Py_XDECREF(tb);
+ return d;
+}
+
+static PyObject *
Wrapper_findattr(Wrapper *self, PyObject *oname,
PyObject *filter, PyObject *extra, PyObject *orig,
int sob, int sco, int explicit, int containment)
@@ -476,7 +534,7 @@
Py_XDECREF(r); Py_XDECREF(v); Py_XDECREF(tb);
r=NULL;
}
- else if ((r=PyObject_GetAttr(self->obj,oname)))
+ else if ((r=Wrapper_GetAttr(OBJECT(self),oname,orig)))
{
if (r==Acquired)
{
@@ -550,7 +608,7 @@
}
else
{
- if ((r=PyObject_GetAttr(self->container,oname))) {
+ if ((r=Wrapper_GetAttr(self->container,oname,orig))) {
if (r == Acquired) {
Py_DECREF(r);
}
@@ -587,7 +645,7 @@
Wrapper_getattro(Wrapper *self, PyObject *oname)
{
if (self->obj || self->container)
- return Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 1, 0, 0);
+ return Wrapper_findattr(self, oname, NULL, NULL, OBJECT(self), 1, 1, 0, 0);
/* Maybe we are getting initialized? */
return Py_FindAttr(OBJECT(self),oname);
@@ -604,7 +662,7 @@
return Py_FindAttr(OBJECT(self),oname);
if (self->obj || self->container)
- return Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 0, 0, 0);
+ return Wrapper_findattr(self, oname, NULL, NULL, OBJECT(self), 1, 0, 0, 0);
/* Maybe we are getting initialized? */
return Py_FindAttr(OBJECT(self),oname);
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