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

RE: Perl can't find my libraries when run via the subversion post-commit script

From: Craig Thayer <CThayer_at_sensorlogic.com>
Date: Thu, 4 Mar 2010 13:10:47 -0600

Bingo! That was it. Thank you Chris and David. David, I'm sorry I didn't try executing the script as the user the hook script runs as (which is apache BTW) as I already had a workaround. But when Chris mentioned that the /root directory is typically setup with root access only the light finally went on in my head. So I tried it and, sure enough, that is why Perl couldn't find my libraries.

I guess I'll just leave my libraries where I put them for the workaround.

Thanks again guys for your help. I really appreciate it.


-----Original Message-----
From: Chris Shelton [mailto:cshelton_at_shelton-family.net]
Sent: Thursday, March 04, 2010 12:13 PM
To: Craig Thayer
Cc: users_at_subversion.apache.org
Subject: Re: Perl can't find my libraries when run via the subversion post-commit script


On Thu, Mar 4, 2010 at 12:20 PM, Craig Thayer <CThayer_at_sensorlogic.com> wrote:

> Yes, I have tested the script on the Subversion server and it runs just fine.  And I agree it is obvious that Perl is including the directories to my libraries (so the use lib statements are working as designed as you stated).  However, it is Perl that is complaining that it can't find my libraries even though they are clearly in the @INC path.  I have never run into this situation before and I believe it has to do with the fact that the Subversion hook is running with no environment defined, but why it makes Perl not able to find my libs ONLY when it runs as a Subversion hook I haven't a clue.

Did you run the script "as the user that runs Subversion" as David
suggested? This user is generally apache, nobody, www-data or such on
unix type systems. The /root directory is typically setup with root
user only access, which would prevent a script running as a non-root
user from being able to access files in /root/perl5/lib.

Received on 2010-03-04 20:11:26 CET

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