Packaged for the [uhhm] Arch registry, like every other uhhm binary
Test / test (push) Successful in 3s

PKGBUILD from the tagged checkout (tag must equal pkgver), built per
architecture by the release workflow: x86_64 on ergo's bare runner,
aarch64 on klokka's, uploaded to project.uhhm.no/api/packages/bl/arch/
uhhm with the REGISTRY_TOKEN repo secret. The package ships /usr/bin/
gdo, gdo.service and an /etc/gdo/env template; the installer script is
gone. !lto: makepkg's -flto hid ring's C symbols from the Rust linker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4jrCgLiKKHAEFuZUJjckH
This commit is contained in:
Bendik Aagaard Lynghaug
2026-09-23 20:08:08 +02:00
co-authored by Claude Fable 5.1
parent 983491295e
commit ca13282445
11 changed files with 165 additions and 57 deletions
+10
View File
@@ -0,0 +1,10 @@
# gdo - one per host. Read by gdo.service; mode 0600, the one file
# with a secret in it. See /usr/share/doc/gdo/README.md.
NATS_URL=nats://127.0.0.1:4222
SMTP_HOST=127.0.0.1
SMTP_PORT=25
# What gdo says in EHLO; a strict server refuses a bare hostname.
# Unset, the host's full name is used.
#SMTP_HELO=host.example.no
# A .typ file: set, every mail carries a PDF rendered from it.
#GDO_TYPST_THEME=/etc/gdo/theme.typ
+2 -2
View File
@@ -1,6 +1,6 @@
# One per host, not per site: every portal instance on the host
# publishes to the same WORMHOLE stream, and each message carries its
# own sender. Install with deploy/install.sh.
# own sender. Installed by the gdo package (pacman -S gdo).
[Unit]
Description=gdo - delivers portal's outgoing mail to the host's SMTP
After=network-online.target nats-server.service postfix.service
@@ -8,7 +8,7 @@ Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/gdo
EnvironmentFile=-/etc/gdo.env
EnvironmentFile=-/etc/gdo/env
DynamicUser=yes
Restart=always
RestartSec=5
-23
View File
@@ -1,23 +0,0 @@
#!/bin/sh
# Install or upgrade gdo on this host from a Gitea release. Run as root:
# sudo sh install.sh v0.1.0 [nats://user:pass@127.0.0.1:4222]
# The NATS URL is only needed the first time; it lands in /etc/gdo.env,
# which is the one file with a secret in it (mode 0600).
set -eu
tag=${1:?usage: install.sh vX.Y.Z [NATS_URL]}
base=https://project.uhhm.no/uhhm/gdo
tmp=$(mktemp)
curl -sfL "$base/releases/download/$tag/gdo" -o "$tmp"
install -m 0755 "$tmp" /usr/local/bin/gdo
rm -f "$tmp"
if [ ! -f /etc/gdo.env ]; then
nats=${2:-nats://127.0.0.1:4222}
umask 077
printf 'NATS_URL=%s\nSMTP_HOST=127.0.0.1\nSMTP_PORT=25\nSMTP_HELO=%s\n# GDO_TYPST_THEME=/etc/gdo/theme.typ\n' "$nats" "$(hostname -f 2>/dev/null || cat /etc/hostname)" > /etc/gdo.env
fi
curl -sfL "$base/raw/tag/$tag/deploy/gdo.service" -o /etc/systemd/system/gdo.service
systemctl daemon-reload
systemctl enable --now gdo
systemctl restart gdo
sleep 2
systemctl is-active gdo && /usr/local/bin/gdo --version