Importing TWiki installation.
jeroen at linuxfromscratch.org
Sat Jul 17 05:37:47 PDT 2004
Jeremy Huntwork said the following on 16-07-2004 21:06:
> On Fri, 2004-07-16 at 13:10 -0400, Jeremy Huntwork wrote:
>>Well you can obviously see I'm learning by trial and error. :)
>>Jeroen, I ran into a bit of trouble importing into the branch you made,
>>test.lfs.org, so I made a new branch, not realizing that I was dumping
>>more info in than I needed. If it is usable for our needs, great,
>>otherwise we can delete the whole branch. I'll be testing out post-
>>commit actions to a temp directory shortly.
Ok, I'll clean the regular branches up when I do the repository
> A few notes on updating the site via post-commit:
> It seems the easiest way to do it is checkout the branch into the web
> directory, nicely updating only the files that have changed. So the web
> directory needs to be a svn working directory with a .svn folder.
Yep; an update is also the fastest. We can filter out the .svn
directories with .htaccess. And for rsync, we should also filter it out.
> The user running Apache("httpd"?) is the one that calls the hook script
> post-commit, so all files checked out (in theory) will be owned by that
> user and group, as will the .svn directory.
Apache will need read-access to the website repository, otherwise
someone will need to check it out as httpd & use his credentials for
> (BTW, I'm only finding info on repository-level hook scripts. Does
> anyone know if similar scripts can be made/used for branches?)
A branch is just a directory. You can use "svnlook dirs-changed" to see
which one was changed (only on the server). But it's probably better if
we determine via properties which branch should check out/update where
(eg. property www -> www.lfs.org will get updated).
> So it seems the easiest way to
> turn /home/httpd/test.linuxfromscratch.org into an svn working directory
> is to copy an existing .svn directory there and "chown -R httpd:
> httpd .svn"
No; see above. httpd needs read access; this is the safest method. The
post-commit will need to be run as httpd:httpd and this should check out
the appropriate directory or update it if it already exists.
> Once that is done we can add a line to post-commit that checks out the
> If we setup the site as stated above, someone with appropriate
> permissions needs to set that up. :)
To be specific, we need write access to the repository "hooks" directory.
Yes, last one: post-commit is silent by nature. In order to see it's
output, I use the following as post-commit:
#  REPOS-PATH (the path to this repository)
#  REV (the number of the revision just committed)
/usr/local/bin/post-commit "$1" "$2" >>
And "set -x" in /usr/local/bin/post-commit.
More information about the website