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

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

Revision 1.75, Wed Feb 3 02:45:10 1999 UTC (25 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.74: +3 -2 lines

typo

<!DOCTYPE HTML PUBLIC  "-//IETF//DTD HTML Strict//EN">
<html>
<head>
  <title>OpenBSD AnonCVS</title>
  <link rev=made href=mailto:www@openbsd.org>
  <meta name="resource-type"
	content="document">
  <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-1998 by OpenBSD.">
</head>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#23238E">

<img alt="[OpenBSD]" height=30 width=141 SRC="images/smalltitle.gif">

<h3><font color=#0000e0>Anonymous CVS Access:</font></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.
<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 diff's, change histories
and other queries against the central repository.
<p>
You can use anoncvs to access our three main source repositories:
<strong>src</strong>, <strong>ports</strong>, and <strong>www</strong>.
<p>
<h3><font color=#0000e0>CVS:</font></h3>
<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 "write access"
can commit changes directly to the OpenBSD source tree, while "Anonymous
CVS" users have "read access" and can keep their local copies of the source
up to date and issue queries against the central depository.
<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>
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>
People who own an OpenBSD CD may have seen the CVS/ dirs on it.
Actually there is a reason, the CD has a checkout of the OpenBSD src/ module
usable to continue updating from.  Using this tree will results 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:
<ul>
<li>copy the tree off it, (assuming the CD is mounted on /mnt):
<pre>
	<b>#</b> cd /mnt; cp -Rp CVS Makefile bin distrib etc games gnu \
	<b>&gt;</b> include kerberosIV lib libexec lkm regress sbin share \
	<b>&gt;</b> sys usr.bin usr.sbin /usr/src
</pre>
<li>use a union mount with the CD below a writable directory.
<pre>
	<b>#</b> mount -t union -o -b /mnt /usr/src
</pre>
</ul>
After this, /usr/src will be a nice checkout area where all cvs(1) commands
will work OK.
<h4>CVS COMMAND SUMMARY</h4>
<dt> cvs [cvs args] [cvs command] [cvs command args]
<dd> below is a listing of commonly used cvs commands.
<dl>
<DT>add
<dd>Add a new file or directory to the repository.
<dt>get
<dd>Make a working directory of source files for editing.
<dt>commit
<dd>Apply changes to the source repository (write access)
<dt>diff
<dd>Show differences between local files and the source repository.
<dt>history
<dd>Show reports on cvs commands against the source repository.
<dt>log
<dd>Display CVS log information.
<dt>rdiff
<dd>Prepare a collection of diffs reflecting changes between release.
<dt>status
<dd>Show current status of files in the repository and local copies.
<dt>update
<DD>Bring your working directory up to date with the repository.
</dl>
<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.

<h3><font color=#0000e0>Using Anonymous CVS:</font></h3>
<p>
The latest version of CVS is available at
<a href=http://download.cyclic.com/pub/>Cyclic</a>.
Versions earlier than 1.6 are not recommended, and may not work.
If you already have OpenBSD installed, CVS is included.

<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 <strong>CVSROOT</strong> environment variable to one of
the following values:
<p>
<strong>Please see the note about using ssh vs. rsh below!</strong>
<p>
<ul>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.usa.openbsd.org:/cvs</strong><br>
Host also known as <strong>anoncvs.openbsd.org</strong>,
<strong>anoncvs@anoncvs1.usa.openbsd.org</strong>,
<strong>anoncvs@anoncvs4.usa.openbsd.org</strong> and
<strong>anoncvs2.isc.org</strong>.<br>
located in California, western USA.<br>
maintained by <a href=mailto:millert@openbsd.org>Todd Miller</a>.<br>
protocols: ssh only.<br>
updated every 4 hours.<br>
Currently DOWN!<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs</strong><br>
Host also known as <strong>openbsd.cs.colorado.edu</strong>.<br>
located at the University of Colorado, Boulder, western USA.<br>
maintained by <a href=mailto:Todd.Miller@cs.colorado.edu>Todd Miller</a>.<br>
protocols: ssh, ssh port 2022, pserver.<br>
updated every 6 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs6.usa.openbsd.org:/cvs</strong><br>
Host also known as <strong>openbsd.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@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@panopticon.ucs.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.uk.openbsd.org:/cvs</strong><br>
Host also known as <strong>dumpty.wonderland.org</strong>.<br>
located in London, UK.<br>
maintained by <a href=mailto:peter@wonderland.org>Peter Galbavy</a>.<br>
protocols: rsh.<br>
updated every 12 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.tw.openbsd.org:/cvs</strong><br>
Host also known as <strong>OpenBSD.csie.NCTU.edu.tw</strong>.<br>
located in Taipei, Taiwan.<br>
maintained by <a href=mailto:lkchu@OpenBSD.csie.NCTU.edu.tw>Liang-Kai Chu</a>.<br>
protocols: rsh, ssh, ssh port 2022.<br>
updated every 12 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.se.openbsd.org:/cvs</strong><br>
Host also known as <strong>anoncvs.stacken.kth.se</strong>.<br>
located in Sweden.<br>
maintained by <a href=mailto:anoncvs@stacken.kth.se>Magnus Holmberg</a>.<br>
protocols: rsh, ssh, ssh port 2022.<br>
updated every 3 hours.<br>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.be.openbsd.org:/cvs</strong><br>
Host also known as <strong>badlands.rug.ac.be</strong>.<br>
located in Belgium.<br>
maintained by <a href=mailto:wvdputte@reptile.rug.ac.be>Wim Vandeputte</a>.<br>
protocols: ssh, ssh port 2022.<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.<br>
updated every 12 hours.<br>
</ul>
<p>
<li><strong>CVSROOT=anoncvs@anoncvs.cz.openbsd.org:/cvs</strong><br>
Host also known as <strong>com-os2.ms.mff.cuni.cz</strong>.<br>
located at Faculty Math & Physics, Charles University, Prague, Czech republic.<br>
maintained by <a href=mailto:galambos@com-os2.ms.mff.cuni.cz>Leo Galambos</a>.<br>
protocols: ssh, ssh port 2022.<br>
updated every 3 hours.<br>
</ul>
<p>
You may want to use `traceroute' 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>
<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://insight.mcmaster.ca/org/efc/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>
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/lib/libdes/*
<li>src/lib/libc/crypt/crypt.c
<li>src/lib/libc/crypt/morecrypt.c
<li>src/sys/netinet
<li>src/usr.sbin/afs/src/rxkad/*
<li>X11/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>

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

<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>
    [ *NOTE* You must be using cvs version 1.8 or higher to do this          ]
% setenv CVSROOT :pserver:anoncvs@anoncvs.ca.openbsd.org:/cvs
% cvs login
(Logging in to anoncvs@anoncvs1.ca.openbsd.org)
CVS password: anoncvs
    [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 ]
% cvs -z9 get ksrc-i386 ksrc-common
    [allows you to retrieve ONLY that necessary to rebuild an i386 kernel    ]
    [ -z9 allows gzip -9 compression, GOOD medicine for slow links           ]
</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:

<pre>
# setenv CVSROOT anoncvs@anoncvs.ca.openbsd.org:/cvs
# cd /usr
# cvs -q get -PA src
</pre>
</li>

<li> Anytime afterwards, to `update' this tree:
<pre>
# cd /usr/src
# cvs -q up -PAd
</pre>

Everytime 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.  You must also set the
<em>CVS_IGNORE_REMOTE_ROOT</em> environment variable.

<pre>
# cd /usr/src
# cvs -d $CVSROOT -q up -PAd
</pre>

</li>
</ul>

<p>
To <a name=ports>use</a> <a href=ports.html>ports</a>, it is similar to src:
<ul><li>
<pre>
# setenv CVSROOT anoncvs@anoncvs.ca.openbsd.org:/cvs
# cd /usr
# cvs -q get -PA ports
</pre>
</li>
<li> Anytime afterwards, to `update' this tree:
<pre>
# cd /usr
# cvs -q up -PAd ports
</pre>
</li>
</p>
</ul>

In the above example, '-q' 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 cd.c) to include with
a bug report:
<pre>
# cd /usr
# cvs diff -u src/sys/scsi/cd.c > /tmp/patch
</pre>
</p>

<p>
The CVS man page (included with the CVS sources) has much more
information about how CVS can be used.

<p>
<strong>Warning:</strong>
When using cvs you should take care that your current directory is either
the root of the tree you're 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.

<p>
<strong>Anoncvs: rsh vs. ssh</strong>
<br>
By default, the CVS client uses rsh to talk to the CVS server.  Many
of the CVS sites no longer support rsh for security reasons or a local
problem like a firewall or imperfect protocol emulator such as slirp
may prevent you from using rsh.
The alternative is a to use a "secure shell" connection using
<a href=http://www.cs.hut.fi/ssh/>ssh</a>.  This is a commercial product
offered by <a href=http://www.ssh.fi>SSH Communications Security Ltd</a>,
however they make a free unix version available that can be easily
installed under OpenBSD. Make sure you read the LICENSING doc! If you have 
installed the OpenBSD <A HREF="ports.html">ports tree</A>  you can download, 
compile, and install the free UNIX version just by changing directory into the 
directory /usr/ports/security/ssh and typing <KBD>make install</KBD>.
If you installed "ports" from the OpenBSD 2.4 CD-ROM, you get ssh
version 1.2.26 and should eventually "cvs update ports" and rebuild it as above 
after you get ssh and anoncvs working, to get the latest version.
Alternately, you can manually download the latest 1.2.* Unix version from
<a href= "ftp://ftp.funet.fi/pub/unix/security/login/ssh/">
ftp://ftp.funet.fi/pub/unix/security/login/ssh/</a> or 
<a href= "http://www.datafellows.com/f-secure/fnetsys.htm">
http://www.datafellows.com/f-secure/fnetsys.htm</a>,
compile, and install it yourself.

<p>
The OpenBSD anoncvs repositries support the SSH1 protocol, not the SSH2 protocol
due to the use of a "strict non-commercial use licensing policy".

<p>
Once ssh is installed, one sets the environment variable
<strong>CVS_RSH</strong> to point to ssh (typically
<strong>/usr/local/bin/ssh</strong>).  If your local site prevents you
from connecting out to port 22 (which ssh defaults to using) use port
2022.  

<p>
Do not be tempted to turn on compression since CVS already compresses.
Use something like the following in your <strong>$HOME/.ssh/config</strong>
file.  Note that not all anoncvs servers allow ssh connections on
port 2022.  Also note that most anoncvs servers no longer accept
the <strong>none</strong> cipher as it is disabled in recent
versions of ssh for security reasons.
<pre>
	Host anoncvs.ca.openbsd.org
	    Port 2022
</pre>

<p>
CVS is a little noisy starting up; to quiet it a bit you may want to
do this:
<pre>
setenv CVS_CLIENT_PORT -1
</pre>

<p>
If you wish to change from one CVS server to another (say your normal one is
down, or for any other reason), the environment variable which will let you
do this is
<pre>
setenv CVS_IGNORE_REMOTE_ROOT
</pre>
Note that you will also need to use the <strong>-d</strong> flag
as mentioned above.

<p><strong>X11 Source tree</strong>
<br>
Anoncvs mirrors also carry the OpenBSD X11 source tree. You can adapt
the recipe above to update your X11 source tree from the second CD.
Either copy or use a union mount to get the X11 sources in /usr/X11:
<ul>
<li>copy the tree off it (assuming the 2nd CD is mounted on /mnt):
<pre>
	<b>#</b> cd /mnt; cp -Rp X11 /usr
</pre>
<li>use a union mount with the CD below a writable directory.
<pre>
	<b>#</b> mount -t union -o -b /mnt/X11 /usr/X11
</pre>
</ul>
After this, /usr/X11 will be ready to be used by cvs. You can for
example update it to -current source (assuming you've already set
the <b>CVSROOT</b> environment variable):
<pre>
        <b>#</b> cd /usr/X11
        <b>#</b> cvs -q update -PAd
</pre>

<p><strong>Setting up a new anoncvs mirror</strong>
<br>
If you wish to be a new anoncvs mirror site, please contact the anoncvs
<a href=mailto:deraadt@theos.com>maintainer</a>.
Anoncvs mirrors require about 500MB of disk, and use up to 4MB 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 attemping
a build.  Also, you should build a new kernel <strong>before</strong>
doing a <KBD>make build</KBD> if possible.  In some cases it make 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 attemping 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.75 1999/02/03 02:45:10 millert Exp $</small>

</body>
</html>