View on GitHub

2.6 Custom Overlays

Download this project as a .zip file Download this project as a tar.gz file

2.6 Custom Overlays

Overview

I've put some info here on creating your own custom overlays

Overlay Setup

Userpriv feature

One of the security features enabled by default within portage / emerge, is to always run commands such as emerge or ebuild as the portage user. If your working on an overlay and it's in a place portage can't access, this can cause a problem.

One work around to this (although this makes the system a little less secure) is to just turn off the userpriv feature.

nano -w /etc/portage/make.conf

FEATURES="-userpriv"

To see which features are already enabled

emerge --info | grep ^FEATURES=

Custom Overlays

If you want to setup your own overlay on github, one useful tool is

layman-overlay-maker

To generate the xml for layman. However you'll need layman 2.2.0 or later to use it

emerge --autounmask-write =app-portage/layman-2.3.0

I'd recommend going back to the default layman version after using layman-overlay-maker. I had problems with 2.3.0

Ebuild Setup

Creating the Digest

The first step is to create a digest / Manifest file for the ebuild, this just acts as a verification when downloading the source for the emerge that the correct source files have been downloaded

ebuild <filename>.ebuild digest

The end result should be changes or the addition of a Manifest file also the sources for the ebuild will be downloaded into /usr/portage/distfiles/ This needs to be done whenever the ebuild file is changed, before it can be used for emerge

Unpack the Sources

The next stage is to unpack / uncompress the sources

ebuild <filename>.ebuild unpack

TODO