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

Re: Environment for the www-data user during post-commit.

From: <kfogel_at_collab.net>
Date: 2005-01-05 18:18:07 CET

Teo Romera <teo@gsyc.escet.urjc.es> writes:
> We have a little problem with Subversion which is getting quite
> annoying. Maybe anyone has suffered it before and can give us a hand.
>
> The software that we are developing has a web interface that users use
> to upload some documents to the system. This web interface commits the
> uploaded documents to a Subversion repository. We have written a
> post-commit python script from scratch that makes some processing from
> the uploaded documents.
>
> If we go to a shell and su to www-data, we can launch "manually" the
> post-commit script and find that everything works as expected and the
> processing from the documents is done. Everything works fine.
>
> Here comes the problem. Once the post-commit script starts because a
> commit has been done in the web interface, environment variables for the
> www-data user do not hold the expected values. It looks like when Apache
> launches post-commit www-data user does not have the shame values in its
> environment variables.
>
> For example, printing the value of PATH from our python script shows
> something different from what www-data user has in his PATH variable
> when you su to www-data in a shell.
>
> We would like to know if there is a way to configure apache so that we
> can tell exactly what values the environment variables will hold during
> post-commit.
>
> Our Subversion repository is installed in a Debian GNU/Linux Sarge 3.0
> machine. Subversion version is 1.0.6..

Why not just set the environment variables to whatever you want, in
the hook script? Or, just source the www-data user's init files?

I don't know of any way to make Apache/Subversion transmit the
environment -- it was an explicit policy decision not to. But the
workarounds seem pretty clear... ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 5 18:30:47 2005

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