/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-features.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-features.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.42 Revision 1.43
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-features.xml,v 1.42 2012/06/29 15:57:32 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-features.xml,v 1.43 2012/07/24 12:12:52 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract> 11<abstract>
12Discover the features Portage has, such as support for distributed compiling, 12Discover the features Portage has, such as support for distributed compiling,
13ccache and more. 13ccache and more.
14</abstract> 14</abstract>
15 15
16<version>6</version> 16<version>7</version>
17<date>2012-06-29</date> 17<date>2012-07-24</date>
18 18
19<section> 19<section>
20<title>Portage Features</title> 20<title>Portage Features</title>
21<body> 21<body>
22 22
26performance, reliability, security, ... 26performance, reliability, security, ...
27</p> 27</p>
28 28
29<p> 29<p>
30To enable or disable certain Portage features you need to edit 30To enable or disable certain Portage features you need to edit
31<path>/etc/make.conf</path>'s <c>FEATURES</c> variable which contains the 31<path>/etc/portage/make.conf</path>'s <c>FEATURES</c> variable which contains
32various feature keywords, separated by white space. In several cases you 32the various feature keywords, separated by white space. In several cases you
33will also need to install the additional tool on which the feature relies. 33will also need to install the additional tool on which the feature relies.
34</p> 34</p>
35 35
36<p> 36<p>
37Not all features that Portage supports are listed here. For a full overview, 37Not all features that Portage supports are listed here. For a full overview,
95<subsection> 95<subsection>
96<title>Activating Portage Support</title> 96<title>Activating Portage Support</title>
97<body> 97<body>
98 98
99<p> 99<p>
100Add <c>distcc</c> to the FEATURES variable inside <path>/etc/make.conf</path>. 100Add <c>distcc</c> to the FEATURES variable inside <path>/etc/portage/make.conf</path>.
101Next, edit the MAKEOPTS variable to your liking. A known guideline is to fill in 101Next, edit the MAKEOPTS variable to your liking. A known guideline is to fill in
102"-jX" with X the number of CPUs that run <c>distccd</c> (including the current 102"-jX" with X the number of CPUs that run <c>distccd</c> (including the current
103host) plus one, but you might have better results with other numbers. 103host) plus one, but you might have better results with other numbers.
104</p> 104</p>
105 105
148<warn> 148<warn>
149<c>ccache</c> is known to cause numerous compilation failures. Sometimes ccache 149<c>ccache</c> is known to cause numerous compilation failures. Sometimes ccache
150will retain stale code objects or corrupted files, which can lead to packages 150will retain stale code objects or corrupted files, which can lead to packages
151that cannot be emerged. If this happens (if you receive errors like "File not 151that cannot be emerged. If this happens (if you receive errors like "File not
152recognized: File truncated"), try recompiling the application with ccache 152recognized: File truncated"), try recompiling the application with ccache
153disabled (<c>FEATURES="-ccache"</c> in <path>/etc/make.conf</path>) 153disabled (<c>FEATURES="-ccache"</c> in <path>/etc/portage/make.conf</path>)
154<e>before</e> reporting a bug. Unless you are doing development work, <e>do not 154<e>before</e> reporting a bug. Unless you are doing development work, <e>do not
155enable ccache</e>. 155enable ccache</e>.
156</warn> 156</warn>
157 157
158</body> 158</body>
174<subsection> 174<subsection>
175<title>Activating Portage Support</title> 175<title>Activating Portage Support</title>
176<body> 176<body>
177 177
178<p> 178<p>
179Open <path>/etc/make.conf</path> and add <c>ccache</c> to the FEATURES variable. 179Open <path>/etc/portage/make.conf</path> and add <c>ccache</c> to the FEATURES
180Next, add a new variable called CCACHE_SIZE and set it to "2G": 180variable. Next, add a new variable called CCACHE_SIZE and set it to "2G":
181</p> 181</p>
182 182
183<pre caption="Editing CCACHE_SIZE in /etc/make.conf"> 183<pre caption="Editing CCACHE_SIZE in /etc/portage/make.conf">
184CCACHE_SIZE="2G" 184CCACHE_SIZE="2G"
185</pre> 185</pre>
186 186
187<p> 187<p>
188To check if ccache functions, ask ccache to provide you with its statistics. 188To check if ccache functions, ask ccache to provide you with its statistics.
195</pre> 195</pre>
196 196
197<p> 197<p>
198The <path>/var/tmp/ccache</path> location is Portage' default ccache home 198The <path>/var/tmp/ccache</path> location is Portage' default ccache home
199directory; if you want to alter this setting you can set the <c>CCACHE_DIR</c> 199directory; if you want to alter this setting you can set the <c>CCACHE_DIR</c>
200variable in <path>/etc/make.conf</path>. 200variable in <path>/etc/portage/make.conf</path>.
201</p> 201</p>
202 202
203<p> 203<p>
204However, if you would run <c>ccache</c>, it would use the default location of 204However, if you would run <c>ccache</c>, it would use the default location of
205<path>${HOME}/.ccache</path>, which is why you needed to set the 205<path>${HOME}/.ccache</path>, which is why you needed to set the
268you store prebuilt packages. If you want to use this repository, you need to 268you store prebuilt packages. If you want to use this repository, you need to
269make Portage aware of it by having the PORTAGE_BINHOST variable point to 269make Portage aware of it by having the PORTAGE_BINHOST variable point to
270it. For instance, if the prebuilt packages are on ftp://buildhost/gentoo: 270it. For instance, if the prebuilt packages are on ftp://buildhost/gentoo:
271</p> 271</p>
272 272
273<pre caption="Setting PORTAGE_BINHOST in /etc/make.conf"> 273<pre caption="Setting PORTAGE_BINHOST in /etc/portage/make.conf">
274PORTAGE_BINHOST="ftp://buildhost/gentoo" 274PORTAGE_BINHOST="ftp://buildhost/gentoo"
275</pre> 275</pre>
276 276
277<p> 277<p>
278When you want to install a prebuilt package, add the <c>--getbinpkg</c> option 278When you want to install a prebuilt package, add the <c>--getbinpkg</c> option
363# <i>gpg --homedir /etc/portage/gpg --edit-key 0x239C75C4 trust</i> 363# <i>gpg --homedir /etc/portage/gpg --edit-key 0x239C75C4 trust</i>
364# <i>gpg --homedir /etc/portage/gpg --edit-key 0x96D8BF6D trust</i> 364# <i>gpg --homedir /etc/portage/gpg --edit-key 0x96D8BF6D trust</i>
365</pre> 365</pre>
366 366
367<p> 367<p>
368Next, edit <path>/etc/make.conf</path> and enable support for validating the 368Next, edit <path>/etc/portage/make.conf</path> and enable support for validating
369signed Portage tree snapshots (using <c>FEATURES="webrsync-gpg"</c>) and 369the signed Portage tree snapshots (using <c>FEATURES="webrsync-gpg"</c>) and
370disabling updating the Portage tree using the regular <c>emerge --sync</c> 370disabling updating the Portage tree using the regular <c>emerge --sync</c>
371method. 371method.
372</p> 372</p>
373 373
374<pre caption="Updating Portage for signed tree validation"> 374<pre caption="Updating Portage for signed tree validation">

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.20