Ticket #152: cvsserver.patch

File cvsserver.patch, 8.3 KB (added by billy@…, 22 years ago)

adds the CVS server section, -Np1 from BOOK/server/other

  • cvsserver/cvsserver-exp.xml

    diff --exclude=CVS --exclude='leafnode*' --exclude='xinetd*' -Naur ./cvsserver/cvsserver-exp.xml /home/billy/NEWBLFS/BOOK/server/other/cvsserver/cvsserver-exp.xml
    old new  
     1<sect2>
     2<title>Command explanations</title>
     3
     4<para><userinput>mkdir /cvsroot :</userinput> Create the CVS repository
     5directory.</para>
     6
     7<para><userinput>chmod 1777 /cvsroot :</userinput> Sticky bit
     8permissions for CVSROOT.</para>
     9
     10<para><userinput>export CVSROOT=/cvsroot :</userinput> Specify new
     11CVSROOT for all cvs commands.</para>
     12
     13<para><userinput>cvs init :</userinput> Initialize the new CVS
     14repository.</para>
     15
     16<para><userinput>cvs import -m "repository test" cvstest vendortag
     17releasetag :</userinput> All source code modules must be imported
     18into the CVS repository before use, with the cvs import command.  the
     19-m flags specifies an initial descriptive entry for the new module.
     20the "cvstest" parameter is the name used for the module in all
     21subsequent cvs commands.  the "vendortag" and "releasetag" parameters
     22are used to further identify each CVS module and are mandatory whether
     23used or not.</para>
     24
     25<para><userinput>(grep anonymous /etc/passwd || useradd anonymous -s
     26/bin/false) :</userinput>  Check for an existing anonymous user and
     27create one if not found.</para>
     28
     29<para><userinput>echo anonymous: > /cvsroot/CVSROOT/passwd
     30:</userinput> Add the anonymous user to the CVS passwd file, which is
     31unused for anything else in this configuration.</para>
     32
     33<para><userinput>echo anonymous > /cvsroot/CVSROOT/readers :
     34</userinput> Add the anonymous user to the CVS readers file, a list of
     35users who have read only access to the repository.</para>
     36
     37</sect2>
     38
  • cvsserver/cvsserver-inst.xml

    diff --exclude=CVS --exclude='leafnode*' --exclude='xinetd*' -Naur ./cvsserver/cvsserver-inst.xml /home/billy/NEWBLFS/BOOK/server/other/cvsserver/cvsserver-inst.xml
    old new  
     1<sect2>
     2<title>Setting up a CVS server.</title>
     3
     4<para>We will discuss setting up a CVS server using OpenSSH as the
     5remote access method.  Other access methods, including :pserver: and
     6:server: will not be used for write access to the CVS repository.  The
     7:pserver: method sends clear text passwords over the network and the
     8:server: method is not supported in all CVS ports.  Instructions for
     9anonymous, read only CVS access using :pserver: can be found at the
     10end of this section.</para>
     11
     12<para>Configuration of our CVS server consists of four steps:</para>
     13
     14<sect3><title>1. Create a repository.</title>
     15<para>Create a new CVS repository with the following commands,
     16logged in as root:</para>
     17<para><screen><userinput>
     18mkdir /cvsroot &amp;&amp;
     19chmod 1777 /cvsroot &amp;&amp;
     20export CVSROOT=/cvsroot
     21cvs init</userinput></screen></para></sect3>
     22
     23<sect3><title>2. Import source code into the repository.</title>
     24<para>Import a source module into the repository with the following
     25commands, issued from a user account on the same machine as the CVS
     26repository:</para>
     27
     28<para><screen><userinput>
     29export CVSROOT=/cvsroot &amp;&amp;
     30cd sourcedir &amp;&amp;
     31cvs import -m "repository test" cvstest vendortag releasetag
     32</userinput></screen></para></sect3>
     33
     34<sect3><title>3. Verify local repository access.</title>
     35<para>Test access to the CVS repository from the same user account
     36with the following command:</para>
     37
     38<para><screen><userinput>
     39cvs co cvstest
     40</userinput></screen></para></sect3>
     41
     42<sect3><title>4. Verify remote repository access.</title>
     43<para>Test access to the CVS repository from a remote machine using a
     44user account that has ssh access to the CVS server with the following
     45commands:
     46<note><para>Replace "servername" with the IP address or host name
     47ofthe CVS repository machine.  You will be prompted for the user's
     48shellaccount password before CVS checkout can
     49continue.</para></note></para>
     50
     51
     52<para><screen><userinput>
     53export CVS_RSH=/usr/bin/ssh &amp;&amp;
     54cvs -d:ext:servername:/cvsroot co cvstest
     55</userinput></screen></para></sect3>
     56</sect2>
     57<sect2>
     58<title>Configuring CVS for anonymous read only access.</title>
     59
     60<para>CVS can be set up to allow anonymous read only access using the
     61:pserver: method by logging on as root and executing the following
     62commands:</para>
     63
     64<para><screen><userinput>
     65(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &amp;&amp;
     66echo anonymous: > /cvsroot/CVSROOT/passwd &amp;&amp;
     67echo anonymous > /cvsroot/CVSROOT/readers
     68</userinput></screen></para>
     69
     70<para>If you use inetd, the following command will add the pserver
     71entry to /etc/inetd.conf:</para>
     72
     73<para><screen><userinput>
     74echo "2401  stream  tcp  nowait  root  /usr/bin/cvs cvs -f \
     75        --allow-root=/cvsroot pserver" &gt;&gt; /etc/inetd.conf
     76</userinput></screen></para>
     77
     78<para>Issue a killall -HUP inetd to reread the changed inetd.conf
     79file.</para>
     80
     81<para>If you use xinetd, the following command will add the pserver
     82entry to /etc/xinetd.conf:</para>
     83
     84<para><screen><userinput>
     85cat &gt;&gt; /etc/xinetd.conf &lt;&lt; "EOF"
     86     service cvspserver
     87     {
     88          port        = 2401
     89          socket_type = stream
     90          protocol    = tcp
     91          wait        = no
     92          user        = root
     93          passenv     = PATH
     94          server      = /usr/bin/cvs
     95         server_args = -f --allow-root=/cvsroot pserver
     96     }
     97EOF
     98</userinput></screen></para>
     99<para>Issue a killall -HUP xinetd to reread the changed xinetd.conf
     100file.</para>
     101
     102<para>Testing anonymous access to the new repository requires an account
     103on another machine that can reach the CVS server via network.  No
     104account on the CVS repository is needed.  To test anonymous access to
     105the CVS repository log in to another machine as an unprivileged user
     106and execute the following command:</para>
     107
     108<para><screen><userinput>
     109cvs -d:pserver:anonymous@servername:/cvsroot co cvstest
     110</userinput></screen><note><para>Replace "servername" with the IP
     111address or hostname of the CVS server</para></note></para>
     112
     113</sect2>
     114
     115
  • cvsserver/cvsserver-intro.xml

    diff --exclude=CVS --exclude='leafnode*' --exclude='xinetd*' -Naur ./cvsserver/cvsserver-intro.xml /home/billy/NEWBLFS/BOOK/server/other/cvsserver/cvsserver-intro.xml
    old new  
     1<sect2>
     2<title>Running a CVS server</title>
     3
     4<para>This section will describe how to set up, administer and secure
     5a CVS server.</para>
     6
     7<screen>In order to install a CVS server You will need:
     8<xref linkend="cvs"/> and <xref linkend="openssh"/>.
     9</screen>
     10
     11</sect2>
  • cvsserver/cvsserver.ent

    diff --exclude=CVS --exclude='leafnode*' --exclude='xinetd*' -Naur ./cvsserver/cvsserver.ent /home/billy/NEWBLFS/BOOK/server/other/cvsserver/cvsserver.ent
    old new  
     1<!ENTITY cvsserver SYSTEM "../cvsserver.xml">
     2<!ENTITY cvsserver-intro SYSTEM "cvsserver-intro.xml">
     3<!ENTITY cvsserver-inst SYSTEM "cvsserver-inst.xml">
     4<!ENTITY cvsserver-exp SYSTEM "cvsserver-exp.xml">
  • cvsserver.xml

    diff --exclude=CVS --exclude='leafnode*' --exclude='xinetd*' -Naur ./cvsserver.xml /home/billy/NEWBLFS/BOOK/server/other/cvsserver.xml
    old new  
    1 <sect1 id="server-other-cvsserver">
     1<sect1 id="cvsserver" xreflabel="cvsserver">
    22<?dbhtml filename="cvsserver.html" dir="server"?>
    3 <title>Running a cvs server</title>
     3<title>Running a CVS server</title>
    44
    5 <para>???</para>
     5&cvsserver-intro;
     6&cvsserver-inst;
     7&cvsserver-exp;
    68
    79</sect1>
     10
  • other.xml

    diff --exclude=CVS --exclude='leafnode*' --exclude='xinetd*' -Naur ./other.xml /home/billy/NEWBLFS/BOOK/server/other/other.xml
    old new  
    33<title>Other Server Software</title>
    44
    55&openssh;
    6 &server-other-cvsserver;
     6&cvsserver;
    77&bind;
    88&dhcp;
    99&xinetd;