3. Setting up the toolsNow that CVS and cvsd are built, let's set them up. 3.1. Creating the CVS RepositoryBefore we begin, I strongly recommend you read the CVS manual that was installed with the rest of CVS. If the stand-alone info browser or the texinfo package is installed on your system, you can see this manual by typing the command info cvs at your shell. First, plan out where you want your repository. Debian defaults to /var/lib/cvs. My repository is under the directory /cvs/root, and is on its own small partition. What you do depends on your needs and can vary widely.
After you have planned where you want to put your repository, made the necessary partitions, if desired, and run the following command (we assume that it will be at /cvs/root): That will initialize your repository and set up the necessary CVSROOT files. 3.2. Setting up the jailNow that we have the CVSROOT set up, we need to copy the appropriate libraries and files for cvsd, which runs the Pserver in the chroot jail. 3.2.1. Transferring the necessary files
Thankfully, cvsd comes with the script cvsd-buildroot, so we don't have to do all the necessary copying by hand. However, you should edit the /cvs/etc/passwd file, and remove the entry for "root," as it's unneeded. 3.2.2. Configuring cvsdThe defaults in /etc/cvsd/cvsd.conf are okay, but can be less than desirable. Make sure that RootJail is set to wherever the chroot jail you built is, and the repository is the directory where the repository is relative to the chroot jail. Set maxconnections to whatever you desire, and make sure that Uid and Gid are set to cvsd. If you are lacking an already-built cvsd.conf file, here is mine: 3.3. Adding anonymous accessIt's back to configuring CVS, but don't worry, we are almost there! We have to edit a couple of necessary files to allow for anonymous access. First, making sure you aren't in the CVS directory, check out the CVSROOT module: Now edit the file READERS. Create it if it isn't there, and add a line that reads "anonymous".
Now commit the repository with the command below. We assume that your current working directory is CVSROOT. If it isn't, forget the cd step. You should now get a message that says something like Re-building administrative files, which means that it was successful. One last step and we're all done! Run the following command, and when prompted for a password, just press ENTER: Congratulations! You now have secure, anonymous CVS Pserver access to the repository! 3.4. Not quite done yet! Changing lock file locationsThere is one small feature here that is really beyond the scope of this Mini-HOWTO but is worth noting nonetheless. It is the ability to change the directory where the Pserver will place lock files. Normally the Pserver will place lock files in the same directory as the files that you are trying to check out, but this can cause permissions mayhem. Step back to when we built the chroot jail for cvsd; we also created the directory var/lock. This is where we will place the lockfiles instead. So use the following example, replacing /cvs with wherever your chroot environment is, and var with wherever the locks are going to be placed. Mine are placed in var/lock, and there is nothing else under var, so a chown -R is safe. Also, replace the cvsd user and group ids with the user and group ids that cvsd runs as.
Now we want to edit the file config. Change lock dir to the directory you want the locks to be placed, in our case /var/lock.
And that's it! Notes
Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |