The Wayback Machine - https://web.archive.org/all/20050218054554/http://www.mozilla.org:80/cvs.html


source code via cvs

In addition to the other methods, the Mozilla source code is available via CVS.

What's CVS? CVS is the Concurrent Versions System. Start at CVShome.org to learn more and read the tutorial.

Anyone can check out the sources via CVS, but only certain people have the ability to check in. Those people, basically, are the module owners and their delegates. Read our document on hacking mozilla to find out how to get the ability to check in. You may also wish to see our using SSH to connect to CVS document.

To check out the sources, you need to be running CVS 1.10 or later, and have your $CVSROOT set to

:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

The password for user anonymous is anonymous.

You also need gnu make hereafter make or gmake, not solaris make, not borland make, not microsoft make, not bsd make, not imake, nor any other make you can imagine. GNU Make 3.79.1 is recommended; other versions may or may not work.

Since several different applications are built from the same basic source code, you must choose which application to checkout on the command line using the MOZ_CO_PROJECT variable. The possible options include the following:

suite
The traditional "Mozilla" seamonkey suite of browser, mail/news, composer, and other applications.
browser
The standalone "Firefox" browser.
mail
The standalone "Thunderbird" mail/news client.
composer
The standalone HTML composer
calendar
The standalone "Sunbird" calendar app.
xulrunner
The next-generation XUL application launcher.
macbrowser
The "Camino" native browser for Macintosh.

Specify multiple options with commas to check out multiple projects in the same tree: MOZ_CO_PROJECT=suite,browser,xulrunner

What follows are more in-depth instructions on two topics:

  • First, detailed platform-specific instructions on how to check out the source repository from scratch.
  • Second, assuming you have previously downloaded the source code from our FTP server, how to convert your existing source directory into one that can be used with our CVS server (meaning you will only need to download the files that have changed since the FTP archive was constructed, rather than downloading the whole thing again.)

cvs checkout

Here is how you do a cvs checkout from our server on various platforms.

Also note that CVS is slower than FTP, if you start from scratch.

So, please read this entire document, including the conversion section, before doing anything rash.

  • Unix:

    You can find the most recent version of CVS at CVShome.org's Unix pages. You check out as follows. (Syntax is for csh; if you use sh, I'm sure you'll know what to do. If you don't, you've got bigger problems...)

     % setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
     % cvs login
     (Logging in to anonymous@cvs-mirror.mozilla.org)
    CVS password: anonymous
    % cvs checkout mozilla/client.mk U mozilla/client.mk
    % cd mozilla % make -f client.mk checkout MOZ_CO_PROJECT=option,option…

    This automates a cvs checkout process that is prone to change.

    You only ever need to run cvs login once. It will remember anonymous's password in your $HOME/.cvspass file.

    The -z3 parameter is to cause the files (and diffs) to be compressed while in transit. This is almost always the right thing to do; so much so that you should probably just put cvs -z3 in your $HOME/.cvsrc file, to make it be the default on all CVS commands.

    (Note that -z9 offers a logarithmic improvement in compression at an exponential cost in CPU time. Therefore, we recommend -z3; that seems to be about optimal in most cases.)

  • Windows:

    You must have CVS version 1.10 or newer. Versions 1.9.27 and earlier, including version 1.9, have bugs. In particular, if the cvs process never terminates, you need to upgrade.

    You can find a suitably recent version of CVS at CVShome.org's Windows pages (or at the FTP site).

    In order to use cvs under Windows, you must have unpacked the source from the `tar' file, not from a `zip'. The zip file format does not store dates with enough accuracy for cvs, so updating source unpacked from a zip with cvs takes a really long time because the cvs client must send most files to the server to determine if they have changed.

    The checkout procedure is similar to that for Unix:

    C:\> set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
    C:\> set HOME=\TEMP
    C:\> cvs login
    (Logging in to anonymous@cvs-mirror.mozilla.org)
    CVS password: anonymous
    C:\> cvs checkout mozilla/client.mk
    U mozilla/client.mk
    C:\> cd mozilla C:\> make -f client.mk checkout MOZ_CO_PROJECT=option,option…
    Which automates a cvs checkout process that is prone to change.

    If the -z3 parameter doesn't work, that means you don't have cvs and/or gzip installed correctly. Your life will be much easier if you correct this, rather than omitting that parameter.

    You also need to have the HOME environment variable set to a sensible directory, or cvs will complain.

  • Mac OS X:

We have found three cvs clients:  CVS for Mac OS X

NOTE: CVS clients are not version specific, but the Mac OS X build system requires Mac OS 10.2's newest development tools release. If you upgrade to Mac OS X 10.2, install the bundled developer tools CD, which includes Apple's command line version of CVS.
  • OS/2:

    Note: The OS/2 code is no longer contained on a separate branch.

    For OS/2, CVS version 1.10 is available from The Hobbes Archive (pub/os2/dev/util). Make sure you are using version 0.9d of the EMX runtime.

    The checkout procedure is similar to that for Unix:

    [C:\] set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
    [C:\] set HOME=\TEMP
    [C:\] cvs login
    (Logging in to anonymous@cvs-mirror.mozilla.org)
    CVS password: anonymous
    [C:\] cvs checkout mozilla/client.mk
    U mozilla/client.mk 
    [C:\] cd mozilla [C:\] gmake -f client.mk chekout MOZ_CO_PROJECT=option,option…

converting a tarball to a working cvs sandbox

Chances are, you've already downloaded the source code from our FTP server (or one of its many mirror sites). Even if you haven't, you might want to consider doing so: it's faster than checking out the whole tree over CVS.

Our source tarballs contain CVS info. If you have a tarball dated 1998-04-29 or later, it is already set up to talk to our public server, cvs-mirror.mozilla.org. All you need to do is this:

  • download a tarball;
  • unpack it;
  • and run ``cvs -z3 checkout -PA mozilla/client.mk ''in the same directory you unpacked the tarball,
  • then run make -f mozilla/client.mk checkout MOZ_CO_FLAGS=-PA MOZ_CO_PROJECT=option,option…
  • That's it! This will cause the server to send the changes that have been made in the CVS repository since the time the tarball was created, bringing you up to date.