moinsetup

Change of moinsetup.py

62:d51fbd8f05ca
moinsetup.py
     1.1 --- a/moinsetup.py	Tue Jul 10 22:59:25 2012 +0200
     1.2 +++ b/moinsetup.py	Fri Jul 13 21:39:20 2012 +0200
     1.3 @@ -52,11 +52,11 @@
     1.4  
     1.5  # Templates for Apache site definitions.
     1.6  
     1.7 -apache_site = """
     1.8 +apache_site = """\
     1.9  ScriptAlias %(url_path)s "%(web_app_dir)s/moin.cgi"
    1.10  """
    1.11  
    1.12 -apache_site_extra = """
    1.13 +apache_site_extra = """\
    1.14  Alias %(static_url_resources_path)s "%(htdocs_dir)s/"
    1.15  """
    1.16  
    1.17 @@ -76,7 +76,7 @@
    1.18  # Such a directive is not desirable where the static and dynamic resources are
    1.19  # in different places, however.
    1.20  
    1.21 -apache_htaccess_combined_mod_rewrite = """
    1.22 +apache_htaccess_combined_mod_rewrite = """\
    1.23  DirectoryIndex %(url_path)s/moin.cgi/
    1.24  RewriteEngine On
    1.25  RewriteBase %(final_url_path)s
    1.26 @@ -87,12 +87,16 @@
    1.27  
    1.28  # Post-setup templates.
    1.29  
    1.30 -postsetup_setfacl = """#!/bin/sh
    1.31 +postsetup_setfacl = """\
    1.32 +#!/bin/sh
    1.33  
    1.34  find '%(common_dir)s/data' -type f | xargs setfacl -m u:%(web_user)s:rw
    1.35  find '%(common_dir)s/data' -type d | xargs setfacl -m u:%(web_user)s:rwx
    1.36  find '%(common_dir)s/underlay' -type f | xargs setfacl -m u:%(web_user)s:rw
    1.37  find '%(common_dir)s/underlay' -type d | xargs setfacl -m u:%(web_user)s:rwx
    1.38 +if [ -e "%(common_dir)s/wikiconfig.py" ]; then
    1.39 +    setfacl -m u:%(web_user)s:r '%(common_dir)s/wikiconfig.py'
    1.40 +fi
    1.41  """
    1.42  
    1.43  postsetup_setfacl_extra = """
    1.44 @@ -106,12 +110,17 @@
    1.45  fi
    1.46  """
    1.47  
    1.48 -postsetup_chown_chmod = """#!/bin/sh
    1.49 +postsetup_chown_chmod = """\
    1.50 +#!/bin/sh
    1.51  
    1.52  chown -R %(this_user)s.%(web_group)s '%(common_dir)s/data'
    1.53  chown -R %(this_user)s.%(web_group)s '%(common_dir)s/underlay'
    1.54  chmod -R g+w '%(common_dir)s/data'
    1.55  chmod -R g+w '%(common_dir)s/underlay'
    1.56 +if [ -e "%(common_dir)s/wikiconfig.py" ]; then
    1.57 +    chown %(this_user)s.%(web_group)s '%(common_dir)s/wikiconfig.py'
    1.58 +    chmod g+r '%(common_dir)s/wikiconfig.py'
    1.59 +fi
    1.60  """
    1.61  
    1.62  postsetup_chown_extra = """
    1.63 @@ -369,8 +378,10 @@
    1.64      theme_master = "modernized"
    1.65      extra_theme_css_files = ["SlideShow.css"]
    1.66  
    1.67 -    def __init__(self, moin_distribution=None, prefix=None,
    1.68 -        site_packages=None, web_app_dir=None, web_static_dir=None, web_site_dir=None,
    1.69 +    def __init__(self,
    1.70 +        moin_distribution=None,
    1.71 +        prefix=None, site_packages=None,
    1.72 +        web_app_dir=None, web_static_dir=None, web_site_dir=None,
    1.73          common_dir=None, farm_config=None, site_config=None,
    1.74          url_path=None, static_url_path=None,
    1.75          superuser=None, site_name=None, site_identifier=None, front_page_name=None,