Annotation of www/anoncvs.html, Revision 1.51
1.1 deraadt 1: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
2: <html>
3: <head>
1.49 ian 4: <title>OpenBSD AnonCVS</title>
5: <link rev=made href=mailto:www@openbsd.org>
6: <meta name="resource-type"
7: content="document">
8: <meta name="description"
9: content="How to get OpenBSD updates via Internet using Anonymous CVS">
10: <meta name="keywords"
11: content="openbsd,anoncvs,updates">
12: <meta name="distribution"
13: content="global">
14: <meta name="copyright"
15: content="This document copyright 1996-1998 by OpenBSD.">
1.1 deraadt 16: </head>
17:
1.14 downsj 18: <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#23238E">
1.1 deraadt 19:
1.14 downsj 20: <img alt="[OpenBSD]" SRC="images/smalltitle.gif">
21:
1.43 deraadt 22: <h3><font color=#0000e0>Anonymous CVS Access:</font></h3>
1.15 grr 23: <p>
24: Anonymous CVS is a method of keeping your local copy of the OpenBSD source
25: tree up to date with respect to changes made to current OpenBSD sources.
1.14 downsj 26: <p>
1.15 grr 27: The major advantage of Anonymous CVS over other source code update
28: techniques is that it works directly against a central source code
29: repository or mirror. This means that you have the full set of CVS
30: commands available to control merging and updating your changes with
31: other source changes and for performing diff's, change histories
32: and other queries against the central repository.
1.36 deraadt 33: <p>
34: You can use anoncvs to access our three main source repositories:
35: <strong>src</strong>, <strong>ports</strong>, and <strong>www</strong>.
36: <p>
1.43 deraadt 37: <h3><font color=#0000e0>CVS:</font></h3>
1.36 deraadt 38: <a href=why-cvs.html>
39: CVS is the source code control system used to manage the OpenBSD source tree.</a>
1.16 deraadt 40: It implements a central repository for all officially released source code
1.15 grr 41: and changes, while permitting developers to maintain local copies of the
42: source code with their working changes. Developers with "write access"
43: can commit changes directly to the OpenBSD source tree, while "Anonymous
44: CVS" users have "read access" and can keep their local copies of the source
45: up to date and issue queries against the central depository.
46: <p>
1.22 niklas 47: The major strength of CVS is that it has the ability to perform intelligent
1.15 grr 48: merges of changes to the central repository with changes that you make to
49: your local copy. This means that if you make a change to a module and
50: perform an update, your changes are not "blown away", rather CVS makes
51: best efforts to merge the changes made to the central sources with changes
52: you've made to your local copy.
53: <p>
54: In the event that the changes can't be completely merged, CVS provides a
55: "soft fallback", in terms of providing you with annotated changes to your
1.39 todd 56: local copy, preserving an unmodified copy of your version and continuing
1.15 grr 57: to update any other source modules you requested.
1.22 niklas 58: <p>
1.23 mickey 59: People who own an OpenBSD CD may have seen the CVS/ dirs on it.
1.22 niklas 60: Actually there is a reason, the CD has a checkout of the OpenBSD src/ module
1.23 mickey 61: usable to continue updating from. Using this tree will results in a much
62: faster initial CVS update than a fresh checkout of the full OpenBSD
63: source tree. There are two ways of using the CD:
64: <ul>
65: <li>copy the tree off it, (assuming the CD is mounted on /mnt):
1.22 niklas 66: <pre>
1.23 mickey 67: <b>#</b> cd /mnt; cp -Rp CVS Makefile bin distrib etc games gnu \
68: <b>></b> include kerberosIV lib libexec lkm regress sbin share \
69: <b>></b> sys usr.bin usr.sbin /usr/src
1.22 niklas 70: </pre>
1.23 mickey 71: <li>use a union mount with the CD below a writable directory.
1.22 niklas 72: <pre>
1.23 mickey 73: <b>#</b> mount -t union -o -b /mnt /usr/src
1.22 niklas 74: </pre>
1.23 mickey 75: </ul>
1.22 niklas 76: After this, /usr/src will be a nice checkout area where all cvs(1) commands
77: will work OK.
1.15 grr 78: <h4>CVS COMMAND SUMMARY</h4>
1.27 todd 79: <dt> cvs [cvs args] [cvs command] [cvs command args]
80: <dd> below is a listing of commonly used cvs commands.
1.15 grr 81: <dl>
82: <DT>add
83: <dd>Add a new file or directory to the repository.
84: <dt>get
85: <dd>Make a working directory of source files for editing.
86: <dt>commit
87: <dd>Apply changes to the source repository (write access)
88: <dt>diff
89: <dd>Show differences between local files and the source repository.
90: <dt>history
91: <dd>Show reports on cvs commands against the source repository.
92: <dt>log
93: <dd>Display CVS log information.
94: <dt>rdiff
95: <dd>Prepare a collection of diffs reflecting changes between release.
96: <dt>status
97: <dd>Show current status of files in the repository and local copies.
98: <dt>update
99: <DD>Bring your working directory up to date with the repository.
100: </dl>
1.1 deraadt 101: <p>
1.39 todd 102: To summarize, the real strength of using Anonymous CVS is that it is
1.15 grr 103: a "tolerant" source code control system - it <strong>respects</strong>
104: changes that you have made to your local sources and makes <strong>
105: "best efforts"</strong> to update your entire source tree, rather than
106: leaving you a list of arcane problems that have to be resolved before
107: continuing.
1.1 deraadt 108:
1.43 deraadt 109: <h3><font color=#0000e0>Using Anonymous CVS:</font></h3>
1.1 deraadt 110: <p>
111: The latest version of CVS is available at
1.47 pauls 112: <a href=http://download.cyclic.com/pub/>Cyclic</a>.
1.1 deraadt 113: Versions earlier than 1.6 are not recommended, and may not work.
114: If you already have OpenBSD installed, CVS is included.
115:
116: <p>
117: There are two levels of source tree access:
118:
119: <dl>
120: <dt><strong>Read-write access for developers:</strong>
121: <dd>Developers who need to commit changes to the source tree must have
122: an account on the OpenBSD machines. Getting this access will be a
123: natural result of working on the sources with other OpenBSD developers.
124: If someone does some good work and shows they can work with the team,
125: they will get an account.
126: </dl>
127:
128: <dl>
129: <dt><strong>Read-only access for everyone:</strong>
130: <dd>Anyone can access the read-only CVS repositories. These copies
131: of the read-write CVS repository are mirrored often. To use one,
132: set your <strong>CVSROOT</strong> environment variable to one of
133: the following values:
1.12 grr 134: <p>
135: <strong>Please see the note about using ssh vs. rsh below!</strong>
136: <p>
1.1 deraadt 137: <ul>
138: <p>
139: <li><strong>CVSROOT=anoncvs@anoncvs.usa.openbsd.org:/cvs</strong><br>
1.10 millert 140: Host also known as <strong>anoncvs.openbsd.org</strong>,
141: <strong>anoncvs@anoncvs1.usa.openbsd.org</strong>,
142: <strong>anoncvs@anoncvs4.usa.openbsd.org</strong> and
143: <strong>anoncvs2.isc.org</strong>.<br>
144: located in California, western USA.<br>
1.46 millert 145: maintained by <a href=mailto:millert@openbsd.org>Todd Miller</a>.<br>
1.10 millert 146: protocols: ssh only.<br>
1.1 deraadt 147: updated every 4 hours.<br>
148: <p>
149: <li><strong>CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs</strong><br>
150: Host also known as <strong>freestuff.cs.colorado.edu</strong>.<br>
151: located at the University of Colorado, Boulder, western USA.<br>
152: maintained by <a href=mailto:Todd.Miller@cs.colorado.edu>Todd Miller</a>.<br>
153: protocols: ssh, ssh port 2022.<br>
154: updated every 6 hours.<br>
155: <p>
1.18 todd 156: <li>
157: <strong>CVSROOT=:pserver:anoncvs@anoncvs5.usa.openbsd.org:/cvs</strong><br>
158: Note <a href=#pserver>*pserver usage*</a><br>
159: Host also known as <strong>alpha.ctaz.com</strong>.<br>
1.19 todd 160: located in Arizona, western USA.<br>
1.18 todd 161: maintained by <a href=mailto:todd@openbsd.org>Todd Fries</a>.<br>
162: protocols: :pserver:.<br>
1.51 ! todd 163: Currently DOWN!<br>
1.18 todd 164: <p>
1.31 deraadt 165: <li><strong>CVSROOT=anoncvs@anoncvs6.usa.openbsd.org:/cvs</strong><br>
166: Host also known as <strong>openbsd.citi.umich.edu</strong>.<br>
167: located at the University of Michigan, central USA.<br>
168: maintained by <a href=mailto:rees@umich.edu>Jim Rees</a>.<br>
169: protocols: ssh, ssh port 2022.<br>
170: updated every 12 hours.<br>
171: <p>
1.24 deraadt 172: <li><strong>CVSROOT=anoncvs@anoncvs1.ca.openbsd.org:/cvs</strong><br>
1.40 beck 173: Host also known as <strong>anoncvs.ca.openbsd.org</strong>,
174: <strong>panopticon.ucs.ualberta.ca</strong><br>
1.24 deraadt 175: located in Edmonton, Alberta, Canada.<br>
176: maintained by <A HREF="mailto:beck@panopticon.ucs.ualberta.ca">Bob Beck</A><br>
1.32 beck 177: protocols: rsh, ssh, ssh port 2022, pserver<br>
1.45 beck 178: updated every 2 hours.<br>
1.24 deraadt 179: <p>
1.1 deraadt 180: <li><strong>CVSROOT=anoncvs@anoncvs.uk.openbsd.org:/cvs</strong><br>
181: Host also known as <strong>dumpty.wonderland.org</strong>.<br>
182: located in London, UK.<br>
183: maintained by <a href=mailto:peter@wonderland.org>Peter Galbavy</a>.<br>
184: protocols: rsh.<br>
185: updated every 12 hours.<br>
186: <p>
187: <li><strong>CVSROOT=anoncvs@anoncvs.tw.openbsd.org:/cvs</strong><br>
188: Host also known as <strong>hercules.secc.fju.edu.tw</strong>.<br>
189: located in Taipei, Taiwan.<br>
190: maintained by <a href=mailto:shawn@openbsd.org>Shawn Hsiao</a>.<br>
191: protocols: rsh, ssh, ssh port 2022.<br>
192: updated every 12 hours.<br>
193: <p>
194: <li><strong>CVSROOT=anoncvs@anoncvs.no.openbsd.org:/cvs</strong><br>
195: located in Norway.<br>
196: maintained by <a href=mailto:micheals@openbsd.org>Michael Shuldman</a>.<br>
197: protocols: rsh, ssh, ssh port 2022.<br>
198: updated every 4 hours.<br>
199: <p>
1.33 deraadt 200: <li><strong>CVSROOT=anoncvs@anoncvs.se.openbsd.org:/cvs</strong><br>
201: located in Sweden.<br>
202: maintained by <a href=mailto:anoncvs@stacken.kth.se>Magnus Holmberg</a>.<br>
203: protocols: rsh, ssh, ssh port 2022.<br>
204: updated every 4 hours.<br>
205: </ul>
206: <p>
1.1 deraadt 207: You may want to use `traceroute' to find out which server is nearest you.
1.11 michaels 208: Problems with a server should be reported to the <b>maintainer</b> of the
209: server in question.
1.1 deraadt 210: </dl>
211: <p>
212: <strong>IMPORTANT NOTE:</strong>
213: There are a few issues relating to cryptographic software that everyone
214: should be aware of:
215: <ul>
216: <li>The OpenBSD sources are from Canada.
1.9 deraadt 217: As
218: <a href=http://insight.mcmaster.ca/org/efc/pages/doc/crypto-export.html>
219: researched by a Canadian individual</a>
220: and as
221: <a href=http://axion.physics.ubc.ca/ECL.html>
222: described in the Export Control list of Canada</a>
223: is legal to export crypto software from Canada to the world.
1.1 deraadt 224: <p>
225: <li>However, if you are outside the USA or Canada, you should not
226: fetch the cryptographic sections of the OpenBSD sources from an
227: anoncvs server located in the USA. The files in question are...
228: <ul>
229: <li>src/kerberosIV/*
230: <li>src/lib/libc/crypt/crypt.c
231: <li>src/lib/libc/crypt/morecrypt.c
1.36 deraadt 232: <li>src/sys/netinet
1.1 deraadt 233: </ul>
234: Because of the USA ITAR munitions list,
235: crypto software may only be exported to Canada from the USA.
236: <p>
237: <li>The OpenBSD project is looking for more anoncvs servers -- read
238: on to find out how you can help.
239: </ul>
240:
241: <p>
242: A sample use of an anoncvs CVS server would be:
1.27 todd 243: <ul>
1.1 deraadt 244: <pre>
245: % setenv CVSROOT anoncvs@anoncvs.usa.openbsd.org:/cvs
246: % cd /tmp
247: % cvs get src/sys/arch/sparc
1.12 grr 248: [copies the files from the repository to your machine]
1.1 deraadt 249: % cvs log src/sys/arch/sparc/sparc/locore.s
1.12 grr 250: [shows the commit log for the chosen file ]
1.1 deraadt 251: % cvs diff -bc -r1.1 -r1.5 src/sys/arch/sparc/sparc/locore.s
1.12 grr 252: [shows the changes between revisions 1.1 and rev 1.5]
1.1 deraadt 253: </pre>
1.27 todd 254: </ul>
1.1 deraadt 255:
256: <p>
1.18 todd 257: <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>
258: <pre>
259: [ *NOTE* You must be using cvs version 1.8 or higher to do this ]
260: % setenv CVSROOT :pserver:anoncvs@anoncvs5.usa.openbsd.org:/cvs
261: % cvs login
262: (Logging in to anoncvs@anoncvs5.usa.openbsd.org)
263: CVS password: <type whatever you feel like, just type something!>
264: [this writes a line to ~/.cvspass (filename over-ridden by CVS_PASSFILE).]
265: [An example line from my ~/.cvspass after typing 'blah' for the above ]
266: [password is: ]
267: [:pserver:anoncvs@anoncvs5.usa.openbsd.org:/cvs Au'yc ]
268: [...after logging in ONCE every other use of the above CVSROOT will work ]
269: % cvs -z9 get ksrc-i386 ksrc-common
270: [allows you to retrieve ONLY that necessary to rebuild an i386 kernel ]
271: [ -z9 allows gzip -9 compression, GOOD medicine for slow links ]
272: </pre>
273:
274: <p>
1.39 todd 275: Here is how someone using anoncvs regularly would update his
1.1 deraadt 276: source tree:
1.27 todd 277: <ul><li>First, startout by `get'-ing an initial tree:
278:
1.1 deraadt 279: <pre>
280: # setenv CVSROOT anoncvs@anoncvs.usa.openbsd.org:/cvs
281: # cd /usr
282: # cvs -q get -PA src
283: </pre>
1.27 todd 284: </li>
1.37 todd 285:
1.27 todd 286: <li> Anytime afterwards, to `update' this tree:
1.1 deraadt 287: <pre>
1.41 deraadt 288: # cd /usr/src
289: # cvs -q up -PAd
1.1 deraadt 290: </pre>
1.27 todd 291:
1.39 todd 292: Everytime you ran this it would synchronize your /usr/src tree. It would
1.1 deraadt 293: not destroy any of your local changes, rather it would attempt to merge
294: changes in. If you use obj directories (not obj symbolic links) you may
295: wish to append "-I obj" to the cvs command line, this will keep cvs from
296: spitting out a warning about all the obj directories it is going to
297: encounter which are not in the repository.
1.27 todd 298: </li>
299: </ul>
300:
1.37 todd 301: <p>
302: To <a name=ports>use</a> <a href=ports.html>ports</a>, it is similar to src:
303: <ul><li>
304: <pre>
305: # setenv CVSROOT anoncvs@anoncvs.usa.openbsd.org:/cvs
306: # cd /usr
307: # cvs -q get -PA ports
1.38 deraadt 308: </pre>
1.37 todd 309: </li>
310: <li> Anytime afterwards, to `update' this tree:
311: <pre>
312: # cd /usr
313: # cvs -q up -PAd ports
314: </pre>
315: </li>
316: </p>
317: </ul>
318:
1.27 todd 319: In the above example, '-q' is optional, only intended to minimize
320: cvs's output. For those who like to see screenfulls of output, it
321: can be omitted.
1.1 deraadt 322:
323: <p>
1.12 grr 324: or to make a diff of a locally patched module (here cd.c) to include with
325: a bug report:
326: <pre>
327: # cd /usr
328: # cvs diff -u src/sys/scsi/cd.c > /tmp/patch
329: </pre>
1.37 todd 330: </p>
1.12 grr 331:
332: <p>
1.1 deraadt 333: The CVS man page (included with the CVS sources) has much more
334: information about how CVS can be used.
335:
336: <p>
1.12 grr 337: <strong>Warning:</strong>
338: When using cvs you should take care that your current directory is either
339: the root of the tree you're referencing or in a separate place such as /tmp.
340: Some commands such as "get" can create an arbitrary sub-tree in the current
341: directory, and a subsequent update will recursively flesh out this sub-tree.
342:
343: <p>
1.1 deraadt 344: The anoncvs service gives fledgling developers a chance to learn CVS
345: operation and get thoroughly involved in the development process
346: before getting "commit" access -- as a result of showing useful
347: skills and high quality results they will naturally later be given
348: developer access. As well, people providing patches can create
349: their "diff"s relative to the CVS tree, which will ease integration.
350:
351: <p>
1.15 grr 352: <strong>Anoncvs: rsh vs. ssh</strong>
1.12 grr 353: <br>
354: By default, the CVS client uses rsh to talk to the CVS server. Many
1.39 todd 355: of the CVS sites no longer support rsh for security reasons or a local
1.12 grr 356: problem like a firewall or imperfect protocol emulator such as slirp
357: may prevent you from using rsh.
358: The alternative is a to use a "secure shell" connection using
1.48 ryker 359: <a href=http://www.cs.hut.fi/ssh/>ssh</a>. This is a commercial product
1.12 grr 360: offered by <a href=http://www.ssh.fi>SSH Communications Security Ltd</a>,
361: however they make a free unix version available that can be easily
1.49 ian 362: installed under OpenBSD. If you have installed the OpenBSD
363: <A HREF="ports.html">ports tree</A> you can download, compile, and install
364: the free UNIX version just by changing directory into the directory
365: /usr/ports/security/ssh
366: and typing <KBD>make install</KBD>.
367: If you installed "ports" from the OpenBSD 2.2 CD-ROM, you get ssh
1.50 ian 368: version 1.2.21 and should eventually "cvs update ports" and rebuild it as above
1.49 ian 369: after you get ssh and anoncvs working, to get the latest version.
370: Alternately, you can manually download the latest Unix version from
1.48 ryker 371: <a href=http://www.cs.hut.fi/ssh/>http://www.cs.hut.fi/ssh/</a> or one of
1.49 ian 372: the mirrors listed there, compile, and install it yourself.
1.28 beck 373:
1.50 ian 374: <p> One ssh is installed, one sets the environment variable
1.28 beck 375: <strong>CVS_RSH</strong> to point to ssh (typically
376: <strong>/usr/local/bin/ssh</strong>). If your local site prevents you
377: from connecting out to port 22 (which ssh defaults to using) use port
378: 2022.
1.1 deraadt 379:
380: <p>
381: Do not be tempted to turn on compression since CVS already compresses.
382: Use something like the following in your <strong>$HOME/.ssh/config</strong>
1.10 millert 383: file. Note that not all anoncvs servers allow ssh connections on
1.21 millert 384: port 2022. Also note that most anoncvs servers no longer accept
385: the <strong>none</strong> cipher as it is disabled in recent
386: versions of ssh for security reasons.
1.1 deraadt 387: <pre>
388: Host anoncvs.usa.openbsd.org
389: Port 2022
390: </pre>
391:
392: <p>
393: CVS is a little noisy starting up; to quiet it a bit you may want to
394: do this:
395: <pre>
396: setenv CVS_CLIENT_PORT -1
397: </pre>
398:
399: <p>
1.8 deraadt 400: If you wish to change from one CVS server to another (say your normal one is
401: down, or for any other reason), the environment variable which will let you
402: do this is
403: <pre>
404: setenv CVS_IGNORE_REMOTE_ROOT
405: </pre>
406:
407: <p>
1.1 deraadt 408: If you wish to be a new anoncvs mirror site, please contact the anoncvs
409: <a href=mailto:deraadt@theos.com>maintainer</a>.
1.30 beck 410: Anoncvs mirrors require about 500MB of disk, and use up to 4MB of swap
1.1 deraadt 411: per anoncvs user (assuming the user does a large operation; while smaller
412: operations use fewer resources, anoncvs still makes much more of an
413: impact than ftp or sup). Such anoncvs machines should have excellent
414: network connectivity for the area they are expected to serve. A
415: <a href=anoncvs.shar>document</a>
416: which describes the setup of anoncvs servers is available.
417:
418: </dl>
419:
420: <hr>
1.3 deraadt 421: <a href=index.html><img src=back.gif border=0 alt=OpenBSD></a>
1.1 deraadt 422: <a href=mailto:www@openbsd.org>www@openbsd.org</a>
1.51 ! todd 423: <br><small>$OpenBSD: anoncvs.html,v 1.50 1998/02/24 00:54:08 ian Exp $</small>
1.1 deraadt 424:
425: </body>
426: </html>