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

82 lines
3.0 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>Gentoo local overlay</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="gentoo-local-overlay.html">
Gentoo local overlay
</a></h3>
<!-- bashblog_timestamp: #201809180909.41# -->
<div class="subtitle">September 18, 2018 &mdash;
Jesse Harris
</div>
<!-- text begin -->
<p>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</p>
<p>This is a quick instruction on a straight-forward local overlay</p>
<ol>
<li><p>Create the local path tree where the overlay will reside:</p>
<pre><code>mkdir -p /usr/local/portage/overlay/{metadata,profiles}
</code></pre></li>
<li><p>Create the <code>layout.conf</code> file and <code>repo_name</code> file</p>
<pre><code>cd /usr/local/portage/overlay
echo "masters = gentoo" &gt; metadata/layout.conf
echo "$(hostname)" &gt; profiles/repo_name
</code></pre></li>
<li><p>Create a repos.conf file:</p>
<pre><code>cat &lt;&lt;EOF&gt;/etc/portage/repos.conf/$(hostname).conf
[$(hostname)]
location = /usr/local/portage/overlay
auto-sync = no
priority = 10
EOF
</code></pre></li>
</ol>
<h2>done.</h2>
<p>Now you can begin to populate the local repo with custom ebuilds. I usually do
this and then upload my new ebuild to my <a href="https://github.com/zigford/gentoo-zigford">github</a> repository.</p>
<p>See also:</p>
<p><a href="https://wiki.gentoo.org/wiki//etc/portage/repos.conf">repos.conf</a>, <a href="https://wiki.gentoo.org/wiki/Custom_repository">Custom Repository</a></p>
<p>Tags: <a href='tag_gentoo.html'>gentoo</a>, <a href='tag_portage-overlay.html'>portage-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>