<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Sysadmin on ln --help</title>
    <link>https://blog.mei-home.net/tags/sysadmin/</link>
    <description>Recent content in Sysadmin on ln --help</description>
    <generator>Hugo -- 0.152.2</generator>
    <language>en</language>
    <lastBuildDate>Sat, 29 Nov 2025 14:38:42 +0100</lastBuildDate>
    <atom:link href="https://blog.mei-home.net/tags/sysadmin/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>My Desktop PC Setup and Creating a Ceph Common Ebuild for Gentoo</title>
      <link>https://blog.mei-home.net/posts/ceph-common-ebuild/</link>
      <pubDate>Sat, 29 Nov 2025 14:38:42 +0100</pubDate>
      <guid>https://blog.mei-home.net/posts/ceph-common-ebuild/</guid>
      <description>I just needed the mount helpers, but not Ceph itself</description>
      <content:encoded><![CDATA[<p>First post in the new <a href="https://blog.mei-home.net/categories/sysadmin/">sysadmin category</a>.</p>
<p>I&rsquo;ve recently realized that I&rsquo;ve never written about how I&rsquo;m running my desktop setup
on Linux. Triggered by having to revamp one of my Gentoo portage <a href="https://wiki.gentoo.org/wiki/Ebuild">ebuilds</a>
for my desktop, let me remedy this and tell you a bit about what my personal
computing outside the Homelab looks like.</p>
<p>My Linux journey started back in 2007. I was about to start my computer science
degree. And I had allowed myself one month between finishing the then mandatory
military service and some jobs to bridge the time before University and my
program starting in October. At the beginning of September, I got my first
University laptop, an Acer TravelMate 5720 Core 2 Duo with an ATI GPU and Windows Vista.
Receiving that laptop, I thought to myself: Any <strong>real</strong> CS student should be
running Linux.</p>
<p>Yes, dear reader, I&rsquo;m ashamed that I was that particularly annoying kind of nerdy
CS student.</p>
<p>Leaning even more into being that annoying kind of CS student, I also thought:
I need a <strong>real</strong>, <strong>hardcore</strong> Linux distribution. So I ended up with <a href="https://www.gentoo.org/">Gentoo</a>.
It was the &ldquo;I&rsquo;m running Arch, by the way&rdquo; distro back then. I would definitely
be rolling my eyes pretty hard at past me if we were to meet today.</p>
<p>But it was what it was, and having an entire month to do basically nothing else
but prepare the machine, I actually got it up and running with everything I cared
about, including WiFi and working graphics.</p>
<p>Trigger warning for people who ran ATI/AMD back in the day.</p>
<p>The word <code>fglrx</code> still gives me shudders to this day. Linux has come a loooooong
way since that time. Don&rsquo;t let anyone tell you otherwise.</p>
<p>It honestly worked out reasonably well, all told. I stayed with Linux as my main
driver during my entire study time. Over the years, the occasions where I felt
the need to boot into the parallel Windows install for anything else than gaming
became fewer and fewer.</p>
<p>Like every student at University, I also experimented. No, not with drugs of
course (Dear reader, there were drugs. &#x1f601;). With desktop environments. Many
a semester, I realized my desktop setup wasn&rsquo;t ideal. Surprisingly, that always
happened during exam time.</p>
<p>I spend most of the initial few years switching between KDE and Gnome on a regular
basis. I even experimented a bit with tiling window managers, mainly <a href="https://i3wm.org/">i3wm</a>
if I recall correctly. But tiling window managers never really clicked with me
and I always returned to either Gnome and KDE. With the years, both KDE and Gnome
became ever nicer and got more features, but also became slower and slower on my
aging laptop. So one day I ended up on <a href="https://www.xfce.org/">XFCE</a>, and haven&rsquo;t
changed since then.</p>
<p>Surprisingly, in hindsight, I never did any distro hopping at all. I honestly have
no idea why. I always stayed with Gentoo for my main driver. I even went with
Gentoo for my first Homelab machine, but that&rsquo;s a different story I will definitely
tell one day.</p>
<p>Overall, I like both Gentoo and XFCE. When it comes to Gentoo, I no longer believe
in the &ldquo;ricing&rdquo; mindset from 2010. I do know for a very detailed, very well
researched and tested fact that yes, non-generic compile options with an <code>march</code>,
<code>mtune</code> and <code>mcpu</code> for your specific chip can make a massive, unbelievable
difference. But not on the desktop. What I do continue to like about Gentoo is
its excellent wiki, its ability to control a package&rsquo;s configure flags and building
only the features I want and the fact that it&rsquo;s a rolling release distro, which I
do like on the desktop.
Another reason I&rsquo;ve stayed with Gentoo for my desktop: It is a rather welcome
excuse to get myself a shiny new CPU from the high performance segment of the
product stack every once in a while. &#x1f601;
Gentoo has also been really stable. I&rsquo;ve been running the <code>~amd64</code> keyword for
ten years now, without issue. That&rsquo;s Gentoo&rsquo;s equivalent of the testing branch
in other distros.</p>
<p>Since 2021, I&rsquo;m even running my gaming on Linux and got rid of my Windows
partition. Here I must admit I&rsquo;m not using Gentoo&rsquo;s packages for Steam, though.
Those need &ldquo;multilib&rdquo; functionality, because it&rsquo;s all still 32bit. And that was
just a tad bit too much for my taste, so I&rsquo;m using Steam via Flatpak instead.</p>
<p>My current install is from 2017, when I got my first desktop PC in 10 years after
finishing (ahem&hellip;) University and starting to earn real money. It&rsquo;s currently
a beQuiet! tower with an AMD Ryzen 9 3900X and an AMD RX 580.</p>
<p>It will be time for a proper upgrade soon though, as building qtwebkit (aka Chromium)
takes about 1.5h now.</p>
<p>As you can see, I&rsquo;ve been pretty conservative in my Linux daily driver usage for
a long time. I&rsquo;m sometimes wondering whether that&rsquo;s because I came across the
DistroTube YouTube channel one day, watched three of his videos and then nope&rsquo;d
out of the entire &ldquo;my Linux desktop is more than just a tool&rdquo; community.
The next change will likely be the switch to something which supports Wayland,
so I&rsquo;m not caught unprepared when X11 disappears from the Gentoo repos.</p>
<p>For a time, I&rsquo;ve been a lot more experimental on my laptops, which I&rsquo;m now only
using when traveling. I started out with Arch there to see what all the fuss
is about, and then went for Manjaro, because I was hoping it would be a lower
maintenance variant of Arch. Being pretty severely disappointed with both, I
ended up with Fedora Workstation. Good, stable system that doesn&rsquo;t fall apart
when you update it.</p>
<p>I did a few experiments with desktop environments on the laptops too. I had
XMonad for a while, then used Awesome WM for a time. But at some point I realized
that I just wasn&rsquo;t happy with the laptop as an experimental platform. I use it only
when traveling, which happens perhaps 10 times a year or so. And each time I have
to adapt to a different WM than what I&rsquo;m using on my desktop, so I just stopped.
I now have Fedora with Sway running, and that&rsquo;s perfectly fine for me.</p>
<p>Finally, I think Gentoo even has a little bit to do with the fact that I ended
up as a Build and Release engineer. What separated me from my colleagues was
that I didn&rsquo;t just know C++, I also knew CMake and autotools and Make and so
on and so forth, because I had to touch all of them over the course
of running Gentoo. And we&rsquo;re using <a href="https://www.yoctoproject.org/">Yocto</a> for
dependencies and general builds at work, and Bitbake was inspired by Gentoo&rsquo;s portage.</p>
<p>Alright, enough personal Linux lore, let&rsquo;s get to the actual trigger for this
blog post, creating ebuilds for Gentoo.</p>
<h2 id="an-ebuild-for-ceph-common">An ebuild for ceph-common</h2>
<p>I&rsquo;ve been using <a href="https://ceph.io/en/">Ceph</a> for the storage in my Homelab for
a while now. One of the use cases is for a large &ldquo;archive&rdquo; filesystem I&rsquo;m making
available to my desktop via CephFS. To mount it, I&rsquo;m using something like the
following in <code>/etc/fstab</code>:</p>
<pre tabindex="0"><code>:/volumes/_nogroup/foo/bar       /mnt/warehouse/         ceph    name=mycephuser,nofail,_netdev,secretfile=/etc/my-ceph-secret,conf=/etc/ceph/ceph.conf 0 0
</code></pre><p>To use this style of fstab entry, you need a mount helper, so there&rsquo;s something
to interpret the <code>ceph.conf</code> and <code>my-ceph-secret</code> files and you don&rsquo;t have to
put the secrets into the fstab itself.</p>
<p>The problem now is: Gentoo&rsquo;s portage does have a <a href="https://packages.gentoo.org/packages/sys-cluster/ceph">Ceph package</a>,
but that&rsquo;s the entire enchilada, including all Ceph components. And I really only
want the mount helper.</p>
<p>So I took the official Ceph ebuild and reduced it to the following:</p>
<pre tabindex="0"><code>EAPI=8

inherit cmake

DESCRIPTION=&#34;Common Parts of Ceph for clients only&#34;
HOMEPAGE=&#34;https://ceph.com/&#34;
SRC_URI=&#34;https://download.ceph.com/tarballs/ceph-${PV}.tar.gz -&gt; ${P}.tar.gz&#34;

S=${WORKDIR}/ceph-${PV}
LICENSE=&#34;Apache-2.0&#34;
SLOT=&#34;0&#34;
KEYWORDS=&#34;~amd64&#34;
RESTRICT=&#34;mirror&#34;

DEPEND=&#34;app-arch/lz4
	sys-apps/keyutils
	sys-libs/libcap-ng
	dev-libs/boost
	dev-libs/libfmt
	dev-libs/openssl
	dev-python/cython
	sys-apps/util-linux
	sys-apps/systemd-utils
	sys-libs/zlib
	app-arch/bzip2
&#34;
RDEPEND=&#34;${DEPEND}&#34;

PATCHES=(
  &#34;${FILESDIR}/ceph-19.2.1-uuid.patch&#34;
  &#34;${FILESDIR}/ceph-19.2.1-graylog.patch&#34;
)

src_prepare() {
	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
	  -DWITH_MANPAGE=OFF
	  -DENABLE_SHARED=ON
	  -DCMAKE_POSITION_INDEPENDENT_CODE=ON
	  -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
	  -DWITH_RBD=OFF
	  -DWITH_OPENLDAP=OFF
	  -DWITH_GSSAPI=OFF
	  -DWITH_XFS=OFF
	  -DWITH_ZFS=OFF
	  -DWITH_BLUESTORE=ON
	  -DWITH_KVS=OFF
	  -DWITH_KRBD=OFF
	  -DWITH_RADOSGW=OFF
	  -DWITH_MGR=OFF
	  -DWITH_LTTNG=OFF
	  -DWITH_BABELTRACE=OFF
	  -DDEBUG_GATHER=OFF
	  -DWITH_TESTS=OFF
	  -DWITH_SEASTAR=OFF
	  -DWITH_MGR_DASHBOARD_FRONTEND=OFF
	  -DWITH_SYSTEMD=OFF
	  -DWITH_RDMA=OFF
	  -DWITH_SYSTEM_BOOST=ON
	  -DWITH_LIBCEPHSQLITE=OFF
	  -DWITH_JAEGER=OFF
	)
	cmake_src_configure
}

src_compile() {
	cmake_src_compile mount.ceph
}

src_install() {
	into &#34;/usr&#34;
	dosbin &#34;${BUILD_DIR}/bin/mount.ceph&#34;
	dolib.so &#34;${BUILD_DIR}/lib/libceph-common.so.2&#34;
	insinto &#34;/usr/$(get_libdir)&#34;
	doins &#34;${BUILD_DIR}/lib/libceph-common.so&#34;
}
</code></pre><p>This requires two patches for building on a Gentoo system, which I took from
the official ebuild as well:</p>
<ul>
<li><a href="https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-cluster/ceph/files/ceph-19.2.1-graylog.patch">ceph-19.2.1-graylog.patch</a></li>
<li><a href="https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-cluster/ceph/files/ceph-19.2.1-uuid.patch">ceph-19.2.1-uuid.patch</a></li>
</ul>
<p>I stuck the ebuild into my own overlay, configured like this in <code>/etc/portage/repos.conf/my_repo.conf</code>:</p>
<pre tabindex="0"><code>[my_repo]
auto-sync = true
location = /usr/local/portage
sync-type = git
sync-uri = https://git.example.com/admin/gentoo_overlay.git
sync-user = portage:portage
</code></pre><p>With that, I could sync the repo with the following command:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>emaint sync -r my_repo
</span></span></code></pre></div><p>After adding a new ebuild, some metadata needs to be generated, like this:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>ebuild ceph-common-19.2.2.ebuild manifest clean fetch unpack compile
</span></span></code></pre></div><p>Once the new ebuild has been synced, I can install it as usual:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>emerge -uva ceph-common
</span></span></code></pre></div><p>And with that, I get the <code>mount.ceph</code> mount helper and can use the Ceph-specific
options in the fstab, without having to install the full Ceph package.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
