Ebuild repository

An overlay is an additional repository that Portage takes into account when dealing with software.

Within Gentoo Linux, users already have one "main" package repository, called the Portage tree. This main repository contains all the software packages (called ebuilds) maintained by Gentoo developers. But users can add additional repositories to the tree that are "layed over" the main tree - hence the name, overlays.

Since package repositories are nothing more (or less) than a set of files (ebuilds, metadata files, ChangeLog entries ...) these repositories can be pulled in from public repositories (git, cvs, svn ...) or downloaded as tarballs and extracted manyally on the system. It is however well advised to use managed repositories by trusted third parties as any installed overlay will cause Portage to look into those files as well when deciding which software to install.

Treatment of overlays
Portage uses the  variable to link to the installed overlays on the system. This variable uses a space-delimited list of paths on the system where Portage can find the roots of the additional repositories.

Manually setting overlay locations
When you want to create an overlay yourself, create a location (say ) in which you will put the packages you want Portage to look into as well. Then add  to your /etc/make.conf file:

Using layman
To make management of multiple overlays simple, a tool called layman is developed. This tool knows about popular user- and developer managed overlays and is able to install & synchronize them as well as add them to the  location.