Category Archives: Software

A story of Docker, QEMU, and memfd_create()

Last year I stumbled across a problem with the execution of a Docker container in a CI environment. The interesting case was that this is a container for a foreign architecture, which is supported by the --platform option and there are even official images on Docker Hub for this.

Initially, the problem presented itself like this:

$ docker run -it --rm --platform linux/arm64 [...] arm64v8/ubuntu:jammy
root@d6fb5c478cb6:/# ps
Error, do this: mount -t proc proc /proc

This means the ps(1) command could not run in this Docker container. At first I trusted the error message and thought that /proc might really not be mounted. However, that is usually taken care of by Docker and this following check confirmed that it is in fact mounted:

root@d6fb5c478cb6:/# mount | grep proc | head -n1
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

Well, now what is actually the problem here with running a Docker container for a foreign architecture?

Continue reading

openbox-passmenu

I recently started to manage my passwords with the pass(1) password store. I integrated access into Firefox via passff and also found a nice GUI with QtPass. While this works nicely, in places outside the browser, it was still quite cumbersome for me to enter passwords. I was still required to open a terminal window to run pass or use the QtPass GUI to copy and paste the password.

I had seen others using passmenu together with dmenu to copy or insert a password anywhere. That seemed very elegant, as it could be used everywhere.

However, I prefer to use tools that are less minimalistic. For years, my Linux desktop has been LXDE with the Openbox window manager. I discovered that it is possible to write dynamic menu for Openbox, which seemed like a perfect fit for this task.

The result is now openbox-passmenu, a script that provides a menu for Openbox to access the passwords inside the pass(1) password store.

If you also want to use this, please head over to the GitHub project for instructions on how to install and where it has to be integrated with the Openbox configuration.

Interactive git rebase with non-interactive editing

When working with git and especially GitHub, I often have commits on my local branch that were already submitted as a pull request. Sometimes I continue working and later notice that I have commits on the branch that have nothing to do with the next thing I am already working on. Therefore I want to remove them from the current branch.

$ git log --oneline @{upstream}..
e159d1e Commit C
70140e3 Commit B
16ed14a Commit A

Continue reading

Postfix with relayhost over stunnel on macOS 10.12 Sierra

I like to have a working mail setup on all machines as this allows to be notified about cronjobs that failed and also to be able to send other notifications that would otherwise be lost. It is also especially useful for things like git send-email or automatically sending GPG signatures with caff to others.

However, mails cannot just be sent from any device and mail servers on the internet usually reject mails from dial-up IPs or public WiFi networks. To fight spam, techniques like SPF have been developed that restrict the mail servers that are allowed to send mails for the domain name used in the From: field. Therefore the best way is to relay all outgoing mail through the mail server that is responsible for your domains.

While most tools also allow you to configure an external SMTP server, it is on one hand tedious to configure it everywhere and on the other hand also insecure if you have to write the username and password for authentication to many user-readable configuration files on your system. Therefore I am running a local MTA on all the computers I administrate to relay mails to a central mail server.

Continue reading