zigford.org/snaps-on-gentoo.html
2020-07-21 06:49:32 +10:00

109 lines
5.2 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="main.css" type="text/css" />
<link rel="stylesheet" href="blog.css" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="Subscribe to this page..." href="feed.rss" />
<title>Snaps on Gentoo</title>
</head><body>
<div id="divbodyholder">
<div class="headerholder"><div class="header">
<div id="title">
<h1 class="nomargin"><a class="ablack" href="http://zigford.org/index.html">zigford.org</a></h1>
<div id="description"><a href="about.html">About</a><a href="links.html"> | Links</a><a href="scripts.html"> | Scripts</a><br>Sharing linux/windows scripts and tips</br></div>
</div></div></div>
<div id="divbody"><div class="content">
<!-- entry begin -->
<h3><a class="ablack" href="snaps-on-gentoo.html">
Snaps on Gentoo
</a></h3>
<!-- bashblog_timestamp: #201808122312.04# -->
<div class="subtitle">August 12, 2018 &mdash;
Jesse Harris
</div>
<!-- text begin -->
<h2 id="update-07092019">Update 07/09/2019</h2>
<p>Snapd is now in a overlay on it's on for your convenience. See
<a href="snapd-repository-for-gentoo.html">here</a></p>
<h2 id="update">Update</h2>
<p>The instructions to get snaps working on gentoo here are outdated. See my
current post <a href="snaps-on-gentoo---the-saga-continues.html">Snaps on Gentoo - The saga continues</a></p>
<h2 id="why">Why?</h2>
<p>Many will think it is heresy to put binary packages on a Gentoo system
let alone a package system which encourages binary packages to come with
their own set of shared libraries.</p>
<p>While I tend to agree, the practicality of sticking to this arrangement
can be difficult for a couple of cases. Here are a few I can think of:</p>
<ul>
<li>Source not available</li>
<li>No binary package or source ebuild for Gentoo</li>
<li>ebuild takes too long to compile</li>
</ul>
<p>In the case of ebuilds taking too long (eg. chromium), I have a limited
budget and can't really afford to leave my power hungry desktop on 24/7
to keep chromium builds up-to-date.</p>
<p>Here are a quick list of software that I use which fall into one of these
categories:</p>
<ul>
<li>Citrix Reciever</li>
<li>Powershell (Available as source, but no ebuild and I haven't had the
time to try write one myself)</li>
<li>Minecraft (Gaming with the kids)</li>
<li>Discord (Chatting with games)</li>
<li>Chromium (Primarily a firefox user, but have some trouble with getting it
to see and work with Citrix)</li>
</ul>
<p>With my excuses for putting snap's on Gentoo out of the way, here is how
I've got it working for my systems.</p>
<h2 id="overlay">Overlay</h2>
<p>There are a few overlay's for Gentoo out there. Even an official one
maintained (or as the case may be, unmaintained) by
<a href="https://github.com/zyga">zyga</a> from Canonical. I tried that one, and many
of the forks with no such luck.</p>
<p>After googling around I stumbled on a thread on
<a href="https://forum.snapcraft.io/t/gentoo-update-needed/3029/15">snapcraft.io</a>
and a post from user jamesb192 about the progress on their snapd overlay.</p>
<p><a href="https://github.com/JamesB192/JamesB192-overlay">JamesB192 overlay</a> works,
but it doesn't have an overlay.xml file for adding with layman.
To overcome this, I've hosted one on my site
<a href="http://jesseharrisit.com/overlay.xml">here</a>. You can add this to your
system using overlay like this:</p>
<pre><code> echo app-portage/layman git &gt;&gt; /etc/portage/package.use/layman
emerge app-portage/layman
layman -o http://jesseharrisit.com/overlay.xml -f -a gentoo-zigford
</code></pre>
<p>Now that you have the overlay installed should be able to emerge snapd
like so:</p>
<pre><code> emerge app-emulation/snapd
</code></pre>
<p><em>Note - You may need to adjust your kernel config and the ebuild is
pretty good at highlighting which options need to be set.</em></p>
<h2 id="issues">Issues</h2>
<p>During my testing of snaps on Gentoo, I've come across a couple of issues
that either have been solved or could be solved in the ebuild</p>
<ol>
<li>snap packages only install and run as root (This was solved by setting
suid on /usr/lib64/snapd/snap-confine, and solved in ebuild 2.34)</li>
<li>/var/lib/snapd not created (manually mkdir the directory)</li>
</ol>
<h2 id="final-thoughts">Final thoughts.</h2>
<p>Snap packages feel like a great augmentation for Gentoo. It allows me to
keep using Gentoo as a daily driver and augment some of it's missing
packages with packages from more popular distros.</p>
<p>Tags: <a href='tag_gentoo.html'>gentoo</a>, <a href='tag_snapd.html'>snapd</a>, <a href='tag_overlay.html'>overlay</a></p>
<!-- text end -->
<!-- entry end -->
</div>
<div id="footer">&copy <a href="http://twitter.com/zigford_org">Jesse Harris</a> &mdash; <a href="mailto:jesse&#64;zigford&#46;org">jesse&#64;zigford&#46;org</a><br/>
Generated with <a href="https://github.com/cfenollosa/bashblog">bashblog</a>, a single bash script to easily create blogs like this one</div>
</div></div>
</body></html>