You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Fabio Serra <fa...@opentur.it> on 2005/11/21 10:03:04 UTC
Help with post-commit hook for updating a web site
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
Re: Help with post-commit hook for updating a web site
Posted by Fabio Serra <fa...@opentur.it>.
Phil Endecott wrote:
>Fabio Serra <fa...@opentur.it> wrote:
>
>
>>/usr/local/bin/update-dev >>/tmp/logsvn_2.txt
>>
>>
>
>I think that will only redirect stdout, not stderr.
>You might like to try something like this (the exact syntax depends on the shell):
>
>/usr/local/bin/update-dev 2>&1 >> /tmp/logsvn_2.txt
>
Thanks, it doesn't solve my problem, anyway after 2 days I found the error.
I had a file in the project with an accented letter in his name:
pubblicitĂ .html :-(
svn on linux failed silently.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Help with post-commit hook for updating a web site
Posted by Phil Endecott <sp...@chezphil.org>.
Fabio Serra <fa...@opentur.it> wrote:
> /usr/local/bin/update-dev >>/tmp/logsvn_2.txt
I think that will only redirect stdout, not stderr.
You might like to try something like this (the exact syntax depends on the shell):
/usr/local/bin/update-dev 2>&1 >> /tmp/logsvn_2.txt
--Phil.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org