Overlay
From Gentoo Linux Wiki
| Please format this article according to the Style Guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article.
Reason(s): No reason supplied. |
Overlays are used in gentoo to manage packages not available in the portage tree. Packages in overlays are exactly like normal packages. There are a lot of overlays already available for you to use, but you can also add a local overlay to install your own ebuilds.
Contents |
[edit] Which overlays do I want?
How you decide which overlays to add is of course fully up to you. However, as a general advice, you should not add overlays you don't need, for this clutters up your package trees and might introduce bugs the Gentoo developers cannot fix. The Gentoo Overlays Project is an effort to provide a central repository for overlays. The left column contains all the overlays that are strongly associated with a Gentoo project or a Gentoo developer.
There are lots of these third-party externally produced overlays, some of which are quite specialized. This page lists some of those.
Also remember that untrustworthy ebuilds may be deliberately malicious. Ebuilds could contain security problems such as contaminated versions of core applications like GCC or OpenSSH. Be careful.
Finally, you may want a local overlay to add ebuilds which don't exist in any public overlay, for example ebuilds from bugs.gentoo.org.
[edit] Software
How and where you setup overlays depends on which package manager you're using and what kind of overlay you want.
[edit] Paludis
Paludis has full native support for multiple repositories. Overlays are merely a special case where a repository has another 'master' repository.
In its default location, /etc/paludis/repositories contains configuration files for overlays. You can add an overlay by manually writing new files, or by using playman -- a ruby script included with Paludis when built with ruby. playman can only create repository information files, not modify or delete them. You'll have to do this manually.
Please note that if you're using Paludis, you might not need a local overlay, because paludis comes with a neat tool called importare.
[edit] Layman
Layman is a tool designed to help automate management of your local repository of overlays you want included into your Gentoo system. It downloads a list of existing overlays from the Internet, and it can only handle overlays from this list. Most of its documentation can be found on its website or man page. Start with installing Layman.
Additionally you will probably need to emerge "dev-util/subversion" and "dev-util/git", since otherwise layman will by default show only strictly checked rsync-overlays. Which might be just one...
In its default configuration Layman doesn't mangle your configuration files. You should manually edit make.conf to incorporate the layman-managed overlays with the following command.
For layman versions prior to 1.2.0 use:
For layman versions 1.2.0 and later use:
Ensure that layman has a working PORTDIR_OVERLAY env variable:
echo 'PORTDIR_OVERLAY="${PORTDIR_OVERLAY}"' >> /usr/local/portage/layman/make.conf
Download (or update) the list of available overlays:
You can print a list of overlays to choose from:
Finally you can select and add an overlay:
Most of the overlays listed here are supported by layman. If you feel there should be an entry added, removed or edited from the central list that layman uses, send a mail to overlays-at-gentoo-dot-org.
From time to time you can update the overlay :
You can also chose to update all your selected overlays with:
[edit] Creating a local overlay
To create a local overlay, the first step is to choose a directory in which it will live. A common place is /usr/local/portage/. Create that directory now.
In accordance with portage overlay specifications, we'll need to add a file specifying the name of the repository. For all conveniences, we'll name the local overlay local_overlay. Create a profiles directory and add a repo_name file:
[edit] Local overlays in portage
Now we'll update /etc/make.conf. Open it up. Find this line:
source /usr/local/portage/layman/make.conf
And add below:
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"
[edit] Local overlays in paludis
Paludis users need to create a new file in /etc/paludis/repositories/, for example one called /etc/paludis/repositories/local_overlay.conf. In it, place these contents:
location=${ROOT}/usr/local/portage/
sync =
master_repository = gentoo
format = ebuild
names_cache = ${location}/.cache/names
write_cache = /var/cache/paludis/metadata
And sync this repository:
[edit] Populating your local overlay
Now you can add ebuilds to /usr/local/portage/ in the same way the portage tree, or any ebuild-style overlay is populated. For example, if you want to emerge www-foo/foofox-3.5 which you found in the bugtracker, create a directory /usr/local/portage/www-foo/foofox/ and add the ebuild in there. Then cd to that directory, and make a digest of the ebuild:
Now you can install it like any other package. If you're using paludis, don't forget to sync your local overlay first.
[edit] Deprecated Utility Programs
[edit] Gensync
Please note that not all the alternate ebuild sites listed here are available via gensync. Gensync is part of gentoolkit-dev. To install gensync:
After that you can copy and paste some of the following overlay destinations. Remember that the folder which is stated in "overlay" must exist.
To update the overlay you have to use gensync. This is not done by emerge --sync.
<id> is the same id as in the description files. It is useful to put an alias in ~/.bashrc (or the appropiate file for your shell) to synchronize everything.
After updating, edit your make.conf so that Portage can see your new overlay. If you use more than one overlay, separate the directories with a space:
# For example: # PORTDIR_OVERLAY="/usr/local/gentoo-de" PORTDIR_OVERLAY="FULL/PATH/TO/OVERLAY1 FULL/PATH/TO/OVERLAY2"
[edit] See Also
- List of overlays
- Playman - For setting up overlays using Paludis.
- http://www.gentoo-wiki.info/HOWTO_Installing_3rd_Party_Ebuilds
[edit] External Links
- Gentoo Overlays
- Project Sunrise - Gentoo User Overlay
- Layman
- Gentoo.zapto.org Search engine for packages in the main tree, plus overlays.
- gpo.zugaina.org Search engine for packages in overlays only.