[OpenBSD]

Anonymous CVS


Table Of Contents

What is Anonymous CVS? What is CVS? Getting Started Using Anonymous CVS Using CVS to Get and Update your Source Tree Available Anonymous CVS Servers Getting crypto sources through cvs(1) Example usages for cvs(1) Use rsh(1) or ssh(1)? Setting up an anoncvs mirror

What is Anonymous CVS?

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.

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.

The OpenBSD Project currently has four active and two historic source repositories:

src - Houses all source code for the OpenBSD Operating System. ports - Houses the OpenBSD Ports. www - Houses all OpenBSD web pages. (Including this one). xenocara - Houses OpenBSD's active X.org v7 source tree. X11 and XF4 - Houses OpenBSD's adaptation of the XFree86-3 and XFree86-4 source trees. These are here just for historical purposes, most users will have no reason to use this tree, it is no longer being used.

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

What is CVS?

CVS is the source code control system used to manage the OpenBSD source tree. 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. There are two levels of source tree access:

Read-write access for developers: 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. Read-only access for everyone: Anyone can access the read-only CVS repositories. These copies of the read-write CVS repository are mirrored often.

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.

In the event that the changes can't be completely merged, CVS provides a "soft fallback", 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.

Getting Started Using Anonymous CVS

While you can download the entire source tree from an AnonCVS server, you can often save a lot of time and bandwidth by "preloading" your source tree with the source files from either the OpenBSD CD or from an FTP server. This is particularly true if you are running -stable, as relatively few files change between the -release and -stable.

To extract the source tree from the CD to /usr/src (assuming the CD is mounted on /mnt):

    # cd /usr/src
    # tar xzf /mnt/src.tar.gz
    # cd /usr
    # tar xzf /mnt/xenocara.tar.gz
    # tar xzf /mnt/ports.tar.gz
The source files for download from the FTP servers are separated into two files to minimize the time required to download for those wishing to work with only one part of the tree. The two files are sys.tar.gz, which contains the files used to create the kernel, and src.tar.gz which contains all the other "userland" utilities. In general, however, you will usually want both of them installed. Assuming the downloaded files, src.tar.gz, sys.tar.gz and xenocara.tar.gz are in /usr:
    # cd /usr/src
    # tar xzf ../sys.tar.gz
    # tar xzf ../src.tar.gz
    # cd /usr
    # tar xzf xenocara.tar.gz
    # tar xzf ports.tar.gz

Not all people will wish to unpack all the file sets, but as the system must be kept in sync, you will generally need to set up all trees.

You can also just use cvs(1) to "checkout" the source repository for you. This is discussed in the next section.

After this, /usr/src will be a nice checkout area where all cvs(1) commands will work properly.

Using CVS to get and update your source tree

CVS was designed to be a simple way to retrieve and update your sources. You must first decide whether you want to track -current 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 errata and lesser issues already applied. For more information on these "flavors" of OpenBSD, see here.

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 below.

Once you have chosen which Anonymous CVS Server 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 above 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 /usr/src.

        # cd /usr; cvs checkout -P src

The above will checkout the current 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:

        # cd /usr; cvs checkout -P -rOPENBSD_5_0 src

Or OPENBSD_4_9 for 4.9, etc.

The OPENBSD_5_0 tag contains the release sources and errata already applied.

Available Anonymous CVS Servers

Please see the note about ssh vs. rsh below!

CVSROOT=anoncvs@anoncvs.openbsd.org.ar:/cvs
Location: Buenos Aires, Argentina.
Maintained by Gonzalo Lionel Rodriguez.
Protocols: ssh.
Updated every 2 hours from obsd.cec.mtu.edu.
CVSROOT=anoncvs@anoncvs.bom.nom.co:/cvs
Location: Sydney, Australia.
Maintained by Michael W. Bombardieri.
Protocols: ssh.
Updated every 2 hours from anoncvs.usa.openbsd.org.
SSH fingerprints:
(RSA) 2048 72:97:71:77:82:80:e1:f0:1c:1d:bc:01:b5:39:97:fa
(DSA) 1024 67:5d:e1:ba:b7:d3:40:7c:9c:4f:15:d4:1b:0b:e1:58
CVSROOT=anoncvs@ftp5.eu.openbsd.org:/cvs
Host also known as anga.funkfeuer.at.
Location: Vienna, Austria.
Maintained by Martin Reindl.
Protocols: ssh, ssh port 2022.
Updated every 2 hours from anoncvs1.usa.openbsd.org.
SSH fingerprints:
(RSA) 2048 e4:a7:3a:ab:e1:a7:c8:eb:5c:f4:ff:38:95:6f:81:f2
(DSA) 2048 66:03:a3:bc:46:85:f3:6c:4b:6b:e3:d4:f5:5f:a6:c4
CVSROOT=anoncvs@anoncvs1.ca.openbsd.org:/cvs
Host also known as anoncvs.ca.openbsd.org, openbsd.sunsite.ualberta.ca.
Location: Alberta, Canada.
Maintained by Bob Beck.
Protocols: ssh, ssh port 2022.
Updated every 2 hours.
CVSROOT=anoncvs@anoncvs.comstyle.com:/cvs
Location: Toronto, Canada.
Maintained by Brad Smith.
Protocols: ssh, ssh port 2022.
Updated hourly.
SSH fingerprints:
(RSA1) 2048 80:33:40:b7:94:9e:7b:bd:77:fb:2a:57:85:fc:09:73
(RSA) 2048 43:30:9a:c6:c4:19:80:ad:7d:58:3e:7a:a0:39:57:53
(DSA) 1024 66:a1:f9:47:26:d9:15:3c:62:2b:b5:e8:0d:89:4a:6f
(ECDSA) 256 62:28:13:ea:cd:ba:68:e6:e9:82:94:ac:10:7f:80:d5
CVSROOT=anoncvs@anoncvs.estpak.ee:/OpenBSD
Location: Elion, Tallinn, Estonia.
Maintained by Rivo Nurges.
Protocols: ssh.
Updated every 2 hours from cvsync.de.openbsd.org.
SSH fingerprints:
(RSA) 1024 e1:12:fb:6b:e5:c0:6a:b3:f8:ca:b1:4c:20:fb:5e:07
(DSA) 1024 bb:5c:44:f4:d9:12:3b:22:08:a9:12:c5:0c:e7:db:49
CVSROOT=anoncvs@anoncvs.fr.openbsd.org:/cvs
Location: Paris, France.
Maintained by Landry Breuil.
Protocols: ssh.
Updated every 2 hours from anoncvs1.ca.openbsd.org.
SSH fingerprints:
(RSA1) 2048 28:ce:6b:61:76:d9:0e:6d:65:a1:5c:dd:e8:d7:57:42
(RSA) 2048 89:2e:84:9e:0c:f9:8d:21:41:0e:c5:80:41:27:14:c1
(DSA) 1024 7f:fb:68:2f:0f:c8:63:6c:0f:32:2c:03:d4:cd:0c:47
(ECDSA) 256 6f:a8:a5:93:d7:68:55:91:15:42:b0:5d:38:62:b9:c3
CVSROOT=anoncvs@openbsd.cs.fau.de:/cvs
Host also known as openbsd.informatik.uni-erlangen.de.
Location: University of Erlangen-Nuremberg, Erlangen, Germany.
Maintained by Simon Kuhnle.
Protocols: ssh, ssh port 2022.
Updated every 2 hours from anoncvs.spacehopper.org.
SSH fingerprints:
(RSA) 2048 d0:f2:0c:a3:bf:28:ba:18:50:5f:04:dc:13:ed:63:42
(DSA) 1024 9f:a1:78:0b:d4:76:68:bf:3e:83:d0:41:c8:1e:33:8b
(ECDSA) 256 f0:d1:64:e6:6b:2f:9e:1e:85:aa:75:e3:a0:52:d3:5a
CVSROOT=anoncvs@mirror.osn.de:/cvs
Location: Nürnberg, Germany.
Maintained by Armin Wolfermann.
Protocols: ssh.
Updated every 3 hours.
SSH fingerprints:
(RSA) 1024 f2:73:d2:f6:e3:01:ef:ca:3b:e7:6c:80:b6:bd:bb:84
(DSA) 1024 fb:33:05:62:96:20:cf:88:7e:10:cb:8d:91:72:57:32
CVSROOT=anoncvs@anoncvs.silihost.hu:/cvs
Location: Budapest, Hungary.
Maintained by Robert Nagy.
Protocols: ssh.
Updated every 3 hours from anoncvs.de.openbsd.org.
CVSROOT=anoncvs@anoncvs.jp.openbsd.org:/cvs
Host also known as kankoromochi.econ.nagasaki-u.ac.jp.
Location: Nagasaki University, Faculty of Economics, Nagasaki, Japan.
Maintained by Suzuki Itoshi.
Protocols: ssh, pserver.
Updated every 3 hours.
CVSROOT=anoncvs@anoncvs.openbsd.lt:/cvs
Location: TVK, Cable TV and Internet Services, Taurage, Lithuania.
Maintained by Donatas Budvytis.
Protocols: ssh.
Updated every 3 hours from cvsup.no.openbsd.org.
CVSROOT=anoncvs@anoncvs.obsd.si:/cvs
Host also known as nina.kerberos.si.
Location: Ljubljana, Slovenia.
Maintained by Mitja Muzenic.
Protocols: ssh.
Updated every 2 hours from anoncvs.eu.openbsd.org.
CVSROOT=anoncvs@anoncvs.eu.openbsd.org:/cvs
Location: Stockholm University, Stockholm, Sweden.
Maintained by Janne Johansson.
Protocols: ssh.
Updated every 2 hours.
SSH fingerprints:
(RSA1) 2048 4c:d2:0a:90:b8:95:5d:37:3b:32:7b:77:5a:c5:ef:26
(RSA) 2048 98:e6:80:5d:95:bb:e2:15:5e:19:4d:a3:e4:d0:bc:2c
(DSA) 1024 55:cd:a7:a9:e3:bc:a5:5c:81:5e:98:c0:60:a2:67:52
CVSROOT=anoncvs@anoncvs.netbsd.se:/cvs
Location: Stockholm, Sweden.
Maintained by Viktor Holmlund.
Protocols: ssh.
Updated every 3 hours.
CVSROOT=anoncvs@anoncvs.spacehopper.org:/cvs
Location: London, United Kingdom.
Maintained by Stuart Henderson.
Protocols: ssh, ssh port 2022, ssh port 443.
Updated hourly from anoncvs.ca.openbsd.org.
SSH fingerprints:
(RSA1) 2048 31:fc:3d:e0:f7:6c:47:7e:48:f0:52:17:e6:19:74:f5
(RSA) 2048 e2:19:16:3f:a3:2e:eb:94:14:cd:5c:92:9a:6c:9a:8f
(DSA) 1024 ff:47:13:22:83:d1:6e:df:a0:f0:4f:18:31:cb:f2:28
(ECDSA) 256 a5:b0:2a:65:ff:9a:0b:ef:7d:6f:d2:95:2e:a7:c9:2c
CVSROOT=anoncvs@anoncvs1.usa.openbsd.org:/cvs
Host also known as anoncvs.usa.openbsd.org, anoncvs4.usa.openbsd.org.
Location: Internet Software Consortium, Redwood City, CA, USA.
Maintained by Todd C. Miller.
Protocols: rsh, ssh, ssh port 2022, pserver.
Updated every 2 hours.
SSH fingerprints:
(RSA1) 1024 64:de:26:16:c2:ff:1b:c7:24:ed:a4:4a:d7:2f:69:3e
(RSA) 1024 49:67:9a:46:62:8a:3f:4e:b3:63:ca:d6:41:29:2a:2f
(DSA) 1024 a7:75:49:77:f3:47:d1:3c:5e:65:84:84:3b:03:f1:33
(ECDSA) 256 d3:b2:b5:68:87:3b:f6:93:21:fd:28:ea:cc:b6:e1:13
CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs
Location: National Center for Atmospheric Research, Boulder, CO, USA.
Maintained by Todd C. Miller.
Protocols: rsh, ssh, ssh port 2022, pserver.
Updated every 2 hours.
SSH fingerprints:
(RSA1) 2048 80:cd:f6:fc:4f:0e:cb:80:6a:d0:6a:5e:dd:9e:5d:0a
(RSA) 2048 49:6f:4a:be:02:63:0d:c0:54:b0:57:f0:48:7f:ce:16
(DSA) 1024 f9:ab:fc:60:a3:15:8f:9c:47:24:9e:92:15:78:0d:f3
(ECDSA) 256 99:4f:c8:23:6a:bf:75:1c:de:c9:11:bf:a4:fe:0a:51
CVSROOT=anoncvs@mirror.planetunix.net:/cvs
Location: Chicago, IL, USA.
Maintained by Brian Brombacher.
Protocols: ssh, ssh port 2022, pserver.
Updated every 3 hours from anoncvs3.usa.openbsd.org.
SSH fingerprints:
(RSA1) 2048 e4:22:93:81:84:e0:68:8c:0b:d5:1f:78:cd:6f:fa:c3
(RSA) 2048 8f:42:bd:b0:a2:94:df:6b:af:1e:96:03:ea:68:03:d9
(DSA) 1024 26:51:e8:b3:38:88:dc:a8:2a:98:59:86:ab:40:bb:a4
CVSROOT=anoncvs@openbsd.mirror.frontiernet.net:/cvs
Location: Frontier Communications, Rochester, NY, USA.
Maintained by jared r r spiegel.
Protocols: ssh.
Updated every 4 hours from anoncvs.ca.openbsd.org.
CVSROOT=anoncvs@anoncvs@anoncvs.obsd.esc7.net:/cvs
Location: Dallas, TX, USA.
Maintained by James Shupe.
Protocols: ssh.
Updated every 2 hours from anoncvs1.usa.openbsd.org.
SSH fingerprints:
(RSA1) 256 68:f1:e8:11:94:5c:5e:15:d0:ee:54:1f:ee:57:33:4a
(RSA) 2048 2a:c8:01:6f:5c:fe:78:75:84:29:c3:11:0f:65:05:07
(DSA) 1024 0e:ce:de:c4:7d:a0:d1:71:0a:af:cf:ee:34:43:bc:23

Note: If your server is listed on here with inaccurate or unknown information, please contact beck@openbsd.org

You may want to use traceroute(8) to find out which server is nearest you. Problems with a server should be reported to the maintainer of the server in question.

Getting crypto sources through cvs(1)

IMPORTANT NOTE: There are a few issues relating to cryptographic software that everyone should be aware of:

The OpenBSD sources are from Canada. As researched by a Canadian individual and as described in the Export Control list of Canada it is legal to export crypto software from Canada to the world. 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...
src/kerberosIV/* src/kerberosV/* src/lib/libdes/* src/lib/libc/crypt/crypt.c src/lib/libc/crypt/morecrypt.c src/sys/crypto src/sys/netinet src/usr.sbin/afs/src/rxkad/* XF4/xc-mit/lib/Xdmcp/Wraphelp.c XF4/xc-old/lib/Xdmcp/Wraphelp.c XF4/xc/lib/Xdmcp/Wraphelp.c
Because of US Dept. of Commerce policy, crypto software may only be exported to Canada from the USA.

Example usages for cvs(1)

NOTICE: If you want to update a branch (such as a patch branch) to current, you would add the -A 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.

A sample use of an anoncvs server would be:

$ cd /tmp
$ cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs get src/sys/arch/sparc
    [copies the files from the repository to your machine]
$ cd src/sys/arch/sparc
$ cvs log locore.s
    [shows the commit log for the chosen file]
$ cvs diff -bc -r1.1 -r1.5 locore.s
    [shows the changes between revisions 1.1 and rev 1.5]

In order to use a cvs ``pserver'' (a direct TCP connection instead of using ssh or rsh) you must login once:

$ cvs -d :pserver:anoncvs@anoncvs.ca.openbsd.org:/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 -d :pserver:anoncvs@anoncvs.ca.openbsd.org:/cvs get ksrc-i386 ksrc-common
    [Allows you to retrieve ONLY that necessary to rebuild an i386 kernel.   ]

Here is how someone using anoncvs regularly would update his source tree:

First, start out by `get'-ing an initial tree:

(If you are following current):

        # cd /usr
        # cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P src

(If you are following the patch branch for 5.0):

        # cd /usr
        # cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_5_0 -P src

Anytime afterwards, to `update' this tree:

(If you are following current):

        # cd /usr/src
        # cvs -q up -Pd

(If you are following the patch branch for 5.0):

        # cd /usr/src
        # cvs -q up -rOPENBSD_5_0 -Pd

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. NOTE: If you are updating a source tree that you initially fetched from a different server, or from a CD, you must add the -d anoncvs@anoncvs.ca.openbsd.org:/cvs options to cvs.
        # cd /usr/src
        # cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs -q up -Pd

To use ports, it is similar to src:

(If you are following current):

        # cd /usr
        # cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P ports

(If you are following the patch branch for 5.0):

        # cd /usr
        # cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_5_0 -P ports

Anytime afterwards, to `update' this tree:

(If you are following current):

        # cd /usr/ports
        # cvs -q up -Pd

(If you are following the patch branch for 5.0):

        # cd /usr/ports
        # cvs -q up -rOPENBSD_5_0 -Pd

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.

To make a diff of a locally patched module (here cd.c) to include with a bug report:

        # cd /usr
        # cvs diff -u src/sys/scsi/cd.c > /tmp/patch

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

Warning: 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.

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.

Use rsh(1) or ssh(1)?

CVS supports three access methods between the CVS server and the CVS client:
ssh: Secure Shell can be used to access the anonymous CVS servers. This is the recommended way of doing so, as it is encrypted. rsh: Remote Shell can be used on some of the servers for users who don't have access to ssh. pserver: pserver is primarily useful for users who are behind firewalls that block the other two connections.

NOTE: For users wishing to use rsh, you must first set the CVS_RSH environment variable to point to the rsh(1) program:

For Korn/Bourne shells:
        $ export CVS_RSH=/usr/bin/rsh

For csh/tcsh:
        % setenv CVS_RSH /usr/bin/rsh

By default, OpenBSD's CVS client uses ssh ("secure shell": OpenSSH) to talk to the CVS server.

Many of the CVS sites no longer support rsh or pserver 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 CVS_RSH environment variable to point to rsh (typically /usr/bin/rsh).

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 none 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.

One could specify something like the following in the $HOME/.ssh/config configuration file to avoid the pitfalls and restrictions mentioned above:

        Host anoncvs.ca.openbsd.org
            Compression no
            Port 2022

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

        $ export CVS_CLIENT_PORT=-1

Setting up an anoncvs mirror

If you wish to setup a new anoncvs mirror site and make it available to the general public, please contact the anoncvs maintainer. Anoncvs mirrors currently require about 5GB of disk (and it will grow!), 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). Such anoncvs machines should have excellent network connectivity for the area they are expected to serve. A document which describes the setup of anoncvs servers is available.

Final notes

After upgrading your source tree, you should read the comments at the top of /usr/src/Makefile before attempting a build. Also, you should build a new kernel before doing a make build if possible. In some cases it may be necessary to rebuild and install the config utility before you can build the kernel. If config GENERIC fails this is probably the case.

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.


OpenBSD www@openbsd.org
$OpenBSD: anoncvs.html,v 1.363 2012/01/24 09:57:35 sthen Exp $


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser