Portage has several additional features that makes your Gentoo experience even better. Many of these features rely on certain software tools that improve performance, reliability, security, ...
To enable or disable certain Portage features you need to edit
Not all features that Portage supports are listed here. For a full overview,
please consult the
$ man make.conf
To find out what FEATURES are default set, run
$ emerge --info | grep FEATURES
You can find more information about
Distcc ships with a graphical monitor to monitor tasks that your computer is sending away for compilation. If you use Gnome then put 'gnome' in your USE variable. However, if you don't use Gnome and would still like to have the monitor then you should put 'gtk' in your USE variable.
# emerge distcc
Add
Now run
# distcc-config --set-hosts "192.168.1.102 192.168.1.103 192.168.1.104"
Don't forget to run the
# rc-update add distccd default # /etc/init.d/distccd start
If you are interested in the ins and outs of ccache, please visit the
To install
# emerge ccache
Open
CCACHE_SIZE="2G"
To check if ccache functions, ask ccache to provide you with its statistics.
Because Portage uses a different ccache home directory, you need to set the
# CCACHE_DIR="/var/tmp/ccache" ccache -s
The
However, if you would run
If you would like to use ccache for non-Portage compilations, add
PATH="/usr/lib/ccache/bin:/opt/bin:${PATH}"
Portage supports the installation of prebuilt packages. Even though Gentoo does not provide prebuilt packages by itself (except for the GRP snapshots) Portage can be made fully aware of prebuilt packages.
To create a prebuilt package you can use
If you want Portage to create prebuilt packages of every single package you
install, add
More extended support for creating prebuilt package sets can be obtained with
Although Gentoo doesn't provide one, you can create a central repository where you store prebuilt packages. If you want to use this repository, you need to make Portage aware of it by having the PORTAGE_BINHOST variable point to it. For instance, if the prebuilt packages are on ftp://buildhost/gentoo:
PORTAGE_BINHOST="ftp://buildhost/gentoo"
When you want to install a prebuilt package, add the
For instance, to install
# emerge --usepkg --getbinpkg gnumeric
More information about emerge's prebuilt package options can be found in the emerge man page:
$ man emerge
When you are emerging a series of packages, Portage can fetch the source files for the next package in the list even while it is compiling another package, thus shortening compile times. To make use of this capability, add "parallel-fetch" to your FEATURES. Note that this is on by default, so you shouldn't need to specifically enable it.
When Portage is run as root, FEATURES="userfetch" will allow Portage to drop root privileges while fetching package sources. This is a small security improvement.
As an administrator, you can opt to only update your local Portage tree with a cryptographically validated Portage tree snapshot as released by the Gentoo infrastructure. This ensures that no rogue rsync mirror is adding unwanted code or packages in the tree you are downloading.
To configure Portage, first create a truststore in which you download and accept
the keys of the Gentoo Infrastructure responsible for signing the Portage tree
snapshots. Of course, if you want to, you can validate this GPG key as per the
# mkdir -p /etc/portage/gpg # chmod 0700 /etc/portage/gpg(... Substitute the keys with those mentioned on the release engineering site ...) # gpg --homedir /etc/portage/gpg --keyserver subkeys.pgp.net --recv-keys 0x239C75C4 0x96D8BF6D # gpg --homedir /etc/portage/gpg --edit-key 0x239C75C4 trust # gpg --homedir /etc/portage/gpg --edit-key 0x96D8BF6D trust
Next, edit
FEATURES="webrsync-gpg" PORTAGE_GPG_DIR="/etc/portage/gpg" SYNC=""
That's it. Next time you run