Publications

Hugo .Site.Params.Author

I dusted off the site and was going to write about my experience updating Debian 12 Bookworm to Debian 13 Trixie on two servers. I use Hugo with the Mainroad theme and I hadn’t updated the site in quite a while. I updated Hugo to the latest stable version and tried to rebuild the site to include the new content. I ran into an error.

The error was:

Site.Author was deprecated in Hugo v0.124.0 and subsequently removed.
Implement taxonomy 'author' or use .Site.Params.Author instead.

I grepped the files in the theme and found .Site.Author in two files - author.html and authorbox.html. I replaced all the instances of “.Site.Author” with “.Site.Params.Author”. I also changed the “Site.Params.Author.avatar” to “Site.Params.Author.image”. Authorbox was now activated but nothing was displaying. So I looked at a couple of other newer themes to see what parameter names in config.toml needed to be changed. The “[Author]” section I renamed to [Params.author]" and changed “avatar” to “image”.

Atom Uninstall

No, the Atom text editor does not have an uninstaller. On Mac OS X, to completely uninstall, remove the following files and directories:

~/.atom
/usr/local/bin/atom (NB only present if command line tools installed)
/usr/local/bin/apm  (NB only present if command line tools installed)
/Applications/Atom.app
~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.github.atom.sfl
~/Library/Preferences/com.github.atom.plist
~/Library/Application Support/com.github.atom.ShipIt
~/Library/Application Support/Atom
~/Library/Caches/com.github.atom.ShipIt/
~/Library/Saved Application State/com.github.atom.savedState
~/Library/Logs/Atom/
~/Library/Preferences/com.github.atom.helper.plist
~/Library/Preferences/com.github.atom.LSSharedFileList.plist
~/Library/Preferences/ByHost/com.github.atom.ShipIt.<letters/numbers>.plist
~/Library/Saved Application State/com.github.atom.savedState
```text
*NB:* The `<letter/numbers>` in the file name located in `~/Library/Preferences/ByHost` appear to be a unique string per machine.

*NB:* Some of these files/directories may not be present. Older installations are likely to have all of them. Some of them aren't on my system with a new Atom install.

**DO NOT, UNDER ANY CIRCUMSTANCES, COPY AND PASTE THE CODE ABOVE INTO THE TERMINAL WITH `rm`.** The code contains spaces and cannot be used on the command line without escaping the spaces.

Thoughts on the Atom Editor

I installed the Atom text editor quite a while ago and didn’t have much time to play around with it. Last week a friend of mine brought it up in conversation. She was extolling its virtues. I decided now would be a good time to try it out. I was moving a site to Hugo and it has a plugin for Hugo syntax.

So I fired it up and, my word, a decade later an editor window opened. What took it so long to open? I poked around a bit and noticed that I had installed a bunch of packages when I first downloaded it. So I disabled the vast majority of them, then restarted. A minor improvement. Disabled the rest. Restarted. Another minor improvement. Then I disabled some core packages for languages I wouldn’t use. No help for the incredibly slow start time.

Deprecated nf_conntrack automatic helper assignment

For quite a while, I’ve been getting the “nf_conntrack: automatic helper assignment is deprecated and it will be removed soon” warning at boot. So I can’t say I was too surprised when I started getting “kernel: nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based  firewall rule not found. Use the iptables CT target to attach helpers instead.”

Back in January/February 2017 there was a post on the Linux-Kernel mailing list submitting a patch to print out the warning so firewall admins would at least have notice. As best as I can tell from reading a ton of stuff, the warning is logged if a packet which would have otherwise traversed your firewall didn’t because there was no helper available. More information can be found at Secure use of iptables and connection tracking helpers.

Nginx, OCSP stapling, booting, systemd and Debian 9

Noticed these lines in journalctl when nginx didn’t start after a reboot:

Dec 10 17:43:30 mail1 nginx[3485]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.int-x3.letsencrypt.org" in the certificate "/etc/letsencrypt/live/www.example.com/fullchain.pem"
Dec 10 17:43:30 mail1 nginx[3485]: nginx: [emerg] bind() to [<IPv6 address>]:80 failed (99: Cannot assign requested address)
Dec 10 17:43:30 mail1 nginx[3485]: nginx: configuration file /etc/nginx/nginx.conf test failed
Dec 10 17:43:30 mail1 systemd[1]: nginx.service: Control process exited, code=exited status=1
Dec 10 17:43:30 mail1 systemd[1]: nginx.service: Unit entered failed state.
Dec 10 17:43:30 mail1 systemd[1]: nginx.service: Failed with result 'exit-code'.
Dec 10 17:52:35 mail1 systemd[1]: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

Hmmm…