📄 anoncvs.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Anonymous CVS</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="Obtaining FreeBSD" href="mirrors.html" /><link rel="PREVIOUS" title="FTP Sites" href="mirrors-ftp.html" /><link rel="NEXT" title="Using CTM" href="ctm.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="mirrors-ftp.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Appendix A. Obtaining FreeBSD</td><td width="10%" align="right" valign="bottom"><a href="ctm.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="ANONCVS" name="ANONCVS">A.3 Anonymous CVS</a></h1><div class="SECT2"><h2 class="SECT2"><a id="AEN39481" name="AEN39481">A.3.1 <a id="ANONCVS-INTRO"name="ANONCVS-INTRO"></a>Introduction</a></h2><p>Anonymous CVS (or, as it is otherwise known, <span class="emphasis"><iclass="EMPHASIS">anoncvs</i></span>) is a feature provided by the CVS utilities bundledwith FreeBSD for synchronizing with a remote CVS repository. Among other things, itallows users of FreeBSD to perform, with no special privileges, read-only CVS operationsagainst one of the FreeBSD project's official anoncvs servers. To use it, one simply setsthe <tt class="ENVAR">CVSROOT</tt> environment variable to point at the appropriateanoncvs server, provides the well-known password ``anoncvs'' with the <ttclass="COMMAND">cvs login</tt> command, and then uses the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=cvs&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">cvs</span>(1)</span></a> command toaccess it like any local repository.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> The <tt class="COMMAND">cvs login</tt> command, stores the passwords thatare used for authenticating to the CVS server in a file called <ttclass="FILENAME">.cvspass</tt> in your <tt class="ENVAR">HOME</tt> directory. If thisfile does not exist, you might get an error when trying to use <tt class="COMMAND">cvslogin</tt> for the first time. Just make an empty <tt class="FILENAME">.cvspass</tt>file, and retry to login.</p></blockquote></div><p>While it can also be said that the <a href="cvsup.html">CVSup</a> and <spanclass="emphasis"><i class="EMPHASIS">anoncvs</i></span> services both perform essentiallythe same function, there are various trade-offs which can influence the user's choice ofsynchronization methods. In a nutshell, <b class="APPLICATION">CVSup</b> is much moreefficient in its usage of network resources and is by far the most technicallysophisticated of the two, but at a price. To use <b class="APPLICATION">CVSup</b>, aspecial client must first be installed and configured before any bits can be grabbed, andthen only in the fairly large chunks which <b class="APPLICATION">CVSup</b> calls <spanclass="emphasis"><i class="EMPHASIS">collections</i></span>.</p><p><b class="APPLICATION">Anoncvs</b>, by contrast, can be used to examine anything froman individual file to a specific program (like <tt class="COMMAND">ls</tt> or <ttclass="COMMAND">grep</tt>) by referencing the CVS module name. Of course, <bclass="APPLICATION">anoncvs</b> is also only good for read-only operations on the CVSrepository, so if it is your intention to support local development in one repositoryshared with the FreeBSD project bits then <b class="APPLICATION">CVSup</b> is really youronly option.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN39512" name="AEN39512">A.3.2 <a id="ANONCVS-USAGE"name="ANONCVS-USAGE"></a>Using Anonymous CVS</a></h2><p>Configuring <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cvs&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">cvs</span>(1)</span></a> to use anAnonymous CVS repository is a simple matter of setting the <tt class="ENVAR">CVSROOT</tt>environment variable to point to one of the FreeBSD project's <span class="emphasis"><iclass="EMPHASIS">anoncvs</i></span> servers. At the time of this writing, the followingservers are available:</p><ul><li><p><span class="emphasis"><i class="EMPHASIS">Austria</i></span>::pserver:anoncvs@anoncvs.at.FreeBSD.org:/home/ncvs (Use <tt class="COMMAND">cvslogin</tt> and enter any password when prompted.)</p></li><li><p><span class="emphasis"><i class="EMPHASIS">France</i></span>::pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs (pserver (password ``anoncvs''), ssh(no password))</p></li><li><p><span class="emphasis"><i class="EMPHASIS">Germany</i></span>::pserver:anoncvs@anoncvs.de.FreeBSD.org:/home/ncvs (Use <tt class="COMMAND">cvslogin</tt> and enter the password ``anoncvs'' when prompted.)</p></li><li><p><span class="emphasis"><i class="EMPHASIS">Germany</i></span>::pserver:anoncvs@anoncvs2.de.FreeBSD.org:/home/ncvs (rsh, pserver, ssh, ssh/2022)</p></li><li><p><span class="emphasis"><i class="EMPHASIS">Japan</i></span>::pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs (Use <tt class="COMMAND">cvslogin</tt> and enter the password ``anoncvs'' when prompted.)</p></li><li><p><span class="emphasis"><i class="EMPHASIS">Sweden</i></span>:freebsdanoncvs@anoncvs.se.FreeBSD.org:/home/ncvs (ssh only - no password)</p></li><li><p><span class="emphasis"><i class="EMPHASIS">USA</i></span>:freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs (ssh only - no password)</p></li></ul><p>Since CVS allows one to ``check out'' virtually any version of the FreeBSD sourcesthat ever existed (or, in some cases, will exist), you need to be familiar with therevision (<var class="OPTION">-r</var>) flag to <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=cvs&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">cvs</span>(1)</span></a> and what someof the permissible values for it in the FreeBSD Project repository are.</p><p>There are two kinds of tags, revision tags and branch tags. A revision tag refers to aspecific revision. Its meaning stays the same from day to day. A branch tag, on the otherhand, refers to the latest revision on a given line of development, at any given time.Because a branch tag does not refer to a specific revision, it may mean somethingdifferent tomorrow than it means today.</p><p><a href="cvs-tags.html">Section A.6</a> contains revision tags that users might beinterested in. Again, none of these are valid for the ports collection since the portscollection does not have multiple revisions.</p><p>When you specify a branch tag, you normally receive the latest versions of the fileson that line of development. If you wish to receive some past version, you can do so byspecifying a date with the <var class="OPTION">-D date</var> flag. See the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=cvs&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">cvs</span>(1)</span></a> manual page formore details.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN39563" name="AEN39563">A.3.3 Examples</a></h2><p>While it really is recommended that you read the manual page for <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=cvs&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">cvs</span>(1)</span></a> thoroughlybefore doing anything, here are some quick examples which essentially show how to useAnonymous CVS:</p><div class="EXAMPLE"><a id="AEN39569" name="AEN39569"></a><p><b>Example A-1. Checking Out Something from -CURRENT (<span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ls</span>(1)</span>) and Deleting It Again:</b></p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs login</kbd><span class="emphasis"><iclass="EMPHASIS">At the prompt, enter the password</i></span> ``anoncvs''.<samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs co ls</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs release -d ls</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs logout</kbd> </pre></div><div class="EXAMPLE"><a id="AEN39587" name="AEN39587"></a><p><b>Example A-2. Checking Out the Version of <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ls</span>(1)</span> in the 3.X-STABLE Branch:</b></p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs login</kbd><span class="emphasis"><iclass="EMPHASIS">At the prompt, enter the password</i></span> ``anoncvs''.<samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs co -rRELENG_3 ls</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs release -d ls</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs logout</kbd> </pre></div><div class="EXAMPLE"><a id="AEN39605" name="AEN39605"></a><p><b>Example A-3. Creating a List of Changes (as Unified Diffs) to <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ls</span>(1)</span></b></p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs login</kbd><span class="emphasis"><iclass="EMPHASIS">At the prompt, enter the password</i></span> ``anoncvs''.<samp class="PROMPT">%</samp> <kbdclass="USERINPUT">cvs rdiff -u -rRELENG_3_0_0_RELEASE -rRELENG_3_4_0_RELEASE ls</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs logout</kbd> </pre></div><div class="EXAMPLE"><a id="AEN39621" name="AEN39621"></a><p><b>Example A-4. Finding Out What Other Module Names Can Be Used:</b></p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs login</kbd><span class="emphasis"><iclass="EMPHASIS">At the prompt, enter the password</i></span> ``anoncvs''.<samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs co modules</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">more modules/modules</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs release -d modules</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">cvs logout</kbd> </pre></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN39638" name="AEN39638">A.3.4 Other Resources</a></h2><p>The following additional resources may be helpful in learning CVS:</p><ul><li><p><a href="http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/cvs/"target="_top">CVS Tutorial</a> from Cal Poly.</p></li><li><p><a href="http://www.cvshome.org/" target="_top">CVS Home</a>, the CVS development andsupport community.</p></li><li><p><a href="http://www.FreeBSD.org/cgi/cvsweb.cgi" target="_top">CVSweb</a> is theFreeBSD Project web interface for CVS.</p></li></ul></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="mirrors-ftp.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="ctm.html" accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">FTP Sites</td><td width="34%" align="center" valign="top"><a href="mirrors.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Using CTM</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -