mirror of
https://github.com/mudler/luet.git
synced 2025-07-31 06:50:21 +00:00
1732 lines
275 KiB
XML
1732 lines
275 KiB
XML
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||
<channel>
|
||
<title>Luet – Documentation</title>
|
||
<link>https://luet.io/docs/</link>
|
||
<description>Recent content in Documentation on Luet</description>
|
||
<generator>Hugo -- gohugo.io</generator>
|
||
|
||
<atom:link href="https://luet.io/docs/index.xml" rel="self" type="application/rss+xml" />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<item>
|
||
<title>Docs: Building packages</title>
|
||
<link>https://luet.io/docs/concepts/overview/build_packages/</link>
|
||
<pubDate>Thu, 05 Jan 2017 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/overview/build_packages/</guid>
|
||
<description>
|
||
|
||
|
||
<h2 id="prerequisistes">Prerequisistes</h2>
|
||
<p>Luet currently supports <a href="https://www.docker.com/">Docker</a> and <a href="https://github.com/genuinetools/img">Img</a> as backends to build packages. Both of them can be used and switched in runtime with the <code>--backend</code> option, so either one of them must be present in the host system.</p>
|
||
<h3 id="docker">Docker</h3>
|
||
<p>Docker is the (less) experimental Luet engine supported. Be sure to have Docker installed and the daemon running. The user running <code>luet</code> commands needs the corresponding permissions to run the <code>docker</code> executable, and to connect to a <code>docker</code> daemon. The only feature needed by the daemon is the ability to build images, so it fully supports remote daemon as well (this can be specified with the <code>DOCKER_HOST</code> environment variable, that is respected by <code>luet</code>)</p>
|
||
<h3 id="img">Img</h3>
|
||
<p>Luet supports <a href="https://github.com/genuinetools/img">Img</a>. To use it, simply install it in your system, and while running <code>luet build</code>, you can switch the backend by providing it as a parameter: <code>luet build --backend img</code>. For small packages it is particularly powerful, as it doesn&rsquo;t require any docker daemon running in the host.</p>
|
||
<h3 id="building-packages-on-kubernetes">Building packages on Kubernetes</h3>
|
||
<p>Luet and img can be used together to orchestrate package builds also on kubernetes. There is available an experimental <a href="https://github.com/mudler/luet-k8s">Kubernetes CRD for Luet</a> which allows to build packages seamelessly in Kubernetes and push package artifacts to an S3 Compatible object storage (e.g. Minio).</p>
|
||
<h2 id="building-packages">Building packages</h2>
|
||
<p><img src="https://luet.io/docs/tree.jpg" alt="Build packages"></p>
|
||
<p>Luet provides an abstraction layer on top of the container image layer to make the package a first class construct. A package definition and all its dependencies are translated by Luet to Dockerfiles which can then be built anywhere that docker runs.</p>
|
||
<p>To resolve the dependency tree Luet uses a SAT solver and no database. It is responsible for calculating the dependencies of a package and to prevent conflicts. The Luet core is still young, but it has a comprehensive test suite that we use to validate any future changes.</p>
|
||
<p>Building a package with Luet requires only a <a href="https://luet.io/docs/concepts/packages/specfile">definition</a>. This definition can be self-contained and be only composed of one <a href="https://luet.io/docs/concepts/packages/specfile">specfile</a>, or a group of them, forming a Luet tree. For more complex use-cases, see <a href="https://luet.io/docs/concepts/packages/collections">collections</a>. Luet also supports building packages from standard <code>Dockerfile</code> directly.</p>
|
||
<p>Run <code>luet build --help</code> to get more help for each parameter.</p>
|
||
<p>Build accepts a list of packages to build, which syntax is in the <code>category/name-version</code> notation. See also <a href="https://luet.io/docs/concepts/packages/specfile/#refering-to-packages-from-the-cli">specfile documentation page</a> to see how to express packages from the CLI.</p>
|
||
<h2 id="reproducible-builds">Reproducible builds</h2>
|
||
<p>Pinning a container build is not easy - there are always so many moving pieces, and sometimes just set <code>FROM</code> an image tag might not be enough.</p>
|
||
<p>Luet while building a package generates intermediate images that are stored and can be optionally pushed in a registry. Those images can be re-used by Luet if building again the same tree to guarantuee highly reproducible builds.</p>
|
||
<h2 id="environmental-variables">Environmental variables</h2>
|
||
<p>Luet builds passes its environment variable at the engine which is called during build, so for example the environment variable <code>DOCKER_HOST</code> or <code>DOCKER_BUILDKIT</code> can be setted.</p>
|
||
<p>Every argument from the CLI can be setted via environment variable too with a <code>LUET_</code> prefix, for instance the flag <code>--clean</code>, can be setted via environment with <code>LUET_CLEAN</code>, <code>--privileged</code> can be enabled with <code>LUET_PRIVILEGED</code> and so on.</p>
|
||
<h2 id="supported-compression-format">Supported compression format</h2>
|
||
<p>At the moment, <code>luet</code> can compress packages and tree with <code>zstd</code> and <code>gzip</code>. For example:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">luet build --compression zstd ...
|
||
</code></pre></div><p>Will output package compressed in the zstd format.</p>
|
||
<p>See the <code>--help</code> of <code>create-repo</code> and <code>build</code> to learn all the available options.</p>
|
||
<h2 id="example">Example</h2>
|
||
<p>Luet can seamlessly build packages also from Dockerfiles (<em>since luet&gt;=0.32.0</em>), consider the following example, that will generate a <code>curl</code> package from an <code>alpine</code> image:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$&gt; <span style="color:#8f5902;font-style:italic"># put yourself in some workdir</span>
|
||
|
||
$~/workdir&gt; mkdir curl
|
||
|
||
$~/workdir&gt; cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; curl/Dockerfile
|
||
</span><span style="color:#4e9a06">FROM alpine
|
||
</span><span style="color:#4e9a06">apk add curl
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
$~/workdir&gt; luet build --all
|
||
</code></pre></div><p>However, <code>luet</code> supports an extended syntax that allows to define packages with a more fine-grained control, templating support, and several other features that makes creation batch images much faster.</p>
|
||
<h3 id="the-extended-syntax">The extended syntax</h3>
|
||
<p>A <a href="https://luet.io/docs/concepts/packages/specfile">package definition</a> is composed of a <code>build.yaml</code> and a sibiling <code>definition.yaml</code>.</p>
|
||
<p>In the following example, we are creating a dummy package (<code>bar/foo</code>). Which ships one file only, <code>/foo</code></p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$&gt; <span style="color:#8f5902;font-style:italic"># put yourself in some workdir</span>
|
||
|
||
$~/workdir&gt; mkdir package
|
||
|
||
$~/workdir&gt; cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; package/build.yaml
|
||
</span><span style="color:#4e9a06">image: busybox
|
||
</span><span style="color:#4e9a06">steps:
|
||
</span><span style="color:#4e9a06">- echo &#34;foo=bar&#34; &gt; /foo
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
$~/workdir&gt; cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; package/definition.yaml
|
||
</span><span style="color:#4e9a06">name: &#34;foo&#34;
|
||
</span><span style="color:#4e9a06">version: &#34;0.1&#34;
|
||
</span><span style="color:#4e9a06">category: &#34;bar&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
</code></pre></div><p>To build it, simply run <code>luet build bar/foo</code> or <code>luet build --all</code> to build all the packages in the current directory:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$&gt; luet build --all
|
||
|
||
📦 Selecting foo 0.1
|
||
📦 Compiling foo version 0.1 .... ☕
|
||
🐋 Downloading image luet/cache-foo-bar-0.1-builder
|
||
🐋 Downloading image luet/cache-foo-bar-0.1
|
||
📦 foo Generating 🐋 definition <span style="color:#204a87;font-weight:bold">for</span> builder image from busybox
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder <span style="color:#204a87;font-weight:bold">done</span>
|
||
Sending build context to Docker daemon 4.096kB
|
||
...
|
||
|
||
</code></pre></div><p>Luet &ldquo;trees&rdquo; are just a group of specfiles, in the above example, our tree was the current directory. You can also specify a directory with the <code>--tree</code> option. Luet doesn&rsquo;t enforce any tree layout, so they can be nested at any level. The only rule of thumb is that a <code>build.yaml</code> file needs to have either a <code>definition.yaml</code> or a <code>collection.yaml</code> file next to it.</p>
|
||
<h2 id="nesting-dependencies">Nesting dependencies</h2>
|
||
<p>In the example above we have created a package from a <code>delta</code>. Luet by default creates packages by analyzing the differences between the generated containers, and extracts the differences as archive, the resulting files then are compressed and can be consumed later on by <code>luet install</code>.</p>
|
||
<p>Luet can create packages from different <a href="https://luet.io/docs/docs/concepts/packages/specfile/#building-strategies">building strategies</a>: by delta, by taking a whole container content, or by considering a single directory in the build container.</p>
|
||
<p>Besides that, <a href="https://luet.io/docs/docs/concepts/packages/specfile/#build-time-dependencies">a package can reference a strict dependency on others</a>.</p>
|
||
<h3 id="example-1">Example</h3>
|
||
<p>Let&rsquo;s extend the above example with two packages which depends on it during the build phase.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$~/workdir&gt; mkdir package2
|
||
|
||
$~/workdir&gt; cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; package2/build.yaml
|
||
</span><span style="color:#4e9a06">requires:
|
||
</span><span style="color:#4e9a06">- name: &#34;foo&#34;
|
||
</span><span style="color:#4e9a06"> category: &#34;bar&#34;
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0&#34;
|
||
</span><span style="color:#4e9a06">
|
||
</span><span style="color:#4e9a06">steps:
|
||
</span><span style="color:#4e9a06">- source /foo &amp;&amp; echo &#34;$foo&#34; &gt; /bar
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
$~/workdir&gt; cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; package2/definition.yaml
|
||
</span><span style="color:#4e9a06">name: &#34;ineedfoo&#34;
|
||
</span><span style="color:#4e9a06">version: &#34;0.1&#34;
|
||
</span><span style="color:#4e9a06">category: &#34;bar&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
|
||
$~/workdir&gt; mkdir package3
|
||
|
||
$~/workdir&gt; cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; package3/build.yaml
|
||
</span><span style="color:#4e9a06">requires:
|
||
</span><span style="color:#4e9a06">- name: &#34;foo&#34;
|
||
</span><span style="color:#4e9a06"> category: &#34;bar&#34;
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0&#34;
|
||
</span><span style="color:#4e9a06">- name: &#34;ineedfoo&#34;
|
||
</span><span style="color:#4e9a06"> category: &#34;bar&#34;
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0&#34;
|
||
</span><span style="color:#4e9a06">
|
||
</span><span style="color:#4e9a06">steps:
|
||
</span><span style="color:#4e9a06">- source /foo &amp;&amp; echo &#34;$foo&#34; &gt; /ineedboth
|
||
</span><span style="color:#4e9a06">- cat /bar &gt; /bar
|
||
</span><span style="color:#4e9a06">
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
$~/workdir&gt; cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; package3/definition.yaml
|
||
</span><span style="color:#4e9a06">name: &#34;ineedfooandbar&#34;
|
||
</span><span style="color:#4e9a06">version: &#34;0.1&#34;
|
||
</span><span style="color:#4e9a06">category: &#34;bar&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
</code></pre></div><p>To build, run again:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$&gt; luet build --all
|
||
</code></pre></div><p>As we can see, now Luet generated 3 packages, <code>bar/foo</code>, <code>bar/ineedfoo</code> and <code>bar/ineedfooandbar</code>. They aren&rsquo;t doing anything special than just shipping text files, this is an illustrative example on how build requirements can be combined to form new packages:</p>
|
||
<p><code>bar/ineedfooandbar</code> depends on both <code>bar/ineedfoo</code> and <code>bar/foo</code> during build-time, while <code>bar/foo</code> uses a docker image as a build base.</p>
|
||
<p>See the <a href="https://luet.io/docs/docs/concepts/packages/specfile/#building-strategies">package definition documentation page</a> for more details on how to instruct the Luet compiler to build packages with different strategies.</p>
|
||
<h2 id="caching-docker-images">Caching docker images</h2>
|
||
<p>Luet can push and pull the docker images that are being generated during the build process. A tree is represented by a single docker image, and each package can have one or more tags attached to it.</p>
|
||
<p>To push automatically docker images that are built, use the <code>--push</code> option, to pull, use the <code>--pull</code> option. An image repository can be specified with <code>--image-repository</code> flag, and can include also the remote registries where the images are pushed to.</p>
|
||
<p>Luet doesn&rsquo;t handle login to registries, so that has to be handled separately with <code>docker login</code> or <code>img login</code> before the build process starts.</p>
|
||
<h3 id="build-faster">Build faster</h3>
|
||
<p>When packages are cached, for iterating locally it&rsquo;s particularly useful to jump straight to the image that you want to build. You can use <code>--only-target-package</code> to jump directly to the image you are interested in. Luet will take care of checking if the images are present in the remote registry, and would build them if any of those are missing.</p>
|
||
<h2 id="building-for-a-different-platform">Building for a different platform</h2>
|
||
<p>Sometimes you need to build a package for a different platform than the one running on your host machine. For example, you may want to build an arm64 package, but your machine is x86. To do this, all you need to do is pass the following arguments:</p>
|
||
<pre tabindex="0"><code>luet --backend-args --load --backend-args --platform --backend-args linux/arm64 build PACKAGE_NAME
|
||
</code></pre><h2 id="notes">Notes</h2>
|
||
<ul>
|
||
<li>All the files which are next to a <code>build.yaml</code> are copied in the container which is running your build, so they are always accessible during build time.</li>
|
||
<li>If you notice errors about disk space, mind to set the <code>TMPDIR</code> env variable to a different folder. By default luet respects the O.S. default (which in the majority of system is <code>/tmp</code>).</li>
|
||
</ul>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Hello world!</title>
|
||
<link>https://luet.io/docs/tutorials/hello_world/</link>
|
||
<pubDate>Wed, 04 Jan 2017 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/tutorials/hello_world/</guid>
|
||
<description>
|
||
|
||
|
||
<p>This article will guide you to build your first package with Luet!
|
||
For this purpose, we have picked a real-world example: <a href="https://github.com/gogs/gogs">gogs</a> which is a &ldquo;painless self-hosted Git service&rdquo;, an open-source alternative to Github.</p>
|
||
<p>Gogs is written in Golang, and we need a working Golang version in order to build it.</p>
|
||
<p>Here you can see a live recorded session of this tutorial:</p>
|
||
<script id="asciicast-388348" src="https://asciinema.org/a/388348.js" data-autoplay="true" data-size="small" data-cols="120" data-rows="40" async></script>
|
||
<h1 id="define-a-luet-tree">Define a Luet tree</h1>
|
||
<p>Everything starts from a Luet tree. A Luet tree is just a directory containing one (or more) Luet specfile, here on we assume that you are working in a dedicated folder (e.g. <code>~/demo</code>) in your system.</p>
|
||
<p>Let&rsquo;s create then a package that will be our base to build other packages from now on, we have picked <code>busybox</code> here - it is really small and enough for our purpose.</p>
|
||
<h2 id="busybox">busybox</h2>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">mkdir busybox
|
||
</code></pre></div><p>Let&rsquo;s now write the build specification, which is just containing the image tag that we are referencing to</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; busybox/build.yaml
|
||
</span><span style="color:#4e9a06">image: &#34;busybox:{{.Values.version}}-glibc&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
</code></pre></div><p>Now, lets write the <code>definition.yaml</code>, which contains the metadata information about our package ( e.g. how we refer to it with luet, the version, and so on )</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; busybox/definition.yaml
|
||
</span><span style="color:#4e9a06">category: &#34;distro&#34;
|
||
</span><span style="color:#4e9a06">name: &#34;busybox&#34;
|
||
</span><span style="color:#4e9a06">version: &#34;1.33.0&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
</code></pre></div><h2 id="golang">golang</h2>
|
||
<p>We need now golang in order to build <code>gogs</code>. Let&rsquo;s declare then a golang package:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">mkdir golang
|
||
</code></pre></div><p>And a build specfile, which is simply fetch golang from <a href="https://golang.org">https://golang.org</a> and installing it in the busybox container:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; golang/build.yaml
|
||
</span><span style="color:#4e9a06">requires:
|
||
</span><span style="color:#4e9a06">- category: &#34;distro&#34;
|
||
</span><span style="color:#4e9a06"> name: &#34;busybox&#34;
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0&#34;
|
||
</span><span style="color:#4e9a06">
|
||
</span><span style="color:#4e9a06">prelude:
|
||
</span><span style="color:#4e9a06">- wget https://golang.org/dl/go{{.Values.version}}.linux-{{.Values.arch}}.tar.gz -O golang.tar.gz
|
||
</span><span style="color:#4e9a06">- mkdir /usr/local
|
||
</span><span style="color:#4e9a06">steps:
|
||
</span><span style="color:#4e9a06">- tar -C /usr/local -xzf golang.tar.gz
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
</code></pre></div><p>Note how we <code>require</code> busybox. The Golang container will now be based from busybox, and the <code>prelude</code> and <code>steps</code> fields will be executed in that context.</p>
|
||
<p>And finally let&rsquo;s write the golang metadata files, so we can refer to it from other packages</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; golang/definition.yaml
|
||
</span><span style="color:#4e9a06">name: &#34;go&#34;
|
||
</span><span style="color:#4e9a06">category: &#34;dev-lang&#34;
|
||
</span><span style="color:#4e9a06">version: &#34;1.15.6&#34;
|
||
</span><span style="color:#4e9a06">arch: &#34;amd64&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
</code></pre></div><h2 id="gogs">gogs</h2>
|
||
<p>Finally we can write the gogs package definition!</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">mkdir gogs
|
||
</code></pre></div><p>The build specfile, will just fetch the <code>gogs</code> sources at a given version (specified in the <code>definition.yaml</code>) and build the sources with go:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;&#39;EOF&#39; &gt; gogs/build.yaml
|
||
</span><span style="color:#4e9a06">requires:
|
||
</span><span style="color:#4e9a06">- category: &#34;dev-lang&#34;
|
||
</span><span style="color:#4e9a06"> name: &#34;go&#34;
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0&#34;
|
||
</span><span style="color:#4e9a06">env:
|
||
</span><span style="color:#4e9a06">- GOPATH=&#34;/go&#34;
|
||
</span><span style="color:#4e9a06">- GOGSPATH=&#34;$GOPATH/src/github.com/gogs/gogs&#34;
|
||
</span><span style="color:#4e9a06">- PATH=$PATH:/usr/local/go/bin
|
||
</span><span style="color:#4e9a06">- CGO_ENABLED=0
|
||
</span><span style="color:#4e9a06">prelude:
|
||
</span><span style="color:#4e9a06">- mkdir -p $GOPATH/src/github.com/gogs
|
||
</span><span style="color:#4e9a06">- wget https://github.com/gogs/gogs/archive/v{{.Values.version}}.tar.gz -O - | tar -xzf - -C ./ &amp;&amp; mv gogs-{{.Values.version}} $GOGSPATH
|
||
</span><span style="color:#4e9a06">steps:
|
||
</span><span style="color:#4e9a06">- mkdir /usr/bin
|
||
</span><span style="color:#4e9a06">- cd $GOGSPATH &amp;&amp; go build &amp;&amp; mv gogs /usr/bin/gogs
|
||
</span><span style="color:#4e9a06">excludes:
|
||
</span><span style="color:#4e9a06"># Cache generated by Golang
|
||
</span><span style="color:#4e9a06">- ^/root
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
</code></pre></div><p>And the metadata, in this way we can refer to gogs in a Luet tree:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; gogs/definition.yaml
|
||
</span><span style="color:#4e9a06">category: &#34;dev-vcs&#34;
|
||
</span><span style="color:#4e9a06">name: &#34;gogs&#34;
|
||
</span><span style="color:#4e9a06">version: &#34;0.11.91&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
</code></pre></div><h1 id="build-packages">Build packages</h1>
|
||
<p>The simplest and mostly immediate way to build packages, is running <code>luet build &lt;packagename&gt;</code> in the same folder you have your Luet tree.</p>
|
||
<p>In this case, to build gogs and its deps, we can do:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">luet build dev-vcs/gogs
|
||
</code></pre></div><p>And that&rsquo;s it! you will find the package archives in <code>build/</code> in the same folder where you started the command.</p>
|
||
<p>You will see that Luet generates not only archives with the file resulting to your builds, but it will also generate metadata files (ending with <code>.metadata.yaml</code>) that contains additional metadata information about your build and the package itself (e.g. checksums).</p>
|
||
<p>You can use tools like <a href="https://github.com/mikefarah/yq">yq</a> to inspect those:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">yq r build/gogs-dev-vcs-0.11.91.metadata.yaml checksums
|
||
</code></pre></div><p>Now if you want to consume the artifacts just built with <code>luet install</code>, you can create a repository with <code>luet create-repo</code>.</p>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Creating Luet repositories</title>
|
||
<link>https://luet.io/docs/concepts/overview/repositories/</link>
|
||
<pubDate>Thu, 05 Jan 2017 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/overview/repositories/</guid>
|
||
<description>
|
||
|
||
|
||
<p>After a set of packages has been built, a repository must be created in order to make them accessible by Luet clients. A Repository can be served either local files or via http(s) (at the moment of writing). Luet, by default, supports multiple-repositories with priorities.</p>
|
||
<h2 id="repository-fields">Repository fields</h2>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">description</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;docker&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">cached</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">enabled</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">arch</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;amd64&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">priority</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">urls</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>Repositories have the following fields, notably:</p>
|
||
<ul>
|
||
<li><code>name</code>: Repository name</li>
|
||
<li><code>description</code>: Repository description</li>
|
||
<li><code>cached</code>: Enable/disable repository cache</li>
|
||
<li><code>enable</code>: Enable/disables the repository</li>
|
||
<li><code>urls</code>: A List of urls where the repository is hosted from</li>
|
||
<li><code>type</code>: Repository type ( <code>docker</code>, <code>disk</code>, <code>http</code> are currently supported )</li>
|
||
<li><code>arch</code>: (optional) Denotes the arch repository. If present, it will enable the repository automatically if the corresponding arch is matching with the host running <code>luet</code>. <code>enable: true</code> would override this behavior</li>
|
||
<li><code>reference</code>: (optional) A reference to a repository index file to use to retrieve the repository metadata instead of latest. This can be used to point to a different or an older repository index to act as a &ldquo;wayback machine&rdquo;. The client will consume the repository state from that snapshot instead of latest.</li>
|
||
</ul>
|
||
|
||
|
||
<div class="alert alert-primary" role="alert">
|
||
<h4 class="alert-heading">Note</h4>
|
||
|
||
The <code>reference</code> field has to be a valid tag. For example, if a repository is a docker type, browse the image tags. The repository index snapshots are prefixed with a timestamp, and ending in <code>repository.yaml</code>. For example <code> 20211027153653-repository.yaml</code>
|
||
|
||
</div>
|
||
|
||
<h2 id="create-a-repository">Create a repository</h2>
|
||
<p>After issuing a <code>luet build</code>, the built packages are present in the output build directory. The <code>create-repo</code> step is needed to generate a portable tree, which is read by the clients, and a <code>repository.yaml</code> which contains the repository metadata.</p>
|
||
<p>Note that the output of <code>create-repo</code> is <em>additive</em> so it integrates with the current build content. The repository is composed by the packages generated by the <code>build</code> command (or <code>pack</code>) and the <code>create-repo</code> generated metadata.</p>
|
||
<h3 id="flags">Flags</h3>
|
||
<p>Some of the relevant flags for <code>create-repo</code> are:</p>
|
||
<ul>
|
||
<li><strong>&ndash;descr</strong>: Repository description</li>
|
||
<li><strong>&ndash;name</strong>: Repository name</li>
|
||
<li><strong>&ndash;output</strong>: Metadata output folder (while a different path can be specified, it&rsquo;s prefered to output the metadata files directly to the package directory).This most of the time matches the packages path for convenience.</li>
|
||
<li><strong>&ndash;packages</strong>: Directory where built packages are stored. This most of the time is also the output path.</li>
|
||
<li><strong>&ndash;reset-revision</strong>: Reset the repository revision number</li>
|
||
<li><strong>&ndash;tree-path</strong>: Specify a custom name for the tree path. (Defaults to tree.tar)</li>
|
||
<li><strong>&ndash;tree-compression</strong>: Specify a compression algorithm for the tree. (Available: gzip, Defaults: none)</li>
|
||
<li><strong>&ndash;tree</strong>: Path of the tree which was used to generate the packages and holds package metadatas</li>
|
||
<li><strong>&ndash;type</strong>: Repository type (http/local). It is just descriptive, the clients will be able to consume the repo in whatsoever way it is served.</li>
|
||
<li><strong>&ndash;urls</strong>: List of URIS where the repository is available</li>
|
||
</ul>
|
||
<p>See <code>luet create-repo --help</code> for a full description.</p>
|
||
<h2 id="example">Example</h2>
|
||
<p>Build a package and generate the repository metadata:</p>
|
||
<pre tabindex="0"><code>$&gt; mkdir package
|
||
|
||
$&gt; cat &lt;&lt;EOF &gt; package/build.yaml
|
||
image: busybox
|
||
steps:
|
||
- echo &quot;foo&quot; &gt; /foo
|
||
EOF
|
||
|
||
$&gt; cat &lt;&lt;EOF &gt; package/definition.yaml
|
||
name: &quot;foo&quot;
|
||
version: &quot;0.1&quot;
|
||
category: &quot;bar&quot; # optional!
|
||
EOF
|
||
|
||
$&gt; luet build --all --destination $PWD/out/ --tree $PWD/package
|
||
|
||
📦 Selecting foo 0.1
|
||
📦 Compiling foo version 0.1 .... ☕
|
||
🐋 Downloading image luet/cache-foo-bar-0.1-builder
|
||
🐋 Downloading image luet/cache-foo-bar-0.1
|
||
📦 foo Generating 🐋 definition for builder image from busybox
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder done
|
||
Sending build context to Docker daemon 4.096kB
|
||
...
|
||
|
||
$&gt; luet create-repo --name &quot;test&quot; --output $PWD/out --packages $PWD/out --tree $PWD/package
|
||
For repository test creating revision 1 and last update 1580641614...
|
||
|
||
$&gt; ls out
|
||
foo-bar-0.1-builder.image.tar foo-bar-0.1.image.tar foo-bar-0.1.metadata.yaml foo-bar-0.1.package.tar repository.yaml tree.tar
|
||
|
||
</code></pre><h3 id="repositories-type">Repositories type</h3>
|
||
<p>There are 3 types of repositories supported by luet: <code>disk</code>, <code>http</code>, <code>docker</code>.</p>
|
||
<h4 id="disk"><code>disk</code></h4>
|
||
<p>It is a repository which is merely a local folder in your system. When creating a repository and specifying <code>--output</code>, <code>luet</code> expects a local path to the system where to store the generated metadata.</p>
|
||
<h4 id="http"><code>http</code></h4>
|
||
<p>It is a repository type which is hosted behind a webserver. When creating a repository and specifying <code>--output</code>, <code>luet</code> expects a local path to the system where to store the generated metadata, similarly to the <code>disk</code> repository type. Luet is not handling any file upload. The <code>http</code> repository type gains meaning when being used from the client, where the repository source must be specified</p>
|
||
<h4 id="docker"><code>docker</code></h4>
|
||
<p>When specifying the <code>docker</code> repository type, <code>luet</code> will generate final images from the build results and upload them to the docker reference specified with <code>--output</code>. The images contains the artifact output from the build result, and they are tagged accordingly to their package name. A single image reference needs to be passed, all the packages will be pushed in a single image but with different tags.</p>
|
||
<p>The login to the container registry is not handled, the daemon needs to have already proper permissions to push the image to the destination.</p>
|
||
<h2 id="repositories-snapshots">Repositories snapshots</h2>
|
||
<p>Luet automatically will create repository index snapshots. This allows clients to point to specific references of repositories besides the latest package set published.</p>
|
||
<p><code>luet create-repo</code> optionally takes a <code>--snapshot-id</code> argument to define the snapshot name, otherwise it defaults to the unix date timestamp.</p>
|
||
<p>Combined with <code>--push-images</code> with a container repository type, it automatically tags and pushes snapshots images too.</p>
|
||
<h3 id="consuming-repository-snapshots">Consuming repository snapshots</h3>
|
||
<p>A client can define a repository, with an optional <code>reference</code> keyword:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">description</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;docker&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">priority</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">reference</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">20220204175357</span>-<span style="color:#000">repository.yaml</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">urls</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h2 id="notes">Notes</h2>
|
||
<ul>
|
||
<li>The tree of definition being used to build the repository, and the package directories must <strong>not</strong> be symlinks.</li>
|
||
<li>To build a repository is not required to hold the packages artifacts, only the respective <code>metadata.yaml</code> file is required.</li>
|
||
</ul>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Specfile</title>
|
||
<link>https://luet.io/docs/concepts/packages/specfile/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/packages/specfile/</guid>
|
||
<description>
|
||
|
||
|
||
<h1 id="specfiles">Specfiles</h1>
|
||
<p>Luet <a href="https://luet.io/docs/concepts/packages/">packages</a> are defined by specfiles. Specfiles define the runtime and builtime requirements of a package. There is an hard distinction between runtime and buildtime. A spec is composed at least by the runtime (<code>definition.yaml</code> or a <code>collection.yaml</code>) and the buildtime specification (<code>build.yaml</code>).</p>
|
||
<p>Luet identifies the package definition by looking at directories that contains a <code>build.yaml</code> and a <code>definition.yaml</code> (or <code>collection.yaml</code>) files. A Luet tree is merely a composition of directories that follows this convention. There is no constriction on either folder naming or hierarchy.</p>
|
||
<p><em>Example of a <a href="https://github.com/Luet-lab/luet-embedded/tree/master/distro">tree folder hierarchy</a></em></p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">tree distro
|
||
distro
|
||
├── funtoo
|
||
│ ├── 1.4
|
||
│ │ ├── build.sh
|
||
│ │ ├── build.yaml
|
||
│ │ ├── definition.yaml
|
||
│ │ └── finalize.yaml
|
||
│ ├── docker
|
||
│ │ ├── build.yaml
|
||
│ │ ├── definition.yaml
|
||
│ │ └── finalize.yaml
|
||
│ └── meta
|
||
│ └── rpi
|
||
│ └── 0.1
|
||
│ ├── build.yaml
|
||
│ └── definition.yaml
|
||
├── packages
|
||
│ ├── container-diff
|
||
│ │ └── 0.15.0
|
||
│ │ ├── build.yaml
|
||
│ │ └── definition.yaml
|
||
│ └── luet
|
||
│ ├── build.yaml
|
||
│ └── definition.yaml
|
||
├── raspbian
|
||
│ ├── buster
|
||
│ │ ├── build.sh
|
||
│ │ ├── build.yaml
|
||
│ │ ├── definition.yaml
|
||
│ │ └── finalize.yaml
|
||
│ ├── buster-boot
|
||
│ │ ├── build.sh
|
||
│ │ ├── build.yaml
|
||
│ │ ├── definition.yaml
|
||
│ │ └── finalize.yaml
|
||
</code></pre></div><h2 id="build-specs">Build specs</h2>
|
||
<p>Build specs are defined in <code>build.yaml</code> files. They denote the build-time <code>dependencies</code> and <code>conflicts</code>, together with a definition of the content of the package.</p>
|
||
<p><em>Example of a <code>build.yaml</code> file</em>:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo &#34;Luet is awesome&#34; &gt; /awesome</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">prelude</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo &#34;nooops!&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">requires</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;echo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&gt;=1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">conflicts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&gt;=1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">provides</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&gt;=1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">FOO=bar</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">includes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/awesome</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">unpack</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="building-strategies">Building strategies</h3>
|
||
<p>Luet can create packages with different strategies:</p>
|
||
<ul>
|
||
<li>by delta. Luet will analyze the containers differencies to find out which files got <strong>added</strong>.
|
||
You can use the <code>prelude</code> section to exclude certains file during analysis.</li>
|
||
<li>by taking a whole container content</li>
|
||
<li>by considering a single directory in the build container.</li>
|
||
</ul>
|
||
<h4 id="package-by-delta">Package by delta</h4>
|
||
<p>By default Luet will analyze the container content and extract any file that gets <strong>added</strong> to it. The difference is calculated by using the container which is depending on, or either by the container which is created by running the steps in the <code>prelude</code> section of the package build spec:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">prelude</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#8f5902;font-style:italic"># do something...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#8f5902;font-style:italic"># real work that should be calculated delta over</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>By omitting the <code>prelude</code> keyword, the delta will be calculated from the parent container where the build will start from.</p>
|
||
<h4 id="package-by-container-content">Package by container content</h4>
|
||
<p>Luet can also generate a package content from a container. This is really useful when creating packages that are entire versioned <code>rootfs</code>. To enable this behavior, simply add <code>unpack: true</code> to the <code>build.yaml</code>. This enables the Luet unpacking features, which will extract all the files contained in the container which is built from the <code>prelude</code> and <code>steps</code> fields.</p>
|
||
<p>To include/exclude single files from it, use the <code>includes</code> and <code>excludes</code> directives.</p>
|
||
<h4 id="package-by-a-folder-in-the-final-container">Package by a folder in the final container</h4>
|
||
<p>Similarly, you can tell Luet to create a package from a folder in the build container. To enable this behavior, simply add <code>package_dir: &quot;/path/to/final/dir&quot;</code>.
|
||
The directory must represent exactly how the files will be ultimately installed from clients, and they will show up in the same layout in the final archive.</p>
|
||
<p>So for example, to create a package which ships <code>/usr/bin/mybin</code>, we could write:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">package_dir</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/output&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">mkdir -p /output/usr/bin/</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo &#34;fancy stuff&#34; &gt; /output/usr/bin/mybin &amp;&amp; chmod +x /output/usr/bin/mybin</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="build-time-dependencies">Build time dependencies</h3>
|
||
<p>A package build spec defines how a package is built. In order to do this, Luet needs to know where to start. Hence a package must declare at least either one of the following:</p>
|
||
<ul>
|
||
<li>an <code>image</code> keyword which tells which Docker image to use as base, or</li>
|
||
<li>a list of <code>requires</code>, which are references to other packages available in the tree.</li>
|
||
</ul>
|
||
<p>They can&rsquo;t be both present in the same specfile.</p>
|
||
<p>To note, it&rsquo;s not possible to mix package build definitions from different <code>image</code> sources. They must form a unique sub-graph in the build dependency tree.</p>
|
||
<p>On the other hand it&rsquo;s possible to have multiple packages depending on a combination of different <code>requires</code>, given they are coming from the same <code>image</code> parent.</p>
|
||
<h3 id="excludingincluding-files-explictly">Excluding/including files explictly</h3>
|
||
<p>Luet can also <em>exclude</em> and <em>include</em> single files or folders from a package by using the <code>excludes</code> and <code>includes</code> keyword respecitvely.</p>
|
||
<p>Both of them are parsed as a list of Golang regex expressions, and they can be combined together to fine-grainly decide which files should be inside the final artifact. You can refer to the files as they were in the resulting package. So if a package produces a <code>/foo</code> file, and you want to exclude it, you can add it to <code>excludes</code> as <code>/foo</code>.</p>
|
||
<h3 id="package-source-image">Package source image</h3>
|
||
<p>Luet needs an image to kick-off the build process for each package. This image is being used to run the commands in the <code>steps</code> and <code>prelude</code>, and then the image is processed by the <strong>building strategies</strong> explained above.</p>
|
||
<p>The image can be resolved either by:</p>
|
||
<ol>
|
||
<li>providing a specific image name with <code>image</code></li>
|
||
<li>providing a set of package requirements with <code>requires</code> which will be constructed a new image from. The resulting image is an image linked between each other with the <code>FROM</code> field in the Dockerfile following the SAT solver ordering.</li>
|
||
<li>providing a set of packages to squash their result from <code>requires</code> and by specifying <code>requires_final_images: true</code>.</li>
|
||
</ol>
|
||
|
||
|
||
<div class="alert alert-info" role="alert">
|
||
<h4 class="alert-heading">Note</h4>
|
||
|
||
The above keywords cannot be present in the same spec <strong>at the same time</strong>, or they cannot be combined. But you are free to create further intermediate specs to achieve the desired image.
|
||
|
||
</div>
|
||
|
||
<h4 id="difference-between-requires-and-requires-with-requires_final_images-true">Difference between <code>requires</code> and <code>requires</code> with <code>requires_final_images: true</code></h4>
|
||
<p><code>requires</code> generates a graph from all the <code>images</code> of the specfile referenced inside the list. This means it builds a chain of images that are used to build the packages, e.g.: <code>packageA(image: busybox) -&gt; packageB (requires: A) -&gt; packageC (requires: C)</code>. The container which is running your build then <strong>inherits</strong> it&rsquo;s parents from a chain of order resolution, provided by the SAT solver.</p>
|
||
<p>When specifying <code>requires_final_images: true</code> luet builds an artifact for each of the packages listed from their compilation specs and it will later <em>squash</em> them together in a new container image which is then used in the build process to create an artifact.</p>
|
||
<p>The key difference is about <em>where</em> your build is going to run from. By specifying <code>requires_final_images</code> it will be constructed a new image with the content of each package specified and its dependencies - while if setting it to false, it will order the images appropriately and link them together with the Dockerfile <code>FROM</code> field. That allows to reuse the same images used to build the packages in the require section - or - create a new one from the result of each package compilation.</p>
|
||
<h2 id="keywords">Keywords</h2>
|
||
<p>Here is a list of the full keyword refereces for the <code>build.yaml</code> file.</p>
|
||
<h3 id="conflicts"><code>conflicts</code></h3>
|
||
<p>(optional) List of packages which it conflicts with in <em>build time</em>. In the same form of <code>requires</code> it is a list of packages that the current one is conflicting with.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">conflicts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>See <a href="https://luet.io/docs/concepts/packages">Package concepts</a> for more information on how to represent a package in a Luet tree.</p>
|
||
<h3 id="copy"><code>copy</code></h3>
|
||
<p><em>since luet&gt;=0.15.0</em></p>
|
||
<p>(optional) A list of packages/images where to copy files from. It is the <a href="https://docs.docker.com/develop/develop-images/multistage-build/">Docker multi-stage build</a> equivalent but enhanced with tree hashing resolution.</p>
|
||
<p>To copy a specific file from a package <em>build</em> container:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">prelude</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">copy</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">package</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&gt;=0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">source</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">destination</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>Any package that is listed in the section will be compiled beforeahead the package, and the file is available both in <code>prelude</code> and <code>steps</code>.</p>
|
||
<p>Internally, it&rsquo;s rendered as <code>COPY --from=package/image:sha /foo /bar</code></p>
|
||
<p>To copy a specific file from an external image:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">prelude</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">copy</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;buxybox:latest&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">source</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">destination</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="env"><code>env</code></h3>
|
||
<p>(optional) A list of environment variables ( in <code>NAME=value</code> format ) that are expanded in <code>step</code> and in <code>prelude</code>. ( e.g. <code>${NAME}</code> ).</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">PATH=$PATH:/usr/local/go/bin</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">GOPATH=/luetbuild/go</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">GO111MODULE=on</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">CGO_ENABLED=0</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">LDFLAGS=&#34;-s -w&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="excludes"><code>excludes</code></h3>
|
||
<p>(optional) List of golang regexes. They are in full path form (e.g. <code>^/usr/bin/foo</code> ) and indicates that the files listed shouldn&rsquo;t be part of the final artifact</p>
|
||
<p>Wildcards and golang regular expressions are supported. If specified, files which are not matching any of the regular expressions in the list will be excluded in the final package.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">excludes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">^/etc/shadow</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">^/etc/os-release</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">^/etc/gshadow</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>By combining <code>excludes</code> with <code>includes</code>, it&rsquo;s possible to include certain files while excluding explicitly some others (<code>excludes</code> takes precedence over <code>includes</code>).</p>
|
||
<h3 id="image"><code>image</code></h3>
|
||
<p>(optional/required) Docker image to be used to build the package.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;busybox&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>It might be omitted in place of <code>requires</code>, and indicates the image used to build the package. The image will be pulled and used to build the package.</p>
|
||
<h3 id="includes"><code>includes</code></h3>
|
||
<p>(optional) List of regular expressions to match files in the resulting package. The path is absolute as it would refer directly to the artifact content.</p>
|
||
<p>Wildcards and golang regular expressions are supported. If specified, files which are not matching any of the regular expressions in the list will be excluded in the final package.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">includes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/etc$</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/etc/lvm$</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/etc/lvm/.*</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/usr$</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/usr/bin$</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/usr/bin/cc.*</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/usr/bin/c\+\+.*</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/usr/bin/cpp.*</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/usr/bin/g\+\+.*</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p><strong>Note</strong>: Directories are treated as standard entries, so to include a single file, you need also to explictly include also it&rsquo;s directory. Consider this example to include <code>/etc/lvm/lvm.conf</code>:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">includes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/etc$</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/etc/lvm$</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">/etc/lvm/lvm.conf</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="join"><code>join</code></h3>
|
||
<p><em>since luet&gt;=0.16.0</em>
|
||
<em>to be deprecated in luet&gt;=0.18.0 in favor of <code>requires_final_images</code></em></p>
|
||
<p>(optional/required) List of packages which are used to generate a parent image from.</p>
|
||
<p>It might be omitted in place of <code>image</code> or <code>requires</code>, and will generate an image which will be used as source of the package from the final packages in the above list. The new image is used to run eventually the package building process and a new artifact can be generated out of it.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">join</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>See <a href="https://luet.io/docs/concepts/packages">Package concepts</a> for more information on how to represent a package in a Luet tree.</p>
|
||
<h4 id="examples">Examples</h4>
|
||
<ul>
|
||
<li><a href="https://github.com/mocaccinoOS/mocaccino-stage3/blob/278e3637cf65761bf01a22c891135e237e4717ad/packages/system/stage3/build.yaml">https://github.com/mocaccinoOS/mocaccino-stage3/blob/278e3637cf65761bf01a22c891135e237e4717ad/packages/system/stage3/build.yaml</a></li>
|
||
</ul>
|
||
<h3 id="package_dir"><code>package_dir</code></h3>
|
||
<p>(optional) A path relative to the build container where to create the package from.</p>
|
||
<p>Similarly to <code>unpack</code>, changes the building strategy.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">mkdir -p /foo/bar/etc/myapp</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">touch /foo/bar/etc/myapp/config</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">package_dir</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">/foo/bar</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="prelude"><code>prelude</code></h3>
|
||
<p>(optional) A list of commands to perform in the build container before building.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">prelude</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||
</span><span style="color:#8f5902;font-style:italic"> PACKAGE_VERSION=${PACKAGE_VERSION%\+*} &amp;&amp; \
|
||
</span><span style="color:#8f5902;font-style:italic"> git clone https://github.com/mudler/yip &amp;&amp; cd yip &amp;&amp; git checkout &#34;${PACKAGE_VERSION}&#34; -b build</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="requires"><code>requires</code></h3>
|
||
<p>(optional/required) List of packages which it depends on.</p>
|
||
<p>A list of packages that the current package depends on in <em>build time</em>. It might be omitted in place of <code>image</code>, and determines the resolution tree of the package itself. A new image is composed from the packages listed in this section in order to build the package</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">requires</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>See <a href="https://luet.io/docs/concepts/packages">Package concepts</a> for more information on how to represent a package in a Luet tree.</p>
|
||
<h3 id="requires_final_images"><code>requires_final_images</code></h3>
|
||
<p><em>since luet&gt;=0.17.0</em></p>
|
||
<p>(optional) A boolean flag which instruct luet to use the final images in the <code>requires</code> field.</p>
|
||
<p>By setting <code>requires_final_images: true</code> in the compilation spec, packages in the <code>requires</code> section and its dependencies will be fetched if available or compiled, and afterwards the result is squashed together in a new image that will be used as a source of the build process of the package.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">requires</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">requires_final_images</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p><code>requires_final_images</code> replaces the use of <code>join</code>, which will be deprecated in luet <code>&gt;=0.18.0</code>.</p>
|
||
<h3 id="step"><code>step</code></h3>
|
||
<p>(optional) List of commands to perform in the build container.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||
</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">cd yip &amp;&amp; make build-small &amp;&amp; mv yip /usr/bin/yip</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="unpack"><code>unpack</code></h3>
|
||
<p>(optional) Boolean flag. It indicates to use the unpacking strategy while building a package</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">unpack</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>It indicates that the package content <strong>is</strong> the whole container content.</p>
|
||
<h3 id="subpackages"><code>subpackages</code></h3>
|
||
<p><em>since luet&gt;=0.32.0</em></p>
|
||
<p>(optional) A list of packages to create with the result of the current package definition.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">subpackages</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">includes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">excludes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>After generating the main package, <code>luet</code> will create split packages from the resulting one from the list.</p>
|
||
<p>Every subpackage stanza supports <code>excludes</code> and <code>includes</code> to selectively exclude and include files in every resulting package.</p>
|
||
<p>Note, subpackages support is available for collection, standard packages and templated packages.</p>
|
||
<p>See <a href="https://luet.io/docs/concepts/packages">Package concepts</a> for more information on how to represent a package in a Luet tree.</p>
|
||
<h2 id="rutime-specs">Rutime specs</h2>
|
||
<p>Runtime specification are denoted in a <code>definition.yaml</code> or a <code>collection.yaml</code> sibiling file. It identifies the package and the runtime contraints attached to it.</p>
|
||
<p><em>definition.yaml</em>:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;awesome&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">requires</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;echo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&gt;=1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">conflicts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">provides</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&lt;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>A <code>collection.yaml</code> can be used in place of a <code>definition.yaml</code> to identify a <strong>set</strong> of packages that instead shares a common <code>build.yaml</code>:</p>
|
||
<p><em>collection.yaml</em>:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">packages</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;awesome&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">requires</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;echo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&gt;=1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">conflicts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">provides</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&lt;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;awesome&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.2&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">requires</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;echo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&gt;=1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">conflicts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">provides</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&lt;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>All the fields (also the ones which are not part of the spec) in the <code>definition.yaml</code> file are available as templating values when rendering the <code>build.yaml</code> file. When running <a href="https://luet.io/docs/concepts/packages/specfile/#finalizers">finalizers</a> instead only the fields belonging to the specs are available.</p>
|
||
<h3 id="keywords-1">Keywords</h3>
|
||
<p>Here is a list of the full keyword refereces</p>
|
||
<h3 id="annotations"><code>annotations</code></h3>
|
||
<p>(optional) A map of freeform package annotations:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">annotations</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">foo</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">baz</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;test&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h4 id="category"><code>category</code></h4>
|
||
<p>(optional) A string containing the category of the package</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;system&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="conflicts-1"><code>conflicts</code></h3>
|
||
<p>(optional) List of packages which it conflicts with in <em>runtime</em>. In the same form of <code>requires</code> it is a list of packages that the current one is conflicting with.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">conflicts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>See <a href="https://luet.io/docs/concepts/packages">Package concepts</a> for more information on how to represent a package in a Luet tree.</p>
|
||
<h3 id="description"><code>description</code></h3>
|
||
<p>(optional) A string indicating the package description</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">description</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo is capable of...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="hidden"><code>hidden</code></h3>
|
||
<p>(optional) A boolean indicating whether the package has to be shown or not in the search results (<code>luet search...</code>)</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">hidden</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="labels"><code>labels</code></h3>
|
||
<p>(optional) A map of freeform package labels:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">labels</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">foo</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">baz</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;test&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>Labels can be used in <code>luet search</code> to find packages by labels, e.g.:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$&gt; luet search --by-label foo
|
||
</code></pre></div><h3 id="license"><code>license</code></h3>
|
||
<p>(optional) A string indicating the package license type.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">license</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;GPL-3&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h4 id="name"><code>name</code></h4>
|
||
<p>(required) A string containing the name of the package</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="provides"><code>provides</code></h3>
|
||
<p>(optional) List of packages which the current package is providing.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">conflicts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>See <a href="https://luet.io/docs/concepts/packages">Package concepts</a> for more information on how to represent a package in a Luet tree.</p>
|
||
<h3 id="requires-1"><code>requires</code></h3>
|
||
<p>(optional) List of packages which it depends on in runtime.</p>
|
||
<p>A list of packages that the current package depends on in <em>runtime</em>. The determines the resolution tree of the package itself.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">requires</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>See <a href="https://luet.io/docs/concepts/packages">Package concepts</a> for more information on how to represent a package in a Luet tree.</p>
|
||
<h3 id="uri"><code>uri</code></h3>
|
||
<p>(optional) A list of URI relative to the package ( e.g. the official project pages, wikis, README, etc )</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">uri</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#4e9a06">&#34;http://www.mocaccino.org&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h4 id="version"><code>version</code></h4>
|
||
<p>(required) A string containing the version of the package</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h2 id="refering-to-packages-from-the-cli">Refering to packages from the CLI</h2>
|
||
<p>All the <code>luet</code> commands which takes a package as argument, respect the following syntax notation:</p>
|
||
<ul>
|
||
<li><code>cat/name</code>: will default to selecting any available package</li>
|
||
<li><code>=cat/name</code>: will default to gentoo parsing with regexp so also <code>=cat/name-1.1</code> works</li>
|
||
<li><code>cat/name@version</code>: will select the specific version wanted ( e.g. <code>cat/name@1.1</code> ) but can also include ranges as well <code>cat/name@&gt;=1.1</code></li>
|
||
<li><code>name</code>: just name, category is omitted and considered empty</li>
|
||
</ul>
|
||
<h2 id="finalizers">Finalizers</h2>
|
||
<p>Finalizers are denoted in a <code>finalize.yaml</code> file, which is a sibiling of <code>definition.yaml</code> and <code>build.yaml</code> file. It contains a list of commands that finalize the package when it is installed in the machine.</p>
|
||
<p><em>finalize.yaml</em>:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">install</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">rc-update add docker default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="keywords-2">Keywords</h3>
|
||
<ul>
|
||
<li><code>install</code>: List of commands to run in the host machine. Failures are eventually ignored, but will be reported and luet will exit non-zero in such case.</li>
|
||
</ul>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: CLI usage</title>
|
||
<link>https://luet.io/docs/concepts/overview/usage/</link>
|
||
<pubDate>Sat, 14 Dec 2019 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/overview/usage/</guid>
|
||
<description>
|
||
|
||
|
||
<h2 id="installing-a-package">Installing a package</h2>
|
||
<p>To install a package with <code>luet</code>, simply run:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet install &lt;package_name&gt;
|
||
|
||
</code></pre></div><p>To relax dependency constraints and avoid auto-upgrades, add the <code>--relax</code> flag:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet install --relax &lt;package name&gt;
|
||
</code></pre></div><p>To install only the package without considering the deps, add the <code>--nodeps</code> flag:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet install --nodeps &lt;package name&gt;
|
||
</code></pre></div><p>To install only package dependencies, add the <code>--onlydeps</code> flag:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet install --onlydeps &lt;package name&gt;
|
||
</code></pre></div><p>To only download packages, without installing them use the <code>--download-only</code> flag:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet install --download-only &lt;package name&gt;
|
||
</code></pre></div><h2 id="uninstalling-a-package">Uninstalling a package</h2>
|
||
<p>To uninstall a package with <code>luet</code>, simply run:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet uninstall &lt;package_name&gt;
|
||
|
||
</code></pre></div><h2 id="upgrading-the-system">Upgrading the system</h2>
|
||
<p>To upgrade your system, simply run:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet upgrade
|
||
</code></pre></div><h2 id="refreshing-repositories">Refreshing repositories</h2>
|
||
<p>Luet automatically syncs repositories definition on the machine when necessary, but it avoids to sync up in a 24h range. In order to refresh the repositories manually, run:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet repo update
|
||
</code></pre></div><h2 id="searching-a-package">Searching a package</h2>
|
||
<p>To search a package:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet search &lt;regex&gt;
|
||
|
||
</code></pre></div><p>To search a package and display results in a table:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet search --table &lt;regex&gt;
|
||
|
||
</code></pre></div><p>To look into the installed packages:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet search --installed &lt;regex&gt;
|
||
|
||
</code></pre></div><p>Note: the regex argument is optional</p>
|
||
<h2 id="search-file-belonging-to-packages">Search file belonging to packages</h2>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet search --file &lt;file_pattern&gt;
|
||
</code></pre></div><h2 id="show-package-files">Show package files</h2>
|
||
<p>Files are displayed when visualizing output of search in json or in yaml, for instance, consider the following example:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ luet search -o yaml system/luet-0.32.5
|
||
packages:
|
||
- category: system
|
||
files:
|
||
- usr/bin/luet
|
||
hidden: <span style="color:#204a87">false</span>
|
||
installed: <span style="color:#204a87">true</span>
|
||
name: luet
|
||
repository: luet
|
||
target: <span style="color:#4e9a06">&#34;&#34;</span>
|
||
version: 0.32.5
|
||
</code></pre></div><h3 id="search-output">Search output</h3>
|
||
<p>Search can return results in the terminal in different ways: as terminal output, as json or as yaml.</p>
|
||
<h4 id="json">JSON</h4>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet search --json &lt;regex&gt;
|
||
|
||
</code></pre></div><h4 id="yaml">YAML</h4>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet search --yaml &lt;regex&gt;
|
||
|
||
</code></pre></div><h4 id="tabular">Tabular</h4>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
$ luet search --table &lt;regex&gt;
|
||
|
||
</code></pre></div><h2 id="quiet-luet-output">Quiet luet output</h2>
|
||
<p>Luet output is verbose by default and colourful, however will try to adapt to the terminal, based on which environment is executed (as a service, in the terminal, etc.)</p>
|
||
<p>You can quiet <code>luet</code> output with the <code>--quiet</code> flag or <code>-q</code> to have a more compact output in all the commands.</p>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Build a package</title>
|
||
<link>https://luet.io/docs/tutorials/build_package/</link>
|
||
<pubDate>Wed, 04 Jan 2017 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/tutorials/build_package/</guid>
|
||
<description>
|
||
|
||
|
||
|
||
|
||
<div class="alert alert-warning" role="alert">
|
||
<h4 class="alert-heading">Warning</h4>
|
||
|
||
This article contains references to Luet repositories that were deprecated, and needs to be updated.
|
||
Please refer to the <a href="../../tutorials/hello_world/">&ldquo;Hello World&rdquo;</a> tutorial instead.
|
||
|
||
</div>
|
||
|
||
<p><img src="https://github.com/BarkyTheDog/catclock/raw/master/catclock.gif" alt="catclock"></p>
|
||
<h1 id="catclock-example">Catclock example</h1>
|
||
<p>In this example, we will build the awesome <a href="https://github.com/BarkyTheDog/catclock">CatClock</a> on containers we will run it locally in a Luet box.</p>
|
||
<p>We will do this experiment to prove two things:</p>
|
||
<ol>
|
||
<li>how we can build a package with Luet and</li>
|
||
<li>two packages from different distributions can (sometime) work together.</li>
|
||
</ol>
|
||
<h2 id="prerequisites">Prerequisites</h2>
|
||
<p>To build packages with Luet, you must have installed Docker and container-diff, follow our <a href="../../getting-started">setup guide</a>.</p>
|
||
<h2 id="1-create-the-package">1) Create the package</h2>
|
||
<p>To prove our point, we will build our package from an OpenSUSE image, and later on we will consume
|
||
entropy repositories for runtime dependencies. To note, this is not the main focus of Luet, and this is a restricted example on its features on build-time resolution. For more syntax examples, see also <a href="../../concepts/specfile/#build-specs">Build specs</a> and <a href="../../concepts/packages/#package-types">Package types</a>.</p>
|
||
<p>Run this commands in any directory you choose to be your workspace:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
||
<span style="color:#8f5902;font-style:italic"># Let&#39;s create a directory to store our package spec:</span>
|
||
mkdir -p tree/misc/catclock/
|
||
</code></pre></div><h3 id="11-build-spec">1.1) Build spec</h3>
|
||
<p>Now, let&rsquo;s generate our <strong>build</strong> spec:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Create a build file. We use here opensuse/leap to build the package, as an example</span>
|
||
cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; tree/misc/catclock/build.yaml
|
||
</span><span style="color:#4e9a06">image: opensuse/leap
|
||
</span><span style="color:#4e9a06">
|
||
</span><span style="color:#4e9a06"># Preparation phase
|
||
</span><span style="color:#4e9a06">prelude:
|
||
</span><span style="color:#4e9a06">- zypper in -y git make libXt-devel xmh gcc motif-devel libXext-devel libpulse-devel libaubio-devel
|
||
</span><span style="color:#4e9a06">- git clone https://github.com/BarkyTheDog/catclock
|
||
</span><span style="color:#4e9a06">
|
||
</span><span style="color:#4e9a06"># Here we define the steps that Luet will follow
|
||
</span><span style="color:#4e9a06">steps:
|
||
</span><span style="color:#4e9a06">- cd catclock &amp;&amp; make DEFINES=&#34;-Wno-incompatible-pointer-types&#34;
|
||
</span><span style="color:#4e9a06">- mv catclock/xclock /usr/bin/xclock
|
||
</span><span style="color:#4e9a06">
|
||
</span><span style="color:#4e9a06"># (optional) File list that will be included in the final package
|
||
</span><span style="color:#4e9a06"># Luet will filter out files that won&#39;t match any entry in the list (regex syntax IS supported)
|
||
</span><span style="color:#4e9a06">includes:
|
||
</span><span style="color:#4e9a06">- /usr/bin/xclock
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
</code></pre></div><p><code>build.yaml</code> is what an ebuild is for Gentoo and for e.g. what PKGBUILD is for Arch.</p>
|
||
<ul>
|
||
<li><em>image: opensuse/leap</em> tells luet to use opensuse/leap as a build image. We collect the build time dependencies with <code>zypper</code> (the openSUSE package manager), and the <a href="https://github.com/BarkyTheDog/catclock">CatClock</a> with <code>git</code>. When we declare an <code>image</code> keyword in a spec, it becomes a <em>seed</em> package ( <a href="../../concepts/packages/#package-types">Package types</a> ) as doesn&rsquo;t depend on any package in build time, we will cover more use cases in other examples.</li>
|
||
<li><em>prelude</em> is a list of commands that will happen during the build phase.
|
||
They might generate binaries, or download sources, but those are not took into consideration when generating the final package.</li>
|
||
<li><em>steps</em> is a list of commands that will happen during the build phase.
|
||
Luet will execute those commands and all the binaries generated from them become part of the final package</li>
|
||
<li><em>includes</em> is a (optional) list of regex that tells to Luet what files to filter out from the final artifact.</li>
|
||
</ul>
|
||
<h3 id="12-runtime-spec">1.2) Runtime spec</h3>
|
||
<p>Now we generate the runtime spec, it&rsquo;s the part about the binary end which will be installed in the system. It also holds the metadata relative to the package definition (<code>name</code>, <code>category</code>, <code>version</code>).</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Create a runtime definition.</span>
|
||
<span style="color:#8f5902;font-style:italic"># We will leverage packages already present on Sabayon Entropy repositories</span>
|
||
<span style="color:#8f5902;font-style:italic"># the end-system needs to have the Luet Sabayon Entropy repositories enabled.</span>
|
||
cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; tree/misc/catclock/definition.yaml
|
||
</span><span style="color:#4e9a06">category: &#34;misc&#34;
|
||
</span><span style="color:#4e9a06">name: &#34;catclock&#34;
|
||
</span><span style="color:#4e9a06">version: &#34;0.20200318&#34;
|
||
</span><span style="color:#4e9a06">requires:
|
||
</span><span style="color:#4e9a06">- category: meta
|
||
</span><span style="color:#4e9a06"> name: users
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0&#34;
|
||
</span><span style="color:#4e9a06">- category: x11-libs
|
||
</span><span style="color:#4e9a06"> name: motif
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0.1&#34;
|
||
</span><span style="color:#4e9a06">- category: media-libs
|
||
</span><span style="color:#4e9a06"> name: libjpeg-turbo
|
||
</span><span style="color:#4e9a06"> version: &#34;&gt;=0.1&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
</code></pre></div><ul>
|
||
<li><em>category</em>, <em>name</em>, and <em>version</em>: identifies the package in a Luet tree. This is the unique identifier for a package.</li>
|
||
<li><em>requires</em> it&rsquo;s a list of packages which our <strong>catclock</strong> depends on during runtime (when we will execute catclock inside a small-container!). To find out what&rsquo;s required by your binaries it can be a try-learn-fail effort. If the package you wish to build is specifying the deps it requires, and those are available in a Luet repository, you are all set, just point them there. Otherwise you have to figure out after you build the binary the first time (for example, with <code>ldd</code>) to which libraries it depends on.
|
||
In this example we consume the dependencies from the <a href="https://github.com/Luet-lab/luet-entropy-repo">Luet Entropy Repo</a>, that we will enable on the following steps.</li>
|
||
</ul>
|
||
<h2 id="2-build-it">2) Build it!</h2>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo /usr/bin/luet build <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--tree<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$PWD</span>/tree misc/catclock <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--destination <span style="color:#000">$PWD</span>/build <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--compression gzip
|
||
|
||
sudo chown -R <span style="color:#000">$USER</span> <span style="color:#000">$PWD</span>/build <span style="color:#8f5902;font-style:italic"># So later on, we can access to the repository with our user</span>
|
||
</code></pre></div><p>We are building the specs in this step.</p>
|
||
<ul>
|
||
<li><em>tree</em>: is the path where our specs are, in our case it&rsquo;s <code>tree</code>.</li>
|
||
<li><em>destination</em>: is the path where our packages will be stored, in our case this is <code>build</code>.</li>
|
||
<li><em>compression</em>: is the compression algorithm used to compress the final artifacts</li>
|
||
</ul>
|
||
<p>Note, we need <em>sudo</em> to keep the permissions properly mapped in the artifact which is produced
|
||
this is not always the case. Depends on the package content.</p>
|
||
<h2 id="3-create-a-local-repository">3) Create a local repository</h2>
|
||
<p>We will generate now our repository metadata:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">/usr/bin/luet create-repo --tree <span style="color:#4e9a06">&#34;tree&#34;</span> <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--output <span style="color:#000">$PWD</span>/build <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--packages <span style="color:#000">$PWD</span>/build <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--name <span style="color:#4e9a06">&#34;test repo&#34;</span> <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--descr <span style="color:#4e9a06">&#34;Test Repo&#34;</span> <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--tree-compression gzip <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--meta-compression gzip
|
||
</code></pre></div><p>Creating a repository in Luet is about adding metadata and make our spec tree available to other systems running Luet to intall the package.</p>
|
||
<ul>
|
||
<li><strong>output</strong>: a path which is where Luet will store the repository metadata.</li>
|
||
<li><strong>packages</strong>: a path containing the packages that were built during the build step</li>
|
||
<li><strong>name</strong>: Repository name</li>
|
||
<li><strong>descr</strong>: Repository description</li>
|
||
<li><strong>tree-compression</strong>: optional, algorithm to use when compression the tree metadata</li>
|
||
<li><strong>meta-compression</strong>: optional, algorithm to use when compression the repository metadata</li>
|
||
</ul>
|
||
<h2 id="4-lets-test-it">4) Let&rsquo;s test it!</h2>
|
||
<p>Now we are all set. We have the packages compiled, and we are ready to consume them. We don&rsquo;t want to break our host system, and we want to test this from our user.</p>
|
||
<p>Let&rsquo;s create a directory, we will try to setup a full running system, and install everything there.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let&#39;s create a directory for our &#34;fake&#34; rootfilesystem</span>
|
||
<span style="color:#8f5902;font-style:italic"># it will be populated with a minimal set of packages needed to run </span>
|
||
<span style="color:#8f5902;font-style:italic"># our amazing catclock</span>
|
||
mkdir -p <span style="color:#000">$PWD</span>/rootfs
|
||
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let&#39;s also create a directory to store our config files</span>
|
||
mkdir -p <span style="color:#000">$PWD</span>/conf
|
||
</code></pre></div><p>We will generate now a Luet config. The Luet config is used to read where install things from, and in which directory.
|
||
It also lists the repositories that are used by the client to retrieve packages remotely.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># We create here a config file which references the rootfs.</span>
|
||
<span style="color:#8f5902;font-style:italic"># In this way, luet instead installing packages to your host system, will populate the rootfs</span>
|
||
<span style="color:#8f5902;font-style:italic"># (note, all the steps are run by a user here, no root required!)</span>
|
||
cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; conf/luet-dso-local.yaml
|
||
</span><span style="color:#4e9a06">system:
|
||
</span><span style="color:#4e9a06"> rootfs: $PWD/rootfs # our &#34;fake&#34; rootfs that we created before
|
||
</span><span style="color:#4e9a06"> database_path: &#34;/&#34; # this is where our Luet DB will live
|
||
</span><span style="color:#4e9a06"> database_engine: &#34;boltdb&#34; # this is the Luet DB engine
|
||
</span><span style="color:#4e9a06">repositories:
|
||
</span><span style="color:#4e9a06"> - name: &#34;main&#34;
|
||
</span><span style="color:#4e9a06"> type: &#34;disk&#34;
|
||
</span><span style="color:#4e9a06"> priority: 3
|
||
</span><span style="color:#4e9a06"> enable: true
|
||
</span><span style="color:#4e9a06"> urls:
|
||
</span><span style="color:#4e9a06"> - &#34;$PWD/build&#34; # This is the repository we have created before!
|
||
</span><span style="color:#4e9a06"> - name: &#34;sabayonlinux.org&#34;
|
||
</span><span style="color:#4e9a06"> description: &#34;Sabayon Linux Repository&#34;
|
||
</span><span style="color:#4e9a06"> type: &#34;http&#34;
|
||
</span><span style="color:#4e9a06"> enable: true
|
||
</span><span style="color:#4e9a06"> cached: true
|
||
</span><span style="color:#4e9a06"> priority: 2
|
||
</span><span style="color:#4e9a06"> urls:
|
||
</span><span style="color:#4e9a06"> - &#34;https://dispatcher.sabayon.org/sbi/namespace/luet-entropy-repo&#34;
|
||
</span><span style="color:#4e9a06"> - name: &#34;luet-repo&#34;
|
||
</span><span style="color:#4e9a06"> description: &#34;Luet Official Repository&#34;
|
||
</span><span style="color:#4e9a06"> type: &#34;http&#34;
|
||
</span><span style="color:#4e9a06"> enable: true
|
||
</span><span style="color:#4e9a06"> cached: true
|
||
</span><span style="color:#4e9a06"> priority: 1
|
||
</span><span style="color:#4e9a06"> urls:
|
||
</span><span style="color:#4e9a06"> - &#34;https://raw.githubusercontent.com/Luet-lab/luet-repo/gh-pages&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
<span style="color:#8f5902;font-style:italic"># we have specified an additional repository, one that is luet-entropy-repo (which contains</span>
|
||
<span style="color:#8f5902;font-style:italic"># the runtime dependencies we specified in our package)</span>
|
||
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let&#39;s populate our rootfs with some minimal things: base-gcc, and bash</span>
|
||
<span style="color:#8f5902;font-style:italic"># meta/users is a meta package providing minimal base to run things with a full</span>
|
||
<span style="color:#8f5902;font-style:italic"># user-level support.</span>
|
||
<span style="color:#204a87">export</span> <span style="color:#000">LUET_NOLOCK</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#204a87">true</span>
|
||
luet install <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--config <span style="color:#000">$PWD</span>/conf/luet-dso-local.yaml <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>meta/users
|
||
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># catclock is a X11 app! we want to be able to play with it locally from our host :)</span>
|
||
<span style="color:#8f5902;font-style:italic"># Let&#39;s copy the .Xauthority file to allow the X app to communicate with our X server</span>
|
||
<span style="color:#8f5902;font-style:italic"># Note: This can be achieved in other ways (set up a tcp X server, and so on)</span>
|
||
cp -rfv <span style="color:#000">$HOME</span>/.Xauthority <span style="color:#000">$PWD</span>/rootfs/
|
||
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">luet install <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--config <span style="color:#000">$PWD</span>/conf/luet-dso-local.yaml <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>misc/catclock
|
||
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let&#39;s run our beautiful catclock :)</span>
|
||
luet box <span style="color:#204a87">exec</span> --rootfs <span style="color:#000">$PWD</span>/rootfs <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--stdin --stdout --stderr --env <span style="color:#000">DISPLAY</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$DISPLAY</span> <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--env <span style="color:#000">XAUTHORITY</span><span style="color:#ce5c00;font-weight:bold">=</span>/.Xauthority --mount /tmp --entrypoint /usr/bin/xclock
|
||
</code></pre></div><p>Spawn a bash shell inside our box (with permission to access to our running X):</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">luet box <span style="color:#204a87">exec</span> --rootfs <span style="color:#000">$PWD</span>/rootfs <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--stdin --stdout --stderr --env <span style="color:#000">DISPLAY</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$DISPLAY</span> <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>--env <span style="color:#000">XAUTHORITY</span><span style="color:#ce5c00;font-weight:bold">=</span>/.Xauthority --mount /tmp --entrypoint /bin/bash
|
||
</code></pre></div>
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Templated packages</title>
|
||
<link>https://luet.io/docs/concepts/packages/templates/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/packages/templates/</guid>
|
||
<description>
|
||
|
||
|
||
<p>Luet supports the <a href="http://masterminds.github.io/sprig/"><code>sprig</code> rendering engine template, like helm</a>. It&rsquo;s being used to interpolate <code>build.yaml</code> and <code>finalize.yaml</code> files before their execution. The following document assumes you are familiar with the <code>helm</code> templating.</p>
|
||
<p>The <code>build.yaml</code> and <code>finalize.yaml</code> files are rendered during build time, and it&rsquo;s possible to use the <code>helm</code> templating syntax inside such files. The <code>definition.yaml</code> file will be used to interpolate templating values available in <code>build.yaml</code></p>
|
||
<p>Given the following <code>definition.yaml</code>:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;test&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">additional_field</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;baz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>A <code>build.yaml</code> can look like the following, and interpolates it&rsquo;s values during build time:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo {{.Values.name}} &gt; /package_name</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo {{.Values.additional_field}} &gt; /extra</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>Which would be for example automatically rendered by luet like the following:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo test &gt; /package_name</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo baz &gt; /extra</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>This mechanism can be used in collections as well, and each stanza in <code>packages</code> is used to interpolate each single package.</p>
|
||
<h2 id="interpolating-globally">Interpolating globally</h2>
|
||
<p>It&rsquo;s possible to interpolate during build phase all the package specs targeted for build with the <code>--values</code> flag, which takes a yaml file of an arbitrary format, if variables are clashing, the yaml supplied in <code>--values</code> takes precedence and overwrite the values of each single <code>definition.yaml</code> file.</p>
|
||
<h2 id="shared-templates">Shared templates</h2>
|
||
<p>Since luet <code>0.17.5</code> it is possible to share templates across different packages. All templates blocks found inside the <code>templates</code> folder inside the root <code>luet tree</code> of a repository gets templated and shared across all the packages while rendering each compilation spec of the given tree.</p>
|
||
<p>Consider the following:</p>
|
||
<pre tabindex="0"><code>shared_templates
|
||
├── templates
|
||
│ └── writefile.yaml
|
||
└── test
|
||
├── build.yaml
|
||
└── collection.yaml
|
||
</code></pre><h4 id="collectionyaml"><code>collection.yaml</code></h4>
|
||
<p>We define here two packages with a collection. They will share the same compilation spec to generate two different packages
|
||
|
||
|
||
|
||
|
||
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">packages</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;test&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;test&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div>
|
||
|
||
<small> <i class='fab fa-github'></i> <i>Complete source code: <a target=_blank href="https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/test/collection.yaml">https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/test/collection.yaml</a></i> </small>
|
||
<hr>
|
||
</p>
|
||
<h4 id="writefileyaml"><code>writefile.yaml</code></h4>
|
||
<p>All the files in the <code>templates</code> folder will get rendered by the template for each package in the tree. We define here a simple block to write out a file from the context which is passed by:
|
||
|
||
|
||
|
||
|
||
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">{{<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">define &#34;writefile&#34; }}</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#000">echo conflict &gt; /foo/{{.}}</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>{{<span style="color:#000">end}}</span></code></pre></div>
|
||
|
||
<small> <i class='fab fa-github'></i> <i>Complete source code: <a target=_blank href="https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/templates/writefile.yaml">https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/templates/writefile.yaml</a></i> </small>
|
||
<hr>
|
||
</p>
|
||
<h4 id="buildyaml"><code>build.yaml</code></h4>
|
||
<p>Finally the build spec consumes the template block we declared above, passing by the name of the package:
|
||
|
||
|
||
|
||
|
||
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;alpine&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">prelude</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#000">mkdir /foo</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>{{<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">template &#34;writefile&#34; .Values.name }}</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">package_dir</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">/foo</span></code></pre></div>
|
||
|
||
<small> <i class='fab fa-github'></i> <i>Complete source code: <a target=_blank href="https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/test/build.yaml">https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/test/build.yaml</a></i> </small>
|
||
<hr>
|
||
</p>
|
||
<h2 id="limitations">Limitations</h2>
|
||
<p>The <code>finalize.yaml</code> file has access only to the package fields during templating. Extra fields that are present in the <code>definition.yaml</code> file are <em>not</em> accessible during rendering in the <code>finalize.yaml</code> file, but only the package fields (<code>name</code>, <code>version</code>, <code>labels</code>, <code>annotations</code>, &hellip;)</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="http://masterminds.github.io/sprig/">Sprig docs</a></li>
|
||
<li><a href="https://helm.sh/docs/chart_template_guide/function_list/">Helm Templating functions</a></li>
|
||
<li><a href="https://helm.sh/docs/chart_template_guide/variables/">Helm Templating variable</a></li>
|
||
</ul>
|
||
<h2 id="examples">Examples</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/mocaccinoOS/mocaccino-musl-universe/tree/master/multi-arch/packages/tar">https://github.com/mocaccinoOS/mocaccino-musl-universe/tree/master/multi-arch/packages/tar</a></li>
|
||
</ul>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: ARM images</title>
|
||
<link>https://luet.io/docs/resources/arm/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/resources/arm/</guid>
|
||
<description>
|
||
|
||
|
||
|
||
|
||
<div class="alert alert-warning" role="alert">
|
||
<h4 class="alert-heading">Warning</h4>
|
||
|
||
This article is outdated.
|
||
Please refer to the <a href="../../tutorials/hello_world/">&ldquo;Hello World&rdquo;</a> tutorial instead.
|
||
|
||
</div>
|
||
|
||
<p>Here we show an example on how to build &ldquo;burnable&rdquo; SD images for Raspberry Pi with Luet. This approach lets you describe and version OTA upgrades for your embedded devices, delivering upgrades as layer upgrades on the Pi.</p>
|
||
<p>The other good side of the medal is that you can build a Luet package repository with multiple distributions (e.g. <code>Raspbian</code>, <code>OpenSUSE</code>, <code>Gentoo</code>, &hellip; ) and switch among them in runtime. In the above example <code>Raspbian</code> and <code>Funtoo</code> (at the time of writing) are available.</p>
|
||
<h2 id="prerequisites">Prerequisites</h2>
|
||
<p>You have to run the following steps inside an ARM board to produce arm-compatible binaries. Any distribution with Docker will work. Note that the same steps could be done in a cross-compilation approach, or with qemu-binfmt in a amd64 host.</p>
|
||
<p>You will also need in your host:</p>
|
||
<ul>
|
||
<li>Docker</li>
|
||
<li>Luet installed (+container-diff) in <code>/usr/bin/luet</code> (arm build)</li>
|
||
<li>make</li>
|
||
</ul>
|
||
<h2 id="build-the-packages">Build the packages</h2>
|
||
<p>Clone the repository <a href="https://github.com/Luet-lab/luet-embedded">https://github.com/Luet-lab/luet-embedded</a></p>
|
||
<pre><code>$&gt; git clone https://github.com/Luet-lab/luet-embedded
|
||
$&gt; cd luet-embedded
|
||
$&gt; sudo make build-all
|
||
...
|
||
</code></pre>
|
||
<p>If a rebuild is needed, just do <code>sudo make rebuild-all</code> after applying the changes.</p>
|
||
<h2 id="create-the-repository">Create the repository</h2>
|
||
<pre><code>$&gt; sudo make create-repo
|
||
...
|
||
</code></pre>
|
||
<h2 id="serve-the-repo-locally">Serve the repo locally</h2>
|
||
<pre><code>$&gt; make serve-repo
|
||
...
|
||
</code></pre>
|
||
<h2 id="create-the-flashable-image">Create the flashable image</h2>
|
||
<h3 id="funtoo-based-system">Funtoo based system</h3>
|
||
<pre><code>$&gt; sudo LUET_PACKAGES='distro/funtoo-1.4 distro/raspbian-boot-0.20191208 system/luet-develop-0.5' make image
|
||
...
|
||
</code></pre>
|
||
<h3 id="raspbian-based-system">Raspbian based system</h3>
|
||
<pre><code>$&gt; sudo LUET_PACKAGES='distro/raspbian-0.20191208 distro/raspbian-boot-0.20191208 system/luet-develop-0.5' make image
|
||
...
|
||
</code></pre>
|
||
<p>At the end of the process, a file <code>luet_os.img</code>, ready to be flashed to an SD card, should be present in the current directory.</p>
|
||
<h2 id="add-packages">Add packages</h2>
|
||
<p>In order to build and add <a href="https://luet.io/docs/concepts/packages/">packages</a> to the exiting repository, simply add or edit the <a href="https://luet.io/docs/concepts/packages/specfile">specfiles</a> under the <code>distro</code> folder. When doing <code>make rebuild-all</code> the packages will be automatically compiled and made available to the local repository.</p>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Building</title>
|
||
<link>https://luet.io/docs/resources/building/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/resources/building/</guid>
|
||
<description>
|
||
|
||
|
||
<h2 id="simple-package-build">Simple package build</h2>
|
||
<p>Creating and building a simple <a href="https://luet.io/docs/concepts/packages/">package</a>:</p>
|
||
<pre tabindex="0"><code>$&gt; mkdir package
|
||
|
||
$&gt; cat &lt;&lt;EOF &gt; package/build.yaml
|
||
image: busybox
|
||
steps:
|
||
- echo &quot;foo&quot; &gt; /foo
|
||
EOF
|
||
|
||
$&gt; cat &lt;&lt;EOF &gt; package/definition.yaml
|
||
name: &quot;foo&quot;
|
||
version: &quot;0.1&quot;
|
||
EOF
|
||
|
||
$&gt; luet build --all
|
||
|
||
📦 Selecting foo 0.1
|
||
📦 Compiling foo version 0.1 .... ☕
|
||
🐋 Downloading image luet/cache-foo-bar-0.1-builder
|
||
🐋 Downloading image luet/cache-foo-bar-0.1
|
||
📦 foo Generating 🐋 definition for builder image from busybox
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder done
|
||
Sending build context to Docker daemon 4.096kB
|
||
...
|
||
|
||
</code></pre><h3 id="build-packages">Build packages</h3>
|
||
<p>In order to build a specific version, a full <a href="https://luet.io/docs/concepts/packages/">package</a> definition (triple of <code>category</code>, <code>name</code> and <code>version</code>) has to be specified.
|
||
In this example we will also enable package compression (gzip).</p>
|
||
<pre tabindex="0"><code>$&gt; mkdir package
|
||
|
||
$&gt; cat &lt;&lt;EOF &gt; package/build.yaml
|
||
image: busybox
|
||
steps:
|
||
- echo &quot;foo&quot; &gt; /foo
|
||
EOF
|
||
|
||
$&gt; cat &lt;&lt;EOF &gt; package/definition.yaml
|
||
name: &quot;foo&quot;
|
||
version: &quot;0.1&quot;
|
||
category: &quot;bar&quot;
|
||
EOF
|
||
|
||
$&gt; luet build bar/foo-0.1 --compression gzip
|
||
|
||
📦 Selecting foo 0.1
|
||
📦 Compiling foo version 0.1 .... ☕
|
||
🐋 Downloading image luet/cache-foo-bar-0.1-builder
|
||
🐋 Downloading image luet/cache-foo-bar-0.1
|
||
📦 foo Generating 🐋 definition for builder image from busybox
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder
|
||
🐋 Building image luet/cache-foo-bar-0.1-builder done
|
||
Sending build context to Docker daemon 4.096kB
|
||
...
|
||
|
||
</code></pre>
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Collections</title>
|
||
<link>https://luet.io/docs/concepts/packages/collections/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/packages/collections/</guid>
|
||
<description>
|
||
|
||
|
||
<p><code>Collections</code> are a special superset of packages. To define a collection, instead of using a <code>definition.yaml</code> file, create a <code>collection.yaml</code> file with a list of packages:</p>
|
||
|
||
|
||
|
||
|
||
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">packages</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;test&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;foo&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">category</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;test&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;bar&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div>
|
||
|
||
<small> <i class='fab fa-github'></i> <i>Complete source code: <a target=_blank href="https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/test/collection.yaml">https://github.com/mudler/luet/blob/master/tests/fixtures/shared_templates/test/collection.yaml</a></i> </small>
|
||
<hr>
|
||
|
||
<p>Packages under a collection shares the same <code>build.yaml</code> and <code>finalize.yaml</code>, so a typical package layout can be:</p>
|
||
<pre tabindex="0"><code>collection/
|
||
collection.yaml
|
||
build.yaml
|
||
finalize.yaml
|
||
... additional files in the build context
|
||
</code></pre><p>Luet during the build phase, will treat packages of a collection individually. A collection is a way to share the same build process across different packages.</p>
|
||
<h2 id="templating">Templating</h2>
|
||
<p><a href="https://luet.io/docs/concepts/packages/templates">The templating mechanism</a> can be used in collections as well, and each stanza in <code>packages</code> is used to interpolate each single package.</p>
|
||
<h2 id="examples">Examples</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/mocaccinoOS/mocaccino-musl-universe/tree/master/multi-arch/packages/entities">https://github.com/mocaccinoOS/mocaccino-musl-universe/tree/master/multi-arch/packages/entities</a></li>
|
||
<li><a href="https://github.com/mocaccinoOS/portage-tree/tree/master/multi-arch/packages/groups">https://github.com/mocaccinoOS/portage-tree/tree/master/multi-arch/packages/groups</a></li>
|
||
<li><a href="https://github.com/mocaccinoOS/mocaccino-musl-universe/tree/master/multi-arch/packages/X">https://github.com/mocaccinoOS/mocaccino-musl-universe/tree/master/multi-arch/packages/X</a></li>
|
||
</ul>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: CSP, SAT && RL</title>
|
||
<link>https://luet.io/docs/concepts/overview/constraints/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/overview/constraints/</guid>
|
||
<description>
|
||
|
||
|
||
<p>Under the hood, Luet uses boolean satisfiability problem (<a href="https://en.wikipedia.org/wiki/Boolean_satisfiability_problem">SAT</a>) <a href="https://en.wikipedia.org/wiki/Reinforcement_learning">reinforcement learning</a> techniques to solve package constraints.</p>
|
||
<p>Luet allows you to specify 3 types of set of contraints on a <a href="https://luet.io/docs/concepts/packages/">package</a> definition:</p>
|
||
<ul>
|
||
<li>Requires</li>
|
||
<li>Conflicts</li>
|
||
<li>Provides</li>
|
||
</ul>
|
||
<p>The package definition in your tree definition, along with its Requires and Conflicts, are turned into Boolean formulas that are consumed by the solver to compute a solution. The solution represent the state of your system after a particular query is asked to the solver (Install, Uninstall, Upgrade).</p>
|
||
<h2 id="requires-and-conflicts">Requires and Conflicts</h2>
|
||
<p>A list of requires and conflicts, composed of one or more <a href="https://luet.io/docs/concepts/packages/">packages</a>, becomes a SAT formula. The formula is then given to the SAT solver to compute a finite state set of packages which must be installed in the system in order to met the requirements.</p>
|
||
<p>As Luet allows to express constraints with selectors ( e.g. <code>A depends on &gt;=B-1.0</code>) it generates additional constraints to guarantee that at least one package and at most one is picked as dependency (<em>ALO</em> and <em>AMO</em>).</p>
|
||
<h2 id="provides">Provides</h2>
|
||
<p>Provides constraints are not encoded in a SAT formula. Instead, they are <code>expanded</code> into an in-place substitution of the packages that they have to be replaced with.
|
||
They share the same SAT logic of expansion, allowing to swap entire version ranges (e.g. <code>&gt;=1.0</code>), allowing to handle package rename, removals, and virtuals.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li>OPIUM (Luet is inspired by it): <a href="https://ranjitjhala.github.io/static/opium.pdf">https://ranjitjhala.github.io/static/opium.pdf</a></li>
|
||
<li>FROM TRACTABLE CSP TO TRACTABLE SAT: <a href="https://www.cs.ox.ac.uk/files/4014/maxclosed_orderencoding_v16_TR.pdf">https://www.cs.ox.ac.uk/files/4014/maxclosed_orderencoding_v16_TR.pdf</a></li>
|
||
<li>Solver concepts applied to packages (<code>zypper</code>): <a href="https://en.opensuse.org/openSUSE:Libzypp_satsolver_basics">https://en.opensuse.org/openSUSE:Libzypp_satsolver_basics</a></li>
|
||
</ul>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Frequently Asked Questions</title>
|
||
<link>https://luet.io/docs/resources/faq/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/resources/faq/</guid>
|
||
<description>
|
||
|
||
|
||
<h2 id="cant-build-packages">Can&rsquo;t build packages</h2>
|
||
<p>There might be several reasons why packages fails to build, for example, if your build fails like this:</p>
|
||
<pre tabindex="0"><code>$ luet build ...
|
||
|
||
INFO Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
|
||
ERROR Error: Failed compiling development/toolchain-go-0.6: failed building package image: Could not push image: quay.io/mocaccino/micro-toolchain:latest toolchain-go-development-0.6-builder.dockerfile: Could not build image: quay.io/mocaccino/micro-toolchain:latest toolchain-go-development-0.6-builder.dockerfile: Failed running command: : exit status 1
|
||
ERROR Bailing out
|
||
</code></pre><p>means the user you are running the build command can&rsquo;t either connect to docker or <code>docker</code> is not started.</p>
|
||
<p>Check if the user you are running the build is in the <code>docker</code> group, or if the <code>docker</code> daemon is started.</p>
|
||
<p>Luet by default if run with multiple packages summarize errors and can be difficult to navigate to logs, but if you think you might have found a bug, run the build with <code>--debug</code> before opening an issue.</p>
|
||
<h2 id="why-the-name-luet">Why the name <code>luet</code>?</h2>
|
||
<p>Well, I have the idea that programs should be small, so they are not difficult to type and easy to remember, and easy to stick in. <code>luet</code> is really a combination of the first letters of my fiancee name (Lucia) and my name (Ettore) <code>lu+et = luet</code>! and besides, happen to be also a <a href="http://www.comuniterrae.it/punto/ponte-luet/">small bridge</a> in Italy ;)</p>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Images from scratch</title>
|
||
<link>https://luet.io/docs/resources/scratch/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/resources/scratch/</guid>
|
||
<description>
|
||
|
||
|
||
<p>The Docker image <code>quay.io/luet/base</code> is a <code>scratch</code> Docker image always kept up-to-date with the latest luet version. That image can be used to bootstrap new images with Luet repositories with the packages you want, from the repositories you prefer.</p>
|
||
<p>For example we can mount a config file, and later on install a package:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt; $PWD/luet.yaml
|
||
</span><span style="color:#4e9a06">repositories:
|
||
</span><span style="color:#4e9a06"> - name: &#34;micro-stable&#34;
|
||
</span><span style="color:#4e9a06"> enable: true
|
||
</span><span style="color:#4e9a06"> cached: true
|
||
</span><span style="color:#4e9a06"> priority: 1
|
||
</span><span style="color:#4e9a06"> type: &#34;http&#34;
|
||
</span><span style="color:#4e9a06"> urls:
|
||
</span><span style="color:#4e9a06"> - &#34;https://get.mocaccino.org/mocaccino-micro-stable&#34;
|
||
</span><span style="color:#4e9a06">EOF</span>
|
||
|
||
docker rm luet-runtime-test <span style="color:#ce5c00;font-weight:bold">||</span> <span style="color:#204a87">true</span>
|
||
docker run --name luet-runtime-test <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span> -ti -v /tmp:/tmp <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span> -v <span style="color:#000">$PWD</span>/luet.yaml:/etc/luet/luet.yaml:ro <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span> quay.io/luet/base install shells/bash
|
||
|
||
docker commit luet-runtime-test luet-runtime-test-image
|
||
|
||
<span style="color:#8f5902;font-style:italic"># Try your new image!</span>
|
||
|
||
docker run -ti --entrypoint /bin/bash --rm luet-runtime-test-image
|
||
</code></pre></div><p>In this way we will create a new image, with only <code>luet</code> and <code>bash</code>, and nothing else from a scratch image.</p>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: References</title>
|
||
<link>https://luet.io/docs/resources/references/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/resources/references/</guid>
|
||
<description>
|
||
|
||
|
||
<h2 id="references">References</h2>
|
||
<p>Here is a list of references to projects that are related to Luet (open up a PR to add yours to the list!):</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Description</th>
|
||
<th>URL</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>Official Luet repository</td>
|
||
<td><a href="https://github.com/Luet-lab/luet-repo">https://github.com/Luet-lab/luet-repo</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Example repository to host package browser websites on gh-pages. It uses the package-browser extension to generate HTML pages from a list of luet repositories</td>
|
||
<td><a href="https://github.com/Luet-lab/package-browser-sample">https://github.com/Luet-lab/package-browser-sample</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td>LineageOS builds with luet</td>
|
||
<td><a href="https://github.com/mudler/android-builds">https://github.com/mudler/android-builds</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Example repository template to build packages on github actions and push packages on a container registry</td>
|
||
<td><a href="https://github.com/Luet-lab/github-repository">https://github.com/Luet-lab/github-repository</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Immutable container OS toolkit</td>
|
||
<td><a href="https://github.com/rancher-sandbox/cOS-toolkit">https://github.com/rancher-sandbox/cOS-toolkit</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td>mocaccinoOS desktop</td>
|
||
<td><a href="https://github.com/mocaccinoOS/desktop">https://github.com/mocaccinoOS/desktop</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td>mocaccinoOS extra</td>
|
||
<td><a href="https://github.com/mocaccinoOS/mocaccino-extra">https://github.com/mocaccinoOS/mocaccino-extra</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td>agregOS built with luet/mocaccino</td>
|
||
<td><a href="https://interne.agreg.org/agregOS/">https://interne.agreg.org/agregOS/</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: Contributing</title>
|
||
<link>https://luet.io/docs/contribution-guidelines/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/contribution-guidelines/</guid>
|
||
<description>
|
||
|
||
|
||
<h2 id="contributing-to-luet">Contributing to Luet</h2>
|
||
<p>Contribution guidelines for the Luet project are on the <a href="https://github.com/mudler/luet/blob/master/CONTRIBUTING.md">Github repository</a>. Here you can find some heads up for contributing to the documentation website.</p>
|
||
<h2 id="contributing-to-the-docs-website">Contributing to the Docs website</h2>
|
||
<h3 id="we-develop-with-github">We Develop with Github</h3>
|
||
<p>We use <a href="https://github.com/Luet-lab/docs">github to host code</a>, to track issues and feature requests, as well as accept pull requests.</p>
|
||
<p>We use <a href="https://gohugo.io/">Hugo</a> to format and generate our website, the
|
||
<a href="https://github.com/google/docsy">Docsy</a> theme for styling and site structure,
|
||
and Github Actions to manage the deployment of the site.
|
||
Hugo is an open-source static site generator that provides us with templates,
|
||
content organisation in a standard directory structure, and a website generation
|
||
engine. You write the pages in Markdown (or HTML if you want), and Hugo wraps them up into a website.</p>
|
||
<p>All submissions, including submissions by project members, require review. We
|
||
use GitHub pull requests for this purpose. Consult
|
||
<a href="https://help.github.com/articles/about-pull-requests/">GitHub Help</a> for more
|
||
information on using pull requests.</p>
|
||
<h3 id="any-contributions-you-make-will-be-under-the-software-license-of-the-repository">Any contributions you make will be under the Software License of the repository</h3>
|
||
<p>In short, when you submit code changes, your submissions are understood to be under the same License that covers the project. Feel free to contact the maintainers if that&rsquo;s a concern.</p>
|
||
<h3 id="updating-a-single-page">Updating a single page</h3>
|
||
<p>If you&rsquo;ve just spotted something you&rsquo;d like to change while using the docs, Docsy has a shortcut for you:</p>
|
||
<ol>
|
||
<li>Click <strong>Edit this page</strong> in the top right hand corner of the page you want to modify.</li>
|
||
<li>If you don&rsquo;t already have an up to date fork of the project repo, you are prompted to get one - click <strong>Fork this repository and propose changes</strong> or <strong>Update your Fork</strong> to get an up to date version of the project to edit. The appropriate page in your fork is displayed in edit mode.</li>
|
||
</ol>
|
||
<h3 id="quick-start-with-a-local-checkout">Quick start with a local checkout</h3>
|
||
<p>Here&rsquo;s a quick guide to updating the docs with a git local checkout. It assumes you&rsquo;re familiar with the
|
||
GitHub workflow and you&rsquo;re happy to use the automated preview of your doc
|
||
updates:</p>
|
||
<ol>
|
||
<li>Fork the <a href="https://github.com/Luet-lab/docs">the Docs repo</a> on GitHub.</li>
|
||
<li>Make your changes, to see the preview run <code>make serve</code> and browse to <code>localhost:1313</code></li>
|
||
<li>If you&rsquo;re not yet ready for a review, add &ldquo;WIP&rdquo; to the PR name to indicate
|
||
it&rsquo;s a work in progress.</li>
|
||
<li>Continue updating your doc and pushing your changes until you&rsquo;re happy with
|
||
the content.</li>
|
||
<li>When you&rsquo;re ready for a review, add a comment to the PR, and remove any
|
||
&ldquo;WIP&rdquo; markers.</li>
|
||
<li>When you are satisfied send a pull request (PR).</li>
|
||
</ol>
|
||
<h3 id="license">License</h3>
|
||
<p>By contributing, you agree that your contributions will be licensed under the project Licenses.</p>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Docs: </title>
|
||
<link>https://luet.io/docs/concepts/overview/configuration/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://luet.io/docs/concepts/overview/configuration/</guid>
|
||
<description>
|
||
|
||
|
||
<h2 id="configuring-luet">title: &ldquo;Configuration&rdquo;
|
||
linkTitle: &ldquo;Configuration
|
||
weight: 2
|
||
description: &gt;
|
||
Configuring Luet</h2>
|
||
<h3 id="general">General</h3>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">general</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Define max concurrency processes. Default is based of arch: runtime.NumCPU()</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">concurrency</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable Debug. If debug is active spinner is disabled.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">debug</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Show output of build execution (docker, img, etc.)</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">show_build_output</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Define spinner ms</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spinner_ms</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">200</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Define spinner charset. See https://github.com/briandowns/spinner</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spinner_charset</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">22</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable warnings to exit</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">fatal_warnings</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Try extracting tree/packages with the same ownership as exists in the archive (default for superuser).</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">same_owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="images">Images</h3>
|
||
<p>After the building of the packages, you can apply arbitrary images on top using the <code>images</code> stanza. This is useful if you need to pin a package to a specific version.</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">images</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#000">quay.io/kairos/packages:kairos-agent-system-2.1.12</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="logging">Logging</h3>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">logging</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable loggging to file (if path is not empty)</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">enable_logfile</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Leave empty to skip logging to file.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">path</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/var/log/luet.log&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Set logging level: error|warning|info|debug</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">level</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;info&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable JSON log format instead of console mode.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">json_format</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#000">.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Disable/Enable color</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">color</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable/Disable emoji</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">enable_emoji</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="repositories-configurations-directories">Repositories configurations directories.</h3>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#8f5902;font-style:italic"># Define the list of directories where luet</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># try for files with .yml extension that define</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># luet repository.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">repos_confdir</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#000">/etc/luet/repos.conf.d</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="finalizer-environment-variables">Finalizer Environment Variables</h3>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">finalizer_envs</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">key</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;BUILD_ISO&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="repositories">Repositories</h3>
|
||
<p>To add repositories, you can either add a <code>repositories</code> stanza in your <code>/etc/luet/luet.yaml</code> or either add one or more yaml files in <code>/etc/luet/repos.conf.d/</code>.</p>
|
||
<h4 id="configuring-repositories-in-the-main-configuration-file">Configuring repositories in the main configuration file</h4>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">logging</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">color</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable/Disable colored output</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">enable_emoji</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable/Disable emoji from output</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">general</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">debug</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable/Disable debug</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">system</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">rootfs</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># What&#39;s our rootfs. Luet can install packages outside of &#34;/&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">database_path</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/var/db/luet&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Where to store DB files</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">database_engine</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;boltdb&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">tmpdir_base</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/var/tmp/luet&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># The temporary directory to be used</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">repositories</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;some-repository-name&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Repository name</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">description</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;A beautiful description&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;http&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Repository type, disk or http are supported (disk for local path)</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">enable</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable/Disable repo</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">cached</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable cache for repository</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">priority</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Cache priority</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">urls</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Repository URLs</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#4e9a06">&#34;....&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h4 id="using-different-files-to-configure-repositories">Using different files to configure repositories</h4>
|
||
<p>In the main configuration file you can specify the directory where all repositories are configured:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">repos_confdir</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#000">/etc/luet/repos.conf.d</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>Then add a file inside <code>/etc/luet/repos.conf.d/example.yaml</code> with your configuration, e.g.:</p>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Repository name</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">description</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;http&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Repository type, disk or http are supported (disk for local path)</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">enable</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable/Disable repo</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">cached</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Enable cache for repository</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">priority</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Cache priority</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">urls</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Repository URLs</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#4e9a06">&#34;...&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>There is available a <a href="https://packages.mocaccino.org/repository-index">collection of repositories</a>, which is containing a list of repositories that can be installed in the system with <code>luet install</code>.</p>
|
||
<p>If you installed Luet from the curl command, you just need to run <code>luet search repository</code> to see a list of all the available repository, and you can install them singularly by running <code>luet install repository/&lt;name&gt;</code>. Otherwise, add the repository stanzas you need to <code>/etc/luet/luet.yaml</code>.</p>
|
||
<h4 id="config-protect-configuration-files-directories">Config protect configuration files directories.</h4>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#8f5902;font-style:italic"># Define the list of directories where load</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># configuration files with the list of config</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># protect paths.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">config_protect_confdir</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#000">/etc/luet/config.protect.d</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># Ignore rules defined on</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># config protect confdir and packages</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># annotation.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">config_protect_skip</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># The paths used for load repositories and config</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># protects are based on host rootfs.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># If set to false rootfs path is used as prefix.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">config_from_host</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="solver-parameter-configuration">Solver Parameter Configuration</h3>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">solver</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Solver strategy to solve possible conflicts during depedency</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># solving. Defaults to empty (none). Available: qlearning</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Solver agent learning rate. 0.1 to 1.0</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">rate</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.7</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Learning discount factor.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">discount</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Number of overall attempts that the solver has available before bailing out.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">max_attempts</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">9000</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h3 id="system">System</h3>
|
||
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">system</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Rootfs path of the luet system. Default is /.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># A specific path could be used for test installation to</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># a chroot environment.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">rootfs</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Database engine used for luet database.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Supported values: boltdb|memory</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">database_engine</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">boltdb</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Database path directory where store luet database.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># The path is appended to rootfs option path.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">database_path</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/var/cache/luet&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Define the tmpdir base directory where luet store temporary files.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Default $TMPDIR/tmpluet</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">tmpdir_base</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;/tmp/tmpluet&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div>
|
||
</description>
|
||
</item>
|
||
|
||
</channel>
|
||
</rss>
|