You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nathan Fiedler <nf...@bluemarsh.com> on 2002/04/09 19:06:39 UTC

svn import fails

There's a lot to explain, so I'll do my best to be as brief as possible.
I have two years of experience as a CVS admin and user, and now very
much want to adopt Subversion. I'm using Red Hat Linux 7.2 (kernel
2.4.18) with most of the usual packages installed and all of the latest
versions available via Ximian Red Carpet. I've used the following basic
steps to compile and install Subversion:

Download subversion-r1587 tarball and extract. Read the README and
INSTALL files.

Berkeley DB 4.0.14 -- compiled and installed successfully to
/usr/local/BerkeleyDB.4.0. Note that db1, db2, and db3 RPMs are also
installed. I assume this is normal.

Neon 0.19.3 -- compiled and installed in /usr/local/lib.

In Subversion directory, renamed 'neon' to 'neon_old' so it wouldn't be
compiled with Subversion.

Attempted to follow bootstrapping instructions (./configure...) and
failed with --link-libtool problem in apr-util.

Retrieved httpd-2.0 directly from cvs, compiled and installed to
/usr/local/apache2.

Back in Subversion directory, rename 'apr' and 'apr-util' with '_old'
suffix so they wouldn't be compiled with Subversion.

Invoke Subversion configure as follows:

./configure --with-apr=/usr/local/apache2 \
    --with-apr-util=/usr/local/apache2 \
    --with-berkeley-db=/usr/local/BerkeleyDB.4.0 \
    --enable-maintainer-mode \
    --disable-shared

Compile successfully. Use the svn client to get the latest Subversion
code, as per the instructions.

Go to new svn directory, run autogen.sh and invoke configure:

./configure --with-apr=/usr/local/apache2 \
    --with-apr-util=/usr/local/apache2 \
    --with-apxs=/usr/local/apache2/bin/apxs \
    --with-berkeley-db=/usr/local/BerkeleyDB.4.0 \
    --enable-maintainer-mode

Compiled, installed, and tests successfully.

Edit httpd.conf, as per Subversion INSTALL instructions.

'svnadmin create /usr/local/svnroot' creates the following:

chip (nfiedler) 585 > dir /usr/local/svnroot/
total 24
-rw-r--r--    1 root     root          285 Apr  8 23:10 README
drwxr-xr-x    2 root     root         4096 Apr  8 23:10 conf/
drwxr-xr-x    2 root     root         4096 Apr  8 23:10 dav/
drwxr-xr-x    2 root     root         4096 Apr  8 23:10 db/
drwxr-xr-x    2 root     root         4096 Apr  8 23:10 hooks/
drwxr-xr-x    2 root     root         4096 Apr  8 23:10 locks/


My problem:

Invoking 'svn --version' causes a segmentation fault. I'm a gdb newbie,
so this is all I knew how to do:

(gdb) run --version
Starting program: /usr/local/bin/svn --version
[New Thread 1024 (LWP 25333)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 25333)]
0x4021a254 in apr_getopt_long (os=0x8059ea0, opts=0x8050fa0,
optch=0xbffff76c,
    optarg=0xbffff768) at getopt.c:240
240     getopt.c: No such file or directory.
        in getopt.c
(gdb) bt
#0  0x4021a254 in apr_getopt_long (os=0x8059ea0, opts=0x8050fa0,
    optch=0xbffff76c, optarg=0xbffff768) at getopt.c:240
#1  0x0804c44d in main (argc=2, argv=0xbffff7f4)
    at subversion/clients/cmdline/main.c:807
#2  0x402c1306 in __libc_start_main (main=0x804c360 <main>, argc=2,
    ubp_av=0xbffff7f4, init=0x8049c70 <_init>, fini=0x8050910 <_fini>,
    rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffff7ec)
    at ../sysdeps/generic/libc-start.c:129


Ignoring the above problem, and invoking

'svn import file:///usr/local/svnroot . jswat-test'

fails with the following message, after leaving the popup editor:

subversion/libsvn_ra_local/ra_plugin.c:145
svn_error: #21093 : <Couldn't find a repository.>
  Unable to open an ra_local session to URL

subversion/libsvn_ra_local/split_url.c:92
svn_error: #21093 : <Couldn't find a repository.>
  svn_ra_local__split_URL: Unable to find valid repository


What did I do wrong?

nathan



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Nathan Fiedler <nf...@bluemarsh.com>.
On Tue, 2002-04-09 at 13:38, Garrett Rooney wrote:
> what's the exact command line you're using.  it's most likely a spot
> where svn is expecting a url and you're giving it a path, or vice
> versa.

'svnadmin create /usr/local/svnroot' creates the repository.

'svn import file:///usr/local/svnroot . jswat-test' displays the error.

Passing anything else generates a 21082 error about a bad url.

nathan



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tue, Apr 09, 2002 at 01:35:46PM -0700, Nathan Fiedler wrote:
> On Tue, 2002-04-09 at 12:54, Garrett Rooney wrote:
> > check to see if there's an earlier version of apr-config sitting in
> > your path somewhere, from a previously installed apr.  that could
> > cause such an error.
> 
> Aha, I wonder how long that file has been there (in /usr/local/bin).
> Removing it allowed Subversion to compile and install. The tests
> performed by 'make check' are all successful.
> 
> Now 'svn --version' displays:
> 
> >>>>>>>>>>>
> Subversion Client, version 0.10.2 (dev build)
>    compiled Apr  9 2002, 13:12:31
> 
> Copyright (C) 2000-2002 CollabNet.
> Subversion is open source software, see http://subversion.tigris.org/
> 
> The following repository access (RA) modules are available:
> 
> * ra_dav : Module for accessing a repository via WebDAV (DeltaV)
> protocol.
>   - handles 'http' schema
> * ra_local : Module for accessing a repository on local disk.
>   - handles 'file' schema
> >>>>>>>>>>>
> 
> I created the respository again and tried the same import again. Still
> fails with the same error message:
> 
> >>>>>>>>>>>
> subversion/libsvn_ra_local/ra_plugin.c:145
> svn_error: #21093 : <Couldn't find a repository.>
>   Unable to open an ra_local session to URL
> 
> subversion/libsvn_ra_local/split_url.c:92
> svn_error: #21093 : <Couldn't find a repository.>
>   svn_ra_local__split_URL: Unable to find valid repository
> >>>>>>>>>>>

what's the exact command line you're using.  it's most likely a spot
where svn is expecting a url and you're giving it a path, or vice
versa.

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails for remote repository only

Posted by Alexis Huxley <ah...@gmx.net>.
> Hmm... no, the Location does specify the URL that is used to access the 
> resource, it is not a file system path.  The problem was simply that the 
> URL you were giving to the import command did not match the one you 
> defined in your Location tag.

Aaagggghhh! (kicks self). Thanks for pointing out the obvious Julian
even more obviously than Sander did. That was what it took :-)))

Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails for remote repository only

Posted by Julian Fitzell <ju...@beta4.com>.
Alexis Huxley wrote:
>>>Then I have just the following in the apache2 config:
>>>
>>>    <Location /svn/repos>
>>
>>                ^^^^^^^^^^
>>
>>>        DAV svn
>>>        SVNPath <repository_path>
>>>    </Location>
>>>
>>>Then as a normal user I ran:
>>>
>>>     svn import http://localhost/repos/svn <sources_path> <repository_subdir>
>>
>>                                   ^^^^^^^^^
>> 
>>See the bits I underlined? ;)
> 
> 
> Ok, it's sorted. May I suggest that in the INSTALL document (1)
> the section in 'Configuring Apache for Subversion'
> 
> 	<Location /svn/repos>
> 	    DAV svn
>             SVNPath /absolute/path/to/repository
>         </Location>
> 
> is changed to:
> 
> 	<Location /absolute/path/to/repository>
> 	    DAV svn
>             SVNPath /absolute/path/to/repository
>         </Location>
> 
> And (2) the same in the example in the 'Running and testing' section.
> 
> To those who know, it may be clear that "/svn/repos" means the actual
> repository path, but I made the - not stupid - assumption that
> "/svn/path" was similar to a cgi-script or something, and merely
> served to trigger SVN on the server side, and that it would receive
> the path from the SVNPath field, and was therefore fixed text.
> 
> If the 'Location' and the path in the URL must match and specify the
> path of the repository, then what is the 'SVNPath' for? Isn't there
> a bit of duplication of information there? My assumption was that that
> was not ;-)

Hmm... no, the Location does specify the URL that is used to access the 
resource, it is not a file system path.  The problem was simply that the 
URL you were giving to the import command did not match the one you 
defined in your Location tag.

Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: svn import fails for remote repository only

Posted by Sander Striker <st...@apache.org>.
> From: Alexis Huxley [mailto:ahuxley@gmx.net]
> Sent: 11 April 2002 10:33

> > > Then I have just the following in the apache2 config:
> > > 
> > >     <Location /svn/repos>
> >                 ^^^^^^^^^^
> > >         DAV svn
> > >         SVNPath <repository_path>
> > >     </Location>
> > > 
> > > Then as a normal user I ran:
> > > 
> > >      svn import http://localhost/repos/svn <sources_path> <repository_subdir>
> >                                    ^^^^^^^^^
> >  
> > See the bits I underlined? ;)
> 
> Ok, it's sorted. May I suggest that in the INSTALL document (1)
> the section in 'Configuring Apache for Subversion'
> 
> 	<Location /svn/repos>
> 	    DAV svn
>             SVNPath /absolute/path/to/repository
>         </Location>
> 
> is changed to:
> 
> 	<Location /absolute/path/to/repository>
> 	    DAV svn
>             SVNPath /absolute/path/to/repository
>         </Location>


No, because that would be incorrect.  Location can be any path
you like.

> And (2) the same in the example in the 'Running and testing' section.

The only requirement is that you operate on the url you have configured.
IOW:

$ svn <operation> http://<hostname>/<what_i_typed_at_location>

What you did was configure the repos on http://localhost/svn/repos and
then you were trying to access it through http://localhost/repos/svn.
 
> To those who know, it may be clear that "/svn/repos" means the actual
> repository path, but I made the - not stupid - assumption that
> "/svn/path" was similar to a cgi-script or something, and merely
> served to trigger SVN on the server side, and that it would receive
> the path from the SVNPath field, and was therefore fixed text.
> 
> If the 'Location' and the path in the URL must match and specify the
> path of the repository, then what is the 'SVNPath' for? Isn't there
> a bit of duplication of information there? My assumption was that that
> was not ;-)

Nope.  Read up on the Location directive in the apache docs ;)
 
> Thanks for the help! Now to start playing ... :-)

No prob.
 
> Alexis

Sander


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails for remote repository only

Posted by Alexis Huxley <ah...@gmx.net>.
> > Then I have just the following in the apache2 config:
> > 
> >     <Location /svn/repos>
>                 ^^^^^^^^^^
> >         DAV svn
> >         SVNPath <repository_path>
> >     </Location>
> > 
> > Then as a normal user I ran:
> > 
> >      svn import http://localhost/repos/svn <sources_path> <repository_subdir>
>                                    ^^^^^^^^^
>  
> See the bits I underlined? ;)

Ok, it's sorted. May I suggest that in the INSTALL document (1)
the section in 'Configuring Apache for Subversion'

	<Location /svn/repos>
	    DAV svn
            SVNPath /absolute/path/to/repository
        </Location>

is changed to:

	<Location /absolute/path/to/repository>
	    DAV svn
            SVNPath /absolute/path/to/repository
        </Location>

And (2) the same in the example in the 'Running and testing' section.

To those who know, it may be clear that "/svn/repos" means the actual
repository path, but I made the - not stupid - assumption that
"/svn/path" was similar to a cgi-script or something, and merely
served to trigger SVN on the server side, and that it would receive
the path from the SVNPath field, and was therefore fixed text.

If the 'Location' and the path in the URL must match and specify the
path of the repository, then what is the 'SVNPath' for? Isn't there
a bit of duplication of information there? My assumption was that that
was not ;-)

Thanks for the help! Now to start playing ... :-)

Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: svn import fails for remote repository only

Posted by Sander Striker <st...@apache.org>.
> From: Alexis Huxley [mailto:ahuxley@gmx.net]
> Sent: 11 April 2002 09:51

> Hi, just a short one this time :-) I got a bit further ... I can now
> access local repositories. I used the following to create the single
> repository in the first place:
> 
>     svnadmin create <repository_path>
> 
> and then I can import stuff in to it with:
> 
>     svn import file://<repository_path> <sources_path> <repository_subdir>
> 
> Then I did the same thing as root for creating a remotely accessible
> respository - using a different path obviously :-)
> 
>     svnadmin create <repository_path>
> 
> Then I have just the following in the apache2 config:
> 
>     <Location /svn/repos>
                ^^^^^^^^^^
>         DAV svn
>         SVNPath <repository_path>
>     </Location>
> 
> I chown'ed the repository so the server runner has access to it. 
> 
> Then as a normal user I ran:
> 
>      svn import http://localhost/repos/svn <sources_path> <repository_subdir>
                                   ^^^^^^^^^
 
> But that produces:
> 
>     svn_error: #21091 : <RA layer didn't receive requested OPTIONS info>
>     The OPTIONS response did not include the requested activity-collection-set.
>     (Check the URL again;  this often means that the URL is not WebDAV-enabled.)
> 
> In the Apache logs I see:
> 
>     127.0.0.1 - - [11/Apr/2002:09:39:53 +0200] "OPTIONS /repos/svn HTTP/1.1" 200 0
> 
> Now, I have *no* idea what that means :-) Does anybody else? What
> is an activity-collection-set? What 'OPTIONS' info should have been
> there? Why isn't Apache giving it to it? Thanks!

See the bits I underlined? ;)
 
> Alexis

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

svn import fails for remote repository only

Posted by Alexis Huxley <ah...@gmx.net>.
Hi, just a short one this time :-) I got a bit further ... I can now
access local repositories. I used the following to create the single
repository in the first place:

    svnadmin create <repository_path>

and then I can import stuff in to it with:

    svn import file://<repository_path> <sources_path> <repository_subdir>

Then I did the same thing as root for creating a remotely accessible
respository - using a different path obviously :-)

    svnadmin create <repository_path>

Then I have just the following in the apache2 config:

    <Location /svn/repos>
        DAV svn
        SVNPath <repository_path>
    </Location>

I chown'ed the repository so the server runner has access to it. 

Then as a normal user I ran:

     svn import http://localhost/repos/svn <sources_path> <repository_subdir>

But that produces:

    svn_error: #21091 : <RA layer didn't receive requested OPTIONS info>
    The OPTIONS response did not include the requested activity-collection-set.
    (Check the URL again;  this often means that the URL is not WebDAV-enabled.)

In the Apache logs I see:

    127.0.0.1 - - [11/Apr/2002:09:39:53 +0200] "OPTIONS /repos/svn HTTP/1.1" 200 0

Now, I have *no* idea what that means :-) Does anybody else? What
is an activity-collection-set? What 'OPTIONS' info should have been
there? Why isn't Apache giving it to it? Thanks!

Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails (almost same problem) + script

Posted by Branko Čibej <br...@xbc.nu>.
Alexis Huxley wrote:

>Following Nathan's suggestion to do what someone said in an 
>earlier mail:
>
>>Here's what I suggest:  try gdb'ing the 'svn import file:///'
>>command.  Set a breakpoint on split_url.c:74.  (If you built your
>>client shared, you need to set a breakpoint on main() first, *then*
>>set the real breakpoint.)
>>
>
>I got:
>
>(gdb) print *err
>$1 = {apr_err = 21081, src_err = 13, 
>  message = 0x8059c68 "Berkeley DB error while opening environment for
>filesystem /var/tmp/svn-repository-test/db:\nPermission denied", child =
>0x0, 
>  pool = 0x8059b40, file = 0x0, line = -1}
>
>Hmmm ... I don't understand; I did the svnadmin, which created the
>files belonging to root - the user I'd run it as - then I did a chown
>-R nobody:nogroup to give them away to the web server runner uid/gid 
>(verified id from ps listing and httpd.conf).
>
>As Ben mentioned someone else had been able to do,
>I too can do creates without problem, but the import does't work.
>
>Short of patching the code is there anyway to get it tell me who *it*
>thinks its running as? :-)
>
>My repository looks like this:
>
>/var/tmp/svn-repository-test/:
>total 24
>drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 locks
>drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 hooks
>drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 db
>drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 dav
>drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 conf
>-rw-r--r--    1 nobody   nogroup       285 Apr 10 22:28 README
>
...

What are your permssions on /., /var/.; /var/tmp/. and 
/var/tmp/svn-repository-test/.? Maybe the apache process can't even 
chdir to the repository dir.

Although, doing a local import should work n any case ...


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails (almost same problem) + script

Posted by Alexis Huxley <ah...@gmx.net>.
Following Nathan's suggestion to do what someone said in an 
earlier mail:

> Here's what I suggest:  try gdb'ing the 'svn import file:///'
> command.  Set a breakpoint on split_url.c:74.  (If you built your
> client shared, you need to set a breakpoint on main() first, *then*
> set the real breakpoint.)

I got:

(gdb) print *err
$1 = {apr_err = 21081, src_err = 13, 
  message = 0x8059c68 "Berkeley DB error while opening environment for
filesystem /var/tmp/svn-repository-test/db:\nPermission denied", child =
0x0, 
  pool = 0x8059b40, file = 0x0, line = -1}

Hmmm ... I don't understand; I did the svnadmin, which created the
files belonging to root - the user I'd run it as - then I did a chown
-R nobody:nogroup to give them away to the web server runner uid/gid 
(verified id from ps listing and httpd.conf).

As Ben mentioned someone else had been able to do,
I too can do creates without problem, but the import does't work.

Short of patching the code is there anyway to get it tell me who *it*
thinks its running as? :-)

My repository looks like this:

/var/tmp/svn-repository-test/:
total 24
drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 locks
drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 hooks
drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 db
drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 dav
drwxr-xr-x    2 nobody   nogroup      4096 Apr 10 22:28 conf
-rw-r--r--    1 nobody   nogroup       285 Apr 10 22:28 README

/var/tmp/svn-repository-test/locks:
total 4
-rw-r--r--    1 nobody   nogroup       460 Apr 10 22:28 db.lock

/var/tmp/svn-repository-test/hooks:
total 20
-rw-r--r--    1 nobody   nogroup       101 Apr 10 22:28 write-sentinels.tmpl
-rw-r--r--    1 nobody   nogroup      1117 Apr 10 22:28 start-commit.tmpl
-rw-r--r--    1 nobody   nogroup        99 Apr 10 22:28 read-sentinels.tmpl
-rw-r--r--    1 nobody   nogroup      1163 Apr 10 22:28 pre-commit.tmpl
-rw-r--r--    1 nobody   nogroup      1098 Apr 10 22:28 post-commit.tmpl

/var/tmp/svn-repository-test/db:
total 544
-rw-r--r--    1 nobody   nogroup      8192 Apr 10 22:28 transactions
-rw-r--r--    1 nobody   nogroup      8192 Apr 10 22:28 strings
-rw-r--r--    1 nobody   nogroup      8192 Apr 10 22:28 revisions
-rw-r--r--    1 nobody   nogroup      8192 Apr 10 22:28 representations
-rw-r--r--    1 nobody   nogroup      8192 Apr 10 22:28 nodes
-rw-r--r--    1 nobody   nogroup     44369 Apr 10 22:28 log.0000000001
-rw-r--r--    1 nobody   nogroup     16384 Apr 10 22:28 __db.005
-rw-r--r--    1 nobody   nogroup    360448 Apr 10 22:28 __db.004
-rw-r--r--    1 nobody   nogroup    327680 Apr 10 22:28 __db.003
-rw-r--r--    1 nobody   nogroup    270336 Apr 10 22:28 __db.002
-rw-r--r--    1 nobody   nogroup      8192 Apr 10 22:28 __db.001

/var/tmp/svn-repository-test/dav:
total 0

/var/tmp/svn-repository-test/conf:
total 0

Anybody got any ideas what to try next? Thanks!

Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails (almost same problem) + script

Posted by Alexis Huxley <ah...@gmx.net>.
Hi everyone ...

> Ah, now I'm very embarrased. The permissions on /usr/local/svnroot were
> too restrictive.
> 
> Thanks for all the help. Now it seems to be working.

No such luck for me: I even tried chmod -R 777 on my repository but
it made no difference :-(

Since I've tried it about five thousand times now (ok, slight
exaggeration ;-) I put the whole sequence in a script, from the
download to the tests. I've put it below, in the hope that it will
help you help me, and might, perhaps, help others.

It boils down to the following errors; doing this:

    svn import file://$SVN_REPOSITORY_ROOT . <arbitrary-name>
    
gives this:

    svn_error: #21093 : <Couldn't find a repository.>
    Unable to open an ra_local session to URL
    
    svn_error: #21093 : <Couldn't find a repository.>
    svn_ra_local__split_URL: Unable to find valid repository

and doing this:

    svn import http://localhost/repos/svn . <arbitrary-name>

gives this:
    
    svn_error: #21091 : <RA layer didn't receive requested OPTIONS info>
    The OPTIONS response did not include the requested activity-collection-set.
    (Check the URL again;  this often means that the URL is not
    WebDAV-enabled.)

All the 'make check' tests pass.

'svn --version' reports:

    Subversion Client, version 0.10.2 (dev build)
       compiled Apr 10 2002, 20:53:07
    
    Copyright (C) 2000-2002 CollabNet.
    Subversion is open source software, see http://subversion.tigris.org/
    
    The following repository access (RA) modules are available:
    
    * ra_dav : Module for accessing a repository via WebDAV (DeltaV)
    * protocol.
      - handles 'http' schema
    * ra_local : Module for accessing a repository on local disk.
      - handles 'file' schema

And the apache2 startup seems fine:

    [Wed Apr 10 22:33:42 2002] [notice] Apache/2.0.36-dev (Unix)
    mod_ssl/2.0.36-dev OpenSSL/0.9.6c DAV/2 SVN/0.10.2 (dev build)
    configured -- resuming normal operations

Any advice would be much appreciated!

Alexis Huxley
ahuxley@gmx.net

----------------------------- cut here -------------------------------
#!/usr/bin/ksh
PROGNAME=`basename $0`
set -e

PREREQUISITE_PACKAGES="autoconf libtool cvs openssl libssl-dev"
#  Use this binary to get the current SVN sources
SVN_CLIENT_BINARY_URL=ftp://marcus.debian.net/pub/svn/clients/linux/svn-1611-i386.bz2
#  Stuff we'll need to download
DB4_SOURCES_URL=http://www.sleepycat.com/update/4.0.14/db-4.0.14.tar.gz
NEON_SOURCES_URL=http://www.webdav.org/neon/neon-0.19.3.tar.gz
TMP_DIR=/var/tmp
#  Where am I going to build everything?
SVN_BUILD_ROOT=$TMP_DIR/$PROGNAME
#  well, whaddayaknow, basename works on URLs :-)
SVN_CLIENT_BINARY=$SVN_BUILD_ROOT/svn-client-binary/`basename $SVN_CLIENT_BINARY_URL .bz2`
#  Where will I make a test SVN repository?
SVN_REPOSITORY_ROOT=$TMP_DIR/svn-repository-test
#  Where to SVN, DB4 and Apache2 get installed?
SVN_INSTALL_PREFIX=/usr/server/opt/svn
DB4_INSTALL_PREFIX=/usr/server/opt/db4
APACHE2_INSTALL_PREFIX=/usr/server/opt/apache2
#  Who does the httpd process run as?
HTTP_USER=nobody
HTTP_GROUP=nogroup

main()
{
    #  I uncomment these as I do the build.

    #check_prerequisites
    #make_directories
    setup_environment
    #make_db4
    #make_apache2
    #make_neon_no_compile
    #make_client_binary
    #make_svn
    #create_svn_repository
    #configure_apache2_for_svn
    #restart_apache2
    test_svn_import
}

info()
{
    echo "$PROGNAME: INFO: $1" >&2
}

error()
{
    echo "$PROGNAME: ERROR: $1" >&2
    exit 1
}

check_prerequisites()
{
    info "verifying all prerequisite packages installed ..."
    for PREREQUISITE_PACKAGE in $PREREQUISITE_PACKAGES; do
        dpkg -l $PREREQUISITE_PACKAGE
    done
}

make_directories()
{
    info "creating build root and subdirs ..."
    mkdir -p $SVN_BUILD_ROOT
    mkdir -p $SVN_BUILD_ROOT/svn-client-binary
}

setup_environment()
{
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DB4_INSTALL_PREFIX/lib:$APACHE2_INSTALL_PREFIX/lib:$SVN_INSTALL_PREFIX/lib
    export PATH=$PATH:$APACHE2_INSTALL_PREFIX/bin:$SVN_INSTALL_PREFIX/bin
}

make_db4()
{
    mkdir -p $SVN_BUILD_ROOT/db4-sources
    cd $SVN_BUILD_ROOT/db4-sources

    info "downloading db sources from WWW site ..."
    lynx -dump $DB4_SOURCES_URL > `basename $DB4_SOURCES_URL`

    info "unpacking db4 sources ..."
    tar xzf `basename $DB4_SOURCES_URL`

    info "building db4 ..."
    cd `basename $DB4_SOURCES_URL .tar.gz`/build_unix
    ../dist/configure --prefix=$DB4_INSTALL_PREFIX
    make

    info "installing db4 ..."
    su root -c make install
}

make_apache2()
{
    mkdir -p $SVN_BUILD_ROOT/apache2-sources
    cd $SVN_BUILD_ROOT/apache2-sources

    info "downloading apache2 sources from CVS repository ..."
    cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login
    cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co httpd-2.0
    cd httpd-2.0/srclib
    cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr
    cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr-util
    cd ..

    info "building apache2 ..."
    ./buildconf
    ./configure --enable-dav --enable-so --prefix=$APACHE2_INSTALL_PREFIX \
        --with-dbm=db4 --with-berkeley-db=$DB4_INSTALL_PREFIX --enable-ssl
    make depend
    make

    info "installing apache2 ..."
    su root -c make install

    info "starting apache2 ..."
    su root -c ksh -c "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; sh $APACHE2_INSTALL_PREFIX/bin/apachectl start"
}

make_neon_no_compile()
{
    mkdir -p $SVN_BUILD_ROOT/neon-sources
    cd $SVN_BUILD_ROOT/neon-sources

    info "downloading neon sources from WWW site ..."
    lynx -dump $NEON_SOURCES_URL > `basename $NEON_SOURCES_URL`

    info "unpacking neon sources ..."
    tar xzf `basename $NEON_SOURCES_URL`
}

make_client_binary()
{
    mkdir $SVN_BUILD_ROOT/svn-client-binary
    cd $SVN_BUILD_ROOT/svn-client-binary

    info "downloading pre-compiled client binary from FTP site ..."
    #  if ncftp is trying to download a file and it already exists then it is
    #  not very polite about it. This will get round it.
    mkdir $TMP_DIR/$PROGNAME.$$
    cd $TMP_DIR/$PROGNAME.$$
    ncftpget -V $SVN_CLIENT_BINARY_URL
    mv `basename $SVN_CLIENT_BINARY_URL` $SVN_CLIENT_BINARY.bz2
    cd $SVN_BUILD_ROOT/svn-client-binary
    rmdir $TMP_DIR/$PROGNAME.$$
    info "unpacking pre-compiled client binary ..."
    bunzip2 -f $SVN_CLIENT_BINARY.bz2
    chmod 755 $SVN_CLIENT_BINARY
}

make_svn()
{
    mkdir -p $SVN_BUILD_ROOT/svn-sources
    cd $SVN_BUILD_ROOT/svn-sources

    #info "downloading latest subversion sources from SVN repository ..."
    #$SVN_CLIENT_BINARY checkout http://svn.collab.net/repos/svn/trunk -d svn
    cd svn

    #info "setting up symlinks for apr, aprutil and neon access ..."
    #ln -s $SVN_BUILD_ROOT/apache2-sources/httpd-2.0/srclib/apr .
    #ln -s $SVN_BUILD_ROOT/apache2-sources/httpd-2.0/srclib/apr-util .
    #ln -s $SVN_BUILD_ROOT/neon-sources/`basename $NEON_SOURCES_URL .tar.gz` neon

    #info "building svn ..."
    #sh ./autogen.sh
    #./configure --prefix=$SVN_INSTALL_PREFIX --enable-ssl \
    #    --with-apxs=$APACHE2_INSTALL_PREFIX/bin/apxs \
    #    --with-dbm=db4 --with-berkeley-db=$DB4_INSTALL_PREFIX
    #make clean
    #make
    #make check

    info "installing svn ..."
    su root -c ksh -c "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; make install"
}

create_svn_repository()
{
    info "creating SVN repository ..."
    #mkdir -p $SVN_REPOSITORY_ROOT
    su root -c ksh -c "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; svnadmin create $SVN_REPOSITORY_ROOT; chown -R $HTTP_USER:$HTTP_GROUP $SVN_REPOSITORY_ROOT"
}

configure_apache2_for_svn()
{
    info "adding SVN config info to end of apache2 config file ..."
    #  'su' won't allow redirection so put it in a temp file and then 'su'
    #  can append that.
    cat > $TMP_DIR/$PROGNAME.$$.apache-svn-conf <<EOF
<Location /svn/repos>
    DAV svn
    SVNPath $SVN_REPOSITORY_ROOT
</Location>
EOF
    su root -c "cat $TMP_DIR/$PROGNAME.$$.apache-svn-conf >> $APACHE2_INSTALL_PREFIX/conf/httpd.conf"
}

restart_apache2()
{
    info "restarting apache2 ..."
    su root -c ksh -c "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; apachectl stop; sleep 1; apachectl start"
}

test_svn_import()
{
    info "copying existing program ..."   
    #  'ade' is a script I wrote and here try to import
    mkdir $TMP_DIR/$PROGNAME.$$.ade_src_copy
    ( cd $HOME/dev/active/ade && tar cf - . ) | ( cd $TMP_DIR/$PROGNAME.$$.ade_src_copy )

    info "tidying up copy (in preparation for svn import) ..."
    cd $TMP_DIR/$PROGNAME.$$.ade_src_copy
    find . -name RCS | xargs rm -fr

    info "doing ra_local import ..."
    #  The following command ...
    svn import file://$SVN_REPOSITORY_ROOT . ade || true
    sleep 3		# don't let editor in next svn clear screen too soon

    #  ... fails with the following message:
    #
    #      svn_error: #21093 : <Couldn't find a repository.>
    #      Unable to open an ra_local session to URL
    #      
    #      svn_error: #21093 : <Couldn't find a repository.>
    #      svn_ra_local__split_URL: Unable to find valid repository

    info "doing ra_dav import ..."
    #  The following command ...
    svn import http://localhost/repos/svn . ade || true
    sleep 3		# don't let editor in next svn clear screen too soon

    #  ... fails with the following message:
    #
    #      svn_error: #21091 : <RA layer didn't receive requested OPTIONS info>
    #      ....

    info "tidying up after test ..."
    cd $SVN_BUILD_ROOT
    rm -fr $TMP_DIR/$PROGNAME.$$.ade_src_copy
}

#  Do it!
main "$@"
----------------------------- cut here -------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Nathan Fiedler <nf...@bluemarsh.com>.
On Tue, 2002-04-09 at 13:47, Ben Collins-Sussman wrote:
> What you want to do is look at the value of *err after each call to
> svn_repos_open, and see what the error message is.  Hopefully, one of
> them will be a detailed Berkeley error of some kind... that's the
> magic info we're looking for.

Ah, now I'm very embarrased. The permissions on /usr/local/svnroot were
too restrictive.

Thanks for all the help. Now it seems to be working.

nathan



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Ben Collins-Sussman <su...@collab.net>.
Nathan Fiedler <nf...@bluemarsh.com> writes:

> I created the respository again and tried the same import again. Still
> fails with the same error message:
> 
> >>>>>>>>>>>
> subversion/libsvn_ra_local/ra_plugin.c:145
> svn_error: #21093 : <Couldn't find a repository.>
>   Unable to open an ra_local session to URL
> 
> subversion/libsvn_ra_local/split_url.c:92
> svn_error: #21093 : <Couldn't find a repository.>
>   svn_ra_local__split_URL: Unable to find valid repository
> >>>>>>>>>>>

Somebody else reported this earlier today.  I can't figure it
out... he's able to 'svnadmin create foo' and 'svnadmin lsrevs foo',
so berkeleyDB isn't having problems opening the repository.  But
'import' is having problems for him still....?

The funny thing is, if you can run the python tests successfully,
that's an example of 'svn import' working correctly over ra_local.
The python tests always start out doing an import to a file:/// url.

Here's what I suggest:  try gdb'ing the 'svn import file:///'
command.  Set a breakpoint on split_url.c:74.  (If you built your
client shared, you need to set a breakpoint on main() first, *then*
set the real breakpoint.)

The loop at split_url.c:74 is simple to understand:  it tries to call
svn_repos_open (which calls svn_fs_open_berkeley) on a particular
path.  If the attempt fails, it strips a component off the end of the
path, and attempts to open the parent.  It keeps doing this until it
runs out of components to strip, or until it successfully opens a
repository.

What you want to do is look at the value of *err after each call to
svn_repos_open, and see what the error message is.  Hopefully, one of
them will be a detailed Berkeley error of some kind... that's the
magic info we're looking for.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Nathan Fiedler <nf...@bluemarsh.com>.
On Tue, 2002-04-09 at 12:54, Garrett Rooney wrote:
> check to see if there's an earlier version of apr-config sitting in
> your path somewhere, from a previously installed apr.  that could
> cause such an error.

Aha, I wonder how long that file has been there (in /usr/local/bin).
Removing it allowed Subversion to compile and install. The tests
performed by 'make check' are all successful.

Now 'svn --version' displays:

>>>>>>>>>>>
Subversion Client, version 0.10.2 (dev build)
   compiled Apr  9 2002, 13:12:31

Copyright (C) 2000-2002 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV)
protocol.
  - handles 'http' schema
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' schema
>>>>>>>>>>>

I created the respository again and tried the same import again. Still
fails with the same error message:

>>>>>>>>>>>
subversion/libsvn_ra_local/ra_plugin.c:145
svn_error: #21093 : <Couldn't find a repository.>
  Unable to open an ra_local session to URL

subversion/libsvn_ra_local/split_url.c:92
svn_error: #21093 : <Couldn't find a repository.>
  svn_ra_local__split_URL: Unable to find valid repository
>>>>>>>>>>>

The repository looks like:

>>>>>>>>>>>
/usr/local/svnroot/:
total 24
drwxr-xr-x    2 root     root         4096 Apr  9 13:15 conf
drwxr-xr-x    2 root     root         4096 Apr  9 13:15 dav
drwxr-xr-x    2 root     root         4096 Apr  9 13:15 db
drwxr-xr-x    2 root     root         4096 Apr  9 13:15 hooks
drwxr-xr-x    2 root     root         4096 Apr  9 13:15 locks
-rw-r--r--    1 root     root          285 Apr  9 13:15 README

/usr/local/svnroot/conf:
total 0

/usr/local/svnroot/dav:
total 0

/usr/local/svnroot/db:
total 432
-rw-r--r--    1 root     root         8192 Apr  9 13:15 __db.001
-rw-r--r--    1 root     root       270336 Apr  9 13:15 __db.002
-rw-r--r--    1 root     root       327680 Apr  9 13:15 __db.003
-rw-r--r--    1 root     root       360448 Apr  9 13:15 __db.004
-rw-r--r--    1 root     root        16384 Apr  9 13:15 __db.005
-rw-r--r--    1 root     root        44368 Apr  9 13:15 log.0000000001
-rw-r--r--    1 root     root         8192 Apr  9 13:15 nodes
-rw-r--r--    1 root     root         8192 Apr  9 13:15 representations
-rw-r--r--    1 root     root         8192 Apr  9 13:15 revisions
-rw-r--r--    1 root     root         8192 Apr  9 13:15 strings
-rw-r--r--    1 root     root         8192 Apr  9 13:15 transactions

/usr/local/svnroot/hooks:
total 20
-rw-r--r--    1 root     root         1098 Apr  9 13:15 post-commit.tmpl
-rw-r--r--    1 root     root         1163 Apr  9 13:15 pre-commit.tmpl
-rw-r--r--    1 root     root           99 Apr  9 13:15
read-sentinels.tmpl
-rw-r--r--    1 root     root         1117 Apr  9 13:15
start-commit.tmpl
-rw-r--r--    1 root     root          101 Apr  9 13:15
write-sentinels.tmpl

/usr/local/svnroot/locks:
total 4
-rw-r--r--    1 root     root          460 Apr  9 13:15 db.lock
>>>>>>>>>>>

If you ask me to invoke 'ld', could you please give an example? I know
very little about Unix programming.

Thanks for all the help so far.

nathan



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tue, Apr 09, 2002 at 12:52:25PM -0700, Nathan Fiedler wrote:
> On Tue, 2002-04-09 at 12:29, Ben Collins-Sussman wrote:
> > We've seen this happen when APR is out-of-date.  
> > 
> > Now, I know that you checked out the latest httpd-2.0 from CVS, and
> > that you told subversion to use the APR included there.  But maybe
> > that's not working for some reason.  Maybe your svn is finding an
> > older installed APR.
> > 
> > In particular, a couple months back I added a final "description"
> > field to apr/include/apr_getopt.h:apr_getopt_option_t.  If people
> > forgot to update APR, they'd see segfaults like this.
> > 
> > As an experiment:  can you try checking out the latest APR and
> > APR-UTIL directly into your subversion tree, and then recompile
> > without any --with-apr config options?  See if that makes a
> > difference.
> 
> Then I'm back to the problem I had with the tarball:
> 
> chip (svn) 614 > ./configure --with-apxs=/usr/local/apache2/bin/apxs
> --with-berkeley-db=/usr/local/BerkeleyDB.4.0 --enable-maintainer-mode
> creating config.nice
> configure: Apache Portable Runtime (APR) library configuration
> checking for APR... yes
> configure: error: apr-config --link-libtool failed

check to see if there's an earlier version of apr-config sitting in
your path somewhere, from a previously installed apr.  that could
cause such an error.

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Nathan Fiedler <nf...@bluemarsh.com>.
On Tue, 2002-04-09 at 12:29, Ben Collins-Sussman wrote:
> We've seen this happen when APR is out-of-date.  
> 
> Now, I know that you checked out the latest httpd-2.0 from CVS, and
> that you told subversion to use the APR included there.  But maybe
> that's not working for some reason.  Maybe your svn is finding an
> older installed APR.
> 
> In particular, a couple months back I added a final "description"
> field to apr/include/apr_getopt.h:apr_getopt_option_t.  If people
> forgot to update APR, they'd see segfaults like this.
> 
> As an experiment:  can you try checking out the latest APR and
> APR-UTIL directly into your subversion tree, and then recompile
> without any --with-apr config options?  See if that makes a
> difference.

Then I'm back to the problem I had with the tarball:

chip (svn) 614 > ./configure --with-apxs=/usr/local/apache2/bin/apxs
--with-berkeley-db=/usr/local/BerkeleyDB.4.0 --enable-maintainer-mode
creating config.nice
configure: Apache Portable Runtime (APR) library configuration
checking for APR... yes
configure: error: apr-config --link-libtool failed

thanks

nathan



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import fails

Posted by Ben Collins-Sussman <su...@collab.net>.
Nathan Fiedler <nf...@bluemarsh.com> writes:

> Invoking 'svn --version' causes a segmentation fault. I'm a gdb newbie,
> so this is all I knew how to do:
> 
> (gdb) run --version
> Starting program: /usr/local/bin/svn --version
> [New Thread 1024 (LWP 25333)]
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1024 (LWP 25333)]
> 0x4021a254 in apr_getopt_long (os=0x8059ea0, opts=0x8050fa0,
> optch=0xbffff76c,
>     optarg=0xbffff768) at getopt.c:240
> 240     getopt.c: No such file or directory.
>         in getopt.c
> (gdb) bt
> #0  0x4021a254 in apr_getopt_long (os=0x8059ea0, opts=0x8050fa0,
>     optch=0xbffff76c, optarg=0xbffff768) at getopt.c:240
> #1  0x0804c44d in main (argc=2, argv=0xbffff7f4)
>     at subversion/clients/cmdline/main.c:807
> #2  0x402c1306 in __libc_start_main (main=0x804c360 <main>, argc=2,
>     ubp_av=0xbffff7f4, init=0x8049c70 <_init>, fini=0x8050910 <_fini>,
>     rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffff7ec)
>     at ../sysdeps/generic/libc-start.c:129


We've seen this happen when APR is out-of-date.  

Now, I know that you checked out the latest httpd-2.0 from CVS, and
that you told subversion to use the APR included there.  But maybe
that's not working for some reason.  Maybe your svn is finding an
older installed APR.

In particular, a couple months back I added a final "description"
field to apr/include/apr_getopt.h:apr_getopt_option_t.  If people
forgot to update APR, they'd see segfaults like this.

As an experiment:  can you try checking out the latest APR and
APR-UTIL directly into your subversion tree, and then recompile
without any --with-apr config options?  See if that makes a
difference.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org