<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Using CVS with OpenACS</title><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="home" href="index.html" title="OpenACS Core Documentation"><link rel="up" href="cvs-guidelines.html" title="Chapter�14.�
    CVS Guidelines
  "><link rel="previous" href="cvs-guidelines.html" title="Chapter�14.�
    CVS Guidelines
  "><link rel="next" href="openacs-cvs-concepts.html" title="OpenACS CVS Concepts"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0" alt="Alex logo"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="cvs-guidelines.html">Prev</a> </td><th width="60%" align="center">Chapter�14.�
    CVS Guidelines
  </th><td width="20%" align="right"> <a accesskey="n" href="openacs-cvs-concepts.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="using-cvs-with-openacs"></a>Using CVS with OpenACS</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607797"></a>Getting Started</h3></div></div></div><p>
        All OpenACS code is available anonymously.  To get code
      anonymously, use the parameter
      <code class="computeroutput">-d:pserver:anonymous@cvs.openacs.org:/cvsroot</code> immediately after <code class="computeroutput">cvs</code> in a cvs command to check out or export code.
      </p><p>
        If you are an OpenACS developer, you should check out code so
        that you or any other developer can commit it.  To do this, use
        the parameter
        <code class="computeroutput">-d:ext:cvs.openacs.org:/cvsroot</code>
        immediately after <code class="computeroutput">cvs</code> in
        checkout commands.  This will create a local checkout directory
        that uses cvs.openacs.org but does not specify the user.  By
        default, it will use your local account name as the user, so if
        you are logged in as "foobar" it will try to check out and
        commit as if you had specified
        <code class="computeroutput">:ext:foobar@cvs.openacs.org:/cvsroot</code>.  The advantage of not specifying a user in the checkout command is that other users can work in the directory using their own accounts.
      </p><p>
        OpenACS.org supports non-anonymous cvs access only over ssh, so you
        must have <code class="computeroutput">CVS_RSH=ssh</code> in your
        environment.  (Typically this is accomplished by putting
        <code class="computeroutput">export CVS_RSH=ssh</code> into
        <code class="computeroutput">~/.bash_profile</code>.).  If your local
        account name does not match your cvs.openacs.org account name, create a
        file <code class="computeroutput">~/.ssh/config</code> with an entry
        like:
      </p><pre class="programlisting">Host cvs.openacs.org
    User joel
</pre><p>
        With this setup, you will be asked for your password with
        each cvs command.  To avoid this, set up ssh certificate
        authentication for your openacs account.  (<a href="http://www.uberdose.com/kbase/ssh-automatic-login/" target="_top">More
        information</a>)
      </p><p>
        You may want to set some more default actions for CVS usage.
  To do so, create the file
        <code class="computeroutput">~/.cvsrc</code> with the contents:
      </p><pre class="screen"><span class="action"><span class="action">cvs -z6
cvs -q</span></span></pre><p><code class="computeroutput">-z6</code> speeds up cvs access over the network quite a bit by enabling compressed
        connection by default.  <code class="computeroutput">-q</code> suppresses some verbose output from commands.  For example, it makes the output of <code class="computeroutput">cvs up</code> much easier to read.</p><div class="sidebar"><p>Administrator Note: These are the steps to grant CVS commit rights to a user:</p><div class="orderedlist"><ol type="1"><li><p>Create the user's account.  On cvs.openacs.org:</p><pre class="screen"><span class="action"><span class="action">sudo bash
/usr/sbin/useradd -c "<span class="replaceable"><span class="replaceable">Real Name</span></span>" -G cvs,<span class="replaceable"><span class="replaceable">username</span></span> -p <span class="replaceable"><span class="replaceable">passwd</span></span> <span class="replaceable"><span class="replaceable">username</span></span></span></span></pre></li><li><p>Grant cvs access to the user account.  On any machine, in a temporary directory:</p><pre class="screen"><span class="action"><span class="action">cvs -d :ext:cvs.openacs.org:/cvsroot co CVSROOT
cd CVSROOT
emacs avail</span></span></pre><p>Add an avail line of the form:</p><pre class="programlisting">avail|<span class="replaceable"><span class="replaceable">username</span></span>|openacs-4</pre><pre class="screen"><span class="action"><span class="action">cvs commit -m "added commit on X for username" avail</span></span></pre></li></ol></div></div><div class="sidebar"><p>Branimir suggests an additional level of abstraction.  If you put</p><pre class="programlisting">Host cvs-server
      HostName cvs.openacs.org
      User <span class="replaceable"><span class="replaceable">yournamehere</span></span></pre><p>into your <code class="computeroutput">~/.ssh/config</code> file, then you can use <code class="computeroutput">-d :ext:cvs-server:/cvsroot</code> instead of <code class="computeroutput">-d :ext:cvs.openacs.org:/cvsroot</code>.  You can then change the definition of <code class="computeroutput">cvs-server</code> by changing one file instead of editing hundreds of <code class="computeroutput">CVSROOT/Repository</code> files.</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2598414"></a>Checkout for Package Development</h3></div></div></div><p>If you are actively developing a non-core package, you
      should work from the latest core release branch.  Currently this
      is oacs-5-2.  This ensures that you are working on top
      of a stable OpenACS core, but still allows you to commit feature
      changes to non-core packages.  To check out all packages,</p><pre class="screen"><span class="action"><span class="action">cvs -d :ext:cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4</span></span></pre><p>If you work in the directories created with this command, all of your
            cvs updates and commits will be confined to the oacs-5-2
            branch.  Your work will be merged back to HEAD for you
            with each release.</p><p>Because the entire openacs-4 directory is large, you may
      want to use only acs-core plus some specific modules.  To do
      this, check out core first:</p><pre class="screen"><span class="action"><span class="action">cvs -d:ext:cvs.openacs.org:/cvsroot -r oacs-5-2 checkout acs-core</span></span></pre><p>Then add modules as needed:</p><pre class="screen"><span class="action"><span class="action">cd /var/lib/aolserver/<span class="replaceable"><span class="replaceable">service0</span></span>/packages
cvs up -d <span class="replaceable"><span class="replaceable">packagename</span></span></span></span></pre><p>... where <span class="replaceable"><span class="replaceable">packagename</span></span> is the
            name of the package you want. Visit the <a href="http://openacs.org/packages" target="_top"> Package
            Inventory</a> and <a href="http://openacs.org/projects/openacs/packages/" target="_top">Package
            maintainers and status</a> for a list of available
            packages and their current state.
      </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2576613"></a>Checkout for Core Development</h3></div></div></div><p>If you are actively developing packages in the OpenACS
      Core, work from the HEAD branch.  HEAD is used for active
              development of the next version of core OpenACS. It may be very
              buggy; it may not even install correctly. Do not use this branch for
              development of non-core features unless your work depends on some
              of the HEAD core work. To check out HEAD, omit the
              <code class="computeroutput">-r</code> tag.</p><p></p><p>To check out HEAD for development, which requires an OpenACS developer account:</p><pre class="screen"><span class="action"><span class="action">cvs -d:ext:cvs.openacs.org:/cvsroot checkout acs-core</span></span></pre><p>To check out HEAD anonymously:</p><pre class="screen"><span class="action"><span class="action">cvs -d:pserver:anonymous@cvs.openacs.org:/cvsroot checkout acs-core</span></span></pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2595919"></a>Checkout .LRN</h3></div></div></div><p>
        .LRN consists of a given version openacs core, plus a set of
        packages. These are collectively packages together to form a
        distrubution of .LRN. F .LRN 2.0.0 sits on top of OpenACS 5.0.0.
        .LRN also uses an OpenACS install.xml file during installation;
        this file is distributed within the dotlrn package and must be
        moved. To get a development checkout of .LRN in the subdirectory
        <code class="literal">dotlrn</code>:
      </p><pre class="screen"><span class="action"><span class="action">cvs -d :pserver:anonymous@cvs.openacs.org:/cvsroot checkout -r oacs-5-2 acs-core
mv openacs-4 dotlrn
cd dotlrn/packages
cvs -d :pserver:anonymous@cvs.openacs.org:/cvsroot checkout -r oacs-5-2 dotlrn-all
mv dotlrn/install.xml ..</span></span></pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="working-with-cvs"></a>Working with CVS</h3></div></div></div><p>
      Once you have a checkout you can use some commands to track
      what has changed since you checked out your copy.  <code class="computeroutput">cvs -n update</code> does not change any files, but reports which changes have been updated or locally modified, or are not present in CVS.
    </p><p>To update your files, use <code class="computeroutput">cvs update</code>.  This will merge changes from the repository with your local files.  It has no effect on the cvs.openacs.org repository.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="cvs-guidelines.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="openacs-cvs-concepts.html">Next</a></td></tr><tr><td width="40%" align="left">Chapter�14.�
    CVS Guidelines
   </td><td width="20%" align="center"><a accesskey="u" href="cvs-guidelines.html">Up</a></td><td width="40%" align="right"> OpenACS CVS Concepts</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/current/using-cvs-with-openacs.html#comments">View comments on this page at openacs.org</a></center></body></html>