-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Glen Johnson wrote:
> 
> On Nov 19, 2009, at 11:59 PM, Greg Larkin wrote:
> 
>> Glen Johnson wrote:
>>> On Nov 19, 2009, at 11:43 AM, Greg Larkin wrote:
>>>>
>>>> Glen Johnson wrote:
>>>>> FreeBSD-questions,
>>>>> I am attempting to use FreeBSD as my Subversion server.  I have
>>>>> Subversion working, and I have Apache working.  However when I try to
>>>>> use http:/my_server/svn/my_project I get:
>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>> <D:error xmlns:D="DAV:" xmlns:m="http://apache.org/dav/xmlns";
>>>>> xmlns:C="svn:">
>>>>> <C:error/>
>>>>> <m:human-readable errcode="2">
>>>>> Could not open the requested SVN filesystem
>>>>> </m:human-readable>
>>>>> </D:error>
>>>>>
>>>>> 1 I tried chmod -R 777 /home/svn/repos.
>>>>> 2 I tried recompiling apache, db, and subversion.
>>>>> 3 I looked at /var/log/http-error.log (partial list below)
>>>>> [Thu Nov 19 09:35:52 2009] [notice] Graceful restart requested, doing
>>>>> restart
>>>>> [Thu Nov 19 09:35:53 2009] [notice] Digest: generating secret for
>>>>> digest
>>>>> authentication ...
>>>>> [Thu Nov 19 09:35:53 2009] [notice] Digest: done
>>>>> [Thu Nov 19 09:35:54 2009] [notice] Apache/2.2.13 (FreeBSD)
>>>>> mod_ssl/2.2.13 OpenSSL/0.9.8e DAV/2 SVN/1.6.6 configured -- resuming
>>>>> normal operations
>>>>> [Thu Nov 19 09:36:10 2009] [error] [client 192.168.2.12]
>>>>> (20014)Internal
>>>>> error: Can't open file '/usr/home/svn/repos/default/format': No such
>>>>> file or directory
>>>>> [Thu Nov 19 09:36:10 2009] [error] [client 192.168.2.12] Could not
>>>>> fetch
>>>>> resource information.  [500, #0]
>>>>> [Thu Nov 19 09:36:10 2009] [error] [client 192.168.2.12] Could not
>>>>> open
>>>>> the requested SVN filesystem  [500, #2]
>>>>>
>>>>>
>>>>> What am I missing?
>>>>> Thank you,
>>>>> Glen
>>>>
>>>> Hi Glen,
>>>>
>>>> Please post the relevant bits from your httpd.conf where you set up the
>>>> SVNPath, etc.  It looks like maybe the SVNPath directive is pointing to
>>>> the wrong place.
>>>>
>>> Thanks for your reply.  I currently have this info in
>>> /usr/local/etc/apache22/Includes/svn.conf.  Apache22 loads all the conf
>>> files in this directory when httpd.conf is loaded.
>>> <Location /svn>
>>>         DAV svn
>>>         SVNParentPath /usr/home/svn/repos
>>>         SVNListParentPath on
>>>         SVNPathAuthz off
>>>         SVNIndexXSLT "/data-dist/svnindex.xsl"
>>>
>>>         # anonymous first
>>>         Satisfy Any
>>>         Require valid-user
>>>
>>>         # authenticating them valid ones
>>>         AuthType Basic
>>>         AuthName "Subversion Repositories"
>>>         AuthUserFile /usr/home/svn/access/users
>>> </Location>
>>>
> 
>> Hi Glen,
> 
>> At first glance, that looks OK to me. The next tests are:
> 
>> - - Does /usr/home/svn/repos/default exist? (I know, dumb question!)
> No, not so dumb.  It is good not to make assumptions that I may
> overlook.  This however is not one.  This is what I did to verify I do
> have a project.
> 1. svn co file:///usr/home/svn/repos def     # Then for fun I added
> hello.txt in def/trunk.  More about this below.
> 2. svn co svn://usr/home/svn/repos def    # Still works fine.
> 3. svn co file:///usr/home/svn/repos def    # SVN: Could not open the
> requested SVN filesystem (Error message from svn)
> 
>> - - If it does, are permissions set such that the httpd process user can
>> read the directory? You said "chmod 777" on the repository parent
>> directory didn't work.
> I tried:
> chmod -R 777 /usr/home/svn/repos
> chmod -R www:www /usr/home/svn/repos
> 
> By the way here are the settings for user www and group www.
> 
> grep www /etc/passwd
> www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
> 
> grep www /etc/group
> www:*:80:glen,root
> 
> 
>> - - Please post the output of "ls -laR /usr/home/svn/repos"
> First I noticed that there are some files that are owned by glen due to
> me adding repos/trunk/hello.txt.
> Ok you asked for this:
> total 24
> drwxrwxrwx  10 www   www  512 Nov 20 08:48 ./
> drwxrwxrwx   5 root  www  512 Nov 20 08:46 ../
> drwxrwxrwx   6 www   www  512 Nov 20 08:48 .svn/
> -rwxrwxrwx   1 www   www  229 Nov 20 08:46 README.txt*
> drwxrwxrwx   3 www   www  512 Nov 20 08:48 branches/
> drwxrwxrwx   2 www   www  512 Nov 20 08:46 conf/
> drwxrwxrwx   6 www   www  512 Nov 20 09:01 db/
> -rwxrwxrwx   1 www   www    2 Nov 20 08:46 format*
> drwxrwxrwx   2 www   www  512 Nov 20 08:46 hooks/
> drwxrwxrwx   2 www   www  512 Nov 20 08:46 locks/
> drwxrwxrwx   3 www   www  512 Nov 20 08:48 tags/
> drwxrwxrwx   3 www   www  512 Nov 20 08:48 trunk/
> 
[...]

Hi Glen,

Ok, I see what's going on now.  First, you have an SVNParentPath
directive in your httpd.conf file.  The directory on that line specifies
a place where multiple, separate Subversion repositories will appear, so
you could have a setup like this:

/usr/home/svn/repos
                   /internal-repos
                   /client-projects-repos
                   /oss-contrib-repos
                   ...
                   ...

In this case, each of those repository subdirectories would be created
like so:

svnadmin create /usr/home/svn/repos/internal-repos
svnadmin create /usr/home/svn/repos/client-projects-repos
svnadmin create /usr/home/svn/repos/oss-contrib-repos

So far, so good.

What I notice in your directory listings is that you have a Subversion
repository anchored at /usr/home/svn/repos, not in a subdirectory
therein.  This is going to cause problems with SVNParentPath, because it
will treat all subdirectories under there (e.g. conf/, db/, hooks/,
etc.) as Subversion repositories.  If you only plan to use that single
repository, your httpd.conf should read:

SVNPath /usr/home/svn/repos

instead of:

SVNParentPath /usr/home/svn/repos

Next, I notice that /usr/home/svn/repos also contains a Subversion
working copy, indicated by the directories .svn/, trunk/, tags/ and
branches/.  I recommend that you delete those and re-checkout your
repository into a new working directory somewhere else.

The reason you saw the message "error: Can't open file
'/usr/home/svn/repos/default/format': No such file or directory" was
because you had checked out the module "default" into the Subversion
repository directory, and then the SVNParentPath directive attempted to
enumerate the "default" directory as a Subversion repository.

Once you clean up those working copy directories and change
SVNParentPath to SVNPath, you should be in business.

Hope that helps,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/           - The Power To Serve
http://www.sourcehosting.net/     - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLBwhc0sRouByUApARAhYgAKCEn48Jw3UzJlxHhYR15qgWnVhiCwCbBFkC
wMMA6GWQbY2cFnUni/+oEDM=
=hfXh
-----END PGP SIGNATURE-----

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to