Primary Mirror Sites
# cd /usr/ports/security/ca_root_nss
# make install clean
FreeBSD CD and DVD sets are available from several online retailers:
FreeBSD Mall, Inc.
2420 Sand Creek Rd C-1 #347
Brentwood, CA
94513
USA
Phone: +1 925 240-6652
Fax: +1 925 674-0821
Email: <info@freebsdmall.com>
WWW: https://www.freebsdmall.com
Getlinux
78 Rue de la Croix Rochopt
Épinay-sous-Sénart
91860
France
Email: <contact@getlinux.fr>
WWW: http://www.getlinux.fr/
Dr. Hinner EDV
Kochelseestr. 11
D-81371 München
Germany
Phone: (0177) 428 419 0
Email: <infow@hinner.de>
WWW: http://www.hinner.de/linux/freebsd.html
Linux Center
Galernaya Street, 55
Saint-Petersburg
190000
Russia
Phone: +7-812-309-06-86
Email: <info@linuxcenter.ru>
WWW: http://linuxcenter.ru/shop/freebsd
The official sources for FreeBSD are available via anonymous FTP from a worldwide set of mirror sites. The site ftp://ftp.FreeBSD.org/pub/FreeBSD/ is available via HTTP and FTP. It is made up of many machines operated by the project cluster administrators and behind GeoDNS to direct users to the closest available mirror.
Additionally, FreeBSD is available via anonymous FTP from the following mirror sites. When obtaining FreeBSD via anonymous FTP, please try to use a nearby site. The mirror sites listed as "Primary Mirror Sites" typically have the entire FreeBSD archive (all the currently available versions for each of the architectures) but faster download speeds are probably available from a site that is in your country or region. The regional sites carry the most recent versions for the most popular architecture(s) but might not carry the entire FreeBSD archive. All sites provide access via anonymous FTP but some sites also provide access via other methods. The access methods available for each site are provided in parentheses after the hostname.
Central Servers, Primary Mirror Sites, Armenia, Australia, Austria, Brazil, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Ireland, Japan, Korea, Latvia, Lithuania, Netherlands, New Zealand, Norway, Poland, Russia, Saudi Arabia, Slovenia, South Africa, Spain, Sweden, Switzerland, Taiwan, Ukraine, United Kingdom, United States of America.
(as of UTC)
Central Servers
ftp://ftp.FreeBSD.org/pub/FreeBSD/ (ftp / ftpv6 / http://ftp.FreeBSD.org/pub/FreeBSD/ / http://ftp.FreeBSD.org/pub/FreeBSD/)
Primary Mirror Sites
In case of problems, please contact the hostmaster <mirror-admin@FreeBSD.org>
for this domain.
ftp://ftp4.FreeBSD.org/pub/FreeBSD/ (ftp / ftpv6 / http://ftp4.FreeBSD.org/pub/FreeBSD/ / http://ftp4.FreeBSD.org/pub/FreeBSD/)
ftp://ftp10.FreeBSD.org/pub/FreeBSD/ (ftp / ftpv6 / http://ftp10.FreeBSD.org/pub/FreeBSD/ / http://ftp10.FreeBSD.org/pub/FreeBSD/)
ftp://ftp14.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp14.FreeBSD.org/pub/FreeBSD/)
Armenia
In case of problems, please contact the hostmaster <hostmaster@am.FreeBSD.org>
for this domain.
Australia
In case of problems, please contact the hostmaster <hostmaster@au.FreeBSD.org>
for this domain.
Austria
In case of problems, please contact the hostmaster <hostmaster@at.FreeBSD.org>
for this domain.
Brazil
In case of problems, please contact the hostmaster <hostmaster@br.FreeBSD.org>
for this domain.
Czech Republic
In case of problems, please contact the hostmaster <hostmaster@cz.FreeBSD.org>
for this domain.
Denmark
In case of problems, please contact the hostmaster <hostmaster@dk.FreeBSD.org>
for this domain.
Estonia
In case of problems, please contact the hostmaster <hostmaster@ee.FreeBSD.org>
for this domain.
Finland
In case of problems, please contact the hostmaster <hostmaster@fi.FreeBSD.org>
for this domain.
France
In case of problems, please contact the hostmaster <hostmaster@fr.FreeBSD.org>
for this domain.
ftp://ftp1.fr.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp1.fr.FreeBSD.org/pub/FreeBSD/ / rsync)
ftp://ftp6.fr.FreeBSD.org/pub/FreeBSD/ (ftp / rsync)
Germany
In case of problems, please contact the hostmaster <de-bsd-hubs@de.FreeBSD.org>
for this domain.
ftp://ftp1.de.FreeBSD.org/freebsd/ (ftp / http://www1.de.FreeBSD.org/freebsd/ / rsync://rsync3.de.FreeBSD.org/freebsd/)
ftp://ftp2.de.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp2.de.FreeBSD.org/pub/FreeBSD/ / rsync)
ftp://ftp4.de.FreeBSD.org/FreeBSD/ (ftp / http://ftp4.de.FreeBSD.org/pub/FreeBSD/)
ftp://ftp7.de.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp7.de.FreeBSD.org/pub/FreeBSD/)
Greece
In case of problems, please contact the hostmaster <hostmaster@gr.FreeBSD.org>
for this domain.
Hong Kong
Ireland
In case of problems, please contact the hostmaster <hostmaster@ie.FreeBSD.org>
for this domain.
ftp://ftp3.ie.FreeBSD.org/pub/FreeBSD/ (ftp / rsync)
Japan
In case of problems, please contact the hostmaster <hostmaster@ie.FreeBSD.org>
for this domain.
Korea
In case of problems, please contact the hostmaster <hostmaster@kr.FreeBSD.org>
for this domain.
Latvia
In case of problems, please contact the hostmaster <hostmaster@lv.FreeBSD.org>
for this domain.
Lithuania
In case of problems, please contact the hostmaster <hostmaster@lt.FreeBSD.org>
for this domain.
Netherlands
In case of problems, please contact the hostmaster <hostmaster@nl.FreeBSD.org>
for this domain.
New Zealand
Norway
In case of problems, please contact the hostmaster <hostmaster@no.FreeBSD.org>
for this domain.
ftp://ftp.no.FreeBSD.org/pub/FreeBSD/ (ftp / rsync)
Poland
In case of problems, please contact the hostmaster <hostmaster@pl.FreeBSD.org>
for this domain.
ftp2.pl.FreeBSD.org
Russia
In case of problems, please contact the hostmaster <hostmaster@ru.FreeBSD.org>
for this domain.
Saudi Arabia
In case of problems, please contact the hostmaster <ftpadmin@isu.net.sa>
for this domain.
Slovenia
In case of problems, please contact the hostmaster <hostmaster@si.FreeBSD.org>
for this domain.
South Africa
In case of problems, please contact the hostmaster <hostmaster@za.FreeBSD.org>
for this domain.
Spain
In case of problems, please contact the hostmaster <hostmaster@es.FreeBSD.org>
for this domain.
Sweden
In case of problems, please contact the hostmaster <hostmaster@se.FreeBSD.org>
for this domain.
ftp://ftp2.se.FreeBSD.org/pub/FreeBSD/ (ftp / rsync://ftp2.se.FreeBSD.org/)
ftp://ftp4.se.FreeBSD.org/pub/FreeBSD/ (ftp / ftp://ftp4.se.FreeBSD.org/pub/FreeBSD/ / http://ftp4.se.FreeBSD.org/pub/FreeBSD/ / http://ftp4.se.FreeBSD.org/pub/FreeBSD/ / rsync://ftp4.se.FreeBSD.org/pub/FreeBSD/ / rsync://ftp4.se.FreeBSD.org/pub/FreeBSD/)
ftp://ftp6.se.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp6.se.FreeBSD.org/pub/FreeBSD/)
Switzerland
In case of problems, please contact the hostmaster <hostmaster@ch.FreeBSD.org>
for this domain.
Taiwan
In case of problems, please contact the hostmaster <hostmaster@tw.FreeBSD.org>
for this domain.
ftp://ftp.ch.FreeBSD.org/pub/FreeBSD/ (ftp / ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ / rsync / rsyncv6)
ftp://ftp2.tw.FreeBSD.org/pub/FreeBSD/ (ftp / ftp://ftp2.tw.FreeBSD.org/pub/FreeBSD/ / http://ftp2.tw.FreeBSD.org/pub/FreeBSD/ / http://ftp2.tw.FreeBSD.org/pub/FreeBSD/ / rsync / rsyncv6)
ftp://ftp6.tw.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp6.tw.FreeBSD.org/ / rsync)
ftp://ftp11.tw.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp11.tw.FreeBSD.org/FreeBSD/)
Ukraine
ftp://ftp.ua.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp.ua.FreeBSD.org/pub/FreeBSD/)
ftp://ftp6.ua.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp6.ua.FreeBSD.org/pub/FreeBSD / rsync://ftp6.ua.FreeBSD.org/FreeBSD/)
United Kingdom
In case of problems, please contact the hostmaster <hostmaster@uk.FreeBSD.org>
for this domain.
ftp://ftp2.uk.FreeBSD.org/pub/FreeBSD/ (ftp / rsync://ftp2.uk.FreeBSD.org/ftp.freebsd.org/pub/FreeBSD/)
United States of America
In case of problems, please contact the hostmaster <hostmaster@us.FreeBSD.org>
for this domain.
ftp://ftp4.us.FreeBSD.org/pub/FreeBSD/ (ftp / ftpv6 / http://ftp4.us.FreeBSD.org/pub/FreeBSD/ / http://ftp4.us.FreeBSD.org/pub/FreeBSD/)
ftp://ftp13.us.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp13.us.FreeBSD.org/pub/FreeBSD/ / rsync)
ftp://ftp14.us.FreeBSD.org/pub/FreeBSD/ (ftp / http://ftp14.us.FreeBSD.org/pub/FreeBSD/)
As of December 2020, FreeBSD uses git as the primary version control system for storing all of FreeBSD’s base source code and documentation.
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 repository. Additional information on the use of Git is included.
Older FreeBSD systems do not have proper root certificates. Installing security/ca_root_nss on these systems allows Git to verify the identity of HTTPS repository servers. The root SSL certificates can be installed from a port:
# cd /usr/ports/security/ca_root_nss
# make install clean
or as a package:
# pkg install ca_root_nss
Git can be installed as a package:
# pkg install git
Git can also be installed from the Ports Collection:
# cd /usr/ports/devel/git
# make install clean
To fetch a clean copy of the sources into a local directory, use git
.
This directory of files is called the working tree.
Move or delete an existing destination directory before using |
Git 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 two different repositories, src
for the FreeBSD systerm source code, and doc
for documentation.
In the future a third repository, 'ports' will be available for the FreeBSD ports code.
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 |
---|---|
Web-based repository browser src | |
Read-only src repo via HTTPS | |
Read-only src repo via anon-ssh |
|
Read/write src repo for committers |
|
Web-based repository browser doc | |
Read-only doc repo via HTTPS | |
Read-only doc repo via anon-ssh |
|
Read/write doc repo for committers |
|
(*) git
is a special user on the repository server which will map your registered ssh key in FreeBSD.org to your identity, no need to change it.
Sometime after the switch to git is complete, |
To get started, clone a copy of the FreeBSD repository:
# git clone -o freebsd [ -b branch ] https://git.FreeBSD.org/repo.git wcdir
where:
repo is one of the Project repositories: src
, ports
, or doc
.
branch depends on the repository used.
ports
and doc
are mostly updated in the main
branch, while src
maintains the latest version of -CURRENT under main
and the respective latest versions of the -STABLE branches under stable/12
(12.x) and stable/13
(13.x).
wcdir is the target directory where the contents of the specified branch should be placed.
This is usually /usr/ports for ports
, /usr/src for src
, and /usr/doc for doc
.
freebsd is the name of the origin to use.
By convention in the FreeBSD documentation, the origin is assumed to be freebsd
.
This example checks out the main
branch of the system sources 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 git
, remember to rename or delete it before the checkout.
Git will refuse to do anything otherwise.
# git clone -o freebsd https://git.FreeBSD.org/src.git /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:
# cd wcdir
# git pull --rebase
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.
There are also external mirrors maintained by project members available, please refer to the "External mirrors" section.
ssh://${user}@${url}/${repo}.git
can be written as ${user}@${url}:${repo}.git
, i.e., following two URLs are both valid for passing to git:
ssh://anongit@git.freebsd.org/${repo}.git
anongit@git.freebsd.org:${repo}.git
As well as the read-write repo: - `ssh://git@(git)repo.freebsd.org/${repo}.git` - `git@(git)repo.freebsd.org:${repo}.git`
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.
The FreeBSD project currently uses cgit as the web-based repository browser: https://cgit.freebsd.org/ The URL of the indivirual repository is at: https://cgit.freebsd.org/${repo}/
Using git clone
and git pull
from the official distributed mirrors is recommended.
The GeoDNS should direct you to the nearest mirror to you.
This section describes the read-write access for committers to push the commits from developers or contributors. For read-only access, please refer to the users section above.
Clone the repository:
% git clone -o freebsd --config remote.freebsd.fetch='+refs/notes/*:refs/notes/*' https://git.freebsd.org/${repo}.git
Then you should have the official mirrors as your remote:
% git remote -v
freebsd https://git.freebsd.org/${repo}.git (fetch)
freebsd https://git.freebsd.org/${repo}.git (push)
Configure the FreeBSD committer data:
The commit hook in repo.freebsd.org checks the "Commit" field matches the committer's information in FreeBSD.org. The easiest way to get the suggested config is by executing `/usr/local/bin/gen-gitconfig.sh` script on freefall:
% gen-gitconfig.sh
[...]
% git config user.name (your name in gecos)
% git config user.email (your login)@FreeBSD.org
Set the push URL:
% git remote set-url --push freebsd git@gitrepo.freebsd.org:${repo}.git
Then you should have separated fetch and push URLs as the most efficient setup:
% git remote -v
freebsd https://git.freebsd.org/${repo}.git (fetch)
freebsd git@gitrepo.freebsd.org:${repo}.git (push)
Again, note that `gitrepo.freebsd.org` will be canonicalized to `repo.freebsd.org` in the future.
Install commit message template hook:
% fetch https://cgit.freebsd.org/src/plain/tools/tools/git/hooks/prepare-commit-msg -o .git/hooks
% chmod 755 .git/hooks/prepare-commit-msg
The access
and mentors
files are stored in an orphan branch, internal/admin
, in each repository.
Following example is how to check out the internal/admin
branch to a local branch named admin
:
% git config --add remote.freebsd.fetch '+refs/internal/*:refs/internal/*'
% git fetch
% git checkout -b admin internal/admin
Alternatively, you can add a worktree for the admin
branch:
git worktree add -b admin ../${repo}-admin internal/admin
For browsing internal/admin
branch on web:
https://cgit.freebsd.org/${repo}/log/?h=internal/admin
For pushing, either specify the full refspec:
git push freebsd HEAD:refs/internal/admin
Or set push.default
to upstream
which will make git push
to push the current branch back to its upstream by default, which is more suitable for our workflow:
git config push.default upstream
These internal details may change often. |
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. The project workflow with those mirrors are still under discussion.
General usage and questions about git in the FreeBSD project: [freebsd-git](https://lists.freebsd.org/mailman/listinfo/freebsd-git)
Commit messages will be sent to the following mailing lists:
dev-commits-doc-all: All changes to the doc repository
dev-commits-ports-all: All changes to the ports repository
dev-commits-ports-main: All changes to the "main" branch of the ports repository
dev-commits-ports-branches: All changes to the quarterly branches of the ports repository
dev-commits-src-all: All changes to the src repository
dev-commits-src-main: All changes to the "main" branch of the src repository (the FreeBSD-CURRENT branch)
dev-commits-src-branches: All changes to all stable branches of the src repository
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
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.
FreeBSD systems older than 12.x do not have proper root certificates. Installing security/ca_root_nss on these systems allows Subversion to verify the identity of HTTPS repository servers. The root SSL certificates can be installed from a port:
# cd /usr/ports/security/ca_root_nss
# make install clean
or as a package:
# pkg install ca_root_nss
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
.
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
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 ports 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/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 /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/ports 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
The FreeBSD Git repository is:
https://git.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://cgit.freebsd.org.
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.
For other information about using Subversion, please see the "Subversion Book", titled Version Control with Subversion, or the Subversion Documentation.
These sites make FreeBSD available through the rsync protocol. The rsync utility transfers only the differences between two sets of files. This is useful for mirror sites of the FreeBSD FTP server. The rsync suite is available for many operating systems, on FreeBSD, see the net/rsync port or use the package.
rsync://ftp.cz.FreeBSD.org/
Available collections:
ftp: A partial mirror of the FreeBSD FTP server.
FreeBSD: A full mirror of the FreeBSD FTP server.
rsync://ftp.nl.FreeBSD.org/
Available collections:
FreeBSD: A full mirror of the FreeBSD FTP server.
rsync://ftp.mtu.ru/
Available collections:
FreeBSD: A full mirror of the FreeBSD FTP server.
FreeBSD-Archive: The mirror of FreeBSD Archive FTP server.
rsync://ftp4.se.freebsd.org/
Available collections:
FreeBSD: A full mirror of the FreeBSD FTP server.
rsync://ftp.tw.FreeBSD.org/
rsync://ftp2.tw.FreeBSD.org/
rsync://ftp6.tw.FreeBSD.org/
Available collections:
FreeBSD: A full mirror of the FreeBSD FTP server.
rsync://rsync.mirrorservice.org/
Available collections:
ftp.freebsd.org: A full mirror of the FreeBSD FTP server.
rsync://ftp-master.FreeBSD.org/
This server may only be used by FreeBSD primary mirror sites.
Available collections:
FreeBSD: The master archive of the FreeBSD FTP server.
acl: The FreeBSD master ACL list.
rsync://ftp13.FreeBSD.org/
Available collections:
FreeBSD: A full mirror of the FreeBSD FTP server.
All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/
Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.