# HG changeset patch # User Paul Boddie # Date 1361837293 -3600 # Node ID d0d1b660c77882d94ed6bc97b66279cc1ab84ba0 # Parent 8c91950a62f814f49655f5fce871480132915ef5 Changed the post-install scripts to support filenames containing spaces. diff -r 8c91950a62f8 -r d0d1b660c778 moinsetup.py --- a/moinsetup.py Sun Feb 24 19:45:26 2013 +0100 +++ b/moinsetup.py Tue Feb 26 01:08:13 2013 +0100 @@ -95,20 +95,20 @@ 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/data/plugin' -type f | xargs setfacl -m u:%(web_user)s:r -find '%(common_dir)s/data/plugin' -type d | xargs setfacl -m u:%(web_user)s:rx -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 +find '%(common_dir)s/data' -type f -print0 | xargs -0 setfacl -m u:%(web_user)s:rw +find '%(common_dir)s/data' -type d -print0 | xargs -0 setfacl -m u:%(web_user)s:rwx +find '%(common_dir)s/data/plugin' -type f -print0 | xargs -0 setfacl -m u:%(web_user)s:r +find '%(common_dir)s/data/plugin' -type d -print0 | xargs -0 setfacl -m u:%(web_user)s:rx +find '%(common_dir)s/underlay' -type f -print0 | xargs -0 setfacl -m u:%(web_user)s:rw +find '%(common_dir)s/underlay' -type d -print0 | xargs -0 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 = """ -find '%(htdocs_dir)s' -type f | xargs setfacl -m u:%(web_user)s:r -find '%(htdocs_dir)s' -type d | xargs setfacl -m u:%(web_user)s:rx +find '%(htdocs_dir)s' -type f -print0 | xargs -0 setfacl -m u:%(web_user)s:r +find '%(htdocs_dir)s' -type d -print0 | xargs -0 setfacl -m u:%(web_user)s:rx """ postsetup_setfacl_logs = """ @@ -124,12 +124,12 @@ chown -R %(this_user)s.%(web_group)s '%(common_dir)s/data' chown -R %(this_user)s.%(web_group)s '%(common_dir)s/underlay' -find '%(common_dir)s/data' -type f | xargs chmod g=rw -find '%(common_dir)s/data' -type d | xargs chmod g=rwx -find '%(common_dir)s/data/plugin' -type f | xargs chmod g=r -find '%(common_dir)s/data/plugin' -type d | xargs chmod g=rx -find '%(common_dir)s/underlay' -type f | xargs chmod g=rw -find '%(common_dir)s/underlay' -type d | xargs chmod g=rwx +find '%(common_dir)s/data' -type f -print0 | xargs -0 chmod g=rw +find '%(common_dir)s/data' -type d -print0 | xargs -0 chmod g=rwx +find '%(common_dir)s/data/plugin' -type f -print0 | xargs -0 chmod g=r +find '%(common_dir)s/data/plugin' -type d -print0 | xargs -0 chmod g=rx +find '%(common_dir)s/underlay' -type f -print0 | xargs -0 chmod g=rw +find '%(common_dir)s/underlay' -type d -print0 | xargs -0 chmod g=rwx 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'