1 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
2 |
<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
3 |
|
4 |
<!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-features.xml,v 1.1 2003/11/20 10:52:35 swift Exp $ --> |
5 |
|
6 |
<sections> |
7 |
<section> |
8 |
<title>DistCC</title> |
9 |
<subsection> |
10 |
<title>What is DistCC?</title> |
11 |
<body> |
12 |
|
13 |
<p> |
14 |
<c>distcc</c> is a program to distribute compilations across several, not |
15 |
necessarily identical, machines on a network. The <c>distcc</c> client sends all |
16 |
necessary information to the available DistCC servers (running <c>distccd</c>) |
17 |
so they can compile pieces of sourcecode for the client. The net result is a |
18 |
faster compilation time. |
19 |
</p> |
20 |
|
21 |
<p> |
22 |
You can find more elaborate information about <c>distcc</c> (and information on |
23 |
how to have it work with Gentoo) in our <uri link="/doc/en/distcc.xml">Gentoo |
24 |
Distcc Documentation</uri>. |
25 |
</p> |
26 |
|
27 |
</body> |
28 |
</subsection> |
29 |
<subsection> |
30 |
<title>Installing DistCC</title> |
31 |
<body> |
32 |
|
33 |
<p> |
34 |
Distcc ships with a graphical monitor to monitor tasks that your computer is |
35 |
sending away for compilation. If you use Gnome then put 'gnome' in your |
36 |
<c>USE</c> setting. However, if you don't use Gnome and would still like to have |
37 |
the monitor then you should put 'gtk' in your <c>USE</c> setting. |
38 |
</p> |
39 |
|
40 |
<p> |
41 |
Installing distcc is, as is with all software available through Gentoo's |
42 |
Portage, extremely easy: |
43 |
</p> |
44 |
|
45 |
<note> |
46 |
From now on, as you now know how to install binary packages if you want, we will |
47 |
omit the <c>--usepkg</c> option throughout the rest of the Gentoo Handbook. |
48 |
</note> |
49 |
|
50 |
<pre caption="Installing Distcc"> |
51 |
# <i>emerge distcc</i> |
52 |
</pre> |
53 |
|
54 |
</body> |
55 |
</subsection> |
56 |
<subsection> |
57 |
<title>Activating Portage Support</title> |
58 |
<body> |
59 |
|
60 |
<p> |
61 |
Well, if installation is easy, the rest should be easy too :) So let us quickly |
62 |
activate the Portage support for <c>distcc</c>. |
63 |
</p> |
64 |
|
65 |
<p> |
66 |
First, open <path>/etc/make.conf</path> and edit the <c>FEATURES</c> variable so |
67 |
it contains the <c>distcc</c> keyword. Next, edit the <c>MAKEOPTS</c> variable |
68 |
so it reads <c>-jX</c> with <c>X</c> the number of active <c>distccd</c> hosts |
69 |
(including the host that will use <c>distcc</c> even though it doesn't |
70 |
necessarily need to run <c>distccd</c>) plus one: |
71 |
</p> |
72 |
|
73 |
<pre caption="Possible MAKEOPTS setting in /etc/make.conf"> |
74 |
<comment># Suppose you have 6 distccd hosts excluding this host:</comment> |
75 |
MAKEOPTS="-j8" |
76 |
</pre> |
77 |
|
78 |
<p> |
79 |
Now, still inside <path>/etc/make.conf</path>, uncomment the |
80 |
<c>PORTAGE_TMPDIR</c> line and add the following line at the end |
81 |
of the file: |
82 |
</p> |
83 |
|
84 |
<pre caption="Add an extra, distcc-specific variable to /etc/make.conf"> |
85 |
<comment># Don't forget to uncomment the PORTAGE_TMPDIR variable</comment> |
86 |
DISTCC_DIR=${PORTAGE_TMPDIR}/portage/.distcc |
87 |
</pre> |
88 |
|
89 |
</body> |
90 |
</subsection> |
91 |
</section> |
92 |
<section> |
93 |
<title>cCache</title> |
94 |
<subsection> |
95 |
<title>What is cCache?</title> |
96 |
<body> |
97 |
|
98 |
</body> |
99 |
</subsection> |
100 |
<subsection> |
101 |
<title>Installing cCache</title> |
102 |
<body> |
103 |
|
104 |
</body> |
105 |
</subsection> |
106 |
<subsection> |
107 |
<title>Activating Portage Support</title> |
108 |
<body> |
109 |
|
110 |
</body> |
111 |
</subsection> |
112 |
</section> |
113 |
<section> |
114 |
<title>Binary Packages</title> |
115 |
<subsection> |
116 |
<title>Creating binary packages</title> |
117 |
<body> |
118 |
|
119 |
<p> |
120 |
We have already discussed how to work with prebuild packages, but how do you |
121 |
create your own prebuild packages? |
122 |
</p> |
123 |
|
124 |
<p> |
125 |
If the package is already installed, you can use the <c>quickpkg</c> command |
126 |
which will make a tarball of the installed files. This is very interesting for |
127 |
backup purposes! |
128 |
</p> |
129 |
|
130 |
<pre caption="Using quickpkg"> |
131 |
# <i>quickpkg gnumeric</i> |
132 |
</pre> |
133 |
|
134 |
<p> |
135 |
If the package isn't installed yet, you can install it using <c>emerge</c> and |
136 |
ask to build a binary package too. <c>emerge</c> uses the <c>--buildpkg</c> |
137 |
option (<c>-b</c> in short) for this: |
138 |
</p> |
139 |
|
140 |
<pre caption="Installing gnumeric and building binary packages too"> |
141 |
# <i>emerge --buildpkg gnumeric</i> |
142 |
</pre> |
143 |
|
144 |
<p> |
145 |
If you want Portage to do this by default, you should set the <c>buildpkg</c> |
146 |
keyword in the <c>FEATURES</c> variable declared in <path>/etc/make.conf</path>. |
147 |
</p> |
148 |
|
149 |
<p> |
150 |
If you don't want to install the software, but only build the package, you can |
151 |
use the <c>--buildpkgonly</c> option (<c>-B</c> in short): |
152 |
</p> |
153 |
|
154 |
<pre caption="Building a binary package for gnumeric"> |
155 |
# <i>emerge --buildpkgonly gnumeric</i> |
156 |
</pre> |
157 |
|
158 |
</body> |
159 |
</subsection> |
160 |
</section> |
161 |
</sections> |