Commit 8df960c7 authored by Łukasz Nowak's avatar Łukasz Nowak

Implement site.zcml and include deadlockdebugger.

Current configuration was not using site.zcml, now it is fetched from

Provide simple way of package activation.

Install z3c.deadlockdebugger with required dependency and activate it if
parent 49bbf182
......@@ -29,6 +29,7 @@ setup(
namespace_packages = ['slapos', 'slapos.recipe'],
entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
......@@ -465,8 +465,11 @@ class Recipe(BaseSlapRecipe):
self._createDirectory(os.path.join(self.erp5_directory, directory))
self._createDirectory(os.path.join(self.erp5_directory, 'etc',
return user, password
def installERP5Site(self, user, password, zope_access, mysql_conf,
......@@ -614,12 +617,21 @@ class Recipe(BaseSlapRecipe):
return dict(host=ip, port=port)
def installZope(self, ip, port, name, zodb_configuration_string,
with_timerservice=False, tidstorage_config=None, thread_amount=1):
with_timerservice=False, tidstorage_config=None, thread_amount=1,
# Create zope configuration file
zope_config = dict(
# configure default Zope2 zcml
open(os.path.join(self.erp5_directory, 'etc', 'site.zcml'), 'w').write(
pkg_resources.resource_string('Zope2', 'utilities/skel/etc/site.zcml'))
if with_deadlockdebugger:
open(os.path.join(self.erp5_directory, 'etc', 'package-includes', 'deadlockdebugger-configure.zcml'), 'w').write('''<configure>
<include package="zope.applicationcontrol"/>
<include package="z3c.deadlockdebugger"/>
zope_config['zodb_configuration_string'] = zodb_configuration_string
zope_config['instance'] = self.erp5_directory
zope_config['event_log'] = os.path.join(self.log_directory,
......@@ -331,6 +331,9 @@ eggs =
# Products.PortalTransforms
# Dependency for our fork of PortalTransforms
# replacement of DeadlockDebugger
# parameterizing the version of the generated python interpreter name by the
# python section version causes dependency between this egg section and the
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