Re: [viewvc-users] mutiple root_parents and authzfile

Jehan PROCACCIA <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization Telecom et Management SudParis.
Message-ID <[email protected]>
Le 18/01/2011 17:09, C. Michael Pilato a écrit :
> On 01/18/2011 09:31 AM, Jehan PROCACCIA wrote:
>> but if I correctly understand you , having multiple authzfile corresponding
>> to each root_parents  is not possible ?
> You understand me correctly.
>
>> Alternatively, as you suggested, I tried to use a single authz file for both
>> roots, but now I get no view of any repository :-( , perhaps, I
>> missconfigure the concat authz file
>> here is the situation, I have 2 svn repo roots:
>> /var/svn/staff
>> /var/svn/stud
>>
>> below /var/svn/staff there's a  "AuthzSVNAccessFile" (apache terminology)
>> and dozens of repos like /var/svn/staff/rep1 , /var/svn/staff/rep2 etc ...
>> Identically for /var/svn/stud, /var/svn/stud/root_authz, /var/svn/stud/rep1
>> /var/svn/stud/rep2 ...
>>
>> My  /var/svn/super_root_authz pointed by
>> [authz-svnauthz]
>> authzfile = /var/svn/super_root_authz
>>
>> contains repo definitions like that
>>
>> [staff/rep1:/]
>> user1 = rw
> ViewVC is going to try to match the "name" of the repository against the
> repository name inside the authz file.  The "name" of the repository is
> going to be its basename on disk.  Thus, the "name" of the repository at
> /var/svn/stud/rep1 is "rep1".  So your authz file will need to use "rep1" as
> the repository name, too, not "stud/rep1".
>
> You might at this point think, "Uh-oh.  I have two repositories which will
> have the same name because their basenames are identical."  For example,
> maybe you have /var/svn/stud/team-repo and /var/svn/staff/team-repo.  Yes,
> that will be a problem for ViewVC -- one of those repositories will be
> inaccessible to ViewVC.
>
> If the above doesn't work for you, then it's *possible* that you can make
> this work via another workaround, namely, instead of defining authzfile like so:
>
>     [authz-svnauthz]
>     authzfile = /some/path
>
> You use per-root configuration to specify, for each and every individual
> repository, which authz file consult:
>
>     [root-rep1/authz-svnauthz]
>     authzfile = /some/path
>
>     [root-rep2/authz-svnauthz]
>     authzfile = /some/other/path
>
> But I've not tried this myself, and I know that per-root configuration
> overrides have had a history of being broken in various ways.  And of
> course, the downside is that every time you add a new repository, you have
> to remember to add configuration for it in viewvc.conf, too.  :-(
>
Ok, then I'll use my "super_root_authz" => concat of all parents authz 
files.
I will prefix each repo name  by it's parent directory name to prevent 
identical repo names, ei:

[staff-rep1:/]
user1 = rw

[stud-rep2:/]
user2 = r
etc ...

it seems to work that way
thanks .

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2698924

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.