diff --git a/en_US.ISO8859-1/articles/committers-guide/article.sgml b/en_US.ISO8859-1/articles/committers-guide/article.sgml
index d5c4db3b9d..a1751d23b2 100644
--- a/en_US.ISO8859-1/articles/committers-guide/article.sgml
+++ b/en_US.ISO8859-1/articles/committers-guide/article.sgml
@@ -1,3622 +1,3621 @@
%articles.ent;
]>
Committer's GuideThe FreeBSD Documentation Project$FreeBSD$199920002001200220032004200520062007The FreeBSD Documentation Project
&tm-attrib.freebsd;
&tm-attrib.coverity;
&tm-attrib.cvsup;
&tm-attrib.ibm;
&tm-attrib.intel;
&tm-attrib.sparc;
&tm-attrib.general;
This document provides information for the FreeBSD committer
community. All new committers should read this document before they
start, and existing committers are strongly encouraged to review it
from time to time.Almost all FreeBSD developers have commmit rights to one or
more repositories. However, a few developers do not, and some of
the information here applies to them as well. (For instance, some
people only have rights to work with the Problem Report database).
Please see for more information.This document may also be of interest to members of the FreeBSD
community who want to learn more about how the project works.Administrative DetailsMain Repository Hostncvs.FreeBSD.orgLogin Methods&man.ssh.1;, protocol 2 onlyMain CVSROOTncvs.FreeBSD.org:/home/ncvs (although also see ).
Main &a.cvsadm;&a.peter; and &a.markm;, as well as &a.joe; and &a.marcus; for
ports/&a.bugmeister;&a.ceri; &a.linimon;, and &a.remkoMailing Lists&a.doc-developers;, &a.doc-committers;;
&a.ports-developers;, &a.ports-committers;;
&a.src-developers;, &a.src-committers;. (Each project
repository has its own -developers and -committers mailing
lists. Archives for these lists may be found in files
/home/mail/repository-name-developers-archive
and
/home/mail/repository-name-committers-archive
on the FreeBSD.org
cluster.)
Core Team monthly reports/home/core/public/monthly-reports
on the FreeBSD.org cluster.
Noteworthy CVS TagsRELENG_5 (5.X-STABLE),
RELENG_6 (6.X-STABLE),
RELENG_7 (7.X-STABLE),
HEAD (-CURRENT)
It is required that you use &man.ssh.1; or &man.telnet.1;
with Kerberos 5 to connect to the project hosts. For
&man.ssh.1; only protocol 2 is allowed.
These are generally more secure than plain &man.telnet.1; or
&man.rlogin.1; since credential negotiation will always be
encrypted. All traffic is encrypted by default with &man.ssh.1;.
With utilities like &man.ssh-agent.1; and &man.scp.1; also
available, &man.ssh.1; is also far more convenient. If you do
not know anything about &man.ssh.1;, please see
.Commit Bit TypesThe FreeBSD CVS repository has a number of components which,
when combined, support the basic operating system source,
documentation, third party application ports infrastructure, and
various maintained utilities. When FreeBSD commit bits are
allocated, the areas of the tree where the bit may be used are
specified. Generally, the areas associated with a bit reflect who
authorized the allocation of the commit bit. Additional areas of
authority may be added at a later date: when this occurs, the
committer should follow normal commit bit allocation procedures for
that area of the tree, seeking approval from the appropriate entity
and possibly getting a mentor for that area for some period of time.
Committer TypeResponsibleTree Componentssrccore@src/, doc/ subject to appropriate reviewdocdoceng@doc/, www/, src/ documentationportsportmgr@ports/Commit bits allocated prior to the development of the notion of
areas of authority may be appropriate for use in many parts of the
tree. However, common sense dictates that a committer who has not
previously worked in an area of the tree seek review prior to
committing, seek approval from the appropriate responsible party,
and/or work with a mentor. Since the rules regarding code
maintenance differ by area of the tree, this is as much for the
benefit of the committer working in an area of less familiarity as
it is for others working on the tree.Committers are encouraged to seek review for their work as part
of the normal development process, regardless of the area of the
tree where the work is occurring.Policy for doc/ committer activity
in src/doc committers may commit documentation
changes to src files, such as man pages, READMEs, fortune
databases, calendar files, and comment fixes without
approval from a src committer, subject to the normal care
and tending of commits.doc committers may commit minor src changes
and fixes, such as build fixes, small features, etc, with an
"Approved by" from a src committer.doc committers may seek an upgrade to a src
commit bit by acquiring a mentor, who will propose the doc
committer to core. When approved, they will be added to
'access' and the normal mentoring period will ensue, which
will involve a continuing of Approved by for
some period."Approved by" is only acceptable from
non-mentored src committers -- mentored committers can
provide a "Reviewed by" but not an "Approved
by".CVS OperationsIt is assumed that you are already familiar with the basic operation
of CVS.The &a.cvsadm; are the owners of the CVS repository and
are responsible for direct modification of it for the purposes of
cleanup or fixing some grievous abuse of CVS by a committer.
Should you cause some repository accident, say a bad cvs
import or cvs tag operation, mail the
responsible part of &a.cvsadm;, as stated in the table below,
(or call one of them) and report the problem.
For very important issues affecting the entire CVS tree—not
just a specific area—you can contact the &a.cvsadm;.
Please do not contact the &a.cvsadm; for repocopies
or other things that the more specific teams can handle.The only ones able to directly fiddle the repository bits on the
repository hosts are the repomeisters. To enforce this, there are
no login shells available on the repository machines, except to
the repomeisters.Depending on the affected area of the CVS repository,
you should send your request for a repocopy to one of the following email
addresses. Email sent to these addresses will be forwarded
to the appropriate repomeisters.ncvs@ - regarding
/home/ncvs, the src
repositorypcvs@ - regarding
/home/pcvs, the ports
repositorydcvs@ - regarding
/home/dcvs, the doc
repositoryprojcvs@ - regarding
/home/projcvs, the
third party projects repositoryThe CVS tree is currently split into four distinct repositories,
namely doc, ports,
projects and src. These are
combined under a single CVSROOT when distributed
via CVSup for the convenience of our users.Note that the www module containing sources
for the FreeBSD website is
contained within the doc repository.The CVS repositories are hosted on the repository machines.
Currently, each of the repositories above reside on the same physical
machine, ncvs.FreeBSD.org, but to allow for
the possibility of placing each on a separate machine in the future,
there is a separate hostname for each that committers should use.
Additionally, each repository is stored in a separate directory. The
following table summarizes the situation.
&os; CVS Repositories, Hosts and DirectoriesRepositoryHostDirectorydocdcvs.FreeBSD.org/home/dcvsportspcvs.FreeBSD.org/home/pcvsprojectsprojcvs.FreeBSD.org/home/projcvssrcncvs.FreeBSD.org/home/ncvs
CVS operations are done remotely by setting the
CVSROOT environment variable to the appropriate host
and top-level directory (for example,
ncvs.FreeBSD.org:/home/ncvs),
and
doing the appropriate check-out/check-in operations. Many committers
define aliases which expand to the correct cvs
invocation for the appropriate repository. For example, a &man.tcsh.1;
user may add the following to their .cshrc for this
purpose:alias dcvs cvs -d user@dcvs.FreeBSD.org:/home/dcvs
alias pcvs cvs -d user@pcvs.FreeBSD.org:/home/pcvs
alias projcvs cvs -d user@projcvs.FreeBSD.org:/home/projcvs
alias scvs cvs -d user@ncvs.FreeBSD.org:/home/ncvsThis way they can do all CVS operations
locally and use Xcvs commit for committing
to the official CVS tree. If you wish to add
something which is wholly new (like contrib-ified
sources, etc), cvs import should be used.
Refer to the &man.cvs.1; manual page for usage.Please do not use
cvs checkout or
update with the official repository machine set
as the CVS Root for keeping your source tree up to date.
Remote CVS is not optimized for network distribution
and requires a big work/administrative overhead on the server side.
Please use our advanced cvsup distribution
method for obtaining the repository bits, and only do the actual
commit operation on the repository host.
We provide an extensive cvsup replication network for this purpose,
as well as give access to cvsup-master if you
really need to stay current to the latest changes.
cvsup-master has got the horsepower to deal with
this, the repository master server does not. &a.kuriyama; is in
charge of cvsup-master.
If you need to use CVS add and
delete operations in a manner that is
effectively a &man.mv.1; operation, then a repository
copy is in order rather than using CVS add and
delete. In a repository copy, a repomeister will copy the file(s)
to their new name and/or location and let you know when it is
done. The purpose of a repository copy is to preserve file
change history, or logs. We in the FreeBSD Project greatly
value the change history that CVS gives to the project.CVS reference information, tutorials, and FAQs can be found at:
.
The information in Karl Fogel's
chapters from Open Source Development with CVS is also very
useful.&a.des; also supplied the following mini primer for
CVS.Check out a module with the co or
checkout command.&prompt.user; cvs checkout shazamThis checks out a copy of the shazam module. If
there is no shazam module in the modules file, it looks for a
top-level directory named shazam instead.
Useful cvs checkout optionsDo not create empty directoriesCheck out a single level, no subdirectoriesCheck out revision, branch or tag
revCheck out the sources as they were on date
date
Practical FreeBSD examples:Check out the miscfs module,
which corresponds to src/sys/miscfs:&prompt.user; cvs co miscfsYou now have a directory named miscfs
with subdirectories CVS,
deadfs, devfs, and so
on. One of these (linprocfs) is
empty.Check out the same files, but with full path:&prompt.user; cvs co src/sys/miscfsYou now have a directory named src,
with subdirectories CVS and
sys. The src/sys directory has
subdirectories CVS and
miscfs, etc.Check out the same files, but prunes empty
directories:&prompt.user; cvs co -P miscfsYou now have a directory named
miscfs with subdirectories
CVS, deadfs,
devfs... but note that there is no
linprocfs subdirectory, because there
are no files in it.Check out the directory miscfs, but
none of the subdirectories:&prompt.user; cvs co -l miscfsYou now have a directory named miscfs
with just one subdirectory named
CVS.Check out the miscfs module as
it is in the 6.X branch:&prompt.user; cvs co -rRELENG_6 miscfsYou can modify the sources and commit along this
branch.Check out the miscfs module as
it was in 6.0-RELEASE.&prompt.user; cvs co -rRELENG_6_0_0_RELEASE miscfsYou will not be able to commit modifications, since
RELENG_6_0_0_RELEASE is a point in time, not a branch.Check out the miscfs module as it was
on Jan 15 2000.&prompt.user; cvs co -D'01/15/2000' miscfsYou will not be able to commit modifications.Check out the miscfs module as it was
one week ago.&prompt.user; cvs co -D'last week' miscfsYou will not be able to commit modifications.Note that cvs stores metadata in subdirectories named
CVS.Arguments to and
are sticky, which means cvs will remember them later, e.g.
when you do a cvs update.Check the status of checked-out files with the
status command.&prompt.user; cvs status shazamThis displays the status of the
file shazam or of every file in the
shazam directory. For every file, the
status is given as one of:Up-to-dateFile is up-to-date and unmodified.Needs PatchFile is unmodified, but there is a newer revision in
the repository.Locally ModifiedFile is up-to-date, but modified.Needs MergeFile is modified, and there is a newer revision in the
repository.File had conflicts on mergeThere were conflicts the last time this file was
updated, and they have not been resolved yet.You will also see the local revision and date,
the revision number of the newest applicable version
(newest applicable because if you have a
sticky date, tag or branch, it may not be the actual newest
revision), and any sticky tags, dates or options.Once you have checked something out, you can update it with the
update command.&prompt.user; cvs update shazamThis updates the file shazam or the
contents of the shazam directory to the
latest version along the branch you checked out. If you
checked out a point in time, does nothing
unless the tags have moved in the repository or some other weird
stuff is going on.Useful options, in addition to those listed above for
checkout:Check out any additional missing directories.Update to head of main branch.More magic (see below).If you checked out a module with or
, running cvs update
with a different or
argument or with will select a new branch,
revision or date. The option clears all
sticky tags, dates or revisions whereas
and set new ones.Theoretically, specifying HEAD as the
argument to will give you the same result
as , but that is just theory.The option is useful if:somebody has added subdirectories to the module
you have checked out after you checked it out.you checked out with , and later
change your mind and want to check out the subdirectories
as well.you deleted some subdirectories and want to check
them all back out.Watch the output of the cvs
update with care. The letter in front of
each filename indicates what was done with it:UThe file was updated without trouble.PThe file was updated without trouble (you will only see
this when working against a remote repository).MThe file had been modified, and was merged without
conflicts.CThe file had been modified, and was merged with
conflicts.Merging is what happens if you check out a copy of
some source code, modify it, then someone else commits a
change, and you run cvs update. CVS notices
that you have made local changes, and tries to merge your
changes with the changes between the version you originally
checked out and the one you updated to. If the changes are to
separate portions of the file, it will almost always work fine
(though the result might not be syntactically or semantically
correct).CVS will print an M in front of every locally modified
file even if there is no newer version in the repository, so
cvs update is handy for getting a summary
of what you have changed locally.If you get a C, then your changes
conflicted with the changes in the repository (the changes
were to the same lines, or neighboring lines, or you changed
the local file so much that cvs can not
figure out how to apply the repository's changes). You will have
to go through the file manually and resolve the conflicts;
they will be marked with rows of <,
= and > signs. For
every conflict, there will be a marker line with seven
< signs and the name of the file,
followed by a chunk of what your local file contained,
followed by a separator line with seven =
signs, followed by the corresponding chunk in the
repository version, followed by a marker line with seven
> signs and the revision number you
updated to.The option is slightly voodoo. It
updates the local file to the specified revision as if you
used , but it does not change the recorded
revision number or branch of the local file. It is not really
useful except when used twice, in which case it will merge the
changes between the two specified versions into the working
copy.For instance, say you commit a change to
shazam/shazam.c in &os.current; and later
want to MFC it. The change you want to MFC was revision
1.15:Check out the &os.stable; version of the
shazam module:&prompt.user; cvs co -rRELENG_6 shazamApply the changes between rev 1.14 and 1.15:&prompt.user; cvs update -j1.14 -j1.15 shazam/shazam.cYou will almost certainly get a conflict because
- of the $Id: article.sgml,v 1.277 2008-08-06 22:03:48 pgj Exp $ (or in FreeBSD's case,
+ of the $Id: article.sgml,v 1.278 2008-08-16 21:42:35 pgj Exp $ (or in FreeBSD's case,
$FreeBSD$)
lines, so you will have to edit the file to resolve the conflict
- (remove the marker lines and the second $Id: article.sgml,v 1.277 2008-08-06 22:03:48 pgj Exp $ line,
- leaving the original $Id: article.sgml,v 1.277 2008-08-06 22:03:48 pgj Exp $ line intact).
+ (remove the marker lines and the second $Id: article.sgml,v 1.278 2008-08-16 21:42:35 pgj Exp $ line,
+ leaving the original $Id: article.sgml,v 1.278 2008-08-16 21:42:35 pgj Exp $ line intact).
View differences between the local version and the
repository version with the diff
command.&prompt.user; cvs diff shazamshows you every modification you have made to the
shazam file or module.
Useful cvs diff optionsUses the unified diff format.Uses the context diff format.Shows missing or added files.
You always want to use , since
unified diffs are much easier to read than almost any other
diff format (in some circumstances, context diffs generated with
the option may be
better, but they are much bulkier). A unified diff consists of
a series of hunks. Each hunk begins with a line that starts
with two @ signs and specifies where in the
file the differences are and how many lines they span. This
is followed by a number of lines; some (preceded by a blank)
are context; some (preceded by a - sign)
are outtakes and some (preceded by a +) are
additions.You can also diff against a different version
than the one you checked out by specifying a version
with or as in
checkout or update,
or even view the diffs between two arbitrary versions
(without regard for what you have locally) by specifying
two versions with or
.View log entries with the log
command.&prompt.user; cvs log shazamIf shazam is a file, this will print a
header with information about this file, such
as where in the repository this file is stored, which revision is
the HEAD for this file, what branches this file
is in, and any tags that are valid for this file. Then, for each
revision of this file, a log message is printed. This includes
the date and time of the commit, who did the commit, how many lines
were added and/or deleted, and finally the log message that the
committer who did the change wrote.If shazam is a directory, then the log
information described above is printed for each file in the
directory in turn. Unless you give the to
log, the log for all subdirectories of
shazam is printed too, in a recursive
manner.Use the log command to view the history of
one or more files, as it is stored in the CVS repository. You can
even use it to view the log message of a specific revision, if you
add the to the
log command:&prompt.user; cvs log -r1.2 shazamThis will print only the log message for revision
1.2 of file shazam if it is
a file, or the log message for revision 1.2 of
each file under shazam if it is a
directory.See who did what with the annotate command.
This command shows you each line of the specified file or
files, along with which user most recently changed that
line.&prompt.user; cvs annotate shazamAdd new files with the add command.Create the file, cvs add it, then
cvs commit it.Similarly, you can add new directories by creating them
and then cvs adding them. Note that you
do not need to commit directories.Remove obsolete files with the remove command.Remove the file, then cvs rm it, then
cvs commit it.Commit with the commit or
checkin command.
Useful cvs commit optionsForce a commit of an unmodified file.Specify a commit message on the command line rather
than invoking an editor.
Use the option if you realize that
you left out important information from the commit message.Good commit messages are important. They tell others
why you did the changes you did, not just right here and now,
but months or years from now when someone wonders why some
seemingly illogical or inefficient piece of code snuck into
your source file. It is also an invaluable aid to deciding
which changes to MFC and which not to MFC.Commit messages should be clear, concise and provide
a reasonable summary to give an indication of what was
changed and why.Commit messages should provide enough information to
enable a third party to decide if the change is relevant to
them and if they need to read the change itself.Avoid committing several unrelated changes in one go. It
makes merging difficult, and also makes it harder to determine
which change is the culprit if a bug crops up.Avoid committing style or whitespace fixes and
functionality fixes in one go. It makes merging difficult,
and also makes it harder to understand just what functional
changes were made. In the case of documentation files, it
can make the job of the translation teams more complicated,
as it becomes difficult for them to determine exactly what
content changes need to be translated.Avoid committing changes to multiple files in one go
with a generic, vague message. Instead, commit each file (or
small, related groups of files) with tailored commit messages.Before committing, always:verify which branch you are committing to, using
cvs status.review your diffs, using
cvs diffAlso, ALWAYS specify which files to commit explicitly on
the command line, so you do not accidentally commit other files
than the ones you intended - cvs commit
without any arguments will commit every modification in your
current working directory and every subdirectory.Additional tips and tricks:You can place commonly used options in your
~/.cvsrc, like this:cvs -z3
diff -Nu
update -Pd
checkout -PThis example says:always use compression level 3 when talking to a
remote server. This is a life-saver when working over a
slow connection.always use the (show added or
removed files) and (unified diff
format) options to &man.diff.1;.always use the (prune empty
directories) and (check out new
directories) options when updating.always use the (prune empty
directories) option when checking out.Use Eivind Eklund's cdiff script to
view unidiffs. It is a wrapper for &man.less.1; that adds ANSI
color codes to make hunk headers, outtakes and additions stand
out; context and garbage are unmodified. It also expands tabs
properly (tabs often look wrong in diffs because of the extra
character in front of each line).textproc/cdiffSimply use it instead of &man.more.1; or &man.less.1;:&prompt.user; cvs diff -Nu shazam | cdiffAlternatively some editors like &man.vim.1;
(editors/vim) have color support and when used as
a pager with color syntax highlighting switched on will
highlight many types of file, including diffs, patches,
and CVS/RCS logs. &prompt.user; echo "syn on" >> ~/.vimrc
&prompt.user; cvs diff -Nu shazam | vim -
&prompt.user; cvs log shazam | vim -CVS is old, arcane, crufty and buggy, and sometimes
exhibits non-deterministic behavior which some claim as proof
that it is actually merely the Newtonian manifestation of a
sentient transdimensional entity. It is not humanly possible
to know its every quirk inside out, so do not be afraid to ask
the resident AI (&a.cvsadm;) for help.Do not leave the cvs commit command in commit
message editing mode for too long (more than 2–3 minutes). It
locks the directory you are working with and will prevent other
developers from committing into the same directory. If you have
to type a long commit message, type it before executing
cvs commit and insert it into the commit
message or save it in a file before committing and use the
option of CVS to read the commit message from
that file, i.e.&prompt.user; vi logmsg
&prompt.user; cvs ci -F logmsg shazamThis is the fastest way of passing a commit message to CVS but
you should be careful when editing the logmsg
file before the commit, because CVS will not give you a chance to edit
the message when you do the actual commit.Speed up your CVS operation considerably by using a persistent
ssh connection to the repository machine. First, put this
configuration into your ~/.ssh/config:Host ncvs.FreeBSD.org
ControlPath /home/user/.ssh/cvs.cpath
Host dcvs.FreeBSD.org
ControlPath /home/user/.ssh/cvs.cpath
Host projcvs.FreeBSD.org
ControlPath /home/user/.ssh/cvs.cpath
Host pcvs.FreeBSD.org
ControlPath /home/user/.ssh/cvs.cpathNow open the persistent connection to the repoman:&prompt.user; ssh -fNM ncvs.FreeBSD.orgThe CVS commands should now respond faster, as they are reusing
existing connection with the repository. Note that all
the hostnames are case sensitive.Conventions and TraditionsAs a new developer there are a number of things you should do
first. The first set is specific to committers only.Guidelines For CommittersIf you have been given commit rights to one or more of the
repositories:Add your author entity to
doc/en_US.ISO8859-1/share/sgml/authors.ent;
this should be done first since an omission of this commit will
cause the next commits to break the doc/ build.This is a relatively easy task, but remains a good first test of
your CVS skills.Also add your author entity to
www/en/developers.sgml.Add yourself to the Developers section of
the Contributors List
(doc/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml) and remove yourself from the Additional
Contributors section (doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml).Add an entry for yourself to
www/share/sgml/news.xml. Look for the other
entries that look like A new committer and follow the
format.You should add your PGP or GnuPG key to
doc/share/pgpkeys (and if you do not
have a key, you should create one). Do not forget to commit
the updated doc/share/pgpkeys/pgpkeys.ent
and doc/share/pgpkeys/pgpkeys-developers.sgml.&a.des; has
written a shell script to make this extremely simple. See the
README
file for more information.It is important to have an up-to-date PGP/GnuPG key in
the Handbook, since the key may be required for positive
identification of a committer, e.g. by the &a.admins; for
account recovery. A complete keyring of FreeBSD.org users is available
for download from http://www.FreeBSD.org/doc/pgpkeyring.txt.Add an entry for yourself to
src/share/misc/committers-repository.dot,
where repository is either doc, ports or src, depending on the commit privileges
you obtained.Some people add an entry for themselves to
ports/astro/xearth/files/freebsd.committers.markers.Some people add an entry for themselves to
src/usr.bin/calendar/calendars/calendar.freebsd.If you are subscribed to the &a.cvsall;, you will
probably want to unsubscribe to avoid receiving duplicate
copies of commit messages and their followups.All src commits should go to
&os.current; first before being merged to &os.stable;. No major
new features or high-risk modifications should be made to the
&os.stable; branch.Guidelines For EveryoneWhether or not you have commit rights:Introduce yourself to the other developers, otherwise no one
will have any idea who you are or what you are working on. You do
not have to write a comprehensive biography, just write a paragraph
or two about who you are and what you plan to be working on as a
developer in FreeBSD. (You should also mention who your mentor
will be). Email this to the &a.developers; and you will
be on your way!Log into hub.FreeBSD.org and create a
/var/forward/user
(where user is your username) file
containing the e-mail address where you want mail addressed to
yourusername@FreeBSD.org to be forwarded.
This includes all of the commit messages as well as any other mail
addressed to the &a.committers; and the &a.developers;. Really
large mailboxes which have taken up permanent residence on
hub often get accidentally truncated
without warning, so forward it or read it and you will not lose
it.Due to the severe load dealing with SPAM places on
the central mail servers that do the mailing list processing
the front-end server does do some basic checks and will
drop some messages based on these checks. At the moment
proper DNS information for the connecting host is the only
check in place but that may change. Some people blame these
checks for bouncing valid email. If you want these checks
turned off for your email you can place a file named
~/.spam_lover in your home directory
on freefall.FreeBSD.org to
disable the checks for your email.If you are a developer but not a committer, you will
not be subscribed to the committers or developers mailing lists;
the subscriptions are derived from the access rights.MentorsAll new developers also have a mentor assigned to them for
the first few months. Your mentor is responsible for teaching
you the rules and conventions of the project and guiding your
first steps in the developer community. He or she is also
personally responsible for your actions during this initial
period.For committers: until your
mentor decides (and announces with a forced
commit to access) that you have learned the
ropes and are ready to commit on your own, you should not commit
anything without first getting your mentor's review and
approval, and you should document that approval with an
Approved by: line in the commit
message.Preferred License for New FilesCurrently the &os; Project suggests and uses the following
text as the preferred license scheme:/*-
* Copyright (c) [year] [your name]
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* [id for your version control system, if any]
*/The &os; project strongly discourages the so-called
"advertising clause" in new code. Due to the large number of
contributors to the &os; project, complying with this clause for
many commercial vendors has become difficult. If you have code
in the tree with the advertising clause, please consider
removing it. In fact, please consider using the above license
for your code.The &os; project discourages completely new licenses and
variations on the standard licenses. New licenses require the
approval of core@FreeBSD.org to reside in the
main repository. The more different licenses that are used in
the tree, the more problems that this causes to those wishing to
utilize this code, typically from unintended consequences from a
poorly worded license.Project policy dictates that code under some non-BSD licenses
must be placed only in specific sections of the repository, and
in some cases, compilation must be conditional or even disabled
by default. For example, the GENERIC kernel must be compiled
under only licenses identical to or substantially similar to the
BSD license. GPL, APSL, CDDL, etc, licensed software must not be
compiled into GENERIC.Developers are reminded that in open source, getting "open"
right is just as important as getting "source" right, as improper
handling of intellectual property has serious consequences. Any
questions or concerns should immediately be brought to the
attention of the core team.Developer RelationsIf you are working directly on your own code or on code
which is already well established as your responsibility, then
there is probably little need to check with other committers
before jumping in with a commit. If you see a bug in an area of
the system which is clearly orphaned (and there are a few such
areas, to our shame), the same applies. If, however, you are
about to modify something which is clearly being actively
maintained by someone else (and it is only by watching the
cvs-committers mailing list that you can
really get a feel for just what is and is not) then consider
sending the change to them instead, just as you would have
before becoming a committer. For ports, you should contact the
listed MAINTAINER in the
Makefile. For other parts of the
repository, if you are unsure who the active maintainer might
be, it may help to scan the output of cvs log
to see who has committed changes in the past. &a.fenner; has
written a nice shell script that can help determine who the
active maintainer might be. It lists each person who has
committed to a given file along with the number of commits each
person has made. It can be found on freefall
at ~fenner/bin/whodid. If your queries go
unanswered or the committer otherwise indicates a lack of
proprietary interest in the area affected, go ahead and commit
it.If you are unsure about a commit for any reason at
all, have it reviewed by -hackers
before committing. Better to have it flamed then and there
rather than when it is part of the CVS repository. If you do
happen to commit something which results in controversy
erupting, you may also wish to consider backing the change out
again until the matter is settled. Remember – with CVS we
can always change it back.Do not impugn the intentions of someone you disagree with.
If they see a different solution to a problem than you, or even
a different problem, it is not because they are stupid, because
they have questionable parentage, or because they are trying to
destroy your hard work, personal image, or FreeBSD, but simply
because they have a different outlook on the world. Different
is good.Disagree honestly. Argue your position from its merits,
be honest about any shortcomings it may have, and be open to
seeing their solution, or even their vision of the problem,
with an open mind.Accept correction. We are all fallible. When you have made
a mistake, apologize and get on with life. Do not beat up
yourself, and certainly do not beat up others for your mistake.
Do not waste time on embarrassment or recrimination, just fix
the problem and move on.Ask for help. Seek out (and give) peer reviews. One of
the ways open source software is supposed to excel is in the
number of eyeballs applied to it; this does not apply if nobody
will review code.GNATSThe FreeBSD Project utilizes
GNATS for tracking bugs and change
requests. Be sure that if you commit a fix or suggestion found
in a GNATS PR, you use
edit-pr pr-number
on freefall to close it. It is also considered
nice if you take time to close any PRs associated with your
commits, if appropriate. You can also make use of
&man.send-pr.1; yourself for proposing any change which you feel
should probably be made, pending a more extensive peer-review
first.You can find out more about GNATS
at:http://www.FreeBSD.org/support.html&man.send-pr.1;You can run a local copy of GNATS, and then integrate the FreeBSD
GNATS tree in to it using CVSup. Then you can run GNATS commands
locally.
This lets you query the PR database without needing to be connected to
the Internet.Using a local GNATS treeIf you are not already downloading the GNATS tree, add this line
to your supfile, and re-sup. Note that since
GNATS is not under CVS control it has no tag, so if you are adding
it to your existing supfile it should appear
before any tag= entry as these remain active once set.
gnats release=current prefix=/usrThis will place the FreeBSD GNATS tree in
/usr/gnats. You can use a
refuse file to control which categories to
receive. For example, to only receive docs PRs,
put this line in
/usr/local/etc/cvsup/sup/refuseThe precise path depends on the *default
base setting in your
supfile..gnats/[a-ce-z]*The rest of these examples assume you have only supped the
docs category. Adjust them as necessary,
depending on the categories you are syncing.Install the GNATS port from
ports/databases/gnats. This will place the
various GNATS directories under
$PREFIX/share/gnats.Symlink the GNATS directories you are supping under the version
of GNATS you have installed.&prompt.root; cd /usr/local/share/gnats/gnats-db
&prompt.root; ln -s /usr/gnats/docsRepeat as necessary, depending on how many GNATS categories you
are syncing.Update the GNATS categories file with these
categories. The file is
$PREFIX/share/gnats/gnats-db/gnats-adm/categories.# This category is mandatory
pending:Category for faulty PRs:gnats-admin:
#
# FreeBSD categories
#
docs:Documentation Bug:freebsd-doc:Run $PREFIX/libexec/gnats/gen-index to
recreate the GNATS index. The output has to be redirected to
$PREFIX/share/gnats/gnats-db/gnats-adm/index.
You can do this periodically from &man.cron.8;, or run &man.cvsup.1;
from a shell script that does this as well.&prompt.root; /usr/local/libexec/gnats/gen-index \
> /usr/local/share/gnats/gnats-db/gnats-adm/indexTest the configuration by querying the PR database. This
command shows open docs PRs.&prompt.root; query-pr -c docs -s openPick a PR and close it.This procedure only works to allow you to view and query the PRs
locally. To edit or close them you will still have to log in to
freefall and do it from there.Who's WhoBesides the repository
meisters, there are other FreeBSD project members and teams whom you will
probably get to know in your role as a committer. Briefly,
and by no means all-inclusively, these are:&a.jhb;John is the manager of the SMPng Project, and has
authority over the architectural design and implementation
of the move to fine-grained kernel threading and locking.
He's also the editor of the SMPng Architecture Document.
If you are working on fine-grained SMP and locking, please
coordinate with John. You can learn more about the
SMPng Project on its home page:
&a.doceng;doceng is the group responsible for the documentation build
infrastructure, approving new documentation committers, and
ensuring that the FreeBSD website and documentation on the FTP
site is up to date with respect to the CVS tree. It is not a
conflict resolution body. The vast majority of documentation
related discussion takes place on the &a.doc;. More details regarding the doceng team can be found in its charter. Committers
interested in contributing to the documentation should familiarize
themselves with the Documentation Project
Primer.&a.ru;Ruslan is Mister &man.mdoc.7;. If you are writing a
manual page and need
some advice on the structure, or the markup, ask Ruslan.&a.bde;Bruce is the Style Police-Meister.
When you do a commit that could have been done better,
Bruce will be there to tell you. Be thankful that someone
is. Bruce is also very knowledgeable on the various
standards applicable to FreeBSD.&a.murray;&a.dwhite;&a.rwatson;&a.kensmith;&a.hrs;&a.mux;&a.bmah;These are the members of the &a.re;. This team is
responsible for setting release deadlines and controlling
the release process. During code freezes, the release
engineers have final authority on all changes to the
system for whichever branch is pending release status. If
there is something you want merged from &os.current; to
&os.stable; (whatever values those may have at any given
time), these are the people to talk to about it.Hiroki is also the keeper of the release documentation
(src/release/doc/*). If you commit a
change that you think is worthy of mention in the release notes,
please make sure he knows about it. Better still, send him
a patch with your suggested commentary.&a.cperciva;Colin is the
FreeBSD Security
Officer
and oversees the &a.security-officer;.
&a.wollman;If you need advice on obscure network internals or
are not sure of some potential change to the networking
subsystem you have in mind, Garrett is someone to talk
to. Garrett is also very knowledgeable on the various
standards applicable to FreeBSD.&a.committers;cvs-committers is the entity that CVS uses to send you all your
commit messages. You should never send email
directly to this list. You should only send replies to this list
when they are short and are directly related to a commit.&a.developers;All committers are subscribed to -developers. This list was created to be a
forum for the committers community issues.
Examples are Core
voting, announcements, etc.The &a.developers; is for the exclusive use of
FreeBSD committers. In order to develop FreeBSD, committers must
have the ability to openly discuss matters that will be resolved
before they are publicly announced. Frank discussions of work in
progress are not suitable for open publication and may harm FreeBSD.All FreeBSD committers are reminded to obey the copyright of the
original author(s) of &a.developers; mail. Do not publish or
forward messages from the &a.developers; outside the list
membership without permission of all of the authors.Copyright violators will be removed from the &a.developers;,
resulting in a suspension of commit privileges. Repeated or
flagrant violations may result in permanent revocation of
commit privileges.This list is
not intended as a place for code reviews or a
replacement for the &a.arch; or the &a.audit;. In fact
using it as such hurts the FreeBSD Project as it gives a sense of a
closed list where general decisions affecting all of the FreeBSD
using community are made without being open.
Last, but not least never, never ever, email
the &a.developers; and CC:/BCC: another FreeBSD list.
Never, ever email another FreeBSD email list and CC:/BCC:
the &a.developers;. Doing so can greatly diminish the benefits
of this list.SSH Quick-Start GuideIf you do not wish to type your password in every
time you use &man.ssh.1;, and you use RSA or DSA keys to
authenticate, &man.ssh-agent.1; is there for your
convenience. If you want to use &man.ssh-agent.1;, make
sure that you run it before running other applications. X
users, for example, usually do this from their
.xsession or
.xinitrc file. See &man.ssh-agent.1;
for details.Generate a key pair using &man.ssh-keygen.1;. The key
pair will wind up in your
$HOME/.ssh/
directory.Send your public key
($HOME/.ssh/id_dsa.pub
or $HOME/.ssh/id_rsa.pub)
to the person setting you up as a committer so it can be put
into yourlogin file in
/etc/ssh-keys/ on
freefall.
Now you should be able to use &man.ssh-add.1; for
authentication once per session. This will prompt you for
your private key's pass phrase, and then store it in your
authentication agent (&man.ssh-agent.1;). If you no longer
wish to have your key stored in the agent, issuing
ssh-add -d will remove it.Test by doing something such as ssh
freefall.FreeBSD.org ls /usr.For more information, see
security/openssh, &man.ssh.1;,
&man.ssh-add.1;, &man.ssh-agent.1;, &man.ssh-keygen.1;, and
&man.scp.1;.&coverity.prevent; Availability for &os; CommittersIn January 2006, the &os; Foundation obtained a license for
&coverity.prevent; from &coverity Ltd. With this donation, all
&os; developers can obtain access to Coverity
Prevent analysis results of all &os; Project
software.&os; developers who are interested in obtaining access to the
analysis results of the automated Coverity
Prevent runs, can find out more by logging
into freefall and reading the relevant bits of the
files:/usr/local/coverity/coverity_license.txtThe license terms to which the &os; developers will have
to agree in order to use &coverity.prevent; analysis
results./usr/local/coverity/coverity_announcement.txtThe announcement posted to the developers' mailing list of the
&os; Project. It contains useful information about the &os;
Foundation and &coverity; Ltd., as well as signup information
for registering with the &coverity.prevent; installation of the
&os; Cluster.After reading and understanding the license terms
of coverity_license.txt, all &os; developers
who are interested in using the analysis results of
&coverity.prevent; should read this file./usr/local/coverity/coverity_readme.txtA short guide about fixes which are committed to the &os;
source tree after being detected by &coverity.prevent; and
analyzed by an &os; developer.The &os; Wiki includes a mini-guide for developers who are
interested in working with the &coverity.prevent; analysis reports:
. Please
note that this mini-guide is only readable by &os; developers, so if you
cannot access this page, you will have to ask someone to add you to the
appropriate Wiki access list.Finally, all &os; developers who are going to use &coverity.prevent;
are always encouraged to ask for more details and usage information, by
posting any questions to the mailing list of the &os; developers.The FreeBSD Committers' Big List of RulesRespect other committers.Respect other contributors.Discuss any significant change
before committing.Respect existing maintainers (if listed in the
MAINTAINER field in
Makefile or in the
MAINTAINER file in the top-level
directory).Any disputed change must be backed out pending
resolution of the dispute if requested by a maintainer.
Security related changes may
override a maintainer's wishes at the Security Officer's
discretion.Changes go to &os.current; before
&os.stable; unless specifically permitted by
the release engineer or unless they are not applicable to
&os.current;. Any non-trivial or non-urgent
change which is applicable should also be allowed to sit in
&os.current; for at least 3 days before
merging so that it can be given sufficient testing. The
release engineer has the same authority over the
&os.stable; branch as outlined for the
maintainer in rule #5.Do not fight in public with other committers; it looks
bad. If you must strongly disagree about
something, do so only in private.Respect all code freezes and read the
committers and developers
mailing lists in a timely manner so you know when a code freeze is
in effect.When in doubt on any procedure, ask first!Test your changes before committing them.Do not commit to anything under the
src/contrib,
src/crypto, and
src/sys/contrib trees without
explicit approval from the respective
maintainer(s).As noted, breaking some of these rules can be grounds for
suspension or, upon repeated offense, permanent removal of
commit privileges. Individual members of core
have the power to temporarily suspend commit privileges until
core as a whole has the chance to review the
issue. In case of an emergency (a committer
doing damage to the repository), a temporary suspension may also
be done by the repository meisters.
Only a 2/3 majority of core
has the authority to suspend commit privileges for longer
than a week or to remove them permanently.
This rule does not exist to set core up as a bunch
of cruel dictators who can dispose of committers as casually as
empty soda cans, but to give the project a kind of safety fuse.
If someone is out of control, it is important to be
able to deal with this immediately rather than be paralyzed by
debate. In all cases, a committer whose privileges are
suspended or revoked is entitled to a hearing by core,
the total duration of the suspension being determined at that
time. A committer whose privileges are suspended may also
request a review of the decision after 30 days and every 30 days
thereafter (unless the total suspension period is less than 30
days). A committer whose privileges have been revoked entirely
may request a review after a period of 6 months has elapsed.
This review policy is strictly informal
and, in all cases, core reserves the right to either act on or
disregard requests for review if they feel their original
decision to be the right one.In all other aspects of project operation, core is a subset
of committers and is bound by the same
rules. Just because someone is in core this does not mean
that they have special dispensation to step outside any of
the lines painted here; core's special powers
only kick in when it acts as a group, not on an individual
basis. As individuals, the core team members are all committers
first and core second.DetailsRespect other committers.This means that you need to treat other committers as
the peer-group developers that they are. Despite our
occasional attempts to prove the contrary, one does not get
to be a committer by being stupid and nothing rankles more
than being treated that way by one of your peers. Whether
we always feel respect for one another or not (and
everyone has off days), we still have to
treat other committers with respect
at all times, on public forums and in private email.Being able to work together long term is this project's
greatest asset, one far more important than any set of
changes to the code, and turning arguments about code into
issues that affect our long-term ability to work
harmoniously together is just not worth the trade-off by
any conceivable stretch of the imagination.To comply with this rule, do not send email when you are
angry or otherwise behave in a manner which is likely to
strike others as needlessly confrontational. First calm
down, then think about how to communicate in the most
effective fashion for convincing the other person(s) that
your side of the argument is correct, do not just blow off
some steam so you can feel better in the short term at the
cost of a long-term flame war. Not only is this very bad
energy economics, but repeated displays of
public aggression which impair our ability to work well
together will be dealt with severely by the project
leadership and may result in suspension or termination of
your commit privileges. The project leadership will
take into account both public and private communications
brought before it. It will not seek the disclosure of
private communications, but it will take it into account
if it is volunteered by the committers involved in the
complaint.All of this is never an option which the
project's leadership enjoys in the slightest, but unity
comes first. No amount of code or good advice is worth
trading that away.Respect other contributors.You were not always a committer. At one time you were
a contributor. Remember that at all times. Remember what
it was like trying to get help and attention. Do not forget
that your work as a contributor was very important to
you. Remember what it was like. Do not discourage, belittle,
or demean contributors. Treat them with respect. They are
our committers in waiting. They are every bit as important
to the project as committers. Their contributions are as
valid and as important as your own. After all, you made
many contributions before you became a committer. Always
remember that. Consider the points raised under
and apply them also to contributors.Discuss any significant change
before committing.The CVS repository is not where changes should be
initially submitted for correctness or argued over, that
should happen first in the mailing lists and the commit should
only happen once something resembling consensus has
been reached. This does not mean that you have to ask
permission before correcting every obvious syntax error or
manual page misspelling, simply that you should try to
develop a feel for when a proposed change is not quite such
a no-brainer and requires some feedback first. People
really do not mind sweeping changes if the result is
something clearly better than what they had before, they
just do not like being surprised by
those changes. The very best way of making sure that
you are on the right track is to have your code reviewed by
one or more other committers.When in doubt, ask for review!Respect existing maintainers if listed.Many parts of FreeBSD are not owned in
the sense that any specific individual will jump up and
yell if you commit a change to their area,
but it still pays to check first. One convention we use
is to put a maintainer line in the
Makefile for any package or subtree
which is being actively maintained by one or more people;
see
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/policies.html
for documentation on this. Where sections of code have
several maintainers, commits to affected areas by one
maintainer need to be reviewed by at least one other
maintainer. In cases where the
maintainer-ship of something is not clear,
you can also look at the CVS logs for the file(s) in
question and see if someone has been working recently or
predominantly in that area.Other areas of FreeBSD fall under the control of
someone who manages an overall category of FreeBSD
evolution, such as internationalization or networking.
See
- http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/contributors/staff-who.html
+ url="&url.base;/administration.html">
for more information on this.Any disputed change must be backed out pending
resolution of the dispute if requested by a maintainer.
Security related changes may
override a maintainer's wishes at the Security Officer's
discretion.This may be hard to swallow in times of conflict (when
each side is convinced that they are in the right, of
course) but CVS makes it unnecessary to have an ongoing
dispute raging when it is far easier to simply reverse the
disputed change, get everyone calmed down again and then
try to figure out what is the best way to proceed. If the change
turns out to be the best thing after all, it can be easily
brought back. If it turns out not to be, then the users
did not have to live with the bogus change in the tree
while everyone was busily debating its merits. People
very rarely call for back-outs in the repository
since discussion generally exposes bad or controversial
changes before the commit even happens, but on such rare
occasions the back-out should be done without argument so
that we can get immediately on to the topic of figuring
out whether it was bogus or not.Changes go to &os.current; before
&os.stable; unless specifically permitted
by the release engineer or unless they are not applicable
to &os.current;. Any non-trivial or
non-urgent change which is applicable should also be
allowed to sit in &os.current; for at least
3 days before merging so that it can be given sufficient
testing. The release engineer has the same authority over
the &os.stable; branch as outlined in rule
#5.This is another do not argue about it
issue since it is the release engineer who is ultimately
responsible (and gets beaten up) if a change turns out to
be bad. Please respect this and give the release engineer
your full cooperation when it comes to the
&os.stable; branch. The management of
&os.stable; may frequently seem to be
overly conservative to the casual observer, but also bear
in mind the fact that conservatism is supposed to be the
hallmark of &os.stable; and different rules
apply there than in &os.current;. There is
also really no point in having &os.current;
be a testing ground if changes are merged over to
&os.stable; immediately. Changes need a
chance to be tested by the &os.current;
developers, so allow some time to elapse before merging
unless the &os.stable; fix is critical,
time sensitive or so obvious as to make further testing
unnecessary (spelling fixes to manual pages, obvious bug/typo
fixes, etc.) In other words, apply common sense.Changes to the security branches
(for example, RELENG_6_0) must be
approved by a member of the &a.security-officer;, or in
some cases, by a member of the &a.re;.Do not fight in public with other committers; it looks
bad. If you must strongly disagree about
something, do so only in private.This project has a public image to uphold and that
image is very important to all of us, especially if we are
to continue to attract new members. There will be
occasions when, despite everyone's very best attempts at
self-control, tempers are lost and angry words are
exchanged. The best thing that can be done in such cases is to minimize
the effects of this until everyone has cooled back down. That
means that you should not air your angry words in public
and you should not forward private correspondence to
public mailing lists or aliases. What people say
one-to-one is often much less sugar-coated than what they
would say in public, and such communications therefore
have no place there - they only serve to inflame an
already bad situation. If the person sending you a
flame-o-gram at least had the grace to send it privately,
then have the grace to keep it private yourself. If you
feel you are being unfairly treated by another developer,
and it is causing you anguish, bring the matter up with
core rather than taking it public. Core will do its best to
play peace makers and get things back to sanity. In cases
where the dispute involves a change to the codebase and
the participants do not appear to be reaching an amicable
agreement, core may appoint a mutually-agreeable 3rd party
to resolve the dispute. All parties involved must then
agree to be bound by the decision reached by this 3rd
party.Respect all code freezes and read the
committers and developers
mailing list on a timely basis so you know when a code freeze is
in effect.Committing unapproved changes during a code freeze is a really
big mistake and committers are expected to keep up-to-date
on what is going on before jumping in after a long absence
and committing 10 megabytes worth of accumulated stuff.
People who abuse this on a regular basis will have their
commit privileges suspended until they get back from the
FreeBSD Happy Reeducation Camp we run in Greenland.When in doubt on any procedure, ask first!Many mistakes are made because someone is in a hurry
and just assumes they know the right way of doing
something. If you have not done it before, chances are
good that you do not actually know the way we do things
and really need to ask first or you are going to
completely embarrass yourself in public. There is no shame
in asking how in the heck do I do this? We
already know you are an intelligent person; otherwise, you
would not be a committer.Test your changes before committing them.This may sound obvious, but if it really were so
obvious then we probably would not see so many cases of
people clearly not doing this. If your changes are to the
kernel, make sure you can still compile both GENERIC and
LINT. If your changes are anywhere else, make sure you
can still make world. If your changes are to a branch,
make sure your testing occurs with a machine which is
running that code. If you have a change which also may
break another architecture, be sure and test on all
supported architectures. Please refer to the FreeBSD Internal
Page for a list of available resources. As other
architectures are added to the FreeBSD supported platforms
list, the appropriate shared testing resources will be
made available.Do not commit to anything under the
src/contrib,
src/crypto, and
src/sys/contrib trees without
explicit approval from the respective
maintainer(s).The trees mentioned above are for contributed software
usually imported onto a vendor branch. Committing something
there, even if it does not take the file off the vendor branch,
may cause unnecessary headaches for those responsible for
maintaining that particular piece of software. Thus, unless
you have explicit approval from the
maintainer (or you are the maintainer), do
not commit there!Please note that this does not mean you should not try to
improve the software in question; you are still more than
welcome to do so. Ideally, you should submit your patches to
the vendor. If your changes are FreeBSD-specific, talk to the
maintainer; they may be willing to apply them locally. But
whatever you do, do not commit there by
yourself!Contact the &a.core; if you wish to take up maintainership
of an unmaintained part of the tree.Policy on Multiple ArchitecturesFreeBSD has added several new arch ports during recent
release cycles and is truly no longer an &i386; centric operating
system. In an effort to make it easier to keep FreeBSD portable
across the platforms we support, core has developed the following
mandate:
Our 32 bit reference platform is i386, and our 64 bit
reference platform is Sparc64. Major design work (including
major API and ABI changes) must prove itself on at least one
32 bit and at least one 64 bit platform, preferably the
primary reference platforms, before it may be committed
to the source tree.
The i386 and Sparc64 platforms were chosen due to being more
readily available to developers and as representatives of more
diverse processor and system designs - big vs little endian,
register file vs register stack, different DMA and cache
implementations, hardware page tables vs software TLB management
etc.The ia64 platform has many of the same complications that
Sparc64 has, but is still limited in availability to
developers.We will continue to re-evaluate this policy as cost and
availability of the 64 bit platforms change.Developers should also be aware of our Tier Policy for
the long term support of hardware architectures. The rules
here are intended to provide guidance during the development
process, and are distinct from the requirements for features
and architectures listed in that section. The Tier rules for
feature support on architectures at release-time are more
strict than the rules for changes during the development
process.Other SuggestionsWhen committing documentation changes, use a spell checker
before committing. For all SGML docs, you should also
verify that your formatting directives are correct by running
make lint.For all on-line manual pages, run manck
(from ports) over the manual page to verify all of the cross
references and file references are correct and that the man
page has all of the appropriate MLINKs
installed.Do not mix style fixes with new functionality. A style
fix is any change which does not modify the functionality of
the code. Mixing the changes obfuscates the functionality
change when using cvs diff, which can hide
any new bugs. Do not include whitespace changes with content
changes in commits to doc/ or
www/. The extra clutter in the diffs
makes the translators' job much more difficult. Instead, make
any style or whitespace changes in separate commits that are
clearly labeled as such in the commit message.Deprecating FeaturesWhen it is necessary to remove functionality from software
in the base system the following guidelines should be followed
whenever possible:Mention is made in the manual page and possibly the
release notes that the option, utility, or interface is
deprecated. Use of the deprecated feature generates a
warning.The option, utility, or interface is preserved until
the next major (point zero) release.The option, utility, or interface is removed and no
longer documented. It is now obsolete. It is also
generally a good idea to note its removal in the release
notes.Support for Multiple ArchitecturesFreeBSD is a highly portable operating system intended to
function on many different types of hardware architectures.
Maintaining clean separation of Machine Dependent (MD) and Machine
Independent (MI) code, as well as minimizing MD code, is an important
part of our strategy to remain agile with regards to current
hardware trends. Each new hardware architecture supported by
FreeBSD adds substantially to the cost of code maintenance,
toolchain support, and release engineering. It also dramatically
increases the cost of effective testing of kernel changes. As such,
there is strong motivation to differentiate between classes of
support for various architectures while remaining strong in a few
key architectures that are seen as the FreeBSD "target audience".
Statement of General IntentThe FreeBSD Project targets "production quality commercial
off-the-shelf (COTS) workstation, server, and high-end embedded
systems". By retaining a focus on a narrow set of architectures
of interest in these environments, the FreeBSD Project is able
to maintain high levels of quality, stability, and performance,
as well as minimize the load on various support teams on the
project, such as the ports team, documentation team,
security officer, and release engineering teams. Diversity in
hardware support broadens the options for FreeBSD consumers by
offering new features and usage opportunities (such as support
for 64-bit CPUs, use in embedded environments, etc.), but these
benefits must always be carefully considered in terms of the real-world
maintenance cost associated with additional platform support.
The FreeBSD Project differentiates platform targets into
four tiers. Each tier includes a specification of the
requirements for an architecture to be in that tier,
as well as specifying the obligations of developers with
regards to the platform. In addition, a policy is defined
regarding the circumstances required to change the tier
of an architecture.Tier 1: Fully Supported ArchitecturesTier 1 platforms are fully supported by the security
officer, release engineering, and toolchain maintenance staff.
New features added to the operating system must be fully
functional across all Tier 1 architectures for every release
(features which are inherently architecture-specific, such as
support for hardware device drivers, may be exempt from this
requirement). In general, all Tier 1 platforms must have build
and tinderbox support either in the FreeBSD.org cluster, or
easily available for all developers. Embedded platforms may
substitute an emulator available in the FreeBSD cluster for
actual hardware.Tier 1 architectures are expected to be Production Quality
with respects to all aspects of the FreeBSD operating system,
including installation and development environments.Tier 1 architectures are expected to be completely
integrated into the source tree and have all features
necessary to produce an entire system relevant for that target
architecture. Tier 1 architectures generally have at least 6 active
developers.Tier 1 architectures are expected to be fully supported by
the ports system. All the ports should build on a Tier 1
platform, or have the appropriate filters to prevent the
inappropriate ones from building there. The packaging system
must support all Tier 1 architectures. To ensure an
architectures Tier 1 status, proponents of that architecture
must show that all relevant packages can be built on that
platform.Tier 1 embedded architectures must be able to cross-build
packages on at least one other tier 1 architecture. The
packages must be the most relevant for the platform, but may
be a non-empty subset of those that build natively.Tier 1 architectures must be fully documented. All basic
operations need to be covered by the handbook or other
documents. All relevant integration documentation must also
be integrated into the tree, or readily available.Current Tier 1 platforms are i386, AMD64, and PC98.Tier 2: Developmental ArchitecturesTier 2 platforms are not supported by the security officer
and release engineering teams. Platform maintainers are
responsible for toolchain support in the tree. The toolchain
maintainer is expected to work with the platform maintainers
to refine these changes. Major new toolchain components are
allowed to break support for Tier 2 architectures if the
FreeBSD-local changes haven't been incorporated upstream. The
toolchain maintainers are expected to provide prompt review of
any proposed changes and cannot block, through their inaction,
changes going into the tree. New features added to FreeBSD
should be feasible to implement on these platforms, but an
implementation is not required before the feature may be added
to the FreeBSD source tree. New features that may be difficult
to implement on Tier 2 architectures should provide a means of
disabling them on those architectures. The implementation of
a Tier 2 architecture may be committed to the main FreeBSD
tree as long as it does not interfere with production work on
Tier 1 platforms, or substantially with other Tier 2 platforms.
Before a Tier 2 platform can be added to the FreeBSD base
source tree, the platform must be able to boot multi-user on
actual hardware. Generally, there must be at least three active
developers working on the platform.Tier 2 architectures are usually systems targeted at Tier 1
support, but that are still under development. Architectures
reaching end of life may also be moved from Tier 1 status to Tier
2 status as the availability of resources to continue to maintain
the system in a Production Quality state diminishes. Well supported
niche architectures may also be tier 2.Tier 2 architectures may have some support for them
integrated into the ports infrastructure. They may have cross
compilation support added, at the discretion of portmgr. Some
ports must built natively, into packages if the package system
supports that architecture. If not integrated into the base
system, some external patches for the architecture for ports
must be available.Tier 2 architectures can be integrated into the FreeBSD
handbook. The basics for how to get a system running must be
documented, although not necessarily for every single board or
system a tier 2 architecture supports. The supported hardware
list must exist and should be no more than a couple of months
old. It should be integrated into the FreeBSD
documentation.Current Tier 2 platforms are ARM, PowerPC, ia64, Sparc64 and
sun4v.Tier 3: Experimental ArchitecturesTier 3 platforms are not supported by the security officer
and release engineering teams. At the discretion of the
toolchain maintainer, they may be supported in the toolchain.
Tier 3 platforms are architectures in the early stages of
development, for non-mainstream hardware platforms, or which
are considered legacy systems unlikely to see broad future
use. New tier 3 systems will not be committed to the base
source tree. Support for Tier 3 systems may be worked on in
the FreeBSD Perforce Repository, providing source control and
easier change integration from the main FreeBSD tree.
Platforms that transition to Tier 3 status may be removed from
the tree if they are no longer actively supported by the
FreeBSD developer community at the discretion of the release
engineer.Tier 3 platforms may have ports support, either integrated
or external, but do not require it.Tier 3 platforms must have the basics documented for how
to build a kernel and how to boot it on at least one target
hardware or emulation environment. This documentation need
not be integrated into the FreeBSD tree.Current Tier 3 platforms are MIPS and &s390;.Tier 4: Unsupported ArchitecturesTier 4 systems are not supported in any form by the project.
All systems not otherwise classified into a support tier
are Tier 4 systems.Policy on Changing the Tier of an ArchitectureSystems may only be moved from one tier to another by
approval of the FreeBSD Core Team, which shall make that
decision in collaboration with the Security Officer, Release
Engineering, and toolchain maintenance teams.Ports Specific FAQAdding a New PortHow do I add a new port?First, please read the section about repository
copies.The easiest way to add a new port is to use the
addport script on
freefall. It will add a port from the
directory you specify, determining the category automatically
from the port Makefile.
It will also add an entry to the port's
category Makefile. It was
written by &a.mharo; and &a.will;, and is currently maintained
by &a.garga;, so please send questions/patches about
addport to him.Any other things I need to know when I add a new
port?Check the port, preferably to make sure it compiles
and packages correctly. This is the recommended
sequence:&prompt.root; make install
&prompt.root; make package
&prompt.root; make deinstall
&prompt.root; pkg_add package you built above
&prompt.root; make deinstall
&prompt.root; make reinstall
&prompt.root; make packageThe
Porters
Handbook contains more detailed
instructions.Use &man.portlint.1; to check the syntax of the port.
You do not necessarily have to eliminate all warnings but
make sure you have fixed the simple ones.If the port came from a submitter who has not
contributed to the project before, add that person's
name to the Additional
Contributors section of the FreeBSD Contributors
List.Close the PR if the port came in as a PR. To close
a PR, just do
edit-pr PR#
on freefall and change the
state from open
to closed. You will be asked to
enter a log message and then you are done.Removing an Existing PortHow do I remove an existing port?First, please read the section about repository
copies. Before you remove the port, you have to verify
there are no other ports depending on it.Make sure there is no dependency on the port
in the ports collection:The port's PKGNAME should appear in exactly one
line in a recent INDEX file.No other ports should contain any reference to
the port's directory or PKGNAME in their
MakefilesThen, remove the port:Remove the port's files via cvs remove.Remove SUBDIR listing of the port
in the parent directory Makefile.Add an entry to
ports/MOVED.Remove the port from
ports/LEGAL if it is there.Alternatively, you can use the rmport
script, from ports/Tools/scripts.
This script has been written by &a.vd;, who is also its current
maintainer, so please send questions, patches or suggestions
about rmport to him.Repository CopiesWhen do we need a repository copy?When you want to add a port that is related to
any port that is already in the tree in a separate
directory, you have to do a repository copy.
Here related means
it is a different version or a slightly modified
version. Examples are
print/ghostscript* (different
versions) and x11-wm/windowmaker*
(English-only and internationalized version).Another example is when a port is moved from one
subdirectory to another, or when you want to change the
name of a directory because the author(s) renamed their
software even though it is a
descendant of a port already in a tree.When do we not need a
repository copy?When there is no history to preserve. If a port is
added into a wrong category and is moved immediately,
it suffices to simply cvs remove the
old one and addport the new
one.What do I need to do?File a PR in GNATS, listing the
reasons for the repository copy request. Assign it to
portmgr and set state to
repocopy. In a few days,
portmgr will do
a repository copy from the old to the new location, and
reassign the PR back to you. Once everything is done, perform the
following:When a port has been repo copied:Do a force commit on the files of the copied port,
stating repository copy was performed.Upgrade the copied port to the new version.
Remember to change the LATEST_LINK
so there are no duplicate ports with the same name.
In some rare cases it may be necessary to change the
PORTNAME instead of
LATEST_LINK, but this should only
be done when it is really needed — e.g. using
an existing port as the base for a very similar
program with a different name, or upgrading a port to
a new upstream version which actually changes the
distribution name, like the transition from
textproc/libxml to
textproc/libxml2. In most cases,
changing LATEST_LINK should
suffice.Add the new subdirectory to the
SUBDIR listing in the parent
directory Makefile. You can run
make checksubdirs in the parent
directory to check this.If the port changed categories, modify the
CATEGORIES line of the port's
Makefile accordinglyAdd an entry to
ports/MOVED, if you remove the
original port.When removing a port:Perform a thorough check of the ports collection for
any dependencies on the old port location/name, and
update them. Running grep on
INDEX is not enough because some
ports have dependencies enabled by compile-time options.
A full grep -r of the ports
collection is recommended.Remove the old port, the old
SUBDIR entry and the old module
entry.Add an entry to
ports/MOVED.After repo moves (rename operations where
a port is copied and the old location is removed):Follow the same steps that are outlined in the
previous two entries, to activate the new location of
the port and remove the old one.Ports FreezeWhat is a ports freeze?Before a release, it is necessary to restrict
commits to the ports tree for a short period of time
while the packages and the release itself are being
built. This is to ensure consistency among the various
parts of the release, and is called the ports
freeze.For more information on the background and
policies surrounding a ports freeze, see the
Portmgr
Quality Assurance page.How long is a ports freeze?Usually a week or two.What does it mean to me?During the ports freeze, you are not allowed to
commit anything to the tree without explicit approval
from the ports management team. Explicit
approval here means that you send a patch to
the ports management team for review and get a reply
saying, Go ahead and commit it.Not everything is allowed to be committed during
a freeze. Please see the Portmgr Quality
Assurance page for more information.
Note that you do not have implicit permission to fix
a port during the freeze just because it is
broken.How do I know when the ports freeze starts?The ports management team will send out warning
messages to the &a.ports; and &a.committers;
announcing the start of the impending release, usually
two or three weeks in advance. The exact starting time
will not be determined until a few days before the
actual release. This is because the ports freeze has to
be synchronized with the release, and it is usually not
known until then when exactly the release will be
rolled.When the freeze starts, there will be another
announcement to the &a.committers;, of course.How do I know when the ports freeze ends?A few hours after the release, the ports management team
will send out a mail to the &a.ports; and &a.committers;
announcing the end of the ports freeze. Note that the
release being cut does not automatically end the freeze.
We have to make sure there will not be any last minute
snafus that result in an immediate re-rolling of the
release.Creating a New CategoryWhat is the procedure for creating a new category?Please see
Proposing a New Category in the Porter's Handbook.
Once that procedure has been followed and the PR has been
assigned to &a.portmgr;, it is their decision whether or
not to approve it. If they do, it is their responsibility
to do the following:Perform any needed repocopies. (This only applies
to physical categories.)Update the VALID_CATEGORIES
definition in ports/Mk/bsd.port.mk.
Assign the PR back to you.What do I need to do to implement a new physical
category?The procedure is a strict superset of the one to
repocopy individual ports (see above).Upgrade each copied port's
Makefile. Do not connect the
new category to the build yet.To do this, you will need to:Change the port's CATEGORIES
(this was the point of the exercise, remember?)
The new category should be listed
first. This will help to
ensure that the the PKGORIGIN
is correct.Run a make describe. Since
the top-level make index that
you will be running in a few steps is an iteration
of make describe over the entire
ports hierarchy, catching any errors here will
save you having to re-run that step later on.If you want to be really thorough, now might
be a good time to run &man.portlint.1;.Check that the PKGORIGINs are
correct. The ports system uses each port's
CATEGORIES entry to create
its PKGORIGIN, which is used to
connect installed packages to the port directory they
were built from. If this entry is wrong, common port
tools like &man.pkg.version.1; and
&man.portupgrade.1; fail.To do this, use the chkorigin.sh
tool, as follows: env
PORTSDIR=/path/to/ports
sh -e /path/to/ports/Tools/scripts/chkorigin.sh
. This will check every
port in the ports tree, even those not connected to the
build, so you can run it directly after the repocopy.
Hint: do not forget to look at the
PKGORIGINs of any slave ports of the
ports you just repocopied!On your own local system, test the proposed
changes: first, comment out the
SUBDIR entries in the old
ports' categories' Makefiles;
then enable building the new category in
ports/Makefile.
Run make checksubdirs in the
affected category directories to check the
SUBDIR entries. Next, in
the ports/
directory, run make index. This
can take over 40 minutes on even modern systems;
however, it is a necessary step to prevent problems
for other people.Once this is done, you can commit the
updated ports/Makefile to
connect the new category to the build and also
commit the Makefile changes
for the old category or categories.Add appropriate entries to
ports/MOVED.Update the instructions for &man.cvsup.1;:
add the category to
distrib/cvsup/sup/README
adding the following files into
distrib/cvsup/sup/ports-categoryname:
list.cvs and
releases.
add the category to
src/share/examples/cvsup/ports-supfile
(Note: these are
in the src, not the ports, repository). If you
are not a src committer, you will need to submit
a PR for this.
Update the list of categories used by &man.sysinstall.8;
in src/usr.sbin/sysinstall.Update the documentation by modifying the
following:the section of the Handbook that lists the
cvsup collections.the
list of categories in the Porter's Handbookwww/en/ports/categories.
Note that these are now displayed by sub-groups,
as specified in
www/en/ports/categories.descriptions.
(Note: these are
in the docs, not the ports, repository). If you
are not a docs committer, you will need to submit
a PR for this.Only once all the above have been done, and
no one is any longer reporting problems with the
new ports, should the old ports be deleted from
their previous locations in the repository.It is not necessary to manually update the ports web pages
to reflect the new category. This is now done automatically
via your change to www/en/ports/categories
and the daily automated rebuild of INDEX.
What do I need to do to implement a new virtual
category?This is much simpler than a physical category. You
only need to modify the following:src/usr.sbin/sysinstallthe
list of categories in the Porter's Handbookwww/en/ports/categoriesMiscellaneous QuestionsHow do I know if my port is building correctly or
not?First, go check
.
There you will find error logs from the latest package
building runs on all supported platforms for the most
recent branches.However, just because the port does not show up there
does not mean it is building correctly. (One of the
dependencies may have failed, for instance.) The relevant
directories are available on pointyhat under
/a/portbuild/<arch>/<major_version>
so feel free to dig around. Each architecture and version has
the following subdirectories:errors error logs from latest <major_version> run on <arch>
logs all logs from latest <major_version> run on <arch>
packages packages from latest <major_version> run on <arch>
bak/errors error logs from last complete <major_version> run on <arch>
bak/logs all logs from last complete <major_version> run on <arch>
bak/packages packages from last complete <major_version> run on <arch>Basically, if the port shows up in
packages, or it is in
logs but not in
errors, it built fine. (The
errors directories are what you get
from the web page.)I added a new port. Do I need to add it to the
INDEX?No, INDEX is no longer stored
in the CVS repository. The file can either be generated
by running make index, or a pre-generated
version can be downloaded with make
fetchindex.Are there any other files I am not allowed to
touch?Any file directly under ports/, or
any file under a subdirectory that starts with an
uppercase letter (Mk/,
Tools/, etc.). In particular, the
ports management team is very protective of
ports/Mk/bsd.port*.mk so do not
commit changes to those files unless you want to face his
wra(i)th.What is the proper procedure for updating the checksum
for a port's distfile when the file changes without a
version change?When the checksum for a port's distfile is updated due
to the author updating the file without changing the port's
revision, the commit message should include a summary of
the relevant diffs between the original and new distfile to
ensure that the distfile has not been corrupted or
maliciously altered. If the current version of the port
has been in the ports tree for a while, a copy of the old
distfile will usually be available on the ftp servers;
otherwise the author or maintainer should be contacted to
find out why the distfile has changed.Issues Specific To Developers Who Are Not CommittersA few people who have access to the FreeBSD machines do not
have commit bits. For instance, the project is willing to give
access to the GNATS database to contributors who have shown interest
and dedication in working on Problem Reports.Almost all of this document will apply to these developers as
well (except things specific to CVS commits and the mailing list
memberships that go with them). In particular, we recommend that
you read:
Administrative Details
Conventions
You should get your mentor to add you to the
Additional Contributors
(doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml),
if you are not already listed there.
Developer Relations
SSH Quick-Start Guide
The FreeBSD Committers' Big List of Rules
Perks of the JobUnfortunately, there are not many perks involved with being a
committer. Recognition as a competent software engineer is probably
the only thing that will be of benefit in the long run. However,
there are at least some perks:Direct access to cvsup-masterAs a committer, you may apply to &a.kuriyama; for direct access
to cvsup-master.FreeBSD.org,
providing the public key output from cvpasswd
yourusername@FreeBSD.org
freefall.FreeBSD.org. Please note: you must
specify freefall.FreeBSD.org on the
cvpasswd command line even though the
actual server is cvsup-master. Access to
cvsup-master should not be overused as it is
a busy machine.A Free 4-CD Set or DVD SubscriptionFreeBSD Mall,
Inc. offers a free subscription of the 4-CD set or
the DVD product to all FreeBSD committers. Information about how
to obtain your free media is mailed to
developers@FreeBSD.org following each major
release.Miscellaneous QuestionsWhy are trivial or cosmetic changes to files on a vendor
branch a bad idea?From now on, every new vendor release of that file will
need to have patches merged in by hand.From now on, every new vendor release of that file will
need to have patches verified by hand.The option does not work very well.
Ask &a.obrien; for horror stories.How do I add a new file to a CVS branch?To add a file onto a branch, simply checkout or update
to the branch you want to add to and then add the file using
cvs add as you normally would. For
example, if you wanted to MFC the file
src/sys/alpha/include/smp.h from HEAD
to RELENG_6 and it does not exist in RELENG_6 yet, you would
use the following steps:MFC'ing a New File&prompt.user; cd sys/alpha/include
&prompt.user; cvs update -rRELENG_6
cvs update: Updating .
U clockvar.h
U console.h
...
&prompt.user; cvs update -kk -Ap smp.h > smp.h
===================================================================
Checking out smp.h
RCS: /usr/cvs/src/sys/alpha/include/smp.h,v
VERS: 1.1
***************
&prompt.user; cvs add smp.h
cvs add: scheduling file `smp.h' for addition on branch `RELENG_6'
cvs add: use 'cvs commit' to add this file permanently
&prompt.user; cvs commitWhat meta information should I include in a
commit message?As well as including an informative message with each commit
you may need to include some additional information as
well.This information consists of one or more lines containing the
key word or phrase, a colon, tabs for formatting, and then the
additional information.The key words or phrases are:PR:The problem report (if any) which is affected
(typically, by being closed) by this commit.Submitted by:The name and e-mail address of the person that
submitted the fix; for committers, just the username on
the FreeBSD cluster.Reviewed by:The name and e-mail address of the person or people
that reviewed the change; for committers, just the
username on the FreeBSD cluster. If a patch was
submitted to a mailing list for review, and the review
was favorable, then just include the list name.Approved by:The name and e-mail address of the person or people
that approved the change; for committers, just the
username on the FreeBSD cluster. It is customary to get
prior approval for a commit if it is to an area of the
tree to which you do not usually commit. In addition,
during the run up to a new release all commits
must be approved by the release
engineering team. If these are your first commits then
you should have passed them past your mentor first, and
you should list your mentor, as in
``username-of-mentor(mentor)''.
Obtained from:The name of the project (if any) from which the code
was obtained.MFC after:If you wish to receive an e-mail reminder to
MFC at a later date, specify the
number of days, weeks, or months after which an
MFC is planned.Security:If the change is related to a security
vulnerability or security exposure, include one or
more references or a description of the
issue.Commit log for a commit based on a PRYou want to commit a change based on a PR submitted by John
Smith containing a patch. The end of the commit message should
look something like this....
PR: foo/12345
Submitted by: John Smith <John.Smith@example.com>Commit log for a commit needing reviewYou want to change the virtual memory system. You have
posted patches to the appropriate mailing list (in this case,
freebsd-arch) and the changes have been
approved....
Reviewed by: -archCommit log for a commit needing approvalYou want to commit a change to a section of the tree with a
MAINTAINER assigned. You have collaborated with the listed
MAINTAINER, who has told you to go ahead and commit....
Approved by: abcWhere abc is the account name of
the person who approved.Commit log for a commit bringing in code from
OpenBSDYou want to commit some code based on work done in the
OpenBSD project....
Obtained from: OpenBSDCommit log for a change to &os.current; with a planned
commit to &os.stable; to follow at a later date.You want to commit some code which will be merged from
&os.current; into the &os.stable; branch after two
weeks....
MFC after: 2 weeksWhere 2 is the number of days,
weeks, or months after which an MFC is
planned. The weeks option may be
day, days,
week, weeks,
month, months,
or may be left off (in which case, days will be assumed).In some cases you may need to combine some of these.Consider the situation where a user has submitted a PR
containing code from the NetBSD project. You are looking at the
PR, but it is not an area of the tree you normally work in, so
you have decided to get the change reviewed by the
arch mailing list. Since the change is
complex, you opt to MFC after one month to
allow adequate testing.The extra information to include in the commit would look
something likePR: foo/54321
Submitted by: John Smith <John.Smith@example.com>
Reviewed by: -arch
Obtained from: NetBSD
MFC after: 1 monthHow do I access people.FreeBSD.org to put up personal
or project information?people.FreeBSD.org is the
same as freefall.FreeBSD.org. Just create a
public_html directory. Anything you
place in that directory will automatically be visible
under .Where are the mailing list archives stored?The mailing lists are archived under /g/mail
which will show up as /hub/g/mail with &man.pwd.1;.
This location is accessible from any machine on the FreeBSD cluster.I would like to mentor a new committer. What process
do I need to follow?See the New
Account Creation Procedure document on the internal
pages.
diff --git a/en_US.ISO8859-1/articles/releng/article.sgml b/en_US.ISO8859-1/articles/releng/article.sgml
index 90118af44f..b57587c56f 100644
--- a/en_US.ISO8859-1/articles/releng/article.sgml
+++ b/en_US.ISO8859-1/articles/releng/article.sgml
@@ -1,1148 +1,1148 @@
%articles.ent;
The Release Engineering of Third Party Packages'>
]>
FreeBSD Release EngineeringNovember 2001BSDCon EuropeMurrayStokelyI've been involved in the development of FreeBSD based products
since 1997 at Walnut Creek CDROM, BSDi, and now Wind River Systems.
FreeBSD 4.4 was the first official release of FreeBSD that I played
a significant part in.murray@FreeBSD.org$FreeBSD$
&tm-attrib.freebsd;
&tm-attrib.cvsup;
&tm-attrib.intel;
&tm-attrib.xfree86;
&tm-attrib.general;
This paper describes the approach used by the FreeBSD
release engineering team to make production quality releases
of the FreeBSD Operating System. It details the methodology
used for the official FreeBSD releases and describes the tools
available for those interested in producing customized FreeBSD
releases for corporate rollouts or commercial
productization.IntroductionThe development of FreeBSD is a very open process. FreeBSD is
comprised of contributions from thousands of people around the
world. The FreeBSD Project provides anonymous
CVS[1] access to the general public so that
others can have access to log messages, diffs (patches) between
development branches, and other productivity enhancements that
formal source code management provides. This has been a huge help
in attracting more talented developers to FreeBSD. However, I
think everyone would agree that chaos would soon manifest if write
access was opened up to everyone on the Internet. Therefore only
a select group of nearly 300 people are given write
access to the CVS repository. These
committers[5] are responsible for the bulk of
FreeBSD development. An elected core-team[6]
of very senior developers provides some level of direction over
the project.The rapid pace of FreeBSD development leaves little time
for polishing the development system into a production quality
release. To solve this dilemma, development continues on two
parallel tracks. The main development branch is the
HEAD or trunk of our CVS
tree, known as FreeBSD-CURRENT or
-CURRENT for short.A more stable branch is maintained, known as
FreeBSD-STABLE or -STABLE for short.
Both branches live in a master CVS repository in California and
are replicated via CVSup[2] to mirrors all over the
world. FreeBSD-CURRENT[7] is the bleeding-edge of
FreeBSD development where all new changes first enter the system.
FreeBSD-STABLE is the development branch from which major releases
are made. Changes go into this branch at a different pace, and
with the general assumption that they have first gone into
FreeBSD-CURRENT and have been thoroughly tested by our user
community.In the interim period between releases, monthly snapshots are
built automatically by the FreeBSD Project build machines and made
available for download from ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/.
The widespread availability of binary release snapshots, and the
tendency of our user community to keep up with -STABLE development
with CVSup and makeworld[7] helps to keep
FreeBSD-STABLE in a very reliable condition even before the
quality assurance activities ramp up pending a major
release.Bug reports and feature requests are continuously submitted by
users throughout the release cycle. Problems reports are entered into our
GNATS[8] database
through email, the &man.send-pr.1; application, or via the web
interface provided at .
In addition to the multitude of different technical mailing lists
about FreeBSD, the &a.qa; provides a forum for discussing the finer
points of release-polishing.To service our most conservative users, individual release
branches were introduced with FreeBSD 4.3.
These release branches are created shortly before a final release
is made. After the release goes out, only the most critical
security fixes and additions are merged onto the release branch.
In addition to source updates via CVS, binary patchkits are
available to keep systems on the
RELENG_X_Y
branches updated.What this article describesThe following sections of this article describe:The different phases of the release engineering process
leading up to the actual system build.The actual build process.How the base release may be extended by third parties.Some of the lessons learned through the release of &os; 4.4.Future directions of development.Release ProcessNew releases of FreeBSD are released from the -STABLE branch
at approximately four month intervals. The FreeBSD release
process begins to ramp up 45 days before the anticipated release
date when the release engineer sends an email to the development
mailing lists to remind developers that they only have 15 days to
integrate new changes before the code freeze. During this time,
many developers perform what have become known as MFC
sweeps. MFC stands for Merge
From CURRENT and it describes the process of merging a
tested change from our -CURRENT development branch to our -STABLE
branch.Code ReviewThirty days before the anticipated release, the source
repository enters a code slush. During this
time, all commits to the -STABLE branch must be approved by the
&a.re;. The kinds of changes that are allowed during this 15 day
period include:Bug fixes.Documentation updates.Security-related fixes of any kind.Minor changes to device drivers, such as adding new Device
IDs.Any additional change that the release engineering team feels
is justified, given the potential risk.After the first 15 days of the code slush, a
release candidate is released for
widespread testing and the code enters a code
freeze where it becomes much harder to justify new
changes to the system unless a serious bug-fix or security issue
is involved. During the code freeze, at least one release
candidate is released per week, until the final release is
ready. During the days leading to the final release, the
release engineering team is in constant communication with the
security-officer team, the documentation maintainers, and the
port maintainers, to ensure that all of the
different components required for a successful release are
available.Final Release ChecklistWhen several release candidates have been made available for
widespread testing and all major issues have been resolved, the
final release polishing can begin.Creating the Release BranchAs described in the introduction, the
RELENG_X_Y
release branch is a relatively new addition to our release
engineering
methodology. The first step in creating this branch is to
ensure that you are working with the newest version of the
RELENG_X sources
that you want to branch from./usr/src&prompt.root; cvs update -rRELENG_4 -P -dThe next step is to create a branch point
tag, so that diffs against the start of
the branch are easier with CVS:/usr/src&prompt.root; cvs rtag -rRELENG_4 RELENG_4_8_BP srcAnd then a new branch tag is created with:/usr/src&prompt.root; cvs rtag -b -rRELENG_4_8_BP RELENG_4_8 srcThe
RELENG_* tags
are restricted for use by the CVS-meisters and release
engineers.A tag is CVS
vernacular for a label that identifies the source at a specific point
in time. By tagging the tree, we ensure that future release builders
will always be able to use the same source we used to create the
official FreeBSD Project releases.FreeBSD Development BranchFreeBSD 3.x STABLE BranchFreeBSD 4.x STABLE BranchFreeBSD 5.x STABLE BranchFreeBSD 6.x STABLE BranchBumping up the Version NumberBefore the final release can be tagged, built, and
released, the following files need to be modified to reflect
the correct version of FreeBSD:doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.sgml
doc/en_US.ISO8859-1/books/porters-handbook/book.sgml
doc/share/sgml/freebsd.entsrc/Makefile.inc1src/UPDATINGsrc/gnu/usr.bin/groff/tmac/mdoc.localsrc/release/Makefilesrc/release/doc/en_US.ISO8859-1/share/sgml/release.dslsrc/release/doc/share/examples/Makefile.relnotesngsrc/release/doc/share/sgml/release.entsrc/share/examples/cvsup/standard-supfilesrc/sys/conf/newvers.shsrc/sys/sys/param.hsrc/usr.sbin/pkg_install/add/main.cwww/en/docs/man.sgmlwww/en/cgi/ports.cgiports/Tools/scripts/release/configThe release notes and errata files also need to be adjusted for the
new release (on the release branch) and truncated appropriately
(on the stable/current branch):src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml
src/release/doc/en_US.ISO8859-1/errata/article.sgml
Sysinstall should be updated to note
the number of available ports and the amount of disk space required
for the Ports Collection[4]. This information is currently kept in
src/usr.sbin/sysinstall/dist.c.After the release has been built, a number of file should
be updated to announce the release to the world.doc/share/images/articles/releng/branches-relengX.picwww/share/sgml/advisories.xmlwww/share/sgml/includes.release.sgmlwww/share/sgml/includes.release.xslwww/en/releases/*www/en/releng/index.sgmlwww/en/news/news.xmlwww/en/search/web.atozsrc/share/misc/bsd-family-treePreparing a new major release branch
(RELENG_X)When a new major release branch, such as
RELENG_6 is branched from HEAD, some
additional files must be updated before releases can be made
from this new branch.src/share/examples/cvsup/stable-supfile
- must be updated to point to the new -STABLE branch, when
applicable.Creating Release TagsWhen the final release is ready, the following command
will create the RELENG_4_8_0_RELEASE
tag./usr/src&prompt.root; cvs rtag -rRELENG_4_8 RELENG_4_8_0_RELEASE srcThe Documentation and Ports managers are responsible for
tagging the respective trees with the RELEASE_4_8_0
tag.Occasionally, a last minute fix may be required
after the final tags have been created.
In practice this is not a problem, since CVS
allows tags to be manipulated with cvs
tag -d tagname filename.
It is very important that any last minute changes be tagged
appropriately as part of the release. FreeBSD releases must
always be reproducible. Local hacks in the release
engineer's environment are not acceptable.Release BuildingFreeBSD releases can be built by anyone with a
fast machine and access to a source repository. (That should be
everyone, since we offer anonymous CVS! See The Handbook for
details.) The only special requirement is
that the &man.vn.4; device must be available. (On -CURRENT, this
device has been replaced by the new &man.md.4;
memory disk driver.) If the
device is not loaded into your kernel, then the kernel module
should be automatically loaded when &man.vnconfig.8; is executed
during the boot media creation phase. All of the tools necessary
to build a release are available from the CVS repository in
src/release. These tools aim to provide a
consistent way to build FreeBSD releases. A complete release can
actually be built with only a single command, including the
creation of ISO images suitable for burning to
CDROM, installation floppies, and an FTP install directory. This
command is aptly named make
release.make releaseTo successfully build a release, you must first populate
/usr/obj by running make
world or simply
make
buildworld. The release
target requires several variables be set properly to build a
release:CHROOTDIR - The directory to be used as the
chroot environment for the entire release build.BUILDNAME - The name of the release to be
built.CVSROOT - The location of a CVS Repository.
RELEASETAG - The CVS tag corresponding to the
release you would like to build.If you do not already have access to a local CVS
repository, then you may mirror one with CVSup.
The supplied supfile,
/usr/share/examples/cvsup/cvs-supfile, is
a useful starting point for mirroring the CVS
repository.If RELEASETAG is omitted, then the
release will be built from the HEAD (a.k.a. -CURRENT) branch.
Releases built from this branch are normally referred to as
-CURRENT snapshots.There are many other variables available to customize the
release build. Most of these variables are documented at the
top of src/release/Makefile. The exact
command used to build the official FreeBSD 4.7 (x86) release
was:make release CHROOTDIR=/local3/release \
BUILDNAME=4.7-RELEASE \
CVSROOT=/host/cvs/usr/home/ncvs \
RELEASETAG=RELENG_4_7_0_RELEASEThe release Makefile can be broken down into several distinct
steps.Creation of a sanitized system environment in a separate
directory hierarchy with make
installworld.
Checkout from CVS of a clean version of the system source,
documentation, and ports into the release build hierarchy.Population of /etc and
/dev in the chrooted
environment.chroot into the release build hierarchy, to make it harder for
the outside environment to taint this build.make world
in the chrooted environment.Build of Kerberos-related binaries.Build GENERIC kernel.Creation of a staging directory tree where the binary
distributions will be built and packaged.Build and installation of the documentation toolchain needed to
convert the documentation source (SGML) into HTML and text documents
that will accompany the release.Build and installation of the actual documentation
(user manuals, tutorials, release notes, hardware compatibility lists,
and so on.)Build of the crunched binaries used for
installation floppies.Package up distribution tarballs of the binaries and sources.
Create the boot media and a fixit floppy.Create FTP installation hierarchy.(optionally) Create ISO images for
CDROM/DVD media.For more information about the release build infrastructure,
please see &man.release.7;.Building &xfree86;&xfree86; is an important component for many desktop users.
Prior to FreeBSD 4.6-RELEASE, releases used &xfree86;
3.X by default.
The easiest way to build these versions is to use the
src/release/scripts/X11/build_x.sh script.
This script requires that &xfree86; and Tcl/Tk already be
installed on the build host. After compiling the necessary X
servers, the script will package all of the files into tarballs
that &man.sysinstall.8; expects to find in the
XF86336 directory of the installation
media.Beginning with FreeBSD 4.6-RELEASE, &man.sysinstall.8;
installs &xfree86; 4.X by default, as a
set of normal packages. These can either be the
packages generated by the package-building cluster or packages
built from an appropriately tagged ports tree.Beginning with FreeBSD 5.3-RELEASE, &man.sysinstall.8;
installs &xorg; packages instead of &xfree86; packages by
default.It is important to remove any site-specific settings
from /etc/make.conf. For example, it would
be unwise to distribute binaries that were built on a system
with CPUTYPE set to a specific
processor.Contributed Software (ports)The FreeBSD Ports
collection is a collection of over &os.numports;
third-party software packages available for FreeBSD. The &a.portmgr;
is responsible for maintaining a consistent ports tree that can be used
to create the binary packages that accompany official FreeBSD
releases.The release engineering activities for our collection of
third-party packages is beyond the scope of this document. A
separate article, &art.re.pkgs;, covers this topic
in depth.Release ISOsStarting with FreeBSD 4.4, the FreeBSD Project decided to
release all four ISO images that were previously sold on the
BSDi/Wind River Systems/FreeBSD Mallofficial CDROM distributions. Each of the four
discs must contain a README.TXT file that
explains the contents of the disc, a
CDROM.INF file that provides meta-data for
the disc so that &man.sysinstall.8; can validate and use the
contents, and a filename.txt file that
provides a manifest for the disc. This
manifest can be created with a simple
command:/stage/cdrom&prompt.root; find . -type f | sed -e 's/^\.\///' | sort > filename.txtThe specific requirements of each CD are outlined below.Disc 1The first disc is almost completely created by
make
release. The only changes
that should be made to the disc1 directory are the addition of
a tools directory, &xfree86;, and as many popular
third party software packages as will fit on the disc. The
tools directory contains software that allow users to create
installation floppies from other operating systems. This disc
should be made bootable so that users of modern PCs do not
need to create installation floppy disks.If an alternate version of &xfree86; is to be provided, then
&man.sysinstall.8; must be updated to reflect the new location
and installation instructions. The relevant code is contained
in src/usr.sbin/sysinstall.
Specifically, the files dist.c,
menus.c, and
config.c will need to be updated.Disc 2The second disc is also largely created by make
release. This disc contains a live
filesystem that can be used from &man.sysinstall.8; to
troubleshoot a FreeBSD installation. This disc should be
bootable and should also contain a compressed copy of the CVS
repository in the CVSROOT directory and
commercial software demos in the commerce
directory.Discs 3 and 4The remaining two discs contain additional software
packages for FreeBSD. The packages should be clustered so that
a package and all of its dependencies are
included on the same disc. More information about the
creation of these discs is provided in the &art.re.pkgs;
article.Multi-volume supportSysinstall supports multiple
volume package installations. This requires that each disc
have an INDEX file containing all of the
packages on all volumes of a set, along with an extra field
that indicates which volume that particular package is on.
Each volume in the set must also have the
CD_VOLUME variable set in the
cdrom.inf file so that sysinstall can
tell which volume is which. When a user attempts to install a
package that is not on the current disc, sysinstall will
prompt the user to insert the appropriate one.DistributionFTP SitesWhen the release has been thoroughly tested and packaged for
distribution, the master FTP site must be updated. The official
FreeBSD public FTP sites are all mirrors of a master server that
is open only to other FTP sites. This site is known as
ftp-master. When the release is ready, the
following files must be modified on ftp-master:/pub/FreeBSD/releases/arch/X.Y-RELEASE/The installable FTP directory as output from make
release./pub/FreeBSD/ports/arch/packages-X.Y-release/The complete package build for this
release./pub/FreeBSD/releases/arch/X.Y-RELEASE/toolsA symlink to
../../../tools./pub/FreeBSD/releases/arch/X.Y-RELEASE/packagesA symlink to
../../../ports/arch/packages-X.Y-release./pub/FreeBSD/releases/arch/ISO-IMAGES/X.Y/X.Y-RELEASE-arch-*.isoThe ISO images. The * is
disc1, disc2, etc.
Only if there is a disc1 and there is an
alternative first installation CD (for example a
stripped-down install with no windowing system) there may
be a mini as well.For more information about the distribution mirror
architecture of the FreeBSD FTP sites, please see the Mirroring FreeBSD article.It may take many hours to two days after updating
ftp-master before a majority of the Tier-1 FTP
sites have the new software depending on whether or not a package
set got loaded at the same time. It is imperative that the release
engineers coordinate with the &a.mirror-announce; before announcing the general
availability of new software on the FTP sites. Ideally
the release package set should be loaded at least four
days prior to release day. The release bits should be
loaded between 24 and 48 hours before the planned release
time with other file permissions turned off.
This will allow the mirror sites to download it but the
general public will not be able to download it from the mirror
sites. Mail should be sent to &a.mirror-announce; at the time
the release bits get posted saying the release has been staged
and giving the time that the mirror sites should begin allowing
access. Be sure to include a time zone with the
time, for example make it relative to GMT.CD-ROM ReplicationComing soon: Tips for sending FreeBSD ISOs to a replicator
and quality assurance measures to be taken.ExtensibilityAlthough FreeBSD forms a complete operating system, there is
nothing that forces you to use the system exactly as we have
packaged it up for distribution. We have tried to design the
system to be as extensible as possible so that it can serve as a
platform that other commercial products can be built on top
of. The only rule we have about this is that if you
are going to distribute FreeBSD with non-trivial changes, we
encourage you to document your enhancements! The FreeBSD community
can only help support users of the software we provide. We
certainly encourage innovation in the form of advanced
installation and administration tools, for example, but we cannot
be expected to answer questions about it.Creating Customized Boot floppiesMany sites have complex requirements that may require
additional kernel modules or userland tools be added to the
installation floppies. The quick and dirty way
to accomplish this would be to modify the staging directory of
an existing make release build hierarchy:Apply patches or add additional files inside the chroot
release build directory.rm
${CHROOTDIR}/usr/obj/usr/src/release/release.[59]rebuild &man.sysinstall.8;, the kernel, or whatever
parts of the system your change affected.chroot ${CHROOTDIR} ./mk floppies
New release floppies will be located in
${CHROOTDIR}/R/stage/floppies.Alternatively, the
boot.flp make
target can be called, or the filesystem
creating script,
src/release/scripts/doFS.sh, may be invoked
directly.Local patches may also be supplied to the release build by
defining the LOCAL_PATCH variable in make
release.
Scripting sysinstallThe FreeBSD system installation and configuration tool,
&man.sysinstall.8;, can be scripted to provide automated installs
for large sites. This functionality can be used in conjunction
with &intel; PXE[12] to bootstrap systems from the network, or
via custom boot floppies with a sysinstall script. An example
sysinstall script is available in the CVS tree as
src/usr.sbin/sysinstall/install.cfg.Lessons Learned from FreeBSD 4.4The release engineering process for 4.4 formally began on
August 1st, 2001. After that date all commits to the
RELENG_4 branch of FreeBSD had to be explicitly
approved by the &a.re;. The first
release candidate for the x86 architecture was released on August
16, followed by 4 more release candidates leading up to the final
release on September 18th. The security officer was very involved
in the last week of the process as several security issues were
found in the earlier release candidates. A total of over
500 emails were sent to the &a.re; in
little over a month.Our user community has made it very clear that the security
and stability of a FreeBSD release should not be sacrificed for
any self-imposed deadlines or target release dates. The FreeBSD
Project has grown tremendously over its lifetime and the need for
standardized release engineering procedures has never been more
apparent. This will become even more important as FreeBSD is
ported to new platforms.Future DirectionsIt is imperative for our release engineering activities to
scale with our growing userbase. Along these lines we are working
very hard to document the procedures involved in producing FreeBSD
releases.Parallelism - Certain portions of the
release build are actually embarrassingly
parallel. Most of the tasks are very I/O intensive,
so having multiple high-speed disk drives is actually more important than
using multiple processors in speeding up the make
release process. If multiple disks are used for
different hierarchies in the &man.chroot.2;
environment, then the CVS checkout of the ports and doc trees
can be happening simultaneously as the make
world on another disk. Using a
RAID solution (hardware or software) can
significantly decrease the overall build time.Cross-building releases - Building
IA-64 or Alpha release on x86 hardware? make
TARGET=ia64 release.
Regression Testing - We need better
automated correctness testing for FreeBSD.Installation Tools - Our installation
program has long since outlived its intended life span.
Several projects are under development to provide a more
advanced installation mechanism. The libh project was one
such project that aimed to provide an intelligent new package
framework and GUI installation program.AcknowledgementsI would like to thank Jordan Hubbard for giving me the
opportunity to take on some of the release engineering
responsibilities for FreeBSD 4.4 and also for all of his work
throughout the years making FreeBSD what it is today. Of course
the release would not have been possible without all of the
release-related work done by &a.asami;, &a.steve;, &a.bmah;, &a.nik;,
&a.obrien;, &a.kris;, &a.jhb; and the rest of the FreeBSD development
community. I would also like to thank &a.rgrimes;, &a.phk;, and others
who worked on the release engineering tools in the very early days
of FreeBSD. This article was influenced by release engineering
documents from the CSRG[13], the NetBSD Project[10], and John
Baldwin's proposed release engineering process notes[11].References[1] CVS - Concurrent Versions System
[2] CVSup - The CVS-Optimized General Purpose Network File Distribution
System [3] [4] FreeBSD Ports Collection
[5] FreeBSD Committers
- [6] FreeBSD Core-Team
-
+ [6] FreeBSD Core Team
+ [7] FreeBSD Handbook
[8] GNATS: The GNU Bug Tracking System
[9] FreeBSD PR Statistics
[10] NetBSD Developer Documentation: Release Engineering
[11] John Baldwin's FreeBSD Release Engineering Proposal
[12] PXE Jumpstart Guide
[13] Marshall Kirk McKusick, Michael J. Karels, and Keith Bostic:
The Release Engineering of 4.3BSD
diff --git a/en_US.ISO8859-1/books/developers-handbook/policies/chapter.sgml b/en_US.ISO8859-1/books/developers-handbook/policies/chapter.sgml
index 2435a91490..6e5a2ab116 100644
--- a/en_US.ISO8859-1/books/developers-handbook/policies/chapter.sgml
+++ b/en_US.ISO8859-1/books/developers-handbook/policies/chapter.sgml
@@ -1,433 +1,433 @@
Poul-HenningKampContributed by Source Tree Guidelines and PoliciesThis chapter documents various guidelines and policies in force for
the FreeBSD source tree.MAINTAINER on Makefilesports maintainerIf a particular portion of the FreeBSD distribution is being
maintained by a person or group of persons, they can communicate this
fact to the world by adding a
MAINTAINER= email-addresses
line to the Makefiles covering this portion of the
source tree.The semantics of this are as follows:The maintainer owns and is responsible for that code. This means
that he is responsible for fixing bugs and answering problem reports
pertaining to that piece of the code, and in the case of contributed
software, for tracking new versions, as appropriate.Changes to directories which have a maintainer defined shall be sent
to the maintainer for review before being committed. Only if the
maintainer does not respond for an unacceptable period of time, to
several emails, will it be acceptable to commit changes without review
by the maintainer. However, it is suggested that you try to have the
changes reviewed by someone else if at all possible.It is of course not acceptable to add a person or group as
maintainer unless they agree to assume this duty. On the other hand it
does not have to be a committer and it can easily be a group of
people.Poul-HenningKampContributed by DavidO'BrienContributed Softwarecontributed softwareSome parts of the FreeBSD distribution consist of software that is
actively being maintained outside the FreeBSD project. For historical
reasons, we call this contributed software. Some
examples are sendmail, gcc and patch.Over the last couple of years, various methods have been used in
dealing with this type of software and all have some number of
advantages and drawbacks. No clear winner has emerged.Since this is the case, after some debate one of these methods has
been selected as the official method and will be required
for future imports of software of this kind. Furthermore, it is
strongly suggested that existing contributed software converge on this
model over time, as it has significant advantages over the old method,
including the ability to easily obtain diffs relative to the
official versions of the source by everyone (even without
cvs access). This will make it significantly easier to return changes
to the primary developers of the contributed software.Ultimately, however, it comes down to the people actually doing the
work. If using this model is particularly unsuited to the package being
dealt with, exceptions to these rules may be granted only with the
approval of the core team and with the general consensus of the other
developers. The ability to maintain the package in the future will be a
key issue in the decisions.Because of some unfortunate design limitations with the RCS file
format and CVS's use of vendor branches, minor, trivial and/or
cosmetic changes are strongly discouraged on
files that are still tracking the vendor branch. Spelling
fixes are explicitly included here under the
cosmetic category and are to be avoided for files with
revision 1.1.x.x. The repository bloat impact from a single character
change can be rather dramatic.The Tcl embedded programming
language will be used as example of how this model works:src/contrib/tcl contains the source as
distributed by the maintainers of this package. Parts that are entirely
not applicable for FreeBSD can be removed. In the case of Tcl, the
mac, win and
compat subdirectories were eliminated before the
import.src/lib/libtcl contains only a bmake style
Makefile that uses the standard
bsd.lib.mk makefile rules to produce the library
and install the documentation.src/usr.bin/tclsh contains only a bmake style
Makefile which will produce and install the
tclsh program and its associated man-pages using the
standard bsd.prog.mk rules.src/tools/tools/tcl_bmake contains a couple of
shell-scripts that can be of help when the tcl software needs updating.
These are not part of the built or installed software.The important thing here is that the
src/contrib/tcl directory is created according to
the rules: it is supposed to contain the sources as distributed (on a
proper CVS vendor-branch and without RCS keyword expansion) with as few
FreeBSD-specific changes as possible. If there are any doubts on
how to go about it, it is imperative that you ask first and not blunder
ahead and hope it works out. CVS is not forgiving of
import accidents and a fair amount of effort is required to back out
major mistakes.Because of the previously mentioned design limitations with CVS's
vendor branches, it is required that official patches from
the vendor be applied to the original distributed sources and the result
re-imported onto the vendor branch again. Official patches should never
be patched into the FreeBSD checked out version and committed, as this
destroys the vendor branch coherency and makes importing future versions
rather difficult as there will be conflicts.Since many packages contain files that are meant for compatibility
with other architectures and environments than FreeBSD, it is
permissible to remove parts of the distribution tree that are of no
interest to FreeBSD in order to save space. Files containing copyright
notices and release-note kind of information applicable to the remaining
files shall not be removed.If it seems easier, the bmakeMakefiles can be produced from the dist tree
automatically by some utility, something which would hopefully make it
even easier to upgrade to a new version. If this is done, be sure to
check in such utilities (as necessary) in the
src/tools directory along with the port itself so
that it is available to future maintainers.In the src/contrib/tcl level directory, a file
called FREEBSD-upgrade should be added and it
should state things like:Which files have been left out.Where the original distribution was obtained from and/or the
official master site.Where to send patches back to the original authors.Perhaps an overview of the FreeBSD-specific changes that have
been made.However, please do not import FREEBSD-upgrade
with the contributed source. Rather you should cvs add
FREEBSD-upgrade ; cvs ci after the initial import. Example
wording from src/contrib/cpio is below:This directory contains virgin sources of the original distribution files
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
the files in this directory via patches and a cvs commit. New versions or
official-patch versions must be imported. Please remember to import with
"-ko" to prevent CVS from corrupting any vendor RCS Ids.
For the import of GNU cpio 2.4.2, the following files were removed:
INSTALL cpio.info mkdir.c
Makefile.in cpio.texi mkinstalldirs
To upgrade to a newer version of cpio, when it is available:
1. Unpack the new version into an empty directory.
[Do not make ANY changes to the files.]
2. Remove the files listed above and any others that don't apply to
FreeBSD.
3. Use the command:
cvs import -ko -m 'Virgin import of GNU cpio v<version>' \
src/contrib/cpio GNU cpio_<version>
For example, to do the import of version 2.4.2, I typed:
cvs import -ko -m 'Virgin import of GNU v2.4.2' \
src/contrib/cpio GNU cpio_2_4_2
4. Follow the instructions printed out in step 3 to resolve any
conflicts between local FreeBSD changes and the newer version.
Do not, under any circumstances, deviate from this procedure.
To make local changes to cpio, simply patch and commit to the main
branch (aka HEAD). Never make local changes on the GNU branch.
All local changes should be submitted to "cpio@gnu.ai.mit.edu" for
inclusion in the next vendor release.
obrien@FreeBSD.org - 30 March 1997Encumbered FilesIt might occasionally be necessary to include an encumbered file in
the FreeBSD source tree. For example, if a device requires a small
piece of binary code to be loaded to it before the device will operate,
and we do not have the source to that code, then the binary file is said
to be encumbered. The following policies apply to including encumbered
files in the FreeBSD source tree.Any file which is interpreted or executed by the system CPU(s)
and not in source format is encumbered.Any file with a license more restrictive than BSD or GNU is
encumbered.A file which contains downloadable binary data for use by the
hardware is not encumbered, unless (1) or (2) apply to it. It must
be stored in an architecture neutral ASCII format (file2c or
uuencoding is recommended).Any encumbered file requires specific approval from the
- Core team before it is added to the
+ Core Team before it is added to the
CVS repository.Encumbered files go in src/contrib or
src/sys/contrib.The entire module should be kept together. There is no point in
splitting it, unless there is code-sharing with non-encumbered
code.Object files are named
arch/filename.o.uu>.Kernel files:Should always be referenced in
conf/files.* (for build simplicity).Should always be in LINT, but the
- Core team decides per case if it
+ Core Team decides per case if it
should be commented out or not. The
- Core team can, of course, change
+ Core Team can, of course, change
their minds later on.The Release Engineer
decides whether or not it goes into the release.User-land files:core team
- The Core team decides if
+ The Core team decides if
the code should be part of make world.
- release engineer
- The Release Engineer
+ release engineering
+ The Release Engineering
decides if it goes into the release.SatoshiAsamiContributed by PeterWemmDavidO'BrienShared LibrariesIf you are adding shared library support to a port or other piece of
software that does not have one, the version numbers should follow these
rules. Generally, the resulting numbers will have nothing to do with
the release version of the software.The three principles of shared library building are:Start from 1.0If there is a change that is backwards compatible, bump minor
number (note that ELF systems ignore the minor number)If there is an incompatible change, bump major numberFor instance, added functions and bugfixes result in the minor
version number being bumped, while deleted functions, changed function
call syntax, etc. will force the major version number to change.Stick to version numbers of the form major.minor
(x.y). Our a.out
dynamic linker does not handle version numbers of the form
x.y.z
well. Any version number after the y
(i.e. the third digit) is totally ignored when comparing shared lib
version numbers to decide which library to link with. Given two shared
libraries that differ only in the micro revision,
ld.so will link with the higher one. That is, if you link
with libfoo.so.3.3.3, the linker only records
3.3 in the headers, and will link with anything
starting with
libfoo.so.3.(anything >=
3).(highest
available).ld.so will always use the highest
minor revision. For instance, it will use
libc.so.2.2 in preference to
libc.so.2.0, even if the program was initially
linked with libc.so.2.0.In addition, our ELF dynamic linker does not handle minor version
numbers at all. However, one should still specify a major and minor
version number as our Makefiles do the right thing
based on the type of system.For non-port libraries, it is also our policy to change the shared
library version number only once between releases. In addition, it is
our policy to change the major shared library version number only once
between major OS releases (i.e. from 3.0 to 4.0). When you make a
change to a system library that requires the version number to be
bumped, check the Makefile's commit logs. It is the
responsibility of the committer to ensure that the first such change
since the release will result in the shared library version number in
the Makefile to be updated, and any subsequent
changes will not.