aboutsummaryrefslogtreecommitdiff
path: root/doc/post-commit.mdwn
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-10 09:16:07 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-10 09:16:07 +0000
commitd5566303d6b416fb4b0f49a4a7eae2c81bddf17e (patch)
tree6b9db459db83f41597a1d5dbd33e7ed503557ff4 /doc/post-commit.mdwn
parent9ab1c273f601cc7f1d70749b9fc8f58df67ab39f (diff)
downloadikiwiki-d5566303d6b416fb4b0f49a4a7eae2c81bddf17e.tar
ikiwiki-d5566303d6b416fb4b0f49a4a7eae2c81bddf17e.tar.gz
foo
Diffstat (limited to 'doc/post-commit.mdwn')
-rw-r--r--doc/post-commit.mdwn33
1 files changed, 24 insertions, 9 deletions
diff --git a/doc/post-commit.mdwn b/doc/post-commit.mdwn
index 6635d3bbd..6e768ce24 100644
--- a/doc/post-commit.mdwn
+++ b/doc/post-commit.mdwn
@@ -1,11 +1,26 @@
-Here's an example of how to run ikiwiki in a [[Subversion]] post-commit
-hook to automatically update a wiki as commits come in:
+The best way to run ikiwiki in a [[Subversion]] post-commit hook is using
+a wrapper, which can be generated using `ikiwiki --gen-wrapper`.
- wiki_src=/path/to/checkout
- wiki_dest=/path/to/web/server
- svn up -q $wiki_src
- ikiwiki $wiki_src $wiki_dest --wikiname=MyWiki
+First, set up the subversion checkout that ikiwiki will update and compile
+into your wiki at each subversion commit. Run ikiwiki a few times by hand
+to get a feel for it. Now, generate the wrapper by adding "--gen-wrapper"
+to whatever command line you've been using to run ikiwiki. For example:
-This assumes that permissions allow anyone who commits to svn up the
-wiki_src directory and write to wiki_dest. If they don't, you'll need a
-suid wrapper to run the above as a user who can write to both.
+ ~/wiki-checkout> ikiwiki . ~/public_html/wiki
+ ~/wiki-checkout> ikiwiki . ~/public_html/wiki --gen-wrapper
+ successfully generated ikiwiki-wrap
+
+The generated wrapper is a C program that is designed to safely be made
+suid if necessary. It's hardcoded to run ikiwiki with the settings
+specified when you ran --gen-wrapper, and can only be used to update and
+compile that one checkout into the specified html directory.
+
+Now, put the wrapper somewhere convenient, and create a post-commit hook
+script in your subversion repository for the wiki. All the post-commit
+hook has to do is run ikiwiki-wrap (with no parameters).
+
+Depending on your Subversion setup, the post-commit hook might end up
+getting called by users who have write access to subversion, but not to
+your wiki checkout and html directory. If so, you can safely make
+ikiwiki-wrap suid to a user who can write there (*not* to root!). You might
+want to read [[Security]] first.