Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plone_zope_conf_additional is not indented properly #135

Open
fulv opened this issue Feb 20, 2020 · 1 comment
Open

plone_zope_conf_additional is not indented properly #135

fulv opened this issue Feb 20, 2020 · 1 comment

Comments

@fulv
Copy link
Member

fulv commented Feb 20, 2020

If you specify a multi-line plone_zope_conf_additional value, it gets expanded in the buildout cfg without proper indentation. For example:

local-configure.yml:
...............................

plone_zope_conf_additional: |
    <product-config beaker>
        session.type        file
        session.data_dir  ${buildout:var-dir}/sessions/data
        session.lock_dir  ${buildout:var-dir}/sessions/lock
        session.key        beaker.session
        session.secret    somesecret
    </product-config>

The resulting buildout file looks like this:

[client1]
....
zope-conf-additional =
    <product-config beaker>
session.type        file
session.data_dir  ${buildout:var-dir}/sessions/data
session.lock_dir  ${buildout:var-dir}/sessions/lock
session.key        beaker.session
session.secret    somesecret
</product-config>

which causes this error:

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/usr/local/plone-5.1/zeoserver/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1994, in main
    user_defaults, command, args)
  File "/usr/local/plone-5.1/zeoserver/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 231, in __init__
    data['buildout'].copy(), override, set()))
  File "/usr/local/plone-5.1/zeoserver/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1608, in _open
    fp, filename_for_logging, _default_globals)
  File "/usr/local/plone-5.1/zeoserver/local/lib/python2.7/site-packages/zc/buildout/configparser.py", line 234, in parse
    raise e
ParsingError: File contains parsing errors: /usr/local/plone-5.1/zeoserver/live.cfg
        [line 180]: 'session.type            file\n'
        [line 181]: 'session.data_dir        ${buildout:var-dir}/sessions/data\n'
        [line 182]: 'session.lock_dir        ${buildout:var-dir}/sessions/lock\n'
        [line 183]: 'session.key             beaker.session\n'
        [line 184]: 'session.secret          somesecret\n'
        [line 185]: '</product-config>\n'
        [line 197]: 'session.type            file\n'
        [line 198]: 'session.data_dir        ${buildout:var-dir}/sessions/data\n'
        [line 199]: 'session.lock_dir        ${buildout:var-dir}/sessions/lock\n'
        [line 200]: 'session.key             beaker.session\n'
        [line 201]: 'session.secret          somesecret\n'
        [line 202]: '</product-config>\n'
@fulv
Copy link
Member Author

fulv commented Feb 20, 2020

fulv added a commit to plone/ansible.plone_server that referenced this issue May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant