# pkg install git
Appendix A. Obtaining FreeBSD
Table of Contents
A.1. Mirrors
The official mirrors of the FreeBSD project are made up of many machines operated by the project cluster administrators and behind GeoDNS to direct users to the closest available mirror. Current locations are Australia, Brazil, Germany, Japan (two sites), Malaysia, South Africa, Sweden, Taiwan, United Kingdom, United States of America (California, New Jersey, and Washington).
Official mirrors service:
Service Name | Protocols | More information |
---|---|---|
docs.FreeBSD.org | FreeBSD Documentation Portal. | |
download.FreeBSD.org | Same content as | |
git.FreeBSD.org | git over | More details on using git section. |
pkg.FreeBSD.org | pkg(8) over | Official FreeBSD package repositories used by the pkg(8) program. |
vuxml.FreeBSD.org / www.VuXML.org | FreeBSD Project VuXML web page. | |
www.FreeBSD.org | FreeBSD Website. |
All official mirrors support IPv4 and IPv6.
http://ftp-archive.FreeBSD.org is not in the GeoDNS Infrastructure, hosted in only one location (US).
The project is looking for new locations; those willing to sponsor, please reach out to the Cluster Administrators team for more information.
Mirror list maintained by the community and other companies:
Country | Hostname | Protocols |
---|---|---|
ftp.au.FreeBSD.org | ||
ftp3.au.FreeBSD.org | ||
ftp.at.FreeBSD.org | ||
ftp2.br.FreeBSD.org | ||
ftp3.br.FreeBSD.org | ||
ftp.bg.FreeBSD.org | ||
ftp.cz.FreeBSD.org | ||
ftp.dk.FreeBSD.org | ||
ftp.fi.FreeBSD.org | ||
ftp.fr.FreeBSD.org | ||
ftp3.fr.FreeBSD.org | ||
ftp6.fr.FreeBSD.org | ||
ftp.de.FreeBSD.org | ||
ftp1.de.FreeBSD.org | ||
ftp2.de.FreeBSD.org | ||
ftp5.de.FreeBSD.org | ||
ftp7.de.FreeBSD.org | ||
ftp.gr.FreeBSD.org | ||
ftp2.gr.FreeBSD.org | ||
ftp.jp.FreeBSD.org | ||
ftp2.jp.FreeBSD.org | ||
ftp3.jp.FreeBSD.org | ||
ftp4.jp.FreeBSD.org | ||
ftp6.jp.FreeBSD.org | ||
mirror.ps.kz | ||
mirror.neolabs.kz | ||
ftp.kr.FreeBSD.org | ||
ftp2.kr.FreeBSD.org | ||
ftp.lv.FreeBSD.org | ||
ftp.nl.FreeBSD.org | ||
ftp2.nl.FreeBSD.org | ||
mirror.nl.altushost.com | ||
ftp.nz.FreeBSD.org | ||
ftp.no.FreeBSD.org | ||
ftp.pl.FreeBSD.org | ||
ftp.ru.FreeBSD.org | ||
ftp2.ru.FreeBSD.org | ||
ftp.si.FreeBSD.org | ||
ftp.za.FreeBSD.org | ||
ftp2.za.FreeBSD.org | ||
ftp4.za.FreeBSD.org | ||
ftp.se.FreeBSD.org | ||
mirror.se.altushost.com | ||
ftp4.tw.FreeBSD.org | ||
ftp5.tw.FreeBSD.org | ||
ftp.ua.FreeBSD.org | ||
ftp.uk.FreeBSD.org | ||
ftp2.uk.FreeBSD.org | ||
ftp11.FreeBSD.org | ||
ftp14.FreeBSD.org | ||
ftp5.FreeBSD.org |
The current list of protocols supported by the community mirrors was last updated on 2022-01-31, and it’s not guaranteed.
A.2. Using Git
A.2.1. Introduction
As of December 2020, FreeBSD uses git as the primary version control system for storing all of FreeBSD’s base source code and documentation. As of April 2021, FreeBSD uses git as the only version control system for storing all of FreeBSD’s Ports Collection.
Git is generally a developer tool.
Users may prefer to use |
This section demonstrates how to install Git on a FreeBSD system and use it to create a local copy of a FreeBSD source code repository.
A.2.2. Installation
Git can be installed from the Ports Collection, or as a package:
A.2.3. Running Git
To fetch a clean copy of the sources into a local directory, use git clone
.
This directory of files is called the working tree.
Git uses URLs to designate a repository.
There are three different repositories, src
for the FreeBSD system source code, doc
for documentation, and ports
for the FreeBSD Ports Collection.
All three are reachable over two different protocols: HTTPS and SSH.
For example, the URL https://git.FreeBSD.org/src.git
specifies the main branch of the src
repository, using the https
protocol.
Item | Git URL |
---|---|
Read-only src repo via HTTPS | |
Read-only src repo via anon-ssh |
|
Read-only doc repo via HTTPS | |
Read-only doc repo via anon-ssh |
|
Read-only ports repo via HTTPS | |
Read-only ports repo via anon-ssh |
|
External mirrors maintained by project members are also available; please refer to the External mirrors section.
To clone a copy of the FreeBSD system source code repository:
# git clone -o freebsd https://git.FreeBSD.org/src.git /usr/src
The -o freebsd
option specifies the origin; by convention in the FreeBSD documentation, the origin is assumed to be freebsd
.
Because the initial checkout must download the full branch of the remote repository, it can take a while.
Please be patient.
Initially, the working tree contains source code for the main
branch, which corresponds to CURRENT.
To switch to 13-STABLE instead:
# cd /usr/src
# git checkout stable/13
The working tree can be updated with git pull
.
To update /usr/src created in the example above, use:
# cd /usr/src
# git pull --rebase
The update is much quicker than a checkout, only transferring files that have changed.
A.2.4. Web-based repository browser
The FreeBSD project uses cgit as the web-based repository browser: https://cgit.FreeBSD.org/.
A.2.5. For Developers
For information about write access to repositories see the Committer’s Guide.
A.2.6. External mirrors
Those mirrors are not hosted in FreeBSD.org but still maintained by the project members.
Users and developers are welcome to pull or browse repositories on those mirrors.
Pull requests for the doc
and src
GitHub repositories are being accepted; otherwise, the project workflow with those mirrors is still under discussion.
- Codeberg
- GitHub
- GitLab
A.2.7. Mailing lists
The main mailing list for general usage and questions about git in the FreeBSD project is freebsd-git. For more details, including commit messages lists, see the Mailing Lists chapter.
A.2.8. SSH host keys
gitrepo.FreeBSD.org host key fingerprints:
ECDSA key fingerprint is
SHA256:seWO5D27ySURcx4bknTNKlC1mgai0whP443PAKEvvZA
ED25519 key fingerprint is
SHA256:lNR6i4BEOaaUhmDHBA1WJsO7H3KtvjE2r5q4sOxtIWo
RSA key fingerprint is
SHA256:f453CUEFXEJAXlKeEHV+ajJfeEfx9MdKQUD7lIscnQI
git.FreeBSD.org host key fingerprints:
ECDSA key fingerprint is
SHA256:/UlirUAsGiitupxmtsn7f9b7zCWd0vCs4Yo/tpVWP9w
ED25519 key fingerprint is
SHA256:y1ljKrKMD3lDObRUG3xJ9gXwEIuqnh306tSyFd1tuZE
RSA key fingerprint is
SHA256:jBe6FQGoH4HjvrIVM23dcnLZk9kmpdezR/CvQzm7rJM
These are also published as SSHFP records in DNS.
A.3. Using Subversion
A.3.1. Introduction
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.
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.
Subversion is generally a developer tool.
Users may prefer to use |
This section demonstrates how to install Subversion on a FreeBSD system and use it to create a local copy of a FreeBSD repository. Additional information on the use of Subversion is included.
A.3.2. Svnlite
A lightweight version of Subversion is already installed on FreeBSD as svnlite
.
The port or package version of Subversion is only needed if the Python or Perl API is needed, or if a later version of Subversion is desired.
The only difference from normal Subversion use is that the command name is svnlite
.
A.3.3. Installation
If svnlite
is unavailable or the full version of Subversion is needed, then it must be installed.
Subversion can be installed from the Ports Collection:
# cd /usr/ports/devel/subversion
# make install clean
Subversion can also be installed as a package:
# pkg install subversion
A.3.4. Running Subversion
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.
Move or delete an existing destination directory before using |
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 src repository, using the https
protocol.
A checkout from a given repository is performed with a command like this:
# svn checkout https://svn.FreeBSD.org/repository/branch lwcdir
where:
repository is one of the Project repositories:
base
,ports
, ordoc
.branch depends on the repository used.
ports
anddoc
are mostly updated in thehead
branch, whilebase
maintains the latest version of -CURRENT underhead
and the respective latest versions of the -STABLE branches understable/11
(11.x) andstable/12
(12.x).lwcdir is the target directory where the contents of the specified branch should be placed. This is usually /usr/ports for
ports
, /usr/src forbase
, and /usr/doc fordoc
.
This example checks out the Source Tree from the FreeBSD repository using the HTTPS protocol, placing the local working copy in /usr/src.
If /usr/src is already present but was not created by svn
, remember to rename or delete it before the checkout.
# 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.
After the initial checkout, the local working copy can be updated by running:
# svn update lwcdir
To update /usr/src created in the example above, use:
# svn update /usr/src
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 Makefile in the /usr/ports, /usr/src, and /usr/doc directories.
Set SVN_UPDATE
and use the update
target.
For example, to update /usr/src:
# cd /usr/src
# make update SVN_UPDATE=yes
A.3.5. Subversion Mirror Sites
The FreeBSD Subversion repository is:
svn.FreeBSD.org
This is a publicly accessible mirror network that uses GeoDNS to select an appropriate back end server. To view the FreeBSD Subversion repositories through a browser, use https://svnweb.FreeBSD.org/.
HTTPS is the preferred protocol, but the security/ca_root_nss package will need to be installed in order to automatically validate certificates.
A.3.6. For More Information
For other information about using Subversion, please see the "Subversion Book", titled Version Control with Subversion, or the Subversion Documentation.
A.4. Disc Copies
FreeBSD disc copies are available from several online retailers:
FreeBSD Mall, Inc.
1164 Claremont Dr
Brentwood, CA
94513
USA
Phone: +1 925 240-6652
Fax: +1 925 674-0821
Email: info@freebsdmall.com
Website: https://www.freebsdmall.comGetlinux
Website: https://www.getlinux.fr/Dr. Hinner EDV
Schäftlarnstr. 10 // 4. Stock
D-81371 München
Germany
Phone: +49 171 417 544 6
Email: infow@hinner.de
Website: http://www.hinner.de/linux/freebsd.html
Last modified on: September 20, 2024 by Fernando Apesteguía