# HG changeset patch # User Paul Boddie # Date 1342208360 -7200 # Node ID d51fbd8f05ca60fa8828b6bee5c98132be5669cc # Parent 7ff0c8163da5494c120380991bbd699e37f435e7 Added support for changing the ownership/permissions of wikiconfig.py in the post-installation scripts. Removed leading newlines from the output files. Improved the farm_config and site_config descriptions. diff -r 7ff0c8163da5 -r d51fbd8f05ca README.txt --- a/README.txt Tue Jul 10 22:59:25 2012 +0200 +++ b/README.txt Fri Jul 13 21:39:20 2012 +0200 @@ -126,11 +126,13 @@ farm_config A specific Wiki farm configuration file for multiple Wiki deployments. This overrides the 'common_dir' setting if used, indicating that a Wiki farm configuration must be - edited when configuring a Wiki. + edited when configuring a Wiki, and must refer to an + actual file, not merely a directory. site_config A specific configuration file location for a Wiki deployed within a Wiki farm. This overrides the 'common_dir' setting - if used. + if used, and must refer to an actual file, not merely a + directory. url_path The URL path (after the host details) of the Wiki. diff -r 7ff0c8163da5 -r d51fbd8f05ca moinsetup.py --- a/moinsetup.py Tue Jul 10 22:59:25 2012 +0200 +++ b/moinsetup.py Fri Jul 13 21:39:20 2012 +0200 @@ -52,11 +52,11 @@ # Templates for Apache site definitions. -apache_site = """ +apache_site = """\ ScriptAlias %(url_path)s "%(web_app_dir)s/moin.cgi" """ -apache_site_extra = """ +apache_site_extra = """\ Alias %(static_url_resources_path)s "%(htdocs_dir)s/" """ @@ -76,7 +76,7 @@ # Such a directive is not desirable where the static and dynamic resources are # in different places, however. -apache_htaccess_combined_mod_rewrite = """ +apache_htaccess_combined_mod_rewrite = """\ DirectoryIndex %(url_path)s/moin.cgi/ RewriteEngine On RewriteBase %(final_url_path)s @@ -87,12 +87,16 @@ # Post-setup templates. -postsetup_setfacl = """#!/bin/sh +postsetup_setfacl = """\ +#!/bin/sh find '%(common_dir)s/data' -type f | xargs setfacl -m u:%(web_user)s:rw find '%(common_dir)s/data' -type d | xargs setfacl -m u:%(web_user)s:rwx find '%(common_dir)s/underlay' -type f | xargs setfacl -m u:%(web_user)s:rw find '%(common_dir)s/underlay' -type d | xargs setfacl -m u:%(web_user)s:rwx +if [ -e "%(common_dir)s/wikiconfig.py" ]; then + setfacl -m u:%(web_user)s:r '%(common_dir)s/wikiconfig.py' +fi """ postsetup_setfacl_extra = """ @@ -106,12 +110,17 @@ fi """ -postsetup_chown_chmod = """#!/bin/sh +postsetup_chown_chmod = """\ +#!/bin/sh chown -R %(this_user)s.%(web_group)s '%(common_dir)s/data' chown -R %(this_user)s.%(web_group)s '%(common_dir)s/underlay' chmod -R g+w '%(common_dir)s/data' chmod -R g+w '%(common_dir)s/underlay' +if [ -e "%(common_dir)s/wikiconfig.py" ]; then + chown %(this_user)s.%(web_group)s '%(common_dir)s/wikiconfig.py' + chmod g+r '%(common_dir)s/wikiconfig.py' +fi """ postsetup_chown_extra = """ @@ -369,8 +378,10 @@ theme_master = "modernized" extra_theme_css_files = ["SlideShow.css"] - def __init__(self, moin_distribution=None, prefix=None, - site_packages=None, web_app_dir=None, web_static_dir=None, web_site_dir=None, + def __init__(self, + moin_distribution=None, + prefix=None, site_packages=None, + web_app_dir=None, web_static_dir=None, web_site_dir=None, common_dir=None, farm_config=None, site_config=None, url_path=None, static_url_path=None, superuser=None, site_name=None, site_identifier=None, front_page_name=None,