<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Cédric Félizard</title>
    <description>Crafting zeros and ones since 1337</description>
    <link>https://infertux.com/</link>
    <atom:link href="https://infertux.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 14 Mar 2026 03:06:02 +0000</pubDate>
    <lastBuildDate>Sat, 14 Mar 2026 03:06:02 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>How to install encrypted Linux with systemd-boot and Btrfs subvolumes</title>
        <description>&lt;p&gt;I recently reinstalled my system and struggled to find the right configuration to use &lt;a href=&quot;https://wiki.archlinux.org/title/Systemd-boot&quot;&gt;systemd-boot&lt;/a&gt; with &lt;a href=&quot;https://en.wikipedia.org/wiki/Btrfs&quot;&gt;Btrfs&lt;/a&gt; as a root subvolume so here it is in case it helps someone.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# /boot/loader/loader.conf&lt;/span&gt;
default @saved
editor &lt;span class=&quot;nb&quot;&gt;yes
timeout &lt;/span&gt;3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# /boot/loader/entries/arch.conf&lt;/span&gt;
title   Arch Linux
linux   vmlinuz-linux
initrd  initramfs-linux.img
options rd.luks.name&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;lt;UUID&amp;gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;root &lt;span class=&quot;nv&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/dev/mapper/root &lt;span class=&quot;nv&quot;&gt;rootflags&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;subvol&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;@
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;UUID&amp;gt;&lt;/code&gt; with the UUID of the physical disk partition.
The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rootflags=subvol=@&lt;/code&gt; part is important and should not contain any slashes, i.e. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rootflags=subvol=/@&lt;/code&gt; won’t work. Don’t ask me how much time I wasted on that…&lt;/p&gt;
</description>
        <pubDate>Fri, 05 May 2023 13:37:00 +0000</pubDate>
        <link>https://infertux.com/posts/2023/05/05/how-to-install-linux-systemd-boot-btrfs-luks-together/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2023/05/05/how-to-install-linux-systemd-boot-btrfs-luks-together/</guid>
        
        
        <category>Linux</category>
        
        <category>systemd-boot</category>
        
        <category>Btrfs</category>
        
        <category>ArchLinux</category>
        
      </item>
    
      <item>
        <title>How to update Ruby with AWS ElasticBeanstalk</title>
        <description>&lt;p&gt;The AWS web interface for &lt;a href=&quot;https://aws.amazon.com/elasticbeanstalk/&quot;&gt;ElasticBeanstalk&lt;/a&gt; doesn’t let you update Ruby.
Thankfully there is a way to do it via the command line using the &lt;a href=&quot;https://aws.amazon.com/cli/&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;aws&lt;/code&gt; utility&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;First, we need to identify the so-called “solution stack name” we want to use:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;aws &lt;span class=&quot;nt&quot;&gt;--profile&lt;/span&gt; foo elasticbeanstalk list-available-solution-stacks | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-E&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;SolutionStackName.+ Ruby 2&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\.&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;5&quot;&lt;/span&gt;
            &lt;span class=&quot;s2&quot;&gt;&quot;SolutionStackName&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;64bit Amazon Linux 2017.09 v2.7.1 running Ruby 2.5 (Puma)&quot;&lt;/span&gt;,
            &lt;span class=&quot;s2&quot;&gt;&quot;SolutionStackName&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;64bit Amazon Linux 2017.09 v2.7.1 running Ruby 2.5 (Passenger Standalone)&quot;&lt;/span&gt;,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then we need to retrieve the environment name:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;aws &lt;span class=&quot;nt&quot;&gt;--profile&lt;/span&gt; foo elasticbeanstalk describe-environments | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;EnvironmentName&quot;&lt;/span&gt;
            &lt;span class=&quot;s2&quot;&gt;&quot;EnvironmentName&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;foobar-rails&quot;&lt;/span&gt;,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Finally, we can update the environment:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;aws &lt;span class=&quot;nt&quot;&gt;--profile&lt;/span&gt; foo elasticbeanstalk update-environment &lt;span class=&quot;nt&quot;&gt;--solution-stack-name&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;64bit Amazon Linux 2017.09 v2.7.1 running Ruby 2.5 (Puma)&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--environment-name&lt;/span&gt; foobar-rails
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Done!&lt;/p&gt;

&lt;p&gt;It will take a few minutes to redeploy your app.
I like to monitor it using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eb health --refresh&lt;/code&gt;.&lt;/p&gt;
</description>
        <pubDate>Thu, 29 Mar 2018 09:44:00 +0000</pubDate>
        <link>https://infertux.com/posts/2018/03/29/how-to-update-ruby-with-aws-elasticbeanstalk/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2018/03/29/how-to-update-ruby-with-aws-elasticbeanstalk/</guid>
        
        
        <category>Ruby</category>
        
        <category>AWS</category>
        
        <category>update</category>
        
      </item>
    
      <item>
        <title>Bye Octopress, welcome Jekyll!</title>
        <description>&lt;p&gt;I decided it was about time to upgrade this site to Octopress 3.
Then I realised that Octopress 3 is basically Jekyll and some deployment scripts, which I don’t need, therefore I’m converting this blog to Jekyll.&lt;/p&gt;

&lt;p&gt;Thank you Octopress, you’ve been very helpful for all these years.
But it’s time to go back to the roots with a slimmed down design and no more JavaScript bloat, yay!&lt;/p&gt;

&lt;p&gt;While I’m at it, I’m adding DNSSEC, HTTPS (thanks Let’s Encrypt) and hopefully IPv6 as well…&lt;/p&gt;
</description>
        <pubDate>Sat, 17 Sep 2016 14:41:18 +0000</pubDate>
        <link>https://infertux.com/posts/2016/09/17/bye-octopress-welcome-jekyll/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2016/09/17/bye-octopress-welcome-jekyll/</guid>
        
        
        <category>Octopress</category>
        
        <category>Jekyll</category>
        
        <category>update</category>
        
      </item>
    
      <item>
        <title>Cross-compile Bitcoin for ARM</title>
        <description>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;So you want to cross-compile Bitcoin (or any C/C++ program in fact) from your x86_64 host machine for an ARM “target” machine.&lt;/p&gt;

&lt;p&gt;This little howto aims to help you with that.
It’s intended for intermediate level, i.e. you should be familiar with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./configure&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make&lt;/code&gt; commands but you don’t need to have earlier  experience with cross-compilation.&lt;/p&gt;

&lt;p&gt;The first step is to identify what’s called the &lt;a href=&quot;https://wiki.osdev.org/Target_Triplet&quot;&gt;target triplet&lt;/a&gt;.
An easy way to do so is to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gcc -dumpmachine&lt;/code&gt; on the target machine.
If you don’t have &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gcc&lt;/code&gt; installed, you can install it to run that command then uninstall it right away.&lt;/p&gt;

&lt;p&gt;In my case, I have:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gcc &lt;span class=&quot;nt&quot;&gt;-dumpmachine&lt;/span&gt;
arm-linux-gnueabihf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You’ll have to replace &lt;em&gt;arm-linux-gnueabihf&lt;/em&gt; with whatever you get for the rest of this howto.&lt;/p&gt;

&lt;h2 id=&quot;install-a-cross-compiler-for-our-target-platform&quot;&gt;Install a cross-compiler for our target platform&lt;/h2&gt;

&lt;p&gt;If you’re running Arch Linux, there might be an &lt;a href=&quot;https://aur.archlinux.org/&quot;&gt;AUR&lt;/a&gt; package for you.
If you’re not running Arch or you want to use a more generic method, you can skip to the next paragraph which explains how to use crosstool-ng.&lt;/p&gt;

&lt;h3 id=&quot;on-arch-linux-using-aur&quot;&gt;On Arch Linux using AUR&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;yaourt &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; arm-linux-gnueabihf-gcc &lt;span class=&quot;c&quot;&gt;# pulls all dependencies, compiles for several hours on a quad-core...&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;yaourt &lt;span class=&quot;nt&quot;&gt;-Q&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;grep &lt;/span&gt;arm-linux
&lt;span class=&quot;nb&quot;&gt;local&lt;/span&gt;/arm-linux-gnueabihf-binutils 2.25.1-3
&lt;span class=&quot;nb&quot;&gt;local&lt;/span&gt;/arm-linux-gnueabihf-gcc 5.3.0-2
&lt;span class=&quot;nb&quot;&gt;local&lt;/span&gt;/arm-linux-gnueabihf-glibc 2.22-3
&lt;span class=&quot;nb&quot;&gt;local&lt;/span&gt;/arm-linux-gnueabihf-linux-api-headers 4.1.4-1

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;arm-linux-gnueabihf-g++ &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# should be working and in the $PATH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;on-any-distro-using-crosstool-ng&quot;&gt;On any distro using crosstool-ng&lt;/h3&gt;

&lt;p&gt;First, you need to &lt;a href=&quot;https://crosstool-ng.org/#download_and_usage&quot;&gt;install crosstool-ng&lt;/a&gt;, the executable is named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ct-ng&lt;/code&gt; and should be available to a non-root user.&lt;/p&gt;

&lt;p&gt;Then we check if &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ct-ng&lt;/code&gt; knows our target architecture:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ct-ng list-samples | &lt;span class=&quot;nb&quot;&gt;grep &lt;/span&gt;arm-linux-gnueabihf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you can’t find an exact match, just run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ct-ng list-samples&lt;/code&gt; and pick the closest one, like &lt;em&gt;arm-unknown-linux-gnueabi&lt;/em&gt; or maybe &lt;em&gt;armv7-rpi2-linux-gnueabihf&lt;/em&gt;.
To select it, simply run:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ct-ng arm-unknown-linux-gnueabi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now we need to build the actual toolchain.
This will take a long while as it downloads a copy of the Linux kernel, binutils, gcc, etc. then builds gcc itself, etc.
That will require a few gigs of disk space and burn your CPU for a while…&lt;/p&gt;

&lt;p&gt;If you’re in a rush, you can skip building some of the tools such as gdb, etc.
You can do that with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ct-ng menuconfig&lt;/code&gt; then unselect what you don’t need.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ct-ng build
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When it’s finally done, you should have a new directory named &lt;em&gt;~/x-tools/&lt;/em&gt;:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; ~/x-tools/arm-unknown-linux-gnueabi/bin
arm-unknown-linux-gnueabi-addr2line  arm-unknown-linux-gnueabi-ct-ng.config  arm-unknown-linux-gnueabi-gcc-nm      arm-unknown-linux-gnueabi-ld.gold   arm-unknown-linux-gnueabi-size
arm-unknown-linux-gnueabi-ar         arm-unknown-linux-gnueabi-dwp           arm-unknown-linux-gnueabi-gcc-ranlib  arm-unknown-linux-gnueabi-nm        arm-unknown-linux-gnueabi-strings
arm-unknown-linux-gnueabi-as         arm-unknown-linux-gnueabi-elfedit       arm-unknown-linux-gnueabi-gcov        arm-unknown-linux-gnueabi-objcopy   arm-unknown-linux-gnueabi-strip
arm-unknown-linux-gnueabi-c++        arm-unknown-linux-gnueabi-g++           arm-unknown-linux-gnueabi-gprof       arm-unknown-linux-gnueabi-objdump
arm-unknown-linux-gnueabi-cc         arm-unknown-linux-gnueabi-gcc           arm-unknown-linux-gnueabi-ld          arm-unknown-linux-gnueabi-populate
arm-unknown-linux-gnueabi-c++filt    arm-unknown-linux-gnueabi-gcc-4.9.4     arm-unknown-linux-gnueabi-ld.bfd      arm-unknown-linux-gnueabi-ranlib
arm-unknown-linux-gnueabi-cpp        arm-unknown-linux-gnueabi-gcc-ar        arm-unknown-linux-gnueabi-ldd         arm-unknown-linux-gnueabi-readelf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Add the &lt;em&gt;bin&lt;/em&gt; sub-directory to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PATH&lt;/code&gt; with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;export PATH=~/x-tools/arm-unknown-linux-gnueabi/bin:$PATH&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;CXX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;arm-unknown-linux-gnueabi-cpp
&lt;span class=&quot;nv&quot;&gt;$ $CXX&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt;
arm-unknown-linux-gnueabi-gcc &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;crosstool-NG crosstool-ng-1.22.0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 5.2.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Great! We now have a working cross-compiler.&lt;/p&gt;

&lt;h2 id=&quot;compiling-bitcoin&quot;&gt;Compiling Bitcoin&lt;/h2&gt;

&lt;p&gt;We’re on the home stretch!
Getting a cross-compiler to work was probably harder than compiling Bitcoin itself.
Let’s start by fetching the source code and checking out the latest tagged release (&lt;em&gt;v0.12.0&lt;/em&gt; at the time of this writing):&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git clone https://github.com/bitcoin/bitcoin
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;bitcoin
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git checkout v0.12.0
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;depends
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;less README.md &lt;span class=&quot;c&quot;&gt;# the following is inspired from this README&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now we need to pull all the dependencies to compile Bitcoin.
I don’t need a GUI – &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NO_QT=1&lt;/code&gt; – nor wallet support nor UPNP but adapt the next line to your needs:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;make &lt;span class=&quot;nv&quot;&gt;HOST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;arm-linux-gnueabihf &lt;span class=&quot;nv&quot;&gt;NO_QT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1 &lt;span class=&quot;nv&quot;&gt;NO_WALLET&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1 &lt;span class=&quot;nv&quot;&gt;NO_UPNP&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1 &lt;span class=&quot;nt&quot;&gt;-j4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will also take a while since it downloads a bunch of dependencies including the fat libboost.
When it’s done let’s go back to the root directory and generate the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;configure&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./autogen.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once again, I pass in a few flags to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./configure&lt;/code&gt; but you can adapt them to your needs.
Run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./configure --help&lt;/code&gt; for more details about the flags.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./configure &lt;span class=&quot;nt&quot;&gt;--prefix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;/depends/arm-linux-gnueabihf &lt;span class=&quot;nt&quot;&gt;--with-gui&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;no &lt;span class=&quot;nt&quot;&gt;--disable-wallet&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--without-miniupnpc&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--disable-zmq&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--enable-reduce-exports&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;make &lt;span class=&quot;nt&quot;&gt;-j4&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# takes about 5 minutes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Awesome! Let’s check out our freshly compiled binaries and strip them to save some size.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;find src &lt;span class=&quot;nt&quot;&gt;-maxdepth&lt;/span&gt; 1 &lt;span class=&quot;nt&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;nt&quot;&gt;-executable&lt;/span&gt;
src/bitcoind
src/bitcoin-cli
src/bitcoin-tx

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;find src &lt;span class=&quot;nt&quot;&gt;-maxdepth&lt;/span&gt; 1 &lt;span class=&quot;nt&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;nt&quot;&gt;-executable&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-exec&lt;/span&gt; arm-linux-gnueabihf-strip &lt;span class=&quot;o&quot;&gt;{}&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\;&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;find src &lt;span class=&quot;nt&quot;&gt;-maxdepth&lt;/span&gt; 1 &lt;span class=&quot;nt&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;nt&quot;&gt;-executable&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-exec&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lh&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{}&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;-rwxr-xr-x&lt;/span&gt; 1 infertux infertux 4.8M Feb 24 22:27 src/bitcoind
&lt;span class=&quot;nt&quot;&gt;-rwxr-xr-x&lt;/span&gt; 1 infertux infertux 1.6M Feb 24 22:27 src/bitcoin-cli
&lt;span class=&quot;nt&quot;&gt;-rwxr-xr-x&lt;/span&gt; 1 infertux infertux 2.0M Feb 24 22:27 src/bitcoin-tx

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;find src &lt;span class=&quot;nt&quot;&gt;-maxdepth&lt;/span&gt; 1 &lt;span class=&quot;nt&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;nt&quot;&gt;-executable&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-exec&lt;/span&gt; file &lt;span class=&quot;o&quot;&gt;{}&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-Eo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;^([^,]+,){6}&quot;&lt;/span&gt;
src/bitcoind: ELF 32-bit LSB shared object, ARM, EABI5 version 1 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;GNU/Linux&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;, dynamically linked, interpreter /lib/ld-linux-armhf.so.3, &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;GNU/Linux 2.6.32,
src/bitcoin-cli: ELF 32-bit LSB shared object, ARM, EABI5 version 1 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;GNU/Linux&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;, dynamically linked, interpreter /lib/ld-linux-armhf.so.3, &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;GNU/Linux 2.6.32,
src/bitcoin-tx: ELF 32-bit LSB shared object, ARM, EABI5 version 1 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;GNU/Linux&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;, dynamically linked, interpreter /lib/ld-linux-armhf.so.3, &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;GNU/Linux 2.6.32,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The last step is to copy these three files to your ARM machine then run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./bitcoind --help&lt;/code&gt; to make sure it works.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;h2 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h2&gt;

&lt;h3 id=&quot;wrong-libstdc-version&quot;&gt;Wrong libstdc++ version&lt;/h3&gt;

&lt;p&gt;After copying my binary to the target machine and running it, I get a message like &lt;strong&gt;version `GLIBCXX_3.4.21’ not found (required by ./bitcoind)&lt;/strong&gt;.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./bitcoind &lt;span class=&quot;nt&quot;&gt;--help&lt;/span&gt;
./bitcoind: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;GLIBCXX_3.4.21&lt;span class=&quot;s1&quot;&gt;&apos; not found (required by ./bitcoind)

$ strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20

$ ls -l /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 # on target machine (Debian)
lrwxrwxrwx 1 root root     19 Dec 27  2014 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 -&amp;gt; libstdc++.so.6.0.20

$ ls -l /usr/arm-linux-gnueabihf/lib/libstdc++.so.6 # on host machine (Arch)
lrwxrwxrwx 1 root root 19 Feb 24 21:00 /usr/arm-linux-gnueabihf/lib/libstdc++.so.6 -&amp;gt; libstdc++.so.6.0.21

$ # Dammit, our host machine was using a newer version of libstdc++ than our target machine...
$ # Let&apos;&lt;/span&gt;s copy the old version to our host machine and recompile Bitcoin with that lib...

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scp target:/usr/lib/arm-linux-gnueabihf/libstdc++.so.6 /tmp/lib/
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./configure ... &lt;span class=&quot;nv&quot;&gt;LDFLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-L&lt;/span&gt;/tmp/lib
configure: error: No working boost &lt;span class=&quot;nb&quot;&gt;sleep &lt;/span&gt;implementation found.

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# Using libstdc++.so.6.0.20 seems to be breaking boost sleep implementation for some reason... :/&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# Let&apos;s try something else by copying the newer lib to the target and set LD_LIBRARY_PATH instead&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scp /usr/arm-linux-gnueabihf/lib/libstdc++.so.6.0.21 target:~/libstdc++.so.6
&lt;span class=&quot;nv&quot;&gt;$ LD_LIBRARY_PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; ./bitcoind &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
Bitcoin Core Daemon version v0.12.0

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# Success!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Tue, 23 Feb 2016 23:21:39 +0000</pubDate>
        <link>https://infertux.com/posts/2016/02/23/cross-compile-bitcoin-for-arm/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2016/02/23/cross-compile-bitcoin-for-arm/</guid>
        
        
        <category>bitcoin</category>
        
        <category>ARM</category>
        
        <category>g++</category>
        
        <category>crosstool-ng</category>
        
      </item>
    
      <item>
        <title>Announcing Zeyple</title>
        <description>&lt;h2 id=&quot;what-is-it&quot;&gt;What is it?&lt;/h2&gt;

&lt;p&gt;Zeyple. What’s that? A brand of cereals? A new app for your smartphone? The name of a pizza-making robot?&lt;/p&gt;

&lt;p&gt;Well, it’s none of the above. It’s actually the funky name I gave to a project I started several years ago, sometime in 2012 according to the Git history.&lt;/p&gt;

&lt;p&gt;It was the pre-&lt;a href=&quot;https://en.wikipedia.org/wiki/Edward_Snowden&quot;&gt;Snowden&lt;/a&gt; era but I was already worried about blackhats doing &lt;a href=&quot;https://en.wikipedia.org/wiki/Man-in-the-middle_attack&quot;&gt;MITM&lt;/a&gt; attacks onto my WiFi network.
One thing which particularly annoyed me was that it was relatively easy for someone to sniff the unencrypted emails I was receiving from various servers I was &lt;em&gt;root&lt;/em&gt; on.
This made me wonder how you could &lt;strong&gt;Encrypt Your Precious Log Emails&lt;/strong&gt; [&lt;a id=&quot;fnl-2015-10-25-1&quot; href=&quot;#fn-2015-10-25-1&quot;&gt;1&lt;/a&gt;] all the way from the originating server to your inbox.&lt;/p&gt;

&lt;p&gt;Obviously, &lt;a href=&quot;https://en.wikipedia.org/wiki/GNU_Privacy_Guard&quot;&gt;GPG&lt;/a&gt; was the answer.
But how do you make your server automatically encrypt all outgoing emails sent from a variety of applications?
That is exactly what &lt;a href=&quot;https://github.com/infertux/zeyple&quot;&gt;Zeyple&lt;/a&gt; does.
Assuming you configured &lt;a href=&quot;https://www.postfix.org/&quot;&gt;Postfix&lt;/a&gt; to send your emails, Zeyple acts as a proxy (or &lt;a href=&quot;https://www.postfix.org/FILTER_README.html&quot;&gt;filter&lt;/a&gt; in Postfix slang) to encrypt emails for the intended recipient(s).&lt;/p&gt;

&lt;h2 id=&quot;is-it-ready&quot;&gt;Is it ready?&lt;/h2&gt;

&lt;p&gt;Today, I’m glad to say the project can be considered stable with &lt;a href=&quot;https://github.com/infertux/zeyple/blob/master/CHANGELOG.md&quot;&gt;release 1.1.0&lt;/a&gt;.
I got feedback from solo hobbyists to universities using it and this is quite exciting to see that &lt;em&gt;some&lt;/em&gt; people do care about encryption and IT security in general.
Anyway, if that sounds of interest to you, you’re very welcome to try it out on your own setup.
There are &lt;a href=&quot;https://github.com/infertux/zeyple/blob/master/INSTALL.md&quot;&gt;a few ways to install it&lt;/a&gt; but I haven’t gotten to build official packages for your favorite distribution, &lt;a href=&quot;https://github.com/infertux/zeyple/issues/1&quot;&gt;yet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And here’s the README for more information: &lt;a href=&quot;https://github.com/infertux/zeyple?tab=readme-ov-file&quot;&gt;https://github.com/infertux/zeyple&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;footnotes&quot;&gt;Footnotes&lt;/h2&gt;

&lt;p&gt;[&lt;a id=&quot;fn-2015-10-25-1&quot; href=&quot;#fnl-2015-10-25-1&quot;&gt;1&lt;/a&gt;]
In case you’re wondering, yes this is where the name Zeyple came from - it’s just a good old recursive acronym like &lt;em&gt;GNU’s Not Unix!&lt;/em&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 25 Oct 2015 16:20:20 +0000</pubDate>
        <link>https://infertux.com/posts/2015/10/25/announcing-zeyple/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2015/10/25/announcing-zeyple/</guid>
        
        
        <category>Zeyple</category>
        
        <category>GPG</category>
        
        <category>PGP</category>
        
        <category>encryption</category>
        
        <category>email</category>
        
        <category>Postfix</category>
        
        <category>Python</category>
        
      </item>
    
      <item>
        <title>SELinux cheat sheet</title>
        <description>&lt;p&gt;SELinux is quite powerful but I never remember how to create a new module off the top of my head so here’s a cheat sheet for it.&lt;/p&gt;

&lt;p&gt;First you might want to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;audit2allow&lt;/code&gt; to help you getting started:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; /var/log/audit/audit.log | audit2allow &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; mymodulelocal &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; mymodulelocal.te
vim mymodulelocal.te
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When you’re happy with the rules in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.te&lt;/code&gt; file, it’s time to compile it:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;checkmodule &lt;span class=&quot;nt&quot;&gt;-M&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; mymodulelocal.mod mymodulelocal.te
semodule_package &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; mymodulelocal.mod &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; mymodulelocal.pp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And finally you can reload your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.pp&lt;/code&gt; policy file:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;semodule &lt;span class=&quot;nt&quot;&gt;-vr&lt;/span&gt; mymodulelocal&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; semodule &lt;span class=&quot;nt&quot;&gt;-vi&lt;/span&gt; mymodulelocal.pp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or as a handy one-liner:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;checkmodule &lt;span class=&quot;nt&quot;&gt;-Mmo&lt;/span&gt; mymodulelocal.mod mymodulelocal.te &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; semodule_package &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; mymodulelocal.mod &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; mymodulelocal.pp &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;semodule &lt;span class=&quot;nt&quot;&gt;-vr&lt;/span&gt; mymodulelocal &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; semodule &lt;span class=&quot;nt&quot;&gt;-vi&lt;/span&gt; mymodulelocal.pp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Wed, 29 Apr 2015 17:36:22 +0000</pubDate>
        <link>https://infertux.com/posts/2015/04/29/selinux-cheat-sheet/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2015/04/29/selinux-cheat-sheet/</guid>
        
        
        <category>SELinux</category>
        
        <category>security</category>
        
        <category>howto</category>
        
        <category>cheat sheet</category>
        
        <category>sysadmin</category>
        
      </item>
    
      <item>
        <title>ISO 8601 for programmers</title>
        <description>&lt;p&gt;As programmers, we all know we should use &lt;a href=&quot;https://en.wikipedia.org/wiki/ISO_8601&quot;&gt;ISO 8601&lt;/a&gt; to format date and time when represented numerically.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2013-12-28-iso-8601-for-programmers/iso_8601.png&quot; alt=&quot;XKCD 1179&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, the POSIX standard does not always provide us with an easy way to use ISO 8601 with &lt;a href=&quot;https://man7.org/linux/man-pages/man3/strftime.3.html&quot;&gt;strftime&lt;/a&gt;.
That’s why I’m posting here &lt;em&gt;the right way&lt;/em&gt; to do it:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;date: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%Y-%m-%d&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%F&lt;/code&gt; for recent implementations (example: &lt;em&gt;2013-12-31&lt;/em&gt;)&lt;/li&gt;
  &lt;li&gt;time: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%H:%M:%S&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%T&lt;/code&gt; for recent implementations (example: &lt;em&gt;23:59:59&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sat, 28 Dec 2013 10:02:16 +0000</pubDate>
        <link>https://infertux.com/posts/2013/12/28/iso-8601-for-programmers/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2013/12/28/iso-8601-for-programmers/</guid>
        
        
        <category>ISO 8601</category>
        
        <category>date</category>
        
        <category>time</category>
        
        <category>software</category>
        
        <category>strftime</category>
        
      </item>
    
      <item>
        <title>How to remove an email address from a GPG key</title>
        <description>&lt;p&gt;This is a quick &lt;em&gt;howto&lt;/em&gt; to explain how to remove one of the identities of your GPG key.
This is particularly useful if this email address is no longer yours for some reason.&lt;/p&gt;

&lt;p&gt;Unless you’ve never published your key to a public server (unlikely!), you can’t &lt;em&gt;delete&lt;/em&gt; an email address from your GPG key, but you can &lt;em&gt;revoke&lt;/em&gt; it.&lt;/p&gt;

&lt;p&gt;Here are the few steps you’ll need to take:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Edit your key with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gpg --edit-key &amp;lt;KEY_ID&amp;gt;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Select the sub-key to revoke with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uid &amp;lt;ID&amp;gt;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Revoke it with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;revuid&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Save your changes with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;save&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Publish your updated key with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gpg --send-keys &amp;lt;KEY_ID&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can also have a look at the example output below to see what is looks like:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gpg --edit-key 01234567
pub  2048R/01234567  created: 2010-01-01  expires: 2015-01-01  usage: SCA
                     trust: ultimate      validity: ultimate
sub  2048R/FEDCBA98  created: 2010-01-01  expires: 2015-01-01  usage: E
[ultimate] (1). John Doe &amp;lt;john@doe.tld&amp;gt;
[ultimate] (2)  John Doe (Corp) &amp;lt;john.doe@corp.tld&amp;gt;

gpg&amp;gt; uid 2

pub  2048R/01234567  created: 2010-01-01  expires: 2015-01-01  usage: SCA
                     trust: ultimate      validity: ultimate
sub  2048R/FEDCBA98  created: 2010-01-01  expires: 2015-01-01  usage: E
[ultimate] (1). John Doe &amp;lt;john@doe.tld&amp;gt;
[ultimate] (2)* John Doe (Corp) &amp;lt;john.doe@corp.tld&amp;gt;

gpg&amp;gt; revuid
Really revoke this user ID? (y/N) y
Please select the reason for the revocation:
  0 = No reason specified
  4 = User ID is no longer valid
  Q = Cancel
(Probably you want to select 4 here)
Your decision? 4
Enter an optional description; end it with an empty line:
&amp;gt;
Reason for revocation: User ID is no longer valid
(No description given)
Is this okay? (y/N) y

You need a passphrase to unlock the secret key for
user: &quot;John Doe &amp;lt;john@doe.tld&amp;gt;&quot;
2048-bit RSA key, ID 01234567, created 2010-01-01


pub  2048R/01234567  created: 2010-01-01  expires: 2015-01-01  usage: SCA
                     trust: ultimate      validity: ultimate
sub  2048R/FEDCBA98  created: 2010-01-01  expires: 2015-01-01  usage: E
[ultimate] (1). John Doe &amp;lt;john@doe.tld&amp;gt;
[ revoked] (2)  John Doe (Corp) &amp;lt;john.doe@corp.tld&amp;gt;

gpg&amp;gt; save

$ gpg --send-keys 01234567
gpg: sending key 01234567 to hkp server keys.gnupg.net

$ gpg --list-keys 01234567
pub   2048R/01234567 2010-01-01 [expires: 2015-01-01]
uid                  John Doe &amp;lt;john@doe.tld&amp;gt;
sub   2048R/FEDCBA98 2010-01-01 [expires: 2015-01-01]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Sun, 03 Nov 2013 12:15:00 +0000</pubDate>
        <link>https://infertux.com/posts/2013/11/03/how-to-remove-an-email-address-from-a-gpg-key/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2013/11/03/how-to-remove-an-email-address-from-a-gpg-key/</guid>
        
        
        <category>GPG</category>
        
        <category>PGP</category>
        
      </item>
    
      <item>
        <title>Trolling the bots with a teapot</title>
        <description>&lt;p&gt;I finally got rid of the superfluous &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blog/&lt;/code&gt; in the URL having already a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blog&lt;/code&gt; sub-domain.
Of course, I didn’t want to break old links so I added the following line in my &lt;a href=&quot;https://nginx.org/&quot;&gt;nginx&lt;/a&gt; config:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rewrite ^/blog(.*)$ $1 permanent;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But as always with nginx, that worked like a charm and was just too easy.
So I thought I would troll some nasty crawlers while I was at editing my nginx config.&lt;/p&gt;

&lt;p&gt;Even though I don’t use PHP, a lots of bots are spamming my logs with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GET /wp-login.php?action=register&lt;/code&gt; and so forth.&lt;/p&gt;

&lt;p&gt;So from now on, I just tell them &lt;em&gt;I’m a teapot&lt;/em&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;location ~ \.(aspx|php|jsp|cgi)$ {
  return 418 &quot;I&apos;m a teapot!&quot;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hopefully, that will make them confused enough to GTFO for good.&lt;/p&gt;

&lt;p&gt;PS: I should point out this would not have been possible without &lt;a href=&quot;https://tools.ietf.org/html/rfc2324#section-2.3.2&quot;&gt;that brilliant RFC&lt;/a&gt; written exactly fifteen years ago.&lt;/p&gt;

</description>
        <pubDate>Mon, 01 Apr 2013 23:47:00 +0000</pubDate>
        <link>https://infertux.com/posts/2013/04/01/trolling-the-bots-with-a-teapot/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2013/04/01/trolling-the-bots-with-a-teapot/</guid>
        
        
        <category>nginx</category>
        
        <category>troll</category>
        
        <category>bots</category>
        
        <category>crawlers</category>
        
        <category>HTTP</category>
        
        <category>teapot</category>
        
      </item>
    
      <item>
        <title>Announcing Bashcov 1.0.0</title>
        <description>&lt;p&gt;Hey look! There’s a demo: &lt;a href=&quot;https://infertux.github.io/bashcov/test_app&quot;&gt;infertux.github.io/bashcov/test_app&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;what-is-it&quot;&gt;What is it?&lt;/h2&gt;

&lt;p&gt;I’m a big fan of both Ruby’s &lt;a href=&quot;https://github.com/colszowka/simplecov&quot;&gt;SimpleCov&lt;/a&gt; and Bash.
&lt;a href=&quot;https://github.com/infertux/bashcov&quot;&gt;Bashcov&lt;/a&gt; is my dream to have in Bash what SimpleCov is to Ruby.&lt;/p&gt;

&lt;p&gt;Oddly enough, I didn’t find any coverage tool for Bash except &lt;a href=&quot;https://code.google.com/p/shcov/source/browse/trunk/scripts/shcov&quot;&gt;shcov&lt;/a&gt; but as stated &lt;a href=&quot;https://stackoverflow.com/questions/7188081/code-coverage-tools-for-validating-the-scripts&quot;&gt;there&lt;/a&gt;, shcov is:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;somewhat simplistic and doesn’t handle all possible cases very well (especially when we’re talking about long and complex lines)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Indeed, it doesn’t work very well for me.
I have covered lines marked as uncovered and some files completely missed although executed through another script (via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source&lt;/code&gt;).
Moreover, I’m not sure it is still being actively maintained.
This makes me feel like a sad panda :(&lt;/p&gt;

&lt;p&gt;Bashcov aims to be a neat and working coverage tool backed by SimpleCov and &lt;a href=&quot;https://github.com/colszowka/simplecov-html&quot;&gt;simplecov-html&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;how-does-it-work&quot;&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;Ruby has a &lt;a href=&quot;https://www.ruby-doc.org/stdlib-1.9.3/libdoc/coverage/rdoc/Coverage.html&quot;&gt;coverage module&lt;/a&gt; which computes the coverage on demand.
Unfortunately, Bash doesn’t have such niceties but we can use the &lt;a href=&quot;https://www.gnu.org/software/bash/manual/bash.html#index-BASH_005fXTRACEFD&quot;&gt;xtrace feature&lt;/a&gt; which prints every line executed using &lt;a href=&quot;https://www.gnu.org/software/bash/manual/bash.html#index-PS4&quot;&gt;PS4&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After a bit of parsing, it sends results through SimpleCov which generates an awesome HTML report.&lt;/p&gt;

&lt;p&gt;And of course, you can take great advantage of SimpleCov by adding a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.simplecov&lt;/code&gt; file in your project’s root (like &lt;a href=&quot;https://github.com/infertux/bashcov/blob/master/spec/test_app/.simplecov&quot;&gt;this&lt;/a&gt;).&lt;/p&gt;

&lt;h2 id=&quot;is-it-ready&quot;&gt;Is it ready?&lt;/h2&gt;

&lt;p&gt;Well, I’ve been working on it for a few months now and it looks stable enough for a 1.0.0 release.
There is &lt;a href=&quot;https://github.com/infertux/bashcov/issues/2&quot;&gt;one glitch&lt;/a&gt; I’d like to get rid of but apart from that, it works pretty well for me.&lt;/p&gt;

&lt;p&gt;My yardstick is currently &lt;a href=&quot;https://github.com/wayneeseguin/rvm&quot;&gt;RVM&lt;/a&gt; because it has a relatively big codebase and extensive tests.&lt;/p&gt;

&lt;p&gt;If you have a Bash project and tests for your code, you could give &lt;a href=&quot;https://rubygems.org/gems/bashcov&quot;&gt;Bashcov&lt;/a&gt; a try to see what code you’re actually covering through your testsuite. I’d love to hear your feedback if so!&lt;/p&gt;

</description>
        <pubDate>Sat, 16 Mar 2013 15:25:00 +0000</pubDate>
        <link>https://infertux.com/posts/2013/03/16/announcing-bashcov-1-dot-0-0/</link>
        <guid isPermaLink="true">https://infertux.com/posts/2013/03/16/announcing-bashcov-1-dot-0-0/</guid>
        
        
        <category>Bash</category>
        
        <category>code coverage</category>
        
        <category>testing</category>
        
        <category>TDD</category>
        
        <category>Ruby</category>
        
        <category>SimpleCov</category>
        
      </item>
    
  </channel>
</rss>
