<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Alien Pastures</title><link>https://blog.slackware.nl/</link><description>My thoughts on Slackware, life and everything</description><language>en-US</language><lastBuildDate>Sun, 15 Nov 2026 22:35:00 +0100</lastBuildDate><atom:link href="https://blog.slackware.nl/index.xml" rel="self" type="application/rss+xml"/><item><title>Slackware Cloud Server Series, Episode 13: Blogging Platform</title><link>https://blog.slackware.nl/slackware-cloud-server-series-episode-13-blogging-platform/</link><pubDate>Sun, 15 Nov 2026 22:35:00 +0100</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/slackware-cloud-server-series-episode-13-blogging-platform/</guid><category>Slackware</category><category>Software</category><category>Me</category><description> If you are reading this, then you are looking at the result of a migration that kept me busy for a good part of October. Alien Pastures is no longer a WordPress blog. After eighteen years of WordPress (the first post on this blog dates from 2008), every page you see here is a plain HTML file, generated from text files in a git repository, and served by Apache without a single line of PHP or a database query in sight.</description><content:encoded><![CDATA[<img class="alignleft" src="/wp-content/uploads/2022/01/slackcloud-1.png" alt="" width="94" loading="lazy">
<p>If you are reading this, then you are looking at the result of a migration that kept me busy for a good part of October. Alien Pastures is no longer a WordPress blog. After eighteen years of WordPress (the first post on this blog dates from 2008), every page you see here is a plain HTML file, generated from text files in a git repository, and served by Apache without a single line of PHP or a database query in sight.</p>
<p>Why? I was getting tired of patching WordPress and its plugins, of the never-ending stream of login attempts and spam comments, of keeping PHP and MariaDB happy, and of the nagging feeling that the most exposed service on my server was also the one with the largest attack surface. Already some years ago I had done a quick research on <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a>, a framework for building static websites. A blog does not need to be a dynamic web application. It needs to show text and pictures, let people comment, and let me write new articles in a comfortable way.</p>
<p>That last part is where most &ldquo;static site&rdquo; tutorials stopped being helpful. They assume that you love editing Markdown files in vi and running build commands by hand. I do love vi, but I also want to write a blog post from a browser on my laptop, drop in a screenshot, and press &ldquo;Publish&rdquo;. And then, what do do with reader comments on a blog with static pages? I want my readers to be able to leave comments, without me handing their data to Disqus or another Big Tech service.</p>
<p>So I built a complete blogging platform out of Open Source components, all running on my own servers. It turned out to be a perfect fit for the Slackware Cloud Server series, because it combines several things we already did in earlier episodes (Docker, Apache reverse proxies, Let&rsquo;s Encrypt) with some new ones: a git forge with CI/CD, a package registry, and a &ldquo;pull&rdquo; deployment that does not need any SSH keys.</p>
<p>Check out the list below which shows past, present and future episodes in my <em>Slackware Cloud Server</em> series. If the article has already been written you&rsquo;ll be able to click on the subject.
The first episode also contains an introduction with some more detail about what you can expect.</p>
<ul>
<li><strong>Episode 1:</strong> <a href="/slackware-cloud-server-series-episode-1-managing-your-docker-infrastructure/"><strong>Managing your Docker Infrastructure</strong></a></li>
<li><strong>Episode 2:</strong> <a href="/slackware-cloud-server-series-episode-2-identity-and-access-management-iam/"><strong>Identity and Access management (IAM)</strong></a></li>
<li><strong>Episode 3:</strong> <a href="/slackware-cloud-server-series-episode-3-video-conferencing/"><strong>Video Conferencing</strong></a></li>
<li><strong>Episode 4:</strong> <a href="/slackware-cloud-server-series-episode-4-productivity-platform/"><strong>Productivity Platform</strong></a></li>
<li><strong>Episode 5:</strong> <a href="/slackware-cloud-server-series-episode-5-collaborative-document-editing/"><strong>Collaborative document editing</strong></a></li>
<li><strong>Episode 6:</strong> <a href="/slackware-cloud-server-series-episode-6-etherpad-with-whiteboard/"><strong>Etherpad with Whiteboard</strong></a></li>
<li><strong>Episode 7:</strong> <a href="/slackware-cloud-server-series-episode-7-decentralized-social-media/"><strong>Decentralized Social Media</strong></a></li>
<li><strong>Episode 8:</strong> <a href="/slackware-cloud-server-series-episode-8-media-streaming-platform/"><strong>Media Streaming Platform</strong></a></li>
<li><strong>Episode 9:</strong> <a href="/slackware-cloud-server-series-episode-9-cloudsync-for-2fa-authenticator/"><strong>Cloudsync for 2FA Authenticator</strong></a></li>
<li><strong>Episode 10:</strong> <a href="/slackware-cloud-server-series-episode-10-workflow-management/"><strong>Workflow Management</strong></a></li>
<li><strong>Episode 11:</strong> <a href="/slackware-cloud-server-series-episode-11-jukebox-audio-streaming/"><strong>Jukebox Audio Streaming</strong></a></li>
<li><strong>Episode 12:</strong> <a href="/slackware-cloud-server-series-episode-12-local-ai/"><strong>Local AI</strong></a></li>
<li><strong>Episode 13 (this article): Blogging Platform</strong>
Setting up a static blog with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a>, built automatically by a <a href="https://forgejo.org/" target="_blank" rel="noopener">Forgejo</a> runner, with <a href="https://pagefind.app/" target="_blank" rel="noopener">Pagefind</a> search, <a href="https://artalk.js.org/" target="_blank" rel="noopener">Artalk</a> comments that you moderate yourself, and the <a href="https://sveltiacms.app/" target="_blank" rel="noopener">Sveltia CMS</a> editor in your browser. No database, no PHP, no SSH keys on your web server.
<ul>
<li>Why would I want a static blog?</li>
<li>What happens where?</li>
<li>Preamble
<ul>
<li>Web hosts</li>
<li>What you should already have</li>
<li>Port numbers</li>
<li>Secret keys</li>
<li>File locations</li>
</ul>
</li>
<li>Server configuration steps
<ul>
<li>A Hugo site in a git repository</li>
<li>The builder image</li>
<li>Prepare the forge</li>
<li>The build workflow</li>
<li>The web server pulls the site</li>
<li>Comments with Artalk</li>
<li>Moderation, the WordPress way</li>
<li>Writing posts in your browser with Sveltia CMS</li>
<li>Announcing new posts on Mastodon</li>
<li>Check the result</li>
</ul>
</li>
<li>Coming from WordPress?</li>
<li>Lessons learned</li>
<li>Attribution</li>
<li>Final thoughts</li>
</ul>
</li>
<li><strong>Episode X: Git Forge</strong></li>
<li><strong>Episode X: Bot Protection with Anubis</strong></li>
<li><strong>Episode X: Server Monitoring</strong></li>
<li><strong>Episode X: Docker Registry</strong></li>
</ul>
<hr>
<h3 id="why-would-i-want-a-static-blog">Why would I want a static blog?</h3>
<p>A &ldquo;static&rdquo; website consists of files that are created once, and then served to every visitor as they are. Compare that to WordPress, where every page view runs PHP code which queries a database and assembles the page on the spot. Let me list the advantages of going static:</p>
<ul>
<li>Security
There is nothing to hack on the web server. No login page, no PHP, no plugins with yet another vulnerability, no database with your users&rsquo; password hashes. The web server only hands out files. My server logs are still full of bots trying <code>/wp-login.php</code>, but now they get a polite &ldquo;410 Gone&rdquo; and that&rsquo;s it.</li>
<li>Speed
A static page is as fast as your web server can read a file from disk. No caching plugins needed.</li>
<li>Low maintenance
No more monthly WordPress core updates, plugin updates, theme updates, PHP upgrades that break a plugin, database upgrades&hellip; Apache and the Artalk comment server are the only things to keep up to date.</li>
<li>My content is just text
Every post is a file in a git repository. I have the complete history of every change, I can grep through eighteen years of writing, and making a backup is as simple as <code>git clone</code>.</li>
<li>Portability
The web server only needs Apache and a cron job. Moving the blog to another host means: copy one script and one configuration file, point DNS at the new host, done. That matters to me; nobody knows how long my servers will stay where they are.</li>
</ul>
<p>There are trade-offs of course. A static site needs a &ldquo;build&rdquo; step after every change, which takes a few minutes before a new post is visible. And all the dynamic bits (comments, search) need a different solution. That&rsquo;s exactly what the rest of this article is about.
And you can use this knowledge to build your own Hugo-powered blog! I created a git repository <a href="https://forge.slackware.nl/alienbob/hugo-blog-kit" target="_blank" rel="noopener">hugo-blog-kit</a> to accompany this article and to help you get started.</p>
<h3 id="what-happens-where">What happens where?</h3>
<p>Before we dive in, here is the big picture. This is what the whole stack looks like, and what happens when you publish a new post:</p>
<figure class="wp-caption aligncenter" style="width: 676px"><a href="/slackware-cloud-server-series-episode-13-blogging-platform/blog-stack-architecture.png"><img src="/slackware-cloud-server-series-episode-13-blogging-platform/blog-stack-architecture_hu_b9f06c0fad1cdc4e.png" srcset="/slackware-cloud-server-series-episode-13-blogging-platform/blog-stack-architecture_hu_b9f06c0fad1cdc4e.png 1x, /slackware-cloud-server-series-episode-13-blogging-platform/blog-stack-architecture_hu_a58238820f50d651.png 2x" alt="Architecture of the blogging platform" width="676" height="557" loading="lazy"></a></figure>
<ol>
<li>You write a post in your browser, in <a href="https://www.markdownguide.org/basic-syntax/" target="_blank" rel="noopener">MarkDown</a> language, using the visual editor <strong>Sveltia CMS</strong>. Sveltia is a single web page which talks to your git repository (I use a Forgejo git server in this article but it can just as well be Codeberg or Github). When you press &ldquo;Save&rdquo;, it commits your post (a Markdown text file plus any images) to the git repository. You never touch git yourself, unless you want to.</li>
<li><strong>Forgejo</strong> notices the new commit on the &ldquo;main&rdquo; branch and starts a job for <strong>Forgejo Actions</strong>, its built-in CI/CD system (CI/CD = Continuous Integration/Continuous Delivery, the automated &ldquo;build, test, deliver&rdquo; pipeline that software developers use).</li>
<li>A <strong>runner</strong> picks up the job. It starts a Docker container from a &ldquo;builder image&rdquo; that contains <strong>Hugo</strong> (turns your Markdown into HTML pages) and <strong>Pagefind</strong> (creates a search index for the site). The complete website ends up in a single tarball.</li>
<li>The runner uploads that tarball into Forgejo&rsquo;s <strong>package registry</strong>, as a new version of a &ldquo;generic package&rdquo;.</li>
<li>On your web server, a small script <strong>sitepull.sh</strong> runs from cron every few minutes. It asks the package registry whether there is a newer version of the site tarball, downloads it, verifies its checksum, unpacks it and switches the web site over to it in one atomic step. Right after the switch, it can announce your new posts on Mastodon.</li>
<li><strong>Apache</strong> serves the files to your readers.</li>
<li><strong>Artalk</strong> runs in a Docker container next to Apache and handles the comments. Every new comment goes into a moderation queue, and a small &ldquo;sidecar&rdquo; script approves comments from people who have commented before, just like WordPress did.</li>
</ol>
<p>Note the direction of step 5: the web server <strong>pulls</strong> the site. Nothing ever pushes to it. That means the build server does not need an SSH key that allows it to write to your web server. If your build server ever gets compromised, your web server is not automatically compromised too. And moving the web server to another host or another provider does not involve any changes on the forge side.</p>
<h3 id="preamble">Preamble</h3>
<p>This section describes the technical details of our setup, as well as the things which you should have prepared before trying to implement the instructions in this article.</p>
<p>I write this article as someone who is root on all of the servers involved. You don&rsquo;t have to be: an ordinary account on the forge and a shell account on the web server (member of the <code>docker</code> group) will do, as long as the admins are willing to do a few one-time steps for you. The README of the <a href="https://forge.slackware.nl/alienbob/hugo-blog-kit" target="_blank" rel="noopener">hugo-blog-kit</a> explains exactly which steps, and how to install everything in your home directory.</p>
<h4 id="web-hosts">Web Hosts</h4>
<p>For the sake of this instruction, I will use these hostnames:</p>
<ul>
<li><strong>blog.darkstar.lan</strong> - the blog itself</li>
<li><strong>comments.darkstar.lan</strong> - the Artalk comment server</li>
<li><strong>forge.darkstar.lan</strong> - your Forgejo server</li>
</ul>
<p>Setting up your domain (which will hopefully be something else than &ldquo;darkstar.lan&rdquo;&hellip;) with new hostnames and then setting up web servers for the hostnames in that domain is an exercise left to the reader. Before continuing, please ensure that your equivalents for blog.darkstar.lan and comments.darkstar.lan have a web server running. They don&rsquo;t have to serve any content yet, but we will add some blocks of configuration to their VirtualHost definitions during the steps outlined in the remainder of this article.</p>
<p>Using a Let&rsquo;s Encrypt SSL certificate to provide encrypted connections (HTTPS) to your webserver is <a href="/using-letsencrypt-to-secure-your-slackware-webserver-with-https/">documented in an earlier blog article</a>.</p>
<p>Note that I am talking about webserver &ldquo;hosts&rdquo; but in fact, all of these can be virtual webservers running on the same machine, at the same IP address, served by the same Apache httpd program, but with different DNS entries. There is no need at all for multiple computers when setting up your Slackware Cloud server. In my own setup, the forge and the blog happen to run on different servers, but the instructions work equally well on a single box.</p>
<h4 id="what-you-should-already-have">What you should already have</h4>
<ul>
<li>Docker; see <a href="/slackware-cloud-server-series-episode-1-managing-your-docker-infrastructure/">Episode 1</a>.</li>
<li>A Forgejo server with Actions enabled and at least one runner.
Forgejo is a self-hosted git forge, comparable to GitHub or GitLab. Setting up Forgejo deserves an episode of its own (<em>working on it to become Episode 14!</em>). Installing it and registering a runner is well documented in the <a href="https://forgejo.org/docs/latest/admin/" target="_blank" rel="noopener">Forgejo administrator guide</a>. If you already followed <a href="/slackware-cloud-server-series-episode-2-identity-and-access-management-iam/">Episode 2</a>, you can let your users log in to Forgejo with their Keycloak account. Forgejo version 12 or newer is required for the Sveltia editor; I use Forgejo 15.</li>
<li>A runner with the label &ldquo;docker&rdquo;.
The build job in this article asks for a runner that can start Docker containers. When you register a runner, give it a label like <code>docker:docker://node:22-bookworm-slim</code>. If the forge is not yours, ask its admin whether such a runner is available; otherwise you can register a runner of your own for your account or repository under <em>Settings &gt; Actions &gt; Runners</em>.</li>
<li>Apache <em>httpd</em> with <em>mod_rewrite</em>, <em>mod_proxy</em>, <em>mod_proxy_http</em> and <em>mod_headers</em> enabled. All of these are part of Slackware&rsquo;s httpd package.</li>
</ul>
<h4 id="port-numbers">Port numbers</h4>
<ul>
<li>The Artalk Docker container listens at the loopback TCP port <span style="color: #008000;">23366</span>. That is where the Apache reverse proxy for comments.darkstar.lan directs incoming traffic.</li>
<li>Nothing else listens on a port: the blog is plain files, and the sitepull script only makes outgoing HTTPS connections.</li>
</ul>
<h4 id="secret-keys">Secret keys</h4>
<p>You will need a few passwords and tokens. Generate random strings with:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>$ openssl rand -base64 24
</span></span></code></pre></div><ul>
<li>Artalk admin password (your own login on the comment server). Artalk accepts it as a bcrypt hash, so the password itself never appears in a configuration file:
<code>ARTALK_ADMIN_PASSWORD='(bcrypt)$2y$10$S0me.L0ng.Hash.That.Starts.With.The.Bcrypt.Prefix'</code></li>
<li>Moderator bot password, for the moderation sidecar. Same procedure.</li>
<li>A package token for the build job: a Forgejo access token with <em>only</em> the &ldquo;package: read and write&rdquo; scope.</li>
<li>A  read token for the web server, only needed if your repository owner is a private organization: a Forgejo access token with <em>only</em> the &ldquo;package: read&rdquo; scope.</li>
<li>A Mastodon token, only if you want your new posts announced on Mastodon: an access token for your Mastodon account with <em>only</em> the &ldquo;write:statuses&rdquo; and &ldquo;profile&rdquo; scopes.</li>
</ul>
<p>A bcrypt hash of a password is created with the <code>htpasswd</code> tool which comes with Apache:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>$ htpasswd -nbBC 10 &#39;&#39; &#39;MySecretPassword&#39; | cut -d: -f2
</span></span><span style="display:flex;"><span>$2y$10$5x0n7Jk1nJ8b0...
</span></span></code></pre></div><h4 id="file-locations">File Locations</h4>
<ul>
<li>The blog&rsquo;s git repository lives on the forge as <strong>darkstar/blog</strong> (organization &ldquo;darkstar&rdquo;, repository &ldquo;blog&rdquo;).</li>
<li>On the web server, the activated site builds go into: <strong>/usr/local/blog/</strong> (the DocumentRoot is the symlink /usr/local/blog/current).</li>
<li>Images from an old WordPress blog (if you have one) go into: <strong>/usr/local/blog-media/</strong></li>
<li>The sitepull script and its configuration go into: <strong>/usr/local/sbin/sitepull.sh</strong> and <strong>/etc/sitepull/blog.conf</strong></li>
<li>The Mastodon announcer and its configuration go into: <strong>/usr/local/sbin/mastodon-announce.py</strong> and <strong>/etc/sitepull/mastodon-announce.conf</strong></li>
<li>The Docker configuration for Artalk goes into: <strong>/opt/artalk/</strong></li>
<li>The Artalk database goes into: <strong>/usr/local/artalk/</strong></li>
</ul>
<h3 id="server-configuration-steps">Server configuration steps</h3>
<p>I will break down the story into its main parts:</p>
<ul>
<li>Create a Hugo site and put it in a git repository on your forge</li>
<li>Create a Docker &ldquo;builder&rdquo; image containing Hugo and Pagefind</li>
<li>Prepare the forge: a bot account, a token, and some settings</li>
<li>Add the build workflow which turns every commit into a site package</li>
<li>Let the web server pull and activate new packages</li>
<li>Add comments with Artalk, and a moderation sidecar</li>
<li>Add the Sveltia CMS editor so you can write posts in your browser</li>
</ul>
<h4 id="a-hugo-site-in-a-git-repository">A Hugo site in a git repository</h4>
<p><a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> is a &ldquo;static site generator&rdquo;. You give it a directory with content (Markdown files), templates (HTML with placeholders) and a configuration file, and Hugo writes out a complete website: one HTML page per post, archive pages per category and tag, RSS feeds, a sitemap. It is a single program written in Go, and it is ridiculously fast: Alien Pastures, with more than 3,000 pages, is built in well under a minute.</p>
<h5 id="install-hugo-on-your-desktop">Install Hugo on your desktop</h5>
<p>You don&rsquo;t strictly need Hugo on your own computer, because the runner builds the site. But a local preview while you work on templates is very handy. Download a release from <a href="https://github.com/gohugoio/hugo/releases" target="_blank" rel="noopener">Hugo&rsquo;s GitHub page</a>.</p>
<p>Note for Slackware 15.0 users: the &ldquo;extended&rdquo; Hugo binary is linked against glibc 2.34 or newer, and Slackware 15.0 has glibc 2.33. Use the standard (static) build instead, unless your theme needs the extended features (Sass compilation, mostly). On Slackware -current, both builds work.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>$ wget https://github.com/gohugoio/hugo/releases/download/v0.169.0/hugo_0.169.0_linux-amd64.tar.gz
</span></span><span style="display:flex;"><span>$ tar -xf hugo_0.169.0_linux-amd64.tar.gz hugo
</span></span><span style="display:flex;"><span>$ mv hugo ~/bin/
</span></span><span style="display:flex;"><span>$ hugo version
</span></span></code></pre></div><h5 id="create-the-site">Create the site</h5>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>$ hugo new project blog --format yaml
</span></span><span style="display:flex;"><span>$ cd blog
</span></span><span style="display:flex;"><span>$ git init -b main
</span></span></code></pre></div><p>That creates the directory structure Hugo expects. The most important parts:</p>
<ul>
<li><strong>content/</strong> - your posts and pages, in Markdown</li>
<li><strong>layouts/</strong> - your own templates, which override the theme&rsquo;s</li>
<li><strong>static/</strong> - files that are copied into the website unchanged</li>
<li><strong>themes/</strong> - the theme(s) you use</li>
<li><strong>hugo.yaml</strong> - the configuration</li>
</ul>
<p>Pick a theme from the <a href="https://themes.gohugo.io/" target="_blank" rel="noopener">Hugo themes site</a> and add it to the themes/ directory. For Alien Pastures I ported the WordPress theme I had been using for years (<a href="https://andersnoren.se/teman/hemingway-wordpress-theme/" target="_blank" rel="noopener">Hemingway by Anders Norén</a>) to Hugo, so that the blog looks exactly like it did before. That was a good exercise in learning how Hugo templates work, but a ready-made theme will get you going much faster.</p>
<p>A word of warning: Hugo introduced a new template layout in version 0.146 (2025) and many themes and tutorials out there still use the old one. When you read about templates, make sure the information is recent. The <a href="https://gohugo.io/documentation/" target="_blank" rel="noopener">official documentation</a> is always up to date.</p>
<h5 id="configuration-and-environments">Configuration and environments</h5>
<p>Instead of a single hugo.yaml, I use a configuration directory with a part for each &ldquo;environment&rdquo;. Hugo merges the base configuration with the part for the environment you are building:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>config/
</span></span><span style="display:flex;"><span>  _default/hugo.yaml      everything that is the same everywhere
</span></span><span style="display:flex;"><span>  production/hugo.yaml    https://blog.darkstar.lan/
</span></span><span style="display:flex;"><span>  staging/hugo.yaml       a test site, kept out of search engines
</span></span></code></pre></div><p>This allows the build job to create a test version and the real version of the site from the same commit. I used a staging site at a different hostname for weeks while working on the migration, while the old WordPress blog stayed online.</p>
<p>Here is a shortened config/_default/hugo.yaml to show the important bits:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;My Blog&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">locale</span>: <span style="color:#e6db74">&#34;en-US&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">theme</span>: <span style="color:#e6db74">&#34;mytheme&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># WordPress-style URLs: /my-post/, /tag/slackware/, /category/linux/</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">taxonomies</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">category</span>: <span style="color:#ae81ff">categories</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">tag</span>: <span style="color:#ae81ff">tags</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">permalinks</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">page</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">posts</span>: <span style="color:#e6db74">&#34;/:slugorcontentbasename/&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">term</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">tags</span>: <span style="color:#e6db74">&#34;/tag/:slug/&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">categories</span>: <span style="color:#e6db74">&#34;/category/:slug/&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">pagination</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">pagerSize</span>: <span style="color:#ae81ff">5</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">markup</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">goldmark</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">renderer</span>:
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">unsafe</span>: <span style="color:#66d9ef">true</span>      <span style="color:#75715e"># allow some raw HTML inside Markdown</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">artalk</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">server</span>: <span style="color:#e6db74">&#34;https://comments.darkstar.lan&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">site</span>: <span style="color:#e6db74">&#34;My Blog&#34;</span>
</span></span></code></pre></div><p>And config/production/hugo.yaml simply contains:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">baseURL</span>: <span style="color:#e6db74">&#34;https://blog.darkstar.lan/&#34;</span>
</span></span></code></pre></div><h5 id="a-first-post">A first post</h5>
<p>New posts go into their own directory, together with their images. Hugo calls that a &ldquo;page bundle&rdquo;:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>content/posts/2026/hello-world/index.md
</span></span><span style="display:flex;"><span>content/posts/2026/hello-world/screenshot.png
</span></span></code></pre></div><p>The index.md file starts with &ldquo;front matter&rdquo; (the metadata, between the <code>---</code> lines), followed by the text in Markdown:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;Hello world&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">date</span>: <span style="color:#e6db74">2026-11-15T12:00:00</span><span style="color:#ae81ff">+01</span>:<span style="color:#ae81ff">00</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">categories</span>: [<span style="color:#ae81ff">software]</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">tags</span>: [<span style="color:#ae81ff">slackware]</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">comments</span>: <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span>My <span style="font-weight:bold">**first**</span> post on my own blogging platform. Here is a picture:
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>![<span style="color:#f92672">A screenshot</span>](<span style="color:#a6e22e">screenshot.png</span>)
</span></span></code></pre></div><p>The URL of this post will be <a href="https://blog.darkstar.lan/hello-world/" target="_blank" rel="noopener">https://blog.darkstar.lan/hello-world/</a> because of the <code>permalinks</code> setting above: the directory name becomes the URL, and it does not change when you edit the title later.</p>
<h5 id="preview-it">Preview it</h5>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>$ hugo server --environment staging
</span></span></code></pre></div><p>Point your browser at http://localhost:1313/ and look at your site. Hugo watches your files and refreshes the page in your browser whenever you save a change.</p>
<p>When you are happy with it, create the repository &ldquo;blog&rdquo; in your organization on the forge (I&rsquo;ll call the organization &ldquo;darkstar&rdquo;) and push your site to it. The repository can be private: the forge only hands out the finished website, never the sources.</p>
<h4 id="the-builder-image">The builder image</h4>
<p>The runner builds the site inside a Docker container. I could install Hugo at the start of every build job, but I prefer a dedicated image with one exact Hugo version inside. A build should never break because &ldquo;latest&rdquo; moved to a version that deprecated a template function I use. Upgrading Hugo becomes a conscious decision: build a new image, test it, change one line in the workflow.</p>
<p>Here is the Dockerfile (shortened; the complete one adds OCI labels with version information):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-dockerfile" data-lang="dockerfile"><span style="display:flex;"><span><span style="color:#75715e"># Hugo builder image for Forgejo Actions.</span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"># The Node base is needed because JavaScript actions such as</span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"># actions/checkout need a node binary inside the job container.</span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#66d9ef">FROM</span> <span style="color:#e6db74">node:22-bookworm-slim</span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#66d9ef">ARG</span> HUGO_VERSION<span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#66d9ef">ARG</span> PAGEFIND_VERSION<span style="color:#f92672">=</span><span style="color:#ae81ff">1</span>.5.2<span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#66d9ef">RUN</span> apt-get update <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span> <span style="color:#f92672">&amp;&amp;</span> apt-get install -y --no-install-recommends ca-certificates curl git jq <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span> <span style="color:#f92672">&amp;&amp;</span> rm -rf /var/lib/apt/lists/*<span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"># Fetch the extended Hugo binary and verify it against the upstream</span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"># checksum list before installing it.</span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#66d9ef">RUN</span> set -eu; cd /tmp; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    base<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://github.com/gohugoio/hugo/releases/download/v</span><span style="color:#e6db74">${</span>HUGO_VERSION<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    tgz<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;hugo_extended_</span><span style="color:#e6db74">${</span>HUGO_VERSION<span style="color:#e6db74">}</span><span style="color:#e6db74">_linux-amd64.tar.gz&#34;</span>; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    sums<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;hugo_</span><span style="color:#e6db74">${</span>HUGO_VERSION<span style="color:#e6db74">}</span><span style="color:#e6db74">_checksums.txt&#34;</span>; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    curl -fsSLO <span style="color:#e6db74">&#34;</span>$base<span style="color:#e6db74">/</span>$tgz<span style="color:#e6db74">&#34;</span>; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    curl -fsSLO <span style="color:#e6db74">&#34;</span>$base<span style="color:#e6db74">/</span>$sums<span style="color:#e6db74">&#34;</span>; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    grep <span style="color:#e6db74">&#34; </span><span style="color:#e6db74">${</span>tgz<span style="color:#e6db74">}</span><span style="color:#e6db74">\$&#34;</span> <span style="color:#e6db74">&#34;</span>$sums<span style="color:#e6db74">&#34;</span> | sha256sum -c -; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    tar -xzf <span style="color:#e6db74">&#34;</span>$tgz<span style="color:#e6db74">&#34;</span> -C /usr/local/bin hugo; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    rm -f <span style="color:#e6db74">&#34;</span>$tgz<span style="color:#e6db74">&#34;</span> <span style="color:#e6db74">&#34;</span>$sums<span style="color:#e6db74">&#34;</span>; <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    hugo version<span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"># Pagefind builds the static search index after Hugo has run.</span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#66d9ef">RUN</span> npm install -g <span style="color:#e6db74">&#34;pagefind@</span><span style="color:#e6db74">${</span>PAGEFIND_VERSION<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#f92672">&amp;&amp;</span> pagefind --version<span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010">
</span></span></span><span style="display:flex;"><span><span style="color:#66d9ef">CMD</span> [<span style="color:#e6db74">&#34;/bin/bash&#34;</span>]<span style="color:#960050;background-color:#1e0010">
</span></span></span></code></pre></div><p>Build it and push it into the container registry which is built into Forgejo (here it goes in under user &lsquo;alien&rsquo;, substitute your own user):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>$ docker build --build-arg HUGO_VERSION=0.169.0 \
</span></span><span style="display:flex;"><span>    -t forge.darkstar.lan/alien/hugo-builder:0.169.0 .
</span></span><span style="display:flex;"><span>$ docker login forge.darkstar.lan
</span></span><span style="display:flex;"><span>$ docker push forge.darkstar.lan/alien/hugo-builder:0.169.0
</span></span></code></pre></div><p>Note: Docker stores the login credentials per registry hostname. If your registry is reachable under more than one name, log in with exactly the name you are pushing to. That cost me a &ldquo;reqPackageAccess&rdquo; error and some head scratching.</p>
<p>The image contains nothing but public tools, so I made it public. My own version is at <a href="https://forge.slackware.nl/alienbob/hugo-builder" target="_blank" rel="noopener">forge.slackware.nl/alienbob/hugo-builder</a> and you are welcome to use it as-is or copy the Dockerfile.</p>
<h4 id="prepare-the-forge">Prepare the forge</h4>
<p>The build job needs to upload the finished site into the package registry, and for that it needs an access token. That token should be able to do nothing else.</p>
<p>You don&rsquo;t need to be the admin of the forge for this. Most people who use somebody else&rsquo;s Forgejo server won&rsquo;t be, and that&rsquo;s fine: create the token in your own account. Go to <em>Settings &gt; Applications</em>, generate a new token, and select only the scope <strong>package: Read and Write</strong>. A token with only that scope cannot read or change any of your repositories, issues or settings, even though it belongs to your account. If the blog repository belongs to an organization (I use &ldquo;darkstar&rdquo; in this article), make sure you are a member of a team in that organization with write access to packages.</p>
<p>In the repository, go to <em>Settings &gt; Actions</em> and add:</p>
<ul>
<li><strong>Variables</strong>
<ul>
<li><code>SITE_ENVS</code> = <code>production</code> (or <code>staging production</code> if you also want a test site)</li>
<li><code>PKG_OWNER</code> = <code>darkstar</code> (the organization, or your user name if the repository is yours)</li>
<li><code>PKG_USER</code> = your user name</li>
</ul>
</li>
<li><strong>Secrets</strong>
<ul>
<li><code>PKG_TOKEN</code> = the token you just created</li>
</ul>
</li>
</ul>
<h5 id="if-you-are-the-admin-of-your-forge">If you are the admin of your forge</h5>
<p>Then I recommend a separate bot account, so that the token is not tied to your personal account at all. That is how I did it. Create the account from the command line on your Forgejo server:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span># forgejo admin user create --username blogbot \
</span></span><span style="display:flex;"><span>    --email blogbot@darkstar.lan --random-password \
</span></span><span style="display:flex;"><span>    --must-change-password=false
</span></span></code></pre></div><p>Do not forget that last parameter. Without it, the account is created with a &ldquo;must change password&rdquo; flag, and every API call with its tokens is refused until someone logs in once and changes the password. Ask me how I know&hellip;</p>
<p>Make the bot a member of a team in the &ldquo;darkstar&rdquo; organization that has write access to packages. Then log in as the bot (or use the admin&rsquo;s &ldquo;sudo&rdquo; feature), create the token with only the scope <strong>package: Read and Write</strong>, and use <code>blogbot</code> as the <code>PKG_USER</code> variable.</p>
<h4 id="the-build-workflow">The build workflow</h4>
<p>Forgejo Actions reads its workflows from the <strong>.forgejo/workflows/</strong> directory in your repository. The syntax is the same as GitHub Actions. Create <code>.forgejo/workflows/build.yaml</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">name</span>: <span style="color:#ae81ff">build-and-publish</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">on</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">push</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">branches</span>: [<span style="color:#ae81ff">main]</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Nightly rebuild, so posts with a future date appear on time.</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">schedule</span>:
</span></span><span style="display:flex;"><span>    - <span style="color:#f92672">cron</span>: <span style="color:#e6db74">&#39;23 4 * * *&#39;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">workflow_dispatch</span>:
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">jobs</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">build</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># Must match a label of your runner.</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">runs-on</span>: <span style="color:#ae81ff">docker</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">container</span>:
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">image</span>: <span style="color:#ae81ff">forge.darkstar.lan/alien/hugo-builder:0.169.0</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">env</span>:
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">FORGE_URL</span>: <span style="color:#ae81ff">${{ github.server_url }}</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">SITE_ENVS</span>: <span style="color:#ae81ff">${{ vars.SITE_ENVS }}</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">PKG_OWNER</span>: <span style="color:#ae81ff">${{ vars.PKG_OWNER }}</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">PKG_USER</span>: <span style="color:#ae81ff">${{ vars.PKG_USER }}</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">PKG_TOKEN</span>: <span style="color:#ae81ff">${{ secrets.PKG_TOKEN }}</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">KEEP_VERSIONS</span>: <span style="color:#e6db74">&#39;3&#39;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">steps</span>:
</span></span><span style="display:flex;"><span>      - <span style="color:#f92672">uses</span>: <span style="color:#ae81ff">actions/checkout@v4</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">Build and publish site packages</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">run</span>: <span style="color:#ae81ff">bash .forgejo/scripts/build-publish.sh</span>
</span></span></code></pre></div><p>The schedule deserves a word. Hugo leaves out posts with a date in the future. If you write a post today and give it next Monday&rsquo;s date, it appears with the first nightly build after that date. A simple way to schedule posts, without any &ldquo;scheduler&rdquo; running anywhere.</p>
<p>The real work happens in <code>.forgejo/scripts/build-publish.sh</code>. It builds the site once per environment, adds the search index, and uploads the result as a new version of a generic package:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e">#!/bin/bash
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"># build-publish.sh - build the Hugo site once per environment and upload</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># each build as a version of a Forgejo generic package.</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Package name : blog-&lt;environment&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Version      : &lt;UTC timestamp&gt;-&lt;12 char commit sha&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#                The timestamp prefix makes versions sort correctly as</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#                plain strings, which is how the web host picks &#34;newest&#34;.</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Files        : site.tar.gz and site.tar.gz.sha256</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>set -euo pipefail
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>FORGE_URL:?FORGE_URL not set<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>PKG_OWNER:?PKG_OWNER not set<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>PKG_USER:?PKG_USER not set<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>PKG_TOKEN:?PKG_TOKEN not set<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>SITE_ENVS<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>SITE_ENVS<span style="color:#66d9ef">:-</span>staging<span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span>KEEP_VERSIONS<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>KEEP_VERSIONS<span style="color:#66d9ef">:-</span>10<span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>SHA<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>GITHUB_SHA<span style="color:#66d9ef">:-$(</span>git rev-parse HEAD<span style="color:#66d9ef">)</span><span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span>VERSION<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>date -u +%Y%m%dT%H%M%SZ<span style="color:#66d9ef">)</span><span style="color:#e6db74">-</span><span style="color:#e6db74">${</span>SHA:0:12<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>PKG_API<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$FORGE_URL<span style="color:#e6db74">/api/packages/</span>$PKG_OWNER<span style="color:#e6db74">/generic&#34;</span>
</span></span><span style="display:flex;"><span>AUTH<span style="color:#f92672">=(</span>--user <span style="color:#e6db74">&#34;</span>$PKG_USER<span style="color:#e6db74">:</span>$PKG_TOKEN<span style="color:#e6db74">&#34;</span><span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> env in $SITE_ENVS; <span style="color:#66d9ef">do</span>
</span></span><span style="display:flex;"><span>  pkg<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;blog-</span>$env<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  out<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$PWD<span style="color:#e6db74">/_out/</span>$env<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  rm -rf <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  mkdir -p <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  echo <span style="color:#e6db74">&#34;&gt;&gt;&gt; Building environment &#39;</span>$env<span style="color:#e6db74">&#39; as </span>$pkg<span style="color:#e6db74"> </span>$VERSION<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Drafts are never built: packages may be publicly downloadable.</span>
</span></span><span style="display:flex;"><span>  hugo --environment <span style="color:#e6db74">&#34;</span>$env<span style="color:#e6db74">&#34;</span> --minify <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>       --destination <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">/public&#34;</span> --cleanDestinationDir
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Static full-text search index (served from /pagefind/).</span>
</span></span><span style="display:flex;"><span>  pagefind --site <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">/public&#34;</span> --silent
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  tar -C <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">/public&#34;</span> -czf <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">/site.tar.gz&#34;</span> .
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">(</span>cd <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">&amp;&amp;</span> sha256sum site.tar.gz &gt; site.tar.gz.sha256<span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Upload the tarball first and the checksum last. The web host treats</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># a version without a checksum as &#34;not ready yet&#34; and retries later.</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">for</span> f in site.tar.gz site.tar.gz.sha256; <span style="color:#66d9ef">do</span>
</span></span><span style="display:flex;"><span>    curl -fsS <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>AUTH[@]<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> --upload-file <span style="color:#e6db74">&#34;</span>$out<span style="color:#e6db74">/</span>$f<span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>      <span style="color:#e6db74">&#34;</span>$PKG_API<span style="color:#e6db74">/</span>$pkg<span style="color:#e6db74">/</span>$VERSION<span style="color:#e6db74">/</span>$f<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">done</span>
</span></span><span style="display:flex;"><span>  echo <span style="color:#e6db74">&#34;&gt;&gt;&gt; Uploaded </span>$pkg<span style="color:#e6db74"> </span>$VERSION<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Keep only the newest KEEP_VERSIONS versions in the registry. The</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># ones that remain are the rollback window for the web host.</span>
</span></span><span style="display:flex;"><span>  curl -fsS <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>AUTH[@]<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;</span>$FORGE_URL<span style="color:#e6db74">/api/v1/packages/</span>$PKG_OWNER<span style="color:#e6db74">?type=generic&amp;q=</span>$pkg<span style="color:#e6db74">&amp;limit=50&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>  | jq -r --arg n <span style="color:#e6db74">&#34;</span>$pkg<span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>      <span style="color:#e6db74">&#39;[.[] | select(.name == $n) | .version] | sort | reverse | .[]&#39;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>  | tail -n +<span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$((</span>KEEP_VERSIONS <span style="color:#f92672">+</span> <span style="color:#ae81ff">1</span><span style="color:#66d9ef">))</span><span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>  | <span style="color:#66d9ef">while</span> read -r old; <span style="color:#66d9ef">do</span>
</span></span><span style="display:flex;"><span>      echo <span style="color:#e6db74">&#34;&gt;&gt;&gt; Pruning </span>$pkg<span style="color:#e6db74"> </span>$old<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>      curl -fsS <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>AUTH[@]<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> -X DELETE <span style="color:#e6db74">&#34;</span>$PKG_API<span style="color:#e6db74">/</span>$pkg<span style="color:#e6db74">/</span>$old<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">done</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">done</span>
</span></span></code></pre></div><p>Commit both files and push. In the &ldquo;Actions&rdquo; tab of your repository you can watch the job run. When it shows a green checkmark, look at the &ldquo;Packages&rdquo; tab of the &ldquo;darkstar&rdquo; organization: there should be a package &ldquo;blog-production&rdquo; with one version.</p>
<p>If your job stays in the &ldquo;Waiting&rdquo; state forever, then no runner has the label &ldquo;docker&rdquo;. That happened to me: my existing runner only had labels for running Slackware build jobs. Adding a docker label to the runner&rsquo;s configuration file and restarting the runner fixed it.</p>
<h5 id="search-with-pagefind">Search with Pagefind</h5>
<p>You may have noticed the <code>pagefind</code> command in the build script. Search is one of those things that you think needs a server, but <a href="https://pagefind.app/" target="_blank" rel="noopener">Pagefind</a> proves otherwise. After Hugo has written the site, Pagefind reads all the HTML files and creates a compact search index, split into small chunks. A bit of JavaScript on your search page downloads only the chunks it needs for the words someone types, so even a large blog gets a fast search without any search server.</p>
<p>The search page in your theme needs only this:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#f92672">link</span> <span style="color:#a6e22e">href</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/pagefind/pagefind-ui.css&#34;</span> <span style="color:#a6e22e">rel</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;stylesheet&#34;</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">div</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;search&#34;</span>&gt;&lt;/<span style="color:#f92672">div</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">script</span> <span style="color:#a6e22e">src</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/pagefind/pagefind-ui.js&#34;</span>&gt;&lt;/<span style="color:#f92672">script</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">script</span>&gt;
</span></span><span style="display:flex;"><span>  window.<span style="color:#a6e22e">addEventListener</span>(<span style="color:#e6db74">&#39;DOMContentLoaded&#39;</span>, <span style="color:#66d9ef">function</span> () {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">PagefindUI</span>({ <span style="color:#a6e22e">element</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;#search&#39;</span>, <span style="color:#a6e22e">showImages</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">false</span> });
</span></span><span style="display:flex;"><span>  });
</span></span><span style="display:flex;"><span>&lt;/<span style="color:#f92672">script</span>&gt;
</span></span></code></pre></div><p>Add a <code>data-pagefind-body</code> attribute to the HTML element that holds the text of your posts, so that Pagefind indexes your articles and not the sidebar that is repeated on every page.</p>
<h4 id="the-web-server-pulls-the-site">The web server pulls the site</h4>
<h5 id="why-pull-instead-of-push">Why pull instead of push?</h5>
<p>The common way to deploy a website from a CI job is to let the job copy the files to the web server with rsync over SSH. That means storing an SSH private key with write access to your web server in the CI system. I don&rsquo;t want write-capable SSH keys lying around on Internet-connected machines. And when I move my web server to another provider, I don&rsquo;t want to touch my build setup.</p>
<p>So the web server fetches the site itself. All it needs is outgoing HTTPS to the forge, and (if your organization is private) a token that can only <em>read</em> packages.</p>
<h5 id="the-sitepull-script">The sitepull script</h5>
<p>Save this as /usr/local/sbin/sitepull.sh and make it executable:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e">#!/bin/bash
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"># sitepull.sh - pull the newest static site build from a Forgejo generic</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># package registry and activate it with an atomic symlink switch.</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Usage: sitepull.sh /path/to/site.conf</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Layout under SITE_ROOT:</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#   current     -&gt; releases/&lt;version&gt;    (Apache DocumentRoot)</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#   releases/   one directory per activated build</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#   incoming/   temporary download area</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#   PIN         optional; contains a version string to stay on</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Rollback: echo &lt;version&gt; &gt; $SITE_ROOT/PIN   (next run switches to it)</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Resume  : rm $SITE_ROOT/PIN                  (follow newest again)</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Hook: POST_ACTIVATE in the configuration names a command that runs right</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># after each switch, when the new build is live (for instance</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># mastodon-announce.py to toot new posts). It gets SITE_ROOT, SITE_VERSION</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># and SITE_PREVIOUS in its environment. If it fails, sitepull runs it again</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># on every following round until it succeeds; a failing hook never stops</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># or undoes the switch itself.</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>set -euo pipefail
</span></span><span style="display:flex;"><span>umask <span style="color:#ae81ff">022</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>CONF<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>1:?Usage: $0 /path/to/site.conf<span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># shellcheck source=/dev/null</span>
</span></span><span style="display:flex;"><span>. <span style="color:#e6db74">&#34;</span>$CONF<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>FORGE_URL:?FORGE_URL not set in $CONF<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>PKG_OWNER:?PKG_OWNER not set in $CONF<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>PKG_NAME:?PKG_NAME not set in $CONF<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>: <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>SITE_ROOT:?SITE_ROOT not set in $CONF<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>KEEP_RELEASES<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>KEEP_RELEASES<span style="color:#66d9ef">:-</span>5<span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span>MIN_FILES<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>MIN_FILES<span style="color:#66d9ef">:-</span>50<span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span>POST_ACTIVATE<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>POST_ACTIVATE<span style="color:#66d9ef">:-</span><span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span>HOOK_TIMEOUT<span style="color:#f92672">=</span><span style="color:#e6db74">${</span>HOOK_TIMEOUT<span style="color:#66d9ef">:-</span>300<span style="color:#e6db74">}</span>
</span></span><span style="display:flex;"><span>TAG<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;sitepull[</span>$PKG_NAME<span style="color:#e6db74">]&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>log<span style="color:#f92672">()</span> <span style="color:#f92672">{</span> logger -t <span style="color:#e6db74">&#34;</span>$TAG<span style="color:#e6db74">&#34;</span> -- <span style="color:#e6db74">&#34;</span>$*<span style="color:#e6db74">&#34;</span>; <span style="color:#f92672">}</span>
</span></span><span style="display:flex;"><span>die<span style="color:#f92672">()</span> <span style="color:#f92672">{</span> log <span style="color:#e6db74">&#34;ERROR: </span>$*<span style="color:#e6db74">&#34;</span>; echo <span style="color:#e6db74">&#34;</span>$TAG<span style="color:#e6db74"> ERROR: </span>$*<span style="color:#e6db74">&#34;</span> &gt;&amp;2; exit 1; <span style="color:#f92672">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>CURL<span style="color:#f92672">=(</span>curl -fsS --retry <span style="color:#ae81ff">2</span> --connect-timeout <span style="color:#ae81ff">20</span> --max-time 900<span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> -n <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>READ_TOKEN<span style="color:#66d9ef">:-</span><span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>  CURL<span style="color:#f92672">+=(</span>-H <span style="color:#e6db74">&#34;Authorization: token </span>$READ_TOKEN<span style="color:#e6db74">&#34;</span><span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>mkdir -p <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/releases&#34;</span> <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/incoming&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># One run per site at a time; a slow download must not overlap the next</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># cron tick.</span>
</span></span><span style="display:flex;"><span>exec 9&gt;<span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/.lock&#34;</span>
</span></span><span style="display:flex;"><span>flock -n <span style="color:#ae81ff">9</span> <span style="color:#f92672">||</span> exit <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Run the POST_ACTIVATE hook; remember a failure so the next round retries.</span>
</span></span><span style="display:flex;"><span>run_hook<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">[</span> -n <span style="color:#e6db74">&#34;</span>$POST_ACTIVATE<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span> <span style="color:#f92672">||</span> <span style="color:#66d9ef">return</span> <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Word splitting on purpose: POST_ACTIVATE is &#34;command [arguments]&#34;.</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># shellcheck disable=SC2086</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> SITE_ROOT<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">&#34;</span> SITE_VERSION<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$1<span style="color:#e6db74">&#34;</span> SITE_PREVIOUS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>2<span style="color:#66d9ef">:-</span><span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>     timeout <span style="color:#e6db74">&#34;</span>$HOOK_TIMEOUT<span style="color:#e6db74">&#34;</span> $POST_ACTIVATE &lt;/dev/null; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>    rm -f <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/.hook-retry&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">else</span>
</span></span><span style="display:flex;"><span>    echo <span style="color:#e6db74">&#34;</span>$1<span style="color:#e6db74">&#34;</span> &gt; <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/.hook-retry&#34;</span>
</span></span><span style="display:flex;"><span>    log <span style="color:#e6db74">&#34;post-activate hook failed for </span>$1<span style="color:#e6db74">, will retry next round&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Decide which version we want: the pinned one, or the newest published.</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> -s <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/PIN&#34;</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>  WANT<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>tr -d <span style="color:#e6db74">&#39;[:space:]&#39;</span> &lt; <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/PIN&#34;</span><span style="color:#66d9ef">)</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">else</span>
</span></span><span style="display:flex;"><span>  LIST<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>CURL[@]<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;</span>$FORGE_URL<span style="color:#e6db74">/api/v1/packages/</span>$PKG_OWNER<span style="color:#e6db74">?type=generic&amp;q=</span>$PKG_NAME<span style="color:#e6db74">&amp;limit=50&#34;</span><span style="color:#66d9ef">)</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    <span style="color:#f92672">||</span> die <span style="color:#e6db74">&#34;cannot query the package list at </span>$FORGE_URL<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  WANT<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>printf <span style="color:#e6db74">&#39;%s&#39;</span> <span style="color:#e6db74">&#34;</span>$LIST<span style="color:#e6db74">&#34;</span> | jq -r --arg n <span style="color:#e6db74">&#34;</span>$PKG_NAME<span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#39;[.[] | select(.name == $n) | .version] | sort | last // empty&#39;</span><span style="color:#66d9ef">)</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> -z <span style="color:#e6db74">&#34;</span>$WANT<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>  log <span style="color:#e6db74">&#34;no published version yet&#34;</span>
</span></span><span style="display:flex;"><span>  exit <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">case</span> <span style="color:#e6db74">&#34;</span>$WANT<span style="color:#e6db74">&#34;</span> in
</span></span><span style="display:flex;"><span>  *<span style="color:#f92672">[</span>!A-Za-z0-9._-<span style="color:#f92672">]</span>*<span style="color:#f92672">)</span> die <span style="color:#e6db74">&#34;refusing odd version string &#39;</span>$WANT<span style="color:#e6db74">&#39;&#34;</span> ;;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">esac</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>CUR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> -L <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/current&#34;</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>  CUR<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>basename <span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>readlink <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/current&#34;</span><span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">)</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$WANT<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;</span>$CUR<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">[</span> -e <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/.hook-retry&#34;</span> <span style="color:#f92672">]</span> <span style="color:#f92672">&amp;&amp;</span> run_hook <span style="color:#e6db74">&#34;</span>$CUR<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  exit <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>REL<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/releases/</span>$WANT<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> ! -d <span style="color:#e6db74">&#34;</span>$REL<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>  TMP<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>mktemp -d <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/incoming/</span>$WANT<span style="color:#e6db74">.XXXXXX&#34;</span><span style="color:#66d9ef">)</span>
</span></span><span style="display:flex;"><span>  trap <span style="color:#e6db74">&#39;rm -rf &#34;$TMP&#34;&#39;</span> EXIT
</span></span><span style="display:flex;"><span>  BASE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$FORGE_URL<span style="color:#e6db74">/api/packages/</span>$PKG_OWNER<span style="color:#e6db74">/generic/</span>$PKG_NAME<span style="color:#e6db74">/</span>$WANT<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># The CI job uploads the checksum last, so a missing checksum means the</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># upload is still in progress. Fetch it first and retry later if absent.</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> ! <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>CURL[@]<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> -o <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/site.tar.gz.sha256&#34;</span> <span style="color:#e6db74">&#34;</span>$BASE<span style="color:#e6db74">/site.tar.gz.sha256&#34;</span> 2&gt;/dev/null; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>    log <span style="color:#e6db74">&#34;version </span>$WANT<span style="color:#e6db74"> not complete yet, will retry&#34;</span>
</span></span><span style="display:flex;"><span>    exit <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span>  <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>CURL[@]<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> -o <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/site.tar.gz&#34;</span> <span style="color:#e6db74">&#34;</span>$BASE<span style="color:#e6db74">/site.tar.gz&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    <span style="color:#f92672">||</span> die <span style="color:#e6db74">&#34;download of </span>$WANT<span style="color:#e6db74"> failed&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">(</span>cd <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">&amp;&amp;</span> sha256sum -c --quiet site.tar.gz.sha256<span style="color:#f92672">)</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>    <span style="color:#f92672">||</span> die <span style="color:#e6db74">&#34;checksum mismatch for </span>$WANT<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Refuse archives with absolute paths, parent directory components,</span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># symlinks or hard links. A Hugo build contains none of these.</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> tar -tzf <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/site.tar.gz&#34;</span> | grep -qE <span style="color:#e6db74">&#39;^/|(^|/)\.\.(/|$)&#39;</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>    die <span style="color:#e6db74">&#34;unsafe path names in </span>$WANT<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> tar -tvzf <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/site.tar.gz&#34;</span> | grep -q <span style="color:#e6db74">&#39;^[lh]&#39;</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>    die <span style="color:#e6db74">&#34;links found in </span>$WANT<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  mkdir <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/tree&#34;</span>
</span></span><span style="display:flex;"><span>  tar -xzf <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/site.tar.gz&#34;</span> -C <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/tree&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>      --no-same-owner --no-same-permissions
</span></span><span style="display:flex;"><span>  chmod -R u<span style="color:#f92672">=</span>rwX,go<span style="color:#f92672">=</span>rX <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/tree&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Sanity checks against an empty or truncated build.</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">[</span> -f <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/tree/index.html&#34;</span> <span style="color:#f92672">]</span> <span style="color:#f92672">||</span> die <span style="color:#e6db74">&#34;</span>$WANT<span style="color:#e6db74"> has no index.html&#34;</span>
</span></span><span style="display:flex;"><span>  N<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>find <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/tree&#34;</span> -type f | wc -l<span style="color:#66d9ef">)</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$N<span style="color:#e6db74">&#34;</span> -ge <span style="color:#e6db74">&#34;</span>$MIN_FILES<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span> <span style="color:#f92672">||</span> die <span style="color:#e6db74">&#34;</span>$WANT<span style="color:#e6db74"> has only </span>$N<span style="color:#e6db74"> files (minimum </span>$MIN_FILES<span style="color:#e6db74">)&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  mv <span style="color:#e6db74">&#34;</span>$TMP<span style="color:#e6db74">/tree&#34;</span> <span style="color:#e6db74">&#34;</span>$REL<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Atomic switch: create the new symlink beside the old one, then rename</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># it over the old one. Apache never sees a missing DocumentRoot.</span>
</span></span><span style="display:flex;"><span>ln -sfn <span style="color:#e6db74">&#34;releases/</span>$WANT<span style="color:#e6db74">&#34;</span> <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/current.new&#34;</span>
</span></span><span style="display:flex;"><span>mv -Tf <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/current.new&#34;</span> <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/current&#34;</span>
</span></span><span style="display:flex;"><span>log <span style="color:#e6db74">&#34;activated </span>$WANT<span style="color:#e6db74"> (previous: </span><span style="color:#e6db74">${</span>CUR<span style="color:#66d9ef">:-</span>none<span style="color:#e6db74">}</span><span style="color:#e6db74">)&#34;</span>
</span></span><span style="display:flex;"><span>run_hook <span style="color:#e6db74">&#34;</span>$WANT<span style="color:#e6db74">&#34;</span> <span style="color:#e6db74">&#34;</span>$CUR<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Remove old releases, never the active one.</span>
</span></span><span style="display:flex;"><span>find <span style="color:#e6db74">&#34;</span>$SITE_ROOT<span style="color:#e6db74">/releases&#34;</span> -mindepth <span style="color:#ae81ff">1</span> -maxdepth <span style="color:#ae81ff">1</span> -type d -printf <span style="color:#e6db74">&#39;%f\n&#39;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>| sort | head -n -<span style="color:#e6db74">&#34;</span>$KEEP_RELEASES<span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>| <span style="color:#66d9ef">while</span> read -r old; <span style="color:#66d9ef">do</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$old<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;</span>$WANT<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span> <span style="color:#f92672">||</span> rm -rf -- <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>SITE_ROOT:?<span style="color:#e6db74">}</span><span style="color:#e6db74">/releases/</span>$old<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">done</span>
</span></span></code></pre></div><p>A few things in there are worth pointing out, because they make the difference between &ldquo;works on a sunny day&rdquo; and &ldquo;never breaks the site&rdquo;:</p>
<ul>
<li>The build job uploads the checksum file <em>last</em>. The script fetches the checksum <em>first</em>. If it is not there yet, the upload is still in progress, and the script simply tries again at the next cron run. You&rsquo;ll never activate a half-uploaded site.</li>
<li>The new site is unpacked next to the old one, and then a symlink is switched over with an atomic <code>mv</code>. Apache never sees a missing or half-filled DocumentRoot.</li>
<li>Old builds are kept on disk. If a new build turns out to be broken, you go back with one command: <code>echo &lt;version&gt; &gt; /usr/local/blog/PIN</code>. Remove the PIN file when the problem is fixed.</li>
<li>After the switch, the script can run a command of your choice: the <code>POST_ACTIVATE</code> hook. At that moment the new build is live, which makes it the perfect place to tell the world about a new post. More about that in &ldquo;Announcing new posts on Mastodon&rdquo; below. Without a <code>POST_ACTIVATE</code> line in the configuration, nothing happens.</li>
</ul>
<p>The configuration file /etc/sitepull/blog.conf:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>FORGE_URL<span style="color:#f92672">=</span>https://forge.darkstar.lan
</span></span><span style="display:flex;"><span>PKG_OWNER<span style="color:#f92672">=</span>darkstar
</span></span><span style="display:flex;"><span>PKG_NAME<span style="color:#f92672">=</span>blog-production
</span></span><span style="display:flex;"><span>SITE_ROOT<span style="color:#f92672">=</span>/usr/local/blog
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Only needed when the package owner is not publicly visible.</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Use a token with the package READ scope only.</span>
</span></span><span style="display:flex;"><span>READ_TOKEN<span style="color:#f92672">=</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>KEEP_RELEASES<span style="color:#f92672">=</span><span style="color:#ae81ff">5</span>
</span></span><span style="display:flex;"><span>MIN_FILES<span style="color:#f92672">=</span><span style="color:#ae81ff">50</span>
</span></span></code></pre></div><p>Make that file readable only for the account that runs the script if it contains a token. Then add a cron job, for instance in the crontab of a dedicated unprivileged user that owns /usr/local/blog:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>*/5 * * * * /usr/local/sbin/sitepull.sh /etc/sitepull/blog.conf
</span></span></code></pre></div><p>Run the script once by hand and check your <code>/var/log/messages</code> for the &ldquo;activated&rdquo; message.</p>
<h5 id="the-apache-virtual-host">The Apache virtual host</h5>
<p>The VirtualHost for blog.darkstar.lan gets this configuration block:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-apache" data-lang="apache"><span style="display:flex;"><span>    <span style="color:#75715e"># The symlink is switched atomically by sitepull.sh.</span>
</span></span><span style="display:flex;"><span>    DocumentRoot <span style="color:#e6db74">&#34;/usr/local/blog/current&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;Directory</span> <span style="color:#e6db74">&#34;/usr/local/blog&#34;</span><span style="color:#f92672">&gt;</span>
</span></span><span style="display:flex;"><span>        Options FollowSymLinks
</span></span><span style="display:flex;"><span>        AllowOverride <span style="color:#66d9ef">None</span>
</span></span><span style="display:flex;"><span>        Require <span style="color:#66d9ef">all</span> granted
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;/Directory&gt;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># Hugo&#39;s own &#34;page not found&#34; page, in the blog&#39;s layout.</span>
</span></span><span style="display:flex;"><span>    ErrorDocument <span style="color:#ae81ff">404</span> <span style="color:#e6db74">/404.html</span>
</span></span></code></pre></div><p>Check your Apache configuration for global <code>Alias</code> directives before you start. My server had an old <code>Alias /css</code> in a global configuration file which silently hijacked the stylesheet of the new blog. I moved all the theme&rsquo;s files under a <code>/_ap/</code> prefix (&ldquo;Alien Pastures&rdquo;) to stay clear of such collisions.</p>
<h4 id="comments-with-artalk">Comments with Artalk</h4>
<p><a href="https://artalk.js.org/" target="_blank" rel="noopener">Artalk</a> is a self-hosted comment system: a small server written in Go, plus a JavaScript widget that you put on your pages. Readers enter a name and an email address (no account, no third-party login), and the comment is stored in a SQLite database on your own server. It supports threaded replies, email notifications, a moderation queue, Akismet spam checking, and it can import comments from other systems.</p>
<p>I looked at several alternatives. Artalk was the winner for me. It does not require any credentials like <em>OpenID Connect</em> or <em>social login</em> for commenters. People should be able to comment with just a name and an email address, as they could on WordPress. It also offers a moderation queue for comments from new people, and a good import tool.</p>
<h5 id="docker-compose">Docker Compose</h5>
<p>Create /opt/artalk/docker-compose.yml. All of Artalk&rsquo;s settings can be given as environment variables, so you never have to edit its own configuration file:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">services</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">artalk</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">image</span>: <span style="color:#ae81ff">artalk/artalk-go:2.10.1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">container_name</span>: <span style="color:#ae81ff">artalk</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># Only Apache on this host talks to Artalk; it terminates TLS.</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">ports</span>:
</span></span><span style="display:flex;"><span>      - <span style="color:#e6db74">&#34;127.0.0.1:23366:23366&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">volumes</span>:
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">/usr/local/artalk:/data</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">environment</span>:
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">TZ</span>: <span style="color:#e6db74">&#34;Europe/Amsterdam&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_TIMEZONE</span>: <span style="color:#e6db74">&#34;Europe/Amsterdam&#34;</span>        <span style="color:#75715e"># the default is Asia/Shanghai</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_LOCALE</span>: <span style="color:#e6db74">&#34;en&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_SITE_DEFAULT</span>: <span style="color:#e6db74">&#34;My Blog&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_SITE_URL</span>: <span style="color:#e6db74">&#34;https://blog.darkstar.lan&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_TRUSTED_DOMAINS</span>: <span style="color:#e6db74">&#34;https://blog.darkstar.lan&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># Behind Apache: take the reader&#39;s address from X-Forwarded-For,</span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># otherwise rate limits and Akismet only see the proxy.</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_HTTP_PROXY_HEADER</span>: <span style="color:#e6db74">&#34;X-Forwarded-For&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># Your admin account, created or updated at every start.</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_0_NAME</span>: <span style="color:#e6db74">&#34;alien&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_0_EMAIL</span>: <span style="color:#e6db74">&#34;alien@darkstar.lan&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_0_PASSWORD</span>: <span style="color:#e6db74">&#34;${ARTALK_ADMIN_PASSWORD}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_0_BADGE_NAME</span>: <span style="color:#e6db74">&#34;Post author&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_0_BADGE_COLOR</span>: <span style="color:#e6db74">&#34;#1abc9c&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># A second admin, used only by the moderation sidecar.</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_1_NAME</span>: <span style="color:#e6db74">&#34;moderator-bot&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_1_EMAIL</span>: <span style="color:#e6db74">&#34;moderator-bot@darkstar.lan&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_1_PASSWORD</span>: <span style="color:#e6db74">&#34;${ARTALK_BOT_PASSWORD}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_USERS_1_RECEIVE_EMAIL</span>: <span style="color:#e6db74">&#34;false&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># Moderation and anti-spam.</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_MODERATOR_PENDING_DEFAULT</span>: <span style="color:#e6db74">&#34;true&#34;</span>   <span style="color:#75715e"># every new comment waits</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_MODERATOR_AKISMET_KEY</span>: <span style="color:#e6db74">&#34;${ARTALK_AKISMET_KEY}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_CAPTCHA_ALWAYS</span>: <span style="color:#e6db74">&#34;false&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_CAPTCHA_ACTION_LIMIT</span>: <span style="color:#e6db74">&#34;3&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_CAPTCHA_ACTION_RESET</span>: <span style="color:#e6db74">&#34;60&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># Mail: notify me about new comments.</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_ENABLED</span>: <span style="color:#e6db74">&#34;true&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_SEND_TYPE</span>: <span style="color:#e6db74">&#34;smtp&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_SMTP_HOST</span>: <span style="color:#e6db74">&#34;${ARTALK_SMTP_HOST}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_SMTP_PORT</span>: <span style="color:#e6db74">&#34;${ARTALK_SMTP_PORT}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_SMTP_USERNAME</span>: <span style="color:#e6db74">&#34;${ARTALK_SMTP_USERNAME}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_SMTP_PASSWORD</span>: <span style="color:#e6db74">&#34;${ARTALK_SMTP_PASSWORD}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_SEND_ADDR</span>: <span style="color:#e6db74">&#34;${ARTALK_SMTP_FROM}&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_EMAIL_SEND_NAME</span>: <span style="color:#e6db74">&#34;My Blog&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_NOTIFY_EMAIL_ENABLED</span>: <span style="color:#e6db74">&#34;true&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_ADMIN_NOTIFY_NOTIFY_PENDING</span>: <span style="color:#e6db74">&#34;true&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># Look and feel: pixel-art avatars for people without a Gravatar,</span>
</span></span><span style="display:flex;"><span>      <span style="color:#75715e"># no emoticon list from a CDN, no voting.</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_FRONTEND_GRAVATAR_PARAMS</span>: <span style="color:#e6db74">&#34;sha256=1&amp;d=retro&amp;s=240&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_FRONTEND_EMOTICONS</span>: <span style="color:#e6db74">&#34;false&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">ATK_FRONTEND_VOTE</span>: <span style="color:#e6db74">&#34;false&#34;</span>
</span></span></code></pre></div><p>The secrets go into /opt/artalk/.env, which Docker Compose reads automatically. Make it readable only by root (<code>chmod 600 /opt/artalk/.env</code>):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ARTALK_ADMIN_PASSWORD<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;(bcrypt)$2y$10$REPLACE_WITH_YOUR_HASH&#39;</span>
</span></span><span style="display:flex;"><span>ARTALK_BOT_PASSWORD<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;(bcrypt)$2y$10$REPLACE_WITH_THE_BOT_HASH&#39;</span>
</span></span><span style="display:flex;"><span>ARTALK_AKISMET_KEY<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;REPLACE&#39;</span>
</span></span><span style="display:flex;"><span>ARTALK_SMTP_HOST<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;smtp.darkstar.lan&#39;</span>
</span></span><span style="display:flex;"><span>ARTALK_SMTP_PORT<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;587&#39;</span>
</span></span><span style="display:flex;"><span>ARTALK_SMTP_USERNAME<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;REPLACE&#39;</span>
</span></span><span style="display:flex;"><span>ARTALK_SMTP_PASSWORD<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;REPLACE&#39;</span>
</span></span><span style="display:flex;"><span>ARTALK_SMTP_FROM<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;comments@darkstar.lan&#39;</span>
</span></span></code></pre></div><p>Note the <em>single</em> quotes around the bcrypt hashes. A bcrypt hash contains <code>$</code> characters, and without single quotes Docker Compose tries to expand <code>$2y</code> and <code>$10</code> as variables, silently mangling your password hash. And yes, it really is <code>ATK_ADMIN_NOTIFY_NOTIFY_PENDING</code> with the double &ldquo;NOTIFY&rdquo;: the setting <code>notify_pending</code> lives inside the <code>admin_notify</code> section of Artalk&rsquo;s configuration.</p>
<p>Start it:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span># mkdir -p /usr/local/artalk
</span></span><span style="display:flex;"><span># cd /opt/artalk
</span></span><span style="display:flex;"><span># docker compose up -d
</span></span><span style="display:flex;"><span># docker compose logs -f
</span></span></code></pre></div><h5 id="apache-reverse-proxy-for-commentsdarkstarlan">Apache reverse proxy for comments.darkstar.lan</h5>
<p>These are the bits that you need to copy into the Apache <code>VirtualHost</code> block of the comments server.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-apache" data-lang="apache"><span style="display:flex;"><span>    ProxyRequests     <span style="color:#66d9ef">Off</span>
</span></span><span style="display:flex;"><span>    ProxyPreserveHost <span style="color:#66d9ef">On</span>
</span></span><span style="display:flex;"><span>    ProxyPass         <span style="color:#e6db74">&#34;/&#34;</span> <span style="color:#e6db74">&#34;http://127.0.0.1:23366/&#34;</span>
</span></span><span style="display:flex;"><span>    ProxyPassReverse  <span style="color:#e6db74">&#34;/&#34;</span> <span style="color:#e6db74">&#34;http://127.0.0.1:23366/&#34;</span>
</span></span><span style="display:flex;"><span>    RequestHeader set X-Forwarded-Proto <span style="color:#e6db74">&#34;https&#34;</span>
</span></span></code></pre></div><p>One thing to watch out for: when you are logged in as admin, Artalk&rsquo;s comment box shows a &ldquo;Dashboard&rdquo; link that opens the admin panel in a frame on your blog page. If your Apache configuration sends an <code>X-Frame-Options</code> header (many hardening guides recommend that), the browser refuses to show any content from <em>comments.darkstar.lan</em> inside your blog, with an unhelpful &ldquo;refused to connect&rdquo;. The fix is a Content Security Policy that explicitly allows your blog to frame the comment server. Modern browsers ignore X-Frame-Options when frame-ancestors is present:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-apache" data-lang="apache"><span style="display:flex;"><span>    Header always set Content-Security-Policy <span style="color:#e6db74">&#34;frame-ancestors https://blog.darkstar.lan&#34;</span>
</span></span></code></pre></div><h5 id="show-the-comments-on-your-pages">Show the comments on your pages</h5>
<p>In your theme, add a partial template (for instance layouts/_partials/comments.html) and include it at the bottom of your post template:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>{{- with site.Params.artalk }}
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">div</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;comments&#34;</span>&gt;&lt;/<span style="color:#f92672">div</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">link</span> <span style="color:#a6e22e">href</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;{{ .server }}/dist/Artalk.css&#34;</span> <span style="color:#a6e22e">rel</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;stylesheet&#34;</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">script</span> <span style="color:#a6e22e">src</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;{{ .server }}/dist/Artalk.js&#34;</span>&gt;&lt;/<span style="color:#f92672">script</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">script</span>&gt;
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">Artalk</span>.<span style="color:#a6e22e">init</span>({
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">el</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;#comments&#39;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">server</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;{{ .server }}&#39;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">site</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;{{ .site }}&#39;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">pageKey</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;{{ $.RelPermalink }}&#39;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">pageTitle</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;{{ $.Title }}&#39;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#75715e">// Oldest comments first, like WordPress.
</span></span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">listFetchParamsModifier</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">function</span> (<span style="color:#a6e22e">params</span>) { <span style="color:#a6e22e">params</span>.<span style="color:#a6e22e">sort_by</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;date_asc&#39;</span>; }
</span></span><span style="display:flex;"><span>  });
</span></span><span style="display:flex;"><span>&lt;/<span style="color:#f92672">script</span>&gt;
</span></span><span style="display:flex;"><span>{{- end }}
</span></span></code></pre></div><p>The <code>pageKey</code> is how Artalk knows which comments belong to which page. Use the page&rsquo;s path, so that comments survive a change of domain name.</p>
<p>To reply to a comment as the blog&rsquo;s author: just type your admin name and email address into the comment box. Artalk recognizes them and asks for your password before it accepts the comment. Nobody can post as you without that password. Once you are logged in, your replies are published immediately and carry your &ldquo;Post author&rdquo; badge.</p>
<h4 id="moderation-the-wordpress-way">Moderation, the WordPress way</h4>
<p>With <code>ATK_MODERATOR_PENDING_DEFAULT</code> set to &ldquo;true&rdquo;, every new comment waits in the moderation queue until you approve it. That is safe, but it gets tedious. WordPress had a nice rule for this: &ldquo;comment author must have a previously approved comment&rdquo;. Your regular readers get through immediately, but the unknown visitors have to wait for you to process the moderation queue.</p>
<p>Artalk does not have that rule, so I wrote a small Python script that adds it. It runs from cron every minute, looks at the comments that arrived since its previous run, and decides:</p>
<table>
	<thead>
			<tr>
					<th>Comment</th>
					<th>Result</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Same name <strong>and</strong> email address already has an approved comment</td>
					<td>approved, unless Akismet calls it spam or it contains more than 2 links</td>
			</tr>
			<tr>
					<td>Uses the name <strong>or</strong> the email address of an admin</td>
					<td>stays pending, and gets a warning label in front of the text</td>
			</tr>
			<tr>
					<td>Anybody else</td>
					<td>stays pending, for you to review</td>
			</tr>
	</tbody>
</table>
<p>That second rule is there because Artalk only asks for a password when <em>both</em> your name and your email address are entered. Someone who uses your name with a different email address would end up in the queue anyway, but now you can&rsquo;t approve it by accident.</p>
<p>The script logs in as the &ldquo;moderator-bot&rdquo; admin account that we defined in the Docker Compose file, so your own password is never stored in a plain text file. It only uses the Python standard library, so there is nothing to install. You can download it, with its configuration example and a logrotate file, from the <a href="https://forge.slackware.nl/alienbob/hugo-blog-kit/src/branch/main/artalk" target="_blank" rel="noopener">artalk directory of the hugo-blog-kit</a>.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span># install -m 755 artalk-moderator.py /opt/artalk/
</span></span><span style="display:flex;"><span># install -m 600 moderator.conf.example /opt/artalk/moderator.conf
</span></span><span style="display:flex;"><span># vi /opt/artalk/moderator.conf        # bot password, Akismet key
</span></span><span style="display:flex;"><span># python3 /opt/artalk/artalk-moderator.py --check
</span></span></code></pre></div><p>The <code>--check</code> verifies the database, the bot&rsquo;s login and your Akismet key. Then add it to root&rsquo;s crontab:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>* * * * * /usr/bin/python3 /opt/artalk/artalk-moderator.py &gt;&gt; /var/log/artalk-moderator.log 2&gt;&amp;1
</span></span></code></pre></div><p>Every decision ends up as one line in the log, so you can always see why a comment was or wasn&rsquo;t approved:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>id=20702 user=&#39;erics&#39; page=/my-post/ -&gt; approved: known commenter (1 approved), Akismet ham
</span></span><span style="display:flex;"><span>id=20700 user=&#39;alien&#39; page=/my-post/ -&gt; flagged, stays pending: impersonation: uses the name of admin &#34;alien&#34;
</span></span></code></pre></div><h4 id="writing-posts-in-your-browser-with-sveltia-cms">Writing posts in your browser with Sveltia CMS</h4>
<p><a href="https://sveltiacms.app/" target="_blank" rel="noopener">Sveltia CMS</a> is a &ldquo;Git-based headless CMS&rdquo;. Behind that mouthful hides something quite elegant. It is a single web page, which you put on your blog at <a href="https://blog.darkstar.lan/admin/" target="_blank" rel="noopener">https://blog.darkstar.lan/admin/</a>. When you open it, you log in at your Forgejo server, and from then on Sveltia reads and writes the files in your blog&rsquo;s git repository through Forgejo&rsquo;s API. There is no server-side component, no database, no login system of its own. The web server only serves two static files.</p>
<p>Sveltia is a modern rewrite of Netlify CMS (later Decap CMS) and it supports Forgejo directly. It needs Forgejo 12 or newer.</p>
<h5 id="register-an-oauth2-application">Register an OAuth2 application</h5>
<p>In Forgejo, go to <em>Settings &gt; Applications</em> (for your own account, or the organization&rsquo;s) and create a new OAuth2 application:</p>
<ul>
<li><strong>Application name</strong>: My Blog CMS</li>
<li><strong>Redirect URI</strong>: <a href="https://blog.darkstar.lan/admin/" target="_blank" rel="noopener">https://blog.darkstar.lan/admin/</a> (with the trailing slash)</li>
<li><strong>Confidential client</strong>: <em>unticked</em></li>
</ul>
<p>Forgejo shows you a Client ID and a Client Secret. You only need the Client ID. Sveltia runs in the browser, so it cannot keep a secret anyway; it uses PKCE instead, a method where the browser proves for every single login that it is the same browser that started that login.</p>
<h5 id="allow-your-blog-to-talk-to-the-forge-cors">Allow your blog to talk to the forge (CORS)</h5>
<p>The Sveltia page on blog.darkstar.lan sends API requests to forge.darkstar.lan. Browsers block such &ldquo;cross-origin&rdquo; requests unless the server explicitly allows them. Add this to Forgejo&rsquo;s app.ini and restart Forgejo. This is the one step in this article that needs the forge&rsquo;s admin: if that is not you, ask them to add your blog&rsquo;s address.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#66d9ef">[cors]</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">ENABLED</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">true</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">ALLOW_DOMAIN</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">https://blog.darkstar.lan</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">METHODS</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">HEADERS</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">Content-Type,User-Agent,Authorization</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">ALLOW_CREDENTIALS</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">false</span>
</span></span></code></pre></div><p>Pay attention to the <code>HEADERS</code> line. Forgejo&rsquo;s default list does not contain <code>Authorization</code>, and without it you can log in perfectly fine, after which every API call fails.</p>
<p>If you protect your forge with <a href="https://anubis.techaro.lol/" target="_blank" rel="noopener">Anubis</a> against AI scrapers (as I do, see my article about <a href="/slackware-forge-is-being-abused-by-chinese-computer-infrastructure/">the Slackware forge being abused</a>), make sure that <code>/api/</code> and the token endpoint <code>/login/oauth/access_token</code> bypass Anubis. Sveltia&rsquo;s API calls come from another website and carry no Anubis cookie, so a challenge page would break them. The login page itself can stay behind Anubis.</p>
<p>So what happens if you are <em>not</em> the admin of your forge, and the admin does <em>not</em> want to touch the CORS settings? There is a way around it that only involves your own web server. Let Apache pass the editor&rsquo;s API calls on to the forge, under the blog&rsquo;s own address. Add the following to the <code>VirtualHost</code> block of your blog&rsquo;s webserver:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-apache" data-lang="apache"><span style="display:flex;"><span>    SSLProxyEngine <span style="color:#66d9ef">on</span>
</span></span><span style="display:flex;"><span>    ProxyPass        <span style="color:#e6db74">&#34;/_forge/api/&#34;</span> <span style="color:#e6db74">&#34;https://forge.darkstar.lan/api/&#34;</span>
</span></span><span style="display:flex;"><span>    ProxyPassReverse <span style="color:#e6db74">&#34;/_forge/api/&#34;</span> <span style="color:#e6db74">&#34;https://forge.darkstar.lan/api/&#34;</span>
</span></span></code></pre></div><p>Then we make two changes to the Sveltia configuration (see further down for the details of <code>static/admin/config.yml</code>).
Point Sveltia&rsquo;s <code>api_root</code> at <code>https://blog.darkstar.lan/_forge/api/v1</code> instead of <code>https://forge.darkstar.lan/api/v1</code> and add <code>auth_methods: [token]</code>. The browser now only ever talks to your blog, so no CORS is involved.
There&rsquo;s a price to pay of course. Instead of the comfortable &ldquo;Sign in with Forgejo&rdquo;, you sign in once with a personal access token (scopes: <em>user read, repository and issue read/write</em>), which you create in your forge account. I tested this on my own staging site with the forge&rsquo;s CORS setting switched off, and the whole cycle of <em>draft, review and publish</em> worked. The hugo-blog-kit <a href="https://forge.slackware.nl/alienbob/hugo-blog-kit/src/branch/main/README.md" target="_blank" rel="noopener">README</a> describes both variants.</p>
<h5 id="the-admin-page">The admin page</h5>
<p>Create two files in your site&rsquo;s static/ directory. The first one is <code>static/admin/index.html</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-html" data-lang="html"><span style="display:flex;"><span><span style="color:#75715e">&lt;!doctype html&gt;</span>
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">html</span> <span style="color:#a6e22e">lang</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;en&#34;</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">head</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">meta</span> <span style="color:#a6e22e">charset</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;utf-8&#34;</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">meta</span> <span style="color:#a6e22e">name</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;viewport&#34;</span> <span style="color:#a6e22e">content</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;width=device-width, initial-scale=1&#34;</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">meta</span> <span style="color:#a6e22e">name</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;robots&#34;</span> <span style="color:#a6e22e">content</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;noindex, nofollow&#34;</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">title</span>&gt;My Blog - write&lt;/<span style="color:#f92672">title</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">script</span> <span style="color:#a6e22e">src</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://unpkg.com/@sveltia/cms@0.245.1/dist/sveltia-cms.js&#34;</span>
</span></span><span style="display:flex;"><span>          <span style="color:#a6e22e">integrity</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;sha384-WtLM0kE6Istn0n75BQVe+QHHleDS926pjdktjJ16OITlVqpJFAiD69ErfPcwrBvB&#34;</span>
</span></span><span style="display:flex;"><span>          <span style="color:#a6e22e">crossorigin</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;anonymous&#34;</span>&gt;&lt;/<span style="color:#f92672">script</span>&gt;
</span></span><span style="display:flex;"><span>&lt;/<span style="color:#f92672">head</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">body</span>&gt;&lt;/<span style="color:#f92672">body</span>&gt;
</span></span><span style="display:flex;"><span>&lt;/<span style="color:#f92672">html</span>&gt;
</span></span></code></pre></div><p>The code is always downloaded from unpkg.com. I pin an exact version of Sveltia, and the <code>integrity</code> attribute makes the browser refuse the script if the file on the CDN does not match. Sveltia releases a new version almost every day and I&rsquo;d rather upgrade deliberately than break my editor unwittingly.</p>
<p>The second file, <code>static/admin/config.yml</code>, tells Sveltia where your repository is and what a post looks like:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">backend</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">name</span>: <span style="color:#ae81ff">gitea                    </span> <span style="color:#75715e"># also the right name for Forgejo</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">repo</span>: <span style="color:#ae81ff">darkstar/blog</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">branch</span>: <span style="color:#ae81ff">main</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">base_url</span>: <span style="color:#ae81ff">https://forge.darkstar.lan</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">api_root</span>: <span style="color:#ae81ff">https://forge.darkstar.lan/api/v1</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">app_id</span>: <span style="color:#ae81ff">12345678</span>-<span style="color:#ae81ff">abcd-ef01-2345-6789abcdef01   </span> <span style="color:#75715e"># your Client ID</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Drafts live on their own branch with a pull request, so they never</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># reach &#34;main&#34; and never trigger a build. &#34;Publish&#34; merges them.</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">publish_mode</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">type</span>: <span style="color:#ae81ff">editorial_workflow</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">direct_publish</span>: <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">media_folder</span>: <span style="color:#ae81ff">static/images</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">public_folder</span>: <span style="color:#ae81ff">/images</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">collections</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">posts</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">label</span>: <span style="color:#ae81ff">Posts</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">label_singular</span>: <span style="color:#ae81ff">Post</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">folder</span>: <span style="color:#ae81ff">content/posts</span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># content/posts/2026/&lt;name&gt;/index.md, images in the same folder.</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">path</span>: <span style="color:#e6db74">&#34;{{year}}/{{slug}}/index&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">extension</span>: <span style="color:#ae81ff">md</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">format</span>: <span style="color:#ae81ff">yaml-frontmatter</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">create</span>: <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">media_folder</span>: <span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">public_folder</span>: <span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">fields</span>:
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#f92672">Title, name</span>: <span style="color:#f92672">title, widget</span>: <span style="color:#ae81ff">string }</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#f92672">label</span>: <span style="color:#ae81ff">Body</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">name</span>: <span style="color:#ae81ff">body</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">widget</span>: <span style="color:#ae81ff">markdown</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">editor_components</span>: [<span style="color:#ae81ff">image, code-block, table, hr]</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#f92672">label</span>: <span style="color:#ae81ff">Publication date</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">name</span>: <span style="color:#ae81ff">date</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">widget</span>: <span style="color:#ae81ff">datetime</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">default</span>: <span style="color:#e6db74">&#34;{{now}}&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">format</span>: <span style="color:#e6db74">&#34;YYYY-MM-DDTHH:mm:ssZ&#34;</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#f92672">label</span>: <span style="color:#ae81ff">Categories</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">name</span>: <span style="color:#ae81ff">categories</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">widget</span>: <span style="color:#ae81ff">select</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">multiple</span>: <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">options</span>:
</span></span><span style="display:flex;"><span>          - { <span style="color:#f92672">label</span>: <span style="color:#f92672">Linux, value</span>: <span style="color:#ae81ff">linux }</span>
</span></span><span style="display:flex;"><span>          - { <span style="color:#f92672">label</span>: <span style="color:#f92672">Software, value</span>: <span style="color:#ae81ff">software }</span>
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#f92672">Tags, name</span>: <span style="color:#f92672">tags, widget</span>: <span style="color:#f92672">list, required</span>: <span style="color:#66d9ef">false</span> }
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#f92672">Allow comments, name</span>: <span style="color:#f92672">comments, widget</span>: <span style="color:#f92672">boolean, default</span>: <span style="color:#66d9ef">true</span> }
</span></span></code></pre></div><p>Commit, push, wait for the build, and open <a href="https://blog.darkstar.lan/admin/" target="_blank" rel="noopener">https://blog.darkstar.lan/admin/</a>. Click &ldquo;Sign in with Forgejo&rdquo;, approve the &ldquo;Authorize My Blog CMS?&rdquo; question on your forge, and you&rsquo;re in.</p>
<h5 id="drafts-review-publish">Drafts, review, publish</h5>
<p>I use Sveltia&rsquo;s &ldquo;editorial workflow&rdquo;. When you save a new post, Sveltia creates a branch <code>cms/posts/&lt;name&gt;</code> and a pull request on the forge. Your post can be a Draft, In Review, or Ready, and none of that triggers a build, because the build workflow only reacts to the &ldquo;main&rdquo; branch. When you click &ldquo;Publish&rdquo;, Sveltia merges the pull request into main. That push starts the build, and a few minutes later your post is on your blog.</p>
<p>One thing to get used to: your blog&rsquo;s repository now has two writers. Every &ldquo;Publish&rdquo; in Sveltia is a commit on the forge. If you also work on your theme in a local clone, always start with a <code>git pull</code> (and I recommend <code>git config pull.rebase true</code> in that clone), or git will refuse your next push.</p>
<h5 id="making-the-editor-feel-like-wordpress">Making the editor feel like WordPress</h5>
<p>Out of the box, Sveltia&rsquo;s editor gives you bold, italic, strikethrough, links, headings, lists, quotes, code blocks and images. That&rsquo;s a good start, but I am used to the WordPress classic editor. I needed to add the missing functionality that allows me to keep on writing articles in my own recognizable style.</p>
<p>Sveltia can be extended with your own &ldquo;editor components&rdquo; through a small JavaScript API. I wrote a few, in one file that is loaded right after Sveltia:</p>
<ul>
<li>Image with size and alignment:
Choose icon (64 px), small, medium, full width, original or a custom width; left, right, centred or none; a caption; and a link to the full-size image or to a web address. It is stored as a Hugo &ldquo;shortcode&rdquo; in the Markdown text, and a template in my theme creates real resized copies of the image (plus a double-size version for sharp display on high-resolution screens), just like WordPress made its thumbnails.</li>
<li>Coloured text:
I added the colours I used to use.</li>
<li>Underlined text, a <em>YouTube video</em> (click-to-load, nothing is loaded from Google until the reader clicks &ldquo;Play&rdquo;), and the <strong>&quot;</strong><em>Continue reading</em><strong>&quot;</strong> cut.</li>
<li>A preview pane that uses the blog&rsquo;s own stylesheet, so the preview looks like the published post.</li>
</ul>
<p>To show you how little code such a component needs, here is the coloured text button:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#a6e22e">CMS</span>.<span style="color:#a6e22e">registerEditorComponent</span>({
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">id</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;colored-text&#39;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">label</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;Coloured text&#39;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">icon</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;format_color_text&#39;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">trigger</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;button&#39;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">mode</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;dialog&#39;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">summary</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;{{text}}&#39;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">fields</span><span style="color:#f92672">:</span> [
</span></span><span style="display:flex;"><span>    { <span style="color:#a6e22e">name</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;text&#39;</span>, <span style="color:#a6e22e">label</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;Text&#39;</span>, <span style="color:#a6e22e">widget</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;string&#39;</span> },
</span></span><span style="display:flex;"><span>    { <span style="color:#a6e22e">name</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;color&#39;</span>, <span style="color:#a6e22e">label</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;Colour&#39;</span>, <span style="color:#a6e22e">widget</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;select&#39;</span>, <span style="color:#66d9ef">default</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;#008000&#39;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#a6e22e">options</span><span style="color:#f92672">:</span> [ { <span style="color:#a6e22e">label</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;Green&#39;</span>, <span style="color:#a6e22e">value</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;#008000&#39;</span> },
</span></span><span style="display:flex;"><span>                 { <span style="color:#a6e22e">label</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;Orange&#39;</span>, <span style="color:#a6e22e">value</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;#ff6600&#39;</span> },
</span></span><span style="display:flex;"><span>                 { <span style="color:#a6e22e">label</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;Red&#39;</span>, <span style="color:#a6e22e">value</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;#ff0000&#39;</span> } ] }
</span></span><span style="display:flex;"><span>  ],
</span></span><span style="display:flex;"><span>  <span style="color:#75715e">// How to recognize it in the Markdown text...
</span></span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pattern</span><span style="color:#f92672">:</span> <span style="color:#e6db74">/&lt;span style=&#34;color: (#[0-9a-fA-F]{6});&#34;&gt;([^&lt;]*)&lt;\/span&gt;/</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">fromBlock</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">function</span> (<span style="color:#a6e22e">m</span>) { <span style="color:#66d9ef">return</span> { <span style="color:#a6e22e">color</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">m</span>[<span style="color:#ae81ff">1</span>], <span style="color:#a6e22e">text</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">m</span>[<span style="color:#ae81ff">2</span>] }; },
</span></span><span style="display:flex;"><span>  <span style="color:#75715e">// ...and how to write it.
</span></span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">toBlock</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">function</span> (<span style="color:#a6e22e">v</span>) {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#39;&lt;span style=&#34;color: &#39;</span> <span style="color:#f92672">+</span> <span style="color:#a6e22e">v</span>.<span style="color:#a6e22e">color</span> <span style="color:#f92672">+</span> <span style="color:#e6db74">&#39;;&#34;&gt;&#39;</span> <span style="color:#f92672">+</span> <span style="color:#a6e22e">v</span>.<span style="color:#a6e22e">text</span> <span style="color:#f92672">+</span> <span style="color:#e6db74">&#39;&lt;/span&gt;&#39;</span>;
</span></span><span style="display:flex;"><span>  },
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">toPreview</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">function</span> (<span style="color:#a6e22e">v</span>) {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#39;&lt;span style=&#34;color: &#39;</span> <span style="color:#f92672">+</span> <span style="color:#a6e22e">v</span>.<span style="color:#a6e22e">color</span> <span style="color:#f92672">+</span> <span style="color:#e6db74">&#39;;&#34;&gt;&#39;</span> <span style="color:#f92672">+</span> <span style="color:#a6e22e">v</span>.<span style="color:#a6e22e">text</span> <span style="color:#f92672">+</span> <span style="color:#e6db74">&#39;&lt;/span&gt;&#39;</span>;
</span></span><span style="display:flex;"><span>  }
</span></span><span style="display:flex;"><span>});
</span></span></code></pre></div><p>Add <code>colored-text</code> to the <code>editor_components</code> list of the Body field in config.yml, and the button appears in the toolbar. A complete extension file with all of these components is in the hugo-blog-kit, for you to borrow: <a href="https://forge.slackware.nl/alienbob/hugo-blog-kit/src/branch/main/site/static/admin/editor-extensions.js" target="_blank" rel="noopener">editor-extensions.js</a>, and the theme&rsquo;s <a href="https://forge.slackware.nl/alienbob/hugo-blog-kit/src/branch/main/site/themes/hemingway/layouts/_shortcodes/image.html" target="_blank" rel="noopener">image shortcode</a> that goes with it.</p>
<p>A small Hugo template change rounds it off: in WordPress, I opened practically every external link in a new browser tab. Markdown has no syntax for that, but Hugo lets you override how links are rendered. A &ldquo;render hook&rdquo; in my theme (layouts/_markup/render-link.html) adds <code>target=&quot;_blank&quot;</code> to every link that points to another website. I never have to think about it again :-)</p>
<h4 id="announcing-new-posts-on-mastodon">Announcing new posts on Mastodon</h4>
<p>On WordPress, the Jetpack plugin posted a link to every new article on my Mastodon account. Jetpack did that from inside WordPress, at the moment I pressed &ldquo;Publish&rdquo;.
A static site has no such moment. Pressing &ldquo;<em>Publish</em>&rdquo; in Sveltia only starts a build, and the post appears on the blog some minutes later, when sitepull has fetched the new site.</p>
<p>So that <em>sitepull</em> step is where the announcement happens. The sitepull script has a hook which runs right after it switches to a new build, and a small Python script <code>mastodon-announce.py</code> (standard library only, like the moderation sidecar) hangs from that hook. This has some nice properties:</p>
<ul>
<li>The toot goes out when the post is really live. A toot from the CI job would link to a page that does not exist yet.</li>
<li>A post with a date in the future is announced when the nightly build after that date publishes it.</li>
<li>The Mastodon token lives on the web server and nowhere else; the forge and the runner never see it.</li>
</ul>
<p>How does the script know which posts are new?
The theme writes a small file <code>/_theme/toots.json</code> with every build, listing the 50 newest posts: their title, URL, date, tags and a fixed id (the post&rsquo;s folder in the repository). The script remembers the ids of the posts it has seen, and toots every post it has not seen before. Editing a published post, giving it a new title, or rolling back to an older build and forward again, toots nothing. On its first run, the script marks all listed posts as seen without tooting anything, so you don&rsquo;t flood your followers with your entire archive.</p>
<p>There are a few safety nets, because a misbehaving bot is the last thing you want on your Mastodon account:</p>
<ul>
<li>Posts that are dated more than 30 days ago are never tooted automatically.</li>
<li>If more than three new posts show up in a single build, that&rsquo;s a mass change (for instance a re-import), not new writing. Nothing is tooted and you get an email from cron. You then pick the ones you do want announced.</li>
<li>If your Mastodon server is unreachable, sitepull retries on every round until it works. Every toot carries an <code>Idempotency-Key</code> header, so a toot whose answer got lost on the way is not posted twice.</li>
</ul>
<p>A toot looks like this; the text is the post&rsquo;s title, the hashtags come from its tags:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>Slackware Cloud Server Series, Episode 13: Blogging Platform
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>https://blog.darkstar.lan/slackware-cloud-server-series-episode-13-blogging-platform/
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>#Slackware #SlackwareCloudServer #Hugo #Forgejo #Artalk
</span></span></code></pre></div><p>Mastodon fetches the page to build a preview card below the toot. For a good-looking card, the theme adds a description and an image (the first picture of the post) to every page as <code>og:description</code> and <code>og:image</code> meta tags.</p>
<p>In Sveltia, two new fields under the post body give you control: <strong>Toot text</strong>, if you want to write the announcement yourself instead of using the title, and <strong>Announce on Mastodon</strong>, a checkbox to keep a post off Mastodon.</p>
<p>The setup takes five minutes. If you followed <a href="/slackware-cloud-server-series-episode-7-decentralized-social-media/">Episode 7</a>, your account lives at <a href="https://mastodon.darkstar.lan/" target="_blank" rel="noopener">https://mastodon.darkstar.lan/</a>, but any Mastodon server will do.</p>
<p>First, create the token. In Mastodon, go to <em>Preferences &gt; Development &gt; New application</em>, give it a name (the name of your blog is fine), and in the list of scopes, untick &ldquo;read&rdquo;, &ldquo;write&rdquo; and &ldquo;follow&rdquo; and tick only <code>write:statuses</code> and <code>profile</code>. The script can then post toots, and nothing else: it can&rsquo;t read your timeline or your direct messages, or follow anyone. Save the application, open it again, and copy &ldquo;Your access token&rdquo;.</p>
<p>Install the script and its configuration (both are in the <a href="https://forge.slackware.nl/alienbob/hugo-blog-kit" target="_blank" rel="noopener">hugo-blog-kit</a> repository), and make the configuration readable only by the account that runs sitepull, because it contains the token:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span># install -m 755 mastodon-announce.py /usr/local/sbin/
</span></span><span style="display:flex;"><span># install -o someuser -m 600 mastodon-announce.conf.example /etc/sitepull/mastodon-announce.conf
</span></span></code></pre></div><p>The important lines in /etc/sitepull/mastodon-announce.conf are:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>MASTODON_URL<span style="color:#f92672">=</span>https://mastodon.darkstar.lan
</span></span><span style="display:flex;"><span>MASTODON_TOKEN<span style="color:#f92672">=</span>&lt;your access token&gt;
</span></span><span style="display:flex;"><span>SITE_DIR<span style="color:#f92672">=</span>/usr/local/blog/current
</span></span><span style="display:flex;"><span>STATE<span style="color:#f92672">=</span>/usr/local/blog/mastodon-state.json
</span></span><span style="display:flex;"><span>LOG_FILE<span style="color:#f92672">=</span>/usr/local/blog/mastodon-announce.log
</span></span><span style="display:flex;"><span>EXTRA_HASHTAGS<span style="color:#f92672">=</span><span style="color:#75715e">#Slackware</span>
</span></span></code></pre></div><p><strong>As the account that runs sitepull</strong>, check the configuration, and then let the script record the posts that are already on your blog:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>$ python3 /usr/local/sbin/mastodon-announce.py /etc/sitepull/mastodon-announce.conf --check
</span></span><span style="display:flex;"><span>$ python3 /usr/local/sbin/mastodon-announce.py /etc/sitepull/mastodon-announce.conf --seed
</span></span></code></pre></div><p>Running the above two commands is mandatory before you put this into production!</p>
<p>Finally, switch on the hook by adding this line to /etc/sitepull/blog.conf:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>POST_ACTIVATE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/usr/bin/python3 /usr/local/sbin/mastodon-announce.py /etc/sitepull/mastodon-announce.conf&#34;</span>
</span></span></code></pre></div><p>If you also run a staging site, make sure that this line does <em>not</em> end up in its configuration, or your test posts will be tooted too. And if you want to see what would happen before you trust the script with your account, run it with <code>--dry-run</code>, or set <code>VISIBILITY=private</code> in its configuration for the first toot.</p>
<h4 id="check-the-result">Check the result</h4>
<p>Time to see if everything works together:</p>
<ul>
<li>Open <a href="https://blog.darkstar.lan/admin/" target="_blank" rel="noopener">https://blog.darkstar.lan/admin/</a>, write a short post with an image, and save it. On the forge you should see a new branch and a pull request, and no build job.</li>
<li>Publish the post. A build job starts in the Actions tab; when it is finished, a new version of the &ldquo;blog-production&rdquo; package appears.</li>
<li>Within five minutes, your syslog should show sitepull&rsquo;s &ldquo;activated&rdquo; message, and the post is on <a href="https://blog.darkstar.lan/" target="_blank" rel="noopener">https://blog.darkstar.lan/</a>.</li>
<li>If you set up the Mastodon announcement: a toot with a link to the new post appears on your Mastodon account, and /usr/local/blog/mastodon-announce.log has a line with its URL.</li>
<li>Leave a comment on it from a private browser window, with a name and email address that you have never used. It should wait in the moderation queue, and you should get an email.</li>
<li>Log in to the Dashboard from the comment box, approve the comment, then post a second comment with the same name and email address. That one should be published within a minute, thanks to the moderation sidecar.</li>
<li>Search for a word from your post on the search page.</li>
</ul>
<h3 id="coming-from-wordpress">Coming from WordPress?</h3>
<p>My own situation was a migration, not a fresh start: more than 900 posts, 757 tags and more than 20,000 comments, written over eighteen years. A few things that helped:</p>
<ul>
<li><strong>The export</strong>: <em>Tools &gt; Export</em> in WordPress gives you a WXR file (an XML file with all your posts, pages, comments, categories and tags). Mine was 31 MB.</li>
<li><strong>The conversion</strong>: I wrote a Python script that turns the WXR file into Hugo content files. My old posts stay HTML (Hugo can render HTML content files as well as Markdown), so nothing gets lost in a conversion to Markdown. The script also takes care of the WordPress-specific bits like <code>[caption]</code> shortcodes, the automatic paragraph formatting that WordPress applies when it shows a post, and the output of plugins like &ldquo;List category posts&rdquo;. It writes the comments in Artalk&rsquo;s import format, and turns pingbacks into a static &ldquo;Mentioned elsewhere&rdquo; list under each post. I cleaned up the script for general use and published it with step-by-step instructions, including the Hugo templates and Apache redirect rules that go with it: <a href="https://forge.slackware.nl/alienbob/randomstuff/src/branch/main/wp2hugo" target="_blank" rel="noopener">wp2hugo</a>.</li>
<li><strong>The comments</strong>: Artalk&rsquo;s import command reads the converted comments into its database: <code>docker exec artalk artalk import -y -p '{&quot;target_site_name&quot;:&quot;My Blog&quot;,&quot;target_site_url&quot;:&quot;https://blog.darkstar.lan&quot;}' /data/comments.artrans</code>. Your own old comments end up under your admin account if the name and email address in the export match those in the Docker Compose file.</li>
<li><strong>The images</strong>: I did not put eighteen years of uploaded images into git. The wp-content/uploads directory was copied once to /usr/local/blog-media/ on the web server, and an Apache <code>Alias /wp-content/uploads</code> serves it from there. Only new images, uploaded with Sveltia, live in the git repository.</li>
<li><strong>Old URLs</strong>: people and search engines will keep using the old WordPress URLs for years. Apache&rsquo;s mod_rewrite with a <code>RewriteMap</code> (generated by the conversion script) sends <code>/?p=1234</code> to the right post, <code>/feed/</code> to the new RSS feed, <code>/2024/01/</code> to the archive page, and answers <code>410 Gone</code> to <code>/wp-login.php</code>, <code>/xmlrpc.php</code> and friends. A test script that checks every old post ID against the live site gave me confidence on the day of the switch.</li>
<li><strong>Jetpack&rsquo;s social sharing</strong>: the Mastodon announcement described above replaces it. The posts from WordPress are recorded as &ldquo;seen&rdquo; on the first run, so switching over does not toot eighteen years of articles. For migrated posts, the theme uses the original image as the preview image, not WordPress&rsquo; 150x150 pixel thumbnail.</li>
<li><strong>Old links to comments</strong>: links like <code>/my-post/#comment-12345</code> are common on forums. Artalk numbers the comments anew during the import, so the conversion script also writes a small &ldquo;old number to new number&rdquo; file, and a few lines of JavaScript in the theme translate the old link into Artalk&rsquo;s own <code>#atk-comment-678</code>.</li>
</ul>
<h3 id="lessons-learned">Lessons learned</h3>
<p>Some things that cost me time, so that they don&rsquo;t have to cost you time:</p>
<ul>
<li>Hugo ignores symlinked directories in <code>static/</code>. Use rsync or a bind mount if you want to include files from elsewhere in a local preview.</li>
<li>Recent Hugo versions refuse to render HTML content files unless you allow it explicitly with <code>security.allowContent</code> in your configuration. You need this for migrated WordPress posts.</li>
<li>Use <code>hugo.Data</code> instead of <code>.Site.Data</code> in your templates; the latter is deprecated.</li>
<li>Copy-pasted text from WordPress is full of invisible no-break spaces (the classic editor turns a double space into one). Forgejo warns about &ldquo;invisible Unicode characters&rdquo; in such files. Writing them as <code>&amp;nbsp;</code> makes them visible and changes nothing in the browser.</li>
<li>In an Apache <code>RewriteCond</code> list, every line except the last one before the <code>RewriteRule</code> needs <code>[OR]</code>. Forget one, and the conditions are combined with AND, which silently breaks the whole rule. <code>apachectl configtest</code> will not warn you, because the syntax is valid.</li>
<li>The Artalk Docker image defaults to the Asia/Shanghai timezone. You need to set <code>ATK_TIMEZONE</code> and not just the container&rsquo;s <code>TZ</code>.</li>
</ul>
<h3 id="attribution">Attribution</h3>
<p>This platform stands on the shoulders of some great Open Source projects: <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a>, <a href="https://forgejo.org/" target="_blank" rel="noopener">Forgejo</a>, <a href="https://artalk.js.org/" target="_blank" rel="noopener">Artalk</a>, <a href="https://sveltiacms.app/" target="_blank" rel="noopener">Sveltia CMS</a> by Kohei Yoshino, and <a href="https://pagefind.app/" target="_blank" rel="noopener">Pagefind</a> by CloudCannon. The look of this blog is still the <a href="https://andersnoren.se/teman/hemingway-wordpress-theme/" target="_blank" rel="noopener">Hemingway theme by Anders Norén</a>, which I ported to Hugo.</p>
<p>The migration itself was done in a long series of evening sessions with Claude AI as my sparring partner. As I wrote in my post about <a href="/the-slackware-cloud-server-in-real-life/">the Slackware Cloud Server in real life</a>: AI can be an accelerator, as long as the ideas start with you and the quality control ends with you. Every script in this article ran on my own servers before it ended up here.</p>
<h3 id="final-thoughts">Final thoughts</h3>
<p>I am really pleased with the result. The blog is faster than it ever was, my server has one PHP application less to worry about, and I write my posts in a browser editor that does what I expect from it. And everything, from the text of every post to every comment, lives on servers that I control.</p>
<p>Is this setup more complex than &ldquo;install WordPress&rdquo;? At first sight, the answer is &ldquo;yes, certainly&rdquo;. But all the moving parts are small, and each of them does one thing. That&rsquo;s exactly the <a href="https://en.wikipedia.org/wiki/Unix_philosophy" target="_blank" rel="noopener">UNIX philosophy</a> of &ldquo;<em>do one thing and do it well</em>&rdquo;!
If the forge is down, the blog keeps working. If the runner breaks, I fix it and the next build catches up. If I want to move the blog to another server, I copy one script and one configuration file.</p>
<p>Leave your comments, suggestions and opinions below. They&rsquo;ll go through the moderation queue of course, unless you have commented here before ;-)</p>
<p>Thanks for reading. Eric</p>
]]></content:encoded></item><item><title>My LibreOffice packages stop using Google OAuth API keys</title><link>https://blog.slackware.nl/my-libreoffice-packages-stop-using-google-oauth-api-keys/</link><pubDate>Sun, 15 Nov 2026 12:20:00 +0100</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/my-libreoffice-packages-stop-using-google-oauth-api-keys/</guid><category>Slackware</category><category>Rant</category><category>Me</category><description> Unfortunately, I had to make the decision to remove my personal Google OAuth API keys from the LibreOffice packages that I build and release for Slackware.
During compilation of the libreoffice package, I provide this API key in the build environment, and as a result you can directly read from and write to your Google Drive when editing documents. No local document copies required. This has been my way of building libreoffice for many years. It&amp;amp;rsquo;s a free service from me to you, and because the volume of users of my package is low enough, I have never been charged money for using Google&amp;amp;rsquo;s Storage API.</description><content:encoded><![CDATA[<img class="alignleft" src="/my-libreoffice-packages-stop-using-google-oauth-api-keys/Libreoffice-Logo.png" alt="LibreOffice logo" width="64" height="64" loading="lazy">
<p>Unfortunately, I had to make the decision to remove my personal <a href="https://developers.google.com/identity/protocols/oauth2" target="_blank" rel="noopener">Google OAuth API keys</a> from the LibreOffice packages that I build and release for Slackware.</p>
<p>During compilation of the <em>libreoffice</em> package, I provide this API key in the build environment, and as a result you can directly read from and write to your Google Drive when editing documents. No local document copies required. This has been my way of building <em>libreoffice</em> for many years. It&rsquo;s a free service from me to you, and because the volume of users of my package is low enough, I have never been charged money for using Google&rsquo;s Storage API.</p>
<p>And then, Google made another move to push community initiatives to the margins. There were multiple warnings during the year that I had to provide more personal and consent details for my &lsquo;LibreOffice for Slackware&rsquo; API project or else my key would be revoked. All of this to satisfy a Data Safety Program (your data must be safe from me, I get it). I responded that I am an unpaid volunteer who wants to provide the users of his distro packages with the best experience and that I did not have to time or inclination to record product videos to prove that I was not stealing and reselling my users&rsquo; data. This was their answer, provided verbatim, which made me decide to just delete the API keys from the Google Cloud Console.</p>
<blockquote>
<p>Thank you for your response and for explaining your project&rsquo;s integration with LibreOffice for the Slackware Linux community. We appreciate the context regarding your build script.</p>
<p>While we understand that your project compiles into a desktop binary package, the Google API Services User Data Policy requires us to verify how your application interacts with Google User Data and displays the OAuth consent screen. Because we cannot interactively test native desktop applications on our end, a demonstration video is a strict requirement for verification and cannot be waived.</p>
<p>Providing this video is straightforward for desktop applications: you simply need to use a screen recording tool to capture your computer screen while running the compiled LibreOffice binary.</p>
<p>Please record a comprehensive new demonstration video that satisfies the following criteria:</p>
<p>In-App Functionality: Demonstrate the full operational functionality of the requested Google Drive scope within the compiled LibreOffice application. (Note: You mentioned users save and read documents stored in &ldquo;OneDrive&rdquo; in your email, but we specifically need to see the integration with Google Drive).
Source Account Impact: Show the changes triggered in the app reflected in the user&rsquo;s Google account (e.g., show a document being successfully saved to, or opened from, the user&rsquo;s Google Drive).
Consent Screen: The OAuth consent flow and permission screen must be displayed with all requested scopes fully expanded and readable—if the scopes are obscured, click “Show all services.” Please ensure the URL bar showing your Client ID is visible in the browser when the consent screen pops up.
Scope Matching: The scopes requested by your app must exactly match the scopes configured and submitted for verification in the Google Cloud Console.
Critical Note For Live Apps: If your integration is already live to your users, do not deploy unverified scopes to production traffic. Instead, trigger new scopes only in a staging environment. If your app has reached its user cap, use a separate project to record the demo. The publishing status should remain “In Production.”</p>
<p>Once you have recorded the new demonstration video, please reply directly to this email with a publicly accessible link (such as YouTube, Vimeo, or a Google Drive link with permissions set to &ldquo;Anyone with the link can view&rdquo;) so we can continue the review.</p>
<p>Also, we need you to address the following items for us to continue your app’s verification:</p>
<p>Your privacy policy does not specify any data protection mechanisms for sensitive data.
Please take the following action(s) to continue with your request
⤷ Update and resubmit your app in Cloud Console with the following:</p>
<p>A link to the updated privacy policy containing data protection disclosures (Learn more)
Important! Once you have addressed the issues above, reply directly to this email to confirm. You must reply to this email after fixing the highlighted issues to continue with the app verification process.</p>
<p>Thank you,</p>
<p>The Third Party Data Safety Team</p>
</blockquote>
<p>Future LibreOffice packages provided by me will therefore not have the ability any longer, to connect to Google Drive for document editing. Instead, I advise you to install <a href="https://rclone.org/" target="_blank" rel="noopener">rclone</a>, which is a powerful tool that allows you to connect to a large amount of online storage facilities and protocols. The instructions to connect Rclone to your Google Drive are <a href="https://rclone.org/drive/" target="_blank" rel="noopener">available on their website</a>, like they do with all of their supported backend storage options.
The result is a <em>locally mounted</em> directory in your Linux filesystem where you can interact with your online documents as if they were stored locally. Rclone does the business of downloading and uploading your document bytes completely transparently.</p>
<p>Apologies for any inconvenience. Gone are the days where Google&rsquo;s mantra was &ldquo;<em>don&rsquo;t be evil</em>&rdquo;.
Eric</p>
]]></content:encoded></item><item><title>Slackware community gets its own chat server (Matrix)</title><link>https://blog.slackware.nl/slackware-community-gets-its-own-chat-server-matrix/</link><pubDate>Fri, 13 Nov 2026 23:25:00 +0100</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/slackware-community-gets-its-own-chat-server-matrix/</guid><category>Slackware</category><description> I have wanted this for a while: a place where the Slackware Forge community can talk to each other in real time, without depending on somebody else&amp;amp;rsquo;s platform and without yet another account to remember. Over the past months the Slackware Forge and the Keycloak single sign-on service behind it have settled in nicely, and that made the missing piece obvious. We needed a chat server, so I built one. Note that this is not a generic forum for just anybody, it&amp;amp;rsquo;s meant for real-time communication between users that work on one or more of the Forge&amp;amp;rsquo;s git repositories. If you want to discuss a pull request or an issue, this is how.</description><content:encoded><![CDATA[<img class="alignleft" src="/slackware-community-gets-its-own-chat-server-matrix/matrix_logo-400x400_hu_32aaf668e4676d70.jpg" srcset="/slackware-community-gets-its-own-chat-server-matrix/matrix_logo-400x400_hu_32aaf668e4676d70.jpg 1x, /slackware-community-gets-its-own-chat-server-matrix/matrix_logo-400x400_hu_40efbe991186d8b.jpg 2x" alt="" width="150" height="150" loading="lazy">
<p>I have wanted this for a while: a place where the Slackware Forge community can talk to each other in real time, without depending on somebody else&rsquo;s platform and without yet another account to remember. Over the past months the <a href="https://forge.slackware.nl/" target="_blank" rel="noopener">Slackware Forge</a> and the <a href="https://oidc.slackware.nl/auth" target="_blank" rel="noopener">Keycloak single sign-on</a> service behind it have settled in nicely, and that made the missing piece obvious. We needed a chat server, so I built one.
Note that this is not a generic forum for just anybody, it&rsquo;s meant for real-time communication between users that work on one or more of the Forge&rsquo;s git repositories. If you want to discuss a pull request or an  issue, this is how.</p>
<figure class="wp-caption aligncenter" style="width: 676px"><a href="/slackware-community-gets-its-own-chat-server-matrix/matrix-element-slackware-login.png"><img src="/slackware-community-gets-its-own-chat-server-matrix/matrix-element-slackware-login_hu_1b20daff645b7a78.png" srcset="/slackware-community-gets-its-own-chat-server-matrix/matrix-element-slackware-login_hu_1b20daff645b7a78.png 1x, /slackware-community-gets-its-own-chat-server-matrix/matrix-element-slackware-login.png 2x" alt="Matrix for Slackware - login screen" width="676" height="308" loading="lazy"></a></figure>
<p>If you can log in to the Forge, you already have an account on the new chat server! Open <a href="https://element.slackware.nl" target="_blank" rel="noopener">https://element.slackware.nl</a>, choose the single sign-on option (the wording differs a bit between versions of the client, but there is only one way in, so you will find it), log in with your Forge username and password, and you will find a room called &ldquo;<em>Welcome to Slackware Community</em>&rdquo; waiting in your room list (you are already a member; Element just does not open it for you, so click it once). Your chat address will be <code>@yourusername:slackware.nl</code>. That is all there is to it&hellip; but you know me by now; I could not leave it at that, so here is how it works under the hood.</p>
<p>The chat protocol is <a href="https://matrix.org/" target="_blank" rel="noopener">Matrix</a>, an open standard for chat, voice and video, where the software on both ends is interchangeable. I picked <a href="https://matrix-construct.github.io/tuwunel/" target="_blank" rel="noopener">Tuwunel</a> as the server. It is written in Rust, uses an embedded database and is a lot lighter than the reference implementation, which matters when you do not want a chat service to eat the whole machine it shares with the Forge and a few other things. It is also young software; I re-read the release notes a lot to get things configured right.</p>
<p>How does it all fit together?</p>
<ul>
<li>The server (Tuwunel) and the <a href="https://matrix.org/ecosystem/clients/element/" target="_blank" rel="noopener">Element</a> web client run in Docker containers on the same server that hosts the Forge, behind the Apache that already faces the internet. There is nothing to install on your side if you do not want to; Element X on a phone and the Element desktop client work as well. When they ask for a homeserver, enter <code>slackware.nl</code>.</li>
<li>The Matrix server itself lives at <code>matrix.slackware.nl</code>, but your chat address ends in <code>slackware.nl</code>. A small file on the main <a href="https://slackware.nl" target="_blank" rel="noopener">slackware.nl</a> web site tells the clients where to find the real Matrix server. It is the chat equivalent of having a mail address with only the domain instead of the machine behind it as well.</li>
<li>Logging in is delegated to Keycloak, the same identity service that guards the Forge. You need only one account and one password, and there is no registration form on the chat server at all; accounts only appear through that single sign-on. If you change your password on the Forge, it changes here as well.</li>
<li>Being a Forge user is not enough by itself. You must also be a member of a Keycloak group named <code>matrix-users</code>, and the check happens in Keycloak before the chat server ever hears about you. For the first rollout of this new community service I have simply added everybody who already had an account on the Forge. New members will be added as they arrive. Send an email to <code>forge@slackware.nl</code> to request that account.
Note that accounts on the Slackware Community servers are limited to Slackware users that need a place to host a git repository or want to collaborate on someone else&rsquo;s repository.</li>
<li>The people who moderate the chat come from a different group, <code>matrix-moderators</code>, which is deliberately not the same as the people who administer the servers. Keeping a chat room tidy and keeping a server running are different jobs, and they do not have to be done by the same people. For now, I am the only moderator, and I expect and hope that you all behave.
<em>Let me know if you want to be added as a moderator!</em> You will earn eternal gratitude.</li>
<li>Voice and video calls use <a href="https://github.com/element-hq/element-call" target="_blank" rel="noopener">Element Call</a>, which needs a media relay (<a href="https://livekit.io/" target="_blank" rel="noopener">LiveKit</a>) for group calls, plus a TURN server (<a href="https://github.com/coturn/coturn" target="_blank" rel="noopener">coturn</a>) to help people behind the more stubborn home routers and mobile networks. A few years ago that would have been a weekend-eating project of its own.
How it holds up when a lot of you start talking at once is something I will report back on. I am really interested in your findings. I tested video chats on a private staging server, and it should work.</li>
<li>Backups of the chat database are scripted as a daily cron job.</li>
<li>The whole service is watched by the same monitoring tool (I am using <a href="https://checkmk.com/" target="_blank" rel="noopener">checkmk</a>) that keeps an eye on my other servers.</li>
</ul>
<p>One decision deserves a bit more explanation: this server is <strong>not</strong> connected to the rest of the Matrix network. You cannot chat with people on matrix.org or any other Matrix server from here, and that was a deliberate choice. A private community server with a closed front door allows me to deal with far less spam, abuse and moderation work than having to manage a server that anybody on the internet can reach. It keeps the server small and my evenings free for other stuff :-)
If the community really asks for federation at some point, it can be switched on later. But then it would be a conscious decision again, not a default. And I will require a <em>team</em> of moderators and admins by that time,</p>
<p>A few things worth knowing:</p>
<ul>
<li>Private conversations are end-to-end encrypted, the Matrix way: the keys live on your devices. If you lose all your devices and your recovery key too, then nobody (including me) can read your old messages. Write the recovery key down, it is offered as the first step to take on a new Matrix server.</li>
</ul>
<figure class="wp-caption aligncenter" style="width: 300px"><a href="/slackware-community-gets-its-own-chat-server-matrix/element-chat-create-recovery-key.png"><img src="/slackware-community-gets-its-own-chat-server-matrix/element-chat-create-recovery-key_hu_b04f5b1d8fbe56ad.png" srcset="/slackware-community-gets-its-own-chat-server-matrix/element-chat-create-recovery-key_hu_b04f5b1d8fbe56ad.png 1x, /slackware-community-gets-its-own-chat-server-matrix/element-chat-create-recovery-key.png 2x" alt="Create a recovery key" width="300" height="163" loading="lazy"></a></figure>
<ul>
<li>If you log in and the Keycloak server tells you that you do not have access to Matrix, something went wrong with the group membership. Just tell me (via an email to <code>forge@slackware.nl</code>) and I will sort it out.</li>
<li>This service is brand new. There is a lot of software involved (it is not as straightforward as a single mail server) and I have tested it, but real users always find the corners that tests do not. Tell me when you find bugs :-)</li>
</ul>
<p>The deployment is a Docker package with scripts for setup, user management and checks, written on top of what I learned while building the (yet to be publicly released) SlackCloud project.
If there is interest, I will clean all of that up and publish it next to my other code on the Forge.</p>
<p>Come and say hello in &ldquo;Slackware Community&rdquo;. The coffee is virtual, but I hope the conversations will be real.</p>
<p>Have fun! Eric</p>
]]></content:encoded></item><item><title>Alien Pastures is now powered by Hugo, Forgejo, Artalk and Sveltia</title><link>https://blog.slackware.nl/alien-pastures-is-now-powered-by-hugo-forgejo-artalk-and-sveltia/</link><pubDate>Sun, 08 Nov 2026 15:36:00 +0100</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/alien-pastures-is-now-powered-by-hugo-forgejo-artalk-and-sveltia/</guid><category>Slackware</category><category>Software</category><description> After lots of testing and dry-runs, I have finally decided that it is time to say goodbye to Wordpress as the Content Management System (CMS) for the Alien Pastures blog.
As of today, my site content is managed in a private Git repository on the Slackware Community Forge, which is powered by Forgejo. I will edit my posts using Sveltia, directly in the Git repository, and the power of Forgejo&amp;amp;rsquo;s workflows launches Hugo in a Docker container to re-generate the static HTML for my blog every time I publish a post.</description><content:encoded><![CDATA[<img class="alignleft" src="/images/hugo.png" alt="Hugo logo" width="64" loading="lazy">
<p>After lots of testing and dry-runs, I have finally decided that it is time to say goodbye to Wordpress as the Content Management System (CMS) for the Alien Pastures blog.</p>
<p>As of today, my site content is managed in a private Git repository on the <a href="https://forge.slackware.nl" target="_blank" rel="noopener">Slackware Community Forge</a>, which is powered by <a href="https://forgejo.org/" target="_blank" rel="noopener">Forgejo</a>. I will edit my posts using <a href="https://sveltiacms.app/en/" target="_blank" rel="noopener">Sveltia</a>, directly in the Git repository, and the power of Forgejo&rsquo;s workflows launches <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> in a Docker container to re-generate the static HTML for my blog every time I publish a post.</p>
<p>And finally, an <a href="https://artalk.js.org/" target="_blank" rel="noopener">Artalk</a> server will manage the comments on my blog via a separate local Docker container.</p>
<p>Leave comments and suggestions down below in the comments section please :-)</p>
]]></content:encoded></item><item><title>Heads-up: Alien Pastures blog will become Hugo-powered</title><link>https://blog.slackware.nl/heads-up-alien-pastures-blog-will-become-hugo-powered/</link><pubDate>Sat, 31 Oct 2026 21:31:55 +0100</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5573</guid><category>Me</category><category>Slackware</category><description>I have been playing with the idea of leaving Wordpress behind as the content publishing platform for my Alien Pastures blog.
Wordpress is great software and it&amp;#39;s versatile and offers a wealth of plugins that allow the blog owner to do all kinds of nice stuff. For me it was the ideal solution at the time when I wanted to create a blog and was looking for something self-hosted but also self-contained (the whole blog in one single directory). I was not sure if I would be able to keep running it on the server where the blog was born, therefore something like Wordpress CMS combined with a SQLite file-based database backend was perfect.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-5574" src="/wp-content/uploads/2026/10/hugo-150x150.png" alt="" width="64" height="64" />I have been playing with the idea of leaving Wordpress behind as the content publishing platform for my Alien Pastures blog.<br />
Wordpress is great software and it's versatile and offers a wealth of plugins that allow the blog owner to do all kinds of nice stuff. For me it was the ideal solution at <a href="/to-blog-or-not-to-blog/" target="_blank" rel="noopener">the time when I wanted to create a blog</a> and was looking for something self-hosted but also self-contained (the whole blog in one single directory). I was not sure if I would be able to keep running it on the server where the blog was born, therefore something like Wordpress CMS combined with a SQLite file-based database backend was perfect.</p>
<p>That was 16 years ago, and the blog moved servers, grew a lot in content and it uses a proper MariaDB backend now. But it puts a strain on the servers where I host(ed) it; the stable Slackware versions (first 14.2, then 15.0) have become stale and Wordpress started requiring versions of PHP and MariaDB that were not available for the Slackware version I was using... also the blog increasingly needs protection from scammers, spammers, AI-bot-scrapers and hackers; it needs performance tweaks to deal with server load and executing the interpreted PHP code in which Wordpress is written, and there are security vulnerabilities discovered in Wordpress and its plugins all the time.</p>
<p>When today I had to upgrade the Wordpress code and a good ten plugins again because of a <em>un-authenticated</em> Remote Code Execution (RCE) vulnerability, accompanied by stern warnings to "<em>backup your database first!</em>", I knew that my research would ultimately pay off.</p>
<p>I decided to move forward with an experiment I have been conducting for a while. My future blog pages will all be static HTML. Nothing is interpreted, nothing is vulnerable other than potentially Apache or Slackware itself, and I will use a Docker container for a part of the new setup.</p>
<p>That setup is based on a new (private) git repository which will hold my blog's content after it has been converted from Wordpress syntax into <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> syntax and layout. Hugo is a <em>static site generator</em>, written in Go. How that will work with this git repository?</p>
<ul>
<li>I run a converter on a full export of the Wordpress blog (that's a single XML file containing everything except the media files) to generate a collection of static HTML pages that will become the "legacy" part of the new blog.</li>
<li>In a private repository on the <a href="https://forge.slackware.nl/" target="_blank" rel="noopener">Slackware Forge</a> I will store the Hugo framework defining the layout of my blog, the theme for my blog (a Hugo port of the GPL-licensed Wordpress theme '<em>Hemingway</em>' by Anders Norén which I currently use), the converted legacy (Wordpress) content plus the <a href="https://sveltycms.com/" target="_blank" rel="noopener">Sveltia</a> in-browser editor which I will be using to write and publish new articles. Sveltia can read the repository's full content and can also write to that repository.</li>
<li>Since a Hugo-generated static web site does not know the concept of a comments section because that goes against the <em>static page</em> concept, I will run a self-hosted <a href="https://artalk.js.org/" target="_blank" rel="noopener">Artalk</a> comments server in Docker. My new blog will load the comments below each blog article by asking the Artalk server for them over a trusted connection, protected by Docker secrets.</li>
<li>When someone posts a comment, it is held in a moderation queue, unless that <em>someone</em> (the combination of nickname and email address) already has an earlier approved comment, in which case the comment will automatically be approved by a <em>moderator bot</em> within the minute. This moderation plugs into an Akismet anti-spam service just like I have right now on the Wordpress blog. It will prevent me from having to deal with a hundred spam comments per day.</li>
<li>When I make a change to the repository (updating the blog layout, adding a new theme, whatever) this triggers a Forgejo CI workflow in git. Those triggers are very similar to Github runners if you use CI on Github (or any other git platform). The Forgejo runner starts a Docker image which contains Hugo; Hugo fetches the repository content, renders the lot into static HTML pages and packs the whole set into a <a href="https://forgejo.org/docs/latest/user/packages/" target="_blank" rel="noopener">registry package</a>.</li>
<li>A cron job on the blog server polls the Forge for updated site content packages every two minutes, and pulls that package when one becomes available. It unpacks the tarball (it's nothing more than that), checks if the sha256 checksum is correct and then refreshes the blog's content - the pages which you are seeing.</li>
<li>When I want to write or update an article, I launch Sveltia (via a hidden URL on the blog), login to the Slackware Forge and start writing.&nbsp; When I click "publish", Sveltia will commit my article to the private repository, triggering the CI workflow, and two minutes later the new article is online.<br />
When I save an article in Draft, then Sveltia commits the article in a temporary git branch; any branch except "main" will never trigger the CI workflow, so you will never see my drafts by accident :-)</li>
</ul>
<p>There's a lot of moving parts in that setup, and it is not as straight-forward as Wordpress; but it is a good learning experience into Git workflows. Also, the constituent parts (except for the free tier of the online Akismet anti-spam service) that I deploy locally are not tied to any kind of commercial entity and fully open source. And it's a hundred percent safe solution.</p>
<p>And... you may have noticed that I wrote the above plan in great detail. That is because I have all of this already running as a staging server while I debug this new setup, remove the kinks and tweak everything to my liking. Feel free to look and click around, post comments if you want, but know that all of that will be wiped again when I make the switch. Also the content of that staging server is frozen to the moment when I did the last content conversion. This new post will not appear there.</p>
<p>Have a look at <a href="https://hugo.slackware.nl/" target="_blank" rel="noopener">https://hugo.slackware.nl/</a> and tell me when you find bugs. I need some time for an actual cut-over and I am not yet completely happy with the Sveltia editor setup, so Wordpress will remain the blog's CMS for a while.</p>
<p>The <a href="https://forge.slackware.nl/alienbob/hugo-builder" target="_blank" rel="noopener">hugo-builder</a> repository on the Slackware Forge on the other hand, is open to anyone who is curious to start experimenting with Hugo themselves; it contains the code that generates the Docker image used by the aforementioned CI workflow.<br />
I added a subdirectory '<a href="https://forge.slackware.nl/alienbob/hugo-builder/src/branch/main/workflow-example" target="_blank" rel="noopener">workflow-example</a>' which contains a copy of the actual CI runner that I am using for the new Alien Pastures blog. You can copy that into your own repository and rename the directory to '<code>.forgejo</code>'; you'd also have to do some small modifications and define some variables and secrets in your Forge account to make it work for your own future Hugo website.</p>
]]></content:encoded></item><item><title>Daylight Saving Time frustrations</title><link>https://blog.slackware.nl/daylight-saving-time-frustrations/</link><pubDate>Sun, 25 Oct 2026 11:32:27 +0100</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5567</guid><category>Me</category><category>Rant</category><category>Slackware</category><description>I have a confession to make :-) For years I faced the annoyance that my laptop would not follow the one-hour timeshift when the Daylight Saving Time would change from Summer- to Wintertime or back. I had to manually fix the time for years. My servers are fine always. I never took the time to find the root cause and fix this.
Today I had enough of it and dug into the issue until I found the root cause.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-5568" src="/wp-content/uploads/2026/10/end_cest-150x150.png" alt="" width="64" height="64" />I have a confession to make :-) For years I faced the annoyance that my laptop would not follow the one-hour timeshift when the Daylight Saving Time would change from Summer- to Wintertime or back. I had to manually fix the time for years. My servers are fine always. I never took the time to find the root cause and fix this.<br />
Today I had enough of it and dug into the issue until I found the root cause.</p>
<p>So what is happening?</p>
<p>My laptop’s hardware clock (RTC) is set to <strong>localtime</strong> instead of <strong>UTC</strong>. Combine that with the laptop being switched off (and not using NTP) when the DST switch happens and you get my symptoms. How is that?</p>
<p>The RTC only stores a wall-clock value. It has no idea whether that value is CEST or CET. Slackware tracks how to read it in /etc/hardwareclock, which says either "<code>UTC</code>" or "<code>localtime</code>". In localtime mode, <code>rc.S</code> reads the RTC at boot with <code>hwclock --hctosys --localtime</code>, and <code>rc.6</code> writes the system time back with <code>--systohc</code> at shutdown.</p>
<p>And that results in roughly these events happening this weekend:</p>
<ul>
<li>Saturday 22:00 CEST: I shut down the laptop. The <code>rc.6</code> script writes “22:00” into the RTC. That means 20:00 UTC.</li>
<li>DST switches from Summer- to Wintertime while I am sleeping and the laptop is off.</li>
<li>Sunday morning: The laptop is still off but the RTC is battery-powered and has kept ticking. It would show, say, “10:17”. It is still counting in CEST, so that is really 08:17 UTC, which is 09:17 CET.</li>
<li>I pour coffee and boot the laptop: <code>hwclock</code> asks the timezone database how to read “10:17” today. The answer is CET (UTC+1), so it sets the kernel to 09:17 UTC.</li>
<li>Result: the system clock is now off by an hour in UTC. It displays 10:17 CET while the real time is 09:17 CET.</li>
</ul>
<p>In spring the same thing happens in the other direction, and the laptop ends up an hour behind. Then - like every time - I correct it by hand, the corrected value gets written to the RTC at the next shutdown, and the mistake is baked in for another six months.</p>
<p>Why is my server not suffering the same fate? Any one of the following would be enough, but my LAN server runs an NTP daemon <strong>and</strong> is never powered down:</p>
<ul>
<li>Its RTC is set to UTC, so a stored value means the same thing at any time of year.</li>
<li>The machine runs <code>ntpd</code>, which corrects the clock after boot anyway.</li>
<li>It is not powered off, but instead keeps running through the DST switch. When it is running, the kernel handles DST through the zone file, and the next shutdown writes a correct local value.</li>
</ul>
<p>A laptop is then of course the worst case: it is often powered off over the weekend of the switch, and it often has no NTP running at boot either.</p>
<p>To fix this:</p>
<ol>
<li>First, correct the system clock (the laptop must have internet connectivity)<br />
<code># ntpdate pool.ntp.org</code></li>
<li><code></code>Write the now-correct time to the RTC, as UTC<br />
<code># hwclock --systohc --utc</code></li>
<li><code></code>Tell Slackware's 'rc.S' and 'rc.6' scripts to treat the RTC as UTC from now on<br />
<code># echo "UTC" &gt; /etc/hardwareclock</code></li>
</ol>
<p>You can then verify the result: a "<code>date -u</code>" command should match the real UTC calue and <code>hwclock</code> should agree:<br />
<code># date; date -u; hwclock --show</code></p>
<p>The order matters. If you write the RTC before correcting the system clock, you store the wrong hour, just in UTC this time. The command '<code>hwclock --utc</code>' also updates the last line of '<code>/etc/adjtime</code>', so hwclock itself and Slackware’s /etc/hardwareclock will agree.</p>
<p>An additional detail to fix: my laptop's time was a few minutes off to start with. This drift happens naturally over time when your computer does not sync to an atomic clock from time to time. To keep the drift away, I enabled the NTP daemon and configured it properly.<br />
Add these two lines to /etc/ntp.conf:</p>
<blockquote>
<pre>pool pool.ntp.org iburst
restrict source nomodify notrap noquery</pre>
</blockquote>
<p>Make the rc script executable and start it manually (on next boot, Slackware will do that for you):<br />
<code># chmod +x /etc/rc.d/rc.ntpd<br />
# /etc/rc.d/rc.ntpd start</code><br />
Wait a few minutes and then use the 'ntpq' command to verify that your local NTP daemon is syncing with an online timeserver:</p>
<pre># ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 europe.pool.ntp .POOL.          16 p    -   64    0    0.000   +0.000   0.000
*mc02.root.proje 124.216.164.14   2 u   40   64    1   23.229   -2.486   4.368
+82.67.200.13    192.168.6.8      3 u   39   64    1   38.737   -2.392   3.693
+172-232-208-229 80.192.165.246   2 u   43   64    1   35.452   -7.052   4.751
+178.239.19.57 ( 10.1.105.4       2 u   42   64    1   26.853   +0.143   2.254
</pre>
<p>The line prefixed with an asterisk '*' shows the actual server your local daemon is syncing to; the ones prefixed with the plus sign '+' are considered good candidates to switch to when needed.</p>
<blockquote><p>Note that the '/etc/ntp.conf' file in Slackware does not have 'pool' examples, only 'server' examples. You really want to configure a pool of timeservers in order to be resilient against outages. The two lines shown above are essential additions to this file; you don't have to edit anything else.</p></blockquote>
<p>I learnt something this morning that I should have learnt a long time ago... I hope it helps other people who visit here in future, looking for answers to the same question.</p>
]]></content:encoded></item><item><title>HOWTO boot from a full-disk encrypted Slackware and only enter a passphrase once</title><link>https://blog.slackware.nl/howto-boot-from-a-full-disk-encrypted-slackware-and-only-enter-a-passphrase-once/</link><pubDate>Sat, 17 Oct 2026 22:00:45 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5559</guid><category>Software</category><category>Slackware</category><description>The documentation about disk encryption which is part of Slackware allows you to boot your Slackware computer from a LUKS-encrypted partition containing the root (&amp;#39;/&amp;#39;) filesystem, but it still requires you to keep an un-encrypted &amp;#39;/boot&amp;#39; filesystem on a separate partition.
Recent Grub versions in Slackware have the capability to let the bootloader read information from a LUKS-encrypted volume. That is the key (pun intended) to configure your Slackware computer with full-disk encryption; meaning that all of your partitions and filesystems can be LUKS-encrypted. Even though Slackware&amp;#39;s own documentation does not mention this, it is trivial to configure, essentially it needs a single line in &amp;#34;/etc/default/grub&amp;#34; - see step (4) at the end of this article.</description><content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-5560" src="/wp-content/uploads/2026/10/luks-logo-cropped.png" alt="" width="330" height="112" />The documentation about disk encryption which is part of Slackware allows you to boot your Slackware computer from a LUKS-encrypted partition containing the root ('/') filesystem, but it still requires you to keep an un-encrypted '/boot' filesystem on a separate partition.<br />
Recent Grub versions in Slackware have the capability to let the bootloader read information from a LUKS-encrypted volume. That is the key (pun intended) to configure your Slackware computer with full-disk encryption; meaning that all of your partitions and filesystems can be LUKS-encrypted. Even though Slackware's own documentation does not mention this, it is trivial to configure, essentially it needs a single line in "<code>/etc/default/grub</code>" - see <em>step (4)</em> at the end of this article.</p>
<p>The sequence in a regular Slackware is then as follows:</p>
<ol>
<li>Grub will ask for a LUKS passphrase when it starts.</li>
<li>After you enter the passphrase, Grub will read the kernel and initrd files from the LUKS-encrypted /boot directory (which can now be part of the root filesystem and does not have to be on a separate partition anymore) and load these into RAM, then instructs the kernel to boot up.</li>
<li>The kernel will load the initrd image file in turn;</li>
<li>The embedded "init" script will detect that your root filesystem is encrypted. But since it can not talk to Grub, the "init" script needs your help <em>again</em>, and it will ask for a LUKS passphrase - the second time that you have to enter that string manually.</li>
</ol>
<p>That's a nuisance which can be overcome, Slackware has all the tools on board already. In this article I will show you how.</p>
<h3>In short</h3>
<p>The basic steps are:</p>
<ol>
<li>create a new LUKS key - which will be a file, not a passphrase</li>
<li>add that key file to the /boot/initrd-tree directory</li>
<li>tell geninitrd and mkinitrd that we don't want /boot/initrd-tree to be deleted all the time, and that we added a LUKS key in there</li>
<li>tell grub that it needs to load support for LUKS volumes</li>
</ol>
<p>The outcome is that you are asked <em>only once</em> to enter a LUKS key - by the Grub bootloader.<br />
The details are a bit more convoluted, but the above four steps are what you need to keep in mind.</p>
<h3>In detail</h3>
<p>The Slackware init script which sits embedded in the initrd image needs a means to unlock your LUKS-encrypted root filesystem. We want that to happen un-attended (avoid typing a passphrase) and we achieve that by using an <em>embedded</em> LUKS key which we copy into the initrd image. We must have added this key to the LUKS header of the encrypted volume first (using "cryptsetup luksAddKey", see below).</p>
<p>OK, let us start with step (1): creating a LUKS key file - using "dd" and "urandom"!<br />
The command results in what is essentially a 2 KB file filled with random data, and we're going to tell LUKS that this random sequence of bytes should be accepted as a key to unlock the LUKS encryption layer.<code><br />
# dd bs=512 count=4 if=/dev/urandom of=/root/cryptkey.bin<br />
# chmod 600 /root/cryptkey.bin<br />
# cryptsetup luksAddKey /dev/your_luks_partition /root/cryptkey.bin<br />
</code></p>
<p>That "your_luks_partition" needs to be changed into the actual device name of your own LUKS-encrypted partition. Something like "nvme0n1p4" or "sda1".<br />
When you run the "cryptsetup luksAddKey" command, you will be prompted to provide a LUKS passphrase that is already present in the LUKS header of the partition - for instance the passphrase you entered when you created the volume. If you enter the correct string, then cryptsetup will add your 2 KB of random bytes to the LUKS header as a new encryption key. LUKS2 can store 32 keys, so you should have room to spare.</p>
<p>Step (2) tells us to add this key file to the initrd image. We can't modify that image file directly, so we copy the key file into the directory "/boot/initrd-tree/" instead. When mkinitrd runs it will pack that complete directory, with everything in it, into a new "/boot/initrd-&lt;kernel_version&gt;.img" file.</p>
<p>I wrote a small script "extract_initramfs.sh" with which you can easily extract the contents of an existing initrd image into a new directory. Let's download and install it:<code><br />
# cd /usr/local/sbin<br />
# wget http://www.slackware.com/~alien/tools/extract_initramfs.sh<br />
# chown +x extract_initramfs.sh<br />
# ln -s extract_initramfs.sh create_initramfs.sh<br />
</code></p>
<p>Let's then add this key to the initrd-tree. Since Slackware's geninitrd default action is to delete the "/boot/initrd-tree" directory after an initrd image has been created, we change that default to "keep that directory please" (see further down) but to prevent confusion when our new configuration runs for the first time, let's simply extract the most recent existing initrd image to get a "/boot/initrd-tree" populated.<code><br />
# ls -l /boot/vmlinuz-*.img |tail -1<br />
# extract_initramfs.sh -h<br />
#  extract_initramfs.sh /boot/initrd-&lt;your_kernel_version&gt;.img /boot/initrd-tree/<br />
# cp /root/cryptkey.bin /boot/initrd-tree/</code></p>
<p>For step (3), make sure that your "/etc/default/geninitrd" contains this line. If the current value is "true" then change it to "false":</p>
<pre>AUTO_REMOVE_INITRD_TREE=false
</pre>
<p>In "/etc/mkinitrd.conf" ensure that "CLEAR_TREE" and "LUKSKEY" exist and have the shown values - this instructs the "mkinitrd" command to never delete the "/boot/initrd-tree" directory and also tells the init script where to find the LUKS key when it needs it during boot (note that it says "/cryptkey.bin" because init searches it from the root of the extracted initrd image):</p>
<pre>CLEAR_TREE="0"
LUKSKEY="/cryptkey.bin"
</pre>
<p>Why do we need to keep that /boot/initrd-tree instead of allowing it to be deleted? The geninitrd default is to delete the directory to save space, every time you install or upgrade a kernel-generic package. Makes sense, right?<br />
Well no! Simply because we are going to add our LUKS key file in there and we don't want to lose it during the next kernel upgrade.<br />
When geninitrd creates an initrd image file (through an invocation of "mkinitrrd"), it copies all (and only those) kernel modules into "/boot/initrd-tree" that are required to mount the root filesystem. When that directory is never deleted,&nbsp; old kernel modules are staying behind. To prevent the initrd image file to bloat with useless old kernel modules we remove the kernel modules that belonged to the older kernel, prior to running "mkinitrd".</p>
<p>Geninitrd supports a "pre-install" script that allows us to do exactly that. Copy this text into a new file, inside directory<code>/etc/geninitrd.d/pre-install/</code>, and name it something like "<code>remove-kmods-from-and-install-lukskey-to-initrd-tree.sh</code>" (the name really does not matter).<br />
Then make the script executable:<br />
<code># chmod +x /etc/geninitrd.d/pre-install/remove-kmods-from-and-install-lukskey-to-initrd-tree.sh</code></p>
<blockquote>
<pre>#!/bin/bash
# To prevent the initrd to bloat with old kernel modules,
# we remove them prior to running mkinitrd.
rm -rf /boot/initrd-tree/lib/modules/*

# And to be safe, copy the LUKS key into the tree every time:
cp -a /root/cryptkey.bin /boot/initrd-tree/</pre>
</blockquote>
<p>Step (4) finally, makes Grub aware of LUKS encrypted volumes.<br />
Check "/etc/default/grub" and make sure that this line is present - it enables Grub to load kernel and initrd from a LUKS-enrypted filesystem:</p>
<pre>GRUB_ENABLE_CRYPTODISK=y
</pre>
<h3>Summarizing</h3>
<p>You see, that was not really a lot of work! All the building blocks are already part of Slackware-current (to become Slackware 16.0), it just needs a bit of configuration.<br />
Every time you install a new kernel, these scripts will ensure that the LUKS key stays inside the generated initrd image. When your computer boots, Grub will ask you once for a LUKS passphrase so that it can load kernel and initrd files into RAM, but the rest is automatic.</p>
<p>I hope this helps! Eric</p>
]]></content:encoded></item><item><title>Slack Book revitalization effort - collaborators wanted</title><link>https://blog.slackware.nl/slack-book-revitalization-effort-collaborators-wanted/</link><pubDate>Sat, 17 Oct 2026 17:03:30 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5556</guid><category>Slackware</category><description>
Once upon a time there was the Slackware Linux Essentials Book. Written by the original Slackware team members Chris Lumens, David Cantrell, and Logan Johnson. The &amp;#34;First Edition&amp;#34; was released in 2000 as a paper edition.
Regulars from the Usenet newsgroup alt.os.linux.slackware launched The Revised Slackware Book Project to completely overhaul &amp;#34;The Book&amp;#34; under a GPLv2 license. This community edition was then published online,&amp;amp;nbsp; as The Second Edition in May 2005 at http://slackbook.org/ . There was an aborted attempt to rewrite the Revised Book in 2012, which can still be found at https://slackbook.org/beta/ , with the license changed to Creative Commons Attribution Share and Share-Alike.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-1181" src="/wp-content/uploads/2012/08/slack-docs.png" alt="" width="204" height="64" /></p>
<p>Once upon a time there was the <em>Slackware Linux Essentials</em> Book. Written by the original Slackware team members Chris Lumens, David Cantrell, and Logan Johnson. The "First Edition" was released in 2000 as a paper edition.<br />
Regulars from the Usenet newsgroup alt.os.linux.slackware launched <em>The Revised Slackware Book Project</em> to completely overhaul "The Book" under a GPLv2 license. This community edition was then published online,&nbsp; as The Second Edition in May 2005 at <a href="http://slackbook.org/" target="_blank" rel="noopener">http://slackbook.org/</a> . There was an aborted attempt to rewrite the Revised Book in 2012, which can still be found at <a href="https://slackbook.org/beta/" target="_blank" rel="noopener">https://slackbook.org/beta/</a> , with the license changed to <em>Creative Commons Attribution Share and Share-Alike</em>.</p>
<p>During the 21 years that followed the release of the <em>Revised Slackware Book</em>, its contents have effectively not been touched, and instead the <em>Slackware Documentation Project</em> came into existence at <a href="https://docs.slackware.com/" target="_blank" rel="noopener">https://docs.slackware.com/</a> . The Slack Docs Wiki carries an internal version of the revised Slackware Linux Essentials (the original XML sources were converted to Dokuwiki syntax), at <a href="https://docs.slackware.com/slackbook:start" target="_blank" rel="noopener">https://docs.slackware.com/slackbook:start</a></p>
<p>A little while ago, Bruno Russo, a well-respected member of the Brazilian Slackware community, reached out with the news that he was working on a conversion from the Revised Book's XML sources into MarkDown, which is a lot easier to read or edit, and renders in browsers directly. He requested a Forge account and under that account he has published a git repository containing the Slack Book in MarkDown: <a href="https://forge.slackware.nl/brunorusso/slackbook" target="_blank" rel="noopener">https://forge.slackware.nl/brunorusso/slackbook</a></p>
<p>Today Bruno revealed his project to the wider international audience, posting a message on <a href="https://www.linuxquestions.org/questions/slackware-14/slackbook-migrating-from-xml-to-markdown-call-for-contributors-4175767590/" target="_blank" rel="noopener">https://www.linuxquestions.org/questions/slackware-14/slackbook-migrating-from-xml-to-markdown-call-for-contributors-4175767590/</a> and also on his personal blog: <a href="https://brunorusso.com.br/posts/working-on-the-new-version-of-the-slackbook/" target="_blank" rel="noopener">https://brunorusso.com.br/posts/working-on-the-new-version-of-the-slackbook/</a> .</p>
<p>These messages are meant to pique the curiosity of fellow Slackware users. Because this project is not about the MarkDown conversion per se. Bruno has started a full rewrite of the Book, adding chapters and bringing existing content to the state of Slackware today.<br />
This is a huge undertaking, and Bruno wants you to help him. This should become a new community project to bring a re-vitalized Slackware Linux Essentials book into the world. New Slackware users need good structured guidance and this project will cater to that.</p>
<p>I hope some of my readers are now feeling the enthusiasm to contribute your knowledge to the greater good. Please contact Bruno and see what you can do!</p>
<p>Good luck, Eric</p>
]]></content:encoded></item><item><title>The Slackware Cloud Server, in real life</title><link>https://blog.slackware.nl/the-slackware-cloud-server-in-real-life/</link><pubDate>Sat, 17 Oct 2026 16:30:31 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5544</guid><category>Me</category><category>Slackware</category><description>
I have not been very communicative of late. My apologies for that! I am going to fix that with this lengthy write-up.
For months now, I have been emotionally and mentally challenged by the reorganization aka &amp;#39;transformation&amp;#39; which started in my company in January of 2026 and will continue into the new year, causing loss of jobs and a lot of stress (in my group as well as myself). In order to keep myself busy and distracted from all the hubbub, I play around with fun technology.
What fun tech? Slackware, the distro, feels a bit distant for me these days. I just wished there would be a stable release but I don&amp;#39;t control the pace and I&amp;#39;ve decided that I&amp;#39;ll just wait and sit it out. There will be much-needed release at some point, and I have lots of servers that keep me busy (updating their &amp;#39;-current&amp;#39; installations all the time) where a stable release will bring peace of mind. My Slackware related activities mostly revolve around keeping Chromium buildable on the stale Slackware 15.0.
What I do instead to challenge myself with something new is to play around with AI. Yep.
I know the aversion that many people have against AI, its use, the way these LLM&amp;#39;s are trained and the detrimental effect they have on parts of the world economy. But, as with the introduction of any new disruptive technology, this is a passing phase and the use of AI will rationalize like it did for the steam engine, the train, the car, the computer, and tamagotchi&amp;#39;s.
AI can be used as an accelerator of development, as long as you remain in control of the workflow and the ideas start with you... and the quality control ends with you.
My fascination is with Claude AI, and intellectually I needed to see what the value of such a tool can be to Slackware.
In preparation for my upcoming retirement from work (with a gentle nudge from my current employer ASML) I have been sparring with Claude AI, defining the outlines of multiple small and bigger projects to keep myself busy. One of these projects was already trying to take shape in my head some some years. It answers my question: how to automate the deployment of collaborative web services onto a fresh Slackware server. Eh? Let me refresh your mind then.
In the weeks before the Slackware 15.0 release, already way back in January 2022, I started a blog article series which I called &amp;#34;Slackware Cloud Server&amp;#34;. You can find that article series under an easy-to-remember URL https://cloudserver.slackware.nl/ which redirects to one of the pages on this very blog.
The idea behind the Slackware Cloud Server series is written down on its landing page:
This is an article series about using Slackware as your personal cloud platform, running collaborative web-based services on a server which you own and control.
Think of file-sharing, video-conferencing, collaborative document editing, decentralized social media, streaming video and audio, backing up your 2FA codes, syncing files from your desktop and your phone to your cloud server.
And all (or most) of these services are accessible via Single Sign-On: only one user account is needed to access the goodies on your private cloud platform.
The target audience I had in mind? Small communities, families, any group of people basically that has enough of the Big Tech lock-in where your data is no longer your own and being sold to the highest bidder.
I went to great lengths to test, install and then document the steps needed to setup such a server. It took an enormous amount of time to be honest. I have no idea if anyone ever was brave enough to follow the instructions and actually build such a Slackware Cloud :-) I myself put my articles into practice and built a demo server for the Slackware crew, https://tek.slackware.nl/ .
My project is unrelated by the way, to https://slackware.cloud/ which is an evident &amp;#39;rip-off&amp;#39; of my ideas as outlined in the blog article series ;-) That project is nothing more than some Slackware branding slapped on top of a commercial 3rd-party offering which is not running on Slackware at all. Fine, but I do not want to be associated with it.
Since that Slackware Cloud Server article series, I could never find the time to actually create something that is more than documentation. I was thinking about creating a set of Slackware packages that would install Keycloak, Jitsi, Nextcloud for you - fully pre-configured and ready-to-go. That would be next-level!
Earlier this year I realized that with the use of Claude AI I should be able to accelerate the speed of development of such an ambitious project and finish with something more widely usable. I chose Python as the language for this project (and PyQT6 for the graphical programming), Slackware-current as the target OS, Docker containers to run all the applications; and I made list of all kinds of requirements that would make this a safe-to-deploy solution. I decided to call this project &amp;#34;slackcloud&amp;#34; which is a better name for a Git repository than &amp;#34;slackware-cloud-server&amp;#34;.
Right now &amp;#34;slackcloud&amp;#34; is a private&amp;amp;nbsp;repository on the Slackware Forge, i.e. it is not accessible by anyone but me... but that will change in future when the code is stable.
To kick this off, I wrote the premise for the project as a &amp;#34;CLAUDE.md&amp;#34; file, and defined the specifications for my project (some of which I already mentioned higher up). Claude Chat translated these specifications into a design document &amp;#34;DESIGN.md&amp;#34;. Claude Code reads these two files from a local git clone on my laptop every time when it starts, and uses it to write the actual code. Claude Chat owns the design and reviews the work that Claude Code delivers, then shares with me the decisions to make before the coding continues (usually to resolve ambiguity in the specifications and sometimes because my ideas are proven to not work in reality), and I test the results.
The project progresses in well-defined stages. That works surprisingly well, with Code and Chat communicating via a &amp;#34;PROGRESS.md&amp;#34; document and challenging each other&amp;#39;s assumptions. Every stage results in new, sometimes unexpected findings which then are reconciled and folded into the design. This way of working has been evolving for a few months now, and it&amp;#39;s leading to something which I would not have been able to achieve personally in my lifetime. Great care is taken (through my explicit instructions to the AI) to log and document everything that slackcloud does and creates, putting data security and resilient design at first place, editing system files only within the boundaries of text-markers &amp;#34;# BEGIN slackcloud&amp;#34; and &amp;#34;# END slackcloud&amp;#34; ; and&amp;amp;nbsp; touching nothing of the filesystem except its own staging directory before I deem the new code ready for production.
By now, Claude understands the ins and outs of Slackware and how it&amp;#39;s different from other distros, but also the bot respects my own philosophy and how I want things to be done (no Unicode characters in text files please!). Call it &amp;#34;responsible use of AI&amp;#34;; yes you may mock me, I don&amp;#39;t care.
Eventually the project deliverable will be a single Slackware package, which - once installed - will give you a &amp;#34;slackcloud&amp;#34; command-line tool plus a PyQt6 GUI. When installing Slack Cloud, you can do that via the CLI on a remote terminal and even if the server is headless, a SSH tunnel will let you run the GUI if you prefer to have the full setup program visible with &amp;#39;previous&amp;#39; and &amp;#39;next&amp;#39; buttons.
Keycloak is still used for the Single Sign-On but I am adding new services for which I had not written an article before: Matrix Chat (including Element Web), Dokuwiki (making use of the same farmer/sheep construct that also powers Slack Docs), and Forgejo. Still to add before I am satisfied with the result is Nextcloud AIO (all in one Docker image with Euro-Office, OpenOffice or Collabora Office, the choice will be yours) to complete a solid collaboration platform where a group of people can share and collaborate on documents, chat in realtime and have video conferences (guests allowed).
There will also be a built-from-spec admin page for an administrator to manage user accounts and group memberships a bit more elegantly than going into Keycloak&amp;#39;s interface. The admin module will also allow for managing server backups and application upgrades.
A firewall will also be installed, with the rules automatically determined through the Slack Cloud services that are enabled (on top of your own local rules). For that, slackcloud will borrow a firewall generator engine which is another ongoing project of mine, called &amp;#34;Guardian Firewall Engine&amp;#34; which abbreviates to GFE. The abbreviation being a deliberate pun in honor of my ageing EFG (Easy Firewall Generator) at: https://alienbase.nl/efg/ this will be a re-implementation supporting IPv6 and based on nftables instead of iptables. Yet again a private repository on the Slackware Forge for now, but it will be opened up when the code is stable.
Slackcloud version 0.1.0 is already quite capable, fully supporting IPv6, and installs a variety of services, all running in Docker containers. The slackcloud tool also writes a static portal web page as shown in the screenshot where all of the installed web applications are easily accessible. Yes, those are real hostnames, and yes, I am confident that you&amp;#39;ll be unable to access them without account. The bots have already found these sites minutes after going live anyway.
You&amp;#39;d also experience when you visit this page, that the Wiki site is still under lockdown (i.e. not released to the public) as an example of how a deployment can stay under the radar until the administrator is satisfied with the initial setup and decides it&amp;#39;s time to invite the users.
Your comments and suggestions are welcome as always. Would you use this tool when it becomes available? What would be your primary concern? Why would this be an essential new capability for Slackware users?
Please try to avoid devolving the discussion into an anti-AI campaign, I am not interested in those comments.
Cheers, Eric</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-3692" src="/wp-content/uploads/2020/04/Slackware-WIP-300x262.png" alt="" width="73" height="64" /></p>
<p>I have not been very communicative of late. My apologies for that! I am going to fix that with this lengthy write-up.<br />
For months now, I have been emotionally and mentally challenged by the reorganization aka '<em>transformation</em>' which started in my company in January of 2026 and will continue into the new year, causing loss of jobs and a lot of stress (in my group as well as myself). In order to keep myself busy and distracted from all the hubbub, I play around with fun technology.<br />
What fun tech? Slackware, the distro, feels a bit distant for me these days. I just wished there would be a stable release but I don't control the pace and I've decided that I'll just wait and sit it out. There will be much-needed release at some point, and I have lots of servers that keep me busy (updating their '-current' installations all the time) where a stable release will bring peace of mind. My Slackware related activities mostly revolve around keeping Chromium buildable on the stale Slackware 15.0.<br />
What I do instead to challenge myself with something new is to play around with AI. Yep.<br />
I know the aversion that many people have against AI, its use, the way these LLM's are trained and the detrimental effect they have on parts of the world economy. But, as with the introduction of any new disruptive technology, this is a passing phase and the use of AI will rationalize like it did for the steam engine, the train, the car, the computer, and tamagotchi's.<br />
AI can be used as an accelerator of development, as long as you remain in control of the workflow and the ideas start with you... and the quality control ends with you.<br />
My fascination is with Claude AI, and intellectually I needed to see what the value of such a tool can be to Slackware.</p>
<p>In preparation for my upcoming retirement from work (with a gentle nudge from my current employer ASML) I have been sparring with Claude AI, defining the outlines of multiple small and bigger projects to keep myself busy. One of these projects was already trying to take shape in my head some some years. It answers my question: how to automate the deployment of collaborative web services onto a fresh Slackware server. Eh? Let me refresh your mind then.</p>
<p>In the weeks before the Slackware 15.0 release, already way back in January 2022, I started a blog article series which I called "Slackware Cloud Server". You can find that article series under an easy-to-remember URL <a href="https://cloudserver.slackware.nl/" target="_blank" rel="noopener">https://cloudserver.slackware.nl/</a> which redirects to one of the pages on this very blog.</p>
<p>The idea behind the Slackware Cloud Server series is written down on its landing page:</p>
<blockquote><p>This is an article series about using Slackware as your personal cloud platform, running collaborative web-based services on a server which you own and control.<br />
Think of file-sharing, video-conferencing, collaborative document editing, decentralized social media, streaming video and audio, backing up your 2FA codes, syncing files from your desktop and your phone to your cloud server.<br />
And all (or most) of these services are accessible via Single Sign-On: only one user account is needed to access the goodies on your private cloud platform.</p></blockquote>
<p>The target audience I had in mind? Small communities, families, any group of people basically that has enough of the Big Tech lock-in where your data is no longer your own and being sold to the highest bidder.<br />
I went to great lengths to test, install and then document the steps needed to setup such a server. It took an enormous amount of time to be honest. I have no idea if anyone ever was brave enough to follow the instructions and actually build such a Slackware Cloud :-) I myself put my articles into practice and built a demo server for the Slackware crew, <a href="https://tek.slackware.nl/" target="_blank" rel="noopener">https://tek.slackware.nl/</a> .</p>
<blockquote><p>My project is unrelated by the way, to <a href="https://slackware.cloud/" target="_blank" rel="noopener">https://slackware.cloud/</a> which is an evident 'rip-off' of my ideas as outlined in the blog article series ;-) That project is nothing more than some Slackware branding slapped on top of a commercial 3rd-party offering which is not running on Slackware at all. Fine, but I do not want to be associated with it.</p></blockquote>
<p>Since that Slackware <em>Cloud Server</em> article series, I could never find the time to actually <em>create</em> something that is more than documentation. I was thinking about creating a set of Slackware packages that would install Keycloak, Jitsi, Nextcloud for you - fully pre-configured and ready-to-go. That would be next-level!<br />
Earlier this year I realized that with the use of Claude AI I should be able to accelerate the speed of development of such an ambitious project <em>and</em> finish with something more widely usable. I chose Python as the language for this project (and PyQT6 for the graphical programming), Slackware-current as the target OS, Docker containers to run all the applications; and I made list of all kinds of requirements that would make this a safe-to-deploy solution. I decided to call this project "<em>slackcloud</em>" which is a better name for a Git repository than "<em>slackware-cloud-server</em>".</p>
<p>Right now "<em>slackcloud</em>" is a <em>private</em>&nbsp;repository on the <a href="https://forge.slackware.nl/" target="_blank" rel="noopener">Slackware Forge</a>, i.e. it is not accessible by anyone but me... but that will change in future when the code is stable.</p>
<p>To kick this off, I wrote the premise for the project as a "CLAUDE.md" file, and defined the specifications for my project (some of which I already mentioned higher up). Claude Chat translated these specifications into a design document "DESIGN.md". Claude Code reads these two files from a local git clone on my laptop every time when it starts, and uses it to write the actual code. Claude Chat owns the design and reviews the work that Claude Code delivers, then shares with me the decisions to make before the coding continues (usually to resolve ambiguity in the specifications and sometimes because my ideas are proven to not work in reality), and I test the results.<br />
The project progresses in well-defined stages. That works surprisingly well, with Code and Chat communicating via a "PROGRESS.md" document and challenging each other's assumptions. Every stage results in new, sometimes unexpected findings which then are reconciled and folded into the design. This way of working has been evolving for a few months now, and it's leading to something which I would not have been able to achieve personally in my lifetime. Great care is taken (through my explicit instructions to the AI) to log and document everything that slackcloud does and creates, putting data security and resilient design at first place, editing system files only within the boundaries of text-markers "<code># BEGIN slackcloud</code>" and "<code># END slackcloud</code>" ; and&nbsp; touching nothing of the filesystem except its own staging directory before I deem the new code ready for production.</p>
<p>By now, Claude understands the ins and outs of Slackware and how it's different from other distros, but also the bot respects my own philosophy and how I want things to be done (<em>no Unicode characters in text files please!</em>). Call it "responsible use of AI"; yes you may mock me, I don't care.</p>
<p>Eventually the project deliverable will be a single Slackware package, which - once installed - will give you a "<code>slackcloud</code>" command-line tool plus a PyQt6 GUI. When installing Slack Cloud, you can do that via the CLI on a remote terminal and even if the server is headless, a SSH tunnel will let you run the GUI if you prefer to have the full setup program visible with 'previous' and 'next' buttons.</p>
<p>Keycloak is still used for the Single Sign-On but I am adding new services for which I had not written an article before: Matrix Chat (including Element Web), Dokuwiki (making use of the same farmer/sheep construct that also powers <a href="https://docs.slackware.com/" target="_blank" rel="noopener">Slack Docs</a>), and Forgejo. Still to add before I am satisfied with the result is Nextcloud AIO (all in one Docker image with Euro-Office, OpenOffice or Collabora Office, the choice will be yours) to complete a solid collaboration platform where a group of people can share and collaborate on documents, chat in realtime and have video conferences (guests allowed).<br />
There will also be a built-from-spec admin page for an administrator to manage user accounts and group memberships a bit more elegantly than going into Keycloak's interface. The admin module will also allow for managing server backups and application upgrades.<br />
A firewall will also be installed, with the rules automatically determined through the Slack Cloud services that are enabled (on top of your own local rules). For that, slackcloud will borrow a firewall generator engine which is another ongoing project of mine, called "Guardian Firewall Engine" which abbreviates to GFE. The abbreviation being a deliberate pun in honor of my ageing EFG (Easy Firewall Generator) at: <a href="https://alienbase.nl/efg/" target="_blank" rel="noopener">https://alienbase.nl/efg/</a> this will be a re-implementation supporting IPv6 and based on nftables instead of iptables. Yet again a private repository on the Slackware Forge for now, but it will be opened up when the code is stable.</p>
<p>Slackcloud version 0.1.0 is already quite capable, fully supporting IPv6, and installs a variety of services, all running in Docker containers. The slackcloud tool also writes a static portal web page as shown in the screenshot where all of the installed web applications are easily accessible. Yes, those are real hostnames, and yes, I am confident that you'll be unable to access them without account. The bots have already found these sites minutes after going live anyway.<br />
You'd also experience when you visit this page, that the Wiki site is still under lockdown (i.e. not released to the public) as an example of how a deployment can stay under the radar until the administrator is satisfied with the initial setup and decides it's time to invite the users.</p>
<p><a href="/wp-content/uploads/2026/10/slackcloud_0.1.0_test_deployed.png" target="_blank" rel="noopener"><img class="my-drop-shadow aligncenter wp-image-5545 size-full" src="/wp-content/uploads/2026/10/slackcloud_0.1.0_test_deployed.png" alt="" width="920" height="889" /></a></p>
<p>Your comments and suggestions are welcome as always. Would you use this tool when it becomes available? What would be your primary concern? Why would this be an essential new capability for Slackware users?</p>
<p>Please try to avoid devolving the discussion into an anti-AI campaign, I am not interested in <strong>those</strong> comments.</p>
<p>Cheers, Eric</p>
<p>



</p>
<hr />
<p>This is the example <code>slackcloud.yaml</code> file which the slackcloud package will install to '<code>/etc/slackcloud/slackcloud.yaml</code>'.<br />
When installing (or "applying") the Slack Cloud container stack to your server via the command "<code>slackcloud apply -c /etc/slackcloud/slakcloud.yaml</code>", this file determines the outcome of what gets installed:</p>
<pre># slackcloud.yaml - annotated reference configuration
# Lives at /etc/slackcloud/slackcloud.yaml on the target server (mode 0600).
# The PyQt6 wizard generates this file; editing it by hand and re-running
# 'slackcloud apply' is fully supported and is how you add applications later.

server:
  domain: example.org            # base domain; apps live on subdomains of it
  ipv4:
    enabled: yes                 # public IPv4 reachability (default: yes)
    public_ip: 203.0.113.10      # the address your A records point at
  ipv6:
    enabled: yes                 # public IPv6 reachability (default: yes)
    public_ip: 2001:db8::10      # the address your AAAA records point at
  # At least one family must be enabled. A flat 'public_ip: ' line from
  # older configs is still read as ipv4.public_ip, but you then also need to
  # set ipv6.enabled: no or add ipv6.public_ip.
  interface: eth0                # NIC carrying the public traffic
  admin_email: admin@example.org # Let's Encrypt registration + cron mail

branding:
  # Place your assets in /etc/slackcloud/branding/ (any absolute path works;
  # these are examples, not fixed locations). Both files must exist: apply
  # refuses at validation with "logo not found at " rather than
  # producing an unbranded login page. A changed file is picked up by the
  # next 'slackcloud apply' and re-propagated by content comparison.
  favicon: /etc/slackcloud/branding/favicon.ico   # Keycloak theme and admin panel
  logo: /etc/slackcloud/branding/logo.png         # login screens; PNG or SVG

docker:
  install: yes                   # no = verify presence, abort early if missing
  data_root: /var/lib/docker     # change if /var is small
  network_pool: 172.31.0.0/16    # internal IPv4, one /24 per application stack;
                                 # always used, also on IPv6-only hosts
  ipv6_networks: no              # yes = container networks also get a /64
  network_pool6: fd00:5c10::/48  # ULA range carved into /64s (only read when
                                 # ipv6_networks is yes)
  loopback_port_base: 18080      # first 127.0.0.1 port for proxied container
                                 # ports; allocated upwards, recorded in state

keycloak:
  realm: mycloud
  hostname: id.example.org       # default: id.
  admin_password: ask            # 'ask' = prompt; the GUI offers to generate
  # Applications whose app- group every NEW user joins (Keycloak realm
  # default groups; users that already exist are not added). Keycloak refuses a
  # sign-in to an application unless the user is in its app- group (or a
  # subgroup) or in cloud-admins, so this is how a new member gets in at once.
  # Default: [matrix] when matrix is enabled, otherwise none; [] means none.
  # Every name must be an enabled application (DESIGN.md 6).
  # default_groups: [matrix]
  # Failed or refused sign-ins before Keycloak locks a user out of NEW sign-ins for a
  # minute (more for each further batch of this many, at most fifteen minutes). Refusals
  # by the access gate count too, and slackcloud turns Keycloak's quick-login check off.
  # Converged on every apply, so set it here rather than in the console. Minimum 3.
  # failure_factor: 10

# Every app also accepts an optional image_tag (e.g. "image_tag: 15.1.2"),
# overriding the module's own tested pin (DESIGN.md 7, "Pinned container
# images"). A deliberate deviation from a tested combination: slackcloud
# does not re-verify an administrator's chosen tag the way it does its
# own pins.
apps:
  jellyfin:
    enabled: yes
    hostname: media.example.org  # default: media.
    media_path: /srv/media       # bind-mounted read-only into the container

  affine:
    enabled: yes
    hostname: notes.example.org

  forgejo:                       # git forge, HTTPS only, OIDC via Keycloak
    enabled: yes
    hostname: forge.example.org  # default: forge.
    # image_tag: 15.0.8           # optional override; see the note above

  dokuwiki:                      # deployed as a farm; see DESIGN.md section 7
    enabled: yes
    hostname: wiki.example.org   # default: wiki.

  matrix:
    enabled: yes
    hostname: matrix.example.org     # homeserver (Tuwunel)
    element_hostname: chat.example.org
    serve_well_known: yes            # well-known discovery on the apex vhost; with
                                     # federation off only the client file is served
    federation: no                   # no (default) = a fully contained community, nothing
                                     # exposed to other Matrix servers; yes = federate
                                     # (see DESIGN.md 7)
    element_call: yes                # Element Call (MatrixRTC): LiveKit and lk-jwt-service,
                                     # so Element X, the mobile app, can place and answer
                                     # calls (it supports nothing else). no = voice and
                                     # video from Element Web only (DESIGN.md 7)
    rtc_hostname: rtc.example.org    # LiveKit and lk-jwt-service; needs a DNS record and a
                                     # certificate; opens udp 7882 and tcp 7881

  nextcloud_aio:
    enabled: yes
    hostname: cloud.example.org
    # AIO manages its own containers and network; slackcloud verifies that
    # the network it creates does not collide with anything, then records it.

  jitsi:
    enabled: no
    hostname: meet.example.org
    guests: yes                  # people without an account join a meeting a member has started;
                                 # no: everyone signs in. Only app-jitsi and cloud-admins start one.
    p2p: no                      # yes: a call of two goes peer-to-peer (this host's own STUN server);
                                 # the browsers then exchange real LAN addresses, so a guest learns a
                                 # member's (SECURITY.md AR-17). Needs turn: auto. Default no: a call
                                 # of two goes through the video bridge.

  adminpanel:
    enabled: yes                 # strongly recommended; this is your user admin
    hostname: admin.example.org

# TURN: one coturn for the whole host, used by Matrix (Tuwunel, LiveKit) and Jitsi. It is an
# internal module: never listed under apps:, enabled by itself when an application needs it.
# This section is optional; every key has a default (DESIGN.md 7, "TURN").
turn:
  enabled: auto                  # auto: on when an application needs it (default);
                                 # no: decline it. Each application then renders without it, and
                                 # preflight, apply, POSTINSTALL and status say what stops working
                                 # (Jitsi: guests behind UDP-blocking networks cannot join; Matrix:
                                 # no relay for calls). An external TURN server is planned.
  hostname: turn.example.org     # needs a DNS record and a certificate, no web vhost
                                 # (default: turn.)
  relay_ports: "49152-49351"     # the UDP media relay range; the firewall opens exactly this range

certs:
  # The ACME directory dehydrated talks to. Anything other than the Let's
  # Encrypt production directory issues certificates browsers do not trust;
  # 'slackcloud status' says so. Changing it re-issues every certificate.
  acme_directory: https://acme-v02.api.letsencrypt.org/directory
  # Let's Encrypt staging (no rate limits, untrusted certificates):
  #   https://acme-staging-v02.api.letsencrypt.org/directory
  # A local Pebble test server (https://github.com/letsencrypt/pebble; see
  # tests/pebble/README.md), on the *same host* dehydrated runs on:
  #   https://localhost:14000/dir
  #
  # ca_bundle: a CA file dehydrated must trust to reach acme_directory at all
  # (not the certificates it issues; that is a separate, unrelated trust
  # decision). Required for a private or local ACME server such as Pebble,
  # whose own endpoint certificate is signed by a CA the system does not know;
  # not needed for Let's Encrypt production or staging, both served over a
  # publicly trusted certificate regardless of what they issue.
  #   ca_bundle: /etc/slackcloud/pebble.minica.pem
  #
  # trust_system_store: yes overrides the requirement above, for the rare case
  # where the directory's own certificate is already in this host's trust
  # store. Rejected by default: the check exists because the failure mode
  # otherwise looks like "curl returned with 60" for no apparent reason.

backup:
  schedule: "30 3 * * *"         # root crontab entry, dcron syntax
  retention_days: 14
  destination: /var/lib/slackcloud/backups

firewall:
  # The ruleset is generated from this block plus each application's own
  # port declarations; application ports are never listed here. Omitting
  # the whole block means "protected with defaults", not "open".
  enabled: yes                   # only an explicit 'no' leaves the host unprotected
  backend: nftables              # the only backend in v1
  ssh_port: 22
  ssh_allow_from: [any]          # or CIDRs of an enabled family, e.g. [203.0.113.0/24, 2001:db8::/32]
  extra_open_ports: []           # non-slackcloud services on this host, e.g.
                                 #   - {port: 25, proto: tcp, from: [any], comment: "smtp"}
                                 #   - {port: "60000-61000", proto: udp, comment: "mosh"}
  icmp: yes                      # keep PMTUD working, especially on IPv6
  log_drops: no                  # rate-limited logging of dropped packets

setup_lockdown:
  # A newly deployed application is unconfigured until the administrator
  # finishes its first-run setup; until then its vhost accepts only these
  # sources (DESIGN.md 19). Required whenever enabled (the default): there
  # is no safe default admin_access_from, since defaulting to "everyone"
  # would defeat the point. 'slackcloud release ' (or --all) lifts
  # the restriction once setup is done; re-running apply never re-locks a
  # released service or releases a locked one.
  enabled: yes
  admin_access_from: [203.0.113.0/24, 2001:db8:1234::/48]
</pre>]]></content:encoded></item><item><title>Chromium 154 package available, ungoogled sibling arrives tomorrow (hopefully)</title><link>https://blog.slackware.nl/chromium-154-package-available-ungoogled-sibling-arrives-tomorrow-hopefully/</link><pubDate>Sun, 27 Sep 2026 22:43:23 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5541</guid><category>Rant</category><category>Software</category><category>Slackware</category><description> The first release of Chromium 154 was announced recently and still, Google&amp;#39;s CI is failing to produce a source tarball.
Every recent release contained fixes for a shitload of CVE&amp;#39;s and it is unacceptable that I was unable to build packages because of missing source code. I waited and asked the developers, and received meaningless answers, and eventually had enough of the bullshit and fixed my &amp;#39;fetch-chromium-release.sh&amp;#39; script which I ship as part of the chromium SlackBuild.
The fetch script produces a real chromium source tarball now, similar sized to the official source tarball and I have used it to build a working package for Chromium 153 and now also for Chromium 154.
I posted the fetch script and also a somewhat expanded version &amp;#39;create-chromium-release-tarball.sh&amp;#39; which you can run as a cron job, to the Slackware Forge: https://forge.slackware.nl/alienbob/randomstuff/src/branch/main/chromium-scripts
At least now, when I wake up and there was a new Chromium release, I will find the tarball ready to use on my build server.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-4846" src="/wp-content/uploads/2024/01/google-chrome-chromium-150x150.jpg" alt="" width="64" height="64" /> The first release of <a href="https://chromereleases.googleblog.com/2026/09/stable-channel-update-for-desktop_0856730748.html" target="_blank" rel="noopener">Chromium 154 was announced</a> recently and still, Google's CI is failing to produce a source tarball.<br />
Every recent release contained fixes for a shitload of CVE's and it is unacceptable that I was unable to build packages because of missing source code. I waited and asked the developers, and received meaningless answers, and eventually had enough of the bullshit and fixed my '<em>fetch-chromium-release.sh</em>' script which I ship as part of the chromium SlackBuild.<br />
The fetch script produces a real chromium source tarball now, similar sized to the official source tarball and I have used it to build a working package for Chromium 153 and now also for Chromium 154.<br />
I posted the fetch script and also a somewhat expanded version '<em>create-chromium-release-tarball.sh</em>' which you can run as a cron job, to the Slackware Forge: <a href="https://forge.slackware.nl/alienbob/randomstuff/src/branch/main/chromium-scripts" target="_blank" rel="noopener">https://forge.slackware.nl/alienbob/randomstuff/src/branch/main/chromium-scripts</a><br />
At least now, when I wake up and there was a new Chromium release, I will find the tarball ready to use on my build server.</p>
<p>The chromium-154.0.8037.57 package is available in my repository now, and I am compiling chromium-ungoogled next.</p>
<p>I hope the scripts will help some of you.<br />
Cheers, Eric</p>
]]></content:encoded></item><item><title>How Chromium is built (for now)</title><link>https://blog.slackware.nl/how-chromium-is-built-for-now/</link><pubDate>Sun, 30 Aug 2026 16:45:13 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5531</guid><category>Software</category><category>Slackware</category><description>A short history of providing Chromium on Slackware.
I have scripted the compilation process in such a way that you can compile the Chromium sources into both chromium and chromium-ungoogled packages for Slackware using the same chromium.SlackBuild script. I compile the packages on Slackware 15.0 and use the same resulting package for both Slackware 15.0 and -current. This is a simple matter of economics - it takes half a day to compile a single package and when I can only validate and run in the evenings, every compilation effectively takes one full day.</description><content:encoded><![CDATA[<p>A short history of providing Chromium on Slackware.<br />
I have scripted the compilation process in such a way that you can compile the Chromium sources into both <a href="https://slackware.nl/people/alien/slackbuilds/chromium/" target="_blank" rel="noopener">chromium</a> and <a href="https://slackware.nl/people/alien/slackbuilds/chromium-ungoogled/" target="_blank" rel="noopener">chromium-ungoogled</a> packages for Slackware using the same <a href="https://slackware.nl/people/alien/slackbuilds/chromium/build/" target="_blank" rel="noopener">chromium.SlackBuild</a> script. I compile the packages on Slackware 15.0 and use the same resulting package for both Slackware 15.0 and -current. This is a simple matter of economics - it takes half a day to compile a single package and when I can only validate and run in the evenings, every compilation effectively takes one full day.</p>
<p>The Google developers themselves compile these same Chromium sources into the official Chrome browser binaries using modified, customized versions of the Clang and Rust compiler toolchains to do so. They ship 64bit binaries of both those toolchains <strong>inside</strong> the Chromium source code tarballs, for both X86 and ARM architectures. No 32bit binaries have been included for a long time now. All of these binaries have been built on a somewhat older Debian release so that they are compatible with modern distros and just work.</p>
<p>As a Chromium packager, I can use these embedded binaries to ensure that I won't run into source code incompatibilities, but then that only works for 64bit packages. For the 32bit packages I have always been relying on Slackware's own 32bit versions of Clang and Rust as shipped with Slackware itself. Pat has been so kind to provide recent versions of llvm, rust and rust-bindgen for Slackware 15.0 in its ./extra and ./testing subdirectories, and he keeps doing that until today. Probably because he needs these to compile Mozilla Firefox :-) But hey, I profit.<br />
Compiling Chromium using the Slackware native compilers has its own challenges but I have always found ways to deal with that.</p>
<p>Until now.</p>
<p>To compile the Chromium source code, Google has introduced a new tool, <a href="https://github.com/google/crubit" target="_blank" rel="noopener">crubit</a>, which aims to integrate the C++ and Rust ecosystems. It is a bidirectional bindings generator for C++ and Rust. In the Chromium 152 source code, only the "<em>cc_bindings_from_rs</em>" tool of crubit is being used, but in future also the reverse bindings counterpart "<em>rs_bindings_from_cc</em>" will be added.<br />
The problem I have with this, is that Google compiled this "<em>cc_bindings_from_rs</em>" tool on a modern (Debian?) distro and thereby introduced a dependency on glibc 2.34. Slackware 15.0 contains glibc 2.33 and there you have it. The "<em>cc_bindings_from_rs</em>" program refuses to run on Slackware 15.0.<br />
I have spent considerable time trying to compile crubit on Slackware 15.0 using either the Slackware native compilers or even Google's own embedded compilers inside the Chromium source code, and have failed to produce a binary that works on Slackware 15.0.</p>
<p>Other measures were required.<br />
The challenge I faced is two-fold:</p>
<ol>
<li>I cannot use the embedded "<em>cc_bindings_from_rs</em>" on Slackware 15.0</li>
<li>I cannot compile a native Slackware version of it either</li>
</ol>
<p>And these have multiple consequences. I can try to find a way to make that program run on Slackware 15.0 but it's still a 64bit binary so I cannot solve the problem for the 32bit Chromium anyway if I cannot compile a native 32bit binary for "<em>rs_bindings_from_rs</em>".<br />
The way I tackled this is as follows. First I extracted a Slackware-current 64bit "aaa_glibc-solibs" package into the filesystem of my Slackware 15..0 compile box:</p>
<blockquote>
<pre>mkdir -p /opt/glibc-current/lib64
tar -C /opt/glibc-current/ -xf aaa_glibc-solibs-2.42-x86_64-2.txz
cd /opt/glibc-current/
rm -r install sbin usr
mv -i lib64/incoming/* lib64/
rmdir lib64/incoming</pre>
</blockquote>
<p>This is a one-time action. These files will remain there for future compilations. And now I have all of the newer glibc libraries (libc.so.6 and others) and the loader (ld-linux) that I need for Chromium, conveniently out of the way so that they do not affect the Slackware 15.0 system.<br />
Then I need to convince the "rs_bindings_from_rs" tool to look at "<code>/opt/glibc-current/lib64/</code>" when&nbsp; it wants to load glibc libraries. For this purpose, I added the following block inside the chromium.SlackBuild script.</p>
<pre># ---
GLIBC_COMPAT=${GLIBC_COMPAT:-/opt/glibc-current/lib64}
RUSTTC="$TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/third_party/rust-toolchain"
CBFR="${RUSTTC}/bin/cc_bindings_from_rs"
if [ -x "$CBFR" ] &amp;&amp; ! "$CBFR" --help &gt;/dev/null 2&gt;&amp;1 ; then
&nbsp; echo "-- Wrapping cc_bindings_from_rs to use $GLIBC_COMPAT."
&nbsp; mv "$CBFR" "$CBFR.real"
&nbsp; cat &gt; "$CBFR" &lt;&lt;EOF
#!/bin/bash
exec $GLIBC_COMPAT/ld-linux-x86-64.so.2 \\
--library-path $GLIBC_COMPAT:$RUSTTC/lib \\
"$CBFR.real" "\$@"
EOF
&nbsp; chmod +x "$CBFR"
&nbsp; "$CBFR" --help &gt;/dev/null 2&gt;&amp;1 &amp;&amp; echo "-- cc_bindings_from_rs OK." \
&nbsp; || { echo "-- ERROR: cc_bindings_from_rs still not runnable." ; exit 1 ; }
fi
# ---</pre>
<p>What this does, is check whether the "<em>cc_bindings_from_rs</em>" tool actually runs (on Slackware-current it will run without issue) and if it fails because of the missing glibc symbols, create a wrapper script which ensures that the newer glibc libraries take precedence over Slackware's own glibc, <em>only for this particular binary</em>. If "<em>cc_bindings_from_rs</em>" still fails to run, the script will abort.</p>
<p>This solves issue number 1.&nbsp; But for a package build on 32bit Slackware 15.0 I would still need to be able to compile a native 32bit "<em>cc_bindings_from_rs</em>" and that's simply not possible right now.<br />
The solution here, is to use the 64bit toolchain embedded in the Chromium source, just like I did for the 64bit Slackware package, but then using <em>cross-compilation on a 64bit multilib Slackware 15.0 host</em> with 32bit as the target architecture.<br />
Guess what... the chromium.SlackBuild is already fully prepared to perform a cross-compilation. All it needs is that you set the variable CROSS32 to the value "YES". The Clang and Rust toolchains that are embedded in the Chromium source code are fully capable of cross-compiling. You do need to turn your 64bit Slackware host into a full multilib system <a href="https://docs.slackware.com/slackware:multilib#enabling_multilib_support_on_slackware64" target="_blank" rel="noopener">following the instructions</a>.</p>
<p>The command-line that compiles a 32bit <em>chromium-ungoogled</em> package then becomes:</p>
<blockquote>
<pre>CROSS32=YES BUILD_CLANG=1 USE_UNGOOGLED=1 ./chromium.SlackBuild</pre>
</blockquote>
<p>Hope this helps if you want to try this yourself and have been struggling with the new requirements.</p>
<p>Cheers, Eric</p>
]]></content:encoded></item><item><title>Chromium 152 - a pain to compile, so have patience (similar for LibreOffice)</title><link>https://blog.slackware.nl/chromium-152-a-pain-to-compile-so-have-patience-similar-for-libreoffice/</link><pubDate>Fri, 28 Aug 2026 21:55:06 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5528</guid><category>Rant</category><category>Slackware</category><description>Chromium 152 sources contain another major step for Google to unify their build infrastructure. Great for Google but for me it sucks.
Because unfortunately for me (and for you, the Chromium browser user) Google introduces new tools as part of their custom Rust toolchain that I am unable to compile locally as Slackware-native binaries. The &amp;#34;cc_bindings_from_rs&amp;#34; tool biting me in particular, part of the &amp;#34;crubit&amp;#34; project, also from Google.
Which means that (for now) I have to use the pre-built LLVM and Rust toolchain binaries that are embedded in the Chromium source tarball.
There&amp;#39;s a big &amp;#39;gotcha&amp;#39; to that now, something that was never an issue before. They have built&amp;amp;nbsp;&amp;#34;cc_bindings_from_rs&amp;#34; &amp;amp;nbsp;on a system that is more modern than Slackware 15.0, so that this binary (and also several others as I found out) fail to run on Slackware 15.0, complaining &amp;#34;version `GLIBC_2.34&amp;#39; not found&amp;#34;. As a result, the chromium.SlackBuild script fails to produce a package.</description><content:encoded><![CDATA[<p>Chromium 152 sources contain another major step for Google to unify their build infrastructure. Great for Google but for me it sucks.</p>
<p>Because unfortunately for me (and for you, the Chromium browser user) Google introduces new tools as part of their custom Rust toolchain that I am unable to compile locally as Slackware-native binaries. The "<em>cc_bindings_from_rs</em>" tool biting me in particular, part of the "crubit" project, also from Google.<br />
Which means that (for now) I have to use the pre-built LLVM and Rust toolchain binaries that are embedded in the Chromium source tarball.<br />
There's a big '<em>gotcha</em>' to that now, something that was never an issue before. They have built&nbsp;"<em>cc_bindings_from_rs</em>" &nbsp;on a system that is more modern than Slackware 15.0, so that this binary (and also several others as I found out) fail to run on Slackware 15.0, complaining "<em>version `GLIBC_2.34' not found</em>". As a result, the chromium.SlackBuild script fails to produce a package.</p>
<p>For the time being, I refuse to ditch support for Slackware 15.0 and I will keep trying to find a way to compile Chromium 152. This is galling, because I would like to spend my precious time on actually useful stuff instead of fighting Google at their own game. Still, the amount of CVE's that is addressed by Chromium 152 is huge and I cannot ignore that.</p>
<p>Then LibreOffice is adding insult to injury. You might have seen in my repository's ChangeLog.txt that I only released LibreOffice 26.8.0 as 64bit Slackware packages (15.0 and -current). I can not make the 32bit compile work here. An issue (looks like a compiler trap) which is unrelated to the Chromium problem, but it shows a troubling trend: the disregard that developers have for users of older 32bit hardware and older Operating Systems. The build of this new release simply was never properly quality-tested on 32bit.</p>
<p>To be continued.</p>
<blockquote><p><em>Update 20260830:</em><br />
For 32bit Chromium I found a solution which I documented in a <a href="/how-chromium-is-built-for-now/" target="_blank" rel="noopener">separate blog article</a>.<br />
For 32bit LibreOffice I also found a fix, which boils down to "make sure that clang does not run out of address space on a 32bit host". I disabled debug symbols, reduced code compilation optimizations, cranked up the stack limit and reduced the parallelism from "use all your cores" to "just four, no more". All of this combined has indeed helped clang avoid traps and segfaults. Takes a lot longer to complete but that's the compromise.</p></blockquote>
]]></content:encoded></item><item><title>Slackware Forge is being abused by Chinese computer infrastructure</title><link>https://blog.slackware.nl/slackware-forge-is-being-abused-by-chinese-computer-infrastructure/</link><pubDate>Mon, 27 Jul 2026 20:06:39 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5520</guid><category>Rant</category><category>Slackware</category><description>Unfortunately the Forge web site forge.slackware.nl is super slow today. The reason: an onslaught from many many IP addresses belonging to Chinese infrastructure. It almost feels like a DDoS attack. Every repository, every commit, every &amp;#39;blame&amp;#39; page seems to be requested and the requestors are hiding that they are bots. A UserAgent containing &amp;#34;Edg/145.0.0.0&amp;#34; i.e. with a missing &amp;#34;e&amp;#34; tells it all.
I will look into installing Anubis on this server. Apologies for the degradation of the service.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-5470" src="/wp-content/uploads/2026/05/forgejo_logo-150x150.png" alt="" width="64" height="64" />Unfortunately the Forge web site <a href="https://forge.slackware.nl/" target="_blank" rel="noopener">forge.slackware.nl</a> is super slow today. The reason: an onslaught from many many IP addresses belonging to Chinese infrastructure. It almost feels like a DDoS attack. Every repository, every commit, every 'blame' page seems to be requested and the requestors are hiding that they are bots. A UserAgent containing "Edg/145.0.0.0" i.e. with a missing "e" tells it all.</p>
<p>I will look into installing Anubis on this server. Apologies for the degradation of the service.</p>
<blockquote><p>Update 20260729:<br />
I have installed Anubis to guard the gate of Forge and discourage the AI scraping bots.<br />
It looks like the site has its responsiveness back, but I want to hear if anything in your git and CICD workflows has perhaps broken as a result. It <strong>should</strong> all still work because only the HTML page requests are being fed into Anubis. Still...</p></blockquote>
]]></content:encoded></item><item><title>I had to fix the Slackware 15.0 git repository</title><link>https://blog.slackware.nl/i-had-to-fix-the-slackware-15-0-git-repository/</link><pubDate>Sun, 28 Jun 2026 01:17:38 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5515</guid><category>Slackware</category><description>Recently, and unexpectedly, I noticed a lot of errors in the output of the script which populates the git repository for Slackware. Specifically, when it updated the &amp;#34;15.0&amp;#34; branch which tracks the updates in Slackware 15.0.
I did an evening of troubleshooting and fixing. Somehow, the root user had dumped a copy of Slackware-current in the checked-out directory containing the Slackware 15.0 branch of the git repository. The script errors were caused by the inability of the non-root user running the script, to delete all the root-owned files that were suddenly there.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-327" src="/wp-content/uploads/2010/02/gitlogo.png" alt="" width="64" height="124" />Recently, and unexpectedly, I noticed a lot of errors in the output of the script which <a href="https://slackware.nl/people/alien/tools/maintain_current_git.sh" target="_blank" rel="noopener">populates the git repository</a> for Slackware. Specifically, when it updated the "15.0" branch which tracks the updates in Slackware 15.0.</p>
<p>I did an evening of troubleshooting and fixing. Somehow, the root user had dumped a copy of Slackware-current in the checked-out directory containing the Slackware 15.0 branch of the git repository. The script errors were caused by the inability of the non-root user running the script, to delete all the root-owned files that were suddenly there.</p>
<p>I was out traveling (to the ISC'26) with my team and did not have the time to fix this earlier.</p>
<p>Now I have fixed <a href="https://git.slackware.nl/current/log/?h=15.0" target="_blank" rel="noopener">https://git.slackware.nl/current/log/?h=15.0</a> which I mirror as <a href="https://forge.slackware.nl/slackware/distrodevelopment/src/branch/15.0" target="_blank" rel="noopener">https://forge.slackware.nl/slackware/distrodevelopment/src/branch/15.0</a> by deleting the faulty commit (which contained all of Slackware-current), replaying the three good commits that came after and then salvaging the actual update from the faulty commit.<br />
It means that the 4 new commits (actually the same commits but with a new hash) look a bit weird compared with all the others. They were manually fixed.</p>
<p>What this also means is: I have re-written the git history. If you cloned this repository from either of the above repository URLs (<em>pure 'clone', not 'clone --mirror'</em>) you need to do a hard reset:</p>
<pre>$ git fetch origin
$ git reset --hard origin/15.0
$ git fetch --prune --prune-tags origin</pre>
<p>If you cloned this repository in the Slackware Forge, it's considered an independent copy. It will not update of its own. You will have to sync or reset manually.</p>
<p>If you actually are <em>mirroring</em> the repository <a href="https://forge.slackware.nl/slackware/distrodevelopment" target="_blank" rel="noopener">https://forge.slackware.nl/slackware/distrodevelopment</a> then your next "<code>git remote update</code>" will most likely just bring your mirror back in sync without a need for further interaction.</p>
<p>I have also double-checked that any script that touches this git repository when doing updates is not clashing with another instance.<br />
Sorry for any inconvenience.</p>
]]></content:encoded></item><item><title>Fixing the cgit configuration of git.slackware.nl</title><link>https://blog.slackware.nl/fixing-the-cgit-configuration-of-git-slackware-nl/</link><pubDate>Fri, 19 Jun 2026 23:23:21 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5507</guid><category>Software</category><category>Slackware</category><description>In an earlier article here on the blog, I documented how I have setup cgit to create a browseable web interface to my git repositories, most notably git.liveslak.org and git.slackware.nl.
That configuration has worked just fine for years, and you could clone a branch of a repository using the &amp;#34;https://&amp;#34; git URI and that works.
However...
Cgit is a nice graphical shell around git repositories, but it does not serve the actual git protocol.
I found out when I tried to setup a mirror of the &amp;#34;current&amp;#34; repository on the Slackware Forge. For that, I needed to perform a full clone including all branches and tags. That failed mysteriously with the error:</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-5470" src="/wp-content/uploads/2026/05/forgejo_logo-150x150.png" alt="" width="64" height="64" />In <a href="/how-i-setup-cgit-for-a-browsable-liveslak-repository/" target="_blank" rel="noopener">an earlier article</a> here on the blog, I documented how I have setup cgit to create a browseable web interface to my git repositories, most notably <a href="https://git.liveslak.org/" target="_blank" rel="noopener">git.liveslak.org</a> and <a href="https://git.slackware.nl/" target="_blank" rel="noopener">git.slackware.nl</a>.</p>
<p>That configuration has worked just fine for years, and you could clone a branch of a repository using the "<code>https://</code>" git URI and that works.</p>
<p>However...<br />
Cgit is a nice graphical shell around git repositories, but it does <strong>not</strong> serve the actual <em>git</em> protocol.<br />
I found out when I tried to setup a mirror of the "<a href="https://git.slackware.nl/current/" target="_blank" rel="noopener">current</a>" repository on the <a href="https://forge.slackware.nl/" target="_blank" rel="noopener">Slackware Forge</a>. For that, I needed to perform a full clone including all branches and tags. That failed mysteriously with the error:</p>
<pre>$ git clone https://git.slackware.nl/current
Cloning into 'current'...
error: Unable to find d8220d28e5d53cd896b28d9dea13e2258923f35a under https://git.slackware.nl/current
Cannot obtain needed object d8220d28e5d53cd896b28d9dea13e2258923f35a
while processing commit 897670f2f2e1795652dfa3da21f9879d04a9b8dc.
error: fetch failed.</pre>
<p>At first I thought that the remote repository was damaged or corrupted,but that was ruled out by searching for the hash to see if it would actually return something else than an error. From within the bare git repositorty on the server:</p>
<pre># git cat-file -t d8220d28e5d53cd896b28d9dea13e2258923f35a
commit</pre>
<p>The hash does exist and it is a commit. That rules out the corruption.<br />
Examining those errors "unable to find under " and "cannot obtain needed object ... while processing commit ..." the conclusion is that the webserver only serves the bare repository as static files over plain HTTP, with no <em>git-http-backend</em> smart protocol behind it.<br />
A working "git clone" over https needs the <em>git-http-backend</em> configured alongside the cgit configuration in Apache. Since that backend runs as the webserver user "apache", and the git repositories are owned by user "git",&nbsp; we need to deal with file permissions/ownership and what git considers "safe directories". Modern git (2.35.2 and later) refuses to operate on a repository owned by a different user than the one running git, and aborts with:<br />
<code>fatal: detected dubious ownership in repository at '/the/path/to/current'</code></p>
<p>The final configuration that adds the "git-http-backend" protocol to the Apache webserver and also resolves the "dubious ownership" error comes in two parts.</p>
<p><strong>First:</strong><br />
A global git configuration directive which will only be used by the Apache user so that it won't trip over the "git" user-owned repository files.<br />
Create the file "<span style="color: #339966;"><strong><code>/etc/httpd/http-git-config</code></strong></span>" and add these lines to it:</p>
<pre># ---
[safe]
        directory = *
# ---</pre>
<p><strong>Second:</strong><br />
Adding a code block to the VHost definition of the git server. In my previous article I described the git.liveslak.org configuration but actually this is identical to that for git.slackware.nl.<br />
Therefore, to the file "<code>/etc/httpd/extra/git.slackware.nl_content.conf</code>" we add the following right before the "<code>SetEnv CGIT_CONFIG</code>" line:</p>
<pre># ---- smart HTTP for git clients (git-http-backend) ----
# Root directory that contains the bare repositories (current.git, etc.).
SetEnv GIT_PROJECT_ROOT <span style="color: #ff6600;"><strong>/local/path/to/git/repositories</strong></span>

# Apache trips over the git:git ownership of the repositories, so we
# need to tell git that for Apache, all repositories should be considered
# as having safe ownership:
SetEnv GIT_CONFIG_GLOBAL <span style="color: #339966;"><strong>/etc/httpd/http-git-config</strong></span>

# Route ONLY the git protocol paths to git-http-backend. Everything else
# (the cgit pretty URLs) is left untouched and handled by cgit below.
# The character classes accept both SHA-1 (40 hex) and SHA-256 (64 hex)
# object names, so this keeps working When we ever migrate hash formats.
# This MUST appear before the cgit ScriptAlias in the vhost.
ScriptAliasMatch \
  "(?x)^/(.*/(HEAD | \
    info/refs | \
    objects/(info/[^/]+ | \
      [0-9a-f]{2}/[0-9a-f]{38,62} | \
      pack/pack-[0-9a-f]{40,64}\.(pack|idx)) | \
    git-(upload|receive)-pack))$" \
  /usr/libexec/git-core/git-http-backend/$1

&lt;Directory "/usr/libexec/git-core"&gt;
    Options +ExecCGI
    Require all granted
&lt;/Directory&gt;
# -------------------------------------------------------</pre>
<p>Test the Apache configuration for errors after saving your changes:</p>
<pre># apachectl configtest</pre>
<p>And reload the webserver gracefully (not aborting current connections):</p>
<pre># apachectl -k graceful</pre>
<p>Now, let's test the server response when we send it a request:</p>
<pre>$ curl -sI "https://git.slackware.nl/info/refs?service=git-upload-pack" | grep -Ei 'HTTP/|Content-Type'
HTTP/1.1 200 OK
Content-Type: application/x-git-upload-pack-advertisement</pre>
<p>The content-type of "application/x-git-upload-pack-advertisement" instead of something like "text/plain" or "octet-stream" means that we have a properly working HTTP backend for git now. Cloning the repository no longer returns an error:</p>
<pre>$ git clone https://git.slackware.nl/current
Cloning into 'current'...
remote: Enumerating objects: 103427, done.
remote: Counting objects: 100% (103427/103427), done.
remote: Compressing objects: 100% (31583/31583), done.
remote: Total 103427 (delta 69643), reused 103103 (delta 69319), pack-reused 0 (from 0)
Receiving objects: 100% (103427/103427), 759.01 MiB | 69.60 MiB/s, done.
Resolving deltas: 100% (69643/69643), done.
</pre>
<p>This fix allowed me to mirror <a href="https://git.slackware.nl/current/" target="_blank" rel="noopener">https://git.slackware.nl/current/</a> to <a href="https://forge.slackware.nl/slackware/distrodevelopment" target="_blank" rel="noopener">https://forge.slackware.nl/slackware/distrodevelopment</a> with a sync frequency of 1 hour.</p>
]]></content:encoded></item><item><title>Using Claude to create a work of art</title><link>https://blog.slackware.nl/using-claude-to-create-a-work-of-art/</link><pubDate>Tue, 16 Jun 2026 00:15:22 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5493</guid><category>Me</category><category>Slackware</category><description>© 2026 Eric Hameleers. All Rights Reserved. Take the &amp;#34;work of art&amp;#34; with a grain of salt please :-) This is an article about computer-generated art but with my own photographs as the source material.
In May, the last of our four cats died. They were two pairs of Holy Birmans, first two little sisters who we took in when they were only 7 weeks old; and later two big brothers whom we adopted when they were over 8 years old.
For the first time in 30 years we do not have any cat in the house. It is silent and sometimes desolate, and I miss the little fluff-balls. But we need to be realistic - we also want to see more of the world and having cats means you need to take care of their well-being. These four are it. There will not be future cats.</description><content:encoded><![CDATA[<figure class="wp-caption aligncenter" style="max-width: 676px"><a href="/wp-content/uploads/2026/06/warhol4cats.png" target="_blank" rel="noopener"><img class="wp-image-5494 size-large" src="/wp-content/uploads/2026/06/warhol4cats-1024x256.png" alt="" width="676" height="169" /></a><figcaption>© 2026 Eric Hameleers. All Rights Reserved.</figcaption></figure>
<p>Take the "work of art" with a grain of salt please :-) This is an article about computer-generated art but with my own photographs as the source material.</p>
<p>In May, the last of our four cats died. They were two pairs of Holy Birmans, first two little sisters who we took in when they were only 7 weeks old; and later two big brothers whom we adopted when they were over 8 years old.<br />
For the first time in 30 years we do not have any cat in the house. It is silent and sometimes desolate, and I miss the little fluff-balls. But we need to be realistic - we also want to see more of the world and having cats means you need to take care of their well-being. These four are it. There will not be future cats.</p>
<p>Me and my wife decided we wanted to commemorate them by creating some kind of artwork and put that up on the living room wall. We wanted their pictures, and since they were four very different cats, we looked for defining features and old photos that showed their uniqueness. We succeeded in that part, but then came the question, what form and shape should this take? The pictures had different backgrounds, the lighting created different colors, the cats in the pictures had different sizes.</p>
<p>I came up with the idea to create solarized versions of these pictures, give them a kind of Warhol effect with primary colors and bold planes. I looked into ImageMagick, and could not find a good way forward. I looked at online AI image generators and manglers, and none of that was any good either, no consistency in the results.</p>
<p>So I turned to Anthropic's Claude chat bot. I started with a simple question:</p>
<blockquote><p>I have four pictures of my cats. I need the cats without the background and primarily the cat heads and/or bodies in a composite picture, which has the solarized style of an Andy Warhol painting</p></blockquote>
<p>To which the bot responded (it knows I work on Slackware):</p>
<blockquote><p>Good news: this is very achievable with a Python script using a couple of well-suited libraries, and you can run it entirely on your Slackware machine. Here's the plan:<br />
Tool stack:</p>
<p>rembg - AI-powered background removal (uses a U2Net model), works excellently on pets/animals. This is the part where ImageMagick would genuinely struggle.<br />
Pillow (PIL) - for cropping, compositing, posterizing, colorizing, and assembling the grid.<br />
Both installable via pip.</p>
<p>The pipeline per cat photo:</p>
<p>Remove background with rembg (outputs a clean RGBA PNG)<br />
Auto-crop to the cat's bounding box (head/body)<br />
Posterize (reduce to ~4 color levels) to get that flat, graphic look<br />
Apply a flat color tint per panel (Warhol used vivid, clashing hues)<br />
Arrange all four panels in a 2x2 grid</p>
<p>What I need from you to write the script:</p>
<p>Confirm you can install Python packages via pip on your Slackware machine (or in a venv)<br />
Any preference on output size (e.g. 2000x2000px total, so 1000x1000 per panel)?<br />
Do you want each cat in a different color scheme, or the same cat repeated Warhol-style (like the Marilyn print where it's one subject, four colorways)?<br />
Should the background of each panel be a solid flat color, or transparent/black?</p>
<p>Once you confirm, I'll write you a clean, self-contained Python script that takes your four JPEGs as input and produces a single composite PNG.</p></blockquote>
<p>I checked that I could indeed install the dependencies without any issue. I gave it some additional information:</p>
<blockquote><p>I can install any package using pip, no problem. The image dimensions of 2000x2000 sounds fine.<br />
Each cat should have a different primary color and I would like to associate the four input pictures with specific colors myself. The background is a good question, since I do not yet know what will give the best result. For now I would go with a gradient background that contrasts with the primary colors I will select for the cats and potentially add some smudging to that background.</p></blockquote>
<p>That produced a script in a few seconds that actually did everything I had imagined for the resulting bitmap wich consisted of 4 panels in a 2x2 grid, one solarized cat image per panel.</p>
<p>Of course, then the creative mind wanted more. It is interesting how this works. I have ideas, I conceptualize them into a prompt, the AI returns Python code that evolves with every new question I have, and actually every iteration of the script does everything I wanted from it.<br />
Eventually, the script was capable of a lot more, tweaks that created better and visually more pleasing versions of the WarholCats.</p>
<p>What was added during this "discussion":</p>
<ul>
<li>Per-panel configuration:
<ul>
<li>Define the primary color (required) and optionally specify a different background color than the default color complement of the foreground.</li>
<li>An optional (x,y) offset to place each cat squarely in the panel's center.</li>
<li>Background styles, several gradients are possible: diagonal, vertical, horizontal, radial; as well as a simple monochrome background.</li>
</ul>
</li>
<li>The bot documented all of these configurable parameters in a PANELS block. All parameters were given sensible fallback values in case they are not provided.</li>
<li>Optionally a black outline drawn around the cats to make them stand out more - looks better against a monochrome background.</li>
<li>Three layouts: a 2x2, 4x1, or 1x4 canvas.</li>
<li>The script has defaults set for my wallmount project (I intend to have the result directly printed on dibond aluminium): my LAYOUT = "4x1" and PANEL_SIZE = 2000, allowing for roughly 127 dpi when the image is applied to a 160x40 cm dibond.</li>
</ul>
<p>Variables like FILL_FRACTION (defaulting to 0.90) and PADDING_FRACTION (defaulting to 0.06), allow for a middle ground for the framing of the cat images. Eventually I also needed an OFFSET variable to move individual cat images into the center of their panel.<br />
The result is the picture at the top of this article. The Python script can be found in the Slackware Forge: <a href="https://forge.slackware.nl/alienbob/randomstuff/src/branch/main/WarholCats/warhol_cats.py" target="_blank" rel="noopener">https://forge.slackware.nl/alienbob/randomstuff/src/branch/main/WarholCats/warhol_cats.py</a><br />
The four original cat photos are attached to this blog:</p>
<figure class="wp-caption alignnone" style="max-width: 150px"><a href="/wp-content/uploads/2026/06/cat1.png" target="_blank" rel="noopener"><img class="wp-image-5495 size-thumbnail" src="/wp-content/uploads/2026/06/cat1-150x150.png" alt="" width="150" height="150" /></a><figcaption>© 2026 Eric Hameleers. All Rights Reserved.</figcaption></figure>
<figure class="wp-caption alignnone" style="max-width: 150px"><a href="/wp-content/uploads/2026/06/cat2.png" target="_blank" rel="noopener"><img class="wp-image-5496 size-thumbnail" src="/wp-content/uploads/2026/06/cat2-150x150.png" alt="" width="150" height="150" /></a><figcaption>© 2026 Eric Hameleers. All Rights Reserved.</figcaption></figure>
<figure class="wp-caption alignnone" style="max-width: 150px"><a href="/wp-content/uploads/2026/06/cat3.png" target="_blank" rel="noopener"><img class="wp-image-5497 size-thumbnail" src="/wp-content/uploads/2026/06/cat3-150x150.png" alt="" width="150" height="150" /></a><figcaption>© 2026 Eric Hameleers. All Rights Reserved.</figcaption></figure>
<figure class="wp-caption alignnone" style="max-width: 150px"><a href="/wp-content/uploads/2026/06/cat4.png" target="_blank" rel="noopener"><img class="wp-image-5499 size-thumbnail" src="/wp-content/uploads/2026/06/cat4-150x150.png" alt="" width="150" height="150" /></a><figcaption>© 2026 Eric Hameleers. All Rights Reserved.</figcaption></figure>
<p>That's it for today. I wanted to share how a Large Language Model like Anthropic's Claude is able to boost your creativity with respect for your precious free time. No... this is not vibe coding. The Python code is simple and clean, and is easy to follow. No weird functionality, and proper inlined comments all over.<br />
Feel free to use the script as you see fit. I would however appreciate that you do not share the pictures of my cats or the resulting solarized bitmap any further. The images are copyrighted.<br />
Cheers, Eric</p>
]]></content:encoded></item><item><title>Using the Slackware Community Forge</title><link>https://blog.slackware.nl/using-the-slackware-community-forge/</link><pubDate>Sat, 16 May 2026 17:13:00 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5475</guid><category>Slackware</category><description>I wanted to share some news with you. After weeks of hard work and being forced to learn new tech from scratch, the Slackware Community Forge, a git software forge, is now available at https://forge.slackware.nl/ .
It&amp;#39;s not just a git repository server but also a Docker container registry!
&amp;amp;nbsp;
What the Forge? I created this Forge as an autonomous and European based alternative to the popular git forges like Github and Gitlab. I have&amp;amp;nbsp; (well not only I, but a lot of people have) issues with the fact that Github is owned by Microsoft, is fully proprietary and enforces the Microsoft CoPilot AI in weird and unacceptible ways (even though it was &amp;#39;by accident&amp;#39;, the tendency and the intent is clear). And Gitlab recently moved office to the US which makes them subjugated to the US administration. Also, Gitlab recently announced their commitment to AI and at the same time will fire 30% of their workforce because of it.
The Slackware&amp;amp;nbsp; Community Forge is not connected to any form of AI, and it is powered by Forgejo, a fully open source software governed by a European company. meant to be used for hosting free, Open Source and Open Standards Software (OSOSS).</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-5470" src="/wp-content/uploads/2026/05/forgejo_logo-150x150.png" alt="" width="64" height="64" />I wanted to share some news with you. After weeks of hard work and being forced to learn new tech from scratch, the <em>Slackware Community Forge</em>, a git software forge, is now available at <a href="https://forge.slackware.nl/" target="_blank" rel="noopener">https://forge.slackware.nl/</a> .<br />
It's not just a git repository server but also a Docker container registry!</p>
<p>&nbsp;</p>
<h4>What the Forge?</h4>
<p>I created this Forge as an autonomous and European based alternative to the popular git forges like <a href="https://github.com/" target="_blank" rel="noopener">Github</a> and <a href="https://gitlab.com/" target="_blank" rel="noopener">Gitlab</a>. I have&nbsp; (well not only I, but a lot of people have) issues with the fact that Github is owned by Microsoft, is fully proprietary and enforces the Microsoft CoPilot AI in <a href="https://github.com/microsoft/vscode/issues/314311" target="_blank" rel="noopener">weird and unacceptible</a> ways (even though it was 'by accident', the tendency and the intent is clear). And Gitlab recently moved office to the US which makes them subjugated to the US administration. Also, <a href="https://about.gitlab.com/blog/gitlab-act-2/" target="_blank" rel="noopener">Gitlab recently announced</a> their commitment to AI and at the same time will fire 30% of their workforce because of it.<br />
The <em>Slackware&nbsp; Community Forge</em> is not connected to any form of AI, and it is powered by Forgejo, a fully open source software governed by a <a href="https://codeberg.org/forgejo/governance" target="_blank" rel="noopener">European company</a>. meant to be used for hosting free, Open Source and Open Standards Software (<em>OSOSS</em>).</p>
<p><a href="/wp-content/uploads/2026/05/forge_slackware_nl.png" target="_blank" rel="noopener"><img class="my-drop-shadow aligncenter wp-image-5480 size-large" src="/wp-content/uploads/2026/05/forge_slackware_nl-1024x585.png" alt="" width="676" height="386" /></a></p>
<p>I am <strong>not principally opposed</strong> to US based companies and their software.&nbsp; I worked at IBM, use software from Red Hat and my friend Patrick Volkerding runs the US based Slackware Linux company. But I do have concerns about the dangers of potentially having my data <strong>controlled</strong> by US based entities. Even if my data is encrypted so that content cannot be accessed, the <a href="https://www.politico.eu/article/microsoft-did-not-cut-services-international-criminal-court-president-american-sanctions-trump-tech-icc-amazon-google/" target="_blank" rel="noopener">US administration can still request</a> that <strong>my own access to my own data</strong> is revoked.<br />
My <a href="https://cloudserver.slackware.nl/" target="_blank" rel="noopener">Slackware Cloud Server</a> series of articles is meant to help you (individuals, groups, communities or companies) to implement self-hosted variants of online services that are under your own control, to prevent the risk of losing access to your data, or having your data being monetized by training AI models or by selling it to advertisement platforms.<br />
I invite you to also read those articles!</p>
<h4>Now, the Forge.</h4>
<p>The <em>Slackware Community Forge</em> is a web-based familiar&nbsp; interface to manage your own git repositories, use CI/CD runners to validate the changes to your code. The site offers workflows to generate release tarballs. There's also command-line access via SSH connections using SSH keys.</p>
<p>The CI/CD workflows make use of Slackware Docker images. They are available for stable Slackware release 15.0 and for -current at the time of writing this. Those images come in both 32bit and 64bit flavors. The Slackware Docker images are kept up to date with the changes in Slackware: the images are automatically re-generated when an update to the Slackware ChangeLog.txt is detected.</p>
<p>Of course you can download and use these Docker images locally, the Docker registry is public and does not require an account to download from. For the Slackware "base" images which are really small, the registry URL is <a href="https://forge.slackware.nl/slackware/-/packages/container/slackware/versions" target="_blank" rel="noopener">https://forge.slackware.nl/slackware/-/packages/container/slackware/versions</a> . The Forge also offers Slackware "builder" images of nearly 2 GB in size, offering all the build tools you would need to compile your project; their registry URL is <a href="https://forge.slackware.nl/slackware/-/packages/container/slackware-builder/versions" target="_blank" rel="noopener">https://forge.slackware.nl/slackware/-/packages/container/slackware-builder/versions</a> .</p>
<p>If you access the registry via Docker, the hostnames '<em>forge.slackware.nl</em>' and '<em>registry.slackware.nl</em>' will both work.</p>
<p>As an example, if you have Docker installed and want to test the image for 64bit Slackware-current, you can run:<br />
<code>$ docker run --rm registry.slackware.nl/slackware/slackware:current bash -c "cat /etc/os-release"<br />
...<br />
Unable to find image 'registry.slackware.nl/slackware/slackware:current' locally<br />
current: Pulling from slackware/slackware<br />
Digest: sha256:74a1caaababd145d40196ee29207c8c0a10602f39463a5077ea1bbe9f05a54d6<br />
Status: Downloaded newer image for registry.slackware.nl/slackware/slackware:current<br />
NAME=Slackware<br />
VERSION="15.0"<br />
ID=slackware<br />
VERSION_ID=15.0<br />
PRETTY_NAME="Slackware 15.0 x86_64 (post 15.0 -current)"<br />
ANSI_COLOR="0;34"<br />
CPE_NAME="cpe:/o:slackware:slackware_linux:15.0"<br />
HOME_URL="http://slackware.com/"<br />
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"<br />
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"<br />
VERSION_CODENAME=current</code></p>
<p>The <em>Slackware Community Forge</em> accepts users and organizations that have a relationship to the Slackware ecosystem. If you work on a project that matters to Slackware users, or users of Slackware derivatives, you are invited to request an account. Send an email to forge@slackware.nl from the email address that you want to have associated with your Forge account. I will also need your First and Lastname and the login userID that you want to use.<br />
I will send you the temporary password in reply.</p>
<p>Once you receive your credentials, browse to <a href="https://forge.slackware.nl/" target="_blank" rel="noopener">https://forge.slackware.nl/</a> and click "Sign In".<br />
On the sign-in page, click "Sign in with Keycloak":</p>
<p><a href="/wp-content/uploads/2026/05/forgejo_signin.png" target="_blank" rel="noopener"><img class="my-drop-shadow aligncenter wp-image-5476 size-full" src="/wp-content/uploads/2026/05/forgejo_signin.png" alt="" width="531" height="444" /></a></p>
<p>This will redirect to the <a href="https://www.keycloak.org/" target="_blank" rel="noopener">Keycloak</a> server which is the Identity Provider that handles the Single Sign On for <em>Slackware Community Services:</em></p>
<p><a href="/wp-content/uploads/2026/05/keycloak_slackcomm_login.png" target="_blank" rel="noopener"><img class="my-drop-shadow aligncenter wp-image-5477" src="/wp-content/uploads/2026/05/keycloak_slackcomm_login.png" alt="" width="551" height="435" /></a></p>
<p>Once you enter your userid and the temporary password you received. you are asked to create a new permanent password.<br />
When the login is complete and you have memorized your new password, you will be directed back from Keycloak to the Forge. There you will be asked whether you want to register a new account or link your account to an existing local account.<br />
Your account only exists in Keycloak, so you select "<em>Register new account</em>" and then Forgejo will create an account in its own database which it will link to your actual Keycloak identity:</p>
<p><a href="/wp-content/uploads/2026/05/forgejo_new_keycloak_account_link_existing_account.png"><img class="my-drop-shadow aligncenter wp-image-5473 size-full" src="/wp-content/uploads/2026/05/forgejo_new_keycloak_account_link_existing_account.png" alt="" width="476" height="328" /></a></p>
<p>You are now ready to start using the Forge in earnest.</p>
<h4>Pushing your commits to your repository</h4>
<p>Your account lives in the Keycloak Identity Provider (IP). Forgejo's web interface offers the "Sign in with keycloak" button but when you push your commits to your repository via the <em>commandline interface</em> or via <em>https</em>, Forgejo will not recognize your credentials (it will only recognize local accounts). This is a fundamental aspect of how OIDC authentication works in Forgejo, and it cannot be "fixed" to make Keycloak passwords work for "git push". This is by design. The <a href="https://openid.net/developers/how-connect-works/" target="_blank" rel="noopener">OIDC flow</a> requires a browser redirect. There is no way to retrofit it into a non-interactive git credential prompt.<br />
There's two solutions to this issue:</p>
<h5>1: Add a SSH key to your Forge account.</h5>
<p>This is recommended for any developer doing regular git work and who wants to access their repositories over a <em>SSH</em> connection.<br />
Assuming that you already have a SSH public/private key pair on your computer called "<span style="color: #008000;"><code>/home/your_username/.ssh/id_ecdsa_forgejo</code></span>" that you want to use with the Forge, add that public key in Forgejo:</p>
<ul>
<li>'Settings &gt; SSH / GPG keys &gt; Manage SSH keys' (or browse directly to <a href="https://forge.slackware.nl/user/settings/keys" target="_blank" rel="noopener">https://forge.slackware.nl/user/settings/keys</a>)</li>
<li>Click 'Add key'</li>
<li>Copy the ASCII text of your public key into the provided field that says:<br />
<em>Begins with "ssh-ed25519", "ssh-rsa", "ecdsa-sha2-nistp256", "ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521", "sk-ecdsa-sha2-nistp256@openssh.com", or "sk-ssh-ed25519@openssh.com"</em></li>
<li>Give your key a name so that you can recognize it when you add more</li>
<li>Click 'Add key' again.</li>
</ul>
<p>Then on your local computer:</p>
<ul>
<li>Add&nbsp; the following lines to your ~/.ssh.config file (create the file if it does not yet exist and do a "chmod 600" on the file or else <em>ssh</em> will simply refuse to use it):</li>
</ul>
<blockquote>
<pre>Host forge.slackware.nl
  Port 2222
  User git
  ServerAliveInterval 20
  IdentityFile /<span style="color: #008000;">home/your_username/.ssh/id_ecdsa_forgejo
</span></pre>
</blockquote>
<ul>
<li>Change directory to the clone of your remote repository, and add the remote as follows (it's a one-time setup, works forever, for all your repositories, and there are no passwords involved at all.):</li>
</ul>
<blockquote>
<pre>$ git remote set-url origin forge.slackware.nl:your_username/your_repository.git</pre>
</blockquote>
<p>All you need to do to push your commits to the remote repository is a:</p>
<blockquote>
<pre>$ git push origin</pre>
</blockquote>
<p>No credentials need to be entered at all.<br />
And if this is the first time you connect to the Forge via SSH, you need to accept its SSH server key to continue. This is also a one-time action.</p>
<h5>2: Forgejo API token</h5>
<p>This works well for&nbsp; <em>HTTPS</em> workflows or in environments where SSH is blocked. The API token (aka <em>Access token</em>) takes the place of a regular password.<br />
If you had already cloned your repository, the "origin" URL definition in the ".git/config" file inside that repository will look like this:</p>
<pre>[remote "origin"]
    url = https://forge.slackware.nl/your_username/your_repository.git
    fetch = +refs/heads/*:refs/remotes/origin/*</pre>
<p>You generate an API token as follows:</p>
<ul>
<li>Login to Forgejo</li>
<li>Go to 'Settings &gt; Applications &gt; Access token' (or go directly to <a href="https://forge.slackware.nl/user/settings/applications" target="_blank" rel="noopener">https://forge.slackware.nl/user/settings/applications</a>)</li>
<li>Click 'New access token'</li>
<li>Give the token a descriptive name, make it access to 'All'</li>
<li>Select the permissions you want this token to have; at least that should be:
<ul>
<li>Repository: "read and write"</li>
</ul>
</li>
<li>Click 'generate token'</li>
<li>Copy and store the token string in a safe place; this token string can not be retrieved later. If you forget it, you can simply create a new token and use that instead.</li>
</ul>
<p>Then use the token as the password for HTTPS connections:</p>
<blockquote>
<pre>$ git push origin
Username for 'https://forge.slackware.nl': your_username
Password for 'https://your_username@forge.slackware.nl':
Everything up-to-date</pre>
</blockquote>
<p>At the "Username" prompt enter your Forgejo username, and at the "Password" prompt enter your API token.</p>
<p>To avoid typing the API token every time, you can store it in git's <em>credential helper</em>:</p>
<blockquote>
<pre>$ git config --global credential.helper store</pre>
</blockquote>
<p>Then do one successful push. Your credentials are saved to the file ~/.git-credentials with mode '0600' which means that only you can read the contents, which look like this:</p>
<blockquote>
<pre>https://your_username:APITOKEN@forge.slackware.nl</pre>
</blockquote>
<h4>Documentation</h4>
<p>In the "<a href="https://forge.slackware.nl/slackware/forge-docs/" target="_blank" rel="noopener">forge-docs</a>" repository of the <a href="https://forge.slackware.nl/slackware" target="_blank" rel="noopener">Slackware organization</a> in Forge, you can find:</p>
<ul>
<li><a href="https://forge.slackware.nl/slackware/forge-docs/src/branch/main/user-guide.md" target="_blank" rel="noopener">User Guide</a> - getting started, git access, CI workflows</li>
<li><a href="https://forge.slackware.nl/slackware/forge-docs/src/branch/main/forge-overview.md" target="_blank" rel="noopener">Architecture Overview</a> - how the Forge is built and operates</li>
<li><a href="https://forge.slackware.nl/slackware/forge-docs/src/branch/main/github-migration-guide.md" target="_blank" rel="noopener">GitHub Migration Guide</a> - moving existing repositories to the Forge</li>
<li><a href="https://forge.slackware.nl/slackware/forge-docs/src/branch/main/admin-operations-guide.md" target="_blank" rel="noopener">Admin Operations Guide</a> - for Forge administrators</li>
</ul>
<h4>Finally...</h4>
<p><img class="alignleft  wp-image-3692" src="/wp-content/uploads/2020/04/Slackware-WIP-300x262.png" alt="" width="64" height="56" />I hope you will appreciate this new service and also start migrating your Github / Gitlab repositories to the <em>Slackware Community Forge</em>.<br />
Try the CI workflows and report any issues you encounter! Note that I am the single administrator and moderator. Be gentle.</p>
<p>&nbsp;</p>
<blockquote><p><strong>My commitment is to run this Forge as a stable and long-term service to the Slackware community. I've written admin documentation and in time will look for more administrators. Let's first see if this initiative is going to be used at all ;-)</strong></p></blockquote>
<p>Have fun! Eric</p>
]]></content:encoded></item><item><title>Updated 'ktown' packages, and a heads-up</title><link>https://blog.slackware.nl/updated-ktown-packages-and-a-heads-up/</link><pubDate>Fri, 08 May 2026 21:58:28 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5469</guid><category>Rant</category><category>Slackware</category><description>Time for a KDE Plasma6 package refresh.
On KDE&amp;#39;s announcement page, the releases of KDE Gear 26.04.1 and Frameworks 6.26.0 were announced yesterday and today. Since OS packagers have early access to the source tarballs, I had everything compiled and ready for days and could simply push everything into my &amp;#39;ktown&amp;#39; repository today.
I also updated okteta to the new release 0.26.27 (unfortunately still Qt5 based).
Get the new packages from https://slackware.nl/alien-kde/current/latest/ (NL),&amp;amp;nbsp;https://us.slackware.nl/alien-kde/current/latest/ (US), or https://slackware.uk/people/alien-kde/current/latest/ (UK).
Or use their rsync URI&amp;#39;s for commandline downloads.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-291" src="/wp-content/uploads/2010/01/kde3-logo.png" alt="" width="64" height="64" />Time for a KDE Plasma6 package refresh.</p>
<p>On KDE's <a href="https://kde.org/announcements/" target="_blank" rel="noopener">announcement page</a>, the releases of KDE Gear 26.04.1 and Frameworks 6.26.0 were announced yesterday and today. Since OS packagers have early access to the source tarballs, I had everything compiled and ready for days and could simply push everything into my 'ktown' repository today.</p>
<p>I also updated okteta to the new release 0.26.27 (unfortunately still Qt5 based).</p>
<p>Get the new packages from <a href="https://slackware.nl/alien-kde/current/latest/" target="_blank" rel="noopener">https://slackware.nl/alien-kde/current/latest/</a> (NL),&nbsp;<a href="https://us.slackware.nl/alien-kde/current/latest/" target="_blank" rel="noopener">https://us.slackware.nl/alien-kde/current/latest/</a> (US), or <a href="https://slackware.uk/people/alien-kde/current/latest/" target="_blank" rel="noopener">https://slackware.uk/people/alien-kde/current/latest/</a> (UK).<br />
Or use their rsync URI's for commandline downloads.</p>
<p>And a heads-up:</p>
<p><img class="alignleft wp-image-5470" src="/wp-content/uploads/2026/05/forgejo_logo-150x150.png" alt="" width="64" height="64" />I went to the spring conference of the <a href="https://nluug.nl/" target="_blank" rel="noopener">NLUUG</a> (the Dutch Unix User Group) yesterday . My old colleague (from 40 years ago) and friend <a href="https://www.jeroenbaten.nl/" target="_blank" rel="noopener">Jeroen Baten</a> gave a demonstration of setting up and configuring <a href="https://forgejo.org/" target="_blank" rel="noopener">Forgejo</a>. This is a <em>software forge</em> software which is stewarded by <a href="https://codeberg.org/" target="_blank" rel="noopener">Codeberg e.V</a> in Germany. A fully open source, constraint-free and European alternative to Github or Gitlab. Absolutely relevant given the current political climate where the Orange Clown and his Big Tech billionaire minions try to control the whole world from a US "me! me! me!" perspective.<br />
That same conference also had a presentation from a Dutch government team that maintains their software on <a href="https://code.overheid.nl" target="_blank" rel="noopener">code.overheid.nl</a> which is also running Forgejo. It's really cool to see that finally the Dutch government acts (somewhat) on the commitment to favor open source and open standards above commercial and closed software.</p>
<p>It made me decide that Slackware software projects need a space for their&nbsp; code that is never in danger of being abused for AI training or where repositories are deleted and access revoked simply because the Orange Clown demands it. The final push to decide that I need to get my own projects off Github came recently when I read this: <a href="https://news.ycombinator.com/item?id=47958353" target="_blank" rel="noopener">VS Code v1.117.0 automatically adds GitHub Copilot as your co-author</a>.</p>
<p>My commitment: I am going to setup a Forgejo instance below the <a href="https://slackware.nl/" target="_blank" rel="noopener">slackware.nl</a> domain.</p>
<p>At first, I will work on getting the git repository server up and running with moderated creation of user accounts. Projects that can show a relevance for the Slackware Linux community will get an account. I will be using Keycloak for <em>Identity and Access Management</em> (IAM). Rather conveniently I already have a full setup guide in my <em>Slackware Cloud Server</em> series: <a href="/slackware-cloud-server-series-episode-2-identity-and-access-management-iam/" target="_blank" rel="noopener">https://blog.slackware.nl/slackware-cloud-server-series-episode-2-identity-and-access-management-iam/</a></p>
<p>The fun will not stop there. I also intend to allow runners and workloads on the Forgejo instance. That will give projects a chance to create CI/CD pipelines for their code. I will be offering Slackware 15.0 and -current Docker containers (64bit but also 32bit) for these runners and will also ensure that the Docker images are re-generated after a ChangeLog.txt update in the Slackware tree.</p>
<p>It's a lot of ambition but this is something I really want to do. The process will likely end up as another article (or two) in the <a href="https://cloudserver.slackware.nl/" target="_blank" rel="noopener"><em>Slackware Cloud Server</em></a> series.</p>
<p>I cannot give a timeline, it depends on the complexity of setting up the Docker infrastructure for the Forgejo runners. The git repository server with Keycloak should be rather straightforward. I'll move my own projects from Github to Forgejo ASAP of course.</p>
<p>When I have updates you'll hear it first on this blog!</p>
]]></content:encoded></item><item><title>Java SDK updates for Slackware all across the board</title><link>https://blog.slackware.nl/java-sdk-updates-for-slackware-all-across-the-board/</link><pubDate>Fri, 01 May 2026 14:56:05 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5466</guid><category>Slackware</category><description>Today I pushed fresh Slackware packages (for 15.0 and -current, and 32bit as well as 64bit) for various new OpenJDK releases. This is a quarterly process where the Java developers release a &amp;#34;GA&amp;#34; version. The &amp;#34;GA&amp;#34; stands for General Availability. The &amp;#34;GA&amp;#34; version indicates that the software is considered stable, feature-complete, and ready for use in production environments. It also marks the release of a new Icedtea framework which is still used to produce the openjdk and openjre (OpenJDK 8) package for Slackware. These are the JDK releases that I grab, compile and package for Slackware.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-4497" src="/wp-content/uploads/2022/08/openjdk-248x300.png" alt="" width="53" height="64" />Today I pushed fresh Slackware packages (for 15.0 and -current, and 32bit as well as 64bit) for various new <a href="https://openjdk.org/" target="_blank" rel="noopener">OpenJDK</a> releases. This is a quarterly process where the Java developers release a "GA" version. The "GA" stands for <em>General Availability</em>. The "GA" version indicates that the software is considered stable, feature-complete, and ready for use in production environments. It also marks the release of a new <a href="https://openjdk.org/projects/icedtea/" target="_blank" rel="noopener">Icedtea</a> framework which is still used to produce the <em>openjdk</em> and <em>openjre</em> (OpenJDK 8) package for Slackware. These are the JDK releases that I grab, compile and package for Slackware.</p>
<ul>
<li>openjdk: updated to 8u492_b09, using the icedtea-3.39.0 framework.<br />
Note that for OpenJDK 8, you need to install either the JDK or the JRE, <strong>not</strong> both (the JDK package contains the JRE).</li>
<li>openjdk11: updated to 11.0.31_11.</li>
<li>openjdk17: updated to 17.0.19_10.</li>
<li>openjdk21: updated to 21.0.11_10.</li>
<li>openjdk25: updated to 25.0.3_9.<br />
The 32bit <em>openjdk25</em> package contains the <em>Zero JVM</em> (which is not optimized for the architecture, because it contains <em>zero</em> assembly) thus this Java will be very slow. This is because other JVM's are no longer supported on 32bit, starting with OpenJDK 25.</li>
</ul>
<p>Get the packages from my server: <a href="http://slackware.nl/people/alien/slackbuilds/" target="_blank" rel="noopener">http://slackware.nl/people/alien/slackbuilds/</a> or one of the main mirrors. In the US&nbsp; that is my own <a href="http://us.slackware.nl/people/alien/slackbuilds/" target="_blank" rel="noopener">http://us.slackware.nl/people/alien/slackbuilds/</a> and in the UK it's Tadgy's server at <a href="https://slackware.uk/people/alien/slackbuilds/" target="_blank" rel="noopener">https://slackware.uk/people/alien/slackbuilds/</a> .</p>
<p>My advice has always been to: only install one version of Java!<br />
However I need to make a footnote here. With OpenJDK 25 I made a fundamental change to the packaging process, The library files are installed into <code>/usr/lib{,64}/jdk25</code> instead of the path <code>/usr/lib{,64}/java</code> that I have been using historically.<br />
What this means is that starting with OpenJDK 25 packages, you <strong>can</strong> co-install multiple versions of the JDK. The <code>/usr/lib{,64}/java</code> is no longer a <em>directory</em> but a <em>symlink</em>&nbsp;and you can make it point to the OpenJDK version of your choice.</p>
<p>Let me know if I need to make the same change to future packages of OpenJDK 8 through 21.</p>
<p>Have fun! Eric</p>
]]></content:encoded></item><item><title>KDE 6_26.04 for Slackware-current (almost free of Qt5)</title><link>https://blog.slackware.nl/kde-6_26-04-for-slackware-current-almost-free-of-qt5/</link><pubDate>Wed, 29 Apr 2026 22:27:51 +0200</pubDate><dc:creator>alienbob</dc:creator><guid isPermaLink="false">https://blog.slackware.nl/?p=5460</guid><category>Slackware</category><description>To be honest, I was waiting for a move from Pat. But I got restless, Pat is otherwise occupied for a few days so I took the plunge.
What I am talking about is of course packaging KDE Gear 26.04.0 for Slackware. The latest release of Applications and KDEPIM is nicknamed the &amp;#34;KDE at 30&amp;#34; edition because KDE is around for 30 years already (!). Congratulations are in order.</description><content:encoded><![CDATA[<p><img class="alignleft wp-image-291" src="/wp-content/uploads/2010/01/kde3-logo.png" alt="" width="64" height="64" />To be honest, I was waiting for a move from Pat. But I got restless, Pat is otherwise occupied for a few days so I took the plunge.<br />
What I am talking about is of course packaging <a href="https://kde.org/announcements/gear/26.04.0/" target="_blank" rel="noopener">KDE Gear 26.04.0</a> for Slackware. The latest release of Applications and KDEPIM is nicknamed the "<em>KDE at 30"</em> edition because KDE is around for 30 years already (!). Congratulations are in order.</p>
<p>The reason I wanted to wait for Pat is that the new Kleopatra release (part of KDEPIM) requires a version of gpgme which is not present in Slackware-current. I had hoped to see an upgrade to gpgme 2.x in Slackware first, followed by a rebuild of affected packages, which according to avid Slackware user <em>gmgf</em> aka Gérard Monpontet is at least: <em>gmime, gpa, libcups-filters, mccabber, mutt, poppler, samba, volume_key, wget2 and labplot</em>. But that did not happen, and I wanted to have a stable 'ktown' which is fully ported to Qt6 before my 65th birthday next week.<br />
Therefore I decided to trick Slackware by upgrading <em>gpgme</em> from 1.24.3 to 2.0.1 but <strong>not</strong> rebuilding all those other Slackware packages that depend on gpgme 1.24.3. Instead I added another package to 'ktown' called <em>gpgme1</em> which contains all the libraries from the previous gpgme 1.24.3 package. Zero broken Slackware packages and I could finally move on with KDE Gear without having to wait for the upstream.<br />
As you might have guessed after all these years - I hate to be dependent on others and like to have full control. So, move aside Pat ;-)<br />
Jokes aside, I hope that Pat picks up this completed work and adds it to Slackware-current soon.</p>
<p>As promised when I revived the 'ktown' repository for Plasma6, the addition of a legacy-free KDE Gear 26.04.0 marks the change for this repository from 'testing' to 'latest', as witnessed by the change in the package download URL: <a href="https://slackware.nl/alien-kde/current/latest/" target="_blank" rel="noopener">https://slackware.nl/alien-kde/current/latest/</a>. The latest KDE Plasma6 Desktop Environment is absolutely ready for production use. It's snappy, feature-complete and beautiful. I have been using the Wayland session ever since my first batch of packages and the quirks have by now been removed that annoyed me in the beginning. By now, <em>okteta</em> in 'applications-extra' is the only left-over of the old Qt5/KF5 era.</p>
<blockquote><p>Formally <em>kwayland-integration</em> is also still built against Qt5 and the two old Frameworks <em>kwayland5</em> and <em>kwindowsystem5</em>, but that's required for the Plasma6 Wayland session to still support older 3rd-party Qt5 based applications).</p></blockquote>
<p>The new release of packages is accompanied by an expansive <a href="https://slackware.nl/alien-kde/current/latest/README.txt" target="_blank" rel="noopener">README</a> which will help you remove KDE Plasma5 from your Slackware-current computer and install the '<em>ktown</em>' version of KDE Plasma6 instead.<br />
The origin host is of course <a href="https://slackware.nl/alien-kde/" target="_blank" rel="noopener">https://slackware.nl/alien-kde/</a> (rsync://slackware.nl/mirrors/alien-kde/), but you could choose the alternative<br />
mirror <a href="https://slackware.uk/people/alien-kde/" target="_blank" rel="noopener">https://slackware.uk/people/alien-kde/</a> (rsync://slackware.uk/people/alien-kde/) which is faster for some people, but you may have to wait until it syncs against slackware.nl. Or if you live in the US, try <a href="https://us.slackware.nl/alien-kde/" target="_blank" rel="noopener">https://us.slackware.nl/alien-kde/</a> (rsync://us.slackware.nl/mirrors/alien-kde/), this server has a lot of bandwidth available.</p>
<p>If you want to peek at the source code management, I track everything in a git repository. You will find the new 6_26.04 branch at: <a href="https://git.slackware.nl/ktown/log/?h=6_26.04" target="_blank" rel="noopener">https://git.slackware.nl/ktown/</a></p>
<p>Have fun with KDE Plasma6 and please&nbsp; leave your feedback in the comments section below.</p>
<p>Cheers, Eric</p>
]]></content:encoded></item></channel></rss>