<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>exherbo Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/exherbo/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/exherbo/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Fri, 20 Mar 2026 14:51:23 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>exherbo Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/exherbo/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Rust packaging on Exherbo</title>
		<link>https://www.clever.cloud/blog/engineering/2016/10/24/exherbo-rust-packaging/</link>
		
		<dc:creator><![CDATA[Marc-Antoine Perennou]]></dc:creator>
		<pubDate>Mon, 24 Oct 2016 14:36:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[exherbo]]></category>
		<category><![CDATA[Rust]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2016/10/24/exherbo-rust-packaging/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="rust packaging 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>At Clever Cloud, we love giving new technologies a try. Since its inception, <a href="http://rust-lang.org/">rust</a> has always been quite appealing and we always wanted to find projects for which rust would be an adequate solution.</p>
<p>Now that rust is mature enough (to our taste), we started giving it a go, and we needed a way to easily package rust software for our distribution of choice: <a href="https://exherbo.org/">Exherbo</a>.</p>
<span id="more-2808"></span>

<h2 id="rust-package-manager-cargo">Rust package manager: cargo</h2>
<p>Amongst the tooling shipped with rust is cargo. Cargo allows you to simply build, test and install a package and its dependencies. It&#39;s actually very nice to use when developing.</p>
<p>If we were to install software with cargo, there are two solutions:</p>
<ul>
<li>Either we want to install something like a private or local projects and we just
have to go to the sources directory, where the <code>Cargo.toml</code> file is, and run
<code>cargo install</code></li>
<li>Or we want to install something publicly available, on <a href="https://crates.io/">crates.io</a>
for example, we can just run <code>cargo install crate_name</code>, <code>crate_name</code> being the actual
crate (cargo package) name. We could also pass it a git URL as an alternative.</li>
</ul>
<p>Regarding production environment and system-wide utilities, we want everything to be managed by the distribution package manager, <a href="http://paludis.exherbo.org/">paludis</a>, so we had to hook up those two and try to make them work together as well as possible.</p>
<h2 id="how-packaging-rust-is-different-from-packaging-other-software">How packaging rust is different from packaging other software</h2>
<p>Currently, rust doesn&#39;t support installing libraries system-wide as they&#39;re not confident enough in the stability of their <a href="https://en.wikipedia.org/wiki/Application_binary_interface">ABI</a> yet. What that concretely means is that it&#39;s not yet possible to install any rust library, and then use it to build dependent stuff. You have to rebuild all the dependencies each time you build a rust binary.</p>
<p>That particular point is the most noticeable difference on the packaging point of view. Instead of building and installing the dependencies, then the dependents, you only install the final product with everything built in.</p>
<h2 id="what-a-traditional-install-process-looks-like-in-a-source-based-distribution">What a &quot;traditional&quot; install process looks like in a source-based distribution</h2>
<p>For traditional packages, the build and install process is composed of several sequential steps, that we can summarize like this, in that order:</p>
<h3 id="fetch">Fetch</h3>
<p>This is the step where we download everything, usually the software sources.</p>
<p>This is the only step for which network sandboxing is disabled.</p>
<h3 id="unpack">Unpack</h3>
<p>Here we unpack the sources in a sandboxed environment. Network sandboxing is on as well as file system sandboxing for this step and all the steps onwards.</p>
<h3 id="prepare">Prepare</h3>
<p>This is an optional phase, not needed by all packages. It&#39;s the moment when we generate build-system files if needed and apply patches to the software sources.</p>
<h3 id="configure">Configure</h3>
<p>We decide there which features we want to enable or not for the build.</p>
<h3 id="build">Build</h3>
<p>Where the actual build happens.</p>
<h3 id="install">Install</h3>
<p>We install the resulting binaries/files in a sandboxed location replicating the / hierarchy.</p>
<h3 id="merge">Merge</h3>
<p>Once everything gets validated in terms of file system access, everything gets installed to the root file system.</p>
<h2 id="what-a-rust-install-process-looks-like">What a rust install process looks like</h2>
<p>A rust install pretty much ressembles a traditional one, with one huge exception.</p>
<p>As I said before, <code>cargo install</code> supports either reading a local <code>Cargo.toml</code>, or being passed a crate name or a git URL.</p>
<p>On the other hand, <code>cargo fetch</code>, which is the command that downloads all the dependencies doesn&#39;t have these options, it only supports reading a local <code>Cargo.toml</code> and fetching the dependencies listed in it. If libraries were installable system-wide, we wouldn&#39;t need this step at all, but since they&#39;re not, we <em>have</em> to do this step <em>after</em> unpacking the sources, to be able to access the <code>Cargo.toml</code>.</p>
<p>This has serious implications, it means that we extend the unpack phase with three additional actions:</p>
<ul>
<li>disable the network sandboxing, which is really sad and we should never do that</li>
<li><code>cargo fecth</code></li>
<li>re-enable the network sandboxing</li>
</ul>
<p>Of course, we don&#39;t have to download the dependencies at each reinstall, cargo supports a <code>CARGO_HOME</code> environment variable allowing us to store the downloads in a shared location with all other distfiles.</p>
<p>We&#39;ll eventually be able to install libraries system-wide, but I don&#39;t see that happening any time soon. The better workaround I could come up with to clean up this hack is to make <code>cargo fetch</code> support being given a crate name or a URL, matching its companion <code>cargo install</code>. <a href="https://github.com/rust-lang/cargo/issues/2998">Here is the corresponding github issue</a> but I&#39;m not sure whether it will be implemented nor when.</p>
<h2 id="actual-implementation-and-examples">Actual implementation and examples</h2>
<p>The implementation of my exlib (which is to exherbo packages what libraries are to software) <a href="https://git.exherbo.org/rust.git/tree/exlibs/cargo.exlib">can be found here</a>.</p>
<p><a href="https://git.exherbo.org/rust.git/tree/packages/dev-rust/cargo-watch/cargo-watch-3.1.0.exheres-0?id=1feab03e51d7419e5fcea3f6348c396fa795a66e">cargo-watch</a> is a good example of what a rust exherbo package using this exlib looks like. You can see it&#39;s fairly trivial and everything is automatic.</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="rust packaging 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/rust-packaging-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>At Clever Cloud, we love giving new technologies a try. Since its inception, <a href="http://rust-lang.org/">rust</a> has always been quite appealing and we always wanted to find projects for which rust would be an adequate solution.</p>
<p>Now that rust is mature enough (to our taste), we started giving it a go, and we needed a way to easily package rust software for our distribution of choice: <a href="https://exherbo.org/">Exherbo</a>.</p>
<span id="more-2808"></span>

<h2 id="rust-package-manager-cargo">Rust package manager: cargo</h2>
<p>Amongst the tooling shipped with rust is cargo. Cargo allows you to simply build, test and install a package and its dependencies. It&#39;s actually very nice to use when developing.</p>
<p>If we were to install software with cargo, there are two solutions:</p>
<ul>
<li>Either we want to install something like a private or local projects and we just
have to go to the sources directory, where the <code>Cargo.toml</code> file is, and run
<code>cargo install</code></li>
<li>Or we want to install something publicly available, on <a href="https://crates.io/">crates.io</a>
for example, we can just run <code>cargo install crate_name</code>, <code>crate_name</code> being the actual
crate (cargo package) name. We could also pass it a git URL as an alternative.</li>
</ul>
<p>Regarding production environment and system-wide utilities, we want everything to be managed by the distribution package manager, <a href="http://paludis.exherbo.org/">paludis</a>, so we had to hook up those two and try to make them work together as well as possible.</p>
<h2 id="how-packaging-rust-is-different-from-packaging-other-software">How packaging rust is different from packaging other software</h2>
<p>Currently, rust doesn&#39;t support installing libraries system-wide as they&#39;re not confident enough in the stability of their <a href="https://en.wikipedia.org/wiki/Application_binary_interface">ABI</a> yet. What that concretely means is that it&#39;s not yet possible to install any rust library, and then use it to build dependent stuff. You have to rebuild all the dependencies each time you build a rust binary.</p>
<p>That particular point is the most noticeable difference on the packaging point of view. Instead of building and installing the dependencies, then the dependents, you only install the final product with everything built in.</p>
<h2 id="what-a-traditional-install-process-looks-like-in-a-source-based-distribution">What a &quot;traditional&quot; install process looks like in a source-based distribution</h2>
<p>For traditional packages, the build and install process is composed of several sequential steps, that we can summarize like this, in that order:</p>
<h3 id="fetch">Fetch</h3>
<p>This is the step where we download everything, usually the software sources.</p>
<p>This is the only step for which network sandboxing is disabled.</p>
<h3 id="unpack">Unpack</h3>
<p>Here we unpack the sources in a sandboxed environment. Network sandboxing is on as well as file system sandboxing for this step and all the steps onwards.</p>
<h3 id="prepare">Prepare</h3>
<p>This is an optional phase, not needed by all packages. It&#39;s the moment when we generate build-system files if needed and apply patches to the software sources.</p>
<h3 id="configure">Configure</h3>
<p>We decide there which features we want to enable or not for the build.</p>
<h3 id="build">Build</h3>
<p>Where the actual build happens.</p>
<h3 id="install">Install</h3>
<p>We install the resulting binaries/files in a sandboxed location replicating the / hierarchy.</p>
<h3 id="merge">Merge</h3>
<p>Once everything gets validated in terms of file system access, everything gets installed to the root file system.</p>
<h2 id="what-a-rust-install-process-looks-like">What a rust install process looks like</h2>
<p>A rust install pretty much ressembles a traditional one, with one huge exception.</p>
<p>As I said before, <code>cargo install</code> supports either reading a local <code>Cargo.toml</code>, or being passed a crate name or a git URL.</p>
<p>On the other hand, <code>cargo fetch</code>, which is the command that downloads all the dependencies doesn&#39;t have these options, it only supports reading a local <code>Cargo.toml</code> and fetching the dependencies listed in it. If libraries were installable system-wide, we wouldn&#39;t need this step at all, but since they&#39;re not, we <em>have</em> to do this step <em>after</em> unpacking the sources, to be able to access the <code>Cargo.toml</code>.</p>
<p>This has serious implications, it means that we extend the unpack phase with three additional actions:</p>
<ul>
<li>disable the network sandboxing, which is really sad and we should never do that</li>
<li><code>cargo fecth</code></li>
<li>re-enable the network sandboxing</li>
</ul>
<p>Of course, we don&#39;t have to download the dependencies at each reinstall, cargo supports a <code>CARGO_HOME</code> environment variable allowing us to store the downloads in a shared location with all other distfiles.</p>
<p>We&#39;ll eventually be able to install libraries system-wide, but I don&#39;t see that happening any time soon. The better workaround I could come up with to clean up this hack is to make <code>cargo fetch</code> support being given a crate name or a URL, matching its companion <code>cargo install</code>. <a href="https://github.com/rust-lang/cargo/issues/2998">Here is the corresponding github issue</a> but I&#39;m not sure whether it will be implemented nor when.</p>
<h2 id="actual-implementation-and-examples">Actual implementation and examples</h2>
<p>The implementation of my exlib (which is to exherbo packages what libraries are to software) <a href="https://git.exherbo.org/rust.git/tree/exlibs/cargo.exlib">can be found here</a>.</p>
<p><a href="https://git.exherbo.org/rust.git/tree/packages/dev-rust/cargo-watch/cargo-watch-3.1.0.exheres-0?id=1feab03e51d7419e5fcea3f6348c396fa795a66e">cargo-watch</a> is a good example of what a rust exherbo package using this exlib looks like. You can see it&#39;s fairly trivial and everything is automatic.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Knowing your system &#8211; Part 6 &#8211; Source-based distributions: Discovering Exherbo</title>
		<link>https://www.clever.cloud/blog/engineering/2012/12/27/knowing-your-system-part-6-source-based-distributions-discovering-exherbo/</link>
		
		<dc:creator><![CDATA[Marc-Antoine Perennou]]></dc:creator>
		<pubDate>Thu, 27 Dec 2012 00:00:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[exherbo]]></category>
		<category><![CDATA[Open Source]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2012/12/27/knowing-your-system-part-6-source-based-distributions-discovering-exherbo/</guid>

					<description><![CDATA[The limits of Gentoo As I said in part 3 of the &#8220;knowing your system&#8221; saga, I really started to dig into my system when I used Gentoo. I quickly spotted the limits of portage, its default package manager and switched to paludis. It really is easy to mess up your python installation, especially when [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2 id="the-limits-of-gentoo">The limits of Gentoo</h2>
<p>As I said in part 3 of the &#8220;knowing your system&#8221; saga, I really started to dig into my system when I used <a href="http://www.gentoo.org/">Gentoo</a>. I quickly spotted the limits of portage, its default package manager and switched to paludis.</p>
<p><span id="more-2789"></span></p>
<p>It really is easy to mess up your python installation, especially when you&#8217;re not a python developer and you don&#8217;t care about it. Of course there are tools to help you, such as <code>python-updater</code>, but it won&#8217;t be of great help if you&#8217;re not in a basic &#8220;breakage because of python update&#8221; case. Because of portage being written in python, you end up with an unmaintainable system which is painful.</p>
<p>A pretty good example of this is when I tried install Gentoo on my Playstation 3. At this time, the powerpc stage was kinda old. During the base system installation and update, you ended with the linux headers version being incompatible with your python installation, and portage was unusable. After 3 attempts without success, I tried once starting by installing paludis, and then doing everything with it. It worked like a charm.</p>
<p>Portage is not the only limitation of Gentoo. Its workflow is kinda insane. First of all, Gentoo aims to get every piece of software packaged in a same repository, external overlays being there only for testing purpose before merging. You end up with tons of packages being available on your machine, 95% of them won&#8217;t ever interest you. You could say it&#8217;s cool to get everything available without needing internet access to retrieve them, but you&#8217;ll still have to download the source tarballs so it&#8217;s pointless, it just make dependencies resolution slower.</p>
<p>Another problem is contribution. To contribute to Gentoo, you&#8217;ll open a bug <a href="ttps://bugs.gentoo.org/">on their bugzilla</a> with a patch attached (I&#8217;m fine with this first step, the next ones are awful). When a developer or a proxy maintainer sees it, he applies it locally and push it to the centralised CVS server (which you sync using rsync on client side&#8230;). There is a HUGE lack of consistency in this process:</p>
<ul>
<li>As a simple contributor, you won&#8217;t ever be the author of the real commit, at most you&#8217;ll be mentioned in the commit message</li>
<li>You don&#8217;t use the same tool to pull changes in that the one developer use to push them.</li>
</ul>
<h2 id="exherbo-is-awesome">Exherbo is awesome</h2>
<p>After having used paludis on Gentoo for one year or so, I decided to involve myself in its community. I started to send a couple of patches for my purpose, and to help beginners to deal with it. I then heard of another bigger project they were launching: a brand new source-based distribution, a kind of Gentoo rewritten from scratch in a more modern, modular, clean and strict way.</p>
<p>While I was still using Gentoo, I started to install <a href="http://www.exherbo.org/">exherbo</a> in a chroot, to give it a try. First thing I really enjoyed was that everything is split into several repositories. If I do not have any C# application installed, the repository containing the mono stuff won&#8217;t be installed and those packages won&#8217;t be available on my system. If I finally decide to install mono, I will automatically be suggested to install the mono repository, and running <code>cave resolve -x1 repository/mono</code> will do all the stuff for you. Everything is managed by git both on the developer and &#8220;user&#8221; side. Being an exherbo &#8220;user&#8221; is kinda special, since every user is considered as a developer by the community.</p>
<p>Contributing to exherbo is really easy and smooth, I&#8217;ll explain my contribution workflow next week.</p>
<p>As exherbo is a &#8220;new&#8221; distribution, not every package is available, so you&#8217;ll probably end up creating your own repository to package your software. Once you get enough packages in it and you want to share it with the community, you just have to submit it, people will review it and tell you how you can make it better. It will then be added to the list of available repositories so that people will be guided to it when they try to install software you&#8217;ll have packaged. For example, at <a href="https://www.clever.cloud/">Clever Cloud</a>, we use <a href="http://www.openstack.org/">openstack</a> for now, and we had to package it and its dependencies. Everything is available in our repository.</p>
<p>One more thing: exherbo policy is to be as vanilla as possible. Every patch used in packages must contain the upstream status of it, since they all have to be submitted. We want to maintain as few patches as possible.</p>
<p><a href="https://github.com/Keruspe/Keruspe-exhereses">My exherbo repository</a></p>
<p><a href="https://github.com/CleverCloud/CleverCloud-exheres">Clever Cloud exherbo repository</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Knowing your system &#8211; Part 5 &#8211; Source-based distributions: the binary way</title>
		<link>https://www.clever.cloud/blog/engineering/2012/12/20/knowing-your-system-part-5-source-based-distributions-the-binary-way/</link>
		
		<dc:creator><![CDATA[Marc-Antoine Perennou]]></dc:creator>
		<pubDate>Thu, 20 Dec 2012 00:00:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[exherbo]]></category>
		<category><![CDATA[Open Source]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2012/12/20/knowing-your-system-part-5-source-based-distributions-the-binary-way/</guid>

					<description><![CDATA[We last saw the paludis tool. Now, we&#8217;ll take a look at how we can handle a source-based distribution using paludis for large pools of servers. Source-based distributions for huge server pools At Clever Cloud, we decided to use a source-based GNU/Linux distribution called exherbo, which I&#8217;ll blog about next week, because of its strictness [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://engineering.clever-cloud.com/sysadmin/2012/12/13/knowing-your-system---part-4---falling-in-love-with-paludis.html">We last saw</a> the <a href="http://paludis.exherbo.org/">paludis</a> tool. Now, we&#8217;ll take a look at how we can handle a source-based distribution using paludis for large pools of servers.</p>
<p><span id="more-2788"></span></p>
<h2 id="source-based-distributions-for-huge-server-pools">Source-based distributions for huge server pools</h2>
<p>At <a href="https://www.clever.cloud/">Clever Cloud</a>, we decided to use a source-based GNU/Linux distribution called <a href="http://www.exherbo.org/">exherbo</a>, which I&#8217;ll blog about next week, because of its strictness and flexibility. Since we have to manage hundreds of servers and virtual machines, it would have been a big overload in energy consumption and in time invested if we managed it the &#8220;conventional&#8221; way. Indeed, compiling everything on the hypervisors could cause instabilities because of the CPUs being monopolised by the compilation process, leaving no power to virtual machines. The virtual machines would have the same problem, and for much longer, since you do not have the same power in a virtual machine than in an hypervisor, so compilations last longer.</p>
<p>This is why we decided to manage everything using binary packages. Wait… What? Binary packages in a source-based distribution? How?!</p>
<h2 id="the-search-is-over-paludis-pbins">The search is over: paludis&#8217; pbins</h2>
<h3 id="setup">Setup</h3>
<p>Paludis comes with a very nice feature: <a href="http://paludis.exherbo.org/overview/pbins.html">pbins</a>.</p>
<p>The concept is simple:</p>
<ul>
<li>You create an empty repository, anywhere in your filesystem, containing an empty <code>packages</code> directory, a <code>profiles</code><br />
directory containing a file named <code>repo_name</code> which contents is your binary repository name, like <code>mybinaries</code>.</li>
<li>In your repository, create a <code>metadata</code> containing a <code>layout.conf</code> file, with <code>masters = arbor</code> in it.</li>
<li>On your compilation node, create a configuration file for you binary repository</li>
<li>On the other nodes, create a configuration file for it too. It&#8217;s the same, without the lines starting with <code>binary_</code><br />
and modifying the <code>sync</code> line</li>
</ul>
<p>A sample configuration file:</p>
<pre><code class="language-ini">format = e
location = /var/db/paludis/repositories/mybinaries
sync = file:///var/db/paludis/repositories/mybinaries
importance = 100
binary_destination = true
binary_distdir = /var/cache/paludis/distfiles
binary_keywords_filter = amd64 ~amd64
binary_uri_prefix = http://mybinaries.com/exherbo/
</code></pre>
<p><code>location</code> is the place where you put your empty repository.</p>
<p><code>sync</code> is the same that <code>location</code> on the compilation node, and may refer to a git repository where you&#8217;ll publish your binary repository on the other nodes.</p>
<p><code>binary_distdir</code> is the directory where binary tarballs will be placed. I recommend you to make it point to the same place as where paludis downloads its distfiles, since it will be easier to maintain in further use. That&#8217;s why I left the default value here.</p>
<p><code>binary_prefix</code> is the URL where the generated tarballs will be available for the other nodes. Ensure that the /var/cache/paludis/distfiles directory is available via http at this URL.</p>
<h3 id="usage">Usage</h3>
<p>You&#8217;re now fully ready! All you have to do is create the binary packages on your compilation node, push the updated repository to your git server, sync it on the other boxes and you will be able to install your freshly made binary packages without having to compile them on all of your machines.</p>
<p>It&#8217;s pretty simple to make binary packages, all you have to do is first to generate the binaries for everything you have installed:</p>
<pre><code class="language-bash">cave resolve -xc world --make binaries --make-dependencies all
</code></pre>
<p>It will automatically generate packages and put tarballs in your distfiles directory. If you run this after updating your compilation box, it will only generate new binary packages for those that have changed.</p>
<p>Last thing you might want to know: to create a binary package for a package you do not have installed yet, just run</p>
<pre><code class="language-bash">cave resolve -x --make binaries --make-dependencies all &lt;insert a package name here&gt;
</code></pre>
<p>It will create packages for all the dependencies, installing it afterwards, and finish by making the package for the software you asked.</p>
<p>Don&#8217;t forget to push all changes on your git server!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Knowing your system &#8211; Part 4 &#8211; Falling in love with paludis</title>
		<link>https://www.clever.cloud/blog/engineering/2012/12/13/knowing-your-system-part-4-falling-in-love-with-paludis/</link>
		
		<dc:creator><![CDATA[Marc-Antoine Perennou]]></dc:creator>
		<pubDate>Thu, 13 Dec 2012 00:00:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[exherbo]]></category>
		<category><![CDATA[Open Source]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2012/12/13/knowing-your-system-part-4-falling-in-love-with-paludis/</guid>

					<description><![CDATA[Installing a source-based GNU/Linux distribution As we last saw, I&#8217;m really fond of source-based distributions. Beyond the administration and the management of an installed system, you also have to install it in the first place. Because of the fact that you have to compile absolutely everything in your system, it may be really scary to [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2 id="installing-a-source-based-gnulinux-distribution">Installing a source-based GNU/Linux distribution</h2>
<p>As we last saw, I&#8217;m really fond of source-based distributions. Beyond the administration and the management of an installed system, you also have to install it in the first place. Because of the fact that you have to compile absolutely everything in your system, it may be really scary to install one.</p>
<p><span id="more-2787"></span></p>
<p>I formerly told you to keep in mind that your system is fully usable whilst you&#8217;re upgrading it…</p>
<p>When you install a source-based distribution, it&#8217;s not using a shiny interface and clicking repeatedly on the &#8220;next&#8221; button. You have to use a &#8220;bootstrap&#8221; system, which can be a livecd such as the awesome <a href="http://www.sysresccd.org/">sysrescuecd</a>, but you also can decide to first install a binary distribution like <a href="http://fedoraproject.org/">Fedora</a> or <a href="http://www.ubuntu.com/">Ubuntu</a> (you may probably already have one, so you obviously can use it).</p>
<p>When you have booted your &#8220;bootstrap&#8221; system, there will be 3 steps:</p>
<ul>
<li>Mounting the target partition to anywhere in your filesystem, like <code>/mnt/newsystem</code></li>
<li>Unpacking the base filesystem of your distribution into that folder (these are commonly called &#8220;stages tarballs&#8221;)</li>
<li>Chrooting into this folder (you may have to mount several subsystems such as /dev beforehand, refer to the distribution<br />
documentation)</li>
</ul>
<p>One you have chrooted, you will actually be (for the current shell) in your bare new system. However you can start to manage and install it from a shell within your &#8220;bootstrap&#8221; system that you can hopefully use to work during the installation. Note that you can also leave your computer do all the compilations during your idle time at night.</p>
<p>Here are two install guides that I recommend you to follow:</p>
<ul>
<li><a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml">Gentoo install guide</a></li>
<li><a href="http://www.exherbo.org/docs/install-guide.html">Exherbo install guide</a></li>
</ul>
<h2 id="paludis-the-other-package-mangler">Paludis, the other package mangler</h2>
<p>Now that you have all the minimal informations needed to understand what is a source-based GNU/Linux distribution and to understand how it works globally, We&#8217;ll give a closer look to the heart of the distribution: the package manager.</p>
<p>On Gentoo, the official package manager is portage, with the <code>emerge</code> command line. I used it the first weeks I tried Gentoo, but when I really wanted to play with my system, it was too restrictive so I decided to switch. Moreover, portage is written in python (so are a lot of core components of gentoo), and when your python installation gets broken… Game over.</p>
<p>When exploring the list of available packages, I found out <a href="http://paludis.exherbo.org/">paludis</a> and decided to give it a try. Thanks to <a href="http://git.exherbo.org/paludis/paludis-scripts.git/tree/portage2paludis.bash">a provided script</a>, I translated roughly my portage configuration to a paludis one (Paludis can use portage configuration but this is not recommended). It was not perfect, but was a good start. After cleaning and updating it a little by myself (<a href="http://paludis.exherbo.org/">the documentation is really exhaustive</a>), I could start using it. The man pages are also really complete.</p>
<p>You can see my current configuration here: <a href="https://github.com/Keruspe/paludis-config">https://github.com/Keruspe/paludis-config</a>. A first configuration will be a lot lighter, this is a configuration that have evolved during 4 years, from Gentoo to Exherbo.</p>
<p>Paludis command line <code>cave</code> is a modular tool which allow you to do a lot of things. Basically everything you would ever want to do, and some more.</p>
<p>The main <code>cave</code> subcommands are:</p>
<ul>
<li><code>cave resolve</code> looks for the whole dependency tree of a package, in pretend mode by default, and you then can apply<br />
this resolution (to install stuff) by specifying the <code>-x</code> argument</li>
<li><code>cave uninstall</code> is the pendent of <code>cave resolve</code> for uninstalling</li>
<li><code>cave purge</code> looks for unused packages (as for all commands, pretending by default, and execution with <code>-x</code>)</li>
<li><code>cave fix-linkage</code> looks for broken binaries (because of libraries updates) and suggest you to rebuild them.</li>
</ul>
<p>A lot of other subcommands are available, and a lot of options for each of these. Amongst other things, cave allows you to stop the installation process at a certain phase, or resume at another. This allows you to abort at compile phase to apply custom patches, and them resume at compile phase to compile the package with your patches applied. It also support a hooks mechanism.</p>
<p>We&#8217;ll see some more advanced paludis features in a next post of the &#8220;knowing your system&#8221; saga.</p>
<p>Last thing, The way I update my system is:</p>
<pre><code class="language-javascript">cave sync
cave resolve world -c -km -Km -Cs
</code></pre>
<p>It syncs repositories with upstream to get latest versions of the packages, and then resolve <code>world</code> which is the set containing all the packages you have installed, with a complete dependency tree, as deep as it can, with <code>-c</code> aka <code>--complete</code> and reinstalling all packages for which metadata have changed because of <code>-km -Km</code> aka <code>--keep if-same-metadata --keep-targets if-same-metadata</code>. If a failure occurs, it continues to build the rest while the dependencies still are satisfied thanks to <code>-Cs</code> aka <code>--continue-on-failure if-satisfied</code>. I then run this last command again with <code>-x</code> aka <code>--execute</code> to apply the available updates.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Knowing your system &#8211; Part 3 &#8211; Source-based distributions: The Gentoo example</title>
		<link>https://www.clever.cloud/blog/engineering/2012/12/10/knowing-your-system-part-3-source-based-distributions-the-gentoo-example/</link>
		
		<dc:creator><![CDATA[Marc-Antoine Perennou]]></dc:creator>
		<pubDate>Mon, 10 Dec 2012 00:00:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[exherbo]]></category>
		<category><![CDATA[Open Source]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2012/12/10/knowing-your-system-part-3-source-based-distributions-the-gentoo-example/</guid>

					<description><![CDATA[After a little reminder on UNIX-like systems and a quick view to the init process, we&#8217;ll now see the kind of distributions which I really love, where you really control everything. What is a source-based GNU/Linux distribution? The principle may be a bit scary, but is actually simple. In most distributions (called binary distributions), software [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>After a little reminder on UNIX-like systems and a quick view to the init process, we&#8217;ll now see the kind of distributions which I really love, where you really control everything.</p>
<p><span id="more-2786"></span></p>
<h2 id="what-is-a-source-based-gnulinux-distribution">What is a source-based GNU/Linux distribution?</h2>
<p>The principle may be a bit scary, but is actually simple.</p>
<p>In most distributions (called binary distributions), software are packaged to be &#8220;ready to use&#8221;, all configured by the distribution maintainers, and you then get a list of available packages that you can install. When you ask for a package to be installed, it will download the software and its dependencies and install everything.</p>
<p>In source-based, the package manager will also handle all the dependencies, downloading and installing stuff. The thing which changes with them is the thing you actually download, and what is being done between the downloading and the installing phases of the process.</p>
<p>Instead of downloading the software, the package mangler will download its source code, unpack it, configure it and then compile it. You&#8217;re basically compiling your whole system with those distributions.</p>
<h2 id="why-wasting-that-much-time-makes-sense">Why &#8220;wasting&#8221; that much time makes sense?</h2>
<p>As you probably know, compiling can be very long. It mostly depends on your hardware, and most of the projects will compile in a couple of minutes, but some of them, like the compiler itself or your web browser can take up to several hours on certain boxes.</p>
<p>This can be seen as a PITA but this is the price of real liberty. With source-based distributions, you can choose which components of each software you want to build, and exactly which options you want. With binary distributions, if you&#8217;re missing a feature, you&#8217;ll have to do everything by yourself outside your package manager, and this will really be a PITA to maintain. With source-based distribution, it&#8217;s way easier to contribute, as we&#8217;ll see in a later post of this saga. The package does not contain all the binaries, it&#8217;s just a text file you have to edit to add an option you&#8217;re missing. Everything becomes easier to customize, you become the God of your system.</p>
<p>You must also keep in mind that while you&#8217;re compiling stuff, your system is still fully usable, so you can just do it in background.</p>
<h2 id="the-gentoo-example-my-beginning-with-source-based-distributions">The Gentoo example: My beginning with source-based distributions</h2>
<p>My first GNU/Linux distribution was Ubuntu, which seemed to be popular (and which still is), a binary distribution of course. I was quite happy with it for the first months, but as soon as I wanted to explore my system more deeply, like compiling my own kernel, or when I wanted to do really specific operations, I was immediately limited by the design of this distribution.</p>
<p>I was a student at this time, and my class-mate (and now colleague) <a href="http://blog.kdecherf.com/">Kevin Decherf</a> told me he was using <a href="http://www.gentoo.org/">Gentoo</a>. on his server. I immediately asked him if he agreed to plan an Install Party the week just after that. During this session, I installed a minimal system, discovering the distribution. At the end of the day, it was barely booting to an xterm.</p>
<p>I wanted to really explore my distribution to understand exactly how everything works, so I started &#8220;playing&#8221; with it, modifying packages, checking how things reacted. I broke my system and reinstalled it 5 times in 3 weeks, playing harder and harder, until I knew how to make my system work again after a wanted major breakage.</p>
<p>You really should try source-based distributions, to really get how things work. It can take a few months to understand them if you just play a little with them on an irregular basis, but it&#8217;s really worth it. Gentoo was my choice since it&#8217;s the most popular source-based distribution, and the only one I heard of at this time. It&#8217;s quite good, but you&#8217;ll see in my next post that I didn&#8217;t really like its default package manager, and I no longer use Gentoo.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
