
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta charset="utf-8">
  <title>Planet Gentoo</title>
  <meta name="theme-color" content="#54487a">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta property="og:title" content="Planet Gentoo">
  <meta property="og:image" content="https://www.gentoo.org/assets/img/logo/gentoo-g.png">
  <meta name="twitter:image" content="https://www.gentoo.org/assets/img/logo/gentoo-g.png">
  <link rel="apple-touch-icon" href="https://www.gentoo.org/assets/img/logo/icon-192.png">
  <link rel="icon" sizes="192x192" href="https://www.gentoo.org/assets/img/logo/icon-192.png">

  <link rel='stylesheet' type='text/css' href='tyrian/tyrian.min.css'>
  <link rel='stylesheet' type='text/css' href='tyrian/components/searchbars.min.css'>
  <link rel='stylesheet' type='text/css' href='tyrian/planet-tyrian.css'>
  <link rel='stylesheet' type='text/css' href='tyrian/components/bootstrap-datepicker.standalone.css'>

  <link rel="icon" href="https://planet.gentoo.org/favicon.ico" type="image/x-icon">
  <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/www-gentoo-org.xml" title="Gentoo Website">
  <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/forums-gentoo-org.xml" title="Gentoo Forums">
  <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/bugs-gentoo-org.xml" title="Gentoo Bugzilla">
  <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/packages-gentoo-org.xml" title="Gentoo Packages">
  <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/archives-gentoo-org.xml" title="Gentoo List Archives">
  <link rel="alternate" type="application/rss+xml" title="Planet Gentoo" href="https://planet.gentoo.org/rss20.xml">
  <link rel="alternate" type="application/rss+xml" title="Gentoo Universe" href="https://planet.gentoo.org/universe/rss20.xml">
  <link rel="alternate" type="application/atom+xml" title="Planet Gentoo" href="https://planet.gentoo.org/atom.xml">
  <link rel="alternate" type="application/atom+xml" title="Gentoo Universe" href="https://planet.gentoo.org/universe/atom.xml">


</head>
<body>

<header>
  <div class="site-title">
    <div class="container">
      <div class="row justify-content-between">
        <div class="logo">
          <a href="/" title="Back to the homepage" class="site-logo">
            <img src="tyrian/site-logo.png" alt="Gentoo" srcset="tyrian/site-logo.svg">
          </a>
          <span class="site-label">Planet</span>
        </div>
        <div class="site-title-buttons">
          <div class="btn-group btn-group-sm">
            <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span>
              <strong>Get Gentoo!</strong></a>
            <div class="btn-group btn-group-sm">
              <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">
                <span class="fa fa-fw fa-map-o"></span> <span class="d-none d-sm-inline">gentoo.org sites</span>
                <span class="caret"></span>
              </a>
              <div class="dropdown-menu dropdown-menu-right">
                <a class="dropdown-item" href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span>
                  gentoo.org</a>
                <a class="dropdown-item" href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span>
                  Wiki</a>
                <a class="dropdown-item" href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span>
                  Bugs</a>
                <a class="dropdown-item" href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span>
                  Forums</a>
                <a class="dropdown-item" href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span>
                  Packages</a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span>
                  Planet</a>
                <a class="dropdown-item" href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span>
                  Archives</a>
                <a class="dropdown-item" href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span>
                  Sources</a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span>
                  Infra Status</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <nav class="tyrian-navbar navbar navbar-dark navbar-expand-lg bg-primary" role="navigation">
    <div class="container">
      <div class="navbar-header">
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-main-collapse" aria-controls="navbar-main-collapse" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
      </div>
      <div class="collapse navbar-collapse navbar-main-collapse" id="navbar-main-collapse">
        <ul class="navbar-nav mr-auto">
          <li class="nav-item active"><a class="nav-link" href="/">Home</a></li>
          <li class="nav-item"><a class="nav-link" href="search.html">Search</a></li>
          <li class="nav-item"><a class="nav-link" href="contributors.html">Contributors</a></li>
        </ul>

        <form class="form-inline inlinesearch mr-2" role="search" action="search.html" method="get">
          <div class="input-group">
            <div class="input-group-prepend">
              <span class="input-group-text" id="basic-addon1"><i class="fa fa-search" aria-hidden="true"></i></span>
            </div>
            <input class="form-control" type="text" name="q" type="text" placeholder="Quicksearch" aria-label="Find Packages">
          </div>
        </form>
      </div>
    </div>
  </nav>
</header>

<div class="container mb-4">
  <div class="row">

    <div id="greeter" class="col-md-9">

      <div class="page-header mb-1" style="border-bottom: none!important;padding-bottom: 10px!important;margin-top:0px!important;">
        <h1>Welcome to Planet Gentoo, <br>
          <small class="text-muted"> an aggregation of Gentoo-related weblog articles written by Gentoo developers.<br>
            For a broader range of topics, you might be interested in Gentoo Universe.</small></h1>
      </div>

    </div>

    <div class="col-md-3"></div>
  </div>


  <div class="row">

    <div id="content" class="col-md-9">

      

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2024-03-15" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>March 15
              <small class="text-muted">2024 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2024-03-15" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Optimizing parallel extension builds in PEP517 builds</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Michał Górny (mgorny)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      March 15, 2024, 15:41
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>The distutils (and therefore setuptools) build system supports building C extensions in parallel, through the use of -j (--parallel) option, passed either to build_ext or build command.  Gentoo distutils-r1.eclass has always passed these options to speed up builds of packages that feature multiple C files.</p>
<p>However, the switch to PEP517 build backend made this problematic.  While the backend uses the respective commands internally, it doesn&#8217;t provide a way to pass options to them.  In this post, I&#8217;d like to explore the different ways we attempted to resolve this problem, trying to find an optimal solution that would let us benefit from parallel extension builds while preserving minimal overhead for packages that wouldn&#8217;t benefit from it (e.g. pure Python packages).  I will also include a fresh benchmark results to compare these methods.<br>
</p>
The history
<p>The legacy build mode utilized two ebuild phases: the compile phase during which the build command was invoked, and the install phase during which install command was invoked.  An explicit command invocation made it possible to simply pass the -j option.</p>
<p>When we initially implemented the PEP517 mode, we simply continued calling esetup.py build, prior to calling the PEP517 backend.  The former call built all the extensions in parallel, and the latter simply reused the existing build directory.</p>
<p>This was a bit ugly, but it worked most of the time.  However, it suffered from a significant overhead from calling the build command.  This meant significantly slower builds in the vast majority of packages that did not feature multiple C source files that could benefit from parallel builds.</p>
<p>The next optimization was to replace the build command invocation with more specific build_ext.  While the former also involved copying all .py files to the build directory, the latter only built C extensions — and therefore could be pretty much a no-op if there were none.  As a side effect, we&#8217;ve started hitting rare bugs when custom setup.py scripts assumed that build_ext is never called directly.  For a relatively recent example, there is my pull request to fix build_ext -j… in pyzmq.</p>
<p>I&#8217;ve followed this immediately with another optimization: skipping the call if there were no source files.  To be honest, the code started looking messy at this point, but it was an optimization nevertheless.  For the no-extension case, the overhead of calling esetup.py build_ext was replaced by the overhead of calling find to scan the source tree.  Of course, this still had some risk of false positives and false negatives.</p>
<p>The next optimization was to call build_ext only if there were at least two files to compile.  This mostly addressed the added overhead for packages building only one C file — but of course it couldn&#8217;t resolve all false positives.</p>
<p>One more optimization was to make the call conditional to DISTUTILS_EXT variable.  While the variable was introduced for another reason (to control adding debug flag), it provided a nice solution to avoid both most of the false positives (even if they were extremely rare) and the overhead of calling find.</p>
<p>The last step wasn&#8217;t mine.  It was Eli Schwartz&#8217;s patch to pass build options via DIST_EXTRA_CONFIG.  This provided the ultimate optimization — instead of trying to hack a build_ext call around, we were finally able to pass the necessary options to the PEP517 backend.  Needless to say, it meant not only no false positives and no false negatives, but it effectively almost eliminated the overhead in all cases (except for the cost of writing the configuration file).</p>
The timings

Table 1. Benchmark results for various modes of package builds


Django 5.0.3
Cython 3.0.9


Serial PEP517 build
5.4 s
46.7 s


build
total
3.1 s
8.4 s
20.8 s
23.5 s


PEP517
5.3 s
2.7 s


build_ext
total
0.6 s
6 s
20.8 s
23.5 s


PEP517
5.4 s
2.7 s


find + build_ext
total
0.06 s
5.5 s
20.9 s
23.6 s


PEP517
5.4 s
2.7 s


Parallel PEP517 build
5.4 s
22.8 s



♦Figure 1. Benchmark times plot
<p>For a pure Python package (django here), the table clearly shows how successive iterations have reduced the overhead from parallel build supports, from roughly 3 seconds in the earliest approach, resulting in 8.4 s total build time, to the same 5.4 s as the regular PEP517 build.</p>
<p>For Cython, all but the ultimate solution result in roughly 23.5 s total, half of the time needed for a serial build (46.7 s).  The ultimate solution saves another 0.8 s on the double invocation overhead, giving the final result of 22.8 s.</p>
Test data and methodology
<p>The methods were tested against two packages:</p>
<ol>
<li>Django 5.0.3, representing a moderate size pure Python package, and</li>
<li>Cython 3.0.9, representing a package with a moderate number of C extensions.
</ol>
<p>Python 3.12.2_p1 was used for testing.  The timings were done using time command from bash.  The results were averaged from 5 warm cache test runs.  Testing was done on AMD Ryzen 5 3600, with pstates boost disabled.</p>
<p>The PEP517 builds were performed using the following command:</p>
<pre>python3.12 -m build -nwx</pre>
<p>The remaining commands and conditions were copied from the eclass.  The test scripts, along with the results, spreadsheet and plot source can be found in the distutils-build-bench repository.</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2024-03-15" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/mgorny/2024/03/15/optimizing-parallel-extension-builds-in-pep517-builds/"> <span class="fn" style="color:#000!important;font-size:16px;">Optimizing parallel extension builds in PEP517 builds </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> mgorny (mgorny
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            March 15, 2024, 15:41
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/mgorny/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>The distutils (and therefore setuptools) build system supports building C extensions in parallel, through the use of <kbd>-j</kbd> (<kbd>--parallel</kbd>) option, passed either to <kbd>build_ext</kbd> or <kbd>build</kbd> command.  Gentoo distutils-r1.eclass has always passed these options to speed up builds of packages that feature multiple C files.</p>
<p>However, the switch to PEP517 build backend made this problematic.  While the backend uses the respective commands internally, it doesn’t provide a way to pass options to them.  In this post, I’d like to explore the different ways we attempted to resolve this problem, trying to find an optimal solution that would let us benefit from parallel extension builds while preserving minimal overhead for packages that wouldn’t benefit from it (e.g. pure Python packages).  I will also include a fresh benchmark results to compare these methods.<br>
<span id="more-1945"></span></p>
<h2>The history</h2>
<p>The legacy build mode utilized two ebuild phases: the compile phase during which the <kbd>build</kbd> command was invoked, and the install phase during which <kbd>install</kbd> command was invoked.  An explicit command invocation made it possible to simply pass the <kbd>-j</kbd> option.</p>
<p>When we initially implemented the PEP517 mode, we simply continued <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/distutils-r1.eclass?id=7ff39e403ecb492d9921826848ead926ea46ce3b#n897">calling <kbd>esetup.py build</kbd></a>, prior to calling the PEP517 backend.  The former call built all the extensions in parallel, and the latter simply reused the existing build directory.</p>
<p>This was a bit ugly, but it worked most of the time.  However, it suffered from a significant overhead from calling the <kbd>build</kbd> command.  This meant significantly slower builds in the vast majority of packages that did not feature multiple C source files that could benefit from parallel builds.</p>
<p>The next optimization was to <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=ac1735e34dad0a1f96543daa3d7ceb303b78d842">replace the <kbd>build</kbd> command invocation with more specific <kbd>build_ext</kbd></a>.  While the former also involved copying all .py files to the build directory, the latter only built C extensions — and therefore could be pretty much a no-op if there were none.  As a side effect, we’ve started hitting rare bugs when custom <kbd>setup.py</kbd> scripts assumed that <kbd>build_ext</kbd> is never called directly.  For a relatively recent example, there is my pull request to <a rel="external" href="https://github.com/zeromq/pyzmq/pull/1872">fix build_ext -j… in pyzmq</a>.</p>
<p>I’ve followed this immediately with another optimization: <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=4986eb8eece688f596bbf6e2cbcbe532df07c95f">skipping the call if there were no source files</a>.  To be honest, the code started looking messy at this point, but it was an optimization nevertheless.  For the no-extension case, the overhead of calling <kbd>esetup.py build_ext</kbd> was replaced by the overhead of calling <kbd>find</kbd> to scan the source tree.  Of course, this still had some risk of false positives and false negatives.</p>
<p>The next optimization was to <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=2e85852793d7d97f7eeb52641609302d73d4aabb">call build_ext only if there were at least two files to compile</a>.  This mostly addressed the added overhead for packages building only one C file — but of course it couldn’t resolve all false positives.</p>
<p>One more optimization was to <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=abbb9b973fe89bcf28bf2920c45aba96c7083365">make the call conditional to <kbd>DISTUTILS_EXT</kbd> variable</a>.  While the variable was introduced for another reason (to control adding <kbd>debug</kbd> flag), it provided a nice solution to avoid both most of the false positives (even if they were extremely rare) and the overhead of calling <kbd>find</kbd>.</p>
<p>The last step wasn’t mine.  It was Eli Schwartz’s patch to <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=597762f0cd480abcd18792f519db370a6c249e25">pass build options via <var>DIST_EXTRA_CONFIG</var></a>.  This provided the ultimate optimization — instead of trying to hack a <kbd>build_ext</kbd> call around, we were finally able to pass the necessary options to the PEP517 backend.  Needless to say, it meant not only no false positives and no false negatives, but it effectively almost eliminated the overhead in all cases (except for the cost of writing the configuration file).</p>
<h2>The timings</h2>
<table>
<caption>Table 1. Benchmark results for various modes of package builds</caption>
<tr>
<th colspan="2"></th>
<th colspan="2">Django 5.0.3</th>
<th colspan="2">Cython 3.0.9</th>
</tr>
<tr>
<th colspan="2">Serial PEP517 build</th>
<td colspan="2">5.4 s</td>
<td colspan="2">46.7 s</td>
</tr>
<tr>
<th><kbd>build</kbd></th>
<th rowspan="2">total</th>
<td>3.1 s</td>
<td rowspan="2">8.4 s</td>
<td>20.8 s</td>
<td rowspan="2">23.5 s</td>
</tr>
<tr>
<th>PEP517</th>
<td>5.3 s</td>
<td>2.7 s</td>
</tr>
<tr>
<th><kbd>build_ext</kbd></th>
<th rowspan="2">total</th>
<td>0.6 s</td>
<td rowspan="2">6 s</td>
<td>20.8 s</td>
<td rowspan="2">23.5 s</td>
</tr>
<tr>
<th>PEP517</th>
<td>5.4 s</td>
<td>2.7 s</td>
</tr>
<tr>
<th>
<kbd>find</kbd> + <kbd>build_ext</kbd>
</th>
<th rowspan="2">total</th>
<td>0.06 s</td>
<td rowspan="2">5.5 s</td>
<td>20.9 s</td>
<td rowspan="2">23.6 s</td>
</tr>
<tr>
<th>PEP517</th>
<td>5.4 s</td>
<td>2.7 s</td>
</tr>
<tr>
<th colspan="2">Parallel PEP517 build</th>
<td colspan="2">5.4 s</td>
<td colspan="2">22.8 s</td>
</tr>
</table>
<figure>
<a href="http://blogs.gentoo.org/mgorny/files/2024/03/charts.png"><img src="http://blogs.gentoo.org/mgorny/files/2024/03/charts.png" width="1174" height="404" alt="Plot of the results from the table"></a><figcaption>Figure 1. Benchmark times plot</figcaption></figure>
<p>For a pure Python package (django here), the table clearly shows how successive iterations have reduced the overhead from parallel build supports, from roughly 3 seconds in the earliest approach, resulting in 8.4 s total build time, to the same 5.4 s as the regular PEP517 build.</p>
<p>For Cython, all but the ultimate solution result in roughly 23.5 s total, half of the time needed for a serial build (46.7 s).  The ultimate solution saves another 0.8 s on the double invocation overhead, giving the final result of 22.8 s.</p>
<h2>Test data and methodology</h2>
<p>The methods were tested against two packages:</p>
<ol>
<li>
<a rel="external" href="https://pypi.org/project/Django/5.0.3/#files">Django 5.0.3</a>, representing a moderate size pure Python package, and</li>
<li>
<a rel="external" href="https://pypi.org/project/Cython/3.0.9/#files">Cython 3.0.9</a>, representing a package with a moderate number of C extensions.
</li>
</ol>
<p>Python 3.12.2_p1 was used for testing.  The timings were done using <kbd>time</kbd> command from bash.  The results were averaged from 5 warm cache test runs.  Testing was done on AMD Ryzen 5 3600, with pstates boost disabled.</p>
<p>The PEP517 builds were performed using the following command:</p>
<pre>python3.12 -m build -nwx</pre>
<p>The remaining commands and conditions were copied from the eclass.  The test scripts, along with the results, spreadsheet and plot source can be found in the <a rel="external" href="https://github.com/mgorny/distutils-build-bench">distutils-build-bench repository</a>.</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2024-03-13" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>March 13
              <small class="text-muted">2024 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2024-03-13" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">The story of distutils build directory in Gentoo</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Michał Górny (mgorny)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      March 13, 2024, 10:18
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>The Python distutils build system, as well as setuptools (that it was later merged into), used a two-stage build: first, a build command would prepare a built package version (usually just copy the .py files, sometimes compile Python extensions) into a build directory, then an install command would copy them to the live filesystem, or a staging directory.  Curious enough, distutils were an early adopter of out-of-source builds — when used right (which often enough wasn&#8217;t the case), no writes would occur in the source directory and all modifications would be done directly in the build directory.</p>
<p>Today, in the PEP517 era, two-stage builds aren&#8217;t really relevant anymore.  Build systems were turned into black boxes that spew wheels.  However, setuptools still internally uses the two-stage build and the build directory, and therefore it still remains relevant to Gentoo eclasses.  In this post, I&#8217;d like to shortly tell how we dealt with it over the years.<br>
</p>
Act 1: The first overrides
<p>Normally, distutils would use a build directory of build/lib*, optionally suffixed for platform and Python version.  This was reasonably good most of the time, but not good enough for us.  On one hand, it didn&#8217;t properly distinguish CPython and PyPy (and it wouldn&#8217;t for a long time, until Use cache_tag in default build_platlib dir PR).  On the other, the directory name would be hard to get, if ebuilds ever needed to do something about it (and we surely did).</p>
<p>Therefore, the eclass would start overriding build directories quite early on.  We would start by passing --build-base to the build command, then add --build-lib to make the lib subdirectory path simpler, then replace it with separate --build-platlib and --build-purelib to workaround build systems overriding one of them (wxPython, if I recall correctly).</p>
<p>The eclass would class this mode &#8220;out-of-source build&#8221; and use a dedicated BUILD_DIR variable to refer to the dedicated build directory.  Confusingly, &#8220;in-source build&#8221; would actually indicate a distutils-style out-of-source build in the default build subdirectory, and the eclass would create a separate copy of the sources for every Python target (effectively permitting in-source modifications).</p>
<p>The last version of code passing --build* options.</p>
Act 2: .pydistutils.cfg
<p>The big problem with the earlier approach is that you&#8217;d have to pass the options every time setup.py is invoked.  Given the design of option passing in distutils, this effectively meant that you needed to repeatedly invoke the build commands (otherwise you couldn&#8217;t pass options to it).</p>
<p>The next step would be to replace this logic by using .pydistutils.cfg configuration file.  The file, placed in HOME (also overridden in eclass) would allow us to set option values without actually having to pass specific commands on the command-line.  The relevant logic, added in September 2013 (commit: Use pydistutils.cfg to set build-dirs instead of passing commands explicitly…), remains in the eclass even today.  However, since the PEP517 build mode stopped using this file, it is used only in legacy mode.</p>
<p>The latest version of the code writing .pydistutils.cfg.</p>
Act 3: Messy PEP517 mode
<p>One of the changes caused by building in PEP517 mode was that .pydistutils.cfg started being ignored.  This implied that setuptools were using the default build directory again.  It wasn&#8217;t such a big deal anymore — since we no longer used proper separation between the two build stages, and we no longer needed to have any awareness of the intermediate build directory, the path didn&#8217;t matter per se.  However, it meant CPython and PyPy started sharing the same build directory again — and since setuptools install stage picks everything up from that directory, it meant that extensions built for PyPy3.10 would be installed to CPython3.10 directory!</p>
<p>How did we deal with that?  Well, at first I&#8217;ve tried calling setup.py clean -a.  It was kinda ugly, especially that it meant combining setup.py calls with PEP517 invocations — but then, we were already calling setup.py build to take advantage of parallel build jobs when building extensions, and it worked.  For a time.</p>
<p>Unfortunately, it turned out that some packages override the clean command and break our code, or even literally block calling it.  So the next step was to stop being fancy and literally call rm -rf build.  Well, this was ugly, but — again — it worked.</p>
Act 4: Back to the config files
<p>As I&#8217;ve mentioned before, we continued to call the build command in PEP517 mode, in order to enable building C extensions in parallel via the -j option.  Over time, this code grew in complexity — we&#8217;ve replaced the call with more specific build_ext, then started adding heuristics to avoid calling it when unnecessary (a no-op setup.py build_ext call slowed pure Python package builds substantially).</p>
<p>Eventually, Eli Schwartz came up with a great alternative — using DIST_EXTRA_CONFIG to provide a configuration file.  This meant that we could replace both setup.py invocations — by using the configuration file both to specify the job count for extension builds, and to use a dedicated build directory.</p>
<p>The change originally was done only for the explicit use of setuptools build backend.  As a result, we&#8217;ve missed a bunch of &#8220;indirect&#8221; setuptools uses — other setuptools-backed PEP517 backends (jupyter-builder, pbr), backends using setuptools conditionally (pdm-backend), custom wrappers over setuptools and… dev-python/setuptools package itself (&#8220;standalone&#8221; backend).  We&#8217;ve learned about it the hard way when setuptools stopped implicitly ignoring the build directory as a package name — and effectively a subsequent build collected a copy of the previous build as a build package.  Yep, we&#8217;ve ended up with a monster of /usr/lib/python3.12/site-packages/build/lib/build/lib/setuptools.</p>
<p>So we approach the most recent change: enabling the config for all backends.  After all, we&#8217;re just setting an environment variable, so others build backends will just ignore it.</p>
<p>And so, we&#8217;ve came full circle.  We&#8217;ve enabled configuration files early on, switched to other hacks when PEP517 builds broke that and eventually returned to unconditionally using configuration files.</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2024-03-13" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/mgorny/2024/03/13/the-story-of-distutils-build-directory-in-gentoo/"> <span class="fn" style="color:#000!important;font-size:16px;">The story of distutils build directory in Gentoo </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> mgorny (mgorny
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            March 13, 2024, 10:18
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/mgorny/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>The Python distutils build system, as well as setuptools (that it was later merged into), used a two-stage build: first, a <kbd>build</kbd> command would prepare a built package version (usually just copy the <kbd>.py</kbd> files, sometimes compile Python extensions) into a build directory, then an <kbd>install</kbd> command would copy them to the live filesystem, or a staging directory.  Curious enough, distutils were an early adopter of out-of-source builds — when used right (which often enough wasn’t the case), no writes would occur in the source directory and all modifications would be done directly in the build directory.</p>
<p>Today, in the PEP517 era, two-stage builds aren’t really relevant anymore.  Build systems were turned into black boxes that spew wheels.  However, setuptools still internally uses the two-stage build and the build directory, and therefore it still remains relevant to Gentoo eclasses.  In this post, I’d like to shortly tell how we dealt with it over the years.<br>
<span id="more-1918"></span></p>
<h2>Act 1: The first overrides</h2>
<p>Normally, distutils would use a build directory of <kbd>build/lib*</kbd>, optionally suffixed for platform and Python version.  This was reasonably good most of the time, but not good enough for us.  On one hand, it didn’t properly distinguish CPython and PyPy (and it wouldn’t for a long time, until <a rel="external" href="https://github.com/pypa/distutils/pull/133">Use cache_tag in default build_platlib dir</a> PR).  On the other, the directory name would be hard to get, if ebuilds ever needed to do something about it (and we surely did).</p>
<p>Therefore, the eclass would start overriding build directories quite early on.  We would start by passing <kbd>--build-base</kbd> to the <kbd>build</kbd> command, then add <kbd>--build-lib</kbd> to make the <kbd>lib</kbd> subdirectory path simpler, then replace it with separate <kbd>--build-platlib</kbd> and <kbd>--build-purelib</kbd> to workaround build systems overriding one of them (wxPython, if I recall correctly).</p>
<p>The eclass would class this mode “out-of-source build” and use a dedicated <var>BUILD_DIR</var> variable to refer to the dedicated build directory.  Confusingly, “in-source build” would actually indicate a distutils-style out-of-source build in the default <kbd>build</kbd> subdirectory, and the eclass would create a separate copy of the sources for every Python target (effectively permitting in-source modifications).</p>
<p><a rel="external" href="https://gitweb.gentoo.org/repo/gentoo/historical.git/tree/eclass/distutils-r1.eclass?id=e061eb09af0558661de8a3078655e25d06d905ee#n226">The last version of code passing <kbd>--build*</kbd> options.</a></p>
<h2>Act 2: .pydistutils.cfg</h2>
<p>The big problem with the earlier approach is that you’d have to pass the options every time <kbd>setup.py</kbd> is invoked.  Given the design of option passing in distutils, this effectively meant that you needed to repeatedly invoke the <kbd>build</kbd> commands (otherwise you couldn’t pass options to it).</p>
<p>The next step would be to replace this logic by using <kbd>.pydistutils.cfg</kbd> configuration file.  The file, placed in <var>HOME</var> (also overridden in eclass) would allow us to set option values without actually having to pass specific commands on the command-line.  The relevant logic, added in September 2013 (commit: <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/eclass/distutils-r1.eclass?id=806966ab94abb49cc9a40c240a6aec03b0a995b4">Use pydistutils.cfg to set build-dirs instead of passing commands explicitly…</a>), remains in the eclass even today.  However, since the PEP517 build mode stopped using this file, it is used only in legacy mode.</p>
<p><a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/distutils-r1.eclass?id=4c42c36f5fdea8612cb824fbb6eeeeaed0719531#n668">The latest version of the code writing <kbd>.pydistutils.cfg</kbd>.</a></p>
<h2>Act 3: Messy PEP517 mode</h2>
<p>One of the changes caused by building in PEP517 mode was that <kbd>.pydistutils.cfg</kbd> started being ignored.  This implied that setuptools were using the default <kbd>build</kbd> directory again.  It wasn’t such a big deal anymore — since we no longer used proper separation between the two build stages, and we no longer needed to have any awareness of the intermediate build directory, the path didn’t matter per se.  However, it meant CPython and PyPy started sharing the same build directory again — and since setuptools install stage picks everything up from that directory, it meant that extensions built for PyPy3.10 would be installed to CPython3.10 directory!</p>
<p>How did we deal with that?  Well, at first I’ve tried <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=44ea4a8c091afbee0b85443670eba504fb0e131e">calling <kbd>setup.py clean -a</kbd></a>.  It was kinda ugly, especially that it meant combining <kbd>setup.py</kbd> calls with PEP517 invocations — but then, we were already calling <kbd>setup.py build</kbd> to take advantage of parallel build jobs when building extensions, and it worked.  For a time.</p>
<p>Unfortunately, it turned out that some packages override the <kbd>clean</kbd> command and break our code, or even literally block calling it.  So the next step was to stop being fancy and literally <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=50cf28d11e3908467f6c10030ce66f55eea1c23a">call rm -rf build</a>.  Well, this was ugly, but — again — it worked.</p>
<h2>Act 4: Back to the config files</h2>
<p>As I’ve mentioned before, we continued to call the <kbd>build</kbd> command in PEP517 mode, in order to enable building C extensions in parallel via the <kbd>-j</kbd> option.  Over time, this code grew in complexity — we’ve replaced the call with more specific <kbd>build_ext</kbd>, then started adding heuristics to avoid calling it when unnecessary (a no-op <kbd>setup.py build_ext</kbd> call slowed pure Python package builds substantially).</p>
<p>Eventually, Eli Schwartz came up with a great alternative — <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=597762f0cd480abcd18792f519db370a6c249e25">using <var>DIST_EXTRA_CONFIG</var> to provide a configuration file</a>.  This meant that we could replace both <kbd>setup.py</kbd> invocations — by using the configuration file both to specify the job count for extension builds, and to use a dedicated build directory.</p>
<p>The change originally was done only for the explicit use of <kbd>setuptools</kbd> build backend.  As a result, we’ve missed a bunch of “indirect” setuptools uses — other setuptools-backed PEP517 backends (jupyter-builder, pbr), backends using setuptools conditionally (pdm-backend), custom wrappers over setuptools and… <kbd>dev-python/setuptools</kbd> package itself (“standalone” backend).  We’ve learned about it the hard way when setuptools stopped implicitly ignoring the <kbd>build</kbd> directory as a package name — and effectively a subsequent build collected a copy of the previous build as a <kbd>build</kbd> package.  Yep, we’ve ended up with a monster of <kbd>/usr/lib/python3.12/site-packages/build/lib/build/lib/setuptools</kbd>.</p>
<p>So we approach the most recent change: <a rel="external" href="https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=920edc504064fa38caa462b4d378114599f65925">enabling the config for all backends</a>.  After all, we’re just setting an environment variable, so others build backends will just ignore it.</p>
<p>And so, we’ve came full circle.  We’ve enabled configuration files early on, switched to other hacks when PEP517 builds broke that and eventually returned to unconditionally using configuration files.</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2024-02-23" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>February 23
              <small class="text-muted">2024 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2024-02-23" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/d61bfcb0536111f32b3669fed1038a23?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Gentoo RISC-V Image for the Allwinner Nezha D1</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Florian Schmaus (flow)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      February 23, 2024,  0:00
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    
    Posted on February 23, 2024
    


    
    Tags: gentoo
    


Motivation
<p>The Allwinner Nezha D1 SoC was one of the first available RISC-V single-board computers (SBC)
crowdfounded and released
in 2021. According to the manufacturer, “it is the world’s first mass-produced development board that supports 64bit
RISC-V instruction set and Linux system.”.</p>
<p>Installing Gentoo on this system usually involved grabbing one existing image, like the Fedora one, and swapping the
userland with a Gentoo stage3.</p>
<p>Bootstrapping via a third-party image is now no longer necessary.</p>
A Gentoo RISC-V Image for the Nezha D1
<p>I have uploaded a, for now, experimental Gentoo RISCV-V Image for the Nezha D1 at</p>
<p>dev.gentoo.org/~flow/gymage/</p>
<p>Simply dd(rescue) the image onto a SD-Card and plug that card into your board.</p>
<p>Now, you could either connect to the UART or plug in a Ethernet cable to get to a login prompt.</p>
UART
<p>You typically want to connect a USB-to-UART adapter to the board. Unlike other SBCs, the debug UART on the Nezha D1 is
clearly labeled with GND, RX, and TX. Using the standard ThunderFly color scheme, this resolves to black for ground (GND), green for RX, and white for TX.</p>
<p>Then fire up your favorite serial terminal</p>
<pre><code>$ minicom --device /dev/ttyUSB0</code></pre>
<p>and power on the board.</p>
<p>Note: Your milleage may vary. For example, you probably want your user to be a member of the ‘dialout’ group to access
the serial port. The device name of your USB-to-UART adapter may not be <code>/dev/ttyUSB0</code>.</p>
SSH
<p>Ethernet port of the board is configured to use DHCP for network configuration. A SSH daemon is listening on port 22.</p>
Login
<p>The image comes with a ‘root’ user whose password is set to ‘root’. Note that you should change this password as soon as
possible.</p>
gymage
<p>The image was created using the gymage tool.</p>
<p>I envision the gymage to become an easy-to-use tool that allows users to create up-to-date Gentoo images for single-board
computers. The tool is in an early stage with some open questions. However, you are free to try it. The
source code of gymage is hosted at gitlab.com/flow/gymage, and feedback is, as always, appreciated.</p>
<p>Stay tuned for another blog post about gymage once it matures further.</p>
<!-- Local Variables: -->
<!-- fill-column: 120 -->
<!-- End: -->




  var discourseUrl = "forums.geekplace.eu/",
      discourseEmbedUrl = 'geekplace.eu/flow/posts/2024-02-23-allwinner-nezha-d1-riscv-gentoo-image.html';

  (function() {
    if (window.location.href.indexOf("/drafts/") > -1) {
      return;
    }
    var d = document.createElement('script');
    d.type = 'text/javascript'; d.async = true;
    d.src = discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
  })();





                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2024-02-23" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/d61bfcb0536111f32b3669fed1038a23" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="http://geekplace.eu/flow/posts/2024-02-23-allwinner-nezha-d1-riscv-gentoo-image.html"> <span class="fn" style="color:#000!important;font-size:16px;">Gentoo RISC-V Image for the Allwinner Nezha D1 </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> flow (flow
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            February 23, 2024,  0:00
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://geekplace.eu/flow" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <div class="info">
    Posted on February 23, 2024
    
</div>
<div class="info">
    
    Tags: gentoo
    
</div>

<h1 id="motivation">Motivation</h1>
<p>The Allwinner Nezha D1 SoC was one of the first available RISC-V single-board computers (SBC)
<a href="https://www.indiegogo.com/projects/nezha-your-first-64bit-risc-v-linux-sbc-for-iot#/">crowdfounded</a> and released
in 2021. According to the manufacturer, <a href="https://d1.docs.aw-ol.com/en/d1_dev/">“it is the world’s first mass-produced development board that supports 64bit
RISC-V instruction set and Linux system.”</a>.</p>
<p>Installing Gentoo on this system usually involved grabbing one existing image, like the Fedora one, and swapping the
userland with a Gentoo stage3.</p>
<p>Bootstrapping via a third-party image is now no longer necessary.</p>
<h1 id="a-gentoo-risc-v-image-for-the-nezha-d1">A Gentoo RISC-V Image for the Nezha D1</h1>
<p>I have uploaded a, for now, <strong>experimental</strong> Gentoo RISCV-V Image for the Nezha D1 at</p>
<p><a href="https://dev.gentoo.org/~flow/gymage/">https://dev.gentoo.org/~flow/gymage/</a></p>
<p>Simply dd(rescue) the image onto a SD-Card and plug that card into your board.</p>
<p>Now, you could either connect to the UART or plug in a Ethernet cable to get to a login prompt.</p>
<h2 id="uart">UART</h2>
<p>You typically want to connect a USB-to-UART adapter to the board. Unlike other SBCs, the debug UART on the Nezha D1 is
clearly labeled with GND, RX, and TX. Using the standard ThunderFly color scheme, this resolves to black for ground (GND), green for RX, and white for TX.</p>
<p>Then fire up your favorite serial terminal</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="ex">$</span> minicom <span class="at">--device</span> /dev/ttyUSB0</span></code></pre></div>
<p>and power on the board.</p>
<p>Note: Your milleage may vary. For example, you probably want your user to be a member of the ‘dialout’ group to access
the serial port. The device name of your USB-to-UART adapter may not be <code>/dev/ttyUSB0</code>.</p>
<h2 id="ssh">SSH</h2>
<p>Ethernet port of the board is configured to use DHCP for network configuration. A SSH daemon is listening on port 22.</p>
<h2 id="login">Login</h2>
<p>The image comes with a ‘root’ user whose password is set to ‘root’. Note that you should change this password as soon as
possible.</p>
<h1 id="gymage">gymage</h1>
<p>The image was created using the gymage tool.</p>
<p>I envision the gymage to become an easy-to-use tool that allows users to create up-to-date Gentoo images for single-board
computers. The tool is in an early stage with some open questions. However, you are free to try it. The
source code of gymage is hosted at <a href="https://gitlab.com/flow/gymage">https://gitlab.com/flow/gymage</a>, and feedback is, as always, appreciated.</p>
<p>Stay tuned for another blog post about gymage once it matures further.</p>




<div id="discourse-comments"></div>



<div class="flattr">
<a class="FlattrButton" href="http://geekplace.eu/flow/posts/2024-02-23-allwinner-nezha-d1-riscv-gentoo-image.html" title="Gentoo RISC-V Image for the Allwinner Nezha D1" lang="en" data-flattr-uid="Flowdalic" data-flattr-tags="blog" data-flattr-category="text" data-flattr-button="compact"></a>
</div>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2024-02-04" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>February 04
              <small class="text-muted">2024 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2024-02-04" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Gentoo x86-64-v3 binary packages available</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo News (GentooNews)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      February 04, 2024,  6:00
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>
  ♦
</p>

<p>End of December 2023 we already made our official
announcement of binary Gentoo package hosting. The initial package set for amd64 was and is 
base-line x86-64, i.e., it should work on any 64bit Intel or AMD machine. Now, we are happy to
announce that there is also a separate package set using the extended 
x86-64-v3 ISA (i.e., microarchitecture level)
available for the same software. If your hardware supports it, use it and enjoy the speed-up! 
Read on for more details…</p>

<!--more-->

Questions &amp; Answers

How can I check if my machine supports x86-64-v3?

<p>The easiest way to do this is to use glibc’s dynamic linker:</p>
<pre><code>larry@noumea ~ $ ld.so --help
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked 'ld.so', the program interpreter for dynamically-linked
ELF programs.  Usually, the program interpreter is invoked automatically
when a dynamically-linked executable is started.
[...]
[...]

Subdirectories of glibc-hwcaps directories, in priority order:
  x86-64-v4
  x86-64-v3 (supported, searched)
  x86-64-v2 (supported, searched)
larry@noumea ~ $ 
</code></pre>
<p>As you can see, this laptop supports x86-64-v2 and x86-64-v3, but not x86-64-v4.</p>

How do I use the new x86-64-v3 packages?

<p>On your amd64 machine, edit the configuration file in <code>/etc/portage/binrepos.conf/</code>
that defines the URI from where the packages are downloaded, and replace <code>x86-64</code> with
<code>x86-64-v3</code>. E.g., if you have so far</p>
<pre><code>sync-uri = distfiles.gentoo.org/releases/amd64/binpackages/17.1/x86-64/
</code></pre>
<p>then you change the URI to</p>
<pre><code>sync-uri = distfiles.gentoo.org/releases/amd64/binpackages/17.1/x86-64-v3/
</code></pre>
<p>That’s all.</p>

Why don’t you have x86-64-v4 packages?

<p>There’s not yet enough hardware and people out there that could use them.</p>

<p>We could start building such packages at any time (our build host is new and 
shiny), but for now we recommend you build from source and use your
own CFLAGS then. After all, if your machine supports x86-64-v4, it’s definitely fast…</p>

Why is there recently so much noise about x86-64-v3 support in Linux distros?

<p>Beats us. The ISA is 9 years old (just the tag x86-64-v3 was slapped onto
it recently), so you’d think binaries would have been generated by now. 
With Gentoo you could’ve done (and probably have done) it all the time.</p>

<p>That said, in some processor lines (i.e. Atom), support for this instruction
set was introduced rather late (2021).</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2024-02-04" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://www.gentoo.org/news/2024/02/04/x86-64-v3.html"> <span class="fn" style="color:#000!important;font-size:16px;">Gentoo x86-64-v3 binary packages available </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GentooNews (https://www.gentoo.org/feeds/news.xml
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            February 04, 2024,  6:00
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://www.gentoo.org/feeds/news.xml" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p><a href="https://www.gentoo.org/news/2024/02/04/x86-64-v3.html" class="news-img-right">
  <img src="https://www.gentoo.org/assets/img/news/2024/larry-packages-small.png" alt="Larry the cow with packages">
</a></p>

<p>End of December 2023 we already made our <a href="https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html">official
announcement of binary Gentoo package hosting</a>. The initial package set for amd64 was and is 
base-line x86-64, i.e., it should work on any 64bit Intel or AMD machine. Now, we are happy to
announce that there is also a separate package set using the <a href="https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels"><b>extended 
x86-64-v3 ISA</b> (i.e., microarchitecture level)</a>
available for the same software. If your hardware supports it, use it and enjoy the speed-up! 
<a href="https://www.gentoo.org/news/2024/02/04/x86-64-v3.html">Read on for more details…</a></p>



<h2 id="questions--answers">Questions &amp; Answers</h2>

<h3 id="how-can-i-check-if-my-machine-supports-x86-64-v3">How can I check if my machine supports x86-64-v3?</h3>

<p>The easiest way to do this is to use glibc’s dynamic linker:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>larry@noumea ~ $ ld.so --help
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked 'ld.so', the program interpreter for dynamically-linked
ELF programs.  Usually, the program interpreter is invoked automatically
when a dynamically-linked executable is started.
[...]
[...]

Subdirectories of glibc-hwcaps directories, in priority order:
  x86-64-v4
  x86-64-v3 (supported, searched)
  x86-64-v2 (supported, searched)
larry@noumea ~ $ 
</code></pre></div></div>
<p>As you can see, this laptop supports x86-64-v2 and x86-64-v3, but not x86-64-v4.</p>

<h3 id="how-do-i-use-the-new-x86-64-v3-packages">How do I use the new x86-64-v3 packages?</h3>

<p>On your amd64 machine, edit the configuration file in <code class="language-plaintext highlighter-rouge">/etc/portage/binrepos.conf/</code>
that defines the URI from where the packages are downloaded, and replace <code class="language-plaintext highlighter-rouge">x86-64</code> with
<code class="language-plaintext highlighter-rouge">x86-64-v3</code>. E.g., if you have so far</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sync-uri = https://distfiles.gentoo.org/releases/amd64/binpackages/17.1/x86-64/
</code></pre></div></div>
<p>then you change the URI to</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sync-uri = https://distfiles.gentoo.org/releases/amd64/binpackages/17.1/x86-64-v3/
</code></pre></div></div>
<p>That’s all.</p>

<h3 id="why-dont-you-have-x86-64-v4-packages">Why don’t you have x86-64-v4 packages?</h3>

<p>There’s not yet enough hardware and people out there that could use them.</p>

<p>We could start building such packages at any time (our build host is new and 
shiny), but for now we recommend you build from source and use your
own CFLAGS then. After all, if your machine supports x86-64-v4, it’s definitely fast…</p>

<h3 id="why-is-there-recently-so-much-noise-about-x86-64-v3-support-in-linux-distros">Why is there recently so much noise about x86-64-v3 support in Linux distros?</h3>

<p>Beats us. The ISA is 9 years old (just the tag x86-64-v3 was slapped onto
it recently), so you’d think binaries would have been generated by now. 
With Gentoo you could’ve done (and probably have done) it all the time.</p>

<p>That said, in some processor lines (i.e. Atom), support for this instruction
set was introduced rather late (2021).</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2024-01-22" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>January 22
              <small class="text-muted">2024 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2024-01-22" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">2023 in retrospect & happy new year 2024!</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo News (GentooNews)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      January 22, 2024,  6:00
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>♦
A Happy New Year 2024 to all of you! We hope you enjoyed the fireworks; we tried to contribute
to these too with the binary package news just before new year! That’s not the only thing in Gentoo that
was new in 2023 though; as in the previous years, let’s look back and give it a review.</p>

<!--more-->

Gentoo in numbers

<p>The number of commits to the main ::gentoo repository 
has remained at an overall high level in 2023, only slightly lower from 126682 to 121000. 
The number of commits by external contributors has actually increased from 10492 to 10708,
now across 404 unique external authors.</p>

<p>GURU, our user-curated repository with a trusted user 
model, is still attracting a lot of potential developers.
We have had 5045 commits in 2023, a slight decrease from 5751 in 2022.
The number of contributors to GURU has increased clearly however, from 134 in 
2022 to 158 in 2023. Please join us there and help packaging the latest and 
greatest software. That’s the ideal preparation for becoming a Gentoo developer!</p>

<p>On the Gentoo bugtracker bugs.gentoo.org, we’ve had 24795 bug reports
created in 2023, compared to 26362 in 2022. The number of resolved bugs shows a similar
trend, with 22779 in 2023 compared to 24681 in 2022. Many of these bugs are stabilization
requests; a possible interpretation is that stable Gentoo is becoming more and more current, 
catching up with new software releases.</p>

New developers

<p>In 2023 we have gained 3 new Gentoo developers. They are in chronological order:</p>

<ol>
  <li>
    <p>Arsen Arsenović (arsen):
♦
Arsen joined up as a developer right at the start of the year in January from Belgrade, Serbia. 
He’s a computer science student
interested in both maths and music, active in many different free software projects, and has already
made his impression, e.g., in our emacs and toolchain projects.</p>
  </li>
  <li>
    <p>Paul Fox (ris):
After already being very active in our Wiki for some time, Paul joined in March as developer from France. 
Activity on our wiki and documentation quality will certainly grow much further with his help.</p>
  </li>
  <li>
    <p>Petr Vaněk (arkamar):
♦
Petr Vaněk, from Prague, Czech Republic, joined the ranks of our developers in November. 
Gentoo user since 2009, craft beer enthusiast, and Linux kernel contributor, he has already been
active in very diverse corners of Gentoo.</p>
  </li>
</ol>

Featured changes and news

<p>Let’s now look at the major improvements and news of 2023 in Gentoo.</p>

Distribution-wide Initiatives

<ul>
  <li>
    <p>♦
Binary package hosting: Gentoo shockingly now also provides 
binary packages, for easier and faster installation! For amd64 and arm64, we’ve got
a stunning &gt;20 GByte of packages on our mirrors, from LibreOffice 
to KDE Plasma and from Gnome to Docker.
Also, would you think 9-year old x86-64-v3 is still experimental? 
We have it already 
on our mirrors! For all other architectures and ABIs, the binary package files used for building the 
installation stages (including the build tool chain) are available for download.</p>
  </li>
  <li>
    <p>New 23.0 profiles in preparation:
A new profile version, i.e. a collection of presets and configurations, is at the moment 
undergoing internal preparation and testing for all architectures. 
It’s not ready yet, but will integrate more toolchain hardening by default, as well as fix a
lot of internal inconsistencies. Stay tuned for an announcement with more details in the near future.</p>
  </li>
  <li>
    <p>Modern C: Work continues on porting Gentoo, and the Linux userland at large, 
to Modern C. This is a real marathon effort 
rather than a sprint (just see our tracker bug for it). Our
efforts together with the same project ongoing in Fedora have already helped many upstreams,
which have accepted patches in preparation for GCC 14 (that starts to enforce the
modern language usage).</p>
  </li>
  <li>
    <p>♦
Event presence: At the Free and Open Source 
Developers European Meeting (FOSDEM) 2023, the Free and Open Source Software 
Conference (FrOSCon) 2023, and the Chemnitzer
Linux-Tage (CLT) 2023, Gentoo had a booth with mugs, stickers, t-shirts, and of course the famous
self-compiled buttons.</p>
  </li>
  <li>
    <p>♦
Google Summer of Code: In 2023 Gentoo had another successful year participating in the 
Google Summer of Code. We had three contributors
completing their projects; you can find out more about them by visiting the 
Gentoo GSoC blog. We thank our contributors Catcream, LabBrat, and 
Listout, and also all the developers who took the time to mentor them.</p>
  </li>
  <li>
    <p>Online workshops: Our German support, Gentoo e.V., organized 
this year 6 online workshops on building
and improving ebuilds. This will be continued every two months in the upcoming year.</p>
  </li>
  <li>
    <p>♦
Documentation on wiki.gentoo.org has been making great progress as 
always. This past year the contributor’s 
guide, article writing guidelines, and 
help pages were updated to 
give the best possible start to anyone ready to lend a hand. The Gentoo Handbook got updates, 
and a new changelog. Of course much documentation was fixed, extended, or updated, and quite
a few new pages were created. We hope to see even more activity in the new year, and hopefully
some new contributors - editing documentation is a particularly easy area to 
start contributing to Gentoo in, please
give it a try!</p>
  </li>
</ul>

Architectures

<ul>
  <li>
    <p>♦
Alpha: Support for the DEC Alpha 
architecture was revived, with a massive keywording effort going on. While not perfectly 
complete yet, we are very close to a fully consistent dependency tree and package set for alpha again.</p>
  </li>
  <li>
    <p>♦
musl: Support for the lightweight musl libc has 
been added to the architectures MIPS (o32) and m68k, with corresponding profiles in the Gentoo 
repository and corresponding installation stages and binary packages available for download. Enjoy!</p>
  </li>
</ul>

Packages

<ul>
  <li>
    <p>♦
.NET: The Gentoo Dotnet project 
has significantly 
improved support for building 
.NET-based software, using the nuget, dotnet-pkg-base, and dotnet-pkg eclasses. 
Now we’re ready for packages depending on the .NET ecosystem and for
developers using dotnet-sdk on Gentoo. New software requiring .NET is constantly 
being added to the main Gentoo tree. Recent additions include PowerShell for Linux, 
Denaro (a finance application), Pinta (a graphics program), Ryujinx (a NS emulator)
and many other aimed straight at developing .NET projects.</p>
  </li>
  <li>
    <p>♦
Java: OpenJDK 21 has been introduced for amd64, arm64, ppc64, and x86!</p>
  </li>
  <li>
    <p>Python:
In the meantime the default Python version in Gentoo has reached Python 3.11. Additionally we have
also Python 3.12 available stable - again we’re fully up to date with upstream.</p>
  </li>
  <li>
    <p>♦
PyPy3 compatibility for scientific Python:
While some packages (numexpr, pandas, xarray) are at the moment still undergoing upstream bug fixing, 
more and more scientific Python packages have been adapted in Gentoo and upstream for 
the speed-optimized Python variant PyPy. This can provide a nice performance boost for 
numerical data analysis…</p>
  </li>
  <li>
    <p>Signed kernel modules and (unified) kernel images: We now support signing of 
both in-tree and out-of-tree kernel modules and kernel images. This is useful for those 
who would like the extra bit of verification offered by Secure Boot, which is now easier 
than ever to set up on Gentoo systems! Additionally, our kernel install scripts and eclasses 
are now fully compatible with 
Unified Kernel Images and our 
prebuilt gentoo-kernel-bin can now optionally install an experimental pregenerated generic 
Unified Kernel Image.</p>
  </li>
  <li>
    <p>♦
The GAP System:
A new dev-gap package category has arrived with about sixty packages.
GAP is a popular system for computational
discrete algebra, with particular emphasis on Computational Group
Theory. GAP consists of a programming language, a library of thousands
of functions implementing algebraic algorithms written in the GAP
language, and large data libraries of algebraic objects. It has 
its own
package ecosystem, mostly written in the GAP language with a few C components.</p>
  </li>
</ul>

Physical and Software Infrastructure

<ul>
  <li>
    <p>♦
Portage improvements: A significant amount of work went into enhancing our 
package manager, Portage, to better support binary package deployment. Users building 
their own binary packages and setting up their own infrastructure will certainly benefit
from it too.</p>
  </li>
  <li>
    <p>packages.gentoo.org: The development of Gentoo’s package database website,
packages.gentoo.org, has picked up speed, with new features for maintainer, category, 
and arch pages, and Repology integration. Many optimization were 
done for the backend database queries and the website should now feel faster to use.</p>
  </li>
  <li>
    <p>♦
pkgdev bugs: A new developer tool called pkgdev bugs enables us now to
simplify the procedure for filing new stable requests bugs a lot. By just giving it 
version lists (which can be generated by other tools),
pkgdev bugs can be used to compute dependencies, cycles, merges, and will file
the bugs for the architecture teams / testers. This allows us to step ahead much faster
with package stabilizations.</p>
  </li>
</ul>

Finances of the Gentoo Foundation

<ul>
  <li>
    <p>♦
Income: The Gentoo Foundation took in approximately $18,500 in fiscal year 2023;
the majority (over 80%) were individual cash donations from the community.</p>
  </li>
  <li>
    <p>Expenses: Our expenses in 2023 were, as split into the usual three categories,
operating expenses (for services, fees, …) $6,000, only minor capital expenses (for bought 
assets), and depreciation expenses (value loss of existing assets) $20,000.</p>
  </li>
  <li>
    <p>Balance: We have about $101,000 in the bank as of July 1, 2023 (which is when
our fiscal year 2023 ends for accounting purposes). The draft finanical report
for 2023 is available on the Gentoo Wiki.</p>
  </li>
</ul>

Thank you!

<p>Obviously this is not all Gentoo development that happened in 2023. From KDE to GNOME, from 
kernels to scientific software, you can find much more if you look at the details.
As every year, we would like to thank all Gentoo developers and all who have submitted contributions
for their relentless everyday Gentoo work. As a volunteer project, Gentoo could not exist 
without them. And if you are interested and would like to contribute, please join us and
help us make Gentoo even better!</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2024-01-22" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://www.gentoo.org/news/2024/01/22/new-year.html"> <span class="fn" style="color:#000!important;font-size:16px;">2023 in retrospect & happy new year 2024! </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GentooNews (https://www.gentoo.org/feeds/news.xml
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            January 22, 2024,  6:00
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://www.gentoo.org/feeds/news.xml" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p><img align="right" height="100" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/2024.png" alt="Gentoo Fireworks">
A Happy New Year 2024 to all of you! We hope you enjoyed the fireworks; we tried to contribute
to these too with the binary package news just before new year! That’s not the only thing in Gentoo that
was new in 2023 though; as in the previous years, let’s look back and <a href="https://www.gentoo.org/news/2024/01/22/new-year.html">give it a review</a>.</p>



<h2 id="gentoo-in-numbers">Gentoo in numbers</h2>

<p><strong>The number of commits to the <a href="https://gitweb.gentoo.org/repo/gentoo.git/">main ::gentoo repository</a> 
has remained at an overall high level in 2023</strong>, only slightly lower from <em>126682</em> to <em>121000</em>. 
The number of commits by external contributors has actually increased from <em>10492</em> to <em>10708</em>,
now across <em>404</em> unique external authors.</p>

<p><strong><a href="https://wiki.gentoo.org/wiki/Project:GURU">GURU, our user-curated repository with a trusted user 
model</a>, is still attracting a lot of potential developers.</strong>
We have had <em>5045</em> commits in 2023, a slight decrease from <em>5751</em> in 2022.
The number of contributors to GURU has increased clearly however, from <em>134</em> in 
2022 to <em>158</em> in 2023. Please join us there and help packaging the latest and 
greatest software. That’s the ideal preparation for becoming a Gentoo developer!</p>

<p>On <strong>the <a href="https://bugs.gentoo.org/">Gentoo bugtracker bugs.gentoo.org</a></strong>, we’ve had <em>24795</em> bug reports
created in 2023, compared to <em>26362</em> in 2022. The number of resolved bugs shows a similar
trend, with <em>22779</em> in 2023 compared to <em>24681</em> in 2022. Many of these bugs are stabilization
requests; a possible interpretation is that stable Gentoo is becoming more and more current, 
catching up with new software releases.</p>

<h2 id="new-developers">New developers</h2>

<p>In 2023 we have gained <strong>3 new Gentoo developers</strong>. They are in chronological order:</p>

<ol>
  <li>
    <p><strong><a href="https://wiki.gentoo.org/wiki/User:Arsen">Arsen Arsenović (arsen)</a></strong>:
<img align="right" height="45" style="margin-left:30px;" src="https://www.gravatar.com/avatar/799095f570d33bcd8bc80df98ce1a4b0?s=45&amp;d=retro">
Arsen joined up as a developer right at the start of the year in January from Belgrade, Serbia. 
He’s a computer science student
interested in both maths and music, active in many different free software projects, and has already
made his impression, e.g., in our emacs and toolchain projects.</p>
  </li>
  <li>
    <p><strong><a href="https://wiki.gentoo.org/wiki/User:Ris">Paul Fox (ris)</a></strong>:
After already being very active in our Wiki for some time, Paul joined in March as developer from France. 
Activity on our wiki and documentation quality will certainly grow much further with his help.</p>
  </li>
  <li>
    <p><strong><a href="https://wiki.gentoo.org/wiki/User:Arkamar">Petr Vaněk (arkamar)</a></strong>:
<img align="right" height="45" style="margin-left:30px;" src="https://www.gravatar.com/avatar/0b4f038d0a09bb9378ab900dbd40399a?s=45&amp;d=retro">
Petr Vaněk, from Prague, Czech Republic, joined the ranks of our developers in November. 
Gentoo user since 2009, craft beer enthusiast, and Linux kernel contributor, he has already been
active in very diverse corners of Gentoo.</p>
  </li>
</ol>

<h2 id="featured-changes-and-news">Featured changes and news</h2>

<p>Let’s now look at the major improvements and news of 2023 in Gentoo.</p>

<h3 id="distribution-wide-initiatives">Distribution-wide Initiatives</h3>

<ul>
  <li>
    <p><img align="right" height="95" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2023/larry-packages.png">
<b>Binary package hosting</b>: Gentoo shockingly now also <a href="https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html">provides 
binary packages</a>, for easier and faster installation! For <b>amd64 and arm64</b>, we’ve got
a stunning &gt;20 GByte of packages on our mirrors, from LibreOffice 
to KDE Plasma and from Gnome to Docker.
Also, would you think 9-year old <b>x86-64-v3</b> is still experimental? 
<a href="https://distfiles.gentoo.org/releases/amd64/binpackages/17.1/x86-64-v3/">We have it already 
on our mirrors!</a> For all other architectures and ABIs, the binary package files used for building the 
installation stages (including the build tool chain) are available for download.</p>
  </li>
  <li>
    <p><strong>New 23.0 profiles in preparation</strong>:
A new profile version, i.e. a collection of presets and configurations, is at the moment 
undergoing internal preparation and testing for all architectures. 
It’s not ready yet, but will integrate more toolchain hardening by default, as well as fix a
lot of internal inconsistencies. Stay tuned for an announcement with more details in the near future.</p>
  </li>
  <li>
    <p><b>Modern C</b>: Work continues on porting Gentoo, and the Linux userland at large, 
to <a href="https://wiki.gentoo.org/wiki/Modern_C_porting">Modern C</a>. This is a real marathon effort 
rather than a sprint (just see our <a href="https://bugs.gentoo.org/870412">tracker bug</a> for it). Our
efforts together with the same project ongoing in Fedora have already helped many upstreams,
which have accepted patches in preparation for GCC 14 (that starts to enforce the
modern language usage).</p>
  </li>
  <li>
    <p><img align="right" height="40" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/logo-froscon.png">
<b>Event presence</b>: At the <a href="https://archive.fosdem.org/2023/">Free and Open Source 
Developers European Meeting (FOSDEM) 2023</a>, the <a href="https://froscon.org/en/">Free and Open Source Software 
Conference (FrOSCon) 2023</a>, and the <a href="https://chemnitzer.linux-tage.de/2023/en/">Chemnitzer
Linux-Tage (CLT) 2023</a>, Gentoo had a booth with mugs, stickers, t-shirts, and of course the famous
self-compiled buttons.</p>
  </li>
  <li>
    <p><img align="right" height="100" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2022/logo-gsoc.png">
<b>Google Summer of Code</b>: In 2023 Gentoo had another successful year participating in the 
<a href="https://summerofcode.withgoogle.com/">Google Summer of Code</a>. We had three contributors
completing their projects; you can find out more about them by visiting the 
<a href="https://blogs.gentoo.org/gsoc/">Gentoo GSoC blog</a>. We thank our contributors Catcream, LabBrat, and 
Listout, and also all the developers who took the time to mentor them.</p>
  </li>
  <li>
    <p><b>Online workshops</b>: Our German support, <a href="https://gentoo-ev.org/">Gentoo e.V.</a>, organized 
this year <a href="https://gentoo-ev.org/news/online-workshops-2023/">6 online workshops on building
and improving ebuilds</a>. This will be continued every two months in the upcoming year.</p>
  </li>
  <li>
    <p><img align="right" height="130" style="margin-left:30px;" src="https://wiki.gentoo.org/images/b/b3/Larry-hi.png">
<b>Documentation on wiki.gentoo.org</b> has been making great progress as 
always. This past year the <a href="https://wiki.gentoo.org/wiki/Gentoo_Wiki:Contributor%27s_guide">contributor’s 
guide</a>, <a href="https://wiki.gentoo.org/wiki/Gentoo_Wiki:Guidelines">article writing guidelines</a>, and 
<a href="https://wiki.gentoo.org/wiki/Help:Contents">help pages</a> were updated to 
give the best possible start to anyone ready to lend a hand. The Gentoo Handbook got updates, 
and a new changelog. Of course much documentation was fixed, extended, or updated, and quite
a few new pages were created. We hope to see even more activity in the new year, and hopefully
some new contributors - editing documentation is a particularly easy area to 
start contributing to Gentoo in, <a href="https://wiki.gentoo.org/wiki/Gentoo_Wiki:Contributor%27s_guide">please
give it a try!</a></p>
  </li>
</ul>

<h3 id="architectures">Architectures</h3>

<ul>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/alpha-logo.png">
<b>Alpha</b>: Support for the <a href="https://en.wikipedia.org/wiki/DEC_Alpha">DEC Alpha 
architecture</a> was revived, with a massive keywording effort going on. While not perfectly 
complete yet, we are very close to a fully consistent dependency tree and package set for alpha again.</p>
  </li>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2022/logo-musl.png">
<b>musl</b>: Support for the <a href="https://musl.libc.org/">lightweight musl libc</a> has 
been added to the architectures <a href="https://www.gentoo.org/downloads/#mips">MIPS (o32)</a> and <a href="https://www.gentoo.org/downloads/#m68k">m68k</a>, with corresponding profiles in the Gentoo 
repository and corresponding installation stages and binary packages available for download. Enjoy!</p>
  </li>
</ul>

<h3 id="packages">Packages</h3>

<ul>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/dotNET-logo.png">
<b>.NET</b>: The <a href="https://wiki.gentoo.org/wiki/Project:Dotnet">Gentoo Dotnet project</a> 
has <a href="https://xgqt.gitlab.io//blog/posts/2023/12/17/-net-in-gentoo-in-2023/">significantly 
improved</a> support for building 
.NET-based software, using the nuget, dotnet-pkg-base, and dotnet-pkg eclasses. 
Now we’re ready for packages depending on the .NET ecosystem and for
developers using dotnet-sdk on Gentoo. New software requiring .NET is constantly 
being added to the main Gentoo tree. Recent additions include PowerShell for Linux, 
Denaro (a finance application), Pinta (a graphics program), Ryujinx (a NS emulator)
and many other aimed straight at developing .NET projects.</p>
  </li>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2023/logo-java.png">
<b>Java</b>: OpenJDK 21 has been introduced for amd64, arm64, ppc64, and x86!</p>
  </li>
  <li>
    <p><b><a href="https://wiki.gentoo.org/wiki/Project:Python">Python</a>:</b>
In the meantime the default Python version in Gentoo has reached Python 3.11. Additionally we have
also Python 3.12 available stable - again we’re fully up to date with upstream.</p>
  </li>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/pypy-logo.png">
<b>PyPy3 compatibility for scientific Python</b>:
While some packages (numexpr, pandas, xarray) are at the moment still undergoing upstream bug fixing, 
more and more scientific Python packages have been adapted in Gentoo and upstream for 
the speed-optimized Python variant PyPy. This can provide a nice performance boost for 
numerical data analysis…</p>
  </li>
  <li>
    <p><b>Signed kernel modules and (unified) kernel images</b>: We now support signing of 
both in-tree and out-of-tree kernel modules and kernel images. This is useful for those 
who would like the extra bit of verification offered by Secure Boot, which is now easier 
than ever to set up on Gentoo systems! Additionally, our kernel install scripts and eclasses 
are now fully compatible with 
<a href="https://wiki.gentoo.org/wiki/Unified_kernel_image">Unified Kernel Images</a> and our 
prebuilt gentoo-kernel-bin can now optionally install an experimental pregenerated generic 
Unified Kernel Image.</p>
  </li>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/logo-gap4.png">
<b>The GAP System</b>:
A new dev-gap package category has arrived with about sixty packages.
<a href="https://www.gap-system.org/">GAP</a> is a popular system for computational
discrete algebra, with particular emphasis on Computational Group
Theory. GAP consists of a programming language, a library of thousands
of functions implementing algebraic algorithms written in the GAP
language, and large data libraries of algebraic objects. It has 
<a href="https://www.gap-system.org/Packages/packages.html">its own
package ecosystem</a>, mostly written in the GAP language with a few C components.</p>
  </li>
</ul>

<h3 id="physical-and-software-infrastructure">Physical and Software Infrastructure</h3>

<ul>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/gentoo-package.png">
<b>Portage improvements</b>: A significant amount of work went into enhancing our 
package manager, Portage, to better support binary package deployment. Users building 
their own binary packages and setting up their own infrastructure will certainly benefit
from it too.</p>
  </li>
  <li>
    <p><b>packages.gentoo.org</b>: The development of Gentoo’s package database website,
<a href="https://packages.gentoo.org">packages.gentoo.org</a>, has picked up speed, with new features for maintainer, category, 
and arch pages, and <a href="https://repology.org/">Repology</a> integration. Many optimization were 
done for the backend database queries and the website should now feel faster to use.</p>
  </li>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2024/bugs.png">
<b>pkgdev bugs</b>: A new developer tool called <i>pkgdev bugs</i> enables us now to
simplify the procedure for filing new stable requests bugs a lot. By just giving it 
version lists (which can be generated by other tools),
<i>pkgdev bugs</i> can be used to compute dependencies, cycles, merges, and will file
the bugs for the architecture teams / testers. This allows us to step ahead much faster
with package stabilizations.</p>
  </li>
</ul>

<h3 id="finances-of-the-gentoo-foundation">Finances of the Gentoo Foundation</h3>

<ul>
  <li>
    <p><img align="right" height="75" style="margin-left:30px;" src="https://www.gentoo.org/assets/img/news/2023/dollar.jpg">
<b>Income</b>: The Gentoo Foundation took in approximately $18,500 in fiscal year 2023;
the majority (over 80%) were individual cash donations from the community.</p>
  </li>
  <li>
    <p><b>Expenses</b>: Our expenses in 2023 were, as split into the usual three categories,
<em>operating expenses</em> (for services, fees, …) $6,000, only minor <em>capital expenses</em> (for bought 
assets), and <em>depreciation expenses</em> (value loss of existing assets) $20,000.</p>
  </li>
  <li>
    <p><b>Balance</b>: We have about $101,000 in the bank as of July 1, 2023 (which is when
our fiscal year 2023 ends for accounting purposes). The draft finanical report
for 2023 is <a href="https://wiki.gentoo.org/wiki/Foundation:Gentoo_Foundation_Finances_FY2023">available on the Gentoo Wiki</a>.</p>
  </li>
</ul>

<h2 id="thank-you">Thank you!</h2>

<p>Obviously this is not all Gentoo development that happened in 2023. From KDE to GNOME, from 
kernels to scientific software, you can find much more if you look at the details.
<strong>As every year, we would like to thank all Gentoo developers and all who have submitted contributions
for their relentless everyday Gentoo work.</strong> As a volunteer project, Gentoo could not exist 
without them. And if you are interested and would like to contribute, please join us and
help us make Gentoo even better!</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2021-09-21" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>September 21
              <small class="text-muted">2021 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2021-09-21" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/36167de7e11e3b358446823d51e69792?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Experimental binary Gentoo package hosting (amd64)</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Andreas K. Hüttel (dilfridge)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      September 21, 2021, 16:34
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p></p>♦IMPORTANT: This blog post is outdated! As direct result of this experiment, we now have official Gentoo binary packages available. See the announcement for more information and further links!&nbsp; The old blog text follows...As an experiment, I've started assembling a simple binary package hosting mechanism for Gentoo. Right now this comes with some serious limitations and should not be used for security or mission critical applications (more on this below). The main purpose of this experiment is to find out how well it works and where we need improvements in Portage's binary package handling.<p></p><p>So what do we have, and how can you use it?</p><ul><li>The server builds an assortment of stable amd64 packages, with the use-flags as present in an unmodified 17.1/desktop/plasma/systemd profile (the only necessary change is USE=bindist).</li><li>The packages can be used on all amd64 profiles that differ from desktop/plasma/systemd only by use-flag settings. This includes 17.1, 17.1/desktop/*, 17.1/no-multilib, 17.1/systemd, but not anything containing selinx, hardened, developer, musl, or a different profile version such as 17.0.<br></li><li>Right now, the package set includes kde-plasma/plasma-meta, kde-apps/kde-apps-meta, app-office/libreoffice, media-gfx/gimp, media-gfx/inkscape, and of course all their dependencies. More will possibly be added.</li><li>CFLAGS are chosen such that the packages will be usable on all amd64 (i.e., x86-64) machines.&nbsp; <br></li></ul><p>To use the packages, I recommend the following steps: First, create a file /etc/portage/binrepos.conf with the following content:</p><p>[binhost]<br>priority = 9999<br>sync-uri = gentoo.osuosl.org/experimental/amd64/binpkg/default/linux/17.1/x86-64/</p><p>You can pick a different mirror according to your preferences (but also see the remarks below). Then, edit /etc/portage/make.conf, and add the following EMERGE_DEFAULT_OPTS (in addition to flags that you might already have there):</p><p>EMERGE_DEFAULT_OPTS="--binpkg-respect-use=y --getbinpkg=y"</p><p>And that's it. Your next update should download the package index and use binary packages whenever the versions and use-flag settings match. Everything else is compiled as usual.</p><p>What is still missing, and what are the limitations and caveats?</p><ul><li>Obviously, the packages are not optimized for your processor.</li><li>Right now, the server only carries packages for the use-flag settings in an unmodified 17.1/desktop/plasma/systemd profile. If you use other settings, you will end up compiling part of your packages (which is not really a probem, you just lose the benefit of the binary download). It is technically possible to provide binary packages for different use-flag settings at the same URL, and eventually it will be implemented if this experiment succeeds.<br></li><li>At the moment, no cryptographic signing of the binary packages is in place yet. This is the main reason why I'm talking about an experiment. Effectively you trust our mirror admins and the https protocol. Package signing and verification is in preparation, and before the binary package hosting "moves into production", it will be enforced.</li></ul>That's it. Enjoy! And don't forget to leave feedback in the comments.<br>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2021-09-21" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/36167de7e11e3b358446823d51e69792" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://dilfridge.blogspot.com/2021/09/experimental-binary-gentoo-package.html"> <span class="fn" style="color:#000!important;font-size:16px;">Experimental binary Gentoo package hosting (amd64) </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> dilfridge (dilfridge
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            September 21, 2021, 16:34
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://dilfridge.blogspot.com/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <div>
<p></p>
<div class="separator" style="clear: both;text-align: center;"><a href="https://gentoo.osuosl.org/experimental/amd64/binpkg/default/linux/17.1/x86-64/" style="clear: right;float: right;margin-bottom:1em;margin-left:1em;"><img border="0" data-original-height="480" data-original-width="500" height="192" src="https://dev.gentoo.org/~dilfridge/moving.png" width="200"></a></div>
<b><span style="color: red;">IMPORTANT</span>: This blog post is outdated!</b> As direct result of this experiment, we now have <a href="https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html"><b>official Gentoo binary packages available</b></a>. See <a href="https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html">the announcement</a> for more information and further links!  The old blog text follows...</div><div><hr></div><div>As an experiment, I've started assembling a simple binary package hosting mechanism for Gentoo. Right now this comes with some serious limitations and <b>should not be used for security or mission critical applications</b> (more on this below). The main purpose of this experiment is to find out how well it works and where we need improvements in Portage's binary package handling.<p></p>
<p>So what do we have, and how can you use it?</p>
<ul style="text-align: left;">
<li>The server builds an assortment of stable amd64 packages, with the use-flags as present in an unmodified 17.1/desktop/plasma/systemd profile (the only necessary change is USE=bindist).</li>
<li>The packages can be used on all amd64 profiles that differ from desktop/plasma/systemd only by use-flag settings. This includes 17.1, 17.1/desktop/*, 17.1/no-multilib, 17.1/systemd, but <b>not</b> anything containing selinx, hardened, developer, musl, or a different profile version such as 17.0.<br>
</li>
<li>Right now, the package set includes kde-plasma/plasma-meta, kde-apps/kde-apps-meta, app-office/libreoffice, media-gfx/gimp, media-gfx/inkscape, and of course all their dependencies. More will possibly be added.</li>
<li>CFLAGS are chosen such that the packages will be usable on all amd64 (i.e., x86-64) machines.  <br>
</li>
</ul>
<p>To use the packages, I recommend the following steps: First, <b>create a file</b> /etc/portage/<b>binrepos.conf</b> with the following content:</p>
<p style="margin-left:40px;text-align: left;">[binhost]<br>priority = 9999<br>sync-uri = https://gentoo.osuosl.org/experimental/amd64/binpkg/default/linux/17.1/x86-64/</p>
<p style="text-align: left;">You can pick a different mirror according to your preferences (but also see the remarks below). Then, edit /etc/portage/make.conf, and add the following EMERGE_DEFAULT_OPTS (in addition to flags that you might already have there):</p>
<p style="margin-left:40px;text-align: left;">EMERGE_DEFAULT_OPTS="--binpkg-respect-use=y --getbinpkg=y"</p>
<p style="text-align: left;">And that's it. Your next update should download the package index and use binary packages whenever the versions and use-flag settings match. Everything else is compiled as usual.</p>
<p style="text-align: left;">What is still missing, and what are the limitations and caveats?</p>
<ul style="text-align: left;">
<li>Obviously, the packages are not optimized for your processor.</li>
<li>Right now, the server only carries packages for the use-flag settings in an unmodified 17.1/desktop/plasma/systemd profile. If you use other settings, you will end up compiling part of your packages (which is not really a probem, you just lose the benefit of the binary download). It is technically possible to provide binary packages for different use-flag settings at the same URL, and eventually it will be implemented if this experiment succeeds.<br>
</li>
<li>At the moment, <b>no cryptographic signing of the binary packages is in place yet</b>. This is the main reason why I'm talking about an experiment. Effectively you trust our mirror admins and the https protocol. Package signing and verification is in preparation, and before the binary package hosting "moves into production", it will be enforced.</li>
</ul>
</div>That's it. Enjoy! And don't forget to leave feedback in the comments.<br>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-12-29" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>December 29
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-12-29" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Gentoo goes Binary!</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo News (GentooNews)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      December 29, 2023,  6:00
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>
  ♦
</p>

<p>You probably all know Gentoo Linux as your favourite source-based distribution.
Did you know that our package manager, Portage, already for years also has support for binary
packages, and that source- and binary-based package installations can be freely mixed?</p>

<p>To speed up working with slow hardware and for overall convenience, we’re now also offering
binary packages for download and direct installation! For most architectures, this is
limited to the core system and weekly updates - not so for amd64 and arm64 however. There we’ve got a 
stunning &gt;20 GByte of packages on our mirrors, from LibreOffice to KDE Plasma and from Gnome to Docker.
Gentoo stable, updated daily. Enjoy! And read 
on for more details!</p>

<!--more-->

Questions &amp; Answers

How can I set up my existing Gentoo installation to use these packages?

<p>Quick setup instructions for
the most common cases can be found in our wiki. In short, you need to create a configuration 
file in <code>/etc/portage/binrepos.conf/</code>.</p>

<p>In addition, we have a rather neat binary package guide on
our Wiki that goes into much more detail.</p>

What do I have to do with a new stage / new installation?

<p>New stages already contain the suitable <code>/etc/portage/binrepos.conf/gentoobinhost.conf</code>. You are
good to go from the start, although you may want to replace the <code>src-uri</code> 
setting in there with an URI pointing to the corresponding directory on a 
local mirror.</p>

<blockquote>
  <p><code>$ emerge -uDNavg @world</code></p>
</blockquote>

What compile settings, use flags, … do the ‘‘normal’’ amd64 packages use?

<p>The binary packages under <code>amd64/binpackages/17.1/x86-64</code> are compiled using
<code>CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"</code> and will work with any amd64 / x86-64 machine.</p>

<p>The available useflag settings and versions correspond to the stable packages
of the <code>amd64/17.1/nomultilib</code> (i.e., openrc), <code>amd64/17.1/desktop/plasma/systemd</code>,
and <code>amd64/17.1/desktop/gnome/systemd</code> profiles. This should provide fairly large
coverage.</p>

What compile settings, use flags, … do the ‘‘normal’’ arm64 packages use?

<p>The binary packages under <code>arm64/binpackages/17.0/arm64</code> are compiled using
<code>CFLAGS="-O2 -pipe"</code> and will work with any arm64 / AArch64 machine.</p>

<p>The available useflag settings and versions correspond to the stable packages
of the <code>arm64/17.0</code> (i.e., openrc), <code>arm64/17.0/desktop/plasma/systemd</code>,
and <code>arm64/17.0/desktop/gnome/systemd</code> profiles.</p>

But hey, that’s not optimized for my CPU!

<p>Tough luck. You can still compile packages yourself just as before!</p>

What settings do the packages for other architectures and ABIs use?

<p>The binary package hosting is wired up with the stage builds. Which
means, for about every stage there is a binary package hosting which 
covers (only) the stage contents and settings. There are no further plans 
to expand coverage for now. But hey, this includes the compiler (gcc or
clang) and the whole build toolchain!</p>

Are the packages cryptographically signed?

<p>Yes, with the same key as the stages.</p>

Are the cryptographic signatures verified before installation?

<p>Yes, with one limitation (in the default setting).</p>

<p>Portage knows two binary package formats, XPAK (old) and GPKG (new). Only GPKG supports
cryptographic signing. Until recently, XPAK was the default setting (and it may still
be the default on your installation since this is not changed during upgrade, but only
at new installation).</p>

<p>The new, official Gentoo binary packages are all in GPKG format.
GPKG packages have their signature verified, and if this fails, installation is refused.
To avoid breaking compatibility with old binary packages, by default XPAK
packages (which do not have signatures) can still be installed however.</p>

<p>If you want to require verified signatures (which is something we strongly recommend), 
set <code>FEATURES="binpkg-request-signature"</code> in <code>make.conf</code>. Then, obviously, you can also
only use GPKG packages.</p>

I get an error that signatures cannot be verified.

<p>Try running the Gentoo Trust Tool <code>getuto</code> as root.</p>

<blockquote>
  <p><code>$ getuto</code></p>
</blockquote>

<p>This should set up the required key ring with the Gentoo Release Engineering keys for
Portage.</p>

<p>If you have <code>FEATURES="binpkg-request-signature"</code> enabled in <code>make.conf</code>, then <code>getuto</code>
is called automatically before every binary package download operation, to make sure
that key updates and revocations are imported.</p>

I’ve made binary packages myself and portage refuses to use them now!

<p>Well, you found the side effect of <code>FEATURES="binpkg-request-signature"</code>.
For your self-made packages you will need to set up a signing key and have that key
trusted by the anchor in <code>/etc/portage/gnupg</code>.</p>

<p>The binary package guide on
our Wiki will be helpful here.</p>

My download is slow.

<p>Then pretty please use a local mirror
instead of downloading from University of Oregon. You can just edit the URI 
in your <code>/etc/portage/binrepos.conf</code>. And yes, that’s safe, because of the 
cryptographic signature.</p>

My Portage still wants to compile from source.

<p>If you use useflag combinations deviating from the profile default, then
you can’t and won’t use the packages. Portage will happily mix and match though
and combine binary packages with locally compiled ones. Gentoo still remains
a source-based distribution, and we are not aiming for a full binary-only 
installation without any compilation at all.</p>

Can I use the packages on a merged-usr system?

<p>Yes. (If anything breaks, then this is a bug and should be reported.)</p>

Can I use the packages with other (older or newer) profile versions?

<p>No. That’s why the <code>src-uri</code> path contains, e.g.,  “17.1”.
When there’s a new profile version, we’ll also provide new, separate package directories.</p>

Any plans to offer binary packages of ~amd64 ?

<p>Not yet. This would mean a ton of rebuilds… If we offer it one day, it’ll 
be at a separate URI for technical reasons.</p>

<p>The advice for now is to stick to stable as much as possible, and locally
add in <code>package.accept_keywords</code> whatever packages from testing you want to use.
This means you can still use a large amount of binary packages, and just
compile the rest yourself.</p>

I have found a problem, with portage or a specific package!

<p>Then please ask for advice (on IRC, the forums, or a mailing list) and/or 
file a bug!</p>

<p>Binary package support has been tested for some time, but with many more people using
it edge cases will certainly occur, and quality bug reports are always appreciated!</p>

Any pretty pictures?

<p>Of course! Here’s the amount of binary package data in GByte for each architecture…</p>

<p>♦</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-12-29" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html"> <span class="fn" style="color:#000!important;font-size:16px;">Gentoo goes Binary! </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GentooNews (https://www.gentoo.org/feeds/news.xml
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            December 29, 2023,  6:00
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://www.gentoo.org/feeds/news.xml" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p><a href="https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html" class="news-img-right">
  <img src="https://www.gentoo.org/assets/img/news/2023/larry-packages.png" alt="Larry the cow with packages">
</a></p>

<p>You probably all know Gentoo Linux as your favourite source-based distribution.
Did you know that our package manager, Portage, already for years also has support for binary
packages, and that source- and binary-based package installations can be freely mixed?</p>

<p>To speed up working with slow hardware and for overall convenience, we’re now also offering
<strong>binary packages for download and direct installation</strong>! For most architectures, this is
limited to the core system and weekly updates - not so for <strong>amd64 and arm64</strong> however. There we’ve got a 
stunning <strong>&gt;20 GByte of packages</strong> on our mirrors, from LibreOffice to KDE Plasma and from Gnome to Docker.
Gentoo stable, updated daily. Enjoy! And <a href="https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html">read 
on for more details!</a></p>



<h2 id="questions--answers">Questions &amp; Answers</h2>

<h3 id="how-can-i-set-up-my-existing-gentoo-installation-to-use-these-packages">How can I set up my existing Gentoo installation to use these packages?</h3>

<p><a href="https://wiki.gentoo.org/wiki/Binary_package_quickstart">Quick setup instructions</a> for
the most common cases can be found in our wiki. In short, you need to create a configuration 
file in <code class="language-plaintext highlighter-rouge">/etc/portage/binrepos.conf/</code>.</p>

<p>In addition, we have a rather neat <a href="https://wiki.gentoo.org/wiki/Binary_package_guide">binary package guide</a> on
our Wiki that goes into much more detail.</p>

<h3 id="what-do-i-have-to-do-with-a-new-stage--new-installation">What do I have to do with a new stage / new installation?</h3>

<p>New stages already contain the suitable <code class="language-plaintext highlighter-rouge">/etc/portage/binrepos.conf/gentoobinhost.conf</code>. You are
good to go from the start, although you may want to replace the <code class="language-plaintext highlighter-rouge">src-uri</code> 
setting in there with an URI pointing to the corresponding directory on a 
<a href="https://www.gentoo.org/downloads/mirrors/">local mirror</a>.</p>

<blockquote>
  <p><code class="language-plaintext highlighter-rouge">$ emerge -uDNavg @world</code></p>
</blockquote>

<h3 id="what-compile-settings-use-flags--do-the-normal-amd64-packages-use">What compile settings, use flags, … do the ‘‘normal’’ amd64 packages use?</h3>

<p>The binary packages under <code class="language-plaintext highlighter-rouge">amd64/binpackages/17.1/x86-64</code> are compiled using
<code class="language-plaintext highlighter-rouge">CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"</code> and will work with any amd64 / x86-64 machine.</p>

<p>The available useflag settings and versions correspond to the stable packages
of the <code class="language-plaintext highlighter-rouge">amd64/17.1/nomultilib</code> (i.e., openrc), <code class="language-plaintext highlighter-rouge">amd64/17.1/desktop/plasma/systemd</code>,
and <code class="language-plaintext highlighter-rouge">amd64/17.1/desktop/gnome/systemd</code> profiles. This should provide fairly large
coverage.</p>

<h3 id="what-compile-settings-use-flags--do-the-normal-arm64-packages-use">What compile settings, use flags, … do the ‘‘normal’’ arm64 packages use?</h3>

<p>The binary packages under <code class="language-plaintext highlighter-rouge">arm64/binpackages/17.0/arm64</code> are compiled using
<code class="language-plaintext highlighter-rouge">CFLAGS="-O2 -pipe"</code> and will work with any arm64 / AArch64 machine.</p>

<p>The available useflag settings and versions correspond to the stable packages
of the <code class="language-plaintext highlighter-rouge">arm64/17.0</code> (i.e., openrc), <code class="language-plaintext highlighter-rouge">arm64/17.0/desktop/plasma/systemd</code>,
and <code class="language-plaintext highlighter-rouge">arm64/17.0/desktop/gnome/systemd</code> profiles.</p>

<h3 id="but-hey-thats-not-optimized-for-my-cpu">But hey, that’s not optimized for my CPU!</h3>

<p>Tough luck. You can still compile packages yourself just as before!</p>

<h3 id="what-settings-do-the-packages-for-other-architectures-and-abis-use">What settings do the packages for other architectures and ABIs use?</h3>

<p>The binary package hosting is wired up with the stage builds. Which
means, for about every stage there is a binary package hosting which 
covers (only) the stage contents and settings. There are no further plans 
to expand coverage for now. But hey, this includes the compiler (gcc or
clang) and the whole build toolchain!</p>

<h3 id="are-the-packages-cryptographically-signed">Are the packages cryptographically signed?</h3>

<p>Yes, with the <a href="https://www.gentoo.org/downloads/signatures/">same key as the stages</a>.</p>

<h3 id="are-the-cryptographic-signatures-verified-before-installation">Are the cryptographic signatures verified before installation?</h3>

<p>Yes, with one limitation (in the default setting).</p>

<p>Portage knows two binary package formats, XPAK (old) and GPKG (new). Only GPKG supports
cryptographic signing. Until recently, XPAK was the default setting (and it may still
be the default on your installation since this is not changed during upgrade, but only
at new installation).</p>

<p>The new, official Gentoo binary packages are all in GPKG format.
GPKG packages have their signature verified, and if this fails, installation is refused.
To avoid breaking compatibility with old binary packages, by default XPAK
packages (which do not have signatures) can still be installed however.</p>

<p>If you want to require verified signatures (which is something we strongly recommend), 
set <code class="language-plaintext highlighter-rouge">FEATURES="binpkg-request-signature"</code> in <code class="language-plaintext highlighter-rouge">make.conf</code>. Then, obviously, you can also
only use GPKG packages.</p>

<h3 id="i-get-an-error-that-signatures-cannot-be-verified">I get an error that signatures cannot be verified.</h3>

<p>Try running the Gentoo Trust Tool <code class="language-plaintext highlighter-rouge">getuto</code> as root.</p>

<blockquote>
  <p><code class="language-plaintext highlighter-rouge">$ getuto</code></p>
</blockquote>

<p>This should set up the required key ring with the Gentoo Release Engineering keys for
Portage.</p>

<p>If you have <code class="language-plaintext highlighter-rouge">FEATURES="binpkg-request-signature"</code> enabled in <code class="language-plaintext highlighter-rouge">make.conf</code>, then <code class="language-plaintext highlighter-rouge">getuto</code>
is called automatically before every binary package download operation, to make sure
that key updates and revocations are imported.</p>

<h3 id="ive-made-binary-packages-myself-and-portage-refuses-to-use-them-now">I’ve made binary packages myself and portage refuses to use them now!</h3>

<p>Well, you found the side effect of <code class="language-plaintext highlighter-rouge">FEATURES="binpkg-request-signature"</code>.
For your self-made packages you will need to set up a signing key and have that key
trusted by the anchor in <code class="language-plaintext highlighter-rouge">/etc/portage/gnupg</code>.</p>

<p>The <a href="https://wiki.gentoo.org/wiki/Binary_package_guide">binary package guide</a> on
our Wiki will be helpful here.</p>

<h3 id="my-download-is-slow">My download is slow.</h3>

<p>Then pretty please use a <a href="https://www.gentoo.org/downloads/mirrors/">local mirror</a>
instead of downloading from University of Oregon. You can just edit the URI 
in your <code class="language-plaintext highlighter-rouge">/etc/portage/binrepos.conf</code>. And yes, that’s safe, because of the 
cryptographic signature.</p>

<h3 id="my-portage-still-wants-to-compile-from-source">My Portage still wants to compile from source.</h3>

<p>If you use useflag combinations deviating from the profile default, then
you can’t and won’t use the packages. Portage will happily mix and match though
and combine binary packages with locally compiled ones. Gentoo still remains
a source-based distribution, and we are not aiming for a full binary-only 
installation without any compilation at all.</p>

<h3 id="can-i-use-the-packages-on-a-merged-usr-system">Can I use the packages on a merged-usr system?</h3>

<p>Yes. (If anything breaks, then this is a bug and <a href="https://bugs.gentoo.org/">should be reported</a>.)</p>

<h3 id="can-i-use-the-packages-with-other-older-or-newer-profile-versions">Can I use the packages with other (older or newer) profile versions?</h3>

<p><strong>No.</strong> That’s why the <code class="language-plaintext highlighter-rouge">src-uri</code> path contains, e.g.,  “17.1”.
<strong>When there’s a new profile version, we’ll also provide new, separate package directories.</strong></p>

<h3 id="any-plans-to-offer-binary-packages-of-amd64-">Any plans to offer binary packages of ~amd64 ?</h3>

<p>Not yet. This would mean a ton of rebuilds… If we offer it one day, it’ll 
be at a separate URI for technical reasons.</p>

<p>The advice for now is to stick to stable as much as possible, and locally
add in <code class="language-plaintext highlighter-rouge">package.accept_keywords</code> whatever packages from testing you want to use.
This means you can still use a large amount of binary packages, and just
compile the rest yourself.</p>

<h3 id="i-have-found-a-problem-with-portage-or-a-specific-package">I have found a problem, with portage or a specific package!</h3>

<p>Then please <strong>ask for advice</strong> (on IRC, the forums, or a mailing list) and/or 
<a href="https://bugs.gentoo.org/"><strong>file a bug!</strong></a></p>

<p>Binary package support has been tested for some time, but with many more people using
it edge cases will certainly occur, and quality bug reports are always appreciated!</p>

<h3 id="any-pretty-pictures">Any pretty pictures?</h3>

<p>Of course! Here’s the amount of binary package data in GByte for each architecture…</p>

<p><img src="https://www.akhuettel.de/~huettel/plots/mirrors/binpackages-month.png" alt="package data over time"></p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-12-17" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>December 17
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-12-17" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">.NET in Gentoo in 2023</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Maciej Barć (xgqt)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      December 17, 2023, 22:59
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    .NET ecosystem in Gentoo in year 2023

<p>The Gentoo Dotnet project introduced better support for building .NET-based software using the <code>nuget</code>, <code>dotnet-pkg-base</code> and <code>dotnet-pkg</code> eclasses. This opened new opportunities of bringing new packages depending on .NET ecosystem to the official Gentoo ebuild repository and helping developers that use <code>dotnet-sdk</code> on Gentoo.</p>

<p>New software requiring .NET is constantly being added to the main Gentoo tree, among others that is:</p>

<ul>
 <li>PowerShell  for Linux,</li>
 <li>Denaro  &mdash; finance application,</li>
 <li>Ryujinx  &mdash; NS emulator,</li>
 <li>OpenRA  &mdash; RTS engine for Command &amp; Conquer, Red Alert and Dune2k,</li>
 <li>Pinta  &mdash; graphics program,</li>
 <li>Pablodraw  &mdash; Ansi, Ascii and RIPscrip art editor,</li>
 <li>Dafny  &mdash; verification-aware programming language</li>
 <li>many  packages  aimed straight at developing .NET projects.</li></ul>

<p>Dotnet project is also looking for new maintainers and users who are willing to help out here and there. Current state of .NET in Gentoo is very good but we can still do a lot better.</p>

Special thanks to people who helped out

<ul>
 <li>Anna Figueiredo Gomes</li>
 <li>Esteve Varela Colominas</li>
 <li>Andrew Udvare</li></ul>

Links to bugs and announcements

<ul>
 <li>Bugs
  <ul>
   <li>gentoo-dotnet&ndash;2023/1</li>
   <li>900597</li></ul></li>
 <li>Github PRs
  <ul>
   <li>21112</li>
   <li>21451</li>
   <li>29309</li>
   <li>32109</li>
   <li>33940</li></ul></li>
 <li>Active Gentoo .NET projects
  <ul>
   <li>gentoo-dotnet-guide</li>
   <li>gentoo-dotnet-maintainer-tools</li>
   <li>csharp-gentoodotnetinfo</li>
   <li>eselect-dotnet</li>
   <li>eselect-pwsh</li></ul></li></ul>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-12-17" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://xgqt.gitlab.io//blog/posts/2023/12/17/-net-in-gentoo-in-2023/?utm_source=gentoo&utm_medium=Atom"> <span class="fn" style="color:#000!important;font-size:16px;">.NET in Gentoo in 2023 </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> xgqt (xgqt
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            December 17, 2023, 22:59
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://xgqt.gitlab.io/blog/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <h2 id="net-ecosystem-in-gentoo-in-year-2023">.NET ecosystem in Gentoo in year 2023</h2>

<p>The Gentoo Dotnet project introduced better support for building .NET-based software using the <code>nuget</code>, <code>dotnet-pkg-base</code> and <code>dotnet-pkg</code> eclasses. This opened new opportunities of bringing new packages depending on .NET ecosystem to the official Gentoo ebuild repository and helping developers that use <code>dotnet-sdk</code> on Gentoo.</p>

<p>New software requiring .NET is constantly being added to the main Gentoo tree, among others that is:</p>

<ul>
 <li>
<a href="https://packages.gentoo.org/packages/app-shells/pwsh">PowerShell</a>  for Linux,</li>
 <li>
<a href="https://packages.gentoo.org/packages/app-office/denaro">Denaro</a>  — finance application,</li>
 <li>
<a href="https://packages.gentoo.org/packages/games-emulation/ryujinx">Ryujinx</a>  — NS emulator,</li>
 <li>
<a href="https://packages.gentoo.org/packages/games-strategy/openra">OpenRA</a>  — RTS engine for Command &amp; Conquer, Red Alert and Dune2k,</li>
 <li>
<a href="https://packages.gentoo.org/packages/media-gfx/pinta">Pinta</a>  — graphics program,</li>
 <li>
<a href="https://packages.gentoo.org/packages/media-gfx/pablodraw">Pablodraw</a>  — Ansi, Ascii and RIPscrip art editor,</li>
 <li>
<a href="https://packages.gentoo.org/packages/dev-lang/dafny">Dafny</a>  — verification-aware programming language</li>
 <li>many  <a href="https://packages.gentoo.org/maintainer/dotnet@gentoo.org#dev-dotnet">packages</a>  aimed straight at developing .NET projects.</li>
</ul>

<p>Dotnet project is also looking for new maintainers and users who are willing to help out here and there. Current state of .NET in Gentoo is very good but we can still do a lot better.</p>

<h2 id="special-thanks-to-people-who-helped-out">Special thanks to people who helped out</h2>

<ul>
 <li><a href="https://github.com/navi-desu/">Anna Figueiredo Gomes</a></li>
 <li><a href="https://github.com/mid-kid/">Esteve Varela Colominas</a></li>
 <li><a href="https://github.com/Tatsh/">Andrew Udvare</a></li>
</ul>

<h2 id="links-to-bugs-and-announcements">Links to bugs and announcements</h2>

<ul>
 <li>Bugs
  <ul>
   <li><a href="https://gitlab.gentoo.org/dotnet/gentoo-dotnet-2023/-/issues/1">gentoo-dotnet–2023/1</a></li>
   <li><a href="https://bugs.gentoo.org/900597">900597</a></li>
</ul>
</li>
 <li>Github PRs
  <ul>
   <li><a href="https://github.com/gentoo/gentoo/pull/21112/">21112</a></li>
   <li><a href="https://github.com/gentoo/gentoo/pull/21451/">21451</a></li>
   <li><a href="https://github.com/gentoo/gentoo/pull/29309/">29309</a></li>
   <li><a href="https://github.com/gentoo/gentoo/pull/32109/">32109</a></li>
   <li><a href="https://github.com/gentoo/gentoo/pull/33940/">33940</a></li>
</ul>
</li>
 <li>Active Gentoo .NET projects
  <ul>
   <li><a href="https://gitlab.gentoo.org/dotnet/gentoo-dotnet-guide/">gentoo-dotnet-guide</a></li>
   <li><a href="https://gitlab.gentoo.org/dotnet/gentoo-dotnet-maintainer-tools/">gentoo-dotnet-maintainer-tools</a></li>
   <li><a href="https://gitlab.gentoo.org/dotnet/csharp-gentoodotnetinfo/">csharp-gentoodotnetinfo</a></li>
   <li><a href="https://gitlab.gentoo.org/dotnet/eselect-dotnet/">eselect-dotnet</a></li>
   <li><a href="https://gitlab.gentoo.org/dotnet/eselect-pwsh/">eselect-pwsh</a></li>
</ul>
</li>
</ul>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        

        <div class="row short-view d-none" data-date="2023-12-17" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Portage Continuous Delivery</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Maciej Barć (xgqt)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      December 17, 2023,  0:50
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    Portage as a CD system

<p>This is a very simple way to use any system with Portage installed as a Continuous Delivery server.</p>

<p>I think for a testing environment this is a valid solution to consider.</p>

Create a repository of software used in your organization

<p>Those articles from the Gentoo Wiki describe how to create a custom ebuild repository (overlay) pretty well:</p>

<ul>
 <li>Ebuild repository</li>
 <li>Creating an ebuild repository</li></ul>

Set up your repo with eselect-repository

<p>Install the <code>my-org</code> repository:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>eselect repository add my-org git git.my-org.local/portage/my-org.git
</pre>



<p>Sync <code>my-org</code>:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>emerge --sync my-org
</pre>



Install live packages of a your software

<p>First, enable live packages (keywordless) for your <code>my-org</code> repo:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>echo &#39;*/*::my-org&#39; &gt;&gt; /etc/portage/package.accept_keywords/0000_repo_my-org.conf
</pre>



<p>Install some packages from <code>my-org</code>:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>emerge -av "=mycategory/mysoftware-9999"
</pre>



Install smart-live-rebuild

<p><code>smart-live-rebuild</code> can automatically update live software packages that use git as their source URL.</p>

Set up cron to run smart-live-rebuild

<p>Refresh your <code>my-org</code> repository every hour:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>0 */1 * * * emerge --sync my-org
</pre>



<p>Refresh the main Gentoo tree every other 6th hour:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>0 */6 * * * emerge --sync gentoo
</pre>



<p>Run <code>smart-live-rebuild</code> every other 3rd hour:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>0 */3 * * * smart-live-rebuild
</pre>



Restarting services after update

All-in-one script

<p>You can either restart all services after successful update:</p>

<p>File: <code>/opt/update.sh</code></p>


 
  
   
    
     
      
       <pre>1
2
3
4
5
6
7
8</pre>
     
      
       <pre>#!/bin/sh

set -e

smart-live-rebuild

systemctl restart my-service-1.service
systemctl restart my-service-2.service
</pre>



<p>Crontab:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>0 */3 * * * /opt/update.sh
</pre>



Via ebuilds pkg_ functions

<p>File: <code>my-service-1.ebuild</code></p>


 
  
   
    
     
      
       <pre>1
2
3</pre>
     
      
       <pre>pkg_postinst() {
    systemctl restart my-service-1.service
}
</pre>



<p>More about <code>pkg_postinst</code>:</p>

<ul>
 <li>pkg_postinst</li>
 <li>Phase Functions</li></ul>

Example Gentoo overlays

<ul>
 <li>xgqt/myov</li>
 <li>gentoo-racket/gentoo-racket-overlay</li>
 <li>gentoo-mirror/guru</li></ul>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-12-17" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://xgqt.gitlab.io//blog/posts/2023/12/17/portage-continuous-delivery/?utm_source=gentoo&utm_medium=Atom"> <span class="fn" style="color:#000!important;font-size:16px;">Portage Continuous Delivery </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> xgqt (xgqt
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            December 17, 2023,  0:50
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://xgqt.gitlab.io/blog/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <h2 id="portage-as-a-cd-system">Portage as a CD system</h2>

<p>This is a very simple way to use any system with Portage installed as a Continuous Delivery server.</p>

<p>I think for a testing environment this is a valid solution to consider.</p>

<h3 id="create-a-repository-of-software-used-in-your-organization">Create a repository of software used in your organization</h3>

<p>Those articles from the Gentoo Wiki describe how to create a custom ebuild repository (overlay) pretty well:</p>

<ul>
 <li><a href="https://wiki.gentoo.org/wiki/Ebuild_repository">Ebuild repository</a></li>
 <li><a href="https://wiki.gentoo.org/wiki/Creating_an_ebuild_repository">Creating an ebuild repository</a></li>
</ul>

<h3 id="set-up-your-repo-with-eselect-repository">Set up your repo with eselect-repository</h3>

<p>Install the <code>my-org</code> repository:</p>

<div class="brush: shell">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>eselect<span class="w"> </span>repository<span class="w"> </span>add<span class="w"> </span>my-org<span class="w"> </span>git<span class="w"> </span>https://git.my-org.local/portage/my-org.git
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>Sync <code>my-org</code>:</p>

<div class="brush: shell">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>emerge<span class="w"> </span>--sync<span class="w"> </span>my-org
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h3 id="install-live-packages-of-a-your-software">Install live packages of a your software</h3>

<p>First, enable live packages (keywordless) for your <code>my-org</code> repo:</p>

<div class="brush: shell">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="nb">echo</span><span class="w"> </span><span class="s1">'*/*::my-org'</span><span class="w"> </span>&gt;&gt;<span class="w"> </span>/etc/portage/package.accept_keywords/0000_repo_my-org.conf
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>Install some packages from <code>my-org</code>:</p>

<div class="brush: shell">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>emerge<span class="w"> </span>-av<span class="w"> </span><span class="s2">"=mycategory/mysoftware-9999"</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h3 id="install-smart-live-rebuild">Install smart-live-rebuild</h3>

<p><code>smart-live-rebuild</code> can automatically update live software packages that use git as their source URL.</p>

<h3 id="set-up-cron-to-run-smart-live-rebuild">Set up cron to run smart-live-rebuild</h3>

<p>Refresh your <code>my-org</code> repository every hour:</p>

<div class="brush: cron">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>0 */1 * * * emerge --sync my-org
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>Refresh the main Gentoo tree every other 6th hour:</p>

<div class="brush: cron">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>0 */6 * * * emerge --sync gentoo
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>Run <code>smart-live-rebuild</code> every other 3rd hour:</p>

<div class="brush: cron">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>0 */3 * * * smart-live-rebuild
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h2 id="restarting-services-after-update">Restarting services after update</h2>

<h3 id="all-in-one-script">All-in-one script</h3>

<p>You can either restart all services after successful update:</p>

<p>File: <code>/opt/update.sh</code></p>

<div class="brush: shell">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span>
<span class="normal">6</span>
<span class="normal">7</span>
<span class="normal">8</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="ch">#!/bin/sh</span>

<span class="nb">set</span><span class="w"> </span>-e

smart-live-rebuild

systemctl<span class="w"> </span>restart<span class="w"> </span>my-service-1.service
systemctl<span class="w"> </span>restart<span class="w"> </span>my-service-2.service
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>Crontab:</p>

<div class="brush: cron">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>0 */3 * * * /opt/update.sh
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h3 id="via-ebuilds-pkg-functions">Via ebuilds pkg_ functions</h3>

<p>File: <code>my-service-1.ebuild</code></p>

<div class="brush: shell">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>pkg_postinst<span class="o">()</span><span class="w"> </span><span class="o">{</span>
<span class="w">    </span>systemctl<span class="w"> </span>restart<span class="w"> </span>my-service-1.service
<span class="o">}</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>More about <code>pkg_postinst</code>:</p>

<ul>
 <li><a href="https://devmanual.gentoo.org/ebuild-writing/functions/pkg_postinst/">pkg_postinst</a></li>
 <li><a href="https://devmanual.gentoo.org/ebuild-writing/functions/index.html">Phase Functions</a></li>
</ul>

<h2 id="example-gentoo-overlays">Example Gentoo overlays</h2>

<ul>
 <li><a href="https://gitlab.com/xgqt/myov/">xgqt/myov</a></li>
 <li><a href="https://gitlab.com/gentoo-racket/gentoo-racket-overlay/">gentoo-racket/gentoo-racket-overlay</a></li>
 <li><a href="https://github.com/gentoo-mirror/guru/">gentoo-mirror/guru</a></li>
</ul>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-12-07" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>December 07
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-12-07" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">A format that does one thing well or one-size-fits-all?</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Michał Górny (mgorny)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      December 07, 2023, 15:58
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>The Unix philosophy states that we ought to design programs that &#8220;do one thing well&#8221;.  Nevertheless, the current trend is to design huge monoliths with multiple unrelated functions, with web browsers at the peak of that horrifying journey.  However, let&#8217;s consider something else.</p>
<p>Does the same philosophy hold for algorithms and file formats?  Is it better to design formats that suit a single use case well, and swap between different formats as need arises?  Or perhaps it is a better solution to actually design them so they could fit different needs?</p>
<p>Let&#8217;s consider this by exploring three areas: hash algorithms, compressed file formats and image formats.<br>
</p>
Hash algorithms
<p>Hash, digest, checksum — they have many names, and many uses.  To list a few uses of hash functions and their derivatives:</p>
<ul>
<li>verifying file integrity</li>
<li>verifying file authenticity</li>
<li>generating derived keys</li>
<li>generating unique keys for fast data access and comparison</li>
</ul>
<p>Different use cases imply different requirements.  The simple CRC algorithms were good enough to check files for random damage but they aren&#8217;t suitable for cryptographic purposes.  The SHA hashes provide good resistance to attacks but they are too slow to speed up data lookups.  That role is much better served by dedicated fast hashes such as xxHash.  In my opinion, these are all examples of &#8220;do one thing well&#8221;.</p>
<p>On the other hand, there is some overlap.  More often than not, cryptographic hash functions are used to verify integrity.  Then we have modern hashes like BLAKE2 that are both fast and secure (though not as fast as dedicated fast hashes).  Argon2 key derivation function builds upon BLAKE2 to improve its security even further, rather than inventing a new hash.  These are the examples how a single tool is used to serve different purposes.</p>
Compressed file formats
<p>The purpose of compression, of course, is to reduce file size.  However, individual algorithms may be optimized for different kinds of data and different goals.</p>
<p>Probably the oldest category are &#8220;archiving&#8221; algorithms that focus on providing strong compression and reasonably fast decompression.  Back in the day, there were used to compress files in &#8220;cold storage&#8221; and for transfer; nowadays, they can be used basically for anything that you don&#8217;t modify very frequently.  The common algorithms from this category include deflate (used by gzip, zip) and LZMA (used by 7z, lzip, xz).</p>
<p>Then, we have very strong algorithms that achieve remarkable compression at the cost of very slow compression and decompression.  These are sometimes (but rarely) used for data distribution.  An example of such algorithms are the PAQ family.</p>
<p>Then, we have very fast algorithms such as LZ4.  They provide worse compression ratios than other algorithms, but they are so fast that they can be used to compress data on the fly.  They can be used to speed up data access and transmission by reducing its size with no noticeable overhead.</p>
<p>Of course, many algorithms have different presets.  You can run lz4 -9 to get stronger compression with LZ4, or xz -1 to get faster compression with XZ.  However, neither the former will excel at compression ratio, nor the latter at speed.</p>
<p>Again, we are seeing different algorithms that &#8220;do one thing well&#8221;.  However, nowadays ZSTD is gaining popularity and it spans a wider spectrum, being capable of both providing very fast compression (but not as fast as LZ4) and quite strong compression.  What&#8217;s really important is that it&#8217;s capable of providing adaptive compression — that is, dynamically adjusting the compression level to provide the best throughput.  It switches to a faster preset if the current one is slowing the transmission down, and to a stronger one if there is a potential speedup in that.</p>
Image formats
<p>Let&#8217;s discuss image formats now.  If we look back far enough, we&#8217;d arrive at a time when two image formats were dominating the web.  On one hand, we had GIF — with lossless compression, limited color palette, transparency and animations, that made it a good choice for computer-generated images.  On the other, we had JPEG — with efficient lossy compression and high color depth suitable for photography.  We could see these two as &#8220;doing one thing well&#8221;.</p>
<p>Then came PNG.  PNG is also lossless but provides much higher color depth and improved support for transparency via an alpha channel.  While it&#8217;s still the format of choice for computer-generated images, it&#8217;s also somewhat suitable for photography (but with less efficient compression).  With APNG around, it effectively replaces GIF but it also partially overlaps with the use cases for JPEG.</p>
<p>Modern image formats go even further.  WebP, AVIF and JPEG XL all support both lossless and lossy compession, high color depths, alpha channel, animation.  Therefore, they are suitable both for computer-generated images and for photography.  Effectively, they can replace all their predecessors with a &#8220;one size fits all&#8221; format.</p>
Conclusion
<p>I&#8217;ve asked whether it is better to design formats that focus on one specific use case, or whether formats that try to cover a whole spectrum of use cases are better.  I&#8217;m afraid there&#8217;s no easy answer to this question.</p>
<p>We can clearly see that &#8220;one-size-fits-all&#8221; solutions are gaining popularity — BLAKE2 among hashes, ZSTD in compressed file formats, WebP, AVIF and JPEG XL among image formats.  They have a single clear advantage — you need just one tool, one implementation.</p>
<p>Your web browser needs to support only one format that covers both computer-generated graphics using lossless compression and photographs using lossy compression.  Different tools can reuse the same BLAKE2 implementation that&#8217;s well tested and audited.  A single ZSTD library can serve different applications in their distinct use cases.</p>
<p>However, there is still a clear edge to algorithms that are focused on a single use case.  xxHash is still faster than any hashes that could be remotely suitable for cryptographic purposes.  LZ4 is still faster than ZSTD can be in its lowest compression mode.</p>
<p>The only reasonable conclusion seems to be: there are use cases for both.  There are use cases that are best satisfied by a dedicated algorithm, and there are use cases when a more generic solution is better.  There are use cases when integrating two different hash algorithms, two different compression libraries into your program, with the overhead involved, is a better choice, than using just one algorithm that fits neither of your two distinct use cases well.</p>
<p>Once again, it feels that a reference to XKCD#927 is appropriate.  However, in this particular instance this isn&#8217;t a bad thing.</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-12-07" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/mgorny/2023/12/07/a-format-that-does-one-thing-well-or-one-size-fits-all/"> <span class="fn" style="color:#000!important;font-size:16px;">A format that does one thing well or one-size-fits-all? </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> mgorny (mgorny
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            December 07, 2023, 15:58
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/mgorny/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>The Unix philosophy states that we ought to design programs that “do one thing well”.  Nevertheless, the current trend is to design huge monoliths with multiple unrelated functions, with web browsers at the peak of that horrifying journey.  However, let’s consider something else.</p>
<p>Does the same philosophy hold for algorithms and file formats?  Is it better to design formats that suit a single use case well, and swap between different formats as need arises?  Or perhaps it is a better solution to actually design them so they could fit different needs?</p>
<p>Let’s consider this by exploring three areas: hash algorithms, compressed file formats and image formats.<br>
<span id="more-1888"></span></p>
<h2>Hash algorithms</h2>
<p>Hash, digest, checksum — they have many names, and many uses.  To list a few uses of hash functions and their derivatives:</p>
<ul>
<li>verifying file integrity</li>
<li>verifying file authenticity</li>
<li>generating derived keys</li>
<li>generating unique keys for fast data access and comparison</li>
</ul>
<p>Different use cases imply different requirements.  The simple CRC algorithms were good enough to check files for random damage but they aren’t suitable for cryptographic purposes.  The SHA hashes provide good resistance to attacks but they are too slow to speed up data lookups.  That role is much better served by dedicated fast hashes such as xxHash.  In my opinion, these are all examples of “do one thing well”.</p>
<p>On the other hand, there is some overlap.  More often than not, cryptographic hash functions are used to verify integrity.  Then we have modern hashes like BLAKE2 that are both fast and secure (though not as fast as dedicated fast hashes).  Argon2 key derivation function builds upon BLAKE2 to improve its security even further, rather than inventing a new hash.  These are the examples how a single tool is used to serve different purposes.</p>
<h2>Compressed file formats</h2>
<p>The purpose of compression, of course, is to reduce file size.  However, individual algorithms may be optimized for different kinds of data and different goals.</p>
<p>Probably the oldest category are “archiving” algorithms that focus on providing strong compression and reasonably fast decompression.  Back in the day, there were used to compress files in “cold storage” and for transfer; nowadays, they can be used basically for anything that you don’t modify very frequently.  The common algorithms from this category include deflate (used by gzip, zip) and LZMA (used by 7z, lzip, xz).</p>
<p>Then, we have very strong algorithms that achieve remarkable compression at the cost of very slow compression and decompression.  These are sometimes (but rarely) used for data distribution.  An example of such algorithms are the PAQ family.</p>
<p>Then, we have very fast algorithms such as LZ4.  They provide worse compression ratios than other algorithms, but they are so fast that they can be used to compress data on the fly.  They can be used to speed up data access and transmission by reducing its size with no noticeable overhead.</p>
<p>Of course, many algorithms have different presets.  You can run <kbd>lz4 -9</kbd> to get stronger compression with LZ4, or <kbd>xz -1</kbd> to get faster compression with XZ.  However, neither the former will excel at compression ratio, nor the latter at speed.</p>
<p>Again, we are seeing different algorithms that “do one thing well”.  However, nowadays ZSTD is gaining popularity and it spans a wider spectrum, being capable of both providing very fast compression (but not as fast as LZ4) and quite strong compression.  What’s really important is that it’s capable of providing adaptive compression — that is, dynamically adjusting the compression level to provide the best throughput.  It switches to a faster preset if the current one is slowing the transmission down, and to a stronger one if there is a potential speedup in that.</p>
<h2>Image formats</h2>
<p>Let’s discuss image formats now.  If we look back far enough, we’d arrive at a time when two image formats were dominating the web.  On one hand, we had GIF — with lossless compression, limited color palette, transparency and animations, that made it a good choice for computer-generated images.  On the other, we had JPEG — with efficient lossy compression and high color depth suitable for photography.  We could see these two as “doing one thing well”.</p>
<p>Then came PNG.  PNG is also lossless but provides much higher color depth and improved support for transparency via an alpha channel.  While it’s still the format of choice for computer-generated images, it’s also somewhat suitable for photography (but with less efficient compression).  With APNG around, it effectively replaces GIF but it also partially overlaps with the use cases for JPEG.</p>
<p>Modern image formats go even further.  WebP, AVIF and JPEG XL all support both lossless and lossy compession, high color depths, alpha channel, animation.  Therefore, they are suitable both for computer-generated images and for photography.  Effectively, they can replace all their predecessors with a “one size fits all” format.</p>
<h2>Conclusion</h2>
<p>I’ve asked whether it is better to design formats that focus on one specific use case, or whether formats that try to cover a whole spectrum of use cases are better.  I’m afraid there’s no easy answer to this question.</p>
<p>We can clearly see that “one-size-fits-all” solutions are gaining popularity — BLAKE2 among hashes, ZSTD in compressed file formats, WebP, AVIF and JPEG XL among image formats.  They have a single clear advantage — you need just one tool, one implementation.</p>
<p>Your web browser needs to support only one format that covers both computer-generated graphics using lossless compression and photographs using lossy compression.  Different tools can reuse the same BLAKE2 implementation that’s well tested and audited.  A single ZSTD library can serve different applications in their distinct use cases.</p>
<p>However, there is still a clear edge to algorithms that are focused on a single use case.  xxHash is still faster than any hashes that could be remotely suitable for cryptographic purposes.  LZ4 is still faster than ZSTD can be in its lowest compression mode.</p>
<p>The only reasonable conclusion seems to be: there are use cases for both.  There are use cases that are best satisfied by a dedicated algorithm, and there are use cases when a more generic solution is better.  There are use cases when integrating two different hash algorithms, two different compression libraries into your program, with the overhead involved, is a better choice, than using just one algorithm that fits neither of your two distinct use cases well.</p>
<p>Once again, it feels that a reference to <a rel="external" href="https://xkcd.com/927/">XKCD#927</a> is appropriate.  However, in this particular instance this isn’t a bad thing.</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-09-05" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>September 05
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-09-05" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">My thin wrapper for emerge(1)</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Michał Górny (mgorny)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      September 05, 2023, 17:04
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>I&#8217;ve recently written a thin wrapper over emerge that I use in my development environment.  It does the following:</p>
<ol>
<li>set tmux pane title to the first package argument (so you can roughly see what&#8217;s emerging on every pane)</li>
<li>beep meaningfully when emerge finishes (two beeps for success, three for failure),</li>
<li>run pip check after successful run to check for mismatched Python dependencies.</li>
</ol>
<p></p>
<p>Here&#8217;s the code:</p>
<pre>#!/bin/sh

for arg; do
	case ${arg} in
		-*)
			;;
		*)
			tmux rename-window "${arg}"
			break
			;;
	esac
done

/usr/bin/emerge "${@}"
ret=${?}

if [ "${ret}" -eq 0 ]; then
	python3.11 -m pip check | grep -v certifi
else
	tput bel
	sleep 0.1
fi

tput bel
sleep 0.1
tput bel

exit "${ret}"</pre>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-09-05" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/ff5429ef741b434eb2011692832f810e" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/mgorny/2023/09/05/my-thin-wrapper-for-emerge/"> <span class="fn" style="color:#000!important;font-size:16px;">My thin wrapper for emerge(1) </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> mgorny (mgorny
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            September 05, 2023, 17:04
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/mgorny/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>I’ve recently written a thin wrapper over <kbd>emerge</kbd> that I use in my development environment.  It does the following:</p>
<ol>
<li>set tmux pane title to the first package argument (so you can roughly see what’s emerging on every pane)</li>
<li>beep meaningfully when emerge finishes (two beeps for success, three for failure),</li>
<li>run <kbd>pip check</kbd> after successful run to check for mismatched Python dependencies.</li>
</ol>
<p><span id="more-1881"></span></p>
<p>Here’s the code:</p>
<pre>#!/bin/sh

for arg; do
	case ${arg} in
		-*)
			;;
		*)
			tmux rename-window "${arg}"
			break
			;;
	esac
done

/usr/bin/emerge "${@}"
ret=${?}

if [ "${ret}" -eq 0 ]; then
	python3.11 -m pip check | grep -v certifi
else
	tput bel
	sleep 0.1
fi

tput bel
sleep 0.1
tput bel

exit "${ret}"</pre>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-08-27" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>August 27
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-08-27" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Final Report, Automated Gentoo System Updater</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 27, 2023, 16:28
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    Project Goals
<p>Main goal of the project was to write an app that will automatically handle updates on Gentoo Linux systems and send notifications with update summaries. More specifically, I wanted to:</p>
<ol>
<li>Simplify the update process for beginners, offering a simpler one-click method.</li>
<li>Minimize time experienced users spend on routine update tasks, decreasing their workload.</li>
<li>Ensure systems remain secure and regularly updated with minimal manual intervention.</li>
<li>Keep users informed of the updates and changes.</li>
<li>Improve the overall Gentoo Linux user experience.</li>
</ol>
Progress
<p>Here is a summary of what was done every week with links to my blog posts.</p>
Week 1
<p>Basic system updater is ready. Also prepared a Docker Compose file to run tests in containers. Available functionality:</p>
<ul>
<li>update security patches</li>
<li>update @world</li>
<li>merge changed configuration files</li>
<li>restart updated services</li>
<li>do a post-update clean up</li>
<li>read elogs</li>
<li>read news</li>
</ul>
<p>Links:</p>
<ul>
<li>Pull requests: #2, #3, #4</li>
<li>Docker tests</li>
</ul>
Week 2
<p>Packaged Python code, created an ebuild and a GitHub Actions workflow that publishes package to PyPI when commit is tagged.</p>
<p>Links:</p>
<ul>
<li>Pull requests: #5</li>
<li>ebuild commit</li>
<li>GitHub Actions workflow</li>
</ul>
Week 3
<p>Fixed issue #7 and answered to issue #8 and fixed bug 908308. Added USE flags to manage dependencies. Improve Bash code stability.</p>
<p>Links:</p>
<ul>
<li>Issues: #7, #8</li>
<li>Bugs: 908308</li>
<li>Pull requests: #6, #9, #10</li>
</ul>
Week 4
<p>Fixed errors in ebuild, replaced USE flags with optfeature for dependency management. Wrote a blog post to introduce my app and posted it on forums. Fixed a bug in <code>--args</code> flag.</p>
<p>Links:</p>
<ul>
<li>Pull requests: #11</li>
<li>request to fix ebuild</li>
<li>Blog post and Forum post</li>
</ul>
Week 5
<p>Received some feedback from forums. Coded much of the parser (<code>--report</code>). Improved container testing environment.</p>
<p>Links:</p>
<ul>
<li>Improved dockerfiles</li>
</ul>
Weeks 6 and 7
<p>Completed parser (<code>--report</code>). Also added disk usage calculation before and after the update. Available functionality:</p>
<ul>
<li>If the update was successful, report will show:
<ul>
<li>updated package names</li>
<li>package versions in the format “old -&gt; new”</li>
<li>USE flags of those packages</li>
<li>disk usage before and after the update</li>
</ul>
</li>
<li>If the emerge pretend has failed, report will show:
<ul>
<li>error type (for now only supports ‘blocked packages’ error)</li>
<li>error details (for blocked package it will show problematic packages)</li>
</ul>
</li>
</ul>
<p>Links:</p>
<ul>
<li>Pull requests: #12, #13</li>
</ul>
Week 8
<p>Add 2 notification methods (<code>--send-reports</code>) &#8211; IRC bot and emails via sendgrid.</p>
<p>Links:</p>
<ul>
<li>Pull requests: #14, #15</li>
</ul>
Week 9-10
<p>Improved CLI argument handling. Experimented with different mobile app UI layouts and backend options. Fixed issue #17. Started working on mobile app UI, decided to use Firebase for backend.</p>
<p>Links:</p>
<ul>
<li>Pull requests: #16</li>
<li>Issues: #17</li>
</ul>
Week 11-12
<p>Completed mobile app (UI + backend). Created a plan to migrate to a custom self-hosted backend based on Django+MongoDB+Nginx in the future. Added <code>--send-reports mobile</code> option to CLI. Available functionality:</p>
<ul>
<li>UI
<ul>
<li>Login screen: Anonymous login</li>
<li>Reports screen: Receive and view reports send from CLI app.</li>
<li>Profile screen: View token, user ID and Sign Out button.</li>
</ul>
</li>
<li>Backend
<ul>
<li>Create anonymous users (Cloud Functions)</li>
<li>Create user tokens (Cloud Functions)</li>
<li>Receive tokens in https requests, verify them, and route to users (Cloud Functions)</li>
<li>Send push notifications (FCM)</li>
<li>Secure database access with Firestore security rules</li>
</ul>
</li>
</ul>
<p>Link:</p>
<ul>
<li>Pull requests: #18</li>
<li>Mobile app repository</li>
</ul>
Final week
<p>Added token encryption with Cloud Functions. Packaged mobile app with Github Actions and published to Google Play Store. Recorded a demo video and wrote gentoo_update User Guide that covers both CLI and mobile app.</p>
<p>Links:</p>
<ul>
<li>Demo video</li>
<li>gentoo_update User Guide</li>
<li>Packaging Github Actions workflow</li>
<li>Google Play link</li>
<li>Release page</li>
</ul>
Project Status
<p>I would say I’m very satisfied with the current state of the project. Almost all tasks were completed from the proposal, and there is a product that can already be used. To summarize, here is a list of deliverables:</p>
<ol>
<li>Source code for gentoo_update CLI app</li>
<li>gentoo_update CLI app ebuild in GURU repository</li>
<li>gentoo_update CLI app package in PyPi</li>
<li>Source code for mobile app</li>
<li>Mobile app for Andoid in APK</li>
<li>Mobile app for Android in Google Play</li>
</ol>
Future Improvements
<p>I plan to add a lot more features to both CLI and mobile apps. Full feature lists can be found in readme’s of both repositories:</p>
<ul>
<li>CLI app upcoming features</li>
<li>mobile app upcoming features</li>
</ul>
Final Thoughts
<p>These 12 weeks felt like a hackathon, where I had to learn new technologies very quickly and create something that works very fast. I faced many challenges and acquired a range of new skills.</p>
<p>Over the course of this project, I coded both Linux CLI applications using Python and Bash, and mobile apps with Flutter and Firebase. To maintain the quality of my work, I tested the code in Docker containers, virtual machines and physical hardware. Additionally, I built and deployed CI/CD pipelines with GitHub Actions to automate packaging. Beyond the technical side, I engaged actively with Gentoo community, utilizing IRC chats and forums. Through these platforms, I addressed and resolved issues on both GitHub and Gentoo Bugs, enriching my understanding and refining my skills.</p>
<p>I also would like to thank my mentor, Andrey Falko, for all his help and support. I wouldn’t have been able to finish this project without his guidance.</p>
<p>In addition, I want to thank Google for providing such a generous opportunity for open source developers to work on bringing forth innovation.</p>
<p>Lastly, I am grateful to Gentoo community for the feedback that’s helped me to improve the project immensely.</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-27" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/27/final-report-automated-gentoo-system-updater/"> <span class="fn" style="color:#000!important;font-size:16px;">Final Report, Automated Gentoo System Updater </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 27, 2023, 16:28
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <h2 id="project-goals">Project Goals</h2>
<p>Main goal of the project was to write an app that will automatically handle updates on Gentoo Linux systems and send notifications with update summaries. More specifically, I wanted to:</p>
<ol>
<li>Simplify the update process for beginners, offering a simpler one-click method.</li>
<li>Minimize time experienced users spend on routine update tasks, decreasing their workload.</li>
<li>Ensure systems remain secure and regularly updated with minimal manual intervention.</li>
<li>Keep users informed of the updates and changes.</li>
<li>Improve the overall Gentoo Linux user experience.</li>
</ol>
<h2 id="progress">Progress</h2>
<p>Here is a summary of what was done every week with links to my blog posts.</p>
<h3 id="week-1httpslabbratnetbloggsoc2023week1"><a href="https://labbrat.net/blog/gsoc2023/week1/">Week 1</a></h3>
<p>Basic system updater is ready. Also prepared a Docker Compose file to run tests in containers. Available functionality:</p>
<ul>
<li>update security patches</li>
<li>update @world</li>
<li>merge changed configuration files</li>
<li>restart updated services</li>
<li>do a post-update clean up</li>
<li>read elogs</li>
<li>read news</li>
</ul>
<p>Links:</p>
<ul>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/2">#2</a>, <a href="https://github.com/Lab-Brat/gentoo_update/pull/3">#3</a>, <a href="https://github.com/Lab-Brat/gentoo_update/pull/4">#4</a>
</li>
<li>Docker <a href="https://github.com/Lab-Brat/gentoo_update/blob/main/tests/compose.yaml">tests</a>
</li>
</ul>
<h3 id="week-2httpslabbratnetbloggsoc2023week2"><a href="https://labbrat.net/blog/gsoc2023/week2/">Week 2</a></h3>
<p>Packaged Python code, created an <strong>ebuild</strong> and a GitHub Actions workflow that publishes package to PyPI when commit is tagged.</p>
<p>Links:</p>
<ul>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/5">#5</a>
</li>
<li>ebuild <a href="https://github.com/Lab-Brat/gentoo_update_ebuild">commit</a>
</li>
<li>GitHub Actions <a href="https://github.com/Lab-Brat/gentoo_update/blob/main/.github/workflows/main.yml">workflow</a>
</li>
</ul>
<h3 id="week-3httpsblogsgentooorggsoc20230617week-3-report-automated-gentoo-system-updater"><a href="https://blogs.gentoo.org/gsoc/2023/06/17/week-3-report-automated-gentoo-system-updater/">Week 3</a></h3>
<p>Fixed issue #7 and answered to issue #8 and fixed bug 908308. Added USE flags to manage dependencies. Improve Bash code stability.</p>
<p>Links:</p>
<ul>
<li>Issues: <a href="https://github.com/Lab-Brat/gentoo_update/issues/7">#7</a>, <a href="https://github.com/Lab-Brat/gentoo_update/issues/8">#8</a>
</li>
<li>Bugs: <a href="https://bugs.gentoo.org/908308">908308</a>
</li>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/6">#6</a>, <a href="https://github.com/Lab-Brat/gentoo_update/pull/9">#9</a>, <a href="https://github.com/Lab-Brat/gentoo_update/pull/10">#10</a>
</li>
</ul>
<h3 id="week-4httpsblogsgentooorggsoc20230625week-4-report-automated-gentoo-system-updater"><a href="https://blogs.gentoo.org/gsoc/2023/06/25/week-4-report-automated-gentoo-system-updater/">Week 4</a></h3>
<p>Fixed errors in <strong>ebuild</strong>, replaced USE flags with <strong>optfeature</strong> for dependency management. Wrote a blog post to introduce my app and posted it on forums. Fixed a bug in <code>--args</code> flag.</p>
<p>Links:</p>
<ul>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/11">#11</a>
</li>
<li>
<a href="https://github.com/gentoo/guru/commit/bfffbe1a4bcd10a5e6a20d3ef314ac31cd00641f">request</a> to fix ebuild</li>
<li>Blog <a href="https://blogs.gentoo.org/gsoc/2023/06/25/gentoo_update-introduction/">post</a> and Forum <a href="https://forums.gentoo.org/viewtopic-p-8793590.html#8793590">post</a>
</li>
</ul>
<h3 id="week-5httpsblogsgentooorggsoc20230702week-5-report-automated-gentoo-system-updater"><a href="https://blogs.gentoo.org/gsoc/2023/07/02/week-5-report-automated-gentoo-system-updater/">Week 5</a></h3>
<p>Received some feedback from forums. Coded much of the parser (<code>--report</code>). Improved container testing environment.</p>
<p>Links:</p>
<ul>
<li>Improved <a href="https://github.com/lab-Brat/gentoo_dockerfiles">dockerfiles</a>
</li>
</ul>
<h3 id="weeks-6-and-7httpsblogsgentooorggsoc20230716week-67-report-automated-gentoo-system-updater"><a href="https://blogs.gentoo.org/gsoc/2023/07/16/week-67-report-automated-gentoo-system-updater/">Weeks 6 and 7</a></h3>
<p>Completed parser (<code>--report</code>). Also added disk usage calculation before and after the update. Available functionality:</p>
<ul>
<li>If the update was successful, report will show:
<ul>
<li>updated package names</li>
<li>package versions in the format “old -&gt; new”</li>
<li>USE flags of those packages</li>
<li>disk usage before and after the update</li>
</ul>
</li>
<li>If the emerge pretend has failed, report will show:
<ul>
<li>error type (for now only supports ‘blocked packages’ error)</li>
<li>error details (for blocked package it will show problematic packages)</li>
</ul>
</li>
</ul>
<p>Links:</p>
<ul>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/12">#12</a>, <a href="https://github.com/Lab-Brat/gentoo_update/pull/13">#13</a>
</li>
</ul>
<h3 id="week-8httpsblogsgentooorggsoc20230723week-8-report-automated-gentoo-system-updater"><a href="https://blogs.gentoo.org/gsoc/2023/07/23/week-8-report-automated-gentoo-system-updater/">Week 8</a></h3>
<p>Add 2 notification methods (<code>--send-reports</code>) – IRC bot and emails via sendgrid.</p>
<p>Links:</p>
<ul>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/14">#14</a>, <a href="https://github.com/Lab-Brat/gentoo_update/pull/15">#15</a>
</li>
</ul>
<h3 id="week-9-10httpsblogsgentooorggsoc20230807week-910-report-automated-gentoo-system-updater"><a href="https://blogs.gentoo.org/gsoc/2023/08/07/week-910-report-automated-gentoo-system-updater/">Week 9-10</a></h3>
<p>Improved CLI argument handling. Experimented with different mobile app UI layouts and backend options. Fixed issue #17. Started working on mobile app UI, decided to use Firebase for backend.</p>
<p>Links:</p>
<ul>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/16">#16</a>
</li>
<li>Issues: <a href="https://github.com/Lab-Brat/gentoo_update/issues/17">#17</a>
</li>
</ul>
<h3 id="week-11-12httpsblogsgentooorggsoc20230820week-1112-report-automated-gentoo-system-updater"><a href="https://blogs.gentoo.org/gsoc/2023/08/20/week-1112-report-automated-gentoo-system-updater/">Week 11-12</a></h3>
<p>Completed mobile app (UI + backend). Created a plan to migrate to a custom self-hosted backend based on Django+MongoDB+Nginx in the future. Added <code>--send-reports mobile</code> option to CLI. Available functionality:</p>
<ul>
<li>UI
<ul>
<li>Login screen: Anonymous login</li>
<li>Reports screen: Receive and view reports send from CLI app.</li>
<li>Profile screen: View token, user ID and Sign Out button.</li>
</ul>
</li>
<li>Backend
<ul>
<li>Create anonymous users (Cloud Functions)</li>
<li>Create user tokens (Cloud Functions)</li>
<li>Receive tokens in https requests, verify them, and route to users (Cloud Functions)</li>
<li>Send push notifications (FCM)</li>
<li>Secure database access with Firestore security rules</li>
</ul>
</li>
</ul>
<p>Link:</p>
<ul>
<li>Pull requests: <a href="https://github.com/Lab-Brat/gentoo_update/pull/18">#18</a>
</li>
<li>Mobile app <a href="https://github.com/Lab-Brat/gentoo_update_flutter">repository</a>
</li>
</ul>
<h3 id="final-week">Final week</h3>
<p>Added token encryption with Cloud Functions. Packaged mobile app with Github Actions and published to Google Play Store. Recorded a demo video and wrote gentoo_update User Guide that covers both CLI and mobile app.</p>
<p>Links:</p>
<ul>
<li>Demo <a href="https://youtu.be/go6SJZBgpgg?si=bgC2xLA22_aeikOE">video</a>
</li>
<li><a href="https://blogs.gentoo.org/gsoc/2023/08/27/gentoo_update-user-guide/">gentoo_update User Guide</a></li>
<li>Packaging Github Actions <a href="https://github.com/Lab-Brat/gentoo_update_flutter/blob/main/.github/workflows/main.yml">workflow</a>
</li>
<li>Google Play <a href="https://play.google.com/store/apps/details?id=net.labbrat.gentoo_update">link</a>
</li>
<li>Release <a href="https://github.com/Lab-Brat/gentoo_update_flutter/releases">page</a>
</li>
</ul>
<h2 id="project-status">Project Status</h2>
<p>I would say I’m very satisfied with the current state of the project. Almost all tasks were completed from the proposal, and there is a product that can already be used. To summarize, here is a list of deliverables:</p>
<ol>
<li>
<a href="https://github.com/Lab-Brat/gentoo_update">Source code</a> for gentoo_update CLI app</li>
<li>gentoo_update CLI app <a href="https://github.com/gentoo/guru/tree/master/app-admin/gentoo_update">ebuild</a> in GURU repository</li>
<li>gentoo_update CLI app package in <a href="https://pypi.org/project/gentoo-update/">PyPi</a>
</li>
<li>
<a href="https://github.com/Lab-Brat/gentoo_update_flutter">Source code</a> for mobile app</li>
<li>Mobile app for Andoid in <a href="https://github.com/Lab-Brat/gentoo_update_flutter/releases/tag/1.0.1">APK</a>
</li>
<li>Mobile app for Android in <a href="https://play.google.com/store/apps/details?id=net.labbrat.gentoo_update">Google Play</a>
</li>
</ol>
<h2 id="future-improvements">Future Improvements</h2>
<p>I plan to add a lot more features to both CLI and mobile apps. Full feature lists can be found in readme’s of both repositories:</p>
<ul>
<li>CLI app upcoming <a href="https://github.com/Lab-Brat/gentoo_update">features</a>
</li>
<li>mobile app upcoming <a href="https://github.com/Lab-Brat/gentoo_update_flutter">features</a>
</li>
</ul>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>These 12 weeks felt like a hackathon, where I had to learn new technologies very quickly and create something that works very fast. I faced many challenges and acquired a range of new skills.</p>
<p>Over the course of this project, I coded both Linux CLI applications using Python and Bash, and mobile apps with Flutter and Firebase. To maintain the quality of my work, I tested the code in Docker containers, virtual machines and physical hardware. Additionally, I built and deployed CI/CD pipelines with GitHub Actions to automate packaging. Beyond the technical side, I engaged actively with Gentoo community, utilizing IRC chats and forums. Through these platforms, I addressed and resolved issues on both GitHub and Gentoo Bugs, enriching my understanding and refining my skills.</p>
<p>I also would like to thank my mentor, Andrey Falko, for all his help and support. I wouldn’t have been able to finish this project without his guidance.</p>
<p>In addition, I want to thank Google for providing such a generous opportunity for open source developers to work on bringing forth innovation.</p>
<p>Lastly, I am grateful to Gentoo community for the feedback that’s helped me to improve the project immensely.</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        

        <div class="row short-view d-none" data-date="2023-08-27" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">gentoo_update User Guide</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 27, 2023, 15:15
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    Introduction
<p>This article will go through the basic usage of <code>gentoo_update</code> CLI tool and the mobile app.</p>
<p>But before that, here is a demo of this project:</p>
<p></p>
gentoo_update CLI App
Installation
<p><code>gentoo_update</code> is available in GURU overlay and in PyPI. Generally, installing the program from GURU overlay is the preferred method, but PyPI will always have the most recent version.</p>
<p>Enable GURU and install with emerge:</p>

<pre><code>eselect repository enable guru
emerge --ask app-admin/gentoo_update
</code></pre>

<p>Alternatively, install from PyPI with pip:</p>

<pre><code>python -m venv .venv_gentoo_update
source .venv_gentoo_update/bin/activate
python -m pip install gentoo_update</code></pre>
Update
<p><code>gentoo_update</code> provides 2 update modes &#8211; full and security. Full mode updates @world, and security mode uses glsa-check to find security patches, and installs them if something is found.</p>
<p>By default, when run without flags security mode is selected:</p>

<pre><code>gentoo-update
</code></pre>

<p>To update @world, run:</p>

<pre><code>gentoo-update --update-mode full
</code></pre>

<p>Full list of available parameters and flags can be accessed with the <code>--help</code> flag. Further examples are detailed in the repository’s readme file.</p>
<p>Once the update concludes, a log file gets generated at <code>/var/log/portage/gentoo_update/log_&lt;date&gt;</code> (or whatever $PORTAGE_LOGDIR is set to). This log becomes the basis for the update report when the <code>--report</code> flag is used, transforming the log details into a structured update report.</p>
Send Report
<p>The update report can be sent through three distinct methods: IRC bot, email, or mobile app.</p>
<p>IRC Bot Method<br>
Begin by registering a user on an IRC server and setting a nickname as outlined in the documentation. After establishing a chat channel for notifications, define the necessary environmental variables and execute the following commands:</p>

<pre><code>export IRC_CHANNEL="#&lt;irc_channel_name&gt;"
export IRC_BOT_NICKNAME="&lt;bot_name&gt;"
export IRC_BOT_PASSWORD="&lt;bot_password&gt;"
gentoo-update --send-report irc
</code></pre>

<p>Email via Sendgrid<br>
To utilize Sendgrid, register for an account and generate an API key). After installing the Sendgrid Python library from GURU, save the API key in the environmental variables and use the commands below:</p>

<pre><code>emerge --ask dev-python/sendgrid
export SENDGRID_TO='recipient@email.com'
export SENDGRID_FROM='sender@email.com'
export SENDGRID_API_KEY='SG.****************'
gentoo-update --send-report email
</code></pre>

<p>Notifications can also be sent via the mobile app. Details on this method will be elaborated in the following section.</p>
<p>&nbsp;</p>
gentoo_update Mobile App
Installation
<p>Mobile app can either be installed from Github or Google Play Store.</p>
<p>Play Store</p>
<p>App can be found by searching &#8216;gentoo_update&#8217; in the Play Store, or by using this link.</p>
<p>Manual Installation<br>
For manual installation on an Android device, download the APK file from<br>
Releases tab on Github. Ensure you’ve enabled installation from Unknown Sources before proceeding.</p>
Usage
<p>The mobile app consists of three screens: Login, Reports, and Profile.</p>
<p>Upon first use, users will see the Login screen. To proceed, select the Anonymous Login button. This action generates an account with a unique user ID and token, essential for the CLI to send reports.</p>
<p>The Reports screen displays all reports sent using a specific token. Each entry shows the update status and report ID. For an in-depth view of any report, simply tap on it.</p>
<p>On the Profile screen, users can find their 8-character token, which needs to be saved as the GU_TOKEN variable on the Gentoo instance. This screen also shows the AES key status, crucial for decrypting the client-side token as it’s encrypted in the database. To log out, tap the Sign Out button.<br>
Note: Since only Anonymous Login is available, once logged out, returning to the same account isn’t possible.</p>
<p>♦</p>
Contacts
<p>Preferred method for getting help or requesting a new feature for both CLI and mobile apps is by creating an issue in Github:</p>
<ul>
<li>gentoo_update CLI issues page</li>
<li>Mobile app issues page</li>
</ul>
<p>Or just contact me directly via labbrat_social@pm.me and IRC. I am in most of the #gentoo IRC groups and my nick is #LabBrat.</p>
Links
<ul>
<li>[Link] &#8211; gentoo_update CLI repository</li>
</ul>
<ul>
<li>[Link] &#8211; Mobile App repository</li>
</ul>

                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-27" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/27/gentoo_update-user-guide/"> <span class="fn" style="color:#000!important;font-size:16px;">gentoo_update User Guide </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 27, 2023, 15:15
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <h2 id="introduction">Introduction</h2>
<p>This article will go through the basic usage of <code>gentoo_update</code> CLI tool and the mobile app.</p>
<p>But before that, here is a demo of this project:</p>
<p></p>
<h2 id="gentoo_update-cli-app">gentoo_update CLI App</h2>
<h3 id="installation">Installation</h3>
<p><code>gentoo_update</code> is available in GURU overlay and in PyPI. Generally, installing the program from GURU overlay is the preferred method, but PyPI will always have the most recent version.</p>
<p>Enable GURU and install with emerge:</p>
<div class="highlight">
<pre><code class="language-bash hljs" data-lang="bash">eselect repository <span class="hljs-built_in">enable</span> guru
emerge --ask app-admin/gentoo_update
</code></pre>
</div>
<p>Alternatively, install from PyPI with pip:</p>
<div class="highlight">
<pre><code class="language-bash hljs" data-lang="bash">python -m venv .venv_gentoo_update
source .venv_gentoo_update/bin/activate
python -m pip install gentoo_update</code></pre>
<h3 id="update">Update</h3>
<p><code>gentoo_update</code> provides 2 update modes – full and security. Full mode updates @world, and security mode uses glsa-check to find security patches, and installs them if something is found.</p>
<p>By default, when run without flags security mode is selected:</p>
<div class="highlight">
<pre><code class="language-bash hljs" data-lang="bash">gentoo-update
</code></pre>
</div>
<p>To update @world, run:</p>
<div class="highlight">
<pre><code class="language-bash hljs" data-lang="bash">gentoo-update --update-mode full
</code></pre>
</div>
<p>Full list of available parameters and flags can be accessed with the <code>--help</code> flag. Further examples are detailed in the repository’s <a href="https://github.com/Lab-Brat/gentoo_update">readme file</a>.</p>
<p>Once the update concludes, a log file gets generated at <code>/var/log/portage/gentoo_update/log_&lt;date&gt;</code> (or whatever $PORTAGE_LOGDIR is set to). This log becomes the basis for the update report when the <code>--report</code> flag is used, transforming the log details into a structured update report.</p>
<h3 id="send-report">Send Report</h3>
<p>The update report can be sent through three distinct methods: IRC bot, email, or mobile app.</p>
<p><strong>IRC Bot Method</strong><br>
Begin by registering a user on an IRC server and setting a nickname as outlined in the <a href="https://libera.chat/guides/registration">documentation</a>. After establishing a chat channel for notifications, define the necessary environmental variables and execute the following commands:</p>
<div class="highlight">
<pre><code class="language-bash hljs" data-lang="bash"><span class="hljs-built_in">export</span> IRC_CHANNEL=<span class="hljs-string">"#&lt;irc_channel_name&gt;"</span>
<span class="hljs-built_in">export</span> IRC_BOT_NICKNAME=<span class="hljs-string">"&lt;bot_name&gt;"</span>
<span class="hljs-built_in">export</span> IRC_BOT_PASSWORD=<span class="hljs-string">"&lt;bot_password&gt;"</span>
gentoo-update --send-report irc
</code></pre>
</div>
<p><strong>Email via Sendgrid</strong><br>
To utilize Sendgrid, register for an account and generate an <a href="https://docs.sendgrid.com/ui/account-and-settings/api-keys">API key</a>). After installing the Sendgrid Python library from GURU, save the API key in the environmental variables and use the commands below:</p>
<div class="highlight">
<pre><code class="language-bash hljs" data-lang="bash">emerge --ask dev-python/sendgrid
<span class="hljs-built_in">export</span> SENDGRID_TO=<span class="hljs-string">'recipient@email.com'</span>
<span class="hljs-built_in">export</span> SENDGRID_FROM=<span class="hljs-string">'sender@email.com'</span>
<span class="hljs-built_in">export</span> SENDGRID_API_KEY=<span class="hljs-string">'SG.****************'</span>
gentoo-update --send-report email
</code></pre>
</div>
<p>Notifications can also be sent via the mobile app. Details on this method will be elaborated in the following section.</p>
<p> </p>
<h2 id="gentoo_update-mobile-app">gentoo_update Mobile App</h2>
<h3 id="installation-1">Installation</h3>
<p>Mobile app can either be installed from Github or Google Play Store.</p>
<p><strong>Play Store</strong></p>
<p>App can be found by searching ‘gentoo_update’ in the Play Store, or by using <a href="https://play.google.com/store/apps/details?id=net.labbrat.gentoo_update">this link</a>.</p>
<p><strong>Manual Installation</strong><br>
For manual installation on an Android device, download the APK file from<br>
<a href="https://github.com/Lab-Brat/gentoo_update_flutter/releases/tag/1.0.1">Releases</a> tab on Github. Ensure you’ve enabled installation from <a href="https://www.applivery.com/docs/mobile-app-distribution/android-unknown-sources/">Unknown Sources</a> before proceeding.</p>
<h3 id="usage">Usage</h3>
<p>The mobile app consists of three screens: Login, Reports, and Profile.</p>
<p>Upon first use, users will see the Login screen. To proceed, select the Anonymous Login button. This action generates an account with a unique user ID and token, essential for the CLI to send reports.</p>
<p>The Reports screen displays all reports sent using a specific token. Each entry shows the update status and report ID. For an in-depth view of any report, simply tap on it.</p>
<p>On the Profile screen, users can find their 8-character token, which needs to be saved as the GU_TOKEN variable on the Gentoo instance. This screen also shows the AES key status, crucial for decrypting the client-side token as it’s encrypted in the database. To log out, tap the Sign Out button.<br>
<strong>Note:</strong> Since only Anonymous Login is available, once logged out, returning to the same account isn’t possible.</p>
<p><img class="wp-image-586 aligncenter" src="http://blogs.gentoo.org/gsoc/files/2023/08/2_screens-300x282.jpg" width="489" height="460"></p>
<h2 id="contacts">Contacts</h2>
<p>Preferred method for getting help or requesting a new feature for both CLI and mobile apps is by creating an issue in Github:</p>
<ul>
<li>gentoo_update CLI <a href="https://github.com/Lab-Brat/gentoo_update/issues">issues page</a>
</li>
<li>Mobile app <a href="https://github.com/Lab-Brat/gentoo_update_flutter/issues">issues page</a>
</li>
</ul>
<p>Or just contact me directly via <a href="mailto:labbrat_social@pm.me">labbrat_social@pm.me</a> and IRC. I am in most of the #gentoo IRC groups and my nick is #LabBrat.</p>
<h2 id="links">Links</h2>
<ul>
<li>[<a href="https://github.com/Lab-Brat/gentoo_update">Link</a>] – gentoo_update CLI repository</li>
</ul>
<ul>
<li>[<a href="https://github.com/Lab-Brat/gentoo_update_flutter">Link</a>] – Mobile App repository</li>
</ul>
</div>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-08-21" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>August 21
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-08-21" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Week 12 report on porting Gentoo packages to modern C</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 21, 2023, 13:49
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>Hello all, hope you&#8217;re doing well. This is my week 12 report for my<br>
project &#8220;Porting Gentoo&#8217;s packages to modern C&#8221;</p>
<p>Similar to last week I took up bugs from the tracker randomly and<br>
patched them, sending patch upstream whenever possible. Unfortunately,<br>
nothing new or interesting.</p>
<p>Also been working with Juippis on masking firefox-bin and rust-bin in<br>
glibc llvm profile, Juippis has for now reverted the commit masking<br>
those bin packages, but likely a proper fix will be committed soon.</p>
<p>Just warping things up for final review. I&#8217;m also in 1:1 contact with<br>
Sam in case there is some major work needed on a particular section of<br>
my project or a package.</p>
<p>And to be honest, it not really much, I&#8217;ve been under the weather a bit<br>
and busy with some IRL stuff.</p>
<p>This week I&#8217;ve some free time which I plan on dedicating to lapac and<br>
fortran bug on llvm profile. With that solved, we will be able to close<br>
a good number of bugs sci package related bugs and also some qemu<br>
related bugs (as that pull some packages like apack and lapack). I&#8217;ll<br>
probably also sit with Sam for this one, hopefully we&#8217;ll be able to calk<br>
something out.</p>
<p>EDIT</p>
<p>I forgot to mention that this is going to be the last week, so I&#8217;ll wrap things up after talking with my mentors. Also will create a separate blog post that will link all of my work throughout the weeks in brief and will be used as the final submission.</p>
<p>Till then see yah!</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-21" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/21/week-12-report-on-porting-gentoo-packages-to-modern-c/"> <span class="fn" style="color:#000!important;font-size:16px;">Week 12 report on porting Gentoo packages to modern C </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 21, 2023, 13:49
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>Hello all, hope you’re doing well. This is my week 12 report for my<br>
project “Porting Gentoo’s packages to modern C”</p>
<p>Similar to last week I took up bugs from the tracker randomly and<br>
patched them, sending patch upstream whenever possible. Unfortunately,<br>
nothing new or interesting.</p>
<p>Also been working with Juippis on masking firefox-bin and rust-bin in<br>
glibc llvm profile, Juippis has for now reverted the commit masking<br>
those bin packages, but likely a proper fix will be committed soon.</p>
<p>Just warping things up for final review. I’m also in 1:1 contact with<br>
Sam in case there is some major work needed on a particular section of<br>
my project or a package.</p>
<p>And to be honest, it not really much, I’ve been under the weather a bit<br>
and busy with some IRL stuff.</p>
<p>This week I’ve some free time which I plan on dedicating to lapac and<br>
fortran bug on llvm profile. With that solved, we will be able to close<br>
a good number of bugs sci package related bugs and also some qemu<br>
related bugs (as that pull some packages like apack and lapack). I’ll<br>
probably also sit with Sam for this one, hopefully we’ll be able to calk<br>
something out.</p>
<p><strong>EDIT</strong></p>
<p>I forgot to mention that this is going to be the last week, so I’ll wrap things up after talking with my mentors. Also will create a separate blog post that will link all of my work throughout the weeks in brief and will be used as the final submission.</p>
<p>Till then see yah!</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-08-20" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>August 20
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-08-20" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Week 11+12 Report, Automated Gentoo System Updater</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 20, 2023, 20:59
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>This article is a summary of all the changes made on Automated Gentoo System Updater project during weeks 11 and 12 of GSoC.</p>
<p>Project is hosted on GitHub ( gentoo_update and mobile app).</p>
Progress on Weeks 11 and 12
<p>During last 2 weeks I’ve completed app UI and Firebase backend. Most of the work is done!</p>
<p>I’m not entirely pleased with how the backend works. In Firebase, I ended up using:</p>
<ul>
<li>Firestore (security rules defined here)</li>
<li>Cloud Functions (defined here)</li>
<li>Cloud Messaging (FCM).</li>
</ul>
<p>After a user authenticates using anonymous login, a token is automatically registered in Firestore. This token is later used by <code>gentoo_update</code> to send reports. Cloud Functions manage the token’s creation. In fact, all database write operations are handled by Cloud Functions, with users having read-only access to the data they’ve created. Here is how to send the report via token:</p>

<pre><code>export GU_TOKEN="&lt;token ID&gt;"
gentoo-update --send-report mobile
</code></pre>

<p>Internally, gentoo-update talks to a Cloud Function. This function checks the token, then saves the report in Firestore for the user to access.</p>
<p>This differs from the original idea, where I didn’t intend to save reports in Firestore. The initial plan was to have the client side listen and let Firebase route report content from the Gentoo system to the app. But this method often missed reports or stored them incorrectly, causing them to vanish from the app. To solve this, I chose to save the reports and tokens, but with encryption.</p>
<p>I’ve came up with a solution to create a custom backend for the app, which users will be to self-host, more about in the Challenges section.</p>
<p>Apart from the web app, I’ve fixed some minor issues in <code>gentoo-update</code> and pushed the latest ebuild version to GURU repository (commit link).</p>
Challenges
<p>While Firebase offers a quick way to set up a backend, it has its drawbacks:</p>
<ul>
<li>Not all its best features are free.</li>
<li>Some of its operations aren’t transparent.</li>
<li>It doesn’t offer self-hosting.</li>
<li>Its rate-limiting and security features aren’t as strong as needed. To tackle these concerns, I’m considering a custom backend using this tech stack: Linux + Docker + Python/Django + MongoDB + Nginx.</li>
</ul>
<p>Here’s a breakdown:</p>
<ul>
<li>Django will serve as the backend, handling tasks similar to Cloud Functions.</li>
<li>MongoDB, a document database, will take Firestore’s place.</li>
<li>Nginx adds extra capabilities for rate-limiting, load balancing, and security checks.</li>
</ul>
<p>If necessary, MongoDB can be swapped out for a relational database because the backend will heavily utilize ORM. The same flexibility applies to Nginx.</p>
<p>A highlight of this approach is that everything can be defined in a Docker Compose file, simplifying self-hosting for users.</p>
Plans for Week 13 (final week ♦)
<p>Here is my plan for the final week of GSoC&#8217;2023:</p>
<ol>
<li>Add encryption to the Firestore. I don’t want any user data to be stored in plain text.</li>
<li>Improve some UI elements and add a pop-up with commands to copy/paste.</li>
<li>Publish mobile app to Playstore.</li>
<li>Write a detailed blog post on how to use the whole thing.</li>
<li>Writa a post on forums.</li>
</ol>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-20" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/20/week-1112-report-automated-gentoo-system-updater/"> <span class="fn" style="color:#000!important;font-size:16px;">Week 11+12 Report, Automated Gentoo System Updater </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 20, 2023, 20:59
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>This article is a summary of all the changes made on <a href="https://wiki.gentoo.org/wiki/Google_Summer_of_Code/2023/Ideas/Automated_Gentoo_system_updater">Automated Gentoo System Updater</a> project during <strong>weeks 11 and 12</strong> of GSoC.</p>
<p>Project is hosted on GitHub ( <a href="https://github.com/Lab-Brat/gentoo_update">gentoo_update</a> and <a href="https://github.com/Lab-Brat/gentoo_update_flutter">mobile app</a>).</p>
<h3 id="progress-on-weeks-11-and-12">Progress on Weeks 11 and 12</h3>
<p>During last 2 weeks I’ve completed app UI and Firebase backend. Most of the work is done!</p>
<p>I’m not entirely pleased with how the backend works. In Firebase, I ended up using:</p>
<ul>
<li>Firestore (security rules defined <a href="https://github.com/Lab-Brat/gentoo_update_flutter/blob/main/firestore.rules">here</a>)</li>
<li>Cloud Functions (defined <a href="https://github.com/Lab-Brat/gentoo_update_flutter/tree/main/functions">here</a>)</li>
<li>Cloud Messaging (FCM).</li>
</ul>
<p>After a user authenticates using anonymous login, a token is automatically registered in Firestore. This token is later used by <code>gentoo_update</code> to send reports. Cloud Functions manage the token’s creation. In fact, all database write operations are handled by Cloud Functions, with users having read-only access to the data they’ve created. Here is how to send the report via token:</p>
<div class="highlight">
<pre><code class="language-bash hljs" data-lang="bash"><span class="hljs-built_in">export</span> GU_TOKEN=<span class="hljs-string">"&lt;token ID&gt;"</span>
gentoo-update --send-report mobile
</code></pre>
</div>
<p>Internally, gentoo-update talks to a Cloud Function. This function checks the token, then saves the report in Firestore for the user to access.</p>
<p>This differs from the original idea, where I didn’t intend to save reports in Firestore. The initial plan was to have the client side listen and let Firebase route report content from the Gentoo system to the app. But this method often missed reports or stored them incorrectly, causing them to vanish from the app. To solve this, I chose to save the reports and tokens, but with encryption.</p>
<p>I’ve came up with a solution to create a custom backend for the app, which users will be to self-host, more about in the <a href="https://labbrat.net/blog/gsoc2023/week11_12/#Challenges">Challenges</a> section.</p>
<p>Apart from the web app, I’ve fixed some minor issues in <code>gentoo-update</code> and pushed the latest ebuild version to GURU repository (<a href="https://github.com/gentoo/guru/commit/62522296f838eec2ca2d1324cb9a436b64f4b877">commit link</a>).</p>
<h3 id="challenges">Challenges</h3>
<p>While Firebase offers a quick way to set up a backend, it has its drawbacks:</p>
<ul>
<li>Not all its best features are free.</li>
<li>Some of its operations aren’t transparent.</li>
<li>It doesn’t offer self-hosting.</li>
<li>Its rate-limiting and security features aren’t as strong as needed. To tackle these concerns, I’m considering a custom backend using this tech stack: Linux + Docker + Python/Django + MongoDB + Nginx.</li>
</ul>
<p>Here’s a breakdown:</p>
<ul>
<li>Django will serve as the backend, handling tasks similar to Cloud Functions.</li>
<li>MongoDB, a document database, will take Firestore’s place.</li>
<li>Nginx adds extra capabilities for rate-limiting, load balancing, and security checks.</li>
</ul>
<p>If necessary, MongoDB can be swapped out for a relational database because the backend will heavily utilize ORM. The same flexibility applies to Nginx.</p>
<p>A highlight of this approach is that everything can be defined in a Docker Compose file, simplifying self-hosting for users.</p>
<h3 id="plans-for-week-13-final-week-">Plans for Week 13 (final week <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f389.png" alt="🎉" class="wp-smiley" style="height: 1em;">)</h3>
<p>Here is my plan for the final week of GSoC’2023:</p>
<ol>
<li>Add encryption to the Firestore. I don’t want any user data to be stored in plain text.</li>
<li>Improve some UI elements and add a pop-up with commands to copy/paste.</li>
<li>Publish mobile app to Playstore.</li>
<li>Write a detailed blog post on how to use the whole thing.</li>
<li>Writa a post on forums.</li>
</ol>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-08-14" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>August 14
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-08-14" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Week 11 report on porting Gentoo packages to modern C</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 14, 2023,  5:30
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>Hello all, hope you&#8217;re doing well. This is my week 11 report for my<br>
project &#8220;Porting Gentoo&#8217;s packages to modern C&#8221;</p>
<p>Similar to last two weeks I took up bugs from the tracker randomly and<br>
patched them, sending patch upstream whenever possible. Unfortunately,<br>
nothing new or interesting.</p>
<p>I&#8217;ve some open PRs at ::gentoo that I would like to work on and get<br>
reviews on from mentor/s.</p>
<p>This coming week is going to be the last week, so I would like to few more bugs and<br>
start working on wrapping things up. However, I don&#8217;t plan on abandoning<br>
my patching work for this week (not even after GSoC) as there is still<br>
lots interesting packages in the tracker.</p>
<p>Till then see yah!</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-14" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/14/week-11-report-on-porting-gentoo-packages-to-modern-c/"> <span class="fn" style="color:#000!important;font-size:16px;">Week 11 report on porting Gentoo packages to modern C </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 14, 2023,  5:30
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>Hello all, hope you’re doing well. This is my week 11 report for my<br>
project “Porting Gentoo’s packages to modern C”</p>
<p>Similar to last two weeks I took up bugs from the tracker randomly and<br>
patched them, sending patch upstream whenever possible. Unfortunately,<br>
nothing new or interesting.</p>
<p>I’ve some open PRs at ::gentoo that I would like to work on and get<br>
reviews on from mentor/s.</p>
<p>This coming week is going to be the last week, so I would like to few more bugs and<br>
start working on wrapping things up. However, I don’t plan on abandoning<br>
my patching work for this week (not even after GSoC) as there is still<br>
lots interesting packages in the tracker.</p>
<p>Till then see yah!</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-08-07" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>August 07
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-08-07" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Week 9+10 Report, Automated Gentoo System Updater</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 07, 2023, 18:24
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>This article is a summary of all the changes made on Automated Gentoo System Updater project during weeks 9 and 10 of GSoC.</p>
<p>Project is hosted on GitHub (gentoo_update and mobile app).</p>
Progress on Weeks 9 and 10
<p>I have finalized app architecture, here are the details:</p>
<p>The app&#8217;s main functionality is to receive notification from the push server. For each user, it will create a unique API token after authentication (there is an Anonymous option). This token will be used by <code>gentoo_update</code> to send the encrypted report to the mobile device using a push server endpoint. Update reports will be kept only on the mobile device, ensuring privacy.</p>
<p>After much discussion, I decided to implement app’s backend in Firebase. Since GSoC is organized by Google, it seems appropriate to use their products for this project. However, future plans include the possibility of implementing a self-hosted web server, so that instead of authentication user will just enter server public IP and port.</p>
<p>Example usage will be something like:</p>
<ol>
<li>Download the app and sign-in.</li>
<li>App will generate a token, 1 token per 1 account.</li>
<li>Save the token into an environmental variable on Gentoo Linux.</li>
<li>Run <code>gentoo_update --send-report mobile</code></li>
<li>Wait until notification arrives on the mobile app.</li>
</ol>
<p>I have also made some progress on the app&#8217;s code. I’ve decided to host it in another repository because it doesn’t require direct access to <code>gentoo_update</code>, and this way it will be easier to manage versions and set up CI/CD.</p>
<p>Splitting tasks for the app into <code>UI</code> and <code>Backend</code> categories was not very efficient in practice, since two are very closely related. Here is what I have done so far:</p>
<ul>
<li>Create an app layout</li>
<li>Set up Firebase backend for the app</li>
<li>Set up database structure for storing tokens</li>
<li>Configure anonymous authentication</li>
<li>UI elements for everything above</li>
</ul>
Challenges
<p>I’m finding it somewhat challenging to get used to Flutter and design an modern-looking app. My comfort zone lies more in coding backend and automation tasks rather than focusing on the intricacies of UI components. Despite these challenges, I am 60% sure that in end app will look half-decent.</p>
Plans for Week 11
<p>After week 11 I plan to have a mechanism to deliver update reports from a Gentoo Linux machine.</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-07" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/07/week-910-report-automated-gentoo-system-updater/"> <span class="fn" style="color:#000!important;font-size:16px;">Week 9+10 Report, Automated Gentoo System Updater </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 07, 2023, 18:24
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>This article is a summary of all the changes made on <a href="https://wiki.gentoo.org/wiki/Google_Summer_of_Code/2023/Ideas/Automated_Gentoo_system_updater">Automated Gentoo System Updater</a> project during <strong>weeks 9 and 10</strong> of GSoC.</p>
<p>Project is hosted on GitHub (<a href="https://github.com/Lab-Brat/gentoo_update">gentoo_update</a> and <a href="https://github.com/Lab-Brat/gentoo_update_flutter">mobile app</a>).</p>
<h3 id="progress-on-week-10">Progress on Weeks 9 and 10</h3>
<p>I have finalized app architecture, here are the details:</p>
<p>The app’s main functionality is to receive notification from the push server. For each user, it will create a unique API token after authentication (there is an Anonymous option). This token will be used by <code>gentoo_update</code> to send the encrypted report to the mobile device using a push server endpoint. Update reports will be kept only on the mobile device, ensuring privacy.</p>
<p>After much discussion, I decided to implement app’s backend in Firebase. Since GSoC is organized by Google, it seems appropriate to use their products for this project. However, future plans include the possibility of implementing a self-hosted web server, so that instead of authentication user will just enter server public IP and port.</p>
<p>Example usage will be something like:</p>
<ol>
<li>Download the app and sign-in.</li>
<li>App will generate a token, 1 token per 1 account.</li>
<li>Save the token into an environmental variable on Gentoo Linux.</li>
<li>Run <code>gentoo_update --send-report mobile</code>
</li>
<li>Wait until notification arrives on the mobile app.</li>
</ol>
<p>I have also made some progress on the app’s code. I’ve decided to host it in another <a href="https://github.com/Lab-Brat/gentoo_update_flutter">repository</a> because it doesn’t require direct access to <code>gentoo_update</code>, and this way it will be easier to manage versions and set up CI/CD.</p>
<p>Splitting tasks for the app into <code>UI</code> and <code>Backend</code> categories was not very efficient in practice, since two are very closely related. Here is what I have done so far:</p>
<ul>
<li>Create an app layout</li>
<li>Set up Firebase backend for the app</li>
<li>Set up database structure for storing tokens</li>
<li>Configure anonymous authentication</li>
<li>UI elements for everything above</li>
</ul>
<h3 id="challenges">Challenges</h3>
<p>I’m finding it somewhat challenging to get used to Flutter and design an modern-looking app. My comfort zone lies more in coding backend and automation tasks rather than focusing on the intricacies of UI components. Despite these challenges, I am 60% sure that in end app will look half-decent.</p>
<h3 id="plans-for-week-11">Plans for Week 11</h3>
<p>After week 11 I plan to have a mechanism to deliver update reports from a Gentoo Linux machine.</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-08-06" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>August 06
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-08-06" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Week 10 report on porting Gentoo packages to modern C</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 06, 2023, 18:53
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>♦</p>
<p>Hello all, I&#8217;m here with my week 10 report of my project &#8220;Porting<br>
gentoo&#8217;s packages to modern C&#8221;</p>
<p>So apart from the usual patching of packages from the tracker the most<br>
significant work done this week is getting GNOME desktop on llvm<br>
profile. But it is to be noted that the packages gui-libs/libhandy,<br>
dev-libs/libgee and sys-libs/libblockdev require gcc fallback<br>
environment. net-dialup/ppp was also on our list but thanks to Sam its<br>
has been patched [0] (and fix sent upstream). I&#8217;m pretty sure that<br>
the same work around would work on musl-llvm profile as well. Overall<br>
point being we now have two DEs on llvm profile, GNOME and MATE.</p>
<p>Another thing to note is currently gui-libs/gtk-4.10.4 require<br>
overriding of LD to bfd and OBJCOPY to gnu objcopy, it is a dependency<br>
for gnome 44.3.</p>
<p>Unfortunately, time is not my friend here and I&#8217;ve got only two weeks<br>
left. I&#8217;ll try fix as many as packages possible in the coming weeks,<br>
starting with the GNOME dependencies.</p>
<p>Meanwhile lot of my upstream patches are merged as well, hope remaining<br>
ones get merged as well, [1][2] to name a few.</p>
<p>Till then, see ya!</p>
<p>[0]: github.com/gentoo/gentoo/pull/32198<br>
[1]: github.com/CruiserOne/Astrolog/pull/20<br>
[2]: github.com/cosmos72/detachtty/pull/6<br>
</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-06" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/06/week-10-report-on-porting-gentoo-packages-to-modern-c/"> <span class="fn" style="color:#000!important;font-size:16px;">Week 10 report on porting Gentoo packages to modern C </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 06, 2023, 18:53
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p><img class="aligncenter wp-image-553 size-large" src="http://blogs.gentoo.org/gsoc/files/2023/08/gnome-llvm-1024x576.png" width="640" height="360"></p>
<p>Hello all, I’m here with my week 10 report of my project “Porting<br>
gentoo’s packages to modern C”</p>
<p>So apart from the usual patching of packages from the tracker the most<br>
significant work done this week is getting GNOME desktop on llvm<br>
profile. But it is to be noted that the packages gui-libs/libhandy,<br>
dev-libs/libgee and sys-libs/libblockdev require gcc fallback<br>
environment. net-dialup/ppp was also on our list but thanks to Sam its<br>
has been patched [0] (and fix sent upstream). I’m pretty sure that<br>
the same work around would work on musl-llvm profile as well. Overall<br>
point being we now have two DEs on llvm profile, GNOME and MATE.</p>
<p>Another thing to note is currently gui-libs/gtk-4.10.4 require<br>
overriding of LD to bfd and OBJCOPY to gnu objcopy, it is a dependency<br>
for gnome 44.3.</p>
<p>Unfortunately, time is not my friend here and I’ve got only two weeks<br>
left. I’ll try fix as many as packages possible in the coming weeks,<br>
starting with the GNOME dependencies.</p>
<p>Meanwhile lot of my upstream patches are merged as well, hope remaining<br>
ones get merged as well, [1][2] to name a few.</p>
<p>Till then, see ya!</p>
<p>[0]: <a href="https://github.com/gentoo/gentoo/pull/32198" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?q=https://github.com/gentoo/gentoo/pull/32198&amp;source=gmail&amp;ust=1691434226149000&amp;usg=AOvVaw2xkFtXcM3H_VGReN2a0lxp">https://github.com/gentoo/gentoo/pull/32198</a><br>
[1]: <a href="https://github.com/CruiserOne/Astrolog/pull/20" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?q=https://github.com/CruiserOne/Astrolog/pull/20&amp;source=gmail&amp;ust=1691434226149000&amp;usg=AOvVaw1IOiK3LWFww-AH5iDolNU5">https://github.com/CruiserOne/Astrolog/pull/20</a><br>
[2]: <a href="https://github.com/cosmos72/detachtty/pull/6" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?q=https://github.com/cosmos72/detachtty/pull/6&amp;source=gmail&amp;ust=1691434226149000&amp;usg=AOvVaw04-audAtz5vQBzpakl3AD1">https://github.com/cosmos72/detachtty/pull/6</a><span style="color: #888888;"><br>
</span></p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-08-02" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>August 02
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-08-02" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Weekly report 9, LLVM-libc</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      August 02, 2023,  1:32
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>Hi! This week I&#8217;ve pretty much finished the work on LLVM/Clang support<br>
for Crossdev and LLVM-libc ebuild(s). I have sent PRs for Crossdev and<br>
related ebuild changes here:</p>
<p>github.com/gentoo/crossdev/pull/10<br>
github.com/gentoo/gentoo/pull/32136<br>
This PR includes changes for compiler-rt which are always needed for<br>
Clang crossdev, regardless of libc. There are also changes to musl,<br>
kernel-2.eclass (for linux-headers), and a new eclass, cross.eclass.</p>
<p>I made a gentoo.git branch that has LLVM-libc, libc-hdrgen ebuilds and a<br>
gnuconfig patch to support<br>
LLVM-libc. github.com/gentoo/gentoo/compare/master&#8230;alfredfo:gentoo:gentoo-llvm-libc. I<br>
want to merge Crossdev changes and ebuilds before merging<br>
this. Previously all autotools based projects would fail to configure on<br>
LLVM-libc because there was no gnuconfig entry for it.</p>
<p>I have also solved the problem from last week not being able to compile SCUDO<br>
into LLVM-libc directly. This was caused by two things, 1) LLVM-libc<br>
only checked for compiler-rt in LLVM_ENABLE_PROJECTS, not<br>
LLVM_ENABLE_RUNTIMES which is needed for using &#8220;llvm-project/runtimes&#8221;<br>
as root source directory (&#8220;Runtimes build&#8221;).<br>
Fix commit:<br>
github.com/llvm/llvm-project/commit/fe9c3c786837de74dc936f8994cd5a53dd8ee708<br>
2) Many compiler-rt configure tests would fail because of LLVM-libc not<br>
supporting dynamic linking, and therefore disable the build of<br>
SCUDO. This was fixed by passing<br>
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY. So now I no longer need<br>
to manually compile the source files and append object files into<br>
libc.a, yay!</p>
<p>Now I will continue to fix packages for using LLVM-libc Crossdev, or<br>
more likely, add needed functionality into LLVM-libc. I will of course<br>
also fix any comments I get on my PRs.</p>
<p>&#8212;<br>
catcream</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-08-02" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/08/02/weekly-report-9-llvm-libc/"> <span class="fn" style="color:#000!important;font-size:16px;">Weekly report 9, LLVM-libc </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            August 02, 2023,  1:32
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>Hi! This week I’ve pretty much finished the work on LLVM/Clang support<br>
for Crossdev and LLVM-libc ebuild(s). I have sent PRs for Crossdev and<br>
related ebuild changes here:</p>
<p>https://github.com/gentoo/crossdev/pull/10<br>
https://github.com/gentoo/gentoo/pull/32136<br>
This PR includes changes for compiler-rt which are always needed for<br>
Clang crossdev, regardless of libc. There are also changes to musl,<br>
kernel-2.eclass (for linux-headers), and a new eclass, cross.eclass.</p>
<p>I made a gentoo.git branch that has LLVM-libc, libc-hdrgen ebuilds and a<br>
gnuconfig patch to support<br>
LLVM-libc. https://github.com/gentoo/gentoo/compare/master…alfredfo:gentoo:gentoo-llvm-libc. I<br>
want to merge Crossdev changes and ebuilds before merging<br>
this. Previously all autotools based projects would fail to configure on<br>
LLVM-libc because there was no gnuconfig entry for it.</p>
<p>I have also solved the problem from last week not being able to compile SCUDO<br>
into LLVM-libc directly. This was caused by two things, 1) LLVM-libc<br>
only checked for compiler-rt in LLVM_ENABLE_PROJECTS, not<br>
LLVM_ENABLE_RUNTIMES which is needed for using “llvm-project/runtimes”<br>
as root source directory (“Runtimes build”).<br>
Fix commit:<br>
https://github.com/llvm/llvm-project/commit/fe9c3c786837de74dc936f8994cd5a53dd8ee708<br>
2) Many compiler-rt configure tests would fail because of LLVM-libc not<br>
supporting dynamic linking, and therefore disable the build of<br>
SCUDO. This was fixed by passing<br>
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY. So now I no longer need<br>
to manually compile the source files and append object files into<br>
libc.a, yay!</p>
<p>Now I will continue to fix packages for using LLVM-libc Crossdev, or<br>
more likely, add needed functionality into LLVM-libc. I will of course<br>
also fix any comments I get on my PRs.</p>
<p>—<br>
catcream</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-07-30" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>July 30
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-07-30" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Week 9 report on porting Gentoo packages to modern C</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      July 30, 2023, 18:31
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>Hello all, hope you&#8217;re doing well. This is my week 9 report for my<br>
project &#8220;Porting Gentoo&#8217;s packages to modern C&#8221;</p>
<p>Similar to last week, I picked up bugs at random and started submitting<br>
patches. But this time I made sure to check out the upstream and send in<br>
patches whenever possible, if it turned out to be difficult or I<br>
couldn&#8217;t find upstream I made sure to make a note about it in the PR<br>
either via commit message or through a separate comment. This way it&#8217;ll<br>
help my Sam keep track of things and my progress.</p>
<p>Apart from that nothing new or interesting unfortunately.</p>
<p>Coming next week the plan is the same, pick up more bugs and send in<br>
PRs, both in ::gentoo and upstream whenever possible. I also have some<br>
free time coming week, so plan to make up for lost time during my sick<br>
days in the coming week, as there still lots of packages that require<br>
patching.</p>
<p>I would like to note here, that I made an extra blog post last week<br>
about setting testing environment using lxc and the knowledge about<br>
using gentoo&#8217;s stage-3 tarballs to create custom lxc gentoo images. I<br>
don&#8217;t really expect anyone following it or using it, mainly put that up<br>
for future reference for myself.</p>
<p>Till then, see ya!</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-07-30" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/07/30/week-9-report-on-porting-gentoo-packages-to-modern-c/"> <span class="fn" style="color:#000!important;font-size:16px;">Week 9 report on porting Gentoo packages to modern C </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            July 30, 2023, 18:31
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>Hello all, hope you’re doing well. This is my week 9 report for my<br>
project “Porting Gentoo’s packages to modern C”</p>
<p>Similar to last week, I picked up bugs at random and started submitting<br>
patches. But this time I made sure to check out the upstream and send in<br>
patches whenever possible, if it turned out to be difficult or I<br>
couldn’t find upstream I made sure to make a note about it in the PR<br>
either via commit message or through a separate comment. This way it’ll<br>
help my Sam keep track of things and my progress.</p>
<p>Apart from that nothing new or interesting unfortunately.</p>
<p>Coming next week the plan is the same, pick up more bugs and send in<br>
PRs, both in ::gentoo and upstream whenever possible. I also have some<br>
free time coming week, so plan to make up for lost time during my sick<br>
days in the coming week, as there still lots of packages that require<br>
patching.</p>
<p>I would like to note here, that I made an extra blog post last week<br>
about setting testing environment using lxc and the knowledge about<br>
using gentoo’s stage-3 tarballs to create custom lxc gentoo images. I<br>
don’t really expect anyone following it or using it, mainly put that up<br>
for future reference for myself.</p>
<p>Till then, see ya!</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-07-29" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>July 29
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-07-29" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Genkernel in 2023</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Maciej Barć (xgqt)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      July 29, 2023, 17:10
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>I really wanted to look into the new kernel building solutions for Gentoo and maybe migrate to dracut, but last time I tried, ~1.5 years ago, the initreamfs was now working for me.</p>

<p>And now in 2023 I&rsquo;m still running genkernel for my personal boxes as well as other servers running Gentoo.</p>

<p>I guess some short term solutions really become defined tools :P</p>

<p>So this is how I rebuild my kernel nowadays:</p>

<ol>
 <li>
  <p>Copy old config</p>
  
   
    
     
      
       
        
         <pre>1
2</pre>
       
        
         <pre>cd /usr/src
cp linux-6.1.38-gentoo/.config linux-6.1.41-gentoo/
</pre>

</li>
 <li>
  <p>Remove old kernel build directories</p>
  
   
    
     
      
       
        
         <pre>1</pre>
       
        
         <pre>rm -r linux-6.1.31-gentoo
</pre>

</li>
 <li>
  <p>Run initial preparation</p>
  
   
    
     
      
       
        
         <pre>1</pre>
       
        
         <pre>( eselect kernel set 1 &amp;&amp; cd /usr/src/linux &amp;&amp; make olddefconfig )
</pre>

</li>
 <li>
  <p>Call genkernel</p>
  
   
    
     
      
       
        
         <pre> 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12</pre>
       
        
         <pre>genkernel                                                       \
    --no-menuconfig                                             \
    --no-clean                                                  \
    --no-clear-cachedir                                         \
    --no-cleanup                                                \
    --no-mrproper                                               \
    --lvm                                                       \
    --luks                                                      \
    --mdadm                                                     \
    --nfs                                                       \
    --kernel-localversion="-$(hostname)-$(date &#39;+%Y.%m.%d&#39;)"    \
    all
</pre>

</li>
 <li>
  <p>Rebuild the modules</p>
  <p>If in your <code>/etc/genkernel.conf</code> you have <code>MODULEREBUILD</code> turned off, then also call emerge:</p>
  
   
    
     
      
       
        
         <pre>1</pre>
       
        
         <pre>emerge -1 @module-rebuild
</pre>

</li></ol>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-07-29" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://xgqt.gitlab.io//blog/posts/2023/07/29/genkernel-in-2023/?utm_source=gentoo&utm_medium=Atom"> <span class="fn" style="color:#000!important;font-size:16px;">Genkernel in 2023 </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> xgqt (xgqt
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            July 29, 2023, 17:10
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://xgqt.gitlab.io/blog/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>I really wanted to look into the new kernel building solutions for Gentoo and maybe migrate to dracut, but last time I tried, ~1.5 years ago, the initreamfs was now working for me.</p>

<p>And now in 2023 I’m still running genkernel for my personal boxes as well as other servers running Gentoo.</p>

<p>I guess some short term solutions really become defined tools :P</p>

<p>So this is how I rebuild my kernel nowadays:</p>

<ol>
 <li>
  <p>Copy old config</p>
  <div class="brush: shell">
   <div class="source">
    <table class="sourcetable">
     <tbody>
      <tr>
       <td class="linenos">
        <div class="linenodiv">
         <pre><span class="normal">1</span>
<span class="normal">2</span></pre>
</div>
</td>
       <td class="code">
        <div>
         <pre><span></span><span class="nb">cd</span><span class="w"> </span>/usr/src
cp<span class="w"> </span>linux-6.1.38-gentoo/.config<span class="w"> </span>linux-6.1.41-gentoo/
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>
</li>
 <li>
  <p>Remove old kernel build directories</p>
  <div class="brush: shell">
   <div class="source">
    <table class="sourcetable">
     <tbody>
      <tr>
       <td class="linenos">
        <div class="linenodiv">
         <pre><span class="normal">1</span></pre>
</div>
</td>
       <td class="code">
        <div>
         <pre><span></span>rm<span class="w"> </span>-r<span class="w"> </span>linux-6.1.31-gentoo
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>
</li>
 <li>
  <p>Run initial preparation</p>
  <div class="brush: shell">
   <div class="source">
    <table class="sourcetable">
     <tbody>
      <tr>
       <td class="linenos">
        <div class="linenodiv">
         <pre><span class="normal">1</span></pre>
</div>
</td>
       <td class="code">
        <div>
         <pre><span></span><span class="o">(</span><span class="w"> </span>eselect<span class="w"> </span>kernel<span class="w"> </span><span class="nb">set</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/usr/src/linux<span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span>make<span class="w"> </span>olddefconfig<span class="w"> </span><span class="o">)</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>
</li>
 <li>
  <p>Call genkernel</p>
  <div class="brush: shell">
   <div class="source">
    <table class="sourcetable">
     <tbody>
      <tr>
       <td class="linenos">
        <div class="linenodiv">
         <pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span></pre>
</div>
</td>
       <td class="code">
        <div>
         <pre><span></span>genkernel<span class="w">                                                       </span><span class="se">\</span>
<span class="w">    </span>--no-menuconfig<span class="w">                                             </span><span class="se">\</span>
<span class="w">    </span>--no-clean<span class="w">                                                  </span><span class="se">\</span>
<span class="w">    </span>--no-clear-cachedir<span class="w">                                         </span><span class="se">\</span>
<span class="w">    </span>--no-cleanup<span class="w">                                                </span><span class="se">\</span>
<span class="w">    </span>--no-mrproper<span class="w">                                               </span><span class="se">\</span>
<span class="w">    </span>--lvm<span class="w">                                                       </span><span class="se">\</span>
<span class="w">    </span>--luks<span class="w">                                                      </span><span class="se">\</span>
<span class="w">    </span>--mdadm<span class="w">                                                     </span><span class="se">\</span>
<span class="w">    </span>--nfs<span class="w">                                                       </span><span class="se">\</span>
<span class="w">    </span>--kernel-localversion<span class="o">=</span><span class="s2">"-</span><span class="k">$(</span>hostname<span class="k">)</span><span class="s2">-</span><span class="k">$(</span>date<span class="w"> </span><span class="s1">'+%Y.%m.%d'</span><span class="k">)</span><span class="s2">"</span><span class="w">    </span><span class="se">\</span>
<span class="w">    </span>all
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>
</li>
 <li>
  <p>Rebuild the modules</p>
  <p>If in your <code>/etc/genkernel.conf</code> you have <code>MODULEREBUILD</code> turned off, then also call emerge:</p>
  <div class="brush: shell">
   <div class="source">
    <table class="sourcetable">
     <tbody>
      <tr>
       <td class="linenos">
        <div class="linenodiv">
         <pre><span class="normal">1</span></pre>
</div>
</td>
       <td class="code">
        <div>
         <pre><span></span>emerge<span class="w"> </span>-1<span class="w"> </span>@module-rebuild
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>
</li>
</ol>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-07-24" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>July 24
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-07-24" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">Weekly report 8, LLVM libc</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Gentoo Google Summer of Code (GSoC)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      July 24, 2023, 23:21
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    <p>Hi! This (and last week) I&#8217;ve spent my time polishing the LLVM/Clang<br>
crossdev work. I have also created ebuilds for llvm-libc, libc-hdrgen<br>
and also the SCUDO allocator. But I will probably bake SCUDO into the<br>
llvm-libc ebuild instead actually.</p>
<p>One thing I have also made is a cross eclass that handles cross<br>
compilation, instead of having the same logic copy-pasted in all<br>
ebuilds. To differentiate a &#8220;normal&#8221; crossdev package and LLVM/Clang<br>
crossdev I decided to use &#8220;cross_llvm-${CTARGET}&#8221; as package category<br>
name. This is necessary since you need some way to tell the ebuild about<br>
using LLVM for cross. My initial idea was to handle all this in the<br>
crossdev script, but crossdev ebuilds are self-contained, and you can do<br>
something like &#8220;emerge cross_llvm-gentoo-linux-llvm/llvm-libc&#8221; and it<br>
will do the right thing without running emerge from crossdev. Hence I<br>
need to handle cross compilation in the ebuilds themselves, using the<br>
eclass. Me and sam are not sure if a new eclass is the right thing to<br>
do but I will continue with it until I get some more thoughts as we can<br>
just inline everything later without wasting any work.</p>
<p>I feel pretty much done now except for baking SCUDO directly into the<br>
llvm-libc ebuild. Actually it is very simple to do but I got some issues<br>
with libstdc++ when using llvm/ as root source directory for the libc<br>
build, which is necessary to use when compiling SCUDO. Previously I used<br>
runtimes/ as root directory, and that worked without issue. Currently to<br>
work around this you can just compile the source files in<br>
llvm-project/compiler-rt/lib/scudo/standalone and append the object<br>
files into libc.a. LLVM libc then just works with crossdev and you<br>
can compile things with the emerge wrapper as usual, but currently a lot<br>
of autotools things break due to me not having specified gnuconfig for<br>
llvm-libc yet.</p>
<p>I had a lot of trouble last week with sonames when doing an aarch64 musl<br>
crossdev setup and running binaries with qemu-user, however it turned<br>
out it was just a warning and it worked after setting LD_LIBRARY_PATH as<br>
envvar to qemu-user. I spent a loong time on this.</p>
<p>Currently I will need to upstream changes to compiler-rt ebuild, musl<br>
llvm-libc ebuild, libc-hdrgen, cross.eclass, and of course crossdev.</p>
<p>Next week I will send the changes upstream for review and continue work<br>
on LLVM libc, most likely simple packages like ed, and then try to get<br>
the missing pieces upstreamed to LLVM libc. fileno() is definitely<br>
needed for ed.</p>
<p>Last week I did not write a blog post as I was in &#8220;bug hell&#8221; and worked<br>
on a lot of small things at once and thought &#8220;if I just finish this I<br>
can write a good report&#8221;, and then wednesday came, and I decided to just<br>
do an overview of all my work for this weeks&#8217; blog instead ♦</p>
<p>&#8211; &#8212;<br>
catcream</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-07-24" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://blogs.gentoo.org/gsoc/2023/07/24/weekly-report-8-llvm-libc/"> <span class="fn" style="color:#000!important;font-size:16px;">Weekly report 8, LLVM libc </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> GSoC (gsoc
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            July 24, 2023, 23:21
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://blogs.gentoo.org/gsoc/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <p>Hi! This (and last week) I’ve spent my time polishing the LLVM/Clang<br>
crossdev work. I have also created ebuilds for llvm-libc, libc-hdrgen<br>
and also the SCUDO allocator. But I will probably bake SCUDO into the<br>
llvm-libc ebuild instead actually.</p>
<p>One thing I have also made is a cross eclass that handles cross<br>
compilation, instead of having the same logic copy-pasted in all<br>
ebuilds. To differentiate a “normal” crossdev package and LLVM/Clang<br>
crossdev I decided to use “cross_llvm-${CTARGET}” as package category<br>
name. This is necessary since you need some way to tell the ebuild about<br>
using LLVM for cross. My initial idea was to handle all this in the<br>
crossdev script, but crossdev ebuilds are self-contained, and you can do<br>
something like “emerge cross_llvm-gentoo-linux-llvm/llvm-libc” and it<br>
will do the right thing without running emerge from crossdev. Hence I<br>
need to handle cross compilation in the ebuilds themselves, using the<br>
eclass. Me and sam are not sure if a new eclass is the right thing to<br>
do but I will continue with it until I get some more thoughts as we can<br>
just inline everything later without wasting any work.</p>
<p>I feel pretty much done now except for baking SCUDO directly into the<br>
llvm-libc ebuild. Actually it is very simple to do but I got some issues<br>
with libstdc++ when using llvm/ as root source directory for the libc<br>
build, which is necessary to use when compiling SCUDO. Previously I used<br>
runtimes/ as root directory, and that worked without issue. Currently to<br>
work around this you can just compile the source files in<br>
llvm-project/compiler-rt/lib/scudo/standalone and append the object<br>
files into libc.a. LLVM libc then just works with crossdev and you<br>
can compile things with the emerge wrapper as usual, but currently a lot<br>
of autotools things break due to me not having specified gnuconfig for<br>
llvm-libc yet.</p>
<p>I had a lot of trouble last week with sonames when doing an aarch64 musl<br>
crossdev setup and running binaries with qemu-user, however it turned<br>
out it was just a warning and it worked after setting LD_LIBRARY_PATH as<br>
envvar to qemu-user. I spent a loong time on this.</p>
<p>Currently I will need to upstream changes to compiler-rt ebuild, musl<br>
llvm-libc ebuild, libc-hdrgen, cross.eclass, and of course crossdev.</p>
<p>Next week I will send the changes upstream for review and continue work<br>
on LLVM libc, most likely simple packages like ed, and then try to get<br>
the missing pieces upstreamed to LLVM libc. fileno() is definitely<br>
needed for ed.</p>
<p>Last week I did not write a blog post as I was in “bug hell” and worked<br>
on a lot of small things at once and thought “if I just finish this I<br>
can write a good report”, and then wednesday came, and I decided to just<br>
do an overview of all my work for this weeks’ blog instead <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em;"></p>
<p>– —<br>
catcream</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        
        
          <div class="page-header article-view mt-5" data-date="2023-07-15" data-location="planet" style="border-bottom: none!important;padding-bottom: 0px!important;">
            <h1>July 15
              <small class="text-muted">2023 </small></h1>
          </div>
        

        <div class="row short-view d-none" data-date="2023-07-15" data-location="planet" style="margin-bottom:35px;">
          <div class="col-sm-2 pr-1">
            <img class="float-right" src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f?s=200&d=https%3A%2F%2Fwiki.gentoo.org%2Fimages%2Fthumb%2Fc%2Fc3%2FRipples-larry.svg%2F240px-Ripples-larry.svg.png" style="width:75%;border-radius: 6px;margin-top:5px;"/>
          </div>
          <div class="col-sm-9">
            <div class="card" style="cursor:pointer;">
              <div class="card-body">
                <div class="mb-1"><h3 style="font-size:1.1rem;font-weight:700;margin-bottom:4px;">ELisp ebuilds good practices</h3>
                </div>
                <div class="mb-1 text-muted" style="">
                  <span style="margin-right:2px;">
                    Maciej Barć (xgqt)
                  </span>
                  <span style="">•</span>
                  <span style="font-weight: normal;margin-left:2px;">
                      July 15, 2023, 19:25
                  </span>
                </div>
                <div class="text-muted" style="height:63px;overflow-y: hidden;">
                  
                    Check load path

<p>Some Elisp package compilation failures are caused by not setting the loadpath correctly. It mostly happens when you compile source from a directory that is not the current working directory. For example:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>elisp-compile elisp/*.el
</pre>



<p>In most cases you can <code>cd</code> or override the <code>S</code> variable to set it to location where ELisp source resides.</p>

<p>But in other cases you can append to load path the directory with source, see:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>BYTECOMPFLAGS="${BYTECOMPFLAGS} -L elisp" elisp-compile elisp/*.el
</pre>



Do not rename auto-generated autoload file

<p><code>elisp-make-autoload-file</code> allows to name the generated autoload file. For sake of easier debugging and writing Gentoo <code>SITEFILE</code>s, please do not rename the generated file.</p>

<p>The name of that file should always be <code>${PN}-autoloads.el</code>.</p>

Use new elisp-enable-tests function

<p><code>elisp-enable-tests</code> allows to set up <code>IUSE</code>, <code>RESTRICT</code>, <code>BDEPEND</code> and the test runner function for running tests with the specified test runner.</p>

<p>The 1st (<code>test-runner</code>) argument must be one of:</p>

<ul>
 <li><code>buttercup</code> &mdash; for <code>buttercup</code> provided via <code>app-emacs/buttercup</code>,</li>
 <li><code>ert-runner</code> &mdash; for <code>ert-runner</code> provided via <code>app-emacs/ert-runner</code>,</li>
 <li><code>ert</code> &mdash; for ERT, the built-in GNU Emacs test utility.</li></ul>

<p>The 2nd argument is the directory where test are located, the leftover arguments are passed to the selected test runner.</p>

<p>Example:</p>


 
  
   
    
     
      
       <pre> 1
 2
 3
 4
 5
 6
 7
 8
 9
10</pre>
     
      
       <pre>EAPI=8

inherit elisp

# Other package settings ...

SITEFILE="50${PN}-gentoo.el"
DOCS=( README.md )

elisp-enable-tests buttercup test
</pre>



Remove empty SITEFILEs

<p>Recently a feature was added to <code>elisp.eclass</code> that will cause build process to generate the required <code>SITEFILE</code> with boilerplate code if it does not exist.</p>

<p>So if your <code>SITEFILE</code> looked like this:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>(add-to-list &#39;load-path "@SITELISP@")
</pre>



<p>&hellip; then, you can just remove that file.</p>

<p>But remember to keep the <code>SITEFILE</code> variable inside your ebuild:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>SITEFILE="50${PN}-gentoo.el"
</pre>



Remove pkg.el files

<p>The <code>*-pkg.el</code> files are useless to Gentoo distribution model of Emacs Lisp packages and should be removed. It is as simple as adding this line to a ebuild:</p>


 
  
   
    
     
      
       <pre>1</pre>
     
      
       <pre>ELISP_REMOVE="${PN}-pkg.el"
</pre>



<p>Beware that some packages will try to find their <code>${PN}-pkg.el</code> file, but in most cases this will show up in failing package tests.</p>

Use official repository

<p>It is tedious to repackage Elpa tarballs, so use the official upstream even if you have to snapshot a specific commit.</p>

<p>To snapshot GitHub repos you would generally use this code:</p>


 
  
   
    
     
      
       <pre> 1
 2
 3
 4
 5
 6
 7
 8
 9
10</pre>
     
      
       <pre># First check if we have the correct version to prevent
# autobumping package version without changing the commit.
[[ ${PV} == *_p20220325 ]] &amp;&amp; COMMIT=65c496d3d1d1298345beb9845840067bffb2ffd8

# Use correct URL that supports snapshots.
SRC_URI="github.com/domtronn/${PN}/archive/${COMMIT}.tar.gz
    -&gt; ${P}.tar.gz"

# Override the temporary build directory variable.
S="${WORKDIR}"/${PN}-${COMMIT}
</pre>



Include live version support

<p>We do not want to be worse than the Melpa unstable :D</p>

<p>So, why not allow the given package to be used live?</p>

<p>Even if you do not push the live package to the overlay, please include support for it.</p>


 
  
   
    
     
      
       <pre>1
2
3
4
5
6
7
8</pre>
     
      
       <pre>if [[ ${PV} == *9999* ]] ; then
    inherit git-r3
    EGIT_REPO_URI="github.com/example/${PN}.git"
else
    SRC_URI="github.com/example/${PN}/archive/${PV}.tar.gz
        -&gt; ${P}.tar.gz"
    KEYWORDS="~amd64 ~x86"
fi
</pre>



Ask for tags

<p>Git is good, git tags are good. In case if upstream does not tag their package or just forgets to, kindly ask them to create a git tag when bumping Emacs package versions.</p>
                  
                </div>

              </div>
            </div>
          </div>
          <div class="col-sm-1"></div>
        </div>

        <div class="row">
          <div class="col-sm-12">
            <div class="card article-view mt-2" data-date="2023-07-15" data-location="planet" style="margin-top:20px;">
              <div class="card-body px-5">
                <div class="row mb-3 mt-3">
                  <div class="col-sm-11">
                    <div class="row">
                      <div class="col-sm-1" style="">
                        <img src="https://www.gravatar.com/avatar/bffdcbbb8835c4081a88052c7b4a785f" style="width:40px;border-radius: 6px;margin-top:5px;"/>
                      </div>
                      <div class="col-sm-11" style="padding-left:0px;">
                        <div class="col-sm-12" style="margin-bottom:1px;padding-left:15px;">
                        <span style="color:#000!important;">
                          <b><span class="vcard"><a href="https://xgqt.gitlab.io//blog/posts/2023/07/15/elisp-ebuilds-good-practices/?utm_source=gentoo&utm_medium=Atom"> <span class="fn" style="color:#000!important;font-size:16px;">ELisp ebuilds good practices </span></a></span></b>
                        </span>
                        </div>
                        <div class="col-sm-12" style="padding-left:15px;">
                          <span style="margin-right:2px;">
                            <a style="color:#505050; font-weight: normal;" href="#c0"> xgqt (xgqt
                              )</a>
                          </span>
                          <span style="color:#505050;">•</span>
                          <span style="color:#505050; font-weight: normal;margin-left:2px;">
                            July 15, 2023, 19:25
                          </span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1">
                    <div class="row">
                      <div class="col-sm-12" style="text-align: right;">
                        <span>
                          <a href="https://xgqt.gitlab.io/blog/" class="btn btn-default btn-xs" style="background:transparent;color:#505050;border:none;"><i class="fa fa-lg fa-home" aria-hidden="true"></i></a>
                        </span>
                      </div>
                      <div class="col-sm-12" style="text-align: right;">
                        <span class="" style="color:#505050!important;">  </span>
                      </div>
                    </div>
                  </div>
                </div>

                
                  <h1 id="check-load-path">Check load path</h1>

<p>Some Elisp package compilation failures are caused by not setting the loadpath correctly. It mostly happens when you compile source from a directory that is not the current working directory. For example:</p>

<div class="brush: bash">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span>elisp-compile<span class="w"> </span>elisp/*.el
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>In most cases you can <code>cd</code> or override the <code>S</code> variable to set it to location where ELisp source resides.</p>

<p>But in other cases you can append to load path the directory with source, see:</p>

<div class="brush: bash">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="nv">BYTECOMPFLAGS</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">BYTECOMPFLAGS</span><span class="si">}</span><span class="s2"> -L elisp"</span><span class="w"> </span>elisp-compile<span class="w"> </span>elisp/*.el
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h1 id="do-not-rename-auto-generated-autoload-file">Do not rename auto-generated autoload file</h1>

<p><code>elisp-make-autoload-file</code> allows to name the generated autoload file. For sake of easier debugging and writing Gentoo <code>SITEFILE</code>s, please do not rename the generated file.</p>

<p>The name of that file should always be <code>${PN}-autoloads.el</code>.</p>

<h1 id="use-new-elisp-enable-tests-function">Use new elisp-enable-tests function</h1>

<p><code>elisp-enable-tests</code> allows to set up <code>IUSE</code>, <code>RESTRICT</code>, <code>BDEPEND</code> and the test runner function for running tests with the specified test runner.</p>

<p>The 1st (<code>test-runner</code>) argument must be one of:</p>

<ul>
 <li>
<code>buttercup</code> — for <code>buttercup</code> provided via <code>app-emacs/buttercup</code>,</li>
 <li>
<code>ert-runner</code> — for <code>ert-runner</code> provided via <code>app-emacs/ert-runner</code>,</li>
 <li>
<code>ert</code> — for ERT, the built-in GNU Emacs test utility.</li>
</ul>

<p>The 2nd argument is the directory where test are located, the leftover arguments are passed to the selected test runner.</p>

<p>Example:</p>

<div class="brush: bash">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="nv">EAPI</span><span class="o">=</span><span class="m">8</span>

inherit<span class="w"> </span>elisp

<span class="c1"># Other package settings ...</span>

<span class="nv">SITEFILE</span><span class="o">=</span><span class="s2">"50</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">-gentoo.el"</span>
<span class="nv">DOCS</span><span class="o">=(</span><span class="w"> </span>README.md<span class="w"> </span><span class="o">)</span>

elisp-enable-tests<span class="w"> </span>buttercup<span class="w"> </span><span class="nb">test</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h1 id="remove-empty-sitefiles">Remove empty SITEFILEs</h1>

<p>Recently a feature was added to <code>elisp.eclass</code> that will cause build process to generate the required <code>SITEFILE</code> with boilerplate code if it does not exist.</p>

<p>So if your <code>SITEFILE</code> looked like this:</p>

<div class="brush: lisp">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="p">(</span><span class="nv">add-to-list</span><span class="w"> </span><span class="ss">'load-path</span><span class="w"> </span><span class="s">"@SITELISP@"</span><span class="p">)</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>… then, you can just remove that file.</p>

<p>But remember to keep the <code>SITEFILE</code> variable inside your ebuild:</p>

<div class="brush: bash">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="nv">SITEFILE</span><span class="o">=</span><span class="s2">"50</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">-gentoo.el"</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h1 id="remove-pkgel-files">Remove pkg.el files</h1>

<p>The <code>*-pkg.el</code> files are useless to Gentoo distribution model of Emacs Lisp packages and should be removed. It is as simple as adding this line to a ebuild:</p>

<div class="brush: bash">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="nv">ELISP_REMOVE</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">-pkg.el"</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<p>Beware that some packages will try to find their <code>${PN}-pkg.el</code> file, but in most cases this will show up in failing package tests.</p>

<h1 id="use-official-repository">Use official repository</h1>

<p>It is tedious to repackage Elpa tarballs, so use the official upstream even if you have to snapshot a specific commit.</p>

<p>To snapshot GitHub repos you would generally use this code:</p>

<div class="brush: bash">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="c1"># First check if we have the correct version to prevent</span>
<span class="c1"># autobumping package version without changing the commit.</span>
<span class="o">[[</span><span class="w"> </span><span class="si">${</span><span class="nv">PV</span><span class="si">}</span><span class="w"> </span><span class="o">==</span><span class="w"> </span>*_p20220325<span class="w"> </span><span class="o">]]</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="nv">COMMIT</span><span class="o">=</span>65c496d3d1d1298345beb9845840067bffb2ffd8

<span class="c1"># Use correct URL that supports snapshots.</span>
<span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"https://github.com/domtronn/</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">/archive/</span><span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span><span class="s2">.tar.gz</span>
<span class="s2">    -&gt; </span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz"</span>

<span class="c1"># Override the temporary build directory variable.</span>
<span class="nv">S</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">WORKDIR</span><span class="si">}</span><span class="s2">"</span>/<span class="si">${</span><span class="nv">PN</span><span class="si">}</span>-<span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h1 id="include-live-version-support">Include live version support</h1>

<p>We do not want to be worse than the <a href="https://melpa.org/">Melpa unstable</a> :D</p>

<p>So, why not allow the given package to be used live?</p>

<p>Even if you do not push the live package to the overlay, please include support for it.</p>

<div class="brush: bash">
 <div class="source">
  <table class="sourcetable">
   <tbody>
    <tr>
     <td class="linenos">
      <div class="linenodiv">
       <pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span>
<span class="normal">6</span>
<span class="normal">7</span>
<span class="normal">8</span></pre>
</div>
</td>
     <td class="code">
      <div>
       <pre><span></span><span class="k">if</span><span class="w"> </span><span class="o">[[</span><span class="w"> </span><span class="si">${</span><span class="nv">PV</span><span class="si">}</span><span class="w"> </span><span class="o">==</span><span class="w"> </span>*9999*<span class="w"> </span><span class="o">]]</span><span class="w"> </span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
<span class="w">    </span>inherit<span class="w"> </span>git-r3
<span class="w">    </span><span class="nv">EGIT_REPO_URI</span><span class="o">=</span><span class="s2">"https://github.com/example/</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">.git"</span>
<span class="k">else</span>
<span class="w">    </span><span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"https://github.com/example/</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">/archive/</span><span class="si">${</span><span class="nv">PV</span><span class="si">}</span><span class="s2">.tar.gz</span>
<span class="s2">        -&gt; </span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz"</span>
<span class="w">    </span><span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">"~amd64 ~x86"</span>
<span class="k">fi</span>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>

</div>

<h1 id="ask-for-tags">Ask for tags</h1>

<p>Git is good, git tags are good. In case if upstream does not tag their package or just forgets to, kindly ask them to create a git tag when bumping Emacs package versions.</p>
                

                <!-- end box -->
              </div>
            </div>

          </div>
        </div>

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        

        <!-- each item -->
        <!-- each item -->


    </div>

    <div class="col-md-3">
      <div class="" style=" position: -webkit-sticky;position: sticky;top: 100px;">
        <div class="row">
          <div class="col-sm-12">
            <div class="text-muted" style="font-size:0.9rem;font-weight:bold;">VIEW</div>
          </div>
          <div class="col-sm-12 mb-3">

            <div class="ml-2">
              <input onchange="updateView();" type="radio" class="d-none" id="article-view" name="view" value="article" checked>
              <label for="article-view" class="mb-1">
                <i class="fa fa-fw fa-newspaper"></i>&nbsp;<span style="cursor: pointer;">Article view</span>
              </label>
              <br/>
              <input onchange="updateView();" type="radio" class="d-none" id="headline-view" name="view" value="headline">
              <label for="headline-view">
                <i class="fa fa-fw fa-newspaper"></i>&nbsp;<span style="cursor: pointer;">Headline view</span>
              </label>
            </div>

          </div>
          <div class="col-sm-12">
            <div class="text-muted" style="font-size:0.9rem;font-weight:bold;">SCOPE</div>
          </div>
          <div class="col-sm-12 mb-3">

            <div class="ml-2">
              <input onchange="updateView();" type="radio" class="d-none" id="planet-scope" name="fa-circle" value="View Planet" checked>
              <label for="planet-scope" class="mb-1">
                <i class="fa fa-fw fa-circle"></i>&nbsp;<span style="cursor: pointer;">View Planet</span>
              </label>
              <br/>
              <input onchange="updateView();" type="radio" class="d-none" id="universe-scope" name="fa-circle" value="View Universe">
              <label for="universe-scope">
                <i class="fa fa-fw fa-circle"></i>&nbsp;<span style="cursor: pointer;">View Universe</span>
              </label>
            </div>

          </div>
          <div class="col-sm-12">
            <div class="text-muted" style="font-size:0.9rem;font-weight:bold;">FILTER</div>
          </div>
          <div class="col-sm-12">
            <div class="input-daterange ml-2 mt-1" id="datepicker">

              <div class="input-group input-group-sm mb-0">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="inputGroup-sizing-sm" style="border:none; background-color: #FAFAFA;padding-left:0px;"><i class="fa fa-calendar" aria-hidden="true"></i>&nbsp;&nbsp;from</span>
                </div>
                <input onchange="updateArticles();" id="start" type="text" class="form-control" name="start" placeholder="start date" style="text-align:left; border:none;max-width: 150px;background-color: #FAFAFA;cursor: pointer;"/>
              </div>

              <div class="input-group input-group-sm mb-2">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="inputGroup-sizing-sm" style="border:none; background-color: #FAFAFA;padding-left:0px;"><i class="fa fa-calendar" aria-hidden="true"></i>&nbsp;&nbsp;to&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                </div>
                <input onchange="updateArticles();" id="end" type="text" class="form-control" name="end" placeholder="end date" style="text-align:left; border:none;max-width: 150px;background-color: #FAFAFA;cursor: pointer;"/>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<footer>
  <div class="container">
    <div class="row">
      <div class="col-xs-12 col-md-offset-2 col-md-7">
        <h3 class="footerhead">Gentoo Planet</h3>
        <div class="row">
          <div class="col-xs-12 col-md-4">
            <strong>Last
              Updated:</strong><br><span class="kk-i18n-date" title="2024-03-29 10:02:38 UTC">2024-03-29 10:02:38 UTC</span>
          </div>
          <div class="col-xs-12 col-md-4">
            <strong>Powered by:</strong><br><a href='https://github.com/feedreader'>Powered by Pluto</a>
          </div>
          <div class="col-xs-12 col-md-4">
            <!--
            TBD
            -->
          </div>
        </div>
      </div>
      <div class="col-xs-12 col-md-3">
        <h3 class="footerhead">Questions or comments?</h3>
        Please feel free to <a href="https://wiki.gentoo.org/wiki/Project:Planet">contact us</a>.
      </div>
    </div>
    <div class="row">
      <div class="col-xs-3 col-md-2">
        <ul class="footerlinks three-icons">
          <li>
            <a href="https://twitter.com/gentoo" title="@Gentoo on Twitter"><span class="fa fa-twitter fa-fw"></span></a>
          </li>
          <li>
            <a href="https://www.facebook.com/gentoo.org" title="Gentoo on Facebook"><span class="fa fa-facebook fa-fw"></span></a>
          </li>
          <li></li>
        </ul>
        <div>
          <div class="sitemap text-center">
            <a href="https://wiki.gentoo.org/wiki/Foundation:Privacy_Policy">Privacy Policy</a>
          </div>
        </div>
      </div>
      <div class="col-xs-9 col-md-9">
        <strong>Copyright (C) 2001-2024 Gentoo Authors</strong><br>
        <small>
          Gentoo is a trademark of the Gentoo Foundation, Inc.
          The contents of this document, unless otherwise expressly stated, are licensed under the
          <a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="license">CC-BY-SA-4.0</a> license.
          The
          <a href="https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage
            Guidelines</a> apply.
        </small>
      </div>
    </div>
  </div>
</footer>
<script src="tyrian/jquery-3.3.slim.js"></script>
<script src="tyrian/popper.min.js"></script>
<script src="tyrian/bootstrap.min.js"></script>
<script src="tyrian/components/bootstrap-datepicker.min.js"></script>
<script src="tyrian/planet-tyrian.js"></script>


</body>
</html>
