xref: /freebsd/share/man/man7/development.7 (revision 4f52dfbb)
1.\" Copyright (c) 2018 Edward Tomasz Napierala <trasz@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd April 10, 2018
28.Dt DEVELOPMENT 7
29.Os
30.Sh NAME
31.Nm development
32.Nd introduction to FreeBSD development process
33.Sh DESCRIPTION
34.Fx
35development is split into three major suprojects: doc, ports, and src.
36Doc is the documentation, such as the FreeBSD Handbook.
37To read more, see:
38.Pp
39.Lk https://www.FreeBSD.org/doc/en/books/fdp-primer/
40.Pp
41Ports, described further in
42.Xr ports 7 ,
43are the way to build, package, and install third party software.
44To read more, see:
45.Pp
46.Lk https://www.FreeBSD.org/doc/en/books/porters-handbook/
47.Pp
48The last one, src, revolves around the source code for the base system,
49consisting of the kernel, and the libraries and utilities commonly called
50the world.
51.Pp
52The Committer's Guide, describing topics relevant to all committers,
53can be found at:
54.Pp
55.Lk https://www.FreeBSD.org/doc/en/articles/committers-guide/
56.Pp
57FreeBSD src development takes place in the CURRENT branch in Subversion,
58located at:
59.Pp
60.Lk https://svn.FreeBSD.org/base/head
61.Pp
62There is also a read-only GitHub mirror at:
63.Pp
64.Lk https://github.com/freebsd/freebsd
65.Pp
66Changes are first committed to CURRENT and then usually merged back
67to STABLE.
68Every few years the CURRENT branch is renamed to STABLE, and a new
69CURRENT is branched, with an incremented major version number.
70Releases are then branched off STABLE and numbered with consecutive minor numbers.
71.Pp
72Layout of the source tree is described in
73.Xr hier 7 .
74Build instructions can be found in
75.Xr build 7
76and
77.Xr release 7 .
78Kernel APIs are usually documented, use
79.Cm apropos -s 9 ''
80for a list.
81Regression test suite is described in
82.Xr tests 7 .
83For coding conventions, see
84.Xr style 9 .
85.Pp
86To ask questions regarding development, use the mailing lists,
87such as freebsd-arch@ and freebsd-hackers@:
88.Pp
89.Lk https://lists.FreeBSD.org/
90.Pp
91To get your patches integrated into the main FreeBSD repository use Phabricator;
92it is a code review tool that allows other developers to review the changes,
93suggest improvements, and, eventually, allows them to pick up the change and
94commit it:
95.Pp
96.Lk https://reviews.FreeBSD.org/
97.Pp
98.Sh EXAMPLES
99Check out the CURRENT branch, build it, and install, overwriting the current
100system:
101.Dl svnlite co https://svn.FreeBSD.org/base/head src
102.Dl cd src
103.Dl make -j8 buildworld buildkernel installkernel
104.Dl reboot
105.Pp
106After reboot:
107.Dl cd src
108.Dl make -j8 installworld
109.Pp
110.Sh SEE ALSO
111.Xr witness 4 ,
112.Xr build 7 ,
113.Xr hier 7 ,
114.Xr release 7 ,
115.Xr locking 9 ,
116.Xr style 9
117.Sh HISTORY
118The
119.Nm
120manual page was originally written by
121.An Matthew Dillon Aq Mt dillon@FreeBSD.org
122and first appeared
123in
124.Fx 5.0 ,
125December 2002.
126It was since extensively modified by
127.An Eitan Adler Aq Mt eadler@FreeBSD.org
128to reflect the repository conversion from
129.Xr cvs 1
130to
131.Xr svn 1 .
132It was rewritten from scratch by
133.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
134for
135.Fx 12.0 .
136