Add docs for /etc/portage/color.map and a few misc man page fixes. Thanks to Arfreve...
[portage.git] / man / portage.5
1 .TH "PORTAGE" "5" "Jun 2007" "Portage 2.1.3" "Portage"
2 .SH NAME
3 portage \- the heart of Gentoo
4 .SH "DESCRIPTION"
5 The current portage code uses many different configuration files, most of which 
6 are unknown to users and normal developers.  Here we will try to collect all 
7 the odds and ends so as to help users more effectively utilize portage.  This 
8 is a reference only for files which do not already have a man page.
9
10 All files in the make.profile directory may be tweaked via parent profiles 
11 when using cascading profiles.  For more info, please see 
12 http://www.gentoo.org/proj/en/releng/docs/cascading-profiles.xml
13 .IP Note:
14 If you are looking for information on how to emerge something, please see 
15 .BR emerge (1).
16 .SH "SYNOPSIS"
17 .TP
18 .BR /etc/
19 .nf
20 make.globals
21 .BR make.conf (5)
22 .fi
23 .TP
24 .BR /etc/make.profile/
25 .nf
26 deprecated
27 make.defaults
28 packages
29 packages.build
30 package.provided
31 package.use
32 package.use.force
33 package.use.mask
34 parent
35 profile.bashrc
36 use.force
37 use.mask
38 virtuals
39 .fi
40 .TP
41 .BR /etc/portage/
42 .nf
43 bashrc
44 color.map
45 modules
46 package.keywords
47 package.mask
48 package.unmask
49 package.use
50 mirrors
51 categories
52 .fi
53 .TP
54 .BR /etc/portage/profile/
55 site-specific overrides of \fB/etc/make.profile/\fR
56 .TP
57 .BR /usr/portage/profiles/
58 .nf
59 arch.list
60 categories
61 info_pkgs
62 info_vars
63 package.mask
64 profiles.desc
65 thirdpartymirrors
66 use.desc
67 use.local.desc
68 .fi
69 .TP
70 .BR /var/cache/edb/
71 misc internal cache files
72 .TP
73 .BR /var/db/pkg/
74 database to track installed packages
75 .TP
76 .BR /var/lib/portage/
77 .nf
78 config
79 world
80 .fi
81 .SH "GLOSSARY"
82 In the following sections, some terminology may be foreign to you or used 
83 with meaning specific to Portage.  Please see the referenced manpages for 
84 more detailed explanations.
85 .RS
86 .TP
87 .B DEPEND atom
88 A string which matches a package.  It is of the form category/package.  
89 It may also contain optional logical operators and versions.
90 .br
91 More reading: 
92 .BR ebuild (5)
93 .TP
94 .B KEYWORD
95 Each architecture has a unique KEYWORD.
96 .br
97 More reading: 
98 .BR ebuild (5)
99 .TP
100 .B virtual
101 A DEPEND atom that is part of the "virtual" category.  They are used 
102 when different packages can satisfy a dependency and only one of them is 
103 needed.
104 .br
105 More reading: 
106 .BR ebuild (5)
107 .RE
108 .SH "SPECIFIC FILE DESCRIPTIONS"
109 .TP
110 .BR /etc/
111 .RS
112 .TP
113 .BR make.globals
114 The global default settings for Portage.  This comes from the portage package 
115 itself.  Settings in \fBmake.conf\fR override values here.  The format 
116 is described extensivly in \fBmake.conf\fR(5).
117 .TP
118 .BR make.conf
119 The global custom settings for Portage.  See \fBmake.conf\fR(5).
120 .RE
121 .TP
122 .BR /etc/make.profile/
123 This is usually just a symlink to the correct profile in 
124 \fB/usr/portage/profiles/\fR.  Since it is part of the portage tree, it 
125 may easily be updated/regenerated by running `emerge \-\-sync`.  It defines 
126 what a profile is (usually arch specific stuff).  If you need a custom 
127 profile, then you should make your own \fB/etc/make.profile/\fR 
128 directory and populate it.  However, if you just wish to override some 
129 settings, do NOT edit these files because they WILL be lost with the 
130 next `emerge \-\-sync`.  See the section below on \fB/etc/portage/\fR for 
131 overriding.
132 .RS
133 .TP
134 .BR deprecated
135 The existence of this file marks a profile as deprecated, meaning it is 
136 not supported by Gentoo anymore.  The first line must be the profile to which 
137 users are encouraged to upgrade, optionally followed by some instructions 
138 explaining how they can upgrade.
139
140 .I Example:
141 .nf
142 default-linux/x86/2005.0
143 # emerge -n '>=sys-apps/portage-2.0.51'
144 # rm -f /etc/make.profile
145 # ln -s /usr/portage/profiles/default-linux/alpha/2005.0 /etc/make.profile
146 .fi
147 .TP
148 .BR make.defaults
149 The profile default settings for Portage.  The general format is described 
150 in \fBmake.conf\fR(5).  The \fImake.defaults\fR for your profile defines a 
151 few specific variables too:
152
153 .PD 0
154 .RS
155 .TP
156 .BR ARCH
157 Architecture type (x86/ppc/hppa/etc...).
158 .TP
159 .B USERLAND = \fI"GNU"\fR
160 Support BSD/cygwin/etc...
161 .TP
162 .B PORTAGE_LIBC = \fI"glibc"\fR
163 Support uClibc/BSD libc/etc...
164 .TP
165 .BR PROFILE_ARCH
166 Distinguish machines classes that have the same \fBARCH\fR.  All sparc 
167 machines have ARCH=sparc but set this to either 'sparc32' or 'sparc64'.
168 .TP
169 .BR STAGE1_USE
170 Special USE flags which may be needed when bootstrapping from stage1 to stage2.
171 .TP
172 .BR GRP_STAGE23_USE
173 Special USE flags used by catalyst for building a stage3 and GRP sets.
174 .RE
175 .PD 1
176 .TP
177 .BR packages
178 Provides the list of packages that compose the special \fIsystem\fR set.
179
180 .I Format:
181 .nf
182 \- comments begin with #
183 \- one DEPEND atom per line
184 \- packages to be added to the system set begin with a *
185 .fi
186 .I Note:
187 In a cascading profile setup, you can remove packages in children 
188 profiles which were added by parent profiles by prefixing the atom with 
189 a '\-'.
190
191 .I Example:
192 .nf
193 # i am a comment !
194 # pull in a version of glibc less than 2.3
195 *<sys\-libs/glibc\-2.3
196 # pull in any version of bash
197 *app\-shells/bash
198 # pull in a version of readline earlier than 4.2
199 *<sys\-libs/readline\-4.2
200 .fi
201 .TP
202 .BR packages.build
203 A list of packages (one per line) that make up a stage1 tarball.  Really only 
204 useful for stage builders.
205 .TP
206 .BR package.provided
207 A list of packages (one per line) that portage should assume have been 
208 provided.  Useful for porting to non-Linux systems.  Portage will not 
209 attempt to update a package that is listed here unless another package 
210 explicitly requires a version that is newer than what has been listed.  
211 Basically, it's a list that replaces the \fBemerge \-\-inject\fR syntax.
212
213 For example, if you manage your own copy of a 2.6 kernel, then you can 
214 tell portage that 'sys-kernel/development-sources-2.6.7' is already taken 
215 care of and it should get off your back about it.
216
217 Virtual packages (virtual/*) should not be specified in package.provided.
218 Depending on the type of virtual, it may be necessary to add an entry to the
219 virtuals file and/or add a package that satisfies a virtual to
220 package.provided.
221
222 .I Format:
223 .nf
224 \- comments begin with #
225 \- one DEPEND atom per line
226 \- relational operators are not allowed
227 \- must include a version
228 .fi
229
230 .I Example:
231 .nf
232 # you take care of the kernel
233 sys-kernel/development-sources-2.6.7
234
235 # you installed your own special copy of QT
236 x11-libs/qt-3.3.0
237
238 # you have modular X but packages want monolithic
239 x11-base/xorg-x11-6.8
240 .fi
241 .TP
242 .BR package.use.force
243 Per\-package USE flag forcing.
244
245 .I Note:
246 In a cascading profile setup, you can remove USE flags in children 
247 profiles which were added by parent profiles by prefixing the flag with 
248 a '\-'.
249
250 .I Format:
251 .nf
252 \- comments begin with #
253 \- one DEPEND atom per line with space-delimited USE flags
254 .fi
255
256 .I Example:
257 .nf
258 # force docs for GTK 2.x
259 =x11\-libs/gtk+\-2* doc
260 # unforce mysql support for QT
261 x11\-libs/qt \-mysql
262 .fi
263 .TP
264 .BR package.use.mask
265 Per\-package USE flag masks.
266
267 .I Note:
268 In a cascading profile setup, you can remove USE flags in children 
269 profiles which were added by parent profiles by prefixing the flag with 
270 a '\-'.
271
272 .I Format:
273 .nf
274 \- comments begin with #
275 \- one DEPEND atom per line with space-delimited USE flags
276 .fi
277
278 .I Example:
279 .nf
280 # mask docs for GTK 2.x
281 =x11\-libs/gtk+\-2* doc
282 # unmask mysql support for QT
283 x11\-libs/qt \-mysql
284 .fi
285 .TP
286 .BR parent
287 This contains a path to the parent profile.  It may be either relative or 
288 absolute.  The paths will be relative to the location of the profile.  Most 
289 commonly this file contains '..' to indicate the directory above.  Utilized 
290 only in cascading profiles.
291 .TP
292 .BR profile.bashrc
293 If needed, this file can be used to set up a special environment for ebuilds,
294 different from the standard root environment.  The syntax is the same as for
295 any other bash script.
296 .TP
297 .BR use.force
298 Some USE flags don't make sense to disable under certain conditions.  Here we
299 list forced flags.
300
301 .I Note:
302 In a cascading profile setup, you can remove USE flags in children 
303 profiles which were added by parent profiles by prefixing the flag with 
304 a '\-'.
305
306 .I Format:
307 .nf
308 \- comments begin with #
309 \- one USE flag per line
310 .fi
311 .TP
312 .BR use.mask
313 Some USE flags don't make sense on some archs (for example altivec on 
314 non\-ppc or mmx on non\-x86), or haven't yet been tested.  Here we list 
315 the masked ones.
316
317 .I Note:
318 In a cascading profile setup, you can remove USE flags in children 
319 profiles which were added by parent profiles by prefixing the flag with 
320 a '\-'.
321
322 .I Format:
323 .nf
324 \- comments begin with #
325 \- one USE flag per line
326 .fi
327 .TP
328 .BR virtuals
329 This controls what packages will provide a virtual by default.  For example, 
330 if a package needs to send e\-mail, it will need virtual/mta.  In the absence 
331 of a package that provides virtual/mta (like qmail, sendmail, postfix, etc...), 
332 portage will look here to see what package to use.  In this case, Gentoo uses 
333 net\-mail/ssmtp as the default (as defined in the virtuals file) because it's 
334 the package that does the very bare minimum to send e\-mail.
335
336 .I Format:
337 .nf
338 \- comments begin with #
339 \- one virtual and DEPEND atom base pair per line
340 .fi
341
342 .I Example:
343 .nf
344 # use net\-mail/ssmtp as the default mta
345 virtual/mta           net\-mail/ssmtp
346 # use app\-dicts/aspell\-en as the default dictionary
347 virtual/aspell\-dict   app\-dicts/aspell\-en
348 .fi
349 .RE
350 .TP
351 .BR /etc/portage/
352 Any file in this directory that begins with "package." can be more than just a 
353 flat file.  If it is a directory, then all the files in that directory will be 
354 summed together as if it were a single file.
355
356 .I Example:
357 .nf
358 /etc/portage/package.keywords/kde
359 /etc/portage/package.keywords/common
360 /etc/portage/package.keywords/e17
361 .fi
362 .RS
363 .TP
364 .BR bashrc
365 If needed, this file can be used to set up a special environment for ebuilds,
366 different from the standard root environment.  The syntax is the same as for
367 any other bash script.
368 .TP
369 .BR color.map
370 Contains variables customizing colors. See \fBcolor.map\fR(5).
371 .TP
372 .BR modules
373 This file can be used to override the metadata cache implementation.  In
374 practice, portdbapi.auxdbmodule is the only variable that the user will want to
375 override.
376
377 .I Example:
378 .nf
379 portdbapi.auxdbmodule = portage.cache.metadata_overlay.database
380 .fi
381
382 The metadata_overlay cache module makes it possible to disable
383 FEATURES="metadata-transfer" in \fBmake.conf\fR(5).  When the user initially
384 enables metadata_overlay in /etc/portage/modules, all of the cache files
385 contained in /var/cache/edb/dep/${PORTDIR} must be manually removed in order
386 to avoid unecessary cache regeneration.  In addition, users of the
387 metadata_overlay module must never modify eclasses in ${PORTDIR} because
388 portage will not be able to detect that cache regeneration is necessary.  If
389 the user would like to modify eclasses, it is safe to use metadata_overlay
390 together with PORTDIR_OVERLAY in \fBmake.conf\fR.
391 .TP
392 .BR package.keywords
393 Per\-package KEYWORDS.  Useful for mixing unstable packages in with a normally 
394 stable system or vice versa.  This will allow ACCEPT_KEYWORDS to be augmented
395 for a single package.
396
397 .I Format:
398 .nf
399 \- comment lines begin with # (no inline comments)
400 \- one DEPEND atom per line followed by additional KEYWORDS
401 \- lines without any KEYWORDS imply unstable host arch
402
403 .I Example:
404 # always use unstable libgd
405 media\-libs/libgd ~x86
406 # only use stable mplayer
407 media\-video/mplayer \-~x86
408 # always use unstable netcat
409 net-analyzer/netcat
410 .fi
411
412 .I Note:
413 .fi
414 In addition to the normal values from ACCEPT_KEYWORDS package.keywords supports
415 three special tokens:
416
417 .nf
418 \fB*\fR  package is visible if it is stable on any architecture
419 \fB~*\fR package is visible if it is in testing on any architecture
420 \fB**\fR package is always visible (KEYWORDS are ignored completely)
421 .fi
422
423 .I Additional Note:
424 If you encounter the \fB-*\fR KEYWORD, this indicates that the package is known 
425 to be broken on all systems which are not otherwise listed in KEYWORDS.  For 
426 example, a binary only package which is built for x86 will look like:
427
428 games-fps/quake3-demo-1.11.ebuild:KEYWORDS="-* x86"
429
430 If you wish to accept this package anyways, then use one of the other keywords in your 
431 package.keywords like this:
432
433 games-fps/quake3-demo x86
434
435 .TP
436 .BR package.mask
437 A list of package atoms to mask.  Useful if specific versions of packages do
438 not work well for you.  For example, you swear by the Nvidia drivers, but only
439 versions earlier than 1.0.4496.  No problem!
440
441 .I Format:
442 .nf
443 \- comment lines begin with # (no inline comments)
444 \- one DEPEND atom per line
445 .fi
446
447 .I Example:
448 .nf
449 # mask out versions 1.0.4496 of the nvidia
450 # drivers and later
451 >=media\-video/nvidia\-kernel\-1.0.4496
452 >=media\-video/nvidia\-glx\-1.0.4496
453 .fi
454 .TP
455 .BR package.unmask
456 Just like package.mask above, except here you list packages you want to 
457 unmask.  Useful for overriding the global package.mask file (see 
458 below).  Note that this does not override packages that are masked via 
459 KEYWORDS.
460 .TP
461 .BR package.use
462 Per\-package USE flags.  Useful for tracking local USE flags or for 
463 enabling USE flags for certain packages only.  Perhaps you develop GTK 
464 and thus you want documentation for it, but you don't want 
465 documentation for QT.  Easy as pie my friend!
466
467 .I Format:
468 .nf
469 \- comments begin with #
470 \- one DEPEND atom per line with space-delimited USE flags
471 .fi
472
473 .I Example:
474 .nf
475 # turn on docs for GTK 2.x
476 =x11\-libs/gtk+\-2* doc
477 # disable mysql support for QT
478 x11\-libs/qt \-mysql
479 .fi
480 .TP
481 .BR mirrors
482 Whenever portage encounters a mirror:// style URL it will look up the actual 
483 hosts here.  If the mirror set is not found here, it will check the global 
484 mirrors file at /usr/portage/profiles/thirdpartymirrors.  You may also set a 
485 special mirror type called "local".  This list of mirrors will be checked 
486 before GENTOO_MIRRORS and will be used even if the package has 
487 RESTRICT="mirror" or RESTRICT="fetch".
488
489 .I Format:
490 .nf
491 \- comments begin with #
492 \- mirror type followed by a list of hosts
493 .fi
494
495 .I Example:
496 .nf
497 # local private mirrors used only by my company
498 local ftp://192.168.0.3/mirrors/gentoo http://192.168.0.4/distfiles
499
500 # people in japan would want to use the japanese mirror first
501 sourceforge http://keihanna.dl.sourceforge.net/sourceforge
502
503 # people in tawain would want to use the local gnu mirror first
504 gnu ftp://ftp.nctu.edu.tw/UNIX/gnu/
505 .fi
506 .TP
507 .BR categories
508 A simple list of valid categories that may be used in /usr/portage, 
509 PORTDIR_OVERLAY, and PKGDIR (see \fBmake.conf\fR(5)).  This allows for custom 
510 categories to be created.
511
512 .I Format:
513 .nf
514 \- one category per line
515 .fi
516
517 .I Example:
518 .nf
519 app\-hackers
520 media\-other
521 .fi
522 .RE
523 .TP
524 .BR /usr/portage/profiles/
525 Global Gentoo settings that are controlled by the developers.  To override 
526 these settings, you can use the files in \fB/etc/portage/\fR.
527 .RS
528 .TP
529 .BR arch.list
530 A list of all valid KEYWORDS.  This does not include modifiers.
531
532 .I Format:
533 .nf
534 \- one KEYWORD per line
535 .fi
536
537 .I Example:
538 .nf
539 x86
540 ppc
541 sparc
542 .fi
543 .TP
544 .BR categories
545 A simple list of valid categories that may be used in /usr/portage, 
546 PORTDIR_OVERLAY, and PKGDIR (see \fBmake.conf\fR(5)).
547
548 .I Format:
549 .nf
550 \- one category per line
551 .fi
552
553 .I Example:
554 .nf
555 app\-admin
556 dev\-lang
557 games\-strategy
558 sys\-kernel
559 .fi
560 .TP
561 .BR info_pkgs
562 A list of all the packages which will be displayed when you run `emerge info`.
563 .TP
564 .BR info_vars
565 A list of all the variables which will be displayed when you run `emerge info`.
566 .TP
567 .BR package.mask
568 This contains a list of DEPEND atoms for packages that should not be installed 
569 in any profile.  Useful for adding the latest KDE betas and making sure no 
570 one accidentally upgrades to them.  Also useful for quickly masking specific 
571 versions due to security issues.  ALWAYS include a comment explaining WHY the 
572 package has been masked and WHO is doing the masking.
573
574 .I Format:
575 .nf
576 \- comments begin with #
577 \- one DEPEND atom per line
578 .fi
579
580 .I Example:
581 .nf
582 # masked for security reasons
583 <sys\-libs/zlib\-1.1.4
584 # <caleb@gentoo.org> (10 Sep 2003)
585 # new kde betas
586 =kde\-base/kde\-3.2.0_beta1
587 =kde\-base/kdeaccessibility\-3.2.0_beta1
588 .fi
589 .TP
590 .BR profiles.desc
591 List all the current stable and development profiles.  If a profile is listed 
592 here, then it will be checked by repoman.  At the moment, only 1 profile is 
593 allowed per stable/dev/KEYWORD; the last one found is the last one used.
594
595 .I Format:
596 .nf
597 \- comments begin with #
598 \- one profile list per line in format: arch dir status
599 \- arch must be listed in arch.list
600 \- dir is relative to profiles.desc
601 \- status must be 'stable' or 'dev'
602 .fi
603
604 .I Example:
605 .nf
606 alpha default-linux/alpha/2004.3 stable
607 m68k  default-linux/m68k         dev
608 x86   default-linux/x86/2004.3   stable
609 .fi
610 .TP
611 .BR thirdpartymirrors
612 Controls the mapping of mirror:// style URLs to actual lists of 
613 mirrors.  Keeps us from overloading a single server.
614
615 .I Format:
616 .nf
617 \- comments begin with #
618 \- mirror type followed by a list of hosts
619 .fi
620
621 .I Example:
622 .nf
623 sourceforge http://aleron.dl.sourceforge.net/sourceforge http://unc.dl.sourceforge.net/sourceforge
624
625 gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles
626
627 kernel http://www.kernel.org/pub http://www.us.kernel.org/pub
628 .fi
629 .TP
630 .BR use.desc
631 All global USE flags must be listed here with a description of what they do.  
632
633 .I Format:
634 .nf
635 \- comments begin with #
636 \- use flag \- some description
637 .fi
638
639 .I Example:
640 .nf
641 3dfx \- Adds support for 3dfx video cards
642 acl \- Adds support for Access Control Lists
643 doc \- Adds extra documentation
644 .fi
645 .TP
646 .BR use.local.desc
647 All local USE flags must be listed here along with the package and a 
648 description.
649
650 .nf
651 .I Format:
652 \- comments begin with #
653 \- package:use flag \- description
654
655 .I Example:
656 app\-editors/nano:justify \- Toggles the justify option
657 dev\-libs/DirectFB:fusion \- Adds Multi Application support
658 games\-emulation/xmess:net \- Adds network support
659 .fi
660 .RE
661 .TP
662 .BR /var/cache/edb/
663 .RS
664 This directory is used to store internal portage cache files.  The names and
665 purpose of these files are not documented on purpose so as to keep down bitrot
666 as internals change.  If you aren't working on portage internally, then the
667 details most likely do not matter to you.
668
669 This entire directory can be safely deleted.  It is highly recommended you do
670 not do this however as it can be a time consuming process to generate them all
671 again.
672 .RE
673 .TP
674 .BR /var/db/pkg/
675 .RS
676 All installed package information is recorded here.  If portage thinks you have
677 a package installed, it is usually because it is listed here.
678
679 The format follows somewhat closely that of the portage tree.  There is a
680 directory for each category and a package-version subdirectory for each package
681 you have installed.
682
683 Inside each package directory are misc files that describe the installed
684 contents of the package as well as build time information (so that the package
685 can be unmerged without needing the portage tree).
686
687 The exact file contents and format are not described here again so that things
688 can be changed quickly.  Generally though there is one file per environment
689 variable that "matters" (like CFLAGS) with the contents stored inside of it.
690 Another common file is the CONTENTS file which lists the path and hashes of
691 all objects that the package installed onto your system.
692 .RE
693 .TP
694 .BR /var/lib/portage/
695 .RS
696 .TP
697 .BR config
698 Hashes which are used to determine whether files in config protected
699 directories have been modified since being installed.  Files which have not
700 been modified will automatically be unmerged.
701 .TP
702 .BR world
703 Every time you emerge a package, the package that you requested is 
704 recorded here.  Then when you run `emerge world \-up`, the list of 
705 packages is read from this file.  Note that this does not mean that the 
706 packages that were installed as dependencies are listed here.  For 
707 example, if you run `emerge mod_php` and you do not have apache 
708 already, then "dev\-php/mod_php" is recorded in the world file but 
709 "net\-www/apache" is not.  For more information, review \fBemerge\fR(1).
710
711 .I Format:
712 .nf
713 \- one DEPEND atom base per line
714 .fi
715
716 .I Example:
717 .nf
718 games\-misc/fortune\-mod\-gentoo\-dev
719 dev\-libs/uclibc
720 app\-cdr/cdemu
721 .fi
722 .RE
723 .SH "REPORTING BUGS"
724 Please report bugs via http://bugs.gentoo.org/
725 .SH "AUTHORS"
726 .nf
727 Marius Mauch <genone@gentoo.org>
728 Mike Frysinger <vapier@gentoo.org>
729 Drake Wyrm <wyrm@haell.com>
730 .fi
731 .SH "SEE ALSO"
732 .BR emerge (1),
733 .BR ebuild (1),
734 .BR ebuild (5),
735 .BR make.conf (5),
736 .BR color.map (5)