Status update, May 2022
The common theme when I write these status updates seems to be: “if only I had two more days to make it all nice”. Of course that’s an illusion. It’s actually nice to be forced to make a cut and just put whatever you have out there. Maybe the next time you find yourself thinking “I’ll just take two more days to make it all nice” you should just stop and publish it. It can be liberating ☺
So let’s dive right in!
Some follow-up items
There are two items from previous status updates that I would like to follow up on.
The first one is pretty brief. As I mentioned last month, I wrote a little example app using Rust and its Qt bindings. I now published the code. It is just a text edit field in a window, in a seemingly simple layout (see the project’s README for details). If someone feels like telling me how to do this in GTK, I would be all ears!
The other item is potentially a bit more interesting. It’s taken a long time, but mostly because it happened to be a moving target this whole time: the ”hacking” instructions on man.sr.ht are finally getting a bit more verbose.
The good news is that these instructions have become much more consistent across services. But of course there are still many things to figure out how to set up and/or configure to get a sr.ht service up and running. Most of them are out of scope for the SourceHut documentation, but they could still deter a potential contributor. I know that, because my first sr.ht patches were for pages.sr.ht - it looks like a simple Go service, but you get to set up Redis, PostgreSQL, MinIO, and of course meta.sr.ht. I can see how someone on a limited time budget might lose interest in submitting a small patch.
And this is how the whole documentation issue relates to my next endeavor…
Building sr.ht VM images
There is a common wisdom: “If you have to do something often, automate it”. But in infrastructure engineering, there is another one: “If you have to do something not often, automate it”! The reasoning is simple: if you do something only once a year, you’ll have forgotten some details by the next time around.
What I wanted was a SourceHut installation running on one or more Alpine Linux VMs, so that I have an environment to play with that is a little closer to production. Now, I could have just run the Alpine installer a few times and install some packages. But where is the fun in that?
A while ago, I wrote makeimg as a convenient way to build images for the VMs that run my private servers. Instead of updating packages on them, I build a new image from scratch and re-deploy.
Naturally, when I started setting up Alpine VMs, I wondered if I could use the same approach. Somewhat unfortunately, makeimg was written specifically for Arch Linux. It uses a bunch of tooling from Arch, and the image generation was never meant to be generic. However, as you may have guessed, I wouldn’t be writing this if there was nothing to show. While you still need Arch Linux to run makeimg, I did manage to make it output Alpine Linux images.
This is a total kludge at the moment, and hence not documented in the man page or such. But I did add a small example for it.
And, much more importantly, here is an example for a VM image that I can just boot and have a meta.sr.ht instance up and running, with database, two users, and everything.
Now, I have to emphasize the I in that sentence. The config template uses values from my password store, and e.g. my mail server. But in essence, this is the first step towards codified instructions for setting up meta.sr.ht.
IMPORTANT: do not take this as official instructions or even attempt to run this on the internet! I am still experimenting. But if you are looking for some inspiration, you may be able to find it in the code somewhere.
I am just getting started with all this, and there is plenty of ideas for how to improve this, in no specific order:
- Improve the Alpine image generation in makeimg
- Look into letting makeimg run on distros other than Arch
- Provide a “complete SourceHut instance” image
- Provide an image for “hacking”, e.g. with source code present or such
- Document everything much better…
So, there you go. If only I would have had two more days to make it all nice! But now it’s out there, and I’ll keep improving and documenting things. And I think this will be very useful, for many reasons. One of them being that it describes in detail the steps needed to set up SourceHut.
NPotM: presenting vsync
Pretty soon after I started working on the Very Opinionated Mail Interaction
Toolkit I realized that it would be great to offer a built-in way to sync
your IMAP mailbox to a local maildir. Not only is this now implemented via vmt
sync
, the functionality is also nicely contained in its own
crate, making it easily reusable. So much
so, that there is also a simple stand-alone tool built on it:
vsync.
In the long run, I want vsync
to become a viable replacement for e.g.
mbsync
. Currently, it only supports one-way sync, i.e. from IMAP to maildir.
It never pushes any changes to IMAP. Adding that is the next step, though
two-way synchronization is a finicky business. As the final touch, I also
envision it to be able to run as a daemon, using IMAP IDLE for near-real-time synchronization.
Taking FOSS to the meatspace
And now for something completely different! SourceHut’s mission is to make free software better. As you are no doubt aware, free software is more than just code. It needs infrastructure, translations, documentation, and more. But most of all, it also needs users. And that’s not just an end in itself. To me, promoting free software also means promoting sustainability, empowerment, respect for privacy, an alternative to excessive consumerism, and probably a few other things, but I don’t want to digress.
Hence, I started dedicating a little bit of my time to helping the fine folks at Topio (in German only). They are a relentless bunch of volunteers who have made it their mission to educate people about privacy and free software, with a focus on phones. But unlike many others, they do so in the real world, in settings where the average visitor cannot be expected to even have heard of free software. Pre-Corona, they were present on markets, neighborhood festivals, and similar gatherings.
They also buy cheap, used phones and flash them with Google-free operating systems, reselling them without profit to people interested in giving those a try. Of course you can also bring your own phone, and they’ll flash it for you (if possible).
So, once a week, I will now spend a little bit of time flashing phones, talking to strangers about FOSS, and also doing “actual work”, helping them set up their new booth in an old indoor market. Highlight of this month was certainly a 70 year old lady for whom we fixed her (very old) laptop by installing Ubuntu on it. Not sure she understood the finer points of FOSS philosophy, but she definitely knows she’s using Linux now ☺. And: one laptop worth of e-waste avoided!
Tokidoki
Tokidoki, the heavy-work-in-progress CalDAV/CardDAV server, has been making quite some progress. In terms of code, most of the work happened in go-webdav, but it is driven by Tokidoki. Currently, the only implemented authentication backend is IMAP, so you need an IMAP server to test it (see the README). While still neither feature-complete nor 100% RFC-compliant, it is already usable for both contacts and calendar with clients such as Evolution or Thunderbird’s CardBook extension. Not suitable for production use just yet, but it won’t be long before I would consider it ready for personal use. It will be interesting to see how many features we can support (CalDAV offers plenty to choose from) without compromising the simplicity that is currently running a single command with two parameters…
Wrapping up
Boy, that escalated quickly! This again got much longer than I anticipated,
thanks for sticking around. Maybe I need to force myself to write down (and
hence publish) stuff more often. Let’s see. At any rate, happy hacking, and if
you have any questions or comments, feel free to reach out to bitfehler
in
#sr.ht.watercooler
on Libera Chat or send them to my public
inbox.