1.1 --- a/README.txt Thu Jan 10 22:07:27 2013 +0100
1.2 +++ b/README.txt Thu Jan 10 23:59:19 2013 +0100
1.3 @@ -319,6 +319,8 @@
1.4 * Added web_user and web_group settings.
1.5 * Added support for making hierarchical page packages.
1.6 * Introduced detection of setup.py files when installing plugins.
1.7 + * Introduced compilation of plugins upon deployment and more restrictive
1.8 + permissions on files in the plugins directory.
1.9
1.10 New in moinsetup 0.3 (Changes since moinsetup 0.2)
1.11 --------------------------------------------------
2.1 --- a/docs/COPYING.txt Thu Jan 10 22:07:27 2013 +0100
2.2 +++ b/docs/COPYING.txt Thu Jan 10 23:59:19 2013 +0100
2.3 @@ -1,7 +1,7 @@
2.4 Licence Agreement for moinsetup
2.5 -------------------------------
2.6
2.7 -Copyright (C) 2010, 2011 Paul Boddie <paul@boddie.org.uk>
2.8 +Copyright (C) 2010, 2011, 2012, 2013 Paul Boddie <paul@boddie.org.uk>
2.9
2.10 This program is free software; you can redistribute it and/or modify it under
2.11 the terms of the GNU General Public License as published by the Free Software
3.1 --- a/moinsetup.py Thu Jan 10 22:07:27 2013 +0100
3.2 +++ b/moinsetup.py Thu Jan 10 23:59:19 2013 +0100
3.3 @@ -3,7 +3,7 @@
3.4 """
3.5 A setup and configuration script for MoinMoin.
3.6
3.7 -Copyright (C) 2010, 2011, 2012 Paul Boddie <paul@boddie.org.uk>
3.8 +Copyright (C) 2010, 2011, 2012, 2013 Paul Boddie <paul@boddie.org.uk>
3.9
3.10 This program is free software; you can redistribute it and/or modify it under
3.11 the terms of the GNU General Public License as published by the Free Software
3.12 @@ -25,9 +25,10 @@
3.13 from glob import glob
3.14 from zipfile import ZipFile
3.15 import os
3.16 -import sys
3.17 +import py_compile
3.18 +import re
3.19 import shutil
3.20 -import re
3.21 +import sys
3.22 import tempfile
3.23
3.24 __version__ = "0.4"
3.25 @@ -92,6 +93,8 @@
3.26
3.27 find '%(common_dir)s/data' -type f | xargs setfacl -m u:%(web_user)s:rw
3.28 find '%(common_dir)s/data' -type d | xargs setfacl -m u:%(web_user)s:rwx
3.29 +find '%(common_dir)s/data/plugin' -type f | xargs setfacl -m u:%(web_user)s:r
3.30 +find '%(common_dir)s/data/plugin' -type d | xargs setfacl -m u:%(web_user)s:rx
3.31 find '%(common_dir)s/underlay' -type f | xargs setfacl -m u:%(web_user)s:rw
3.32 find '%(common_dir)s/underlay' -type d | xargs setfacl -m u:%(web_user)s:rwx
3.33 if [ -e "%(common_dir)s/wikiconfig.py" ]; then
3.34 @@ -115,11 +118,15 @@
3.35
3.36 chown -R %(this_user)s.%(web_group)s '%(common_dir)s/data'
3.37 chown -R %(this_user)s.%(web_group)s '%(common_dir)s/underlay'
3.38 -chmod -R g+w '%(common_dir)s/data'
3.39 -chmod -R g+w '%(common_dir)s/underlay'
3.40 +find '%(common_dir)s/data' -type f | xargs chmod g=rw
3.41 +find '%(common_dir)s/data' -type d | xargs chmod g=rwx
3.42 +find '%(common_dir)s/data/plugin' -type f | chmod g=r
3.43 +find '%(common_dir)s/data/plugin' -type d | chmod g=rx
3.44 +find '%(common_dir)s/underlay' -type f | xargs chmod g=rw
3.45 +find '%(common_dir)s/underlay' -type d | xargs chmod g=rwx
3.46 if [ -e "%(common_dir)s/wikiconfig.py" ]; then
3.47 chown %(this_user)s.%(web_group)s '%(common_dir)s/wikiconfig.py'
3.48 - chmod g+r '%(common_dir)s/wikiconfig.py'
3.49 + chmod g=r '%(common_dir)s/wikiconfig.py'
3.50 fi
3.51 """
3.52
3.53 @@ -1361,6 +1368,11 @@
3.54 for module in glob(join(plugins_dir, "*%spy" % extsep)):
3.55 shutil.copy(module, plugin_target_dir)
3.56
3.57 + # Compile the plugin.
3.58 +
3.59 + plugin = join(plugins_dir, split(module)[-1])
3.60 + py_compile.compile(plugin)
3.61 +
3.62 def install_actions(self, actions_dir):
3.63
3.64 "Install Wiki actions provided in the given 'actions_dir'."