<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux for Fun &#187; Development</title>
	<atom:link href="http://linuxforfun.net/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxforfun.net</link>
	<description>Just for Fun</description>
	<lastBuildDate>Tue, 15 Sep 2009 00:12:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using `cvsd&#8217; to setup cvs pserver</title>
		<link>http://linuxforfun.net/2008/04/27/cvsd-setup-cvs-pserver/</link>
		<comments>http://linuxforfun.net/2008/04/27/cvsd-setup-cvs-pserver/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 12:00:52 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[cvsd]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/?p=16</guid>
		<description><![CDATA[CVS was designed to use `xinetd&#8217; to startup service. But now most Linux distributions do not install xinetd by default, and configuration of CVS is somewhat complicated. `cvsd&#8216; is a wrapper program for CVS in pserver mode, it can startup CVS as a standalone daemon, under a special uid/gid in a chroot jail. It is [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Using `cvsd&#8217; to setup cvs pserver", url: "http://linuxforfun.net/2008/04/27/cvsd-setup-cvs-pserver/" });</script>]]></description>
			<content:encoded><![CDATA[<p>CVS was designed to use `xinetd&#8217; to startup service.  But now most Linux distributions do not install xinetd by default, and configuration of CVS is somewhat complicated. `<a href="http://ch.tudelft.nl/~arthur/cvsd/">cvsd</a>&#8216; is a wrapper program for CVS in pserver mode, it can startup CVS as a standalone daemon, under a special uid/gid in a chroot jail.  It is relatively easy to use cvsd and its configuration file to setup CVS repositories.</p>
<p>In this article, I will describe how to setup a cvs pserver step by step.</p>
<p><strong>1. Installation of cvsd package</strong></p>
<p>For RPM-based distributions, you may download precompiled RPMS from this site:</p>
<blockquote><p><a href="http://linuxforfun.net/misc/cvsd-1.0.14-1.i386.rpm">cvsd-1.0.14-1.i386.rpm</a><br />
<a href="http://linuxforfun.net/misc/cvsd-1.0.14-1.src.rpm">cvsd-1.0.14-1.src.rpm</a> (source)</p></blockquote>
<p>For other distributions, you may download source tarball <a href="http://ch.tudelft.nl/~arthur/cvsd/downloads.html">here</a>, compile and install it yourself.</p>
<p><span id="more-16"></span></p>
<p><strong>2. Configuration file /etc/cvsd/cvsd.conf</strong></p>
<p>Check cvsd&#8217;s configuration file /etc/cvsd/cvsd.conf.   Something should be mentioned:</p>
<ul>
<li>RootJail: the location of the chroot jail cvs should be run in.  The default value should like<br />
<blockquote><p><code>RootJail /var/lib/cvsd</code></p></blockquote>
<p>For RPM-based installation, the installation process should have initialized this directory for you, by the command</p>
<blockquote><p><code># cvsd-buildroot /var/lib/cvsd</code></p></blockquote>
<p>If the directory is not initialized yet, or you change `RootJail&#8217; to another directory, you need to use the command `cvsd-buildroot&#8217; to initialize it by hand.</li>
<li>Uid and Gid: the user and group cvsd should be run as.  The default values:<br />
<blockquote><p><code>Uid cvsd<br />
Gid cvsd</code></p></blockquote>
<p>For non-RPM based installation, you need to create them by hand.</li>
<li>Repos: paths to repositories, one repository per line. Every path is relative to RootJail and begins with a `/&#8217;.  For example:<br />
<blockquote><p><code>Repos /coolsoft<br />
Repos /hotsoft</code></p></blockquote>
</li>
</ul>
<p><strong>3. Creation of repositories</strong></p>
<p>To create a repository, for example, `coolsoft&#8217;, use the command:</p>
<blockquote><p><code># cvs -d /var/lib/cvsd/coolsoft init</code></p></blockquote>
<p>The command will create a directory /var/lib/cvsd/coolsoft and a CVSROOT tree in it.</p>
<p>If you allow users to create top level directories in this repository:</p>
<blockquote><p><code># chown cvsd:cvsd /var/lib/cvsd/coolsoft</code></p></blockquote>
<p>Edit the file <code>/var/lib/cvsd/coolsoft/CVSROOT/config</code> and modify the `LockDir&#8217; option:</p>
<blockquote><p><code>LockDir /tmp/coolsoft</code></p></blockquote>
<p>The directory is relative to `RootJail&#8217;, /var/lib/cvsd. Create the directory:</p>
<blockquote><p><code># mkdir /var/lib/cvsd/tmp/coolsoft<br />
# chown cvsd:cvsd /var/lib/cvsd/tmp/coolsoft</code></p></blockquote>
<p>Now create users that can access this repository and set the passwords:</p>
<blockquote><p><code># cvsd-passwd /var/lib/cvsd/coolsoft jack</code></p></blockquote>
<p>If you want anonymous access to your repository, create a user named `anonymous&#8217; or `anoncvs&#8217;, and leave the password blank:</p>
<blockquote><p><code># cvsd-passwd /var/lib/cvsd/coolsoft anoncvs</code></p></blockquote>
<p>Create a new file <code>/var/lib/cvsd/coolsoft/CVSROOT/writers</code>:</p>
<blockquote><p><code># touch /var/lib/cvsd/coolsoft/CVSROOT/writers</code></p></blockquote>
<p>to protect write access to the repository.  Without this file, all users have write access!  Add users you want write access to this file, one user per line.</p>
<p>Optional, create top level directories in your repository that will hold files committed:</p>
<blockquote><p><code># cd /var/lib/cvsd/coolsoft<br />
# mkdir client server<br />
# chown cvsd:cvsd client server</code></p></blockquote>
<p><strong>4. Startup cvsd and test your repositories</strong></p>
<p>To startup cvsd, use the command</p>
<blockquote><p><code># /etc/init.d/cvsd start</code></p></blockquote>
<p>To test the new repository:</p>
<blockquote><p><code># cvs -d :pserver:jack@myhost.at.office/coolsoft login<br />
# cvs -d :pserver:jack@myhost.at.office/coolsoft co client</code></p></blockquote>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=0528fcb2-917b-4b68-8e53-491409263a87&amp;title=Using+%60cvsd%26%238217%3B+to+setup+cvs+pserver&amp;url=http%3A%2F%2Flinuxforfun.net%2F2008%2F04%2F27%2Fcvsd-setup-cvs-pserver%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/04/27/cvsd-setup-cvs-pserver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
