version 1.456, 2016/09/01 12:08:03 |
version 1.457, 2016/09/02 21:41:55 |
|
|
Anonymous CVS is a method of keeping your local copy of the OpenBSD source |
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. |
tree up to date with respect to changes made to current OpenBSD sources. |
In addition to following the bleeding edge of development, it is |
In addition to following the bleeding edge of development, it is |
also possible to track the patches for errata of a release. |
also possible to track the <a href="faq/faq10.html#Patches">errata patches</a> |
|
of a release. |
|
|
<p> |
<p> |
The major advantage of Anonymous CVS over other source code update |
The major advantage of Anonymous CVS over other source code update |
techniques is that it works directly against a central source code |
techniques is that it works directly against a central source code |
repository or mirror. This means that you have the full set of CVS |
repository or mirror. This means that you have the full set of CVS |
commands available to control merging and updating your changes with |
commands available to control merging and updating your changes with |
other source changes and for performing diffs, change histories |
other source changes, performing diffs, change histories and other |
and other queries against the central repository. |
queries against the central repository. |
|
|
<p> |
<p> |
The OpenBSD Project currently has four active and two historic |
The OpenBSD Project currently has four active source repositories: |
source repositories: |
|
|
|
<ul> |
<ul> |
<li><b>src</b> - Houses all source code for the OpenBSD Operating System. |
<li><b>src</b> - source code for the base system |
<li><b>ports</b> - Houses the <a href="faq/ports/index.html">OpenBSD Ports</a>. |
<li><b>ports</b> - the <a href="faq/ports">ports tree</a> |
<li><b>www</b> - Houses all OpenBSD web pages. (Including this one). |
<li><b>www</b> - web pages |
<li><b>xenocara</b> - Houses OpenBSD's active X.org v7 source tree. |
<li><b>xenocara</b> - xenocara |
</ul> |
</ul> |
|
|
<p> |
|
To summarize, the real strength of using Anonymous CVS is that it is |
To summarize, the real strength of using Anonymous CVS is that it is |
a "tolerant" source code control system - it <strong>respects</strong> |
a "tolerant" source code control system - it <b>respects</b> |
changes that you have made to your local sources and makes <strong> |
changes that you have made to your local sources and makes <b> |
"best efforts"</strong> to update your entire source tree, rather than |
"best efforts"</b> to update your entire source tree, rather than |
leaving you a list of arcane problems that have to be resolved before |
leaving you a list of arcane problems that have to be resolved before |
continuing. |
continuing. |
|
|
|
<p> |
|
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. |
|
|
<h3 id="CVS"><font color="#0000e0">What is CVS?</font></h3> |
<h3 id="CVS"><font color="#0000e0">What is CVS?</font></h3> |
|
|
<a href="http://savannah.nongnu.org/projects/cvs">CVS</a> is the |
<a href="https://savannah.nongnu.org/projects/cvs">CVS</a> is the |
source code control system used to manage the OpenBSD source tree. |
source code control system used to manage the OpenBSD source tree. |
It implements a central repository for all officially released source code |
It implements a central repository for all officially released source code |
and changes, while permitting developers to maintain local copies of the |
and changes, while permitting developers to maintain local copies of the |
source code with their working changes. |
source code with their working changes. |
|
|
There are two levels of source tree access: |
There are two levels of source tree access: |
<ul> |
|
<li><b>Read-write access for developers:</b> |
|
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. |
|
|
|
<li><b>Read-only access for everyone:</b> |
<ul> |
Anyone can access the read-only CVS repositories. |
<li>Read-write access for developers |
These copies of the read-write CVS repository are mirrored often. |
<li>Read-only access for everyone |
</ul> |
</ul> |
|
|
<p> |
<h3 id="starting"><font color="#0000e0">Getting started using Anonymous |
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", 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. |
|
|
|
<h3 id="starting"><font color="#0000e0">Getting Started Using Anonymous |
|
CVS</font></h3> |
CVS</font></h3> |
|
|
While you can download the entire source tree from an anoncvs server, |
While you can download the entire source tree from an anoncvs server, |
|
|
which contains all the other "userland" utilities. |
which contains all the other "userland" utilities. |
In general, however, you will usually want both of them installed. |
In general, however, you will usually want both of them installed. |
Assuming the downloaded files, <tt>src.tar.gz</tt>, |
Assuming the downloaded files, <tt>src.tar.gz</tt>, |
<tt>sys.tar.gz</tt> and <tt>xenocara.tar.gz</tt> are in <tt>/usr</tt>: |
<tt>sys.tar.gz</tt> and <tt>xenocara.tar.gz</tt> are in <tt>/tmp</tt>: |
|
|
<pre> |
<blockquote><pre> |
# <b>cd /usr/src</b> |
# <b>cd /usr/src</b> |
# <b>tar xzf ../sys.tar.gz</b> |
# <b>tar xzf /tmp/src.tar.gz</b> |
# <b>tar xzf ../src.tar.gz</b> |
# <b>tar xzf /tmp/sys.tar.gz</b> |
# <b>cd /usr</b> |
# <b>cd /usr</b> |
# <b>tar xzf xenocara.tar.gz</b> |
# <b>tar xzf /tmp/xenocara.tar.gz</b> |
# <b>tar xzf ports.tar.gz</b> |
# <b>tar xzf /tmp/ports.tar.gz</b> |
</pre> |
</pre></blockquote> |
|
|
<p> |
|
Not all people will wish to unpack all the file sets, but as the system |
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. |
must be kept in sync, you will generally need to set up all trees. |
|
|
|
|
After this, <tt>/usr/src</tt> will be a nice checkout area where all |
After this, <tt>/usr/src</tt> will be a nice checkout area where all |
<a href="http://man.openbsd.org/cvs">cvs(1)</a> commands will work properly. |
<a href="http://man.openbsd.org/cvs">cvs(1)</a> commands will work properly. |
|
|
<h3 id="using"><font color="#0000e0">Using CVS to Get and Update Your |
<h3 id="using"><font color="#0000e0">Using CVS to get and update your |
Source Tree</font></h3> |
source tree</font></h3> |
|
|
<p> |
|
CVS was designed to be a simple way to retrieve and update your sources. |
CVS was designed to be a simple way to retrieve and update your sources. |
You must first decide whether you want to track <i>-current</i> or a |
You must first decide whether you want to track <i>-current</i> or a |
<a href="stable.html">patch branch</a>. |
<a href="stable.html">patch branch</a>. |
|
|
For more information on these "flavors" of OpenBSD, see |
For more information on these "flavors" of OpenBSD, see |
<a href="faq/faq5.html#Flavors">here</a>. |
<a href="faq/faq5.html#Flavors">here</a>. |
|
|
<p>Once you have decided which tree to follow, you must choose which Anonymous |
<p> |
|
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 |
CVS server you are going to use. A list of these servers is |
<a href="#CVSROOT">below</a>. |
<a href="#CVSROOT">below</a>. |
|
|
<p> |
<p> |
Once you have chosen which <a href="#CVSROOT">Anonymous CVS Server</a> you will |
Once you have chosen which server you will use, you can start using cvs. |
use, you can start using cvs. For those of you |
If you begin with <tt>src.tar.gz</tt> and <tt>sys.tar.gz</tt> as mentioned |
who have CDs you can start with the CVS checkout that is on the CD by using |
above, you can skip the initial <tt>get</tt> and proceed to updating. |
the method <a href="#starting">above</a> to get the sources onto your system. |
|
If you don't have a CD handy, use the method below to checkout the sources. |
|
|
|
|
<ul> |
|
<li>First, start out by getting an initial tree: |
|
|
<p> |
<p> |
<ul><li>First, start out by `get'-ing an initial tree: |
(If you are following <i>current</i>): |
|
|
<p> (If you are following <i>current</i>): |
<blockquote><pre> |
<pre> |
$ <b>cd /usr</b> |
# <strong>cd /usr</strong> |
$ <b>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P src</b> |
# <strong>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P src</strong> |
</pre></blockquote> |
</pre> |
|
|
|
<p> (If you are following the patch branch for 6.0): |
(If you are following the patch branch for 6.0): |
<pre> |
|
# <strong>cd /usr</strong> |
<blockquote><pre> |
# <strong>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_6_0 -P src</strong> |
$ <b>cd /usr</b> |
</pre> |
$ <b>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_6_0 -P src</b> |
|
</pre></blockquote> |
<!-- DO NOT EDIT ANONCVS.HTML MANUALLY - IT IS GENERATED FROM TEMPLATES! --> |
<!-- DO NOT EDIT ANONCVS.HTML MANUALLY - IT IS GENERATED FROM TEMPLATES! --> |
|
|
Anonymous CVS uses passwordless SSH as a transport. |
Anonymous CVS uses passwordless SSH as a transport. |
|
|
you will be asked to confirm the SSH fingerprint to ensure that you |
you will be asked to confirm the SSH fingerprint to ensure that you |
are connecting to the expected server: |
are connecting to the expected server: |
|
|
<pre> |
<blockquote><pre> |
$ <strong>cvs -d anoncvs@anoncvs.spacehopper.org:/cvs get src |
$ <b>cvs -d anoncvs@anoncvs.spacehopper.org:/cvs get -P src</b> |
The authenticity of host 'anoncvs.spacehopper.org (2001:67c:15f4:a423::28)' can't be established. |
The authenticity of host 'anoncvs.spacehopper.org (2001:67c:15f4:a423::28)' can't be established. |
ED25519 key fingerprint is SHA256:oaJ7VEyjt2EHMeixzKn9zJGiV5YlWHIUls070tKdBzI. |
ED25519 key fingerprint is SHA256:oaJ7VEyjt2EHMeixzKn9zJGiV5YlWHIUls070tKdBzI. |
Are you sure you want to continue connecting (yes/no)?</strong> |
Are you sure you want to continue connecting (yes/no)? |
</pre> |
</pre></blockquote> |
|
|
In most cases, the list below includes the fingerprints for the server, |
In most cases, the list below includes the fingerprints for the server, |
so you can compare it against the displayed fingerprint as additional |
so you can compare it against the displayed fingerprint as additional |
verification that you are connecting to the correct server. |
verification that you are connecting to the correct server. |
Confirm this, and the fingerprint will then be saved as usual. |
Confirm this, and the fingerprint will then be saved as usual. |
|
|
<pre> |
<blockquote><pre> |
<strong>Are you sure you want to continue connecting (yes/no)? yes |
Are you sure you want to continue connecting (yes/no)? <b>yes</b> |
Warning: Permanently added 'anoncvs.spacehopper.org' (ED25519) to the list of known hosts.</strong> |
Warning: Permanently added 'anoncvs.spacehopper.org' (ED25519) to the list of known hosts.</b> |
... |
</pre></blockquote> |
</pre> |
|
|
|
<li> Anytime afterwards, to `update' this tree: |
<li> Any time afterwards, to `update' this tree: |
<p> (If you are following <i>current</i>): |
|
<pre> |
|
# <strong>cd /usr/src</strong> |
|
# <strong>cvs -q up -Pd</strong> |
|
</pre> |
|
|
|
<p> (If you are following the patch branch for 6.0): |
<p> |
<pre> |
(If you are following <i>current</i>): |
# <strong>cd /usr/src</strong> |
|
# <strong>cvs -q up -rOPENBSD_6_0 -Pd</strong> |
|
</pre> |
|
|
|
Every time you ran this it would synchronize your /usr/src tree. |
<blockquote><pre> |
It would not destroy any of your local changes, rather it would attempt |
$ <b>cd /usr/src</b> |
|
$ <b>cvs -q up -Pd</b> |
|
</pre></blockquote> |
|
|
|
(If you are following the patch branch for 6.0): |
|
|
|
<blockquote><pre> |
|
$ <b>cd /usr/src</b> |
|
$ <b>cvs -q up -rOPENBSD_6_0 -Pd</b> |
|
</pre></blockquote> |
|
|
|
Every time you ran this, it would synchronize your <tt>/usr/src</tt> tree. |
|
It would not destroy any of your local changes; rather it would attempt |
to merge changes in. |
to merge changes in. |
|
|
<p> |
<p> |
<li> NOTE: |
<li> NOTE: |
If you are updating a source tree that you initially fetched |
If you are updating a source tree that you initially fetched |
from a different server, or from a CD, you <strong>must</strong> |
from a different server, or from a tar file, you <b>must</b> |
add the <em>-d [cvsroot]</em> option to cvs. |
add the <em>-d [cvsroot]</em> option to cvs. |
<pre> |
|
# <strong>cd /usr/src</strong> |
<blockquote><pre> |
# <strong>cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs -q up -Pd</strong> |
$ <b>cd /usr/src</b> |
</pre> |
$ <b>cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs -q up -Pd</b> |
|
</pre></blockquote> |
</ul> |
</ul> |
|
|
<p> |
To <a name="ports">use</a> <a href="faq/ports">ports</a>, |
To <a name="ports">use</a> <a href="faq/ports/index.html">ports</a>, |
|
it is similar to src: |
it is similar to src: |
|
|
<ul><li> |
<ul><li> |
<p> (If you are following <i>current</i>): |
|
<pre> |
<p> |
# <strong>cd /usr</strong> |
(If you are following <i>current</i>): |
# <strong>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P ports</strong> |
|
</pre> |
<blockquote><pre> |
<p> (If you are following the patch branch for 6.0): |
$ <b>cd /usr</b> |
<pre> |
$ <b>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P ports</b> |
# <strong>cd /usr</strong> |
</pre></blockquote> |
# <strong>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_6_0 -P ports</strong> |
|
</pre> |
(If you are following the patch branch for 6.0): |
<li> Anytime afterwards, to `update' this tree: |
|
<p> (If you are following <i>current</i>): |
<blockquote><pre> |
<pre> |
$ <b>cd /usr</b> |
# <strong>cd /usr/ports</strong> |
$ <b>cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_6_0 -P ports</b> |
# <strong>cvs -q up -Pd</strong> |
</pre></blockquote> |
</pre> |
|
<p> (If you are following the patch branch for 6.0): |
<li> Any time afterwards, to update this tree: |
<pre> |
|
# <strong>cd /usr/ports</strong> |
<p> |
# <strong>cvs -q up -rOPENBSD_6_0 -Pd</strong> |
(If you are following <i>current</i>): |
</pre> |
|
|
<blockquote><pre> |
|
$ <b>cd /usr/ports</b> |
|
$ <b>cvs -q up -Pd</b> |
|
</pre></blockquote> |
|
|
|
(If you are following the patch branch for 6.0): |
|
|
|
<blockquote><pre> |
|
$ <b>cd /usr/ports</b> |
|
$ <b>cvs -q up -rOPENBSD_6_0 -Pd</b> |
|
</pre></blockquote> |
|
|
</ul> |
</ul> |
|
|
In the above example, <i>-q</i> is optional, only intended to minimize |
In the above example, <tt>-q</tt> is optional, only intended to minimize |
cvs's output. |
cvs' output. |
For those who like to see screenfulls of output, it can be omitted. |
For those who like to see screenfulls of output, it can be omitted. |
|
|
<p> |
<p> |
To make a diff of a locally patched module (here <i>cd.c</i>) to include with |
To make a diff of a locally patched module (here <i>cd.c</i>) to include with |
a bug report: |
a bug report: |
<pre> |
|
# <strong>cd /usr</strong> |
|
# <strong>cvs diff -u src/sys/scsi/cd.c > /tmp/patch</strong> |
|
</pre> |
|
|
|
<p> |
<blockquote><pre> |
The <a href="http://man.openbsd.org/cvs">cvs(1) man page</a> |
$ <b>cd /usr</b> |
|
$ <b>cvs diff -u src/sys/scsi/cd.c > /tmp/patch</b> |
|
</pre></blockquote> |
|
|
|
The <a href="http://man.openbsd.org/cvs">cvs(1)</a> man page |
(included with the CVS sources) has much more |
(included with the CVS sources) has much more |
information about how CVS can be used. |
information about how CVS can be used. |
|
|
<p> |
<p> |
<strong>Warning:</strong> |
<b>Warning:</b> |
When using cvs you should take care that your current directory is either |
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. |
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 |
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. |
directory, and a subsequent update will recursively flesh out this sub-tree. |
|
|
before getting "commit" access -- as a result of showing useful |
before getting "commit" access -- as a result of showing useful |
skills and high quality results they will naturally later be given |
skills and high quality results they will naturally later be given |
developer access. |
developer access. |
As well, people providing patches can create their "diff"s relative |
As well, people providing patches can create their diffs relative |
to the CVS tree, which will ease integration. |
to the CVS tree, which will ease integration. |
|
|
<h3 id="EXAMPLE"><font color="#0000e0">Example usage for cvs(1)</font></h3> |
<h3 id="EXAMPLE"><font color="#0000e0">Example usage for cvs(1)</font></h3> |
|
|
<p> |
|
A sample use of an anoncvs server would be: |
A sample use of an anoncvs server would be: |
<pre> |
|
$ <strong>cd /tmp</strong> |
|
$ <strong>cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs get src/sys/arch/sparc</strong> |
|
[copies the files from the repository to your machine] |
|
$ <strong>cd src/sys/arch/sparc</strong> |
|
$ <strong>cvs log locore.s</strong> |
|
[shows the commit log for the chosen file] |
|
$ <strong>cvs diff -bc -r1.1 -r1.5 locore.s</strong> |
|
[shows the changes between revisions 1.1 and rev 1.5] |
|
</pre> |
|
|
|
|
<blockquote><pre> |
|
$ <b>cd /tmp</b> |
|
$ <b>cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs get -P src/sys/arch/sparc</b> |
|
[copies the files from the repository to your machine] |
|
$ <b>cd src/sys/arch/sparc</b> |
|
$ <b>cvs log locore.s</b> |
|
[shows the commit log for the chosen file] |
|
$ <b>cvs diff -bc -r1.1 -r1.5 locore.s</b> |
|
[shows the changes between revisions 1.1 and rev 1.5] |
|
</pre></blockquote> |
|
|
<h3 id="CVSROOT"><font color="#0000e0">Available Anonymous CVS Servers |
<h3 id="CVSROOT"><font color="#0000e0">Available Anonymous CVS Servers |
</font></h3> |
</font></h3> |
|
|
<p> |
|
<ul> |
<ul> |
<li><strong>CVSROOT=anoncvs@anoncvs.au.openbsd.org:/cvs</strong><br> |
<li><strong>CVSROOT=anoncvs@anoncvs.au.openbsd.org:/cvs</strong><br> |
Location: Brisbane, Australia.<br> |
Location: Brisbane, Australia.<br> |
|
|
some servers permit connections on an alternative port (typically 2022). |
some servers permit connections on an alternative port (typically 2022). |
These are noted in the list above. |
These are noted in the list above. |
To use a different port, reconfigure your ssh client by adding a "Host" |
To use a different port, reconfigure your ssh client by adding a "Host" |
entry to <strong>$HOME/.ssh/config</strong>, e.g.: |
entry to <b>$HOME/.ssh/config</b>, e.g.: |
<pre> |
<pre> |
Host anoncvs.ca.openbsd.org |
Host anoncvs.ca.openbsd.org |
Port 2022 |
Port 2022 |
|
|
<h3 id="NOTES"><font color="#0000e0">Final notes</font></h3> |
<h3 id="NOTES"><font color="#0000e0">Final notes</font></h3> |
After upgrading your source tree, you should read the comments |
After upgrading your source tree, you should read the comments |
at the top of <kbd>/usr/src/Makefile</kbd> before attempting |
at the top of <kbd>/usr/src/Makefile</kbd> before attempting |
a build. Also, you should build a new kernel <strong>before</strong> |
a build. Also, you should build a new kernel <b>before</b> |
doing a <kbd>make build</kbd> if possible. In some cases it may be |
doing a <kbd>make build</kbd> if possible. In some cases it may be |
necessary to rebuild and install the <kbd>config</kbd> utility before |
necessary to rebuild and install the <kbd>config</kbd> utility before |
you can build the kernel. If <kbd>config GENERIC</kbd> fails this |
you can build the kernel. If <kbd>config GENERIC</kbd> fails this |