aboutsummaryrefslogtreecommitdiff
path: root/files/ko/mozilla_source_code_via_cvs/index.html
blob: bcd46453fcd6cdb38da0e01d28a99f182b9ac7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
---
title: Mozilla Source Code Via CVS
slug: Mozilla_Source_Code_Via_CVS
---
<p>Those doing active development can check out the latest source using CVS. This is the preferred method if you plan to provide patches and fix bugs, as it lets you get up-to-the-minute changes and merge them with your own.</p>
<p>If you want to compile a product for release, it is generally better to <a href="ko/Download_Mozilla_Source_Code">Download Mozilla Source Code</a> tarballs.</p>
<h3 id="Quick_Start_Guide" name="Quick_Start_Guide">Quick Start Guide</h3>
<p><span class="comment">I seem to not be editing this page in what others on this development site deem appropriate. So, if you are going to just remove this section, can you please be so kind as to suggest an alternate title of a new page that I can put this information on? Thanks, Jeff Carr</span></p>
<p>The basic steps to checkout the trunk (unstable) Firefox sources are:</p>
<pre class="eval">cvs -d <a class="link-mailto" href="mailto::pserver:anonymous:anonymous@cvs-mirror.mozilla.org" rel="freelink">:pserver:anonymous:anonymous@cvs-mirror.mozilla.org</a>:/cvsroot co mozilla/client.mk
cd mozilla
make -f client.mk checkout MOZ_CO_PROJECT=browser
</pre>
<p>Note that on Windows, your source tree must be located at a /cygdrive/&lt;c&gt; mount point. It must not be located within your /home.</p>
<h3 id="Getting_Started" name="Getting_Started">Getting Started</h3>
<p>CVS means "Concurrent Versioning System". To learn more about CVS in general, visit <a class="external" href="http://ximbiot.com/cvs/manual/">ximbiot.com</a>, or read the <a class="external" href="http://ximbiot.com/cvs/cvshome/docs/blandy.html">tutorial</a>.</p>
<p>Anyone can check out (also known as "pull" or "download") the sources via CVS, but only certain people have the ability to check in (make changes, also known as "commit"). Those people are the <a class="external" href="http://www.mozilla.org/owners.html">module owners</a> and their delegates. Read our document on <a class="external" href="http://www.mozilla.org/hacking/">hacking mozilla</a> to find out how to get the ability to check in. You may also wish to read about <a class="external" href="http://www.mozilla.org/cvs-ssh-faq.html">using SSH to connect to CVS</a>.</p>
<h4 id="Requirements" name="Requirements">Requirements</h4>
<p>To check out the sources, you need to be running <a class="external" href="http://www.nongnu.org/cvs/">CVS</a> 1.11 or later. 1.12.13 does not work with the CVS server, and instead results in hangs, although 1.12.9 is known to work. Furthermore, you must use <a class="external" href="http://www.gnu.org/software/make/">GNU make</a> to check out and build Mozilla. No other "make" program is acceptable. On windows, mac and regular GNU systems (like GNU/Linux), use "make" to run GNU make; on most non-GNU unixes (like e.g. Solaris, etc.), use "gmake".</p>
<h3 id="CVS_Client_Settings" name="CVS_Client_Settings">CVS Client Settings</h3>
<p>The "cvsroot" (repository identification string) used for anonymous access to Mozilla CVS is</p>
<pre class="eval"><a class="link-mailto" href="mailto::pserver:anonymous:anonymous@cvs-mirror.mozilla.org" rel="freelink">:pserver:anonymous:anonymous@cvs-mirror.mozilla.org</a>:/cvsroot
</pre>
<p>If you are using a graphical CVS interface, use the following server data:</p>
<ul>
 <li><b>host</b>: "cvs-mirror.mozilla.org"</li>
 <li><b>repository path</b>: "/cvsroot"</li>
 <li><b>user</b>: "anonymous"</li>
 <li><b>password</b>: "anonymous"</li>
 <li><b>connection type</b>: pserver</li>
 <li><b>port</b>: default (2401)</li>
</ul>
<h3 id="Selecting_a_Project_to_Pull" name="Selecting_a_Project_to_Pull">Selecting a Project to Pull</h3>
<p>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 <code>MOZ_CO_PROJECT</code> variable. This information has to be supplied when it comes to the checkout of the actual source code (see the appropriate <a href="#Checkout">checkout</a> <a href="#Checkout_2">section</a> below, according to the branch you want to checkout). The possible options include the following:</p>
<dl>
 <dt>
  browser </dt>
 <dd>
  The standalone "Firefox" browser.</dd>
 <dt>
  mail </dt>
 <dd>
  The standalone "Thunderbird" mail/news client.</dd>
 <dt>
  suite </dt>
 <dd>
  The traditional "Mozilla" SeaMonkey suite of browser, mail/news, composer, and other applications.</dd>
 <dt>
  minimo </dt>
 <dd>
  The standalone browser for small devices.</dd>
 <dt>
  composer </dt>
 <dd>
  The standalone HTML composer.</dd>
 <dt>
  calendar </dt>
 <dd>
  The standalone "Sunbird" calendar app.</dd>
 <dt>
  xulrunner </dt>
 <dd>
  The next-generation XUL application launcher.</dd>
 <dt>
  macbrowser </dt>
 <dd>
  The "Camino" native browser for Macintosh.</dd>
 <dt>
  all </dt>
 <dd>
  Check out sources for all of the above projects, plus some additional utility code</dd>
</dl>
<p>Multiple projects can be specified with commas: <code>MOZ_CO_PROJECT=suite,browser,xulrunner</code>.</p>
<p><b>Note</b> that if you are using a custom &lt;tt&gt;<a href="ko/Configuring_Build_Options#Using_a_.mozconfig_Configuration_File">.mozconfig</a>&lt;/tt&gt; file, you can also specify <code>MOZ_CO_PROJECT</code> there, instead of including it on the command line.</p>
<h3 id="Checking_Out_a_New_Source_Tree" name="Checking_Out_a_New_Source_Tree">Checking Out a New Source Tree</h3>
<h4 id="Check_Tinderbox" name="Check_Tinderbox">Check Tinderbox</h4>
<p>Before pulling a tree, you should always check the appropriate <a href="ko/Tinderbox">Tinderbox</a> to make sure that the codebase is not broken. If there are red tinderboxes, it is usually advisable to wait until they are green before pulling a tree.</p>
<h4 id="Branch_HEAD" name="Branch_HEAD">Branch HEAD</h4>
<p>To check out a new source tree from scratch, get the &lt;tt&gt;client.mk&lt;/tt&gt; file which contains makefile instructions which are used to pull the rest of the tree:</p>
<pre class="eval">$ cvs -d <a class="link-mailto" href="mailto::pserver:anonymous:anonymous@cvs-mirror.mozilla.org" rel="freelink">:pserver:anonymous:anonymous@cvs-mirror.mozilla.org</a>:/cvsroot co mozilla/client.mk
</pre>
<p>Note: if you have already set up a &lt;tt&gt;<a href="ko/Configuring_Build_Options#Using_a_.mozconfig_Configuration_File">.mozconfig</a>&lt;/tt&gt; file, you may also need to check out the following files:</p>
<dl>
 <dt>
  Firefox </dt>
 <dd>
  <pre>cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/browser/config/mozconfig</pre>
 </dd>
 <dt>
  Thunderbird </dt>
 <dd>
  <pre>cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/mail/config/mozconfig</pre>
 </dd>
</dl>
<h4 id="Specific_Branch" name="Specific_Branch">Specific Branch</h4>
<p>If you want to check out the source code of a specific <a class="external" href="http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Branching_and_merging">CVS branch</a>, use</p>
<pre class="eval">$ cvs -d <a class="link-mailto" href="mailto::pserver:anonymous:anonymous@cvs-mirror.mozilla.org" rel="freelink">:pserver:anonymous:anonymous@cvs-mirror.mozilla.org</a>:/cvsroot co -r BRANCH mozilla/client.mk
</pre>
<p>instead. To, for example, pull the Firefox 2.0 development branch, replace BRANCH above with MOZILLA_1_8_BRANCH. For available branch tags in Mozilla, see <a href="ko/CVS_Tags">CVS Tags</a>.</p>
<p>The information on pulling project specific <code>.mozconfig</code> files as listed in the <a href="#Branch_HEAD">previous section</a> apply to other branches than HEAD as well of course.</p>
<h4 id="Checkout" name="Checkout">Checkout</h4>
<p>After having chosen the correct branch, run:</p>
<pre class="eval">$ cd mozilla
$ make -f client.mk checkout MOZ_CO_PROJECT=<i>option,option</i>
</pre>
<p>As mentioned above, if you are using a custom <code>.mozconfig</code> file where you have already specified the <code>MOZ_CO_PROJECT</code> variable, you do not need to repeat it here on command line.</p>
<div class="note">
 Always use &lt;tt&gt;client.mk&lt;/tt&gt; to checkout the Mozilla sources: do not check out the &lt;tt&gt;mozilla/&lt;/tt&gt; module directly. Various subprojects such as NSS, NSPR, and LDAP C SDK are pulled from stable release tags, even when regular mozilla development occurs on the trunk.</div>
<h3 id="Updating_a_Source_Tree" name="Updating_a_Source_Tree">Updating a Source Tree</h3>
<h4 id="Branch_HEAD_2" name="Branch_HEAD_2">Branch HEAD</h4>
<p>In order to update a source tree (be it branch HEAD or a specific branch) to latest branch HEAD, run:</p>
<pre class="eval">$ cd mozilla
$ cvs up -A client.mk
</pre>
<p>The -A option removes any "sticky branch" information, which leads to the effect that the tree is updated to HEAD.</p>
<h4 id="Specific_Branch_2" name="Specific_Branch_2">Specific Branch</h4>
<p>To update a source tree which was pulled from a specific branch, use</p>
<pre class="eval">$ cd mozilla
$ cvs up -r BRANCH client.mk
</pre>
<p>instead. Replace BRANCH by the tag of the branch you want to update.</p>
<h4 id="Checkout_2" name="Checkout_2">Checkout</h4>
<p>Having updated client.mk, you can do the checkout:</p>
<pre class="eval">$ make -f client.mk checkout MOZ_CO_PROJECT=<i>option,option</i>
</pre>
<p>As always, if you use a custom <code>.mozconfig</code> file where <code>MOZ_CO_PROJECT</code> is already defined, you do not need to repeat it on command line.</p>
<h3 id="Creating_a_Diff_File" name="Creating_a_Diff_File">Creating a Diff File</h3>
<p>In order to create a diff of a single local file against the current file in the repository, use:</p>
<pre class="eval">$ cvs diff -u8p FILENAME
</pre>
<p>See <a href="ko/Creating_a_patch">Creating a patch</a> for more information.</p>
<h3 id="Converting_a_Downloaded_Source_Tree" name="Converting_a_Downloaded_Source_Tree">Converting a Downloaded Source Tree</h3>
<p>Downloaded source trees from mozilla.org (<a href="ko/Download_Mozilla_Source_Code">source tarballs</a>) are already set up with CVS information, like a normal checkout. You can update these trees like normal trees to the latest code, without special action. See previous section on how to update a source tree.</p>
<p><br>
 <span class="comment">interwiki link</span></p>
<p>{{ languages( { "fr": "fr/Obtenir_le_code_source_de_Mozilla_via_CVS", "ja": "ja/Mozilla_Source_Code_Via_CVS", "zh-cn": "cn/\u901a\u8fc7CVS\u83b7\u53d6\u6e90\u7801" } ) }}</p>