Changeset View
Changeset View
Standalone View
Standalone View
documentation/content/en/books/handbook/mirrors/_index.adoc
Show First 20 Lines • Show All 421 Lines • ▼ Show 20 Lines | |||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
# pkg install ca_root_nss | # pkg install ca_root_nss | ||||||||
.... | .... | ||||||||
[[git-install]] | [[git-install]] | ||||||||
=== Installation | === Installation | ||||||||
Git can be installed from the Ports Collection: | Git can be installed as a package: | ||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
# cd /usr/ports/devel/git | # pkg install git | ||||||||
# make install clean | |||||||||
.... | .... | ||||||||
Git can also be installed as a package: | Git can also be installed from the Ports Collection: | ||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
# pkg install git | # cd /usr/ports/devel/git | ||||||||
# make install clean | |||||||||
.... | .... | ||||||||
[[git-usage]] | [[git-usage]] | ||||||||
=== Running Git | === Running Git | ||||||||
To fetch a clean copy of the sources into a local directory, use `git`. | To fetch a clean copy of the sources into a local directory, use `git`. | ||||||||
This directory of files is called the _working tree_. | This directory of files is called the _working tree_. | ||||||||
▲ Show 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | |||||||||
For more information, please refer to the "Commit message lists" section of C.2. "Mailing Lists" in handbook: https://www.freebsd.org/doc/en/books/handbook/eresources-mail.html | For more information, please refer to the "Commit message lists" section of C.2. "Mailing Lists" in handbook: https://www.freebsd.org/doc/en/books/handbook/eresources-mail.html | ||||||||
[[svn]] | [[svn]] | ||||||||
== Using Subversion | == Using Subversion | ||||||||
[[svn-intro]] | [[svn-intro]] | ||||||||
=== Introduction | === Introduction | ||||||||
As of July 2012, FreeBSD uses Subversion as the only version control system for storing all of FreeBSD's Ports Collection. | |||||||||
mat: Maybe change to this, for historic reasons ? | |||||||||
As of December 2020, FreeBSD uses git as the primary version control system for storing all of FreeBSD's source code and documentation. | As of December 2020, FreeBSD uses git as the primary version control system for storing all of FreeBSD's source code and documentation. | ||||||||
Changes from the git repo on the `stable/11`, `stable/12` and related releng branches are exported to the subversion repository. | Changes from the git repo on the `stable/11`, `stable/12` and related releng branches are exported to the subversion repository. | ||||||||
This export will continue through the life of these branches. | This export will continue through the life of these branches. | ||||||||
From July 2012 to March 2021, FreeBSD used Subversion as the only version control system for storing all of FreeBSD's Ports Collection. | |||||||||
As of April 2021, FreeBSD uses git as the only version control system for storing all of FreeBSD's Ports Collection. | |||||||||
Done Inline Actions
mat: | |||||||||
Done Inline ActionsTypo here Tfor his emaste: Typo here `Tfor his` | |||||||||
[NOTE] | [NOTE] | ||||||||
==== | ==== | ||||||||
Subversion is generally a developer tool. | Subversion is generally a developer tool. | ||||||||
Users may prefer to use `freebsd-update` (crossref:cutting-edge[updating-upgrading-freebsdupdate,“FreeBSD Update”]) to update the FreeBSD base system, and `portsnap` (crossref:ports[ports-using,“Using the Ports Collection”]) to update the FreeBSD Ports Collection. | Users may prefer to use `freebsd-update` (crossref:cutting-edge[updating-upgrading-freebsdupdate,“FreeBSD Update”]) to update the FreeBSD base system, and `portsnap` (crossref:ports[ports-using,“Using the Ports Collection”]) to update the FreeBSD Ports Collection. | ||||||||
After March 2021, subversion use is only for legacy branches (`stable/11` and `stable/12`). | After March 2021, subversion use is only for legacy branches (`stable/11` and `stable/12`). | ||||||||
==== | ==== | ||||||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||||||
To fetch a clean copy of the sources into a local directory, use `svn`. The files in this directory are called a _local working copy_. | To fetch a clean copy of the sources into a local directory, use `svn`. The files in this directory are called a _local working copy_. | ||||||||
[WARNING] | [WARNING] | ||||||||
==== | ==== | ||||||||
Move or delete an existing destination directory before using `checkout` for the first time. | Move or delete an existing destination directory before using `checkout` for the first time. | ||||||||
Checkout over an existing non-`svn` directory can cause conflicts between the existing files and those brought in from the repository. | Checkout over an existing non-`svn` directory can cause conflicts between the existing files and those brought in from the repository. | ||||||||
==== | ==== | ||||||||
Subversion uses URLs to designate a repository, taking the form of _protocol://hostname/path_. The first component of the path is the FreeBSD repository to access. There are three different repositories, `base` for the FreeBSD base system source code, `ports` for the Ports Collection, and `doc` for documentation. For example, the URL `https://svn.FreeBSD.org/ports/head/` specifies the main branch of the ports repository, using the `https` protocol. | Subversion uses URLs to designate a repository, taking the form of _protocol://hostname/path_. The first component of the path is the FreeBSD repository to access. There are three different repositories, `base` for the FreeBSD base system source code, `ports` for the Ports Collection, and `doc` for documentation. For example, the URL `https://svn.FreeBSD.org/base/head/` specifies the main branch of the ports repository, using the `https` protocol. | ||||||||
Done Inline ActionsI think this change is either wrong or incomplete. mat: I think this change is either wrong or incomplete. | |||||||||
Done Inline ActionsHm, I'll just remove that line for line now. rene: Hm, I'll just remove that line for line now. | |||||||||
A checkout from a given repository is performed with a command like this: | A checkout from a given repository is performed with a command like this: | ||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
# svn checkout https://svn.FreeBSD.org/repository/branch lwcdir | # svn checkout https://svn.FreeBSD.org/repository/branch lwcdir | ||||||||
.... | .... | ||||||||
where: | where: | ||||||||
* _repository_ is one of the Project repositories: `base`, `ports`, or `doc`. | * _repository_ is one of the Project repositories: `base`, `ports`, or `doc`. | ||||||||
* _branch_ depends on the repository used. `ports` and `doc` are mostly updated in the `head` branch, while `base` maintains the latest version of -CURRENT under `head` and the respective latest versions of the -STABLE branches under `stable/9` (9._x_) and `stable/10` (10._x_). | * _branch_ depends on the repository used. `ports` and `doc` are mostly updated in the `head` branch, while `base` maintains the latest version of -CURRENT under `head` and the respective latest versions of the -STABLE branches under `stable/9` (9._x_) and `stable/10` (10._x_). | ||||||||
* _lwcdir_ is the target directory where the contents of the specified branch should be placed. This is usually [.filename]#/usr/ports# for `ports`, [.filename]#/usr/src# for `base`, and [.filename]#/usr/doc# for `doc`. | * _lwcdir_ is the target directory where the contents of the specified branch should be placed. This is usually [.filename]#/usr/ports# for `ports`, [.filename]#/usr/src# for `base`, and [.filename]#/usr/doc# for `doc`. | ||||||||
This example checks out the Ports Collection from the FreeBSD repository using the HTTPS protocol, placing the local working copy in [.filename]#/usr/ports#. If [.filename]#/usr/ports# is already present but was not created by `svn`, remember to rename or delete it before the checkout. | This example checks out the Source Tree from the FreeBSD repository using the HTTPS protocol, placing the local working copy in [.filename]#/usr/src#. If [.filename]#/usr/src# is already present but was not created by `svn`, remember to rename or delete it before the checkout. | ||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
# svn checkout https://svn.FreeBSD.org/ports/head /usr/ports | # svn checkout https://svn.FreeBSD.org/base/head /usr/src | ||||||||
.... | .... | ||||||||
Because the initial checkout must download the full branch of the remote repository, it can take a while. Please be patient. | Because the initial checkout must download the full branch of the remote repository, it can take a while. Please be patient. | ||||||||
After the initial checkout, the local working copy can be updated by running: | After the initial checkout, the local working copy can be updated by running: | ||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
# svn update lwcdir | # svn update lwcdir | ||||||||
.... | .... | ||||||||
To update [.filename]#/usr/ports# created in the example above, use: | To update [.filename]#/usr/ports# created in the example above, use: | ||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
# svn update /usr/ports | # svn update /usr/src | ||||||||
.... | .... | ||||||||
The update is much quicker than a checkout, only transferring files that have changed. | The update is much quicker than a checkout, only transferring files that have changed. | ||||||||
An alternate way of updating the local working copy after checkout is provided by the [.filename]#Makefile# in the [.filename]#/usr/ports#, [.filename]#/usr/src#, and [.filename]#/usr/doc# directories. Set `SVN_UPDATE` and use the `update` target. For example, to update [.filename]#/usr/src#: | An alternate way of updating the local working copy after checkout is provided by the [.filename]#Makefile# in the [.filename]#/usr/ports#, [.filename]#/usr/src#, and [.filename]#/usr/doc# directories. Set `SVN_UPDATE` and use the `update` target. For example, to update [.filename]#/usr/src#: | ||||||||
[source,shell] | [source,shell] | ||||||||
.... | .... | ||||||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
Maybe change to this, for historic reasons ?