Committer's Guide

$FreeBSD: doc/en_US.ISO8859-1/articles/committers-guide/article.sgml,v 1.249 2006/10/09 19:28:30 joel Exp $

FreeBSD is a registered trademark of the FreeBSD Foundation.

CVSup is a registered trademark of John D. Polstra.

IBM, AIX, EtherJet, Netfinity, OS/2, PowerPC, PS/2, S/390, and ThinkPad are trademarks of International Business Machines Corporation in the United States, other countries, or both.

Intel, Celeron, EtherExpress, i386, i486, Itanium, Pentium, and Xeon are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

Sparc, Sparc64, SPARCEngine, and UltraSPARC are trademarks of SPARC International, Inc in the United States and other countries. Products bearing SPARC trademarks are based upon architecture developed by Sun Microsystems, Inc.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the FreeBSD Project was aware of the trademark claim, the designations have been followed by the “™” or the “®” symbol.

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.

Table of Contents
1 Administrative Details
2 Commit Bit Types
3 CVS Operations
4 Conventions and Traditions
5 Preferred License for New Files
6 Developer Relations
8 Who's Who
9 SSH Quick-Start Guide
10 The FreeBSD Committers' Big List of Rules
11 Support for Multiple Architectures
12 Ports Specific FAQ
13 Perks of the Job
14 Miscellaneous Questions

1 Administrative Details

Main Repository Host
Login Methods ssh(1), protocol 2 only
Main CVSROOT (although also see Section 3).
Main CVS Repository Meisters Peter Wemm and Mark Murray , as well as Josef Karthauser and Joe Marcus Clarke for ports/
Mailing Lists FreeBSD doc/ developers mailing list, FreeBSD doc/ committer's mailing list; FreeBSD ports/ developers mailing list, FreeBSD ports/ committer's mailing list; FreeBSD src/ developers mailing list, FreeBSD src/ committer's mailing list. (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 cluster.)
Core Team monthly reports /home/core/public/monthly-report on the cluster.

It is required that you use ssh(1) or telnet(1) with Kerberos 5 to connect to the project hosts. For ssh(1) only protocol 2 is allowed. These are generally more secure than plain telnet(1) or rlogin(1) since credential negotiation will always be encrypted. All traffic is encrypted by default with ssh(1). With utilities like ssh-agent(1) and scp(1) also available, ssh(1) is also far more convenient. If you do not know anything about ssh(1), please see Section 9.

2 Commit Bit Types

The 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 Type Responsible Tree Components
src core@ src/, doc/ subject to appropriate review
doc doceng@ doc/, www/, src/ documentation
ports portmgr@ 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.

2.1 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".

3 CVS Operations

It is assumed that you are already familiar with the basic operation of CVS.

The CVS Repository Meisters 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 CVS Repository Meisters , 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 CVS Repository Meisters . Please do not contact the CVS Repository Meisters 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.

Note: 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 repository

  • pcvs@ - regarding /home/pcvs, the ports repository

  • dcvs@ - regarding /home/dcvs, the doc repository

  • projcvs@ - regarding /home/projcvs, the third party projects repository

The 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: 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,, 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.

Table 1. FreeBSD CVS Repositories, Hosts and Directories

Repository Host Directory
doc /home/dcvs
ports /home/pcvs
projects /home/projcvs
src /home/ncvs

CVS operations are done remotely by setting the CVSROOT environment variable to the appropriate host and top-level directory (for example,, 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 tcsh(1) user may add the following to their .cshrc for this purpose:

alias dcvs cvs -d
alias pcvs cvs -d
alias projcvs cvs -d
alias scvs cvs -d

This 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 cvs(1) manual page for usage.

Note: 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. Jun Kuriyama is in charge of cvsup-master.

If you need to use CVS add and delete operations in a manner that is effectively a 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.

Dag-Erling C. Smørgrav also supplied the following “mini primer” for CVS.

  1. Check out a module with the co or checkout command.

    % cvs checkout shazam

    This 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.

    Table 2. Useful cvs checkout options

    -P Do not create empty directories
    -l Check out a single level, no subdirectories
    -rrev Check out revision, branch or tag rev
    -Ddate Check out the sources as they were on date date

    Practical FreeBSD examples:

    • Check out the miscfs module, which corresponds to src/sys/miscfs:

      % cvs co miscfs

      You 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:

      % cvs co src/sys/miscfs

      You 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:

      % cvs co -P miscfs

      You 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:

      % cvs co -l miscfs

      You 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:

      % cvs co -rRELENG_6 miscfs

      You can modify the sources and commit along this branch.

    • Check out the miscfs module as it was in 6.0-RELEASE.

      % cvs co -rRELENG_6_0_0_RELEASE miscfs

      You 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.

      % cvs co -D'01/15/2000' miscfs

      You will not be able to commit modifications.

    • Check out the miscfs module as it was one week ago.

      % cvs co -D'last week' miscfs

      You will not be able to commit modifications.

    Note that cvs stores metadata in subdirectories named CVS.

    Arguments to -D and -r are sticky, which means cvs will remember them later, e.g. when you do a cvs update.

  2. Check the status of checked-out files with the status command.

    % cvs status shazam

    This 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-date File is up-to-date and unmodified.
    Needs Patch File is unmodified, but there is a newer revision in the repository.
    Locally Modified File is up-to-date, but modified.
    Needs Merge File is modified, and there is a newer revision in the repository.
    File had conflicts on merge There 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.

  3. Once you have checked something out, you can update it with the update command.

    % cvs update shazam

    This 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:

    -d Check out any additional missing directories.
    -A Update to head of main branch.
    -jrev More magic (see below).

    If you checked out a module with -r or -D, running cvs update with a different -r or -D argument or with -A will select a new branch, revision or date. The -A option clears all sticky tags, dates or revisions whereas -r and -D set new ones.

    Theoretically, specifying HEAD as the argument to -r will give you the same result as -A, but that is just theory.

    The -d option is useful if:

    • somebody has added subdirectories to the module you have checked out after you checked it out.

    • you checked out with -l, 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:

    U The file was updated without trouble.
    P The file was updated without trouble (you will only see this when working against a remote repository).
    M The file had been modified, and was merged without conflicts.
    C The 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 -j option is slightly voodoo. It updates the local file to the specified revision as if you used -r, 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 FreeBSD-CURRENT and later want to MFC it. The change you want to MFC was revision 1.15:

    • Check out the FreeBSD-STABLE version of the shazam module:

      % cvs co -rRELENG_6 shazam
    • Apply the changes between rev 1.14 and 1.15:

      % cvs update -j1.14 -j1.15 shazam/shazam.c

    You will almost certainly get a conflict because of the $Id$ (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$ line, leaving the original $Id$ line intact).

  4. View differences between the local version and the repository version with the diff command.

    % cvs diff shazam

    shows you every modification you have made to the shazam file or module.

    Table 3. Useful cvs diff options

    -u Uses the unified diff format.
    -c Uses the context diff format.
    -N Shows missing or added files.

    You always want to use -u, since unified diffs are much easier to read than almost any other diff format (in some circumstances, context diffs generated with the -c 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 -r or -D 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 -r or -D.

  5. View log entries with the log command.

    % cvs log shazam

    If 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 -l 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 -rrev to the log command:

    % cvs log -r1.2 shazam

    This 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.

  6. 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.

    % cvs annotate shazam
  7. Add 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.

  8. Remove obsolete files with the remove command.

    Remove the file, then cvs rm it, then cvs commit it.

  9. Commit with the commit or checkin command.

    Table 4. Useful cvs commit options

    -f Force a commit of an unmodified file.
    -mmsg Specify a commit message on the command line rather than invoking an editor.

    Use the -f 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 diff

    Also, 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:

  1. You can place commonly used options in your ~/.cvsrc, like this:

    cvs -z3
    diff -Nu
    update -Pd
    checkout -P

    This 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 -N (show added or removed files) and -u (unified diff format) options to diff(1).

    • always use the -P (prune empty directories) and -d (check out new directories) options when updating.

    • always use the -P (prune empty directories) option when checking out.

  2. Use Eivind Eklund's cdiff script to view unidiffs. It is a wrapper for 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).


    Simply use it instead of more(1) or less(1):

    % cvs diff -Nu shazam | cdiff

    Alternatively some editors like 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.

    % echo "syn on" >> ~/.vimrc 
    % cvs diff -Nu shazam | vim -
    % cvs log shazam | vim -
  3. 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 (CVS Repository Meisters ) for help.

  4. 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 -F option of CVS to read the commit message from that file, i.e.

    % vi logmsg
    % cvs ci -F logmsg shazam

    This 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.

  5. Speed up your CVS operation considerably by using a persistent ssh connection to the repository machine. First, put this configuration into your ~/.ssh/config:

          ControlPath /home/pav/.ssh/cvs.cpath
          ControlPath /home/pav/.ssh/cvs.cpath
          ControlPath /home/pav/.ssh/cvs.cpath
          ControlPath /home/pav/.ssh/cvs.cpath

    Now open the persistent connection to the repoman:

    % ssh -fNM

    The CVS commands should now respond faster, as they are reusing existing connection with the repository. Note that all the hostnames are case sensitive.

4 Conventions and Traditions

As a new committer there are a number of things you should do first.

All new committers 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 committer community. He or she is also personally responsible for your actions during this initial period. 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.

All src commits should go to FreeBSD-CURRENT first before being merged to FreeBSD-STABLE. No major new features or high-risk modifications should be made to the FreeBSD-STABLE branch.

5 Preferred License for New Files

Currently the FreeBSD Project suggests and uses the following text as the preferred license scheme:

Copyright © <Year> <Author>. 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.


The FreeBSD project strongly discourages the so called advertising clause in new code. Due to the large number of contributors to the FreeBSD 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 FreeBSD project discourages completely new licenses and variations on the standard licenses. New licenses require the approval of 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.

6 Developer Relations

If 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. Bill 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.


The 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 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:

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, or use other interfaces, such as tkgnats. This lets you query the PR database without needing to be connected to the Internet.

Using a local GNATS tree

  1. If 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=/usr

    This 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/refuse[1].


    The rest of these examples assume you have only supped the docs category. Adjust them as necessary, depending on the categories you are syncing.

  2. Install the GNATS port from ports/databases/gnats. This will place the various GNATS directories under $PREFIX/share/gnats.

  3. Symlink the GNATS directories you are supping under the version of GNATS you have installed.

    # cd /usr/local/share/gnats/gnats-db
    # ln -s /usr/gnats/docs

    Repeat as necessary, depending on how many GNATS categories you are syncing.

  4. 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:
  5. 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 cron(8), or run cvsup(1) from a shell script that does this as well.

    # /usr/local/libexec/gnats/gen-index \
        > /usr/local/share/gnats/gnats-db/gnats-adm/index
  6. Test the configuration by querying the PR database. This command shows open docs PRs.

    # query-pr -c docs -s open

    Other interfaces, such as that provided by the databases/tkgnats port should also work nicely.

  7. Pick a PR and close it.

Note: 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.

8 Who's Who

Besides 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:

John Baldwin

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:

Jake Burkholder , Thomas Möstl

Jake and Thomas are the maintainers of the Sparc64® hardware port.

Documentation Engineering Team

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 FreeBSD documentation project mailing list. 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.

Ruslan Ermilov

Ruslan is Mister mdoc(7). If you are writing a manual page and need some advice on the structure, or the markup, ask Ruslan.

Bruce Evans

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.

David Greenman

David is the overseer of the VM system. If you have a VM system change in mind, coordinate it with David.

Doug Rabson , Marcel Moolenaar , Peter Wemm , Paul Saab

These are the primary developers and overseers of the Intel IA-64 platform, officially known as the Itanium® Processor Family (IPF).

Murray Stokely , Doug White , Robert Watson , Ken Smith , Hiroki Sato , Maxime Henrion , Bruce A. Mah

These are the members of the Release Engineering Team . 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 FreeBSD-CURRENT to FreeBSD-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.

Peter Grehan

Peter is the official maintainer of the PowerPC® port.

Brian Somers

Official maintainer of /usr/sbin/ppp.

Colin Percival

Colin is the FreeBSD Security Officer and oversees the Security Officer Team .

Garrett 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.

FreeBSD committer's mailing list

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.

FreeBSD developers mailing list

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 FreeBSD developers mailing list 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 FreeBSD developers mailing list mail. Do not publish or forward messages from the FreeBSD developers mailing list outside the list membership without permission of all of the authors.

Copyright violators will be removed from the FreeBSD developers mailing list, 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 FreeBSD architecture and design mailing list or the FreeBSD source code audit mailing list. 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 FreeBSD developers mailing list and CC:/BCC: another FreeBSD list. Never, ever email another FreeBSD email list and CC:/BCC: the FreeBSD developers mailing list. Doing so can greatly diminish the benefits of this list.

9 SSH Quick-Start Guide

  1. If you are using FreeBSD 4.0 or later, OpenSSH is included in the base system. If you are using an earlier release, update and install one of the SSH ports. In general, you will probably want to get OpenSSH from the security/openssh port. You may also wish to check out the original ssh1 in the security/ssh port, but make certain you pay attention to its license. Note that both of these ports cannot be installed at the same time.

  2. If you do not wish to type your password in every time you use ssh(1), and you use RSA or DSA keys to authenticate, ssh-agent(1) is there for your convenience. If you want to use 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 ssh-agent(1) for details.

  3. Generate a key pair using ssh-keygen(1). The key pair will wind up in your $HOME/.ssh/ directory.

  4. Send your public key ($HOME/.ssh/ or $HOME/.ssh/ to the person setting you up as a committer so it can be put into yourlogin file in /c/ssh-keys/ on freefall.

Now you should be able to use 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 ( 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 ls /usr.

For more information, see security/openssh, ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), and scp(1).

10 The FreeBSD Committers' Big List of Rules

  1. Respect other committers.

  2. Respect other contributors.

  3. Discuss any significant change before committing.

  4. Respect existing maintainers (if listed in the MAINTAINER field in Makefile or in the MAINTAINER file in the top-level directory).

  5. 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.

  6. Changes go to FreeBSD-CURRENT before FreeBSD-STABLE unless specifically permitted by the release engineer or unless they are not applicable to FreeBSD-CURRENT. Any non-trivial or non-urgent change which is applicable should also be allowed to sit in FreeBSD-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 FreeBSD-STABLE branch as outlined for the maintainer in rule #5.

  7. Do not fight in public with other committers; it looks bad. If you must “strongly disagree” about something, do so only in private.

  8. 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.

  9. When in doubt on any procedure, ask first!

  10. Test your changes before committing them.

  11. 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.

10.1 Details

  1. Respect 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.

  2. 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 1 and apply them also to contributors.

  3. 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!

  4. 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 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 for more information on this.

  5. 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.

  6. Changes go to FreeBSD-CURRENT before FreeBSD-STABLE unless specifically permitted by the release engineer or unless they are not applicable to FreeBSD-CURRENT. Any non-trivial or non-urgent change which is applicable should also be allowed to sit in FreeBSD-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 FreeBSD-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 FreeBSD-STABLE branch. The management of FreeBSD-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 FreeBSD-STABLE and different rules apply there than in FreeBSD-CURRENT. There is also really no point in having FreeBSD-CURRENT be a testing ground if changes are merged over to FreeBSD-STABLE immediately. Changes need a chance to be tested by the FreeBSD-CURRENT developers, so allow some time to elapse before merging unless the FreeBSD-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 Security Officer Team , or in some cases, by a member of the Release Engineering Team .

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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 FreeBSD core team if you wish to take up maintainership of an unmaintained part of the tree.

10.2 Policy on Multiple Architectures

FreeBSD has added several new arch ports during the 5.0 release cycle 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.

While the Alpha is a 64 bit processor, it is a more traditional processor design and does not provide as good a testbed for many of the challenges that the other 64 bit platform ports face. 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.

10.3 Other Suggestions

When 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.

10.4 Deprecating Features

When it is necessary to remove functionality from software in the base system the following guidelines should be followed whenever possible:

  1. 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.

  2. The option, utility, or interface is preserved until the next major (point zero) release.

  3. 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.

11 Support for Multiple Architectures

FreeBSD 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".

11.1 Statement of General Intent

The 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.

11.2 Tier 1: Fully Supported Architectures

Tier 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 cluster, or easily available for all developers.

Tier 1 architectures are expected to be Production Quality with respects to all aspects of the FreeBSD operating system, including installation and development environments.

Current Tier 1 platforms are i386, Sparc64, AMD64, and PC98.

11.3 Tier 2: Developmental Architectures

Tier 2 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. 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. 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 to at least single-user mode on real world commodity hardware. Some exceptions to these rules may be made for new hardware that is under development by hardware vendors, but not yet available to the project.

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.

Current Tier 2 platforms are PowerPC and ia64.

11.4 Tier 3: Experimental Architectures

Tier 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 for which hardware is not or will not be available to the project in the foreseeable future, for which there are two or fewer active developers, that can not boot to at least single-user mode on real hardware (or a simulator for new hardware platforms), or which are considered legacy systems unlikely to see broad future use. Tier 3 systems will not be committed to the base source tree, although 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.

Current Tier 3 platforms are S/390®.

11.5 Tier 4: Unsupported Architectures

Tier 4 systems are not supported in any form by the project.

All systems not otherwise classified into a support tier are Tier 4 systems.

11.6 Policy on Changing the Tier of an Architecture

Systems 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.

12 Ports Specific FAQ

1. Adding a New Port
12.1.1. How do I add a new port?
12.1.2. Any other things I need to know when I add a new port?
2. Removing an Existing Port
12.2.1. How do I remove an existing port?
3. Repository Copies
12.3.1. When do we need a repository copy?
12.3.2. When do we not need a repository copy?
12.3.3. What do I need to do?
4. Ports Freeze
12.4.1. What is a “ports freeze”?
12.4.2. How long is a ports freeze?
12.4.3. What does it mean to me?
12.4.4. How do I know when the ports freeze starts?
12.4.5. How do I know when the ports freeze ends?
5. Creating a New Category
12.5.1. What is the procedure for creating a new category?
12.5.2. What do I need to do?
6. Miscellaneous Questions
12.6.1. How do I know if my port is building correctly or not?
12.6.2. I added a new port. Do I need to add it to the INDEX?
12.6.3. Are there any other files I am not allowed to touch?
12.6.4. What is the proper procedure for updating the checksum for a port's distfile when the file changes without a version change?

1. Adding a New Port

12.1.1. How 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 CVSROOT/modules file and the port's category Makefile. It was written by Michael Haro and Will Andrews , but Will is the current maintainer so please send questions/patches about addport to him.

12.1.2. 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:

# make install
# make package
# make deinstall
# pkg_add package you built above
# make deinstall
# make reinstall
# make package

The Porters Handbook contains more detailed instructions.

Use 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.

2. Removing an Existing Port

12.2.1. How 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 Makefiles

  • Then, remove the port:

    1. Remove the port's files via cvs remove.

    2. Remove SUBDIR listing of the port in the parent directory Makefile.

    3. Remove the module entry in CVSROOT/modules.

    4. Add an entry to ports/MOVED.

    5. 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 Vasil Dimov , who is also its current maintainer, so please send questions, patches or suggestions about rmport to him.

3. Repository Copies

12.3.1. When 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.

12.3.2. 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.

12.3.3. 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. If Ports Management Team approves it, it will be reassigned to pcvs. If so inclined, portmgr may do the copy directly; otherwise, CVS ports Repository Meisters 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:

    1. Upgrade the copied port to the new version (remember to change the PORTNAME so there are not duplicate ports with the same name).

    2. 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.

    3. If the port changed categories, modify the CATEGORIES line of the port's Makefile accordingly

    4. Add the new module entry to CVSROOT/modules.

    5. Add an entry to ports/MOVED, if you remove the original port.

  • When removing a port:

    1. 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.

    2. Remove the old port, the old SUBDIR entry and the old module entry.

    3. Add an entry to ports/MOVED.

  • After repo moves (“rename” operations where a port is copied and the old location is removed):

    1. 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.

4. Ports Freeze

12.4.1. What 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.

12.4.2. How long is a ports freeze?

Usually a week or two.

12.4.3. 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.

12.4.4. How do I know when the ports freeze starts?

The ports management team will send out warning messages to the FreeBSD ports mailing list and FreeBSD committer's mailing list 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 FreeBSD committer's mailing list, of course.

12.4.5. 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 FreeBSD ports mailing list and FreeBSD committer's mailing list 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.

5. Creating a New Category

12.5.1. What 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 Ports Management Team , it is their decision whether or not to approve it. If they do, it is their responsibility to do the following:

  1. Perform any needed repocopies.

  2. Update the VALID_CATEGORIES definition in ports/Mk/

  3. Assign the PR back to you.

12.5.2. What do I need to do?

The procedure is a strict superset of the one to repocopy individual ports (see above).

  1. Upgrade each copied port's Makefile. Do not connect the new category to the build yet.

    To do this, you will need to:

    1. 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.

    2. 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.

    3. If you want to be really thorough, now might be a good time to run portlint(1).

  2. 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 pkg_version(1) and portupgrade(1) fail.

    To do this, use the tool, as follows: env PORTSDIR=/path/to/ports sh -e /path/to/ports/Tools/scripts/ . 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!

  3. 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.

  4. 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.

  5. Add the following module entry to CVSROOT-ports/modules:

    ports_categoryname   categoryname

    The whitespace should be a tab.

    If the categoryname contains a dash, convert that to an underscore first.

  6. Change all the affected port module entries in CVSROOT-ports/modules.

  7. Add appropriate entries to ports/MOVED.

  8. Update the instructions for 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.

  9. Update the documentation by modifying the following:

    • the list of categories in the Porter's Handbook

    • www/en/ports/categories. Note that these are now displayed by sub-groups, as specified in www/en/ports/categories.descriptions.

    • the section of the Handbook that lists the cvsup collections.

    (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.

  10. 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.

6. Miscellaneous Questions

12.6.1. How 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.)

12.6.2. 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.

12.6.3. 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.

12.6.4. 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.

13 Perks of the Job

Unfortunately, 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-master

As a committer, you may apply to Jun Kuriyama for direct access to, providing the public key output from cvpasswd Please note: you must specify 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 Subscription

FreeBSD 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 following each major release.

14 Miscellaneous Questions

14.1. Why are trivial or cosmetic changes to files on a vendor branch a bad idea?
14.2. How do I add a new file to a CVS branch?
14.3. What “meta” information should I include in a commit message?
14.4. How do I access to put up personal or project information?
14.5. Where are the mailing list archives stored?

14.1. Why 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 -j option does not work very well. Ask David O'Brien for horror stories.

14.2. 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:

Example 1. MFC'ing a New File

% cd sys/alpha/include
% cvs update -rRELENG_6
cvs update: Updating .
U clockvar.h
U console.h
% 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
% 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
% cvs commit

14.3. What “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.

Example 2. Commit log for a commit based on a PR

You 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 <>

Example 3. Commit log for a commit needing review

You 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:       -arch

Example 4. Commit log for a commit needing approval

You 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:        abc

Where abc is the account name of the person who approved.

Example 5. Commit log for a commit bringing in code from OpenBSD

You want to commit some code based on work done in the OpenBSD project.


Obtained from:      OpenBSD

Example 6. Commit log for a change to FreeBSD-CURRENT with a planned commit to FreeBSD-STABLE to follow at a later date.

You want to commit some code which will be merged from FreeBSD-CURRENT into the FreeBSD-STABLE branch after two weeks.


MFC after:      2 weeks

Where 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 like

PR:                 foo/54321
Submitted by:       John Smith <>
Reviewed by:        -arch
Obtained from:      NetBSD
MFC after:          1 month

14.4. How do I access to put up personal or project information? is the same as Just create a public_html directory. Anything you place in that directory will automatically be visible under

14.5. Where are the mailing list archives stored?

The mailing lists are archived under /g/mail which will show up as /hub/g/mail with pwd(1). This location is accessible from any machine on the FreeBSD cluster.



The precise path depends on the *default base setting in your supfile.

This, and other documents, can be downloaded from

For questions about FreeBSD, read the documentation before contacting <>.
For questions about this documentation, e-mail <>.