[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Help with post-commit hook for updating a web site

From: Fabio Serra <fabio.serra_at_opentur.it>
Date: 2005-11-21 11:03:04 CET

I'm not a Linux sysadmin so I have some problems with a post-commit hook
for updating a web site.
I need to automatically update a web site after every commit, so I
created a working copy on the web server and followed all tips written in:
http://arstechnica.com/columns/linux/linux-20050406.ars

I created the small C script with setuid, I tried with sudo and I tried
with a simple post-hook script too. All these solutions failed. The
post-commit works if it is launched from the console by root or by any
other users who owns the working copy, but when It is executed by SVN it
doesn't work, but failed silently. I mean that the script is called by
apache but the update doesn't work. I did the initial checkout using
http:// and file:// either, but I didn't succeed.
I suspect that the problem is with the apache user that doesn't have a
shell or a password.
Here are my attempts:
post-commit

/usr/local/bin/update-dev >>/tmp/logsvn_2.txt
#/usr/bin/svn update /vol1/htdocs/igp_web_temp >> /tmp/log_update_svn.txt

Do you have any advice?
Finally, what I need to understand is:
- the initial checkout in the web server should be done by the apache
user or can I do the checkout with another user and after do chown
apache.apache?
- is there any way to catch the errors returned by svn update? The file
redirect > /tmp/log_update_svn.txt is created by apache but it is always
void.

Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 21 11:06:27 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.