![]() |
|
||||||||
|---|---|---|---|---|---|---|---|---|---|
|
|
The path of the CVS repository can be specified with
the cvs -d /afs/psi.ch/project/linux/cvsroot co linux Or you can tell CVS the repository path with
the export CVSROOT=/afs/psi.ch/project/linux/cvs/root and with (T)csh: setenv CVSROOT /afs/psi.ch/project/linux/cvs/root After setting the environment variable you can enter the above CVS command as follows: cvs co linux
Creating a new repository take place in several steps. In the first step we initialize the repository. In the following steps you have to set access permissions for the different kind of users. In this section we describe the recommended creation of a CVS repository at PSI. The directory layout differs from the usual one, but there a good reasons to follow our recommendation. The following example demonstrates how to create a new
repository for a project cd /afs/psi.ch/project/linux pts creategroup linux_adm:cvs_adm -owner linux_adm
To grant all users inside an AFS group read and write access to a repository, set the ACL's as follows: cd /afs/psi.ch/project/linux/cvs pts creategroup linux_adm:cvs_rw -owner linux_adm:cvs_adm
Add all users with read/write access to a
“read/write” group. In the above example, we use the group The user needs a valid AFS token to access the repository The configuration for read/write access via the gateway is the same as for direct read/write access. You will be ask for your AFS password. To grant all users inside an AFS group read-only access to a repository, set the ACL's as follows: cd /afs/psi.ch/project/linux/cvs pts creategroup linux_adm:cvs_ro -owner linux_adm:cvs_adm
Add users with read-only access to a
“read-only” group. In the above example, we use
the group The user needs a valid AFS token to access the repository The configuration for read-only access via the gateway is the same as for direct read-only access. You will be ask for your AFS password. Direct anonymous read-only access is not recommended! There are several problems with anonymous read access to a CVS repository on AFS. The biggest problem is, that CVS must be able to create lock files - even for a checkout. Thus there must be a worldwide access-able directory where CVS can create and delete files! Thus there must be a directory where anybody in the world running an AFS client can store and remove files! This is nothing we want ... The recommended solution is to access the repository via a gateway with CVS over SSH. To grant the anonymous user read-only access, configure the following access lists: cd /afs/psi.ch/project/linux/ find cvs/root -type d -noleaf \
The ACL's are the same as for authenticated read-only
access. The reason not to add the “user”
The next step is to configure the repository, so that
commits from anonymous users will be denied. For this you have
to add a line to the CVS configuration file
cvs checkout CVSROOT cd CVSROOT echo "ALL /usr/bin/cvs_deny_anonymous_commits" >> commitinfo cvs commit -m "Added ALL check" commitinfo Read the added line as: For ALL
modules call the specified program to check whether commits
are allowed or not. The program
cvs_deny_anonymous_commits denies commits
for the users This is the case if you are working at PSI and have a working AFS connection, both from Linux or Windows clients. Since the repository is seen within the normal global file system structure you just need to use your CVS client. cvs -d /afs.psi.ch/project/linux/cvs/root co . In this case you have to use the Savanna gateway and
the export CVS_RSH=ssh cvs -d :ext:johnsmit@savannah.psi.ch:/afs/psi.ch/project/linux/cvsroot co . Just enter your normal AFS password. For anonymous access you can use the account
|