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