You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Goddard Lee <le...@easa.eu.int> on 2005/09/28 06:32:53 UTC
SVN under Apache looking in .subversion/servers
I'm having problems with the perl bindings, SVN::Client, and with 'svn'
generally, though Apache 2.0. When I run the little test script below as
'nobody', as my httpd would, it fails on both counts with the message:
Bogus filename: Can't open config file '/root/.subversion/servers'
All I want to do is add/commit a document with a specific username. I
can see no reference in the perldocs to the client looking on the
filesystem.
Is there anyway to have Apache 2.0 perform these tasks with subversion?
Please help!
Lee
#! perl
use Test::More tests => 3;
use strict;
use warnings;
use_ok('SVN::Client');
diag "Sub ref";
eval {
my $ctx = new SVN::Client(
auth => [
SVN::Client::get_simple_prompt_provider(\&simple_prompt, 1),
]
);
};
$@? fail($@) : pass("OK");
diag "Anon sub";
eval {
my $ctx = new SVN::Client(
auth => [
SVN::Client::get_simple_prompt_provider(sub {
my $cred = shift;
$cred->username("test");
$cred->password("p455w0rd");
}, 2),
]
);
};
$@? fail($@) : pass("OK");
exit;
sub simple_prompt {
my $cred = shift;
$cred->username('test');
$cred->password('p455w0rd');
}
__END__
OUTPUT:
[root@bdms t]# sudo -u nobody perl ctx.mini.t
1..3
ok 1 - use SVN::Client;
# Sub ref
not ok 2 - Bogus filename: Can't open config file
'/root/.subversion/servers' at ctx.mini.t line 12 #
# Failed test (ctx.mini.t at line 18)
# Anon sub
not ok 3 - Bogus filename: Can't open config file
'/root/.subversion/servers' at ctx.mini.t line 28 #
# Failed test (ctx.mini.t at line 32)
# Looks like you failed 2 tests of 3.
[root@bdms t]#
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: SVN under Apache looking in .subversion/servers
Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Wed, Sep 28, 2005 at 08:32:53AM +0200, Goddard Lee wrote:
> I'm having problems with the perl bindings, SVN::Client, and with 'svn'
> generally, though Apache 2.0. When I run the little test script below as
> 'nobody', as my httpd would, it fails on both counts with the message:
>
> Bogus filename: Can't open config file '/root/.subversion/servers'
> [root@bdms t]# sudo -u nobody perl ctx.mini.t
I don't know much about the bindings, but you might want to try passing
the -i flag (simulate initial login) to sudo:
# sudo -i -u nobody perl ctx.mini.t
which will set up the environment ($HOME, etc) for nobody.
This will stop svn from looking in /root/.subversion for configuration
files, though it may not fix the problem you're having, because nobody
typically can't write to their home directory by default.
Regards,
Malcolm
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org