An addition or change to the existing source code is a somewhat trickier affair and depends a lot on how far out of date you are with the current state of the core FreeBSD development. There is a special on-going release of FreeBSD known as ``FreeBSD-current'' which is made available in a variety of ways for the convenience of developers working actively on the system. See Staying current with FreeBSD for more information about getting and using FreeBSD-current.
Working from older sources unfortunately means that your changes may
sometimes be too obsolete or too divergent for easy re-integration into
FreeBSD. Chances of this can be minimized somewhat by subscribing to the
FreeBSD announcements mailing list
<freebsd-announce@FreeBSD.ORG>
and the FreeBSD-current mailing list
<freebsd-current@FreeBSD.ORG>
lists, where discussions
on the current state of the system take place.
Assuming that you can manage to secure fairly up-to-date sources to base
your changes on, the next step is to produce a set of diffs to send to the
FreeBSD maintainers. This is done with the diff(1)
command,
with the `context diff' form being preferred. For example:
diff -c oldfile newfile
or
diff -c -r olddir newdir
would generate such a set of context diffs for the given source file
or directory hierarchy. See the man page for diff(1)
for more
details.
Once you have a set of diffs (which you may test with the
patch(1)
command), you should submit them for inclusion
with FreeBSD. Use the send-pr(1)
program as described in
Bug Reports and General Commentary.
Do not just send the diffs to the FreeBSD technical discussions mailing list
<freebsd-hackers@FreeBSD.ORG>
or they will get
lost! We greatly appreciate your submission (this is a volunteer
project!); because we are busy, we may not be able to address it
immediately, but it will remain in the pr database until we do.
If you feel it appropriate (e.g. you have added, deleted, or
renamed files), bundle your changes into a tar
file
and run the uuencode(1)
program on it. Shar archives are
also welcome.
If your change is of a potentially sensitive nature, e.g.
you are unsure of copyright issues governing its further distribution
or you are simply not ready to release it without a tighter review first,
then you should send it to FreeBSD core team
<freebsd-core@FreeBSD.ORG>
directly rather than submitting
it with send-pr(1)
. The core mailing list
reaches a much smaller group of people who do much of the
day-to-day work on FreeBSD. Note that this group is also
very busy and so you should only send mail to them
where it is truly necessary.
Please refer to man 9 intro
and man 9 style
for some information on coding style. We would appreciate
it if you were at least aware of this information before
submitting code.