xref: /freebsd/share/man/man7/development.7 (revision 046c625e9382e17da953767b881aaa782fa73af8)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2018 Edward Tomasz Napierala <trasz@FreeBSD.org>
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd September 24, 2025
28.Dt DEVELOPMENT 7
29.Os
30.Sh NAME
31.Nm development
32.Nd introduction to
33.Fx
34development process
35.Sh DESCRIPTION
36.Fx
37development is split into three major subprojects: doc, ports, and src.
38Doc is the documentation, such as the
39.Fx
40Handbook.
41To read more, see:
42.Pp
43.Lk https://docs.FreeBSD.org/en/books/fdp-primer/
44.Pp
45Ports, described further in
46.Xr ports 7 ,
47are the way to build, package, and install third party software.
48To read more, see:
49.Pp
50.Lk https://docs.FreeBSD.org/en/books/porters-handbook/
51.Pp
52The last one, src, revolves around the source code for the base system,
53consisting of the kernel, and the libraries and utilities commonly called
54the world.
55.Pp
56The Committer's Guide, describing topics relevant to all committers,
57can be found at:
58.Pp
59.Lk https://docs.freebsd.org/en/articles/committers-guide/
60.Pp
61.Fx
62src development takes place in the project-hosted
63Git repository, located at:
64.Pp
65.Lk https://git.FreeBSD.org/src.git
66.Pp
67The push URL is:
68.Pp
69.Lk ssh://git@gitrepo.FreeBSD.org/src.git
70.Pp
71There is also a list of public, read-only Git mirrors at:
72.Pp
73.Lk https://docs.FreeBSD.org/en/books/handbook/mirrors/#external-mirrors
74.Pp
75The
76.Ql main
77Git branch represents CURRENT;
78all changes are first committed to CURRENT and then usually
79cherry-picked back to STABLE, which refers to Git branches such as
80.Ql stable/14 .
81Every few years a new STABLE is branched from CURRENT,
82with an incremented major version number.
83Releases are then branched off STABLE and numbered with consecutive
84minor numbers such as
85.Ql releng/14.3
86.Pp
87The layout of the source tree is described in its
88.Pa README.md
89file.
90Build instructions can be found in
91.Xr build 7
92and
93.Xr release 7 .
94Kernel programming interfaces (KPIs) are documented in section 9
95manual pages; use
96.Ql apropos -s 9 \&.
97for a list.
98Regression test suite is described in
99.Xr tests 7 .
100For coding conventions, see
101.Xr style 9 .
102.Pp
103To ask questions regarding development, use the mailing lists,
104such as freebsd-arch@ and freebsd-hackers@:
105.Pp
106.Lk https://lists.FreeBSD.org
107.Pp
108To get your patches integrated into the main
109.Fx
110repository use Phabricator;
111it is a code review tool that allows other developers to
112review the changes, suggest improvements, and, eventually,
113allows them to pick up the change and commit it:
114.Pp
115.Lk https://reviews.FreeBSD.org
116.Pp
117Or Github:
118.Pp
119.Lk https://github.com/freebsd
120.Pp
121To check the latest
122.Fx
123build and test status of CURRENT and STABLE branches,
124the continuous integration system is at:
125.Pp
126.Lk https://ci.FreeBSD.org
127.Sh FILES
128.Bl -tag -compact -width "/usr/ports/devel/freebsd-git-devtools"
129.It Pa /usr/src/CONTRIBUTING.md
130.Fx
131contribution guidelines
132.It Pa /usr/src/tools/tools/git/git-arc.sh
133Phabricator review tooling
134.It Pa /usr/ports/devel/freebsd-git-devtools
135Phabricator review tooling as a port
136.El
137.Sh EXAMPLES
138Apply a patch from Github pull #1234, using
139.Pa devel/gh :
140.Pp
141.Dl gh pr checkout 1234
142.Pp
143Apply a patch from Phabricator review D1234, using
144.Xr git-arc 1 :
145.Pp
146.Dl git arc patch -c D1234
147.Pp
148Apply a manually downloaded
149.Xr git-format-patch 1 ,
150.Pa draft.patch ,
151from Bugzilla or mail:
152.Pp
153.Dl git am draft.patch
154.Pp
155Apply a manually downloaded patch,
156.Pa draft.diff ,
157from Bugzilla or mail:
158.Pp
159.Dl git apply draft.diff
160.Sh SEE ALSO
161.Xr git 1 ,
162.Xr git-arc 1 ,
163.Xr witness 4 ,
164.Xr build 7 ,
165.Xr hier 7 ,
166.Xr ports 7 ,
167.Xr release 7 ,
168.Xr tests 7 ,
169.Xr locking 9 ,
170.Xr style 9
171.Sh HISTORY
172The
173.Nm
174manual page was originally written by
175.An Matthew Dillon Aq Mt dillon@FreeBSD.org
176and first appeared in
177.Fx 5.0 ,
178December 2002.
179It was since extensively modified by
180.An Eitan Adler Aq Mt eadler@FreeBSD.org
181to reflect the repository conversion from
182.Lk https://www.nongnu.org/cvs/ CVS
183to
184.Lk https://subversion.apache.org/ Subversion .
185It was rewritten from scratch by
186.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
187for
188.Fx 12.0 .
189