Gentoo local overlay
September 18, 2018 —
Jesse Harris
I find myself having to create a local overlay to test/develop a new ebuild without affecting my main system from time to time. I usually fire up a clean kvm Gentoo guest to start working on, but I've usually forgotten the proceedure
This is a quick instruction on a straight-forward local overlay
Create the local path tree where the overlay will reside:
mkdir -p /usr/local/portage/overlay/{metadata,profiles}
Create the
layout.conf
file andrepo_name
filecd /usr/local/portage/overlay echo "masters = gentoo" > metadata/layout.conf echo "$(hostname)" > profiles/repo_name
Create a repos.conf file:
cat <<EOF>/etc/portage/repos.conf/$(hostname).conf [$(hostname)] location = /usr/local/portage/overlay auto-sync = no priority = 10 EOF
done.
Now you can begin to populate the local repo with custom ebuilds. I usually do this and then upload my new ebuild to my github repository.
See also:
Tags: gentoo, portage-overlay