[BACK]Return to anoncvs.html CVS log [TXT][DIR] Up to [local] / www

File: [local] / www / anoncvs.html (download) (as text)

Revision 1.214, Wed Jul 7 18:00:40 2004 UTC (19 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.213: +10 -2 lines

Add ssh fingerprints for anoncvs{1,3}.usa

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>OpenBSD AnonCVS</title>
<link rev="made" href="mailto:www@openbsd.org">
<meta name="resource-type" content="document">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="How to get OpenBSD updates via Internet using Anonymous CVS">
<meta name="keywords" content="openbsd,anoncvs,updates">
<meta name="distribution" content="global">
<meta name="copyright" content="This document copyright 1996-2004 by OpenBSD.">
</head>

<body bgcolor="#ffffff" text="#000000" link="#23238e">

<a href="index.html"><img alt="[OpenBSD]" height="30" width="141" src="images/smalltitle.gif" border="0"></a>
<p>
<h2><font color="#e00000">Anonymous CVS</font></h2>

<hr>

<h3>Table Of Contents</h3>

<ul>
<li><a href="#anoncvs">What is Anonymous CVS?</a>
<li><a href="#CVS">What is CVS?</a>
<li><a href="#starting">Getting Started Using Anonymous CVS</a>
<li><a href="#using">Using CVS to Get and Update your Source Tree</a>
<li><a href="#CVSROOT">Available Anonymous CVS Servers</a>
<li><a href="#CRYPTO">Getting crypto sources through cvs(1)</a>
<li><a href="#EXAMPLE">Example usages for cvs(1)</a>
<li><a href="#WHICH">Use rsh(1) or ssh(1)?</a>
<li><a href="#SUP">Mirroring the CVS repository via sup(1)</a>
<li><a href="#MIRROR">Setting up an anoncvs mirror</a>
</ul>

<hr>

<h3><a name="anoncvs"><font color="#0000e0">What is Anonymous CVS?</font></a></h3>

<p>
Anonymous CVS is a method of keeping your local copy of the OpenBSD source
tree up to date with respect to changes made to current OpenBSD sources.
In addition to following the bleeding edge of development, it is
also possible to track the patches for errata of a release.
</p>

<p>
The major advantage of Anonymous CVS over other source code update
techniques is that it works directly against a central source code
repository or mirror.  This means that you have the full set of CVS
commands available to control merging and updating your changes with
other source changes and for performing diffs, change histories
and other queries against the central repository.
</p> 

<p>
The OpenBSD Project currently has five main source repositories:
</p>

<ul>
  <li><b>src</b> - Houses all source code for the OpenBSD Operating System.</li>
  <li><b>ports</b> - Houses the <a href="./ports.html">OpenBSD Ports</a>.</li>
  <li><b>www</b> - Houses all OpenBSD web pages. (Including this one).</li>
  <li><b>X11</b> - Houses OpenBSD's adaptation of the
      <a href="http://www.XFree86.org/">XFree86-3</a> software project.</li>
  <li><b>XF4</b> - Houses OpenBSD's adaptation of the
      <a href="http://www.XFree86.org/">XFree86-4</a> software project.</li>
</ul>

<p>
To summarize, the real strength of using Anonymous CVS is that it is
a "tolerant" source code control system - it <strong>respects</strong>
changes that you have made to your local sources and makes <strong>
"best efforts"</strong> to update your entire source tree, rather than
leaving you a list of arcane problems that have to be resolved before
continuing.
</p>

<h3><a name="CVS"><font color="#0000e0">What is CVS?</font></a></h3>

<p>
<a href="why-cvs.html">
CVS is the source code control system used to manage the OpenBSD source tree.</a>
It implements a central repository for all officially released source code
and changes, while permitting developers to maintain local copies of the
source code with their working changes.  Developers with "<b>write access</b>"
can commit changes directly to the OpenBSD source tree, while "Anonymous
CVS" users have "<b>read access</b>" and can keep their local copies of the 
source up to date and issue queries against the central repository.
</p>

<p>
The major strength of CVS is that it has the ability to perform intelligent
merges of changes to the central repository with changes that you make to
your local copy.  This means that if you make a change to a module and
perform an update, your changes are not "blown away", rather CVS makes
best efforts to merge the changes made to the central sources with changes
you've made to your local copy.
</p>

<p>
In the event that the changes can't be completely merged, CVS provides a
"soft fallback", in terms of providing you with annotated changes to your
local copy, preserving an unmodified copy of your version and continuing
to update any other source modules you requested.
</p>

<h3><a name="starting"><font color="#0000e0">Getting Started Using Anonymous 
CVS</font></a></h3>

<p>
The latest version of CVS is available at
<a href="http://www.cvshome.org/">Cyclic</a>.
Versions earlier than 1.6 are not recommended, and may not work.
If you already have OpenBSD installed, CVS is included.
</p>

<p>
People who own an OpenBSD CD may have seen the <i>CVS/</i> dirs on it.
Actually there is a reason, the CD has a checkout of the OpenBSD <b>src</b> 
module usable to continue updating from.  Using this tree will result in a much
faster initial CVS update than a fresh checkout of the full OpenBSD
source tree.  There are two ways of using the CD:
</p>

<ul>
<li>To copy the CVS tree from the CD to <i>/usr/src</i> (assuming the CD is 
mounted on /mnt):
<pre>
	# <b>cd /mnt; pax -rw CVS Makefile [a-z]* /usr/src</b>
</pre>
<li>Use a union mount (see <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mount_union&amp;apropos=0&amp;sektion=8&amp;manpath=OpenBSD+Current&amp;format=html">mount_union(8)</a>)
with the CD below a writable directory. (This can be used when only compiling from the tree.)
<pre>
	# <b>mount -t union -o -b /mnt /usr/src</b>
</pre>
</ul>

<p>
For people who don't have a CD on hand, you can use <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=cvs&amp;sektion=1&amp;format=html">
cvs(1)</a> to "<b>checkout</b>" the source repository for you. This is 
discussed in the <a href="#using">next section</a>.
</p>

<p>
After this, <i>/usr/src</i> will be a nice checkout area where all
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=cvs&amp;sektion=1&amp;format=html">
cvs(1)</a> commands will work OK.
</p>

<h3><a name="using"><font color="#0000e0">Using CVS to get and update your 
source tree</font></a></h3>

<p>
CVS was designed to be a simple way to retrieve and update your sources,
therefore there isn't much involved at all in doing so.  You must first
decide whether you want to track <i>current</i> or a patch branch.
The current tree has all of the up to the minute changes,
whereas a patch branch contains a formal release plus the patches
from the <a href="errata.html">errata</a> already applied. For a definition
of <i>current</i>, see the <a href="faq/upgrade-minifaq.html#1.1">Upgrade 
Mini-FAQ</a>.

<p>Once you have decided which tree to follow, you must choose which Anonymous
CVS server you are going to use.  A list of these servers is
<a href="#CVSROOT">below</a>.  Do, however, notice that there are three ways
to access these servers.
</p>

<dl>
<dt><b>ssh</b><dd>Secure Shell can be used to access the anonymous CVS servers.
This is the <em>recommended</em> way of doing so, as it is encrypted. As of
2.6, OpenBSD has included OpenSSH in its standard distribution.
<dt><b>rsh</b><dd>Remote Shell can be used on some of the servers for users 
who don't have access to <a href="http://www.openssh.com/">ssh</a>.
<dt><b>pserver</b><dd>pserver is primarily useful for users who are behind
firewalls that block the other two connections.
</dl>

<p>
<b>NOTE:</b> For users wishing to use rsh, you must first set the
<var>CVS_RSH</var> variable to rsh.

<ul>
<li>For Korn/Bourne shells:
<pre>
	$ <b>export CVS_RSH=/usr/bin/rsh</b>
</pre>
<li>For csh/tcsh:
<pre>
	% <b>setenv CVS_RSH /usr/bin/rsh</b>
</pre>
</ul>

<p>
Once you have chosen which <a href="#CVSROOT">Anonymous CVS Server</a> you will
use, and which method you will use, you can start using cvs. For those of you
who have CDs you can start with the CVS checkout that is on the CD by using
the method <a href="#starting">above</a> to get the sources onto your system.
If you don't have a CD handy, use the method below to checkout the sources.
This method puts the OpenBSD source tree into <i>/usr/src</i>. 
</p>

<pre>
	# <b>cd /usr; cvs checkout -P src</b>
</pre>

<p>
The above will checkout the <i>current</i> source tree.  Many of you will
only want the patch branch sources.  To checkout a patch branch, you must
specify a tag along with your command. Example:
</p>

<pre>
	# <b>cd /usr; cvs checkout -P -rOPENBSD_3_5 src</b>
</pre>
<p>
Or OPENBSD_3_4 for 3.4, etc.

<p> The OPENBSD_3_5 tag contains the release sources and
errata already applied.

<h3><a name="CVSROOT"><font color="#0000e0">Available Anonymous CVS Servers
</font></a></h3>

<p>
There are two levels of source tree access:

<dl>
<dt><strong>Read-write access for developers:</strong>
<dd>Developers who need to commit changes to the source tree must have
an account on the OpenBSD machines.  Getting this access will be a
natural result of working on the sources with other OpenBSD developers.
If someone does some good work and shows they can work with the team,
they will get an account.
</dl>

<dl>
<dt><strong>Read-only access for everyone:</strong>
<dd>Anyone can access the read-only CVS repositories. These copies
of the read-write CVS repository are mirrored often. To use one,
set your <var>CVSROOT</var> environment variable to one of
the following values:
<p>
<em>Please see the note about <a href="#WHICH">ssh vs. rsh</a> below!</em>
<p>
<ul>
<li><strong>CVSROOT=anoncvs@anoncvs1.usa.openbsd.org:/cvs</strong><br>
Host also known as <strong>anoncvs@anoncvs.usa.openbsd.org</strong>,
<strong>anoncvs@anoncvs4.usa.openbsd.org</strong>.<br>
Located in Redwood City, California, western USA.<br>
Maintained by <a href="mailto:millert@openbsd.org">Todd Miller</a>.<br>
Protocols: rsh, ssh, ssh port 2022, pserver.<br>
Updated every 2 hours.<br>
SSH fingerprints:<br>
(RSA1) 1024 64:de:26:16:c2:ff:1b:c7:24:ed:a4:4a:d7:2f:69:3e<br>
(RSA) 1024 49:67:9a:46:62:8a:3f:4e:b3:63:ca:d6:41:29:2a:2f<br>
(DSA) 1024 a7:75:49:77:f3:47:d1:3c:5e:65:84:84:3b:03:f1:33<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs2.usa.openbsd.org:/cvs</strong><br>
Host also known as <strong>repository.citi.umich.edu</strong>.<br>
Located at the University of Michigan, central USA.<br>
Maintained by <a href="mailto:rees@umich.edu">Jim Rees</a>.<br>
Protocols: ssh, ssh port 2022.<br>
Updated every 12 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs</strong><br>
Located at the University of Colorado, Boulder, western USA.<br>
Maintained by <a href="mailto:millert@openbsd.org">Todd Miller</a>.<br>
Protocols: rsh, ssh, ssh port 2022, pserver.<br>
Updated every 2 hours.<br>
SSH fingerprints:<br>
(RSA1) 1024 21:d3:93:29:bc:3f:68:37:6c:84:9f:12:0c:8a:35:2f<br>
(RSA) 1024 f4:85:d1:b4:c3:df:62:b9:cf:78:64:73:67:05:e3:ca<br>
(DSA) 1024 8d:c7:c3:07:3b:60:fa:80:85:c1:b4:1c:0a:33:c4:33<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs1.ca.openbsd.org:/cvs</strong><br>
Host also known as <strong>anoncvs.ca.openbsd.org</strong>, 
<strong>openbsd.sunsite.ualberta.ca</strong><br>
Located in Edmonton, Alberta, Canada.<br>
Maintained by <a href="mailto:beck@ualberta.ca">Bob Beck</a>.<br>
Protocols: ssh, rsh, ssh port 2022, pserver<br>
Updated every 2 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.no.openbsd.org:/cvs</strong><br>
Host also known as <strong>cvs.inet.no</strong>.<br>
Located in Norway.<br>
Maintained by <a href="mailto:cvsadmin@inet.no">Michael Shuldman</a>.<br>
Protocols: rsh, ssh, ssh port 2022.<br>
Updated every 4 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.at.openbsd.org:/cvs</strong><br>
Host also known as <strong>togetic.kd85.com</strong>.<br>
Located in Austria.<br>
Maintained by <a href="mailto:wim@kd85.com">Wim Vandeputte</a>.<br>
Protocols: ssh, ssh port 2022.<br>
Updated every 3 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.nl.openbsd.org:/cvs</strong><br>
Host also known as <strong>anoncvs.calyx.nl</strong>.<br>
Located in Amsterdam, The Netherlands.<br>
Maintained by <a href="mailto:nick@calyx.net">Nick Merrill</a> and
<a href="mailto:alex@calyx.nl">Alexander Grendel</a>.<br>
Protocols: ssh.<br>
Updated every 3 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.jp.openbsd.org:/cvs</strong><br>
Host also known as <strong>kankoromochi.econ.nagasaki-u.ac.jp</strong>.<br>
Located at Nagasaki Univ. Faculty of Economics, Japan.<br>
Maintained by <a href="mailto:sigh@net.nagasaki-u.ac.jp">SUZUKI Hitoshi</a>.<br>
Protocols: ssh, pserver.<br>
Updated every 3 hours.<br>
<p>
<li><strong>CVSROOT :pserver:anoncvs@cvs.bsdfr.org:/cvs</strong><br>
Located in France.<br>
Maintained by: <a href="mailto:jch@oleane.net">Jean-Claude Christophe</a>.<br>
Protocols: pserver<br>
Updated every 24h.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.de.openbsd.org:/cvs</strong><br>
Host also known as <strong>grappa.unix-ag.uni-kl.de</strong>.<br>
Located at the University of Kaiserslautern, Germany.<br>
Maintained by <a href="mailto:naddy@openbsd.org">Christian Weisgerber</a>.<br>
Protocols: ssh, ssh port 2022, pserver<br>
Updated every 6 hours.<br>
SSH fingerprints:<br>
(RSA) 1024 cf:a9:ee:a4:60:5d:66:00:50:5b:fd:d3:72:04:14:a3<br>
(DSA) 1024 78:d4:19:da:df:6f:c0:14:7f:4a:55:2a:e9:82:5f:e4<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.pl.openbsd.org:/cvs</strong><br>
Host also known as <strong>anoncvs1.pl.openbsd.org</strong>, 
<strong>incredible.bmtmc.gda.pl</strong>.<br>
Located at BMT Maritime Consultants, Gdansk, Poland.<br>
Maintained by <a href="mailto:detergent@incredible.bmtmc.gda.pl">
Adam Naguszewski</a>.<br>
Protocols: ssh, pserver<br>
Updated every 3 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@rt.fm:/cvs</strong><br>
Located in Lake in the Hills, Illinois, USA.<br>
Maintained by <a href="mailto:jcs@rt.fm">
Joshua Stein</a>.<br>
Protocols: ssh<br>
Updated every 3 hours.<br>
(RSA) 1024 54:74:ca:17:d0:07:c3:53:b7:7e:1d:9b:10:bf:04:37<br>
(DSA) 1024 46:78:40:52:7a:18:f9:0e:68:61:b0:27:29:f9:d9:c4<br>
<p>
<li><strong>CVSROOT=anoncvs@cvs.openbsd.cz:/cvs</strong><br>
Located in Prague, Czech Republic.<br>
Maintained by <a href="mailto:vlada@openbsd.cz">Vladimir Kotal</a>.<br>
Protocols: ssh, pserver.<br>
Updated every 4 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.openbsd.org.ua:/cvs</strong><br>
Located in Kiev, Ukraine.<br>
Maintained by <a href="mailto:hunter@dg.net.ua">Sergey Smitienko</a>.<br>
Protocols: ssh<br>
Updated every 6 hours.<br>
<p>
<li><strong>CVSROOT=openbsd@openbsd.bug.it:/cvs</strong><br>
Located in Modena, Italy.<br>
Maintained by <a href="mailto:jwk@bug.it">Giacomo Cariello</a>.<br>
Protocols: ssh, password "openbsd"<br>
Updated every 6 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.openbsd.lt:/cvs</strong><br>
Host also known as <strong>anoncvs.studentas.lt</strong><br>
Located at LITNET NOC, Academical and Research Network, Kaunas, Lithuania.<br>
Maintained by <a href="mailto:helpas@aic.lt">Donatas Budvytis</a>.<br>
Protocols: ssh, password "anoncvs"<br>
Updated every 3 hours from anoncvs.usa.openbsd.org.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs2.de.openbsd.org:/cvs</strong><br>
Host also known as <strong>openbsd.informatik.uni-erlangen.de</strong>.<br>
Located at the University of Erlangen-Nuremberg, Germany.<br>
Maintained by <a href="mailto:Alexander.Gernler@informatik.stud.uni-erlangen.de">Alexander von Gernler</a>.<br> 
Protocols: ssh, ssh port 2022, pserver<br>
Updated every 2 hours.<br>
SSH fingerprints:<br>
(RSA) 1024 fc:94:b0:c1:e5:b0:98:7c:58:43:99:76:97:ee:9f:b7<br>
(DSA) 1024 a9:00:3f:ba:50:81:16:d1:e9:b8:4f:3c:b2:10:e2:6c<br>
<p>
<li><strong>CVSROOT=anoncvs@mirror.osn.de:/cvs</strong><br>
Located in N&uuml;rnberg, Germany.<br>
Maintained by <a href="mailto:aw@osn.de">Armin Wolfermann</a>.<br>
Protocols: ssh<br>
Updated every 4 hours.<br>
SSH fingerprints:<br>
(RSA) 1024 f2:73:d2:f6:e3:01:ef:ca:3b:e7:6c:80:b6:bd:bb:84<br>
(DSA) 1024 fb:33:05:62:96:20:cf:88:7e:10:cb:8d:91:72:57:32<br>
<p>
<li><strong>CVSROOT=anoncvs@openbsd.chem.uw.edu.pl:/cvs</strong><br>
Located in Warsaw, Poland.<br>
Maintained by <a href="mailto:admin@chem.uw.edu.pl">Piotr Klein</a>.<br>
Protocols: ssh<br>
Updated every 3 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.student.pw.edu.pl:/cvs</strong><br>
Located at the Warsaw University of Technology, Poland.<br>
Maintained by <a href="mailto:dmarcink@elka.pw.edu.pl">Darek Marcinkeiwicz</a>.<br>
Protocols: ssh<br>
Updated every 3 hours.<br>
</ul>


<p>
<em>Note:</em> If your server is listed on here with inaccurate or
unknown information, please contact
<a href="mailto:beck@openbsd.org"><tt>beck@openbsd.org</tt></a>
</p>

<p>
You may want to use 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=traceroute&amp;sektion=8&amp;format=html">traceroute(8)</a>
to find out which server is nearest you.
Problems with a server should be reported to the <b>maintainer</b> of the
server in question.
</dl>

<h3><a name="CRYPTO"><font color="#0000e0">Getting crypto sources through 
cvs(1)</font></a></h3>

<p>
<strong>IMPORTANT NOTE:</strong>
There are a few issues relating to cryptographic software that everyone
should be aware of:
<ul>
<li>The OpenBSD sources are from Canada.
As
	<a href="http://www.efc.ca/pages/doc/crypto-export.html">
	researched by a Canadian individual</a>
and as
	<a href="http://axion.physics.ubc.ca/ECL.html">
	described in the Export Control list of Canada</a>
it is legal to export crypto software from Canada to the world.
<p>
<li>However, if you are outside the USA or Canada, you should not
fetch the cryptographic sections of the OpenBSD sources from an
anoncvs server located in the USA. The files in question are...
<ul>
<li>src/kerberosIV/*
<li>src/kerberosV/*
<li>src/lib/libdes/*
<li>src/lib/libc/crypt/crypt.c
<li>src/lib/libc/crypt/morecrypt.c
<li>src/sys/crypto
<li>src/sys/netinet
<li>src/usr.sbin/afs/src/rxkad/*
<li>XF4/xc-mit/lib/Xdmcp/Wraphelp.c
<li>XF4/xc-old/lib/Xdmcp/Wraphelp.c
<li>XF4/xc/lib/Xdmcp/Wraphelp.c
</ul>
Because of the USA ITAR munitions list,
crypto software may only be exported to Canada from the USA.
<p>
<li>The OpenBSD project is looking for more anoncvs servers -- read
on to find out how you can help.
</ul>

<h3><a name="EXAMPLE"><font color="#0000e0">Example usages for cvs(1)</font>
</a></h3>

<p>
NOTICE: If you want to update a branch (such as a patch branch)
to <i>current</i>, you would add the <code>-A</code>
flag to cvs, but this flag is of little use otherwise.   Some older
versions of the OpenBSD documentation recommended use of this flag
in many examples. We no longer recommend this flag unless absolutely necessary.

<p>
A sample use of an anoncvs server would be:
<pre>
% <strong>setenv CVSROOT anoncvs@anoncvs.ca.openbsd.org:/cvs</strong>
% <strong>cd /tmp</strong>
% <strong>cvs get src/sys/arch/sparc</strong>
    [copies the files from the repository to your machine]
% <strong>cvs log src/sys/arch/sparc/sparc/locore.s</strong>
    [shows the commit log for the chosen file]
% <strong>cvs diff -bc -r1.1 -r1.5 src/sys/arch/sparc/sparc/locore.s</strong>
    [shows the changes between revisions 1.1 and rev 1.5]
</pre>

<p>
<a name="pserver">In order to use a cvs ``pserver'' (a direct TCP connection 
instead of using ssh or rsh) you must login once:</a>

<pre>
% <strong>setenv CVSROOT :pserver:anoncvs@anoncvs.ca.openbsd.org:/cvs</strong>
% <strong>cvs login</strong>
(Logging in to anoncvs@anoncvs1.ca.openbsd.org)
CVS password: <strong>anoncvs</strong>
    [This writes a line to ~/.cvspass (filename over-ridden by CVS_PASSFILE).]
    [An example line from my ~/.cvspass after typing 'blah' for the above    ]
    [password is:                                                            ]
    [:pserver:anoncvs@anoncvs5.usa.openbsd.org:/cvs Au'yc                    ]
    [After logging in ONCE every other use of the above CVSROOT will work.   ]
% <strong>cvs get ksrc-i386 ksrc-common</strong>
    [Allows you to retrieve ONLY that necessary to rebuild an i386 kernel.   ]
</pre>

<p>
Here is how someone using anoncvs regularly would update his
source tree:
<ul><li>First, start out by `get'-ing an initial tree:

<p> (If you are following <i>current</i>):
<pre>
	# <strong>setenv CVSROOT anoncvs@anoncvs.ca.openbsd.org:/cvs</strong>
	# <strong>cd /usr</strong>
	# <strong>cvs -q get -P src</strong>
</pre>

<p> (If you are following the patch branch for 3.5):
<pre>
	# <strong>setenv CVSROOT anoncvs@anoncvs.ca.openbsd.org:/cvs</strong>
	# <strong>cd /usr</strong>
	# <strong>cvs -q get -rOPENBSD_3_5 -P src</strong>
</pre>
</li>

<li> Anytime afterwards, to `update' this tree:
<p> (If you are following <i>current</i>):
<pre>
	# <strong>cd /usr/src</strong>
	# <strong>cvs -q up -Pd</strong>
</pre>

<p> (If you are following the patch branch for 3.5):
<pre>
	# <strong>cd /usr/src</strong>
	# <strong>cvs -q up -rOPENBSD_3_5 -Pd</strong>
</pre>

Every time you ran this it would synchronize your /usr/src tree. It would
not destroy any of your local changes, rather it would attempt to merge
changes in. If you use obj directories (not obj symbolic links) you may
wish to append "-I obj" to the cvs command line, this will keep cvs from
spitting out a warning about all the obj directories it is going to
encounter which are not in the repository.

<p>
<li> NOTE:
If you are updating a source tree that you initially fetched
from a different server, or from a CD, you <strong>must</strong>
add the <em>-d $CVSROOT</em> options to cvs.
<pre>
	# <strong>cd /usr/src</strong>
	# <strong>cvs -d $CVSROOT -q up -Pd</strong>
</pre>
</li>
</ul>

<p>
To <a name="ports">use</a> <a href="ports.html">ports</a>, it is similar to src:
<ul><li>
<p> (If you are following <i>current</i>):
<pre>
	# <strong>setenv CVSROOT anoncvs@anoncvs.ca.openbsd.org:/cvs</strong>
	# <strong>cd /usr</strong>
	# <strong>cvs -q get -P ports</strong>
</pre>
<p> (If you are following the patch branch for 3.5):
<pre>
	# <strong>setenv CVSROOT anoncvs@anoncvs.ca.openbsd.org:/cvs</strong>
	# <strong>cd /usr</strong>
	# <strong>cvs -q get -rOPENBSD_3_5 -P ports</strong>
</pre>
<li> Anytime afterwards, to `update' this tree:
<p> (If you are following <i>current</i>):
<pre>
	# <strong>cd /usr</strong>
	# <strong>cvs -q up -Pd ports</strong>
</pre>
<p> (If you are following the patch branch for 3.5):
<pre>
	# <strong>cd /usr</strong>
	# <strong>cvs -q up -rOPENBSD_3_5 ports</strong>
</pre>
</li>
</ul>

In the above example, <i>-q</i> is optional, only intended to minimize
cvs's output.  For those who like to see screenfulls of output, it
can be omitted.

<p>
or to make a diff of a locally patched module (here <i>cd.c</i>) to include with
a bug report:
<pre>
	# <strong>cd /usr</strong>
	# <strong>cvs diff -u src/sys/scsi/cd.c &gt; /tmp/patch</strong>
</pre>

<p>
The <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=cvs&amp;sektion=1&amp;format=html">
cvs(1) man page</a>
(included with the CVS sources) has much more
information about how CVS can be used.

<h4>X11 Source tree</h4>

<p>
Anoncvs mirrors also carry the OpenBSD X11 (XFree86) source tree. You can adapt
the recipe above to update your XFree86 source tree from the third CD.
You can copy or download the XFree86 3 source tree with the X11 cvs module,
although the current module containing XFree86 4 is XF4.
There are two ways to get the XF4 sources to <i>/usr/XF4</i>:

<ul>
<li>copy the tree off the CD (assuming the 3rd CD is mounted on /mnt):
<pre>
        # <strong>cd /mnt; cp -Rp XF4 /usr</strong>
</pre>
<li>use a union mount with the CD below a writable directory.
<pre>
        # <strong>mount -t union -o -b /mnt/XF4 /usr/XF4</strong>
</pre>
</ul>

After this, <i>/usr/XF4</i> will be ready to be used by cvs. You can for
example update it to -current source (assuming you've already set
the <var>CVSROOT</var> environment variable):

<pre>
        # <strong>cd /usr/XF4</strong>
        # <strong>cvs -q update -Pd</strong>
</pre>

<p>
<strong>Warning:</strong>
When using cvs you should take care that your current directory is either
the root of the tree you are referencing or in a separate place such as /tmp.
Some commands such as "get" can create an arbitrary sub-tree in the current
directory, and a subsequent update will recursively flesh out this sub-tree.

<p>
The anoncvs service gives fledgling developers a chance to learn CVS
operation and get thoroughly involved in the development process
before getting "commit" access -- as a result of showing useful
skills and high quality results they will naturally later be given
developer access.  As well, people providing patches can create
their "diff"s relative to the CVS tree, which will ease integration.


<h3><a name="WHICH"><font color="#0000e0">Use rsh(1) or ssh(1)?</font></a></h3>

<p>
By default, the CVS client uses ssh ("secure shell":
<a href="http://www.openssh.com/">OpenSSH</a>) to talk to the CVS server.

<p>
Many of the CVS sites no longer support rsh for security reasons.  Local
problems like firewalls or imperfect protocol emulators such as slirp may
also hinder rsh usage.  However, if rsh is desired, one must set the
<var>CVS_RSH</var> environment variable to point to rsh
(typically <strong>/usr/bin/rsh</strong>).

<p>
If local policy prevents outgoing connections to ssh's default port of 22,
port 2022 may be used in its place.  Note, however, that not all anoncvs
servers accept ssh connections on this port.  Furthermore, most anoncvs servers
no longer accept the <strong>none</strong> cipher, as it is disabled in
recent versions of ssh for security reasons.  Also, do not be tempted
to turn on compression: CVS already compresses.

<p>
One could specify something like the following in the
<strong>$HOME/.ssh/config</strong> configuration file to avoid the pitfalls
and restrictions mentioned above:
<pre>
	Host anoncvs.ca.openbsd.org
	    Compression no
	    Port 2022
</pre>

<p>
CVS is a little noisy starting up; to quiet it a bit you may want to
do this:

<pre>
	<strong>% setenv CVS_CLIENT_PORT -1</strong>
</pre>

<p>
<h3><a name="SUP"><font color="#0000e0">Mirroring the CVS repository via 
sup(1)</font></a></h3>

<p>
Users wishing to mirror the OpenBSD CVS tree itself may now do so
from <em>anoncvs.usa.openbsd.org</em> or <em>anoncvs3.usa.openbsd.org</em>
(these are different machines).  Note that this is the cvs tree,
<b>not</b> a checked out source tree.  It is only useful if you
want to be able to do fast cvs operations (diff, annotate, etc) or
if you have multiple source trees and you only want to transfer new
data once (you can then checkout a tree from your local cvs mirror).
<p>
A sample supfile would be:
<pre>
	cvs host=anoncvs.usa.openbsd.org hostbase=/ base=/home delete
</pre>
<p>
which would mirror the cvs tree into /home/cvs with the sup data
files ending up in /home/sup.  The full OpenBSD cvs tree is currently
about 2.2GB in size.

<h3><a name="MIRROR"><font color="#0000e0">Setting up an anoncvs mirror
</font></a></h3>

<p>
If you wish to setup a new anoncvs mirror site and make it available to
the general public, please contact the anoncvs
<a href="mailto:sup@openbsd.org">maintainer</a>.
Anoncvs mirrors require about 2.2GB of disk, and use up to 32MB of swap
per anoncvs user (assuming the user does a large operation; while smaller
operations use fewer resources, anoncvs still makes much more of an
impact than ftp or sup).  Such anoncvs machines should have excellent
network connectivity for the area they are expected to serve.  A
<a href="anoncvs.shar">document</a>
which describes the setup of anoncvs servers is available.

<h3><font color="#0000e0">Final notes</font></h3>
After upgrading your source tree, you should read the comments
at the top of <kbd>/usr/src/Makefile</kbd> before attempting
a build.  Also, you should build a new kernel <strong>before</strong>
doing a <kbd>make build</kbd> if possible.  In some cases it may be
necessary to rebuild and install the <kbd>config</kbd> utility before
you can build the kernel.  If <kbd>config GENERIC</kbd> fails this
is probably the case.
<p>
It is important to note that upgrading from a release to the current tree
by rebuilding the sources can be rather difficult due to dependencies
that are often not obvious.  Therefore, it is suggested that you first
install the latest snapshot before attempting a tree build from source.

<hr>
<a href="index.html"><img height="24" width="24" src="back.gif" border="0" 
alt="OpenBSD"></a> 
<a href="mailto:www@openbsd.org">www@openbsd.org</a>
<br><small>$OpenBSD: anoncvs.html,v 1.214 2004/07/07 18:00:40 millert Exp $
</small>

</body>
</html>