Commit 9951bf26 authored by Sebastien Robin's avatar Sebastien Robin

erp5: define INSTANCE_HOME for zopes to allow defining emergency user if needed

When looking for emergency user, zope configuration is not fully loaded
yet, thus if we do not set INSTANCE_HOME at startup, it will be wrong.
With this change, setting an "access" file under erp5shared folder will
work properly

In the same time, fix HOME folder to not be in a tmp folder
parent 498ccf94
......@@ -105,10 +105,13 @@ class Recipe(GenericBaseRecipe):
zope_environment = {
'TMP': self.options['tmp-path'],
'TMPDIR': self.options['tmp-path'],
'HOME': self.options['tmp-path'],
'HOME': self.options.get('home-path', self.options.get('tmp-path')),
'PATH': self.options['bin-path'],
'TZ': self.options['timezone'],
}
instance_home = self.options.get("instancehome-path", None)
if instance_home:
zope_environment["INSTANCE_HOME"] = instance_home
# longrequestlogger product which requires environment settings
longrequest_logger_file = self.options.get('longrequest-logger-file', None)
......
......@@ -318,7 +318,7 @@ md5sum = 9670cf63099e2c520017a23defff51a4
[template-zope]
<= download-base
filename = instance-zope.cfg.in
md5sum = 995257c4d08365db7ac0d1b40936ef8b
md5sum = 44c4aa068cffe2c1d8320d59e6d1c499
link-binary =
${aspell:location}/bin/aspell
${dmtx-utils:location}/bin/dmtxwrite
......
......@@ -182,6 +182,8 @@ user = {{ dumps(slapparameter_dict['inituser-login']) }}
password = {{ dumps(slapparameter_dict['inituser-password']) }}
timezone = {{ dumps(slapparameter_dict['timezone']) }}
tmp-path = ${directory:tmp}
instancehome-path = ${directory:instance}
home-path = ${buildout:directory}
bin-path = ${directory:bin}:{{ parameter_dict['coreutils'] }}/bin
site-zcml = ${directory:instance-etc}/site.zcml
runzope-binary = ${preload-userhosts-runzope:rendered}
......
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