I would like to install custom source from a git repository, but using my package manager (emerge for portage).
I have installed Gentoo using EFI using Sakaki's tutorial, so I have already emerged
'# enable the snapd systemd service:
sudo systemctl enable --now snapd.service
Steps Tried that Didn't Work
First I tried to add the prerequisite git .ebuilds as repositories by putting them in my
/etc/portage/repos.conf/ directory (two separate entries). I'll post one here as an example:
[zyga-snap-confine] # Snapd build dependency #1 # Maintainer: obscured location = /usr/local/portage/zyga-snap-confine sync-type = git sync-uri = https://github.com/zyga/snap-confine-gentoo.git priority = 60 auto-sync = yes
I synced the repos,
emaint sync --repo zyga-snap-confine. And then I tried finding the packages that I wanted via both
emerge --search and
eix. No luck.
It tossed errors about missing layout, a master = gentoo entry...I realize that there was missing metadata, but I had high hopes.
I finally found a reference with what to do with an ebuild. In the official Gentoo Wiki, and from other posts here (Installing Git, Curl, and Expat from Source) and here (How to package software in Funtoo/Gentoo?), I decided to:
root@Gentoo ~ # cd /opt root@Gentoo opt # git clone https://github.com/zyga/snap-confine-gentoo.git root@Gentoo opt # cd snap-confine-gentoo root@Gentoo snap-confine-gentoo # ebuild snap-confine-1.0.32.ebuild manifest clean merge
However, it returned errors:
Appending / to PORTDIR_OVERLAY... !!! Repository 'x-' is missing masters attribute in '/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility ebuild: /opt/snap-confine-gentoo/snap-confine-1.0.32.ebuild: does not seem to have a valid PORTDIR structure
I'm relatively new to Gentoo and am self-taught on Linux, and I couldn't find a tutorial on repo maintenance in the Gentoo forums (there is a developer's guide, but it assumes a lot of knowledge). An ideal answer will provide both the cli method (I assume using
git clone ...and
./configure?) as well as the package manager version.
Even if I have to create my own git repository to add missing metadata and layout files - I would prefer to manage the snapd installation that way.