Appendix A. Obtaining FreeBSD

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 NameProtocolsMore information

docs.FreeBSD.org

https

FreeBSD Documentation Portal.

download.FreeBSD.org

https ftp

Same content as ftp.FreeBSD.org, ftp is a legacy name; download.FreeBSD.org is recommended.

git.FreeBSD.org

git over https and ssh

More details on using git section.

pkg.FreeBSD.org

pkg(8) over http and https

Official FreeBSD package repositories used by the pkg(8) program.

vuxml.FreeBSD.org / www.VuXML.org

https

FreeBSD Project VuXML web page. pkg audit fetches the list of vulnerabilities from this service.

www.FreeBSD.org

https

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:

CountryHostnameProtocols

Australia

ftp.au.FreeBSD.org

http http_v6 rsync rsync_v6

ftp3.au.FreeBSD.org

http ftp rsync

Austria

ftp.at.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

Brazil

ftp2.br.FreeBSD.org

http rsync rsync_v6

ftp3.br.FreeBSD.org

http ftp rsync

Bulgaria

ftp.bg.FreeBSD.org

ftp ftp_v6 rsync rsync_v6

Czech Republic

ftp.cz.FreeBSD.org

http http_v6 rsync rsync_v6

Denmark

ftp.dk.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

Finland

ftp.fi.FreeBSD.org

ftp

France

ftp.fr.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp3.fr.FreeBSD.org

ftp

ftp6.fr.FreeBSD.org

http ftp rsync

Germany

ftp.de.FreeBSD.org

ftp ftp_v6 rsync rsync_v6

ftp1.de.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp2.de.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp5.de.FreeBSD.org

ftp ftp_v6

ftp7.de.FreeBSD.org

http http_v6 ftp ftp_v6

Greece

ftp.gr.FreeBSD.org

http http_v6 ftp ftp_v6

ftp2.gr.FreeBSD.org

http http_v6 ftp ftp_v6 rsync

Japan

ftp.jp.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp2.jp.FreeBSD.org

ftp rsync rsync_v6

ftp3.jp.FreeBSD.org

http rsync

ftp4.jp.FreeBSD.org

ftp

ftp6.jp.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

Kazakhstan

mirror.ps.kz

http ftp

mirror.neolabs.kz

http ftp

Korea

ftp.kr.FreeBSD.org

http https ftp rsync

ftp2.kr.FreeBSD.org

rsync

Latvia

ftp.lv.FreeBSD.org

http ftp

Netherlands

ftp.nl.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp2.nl.FreeBSD.org

http ftp rsync

mirror.nl.altushost.com

https

New Zealand

ftp.nz.FreeBSD.org

http ftp

Norway

ftp.no.FreeBSD.org

ftp ftp_v6 rsync rsync_v6

Poland

ftp.pl.FreeBSD.org

http http_v6 ftp rsync rsync_v6

Russia

ftp.ru.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp2.ru.FreeBSD.org

https ftp rsync

Slovenia

ftp.si.FreeBSD.org

http http_v6 ftp ftp_v6

South Africa

ftp.za.FreeBSD.org

https https_v6 rsync rsync_v6

ftp2.za.FreeBSD.org

http http_v6 ftp_v6

ftp4.za.FreeBSD.org

http ftp rsync

Sweden

ftp.se.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

mirror.se.altushost.com

https

Taiwan

ftp4.tw.FreeBSD.org

https ftp rsync

ftp5.tw.FreeBSD.org

http ftp

Ukraine

ftp.ua.FreeBSD.org

http ftp ftp_v6 rsync rsync_v6

United Kingdom

ftp.uk.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp2.uk.FreeBSD.org

http http_v6 https https_v6 ftp ftp_v6

United States of America

ftp11.FreeBSD.org

http http_v6 ftp ftp_v6 rsync rsync_v6

ftp14.FreeBSD.org

ftp rsync (Former official tier 1)

ftp5.FreeBSD.org

http http_v6 ftp ftp_v6

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 freebsd-update (“FreeBSD Update”) to update the FreeBSD base system.

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:

# pkg install git

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.

Table 1. FreeBSD Git Repository URL Table
ItemGit URL

Read-only src repo via HTTPS

https://git.FreeBSD.org/src.git

Read-only src repo via anon-ssh

ssh://anongit@git.FreeBSD.org/src.git

Read-only doc repo via HTTPS

https://git.FreeBSD.org/doc.git

Read-only doc repo via anon-ssh

ssh://anongit@git.FreeBSD.org/doc.git

Read-only ports repo via HTTPS

https://git.FreeBSD.org/ports.git

Read-only ports repo via anon-ssh

ssh://anongit@git.FreeBSD.org/ports.git

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.

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 freebsd-update (“FreeBSD Update”) to update the FreeBSD base system, and git (“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).

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 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.

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, 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/11 (11.x) and stable/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 for base, and /usr/doc for doc.

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:


Last modified on: September 20, 2024 by Fernando Apesteguía