Sailfish OS UnifiedPush Distributor
  • Rust 74.9%
  • QML 20.6%
  • Shell 4.2%
  • Dockerfile 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
mautz-kernel cec66bdddf autopush: treat unexpected EOF as peer disconnect (#1)
Autopush connections sometimes close without a TLS close_notify. Rustls reports this as UnexpectedEof, which currently produces a recurring Autopush session ended INFO message.

Treat UnexpectedEof while reading an established WebSocket as a peer disconnect. The transport still emits a transient-network disconnect, so the existing reconnect behavior is unchanged. Other socket errors remain reported as failures.

Tests: `cargo test -p foghornd`, `cargo clippy -p foghornd --all-targets`, and `rustfmt --edition 2024 --check foghornd/src/autopush/mod.rs` all pass.
Co-authored-by: mautz-kernel <motorrad@posteo.de>
Reviewed-on: projectmoon/foghorn#1
2026-09-23 08:56:47 +00:00
assets toot toot 2026-08-21 11:00:07 +02:00
docs toot toot 2026-08-21 11:00:07 +02:00
foghorn Version 0.2.0 2026-08-21 17:23:41 +02:00
foghorn-common Version 0.2.0 2026-08-21 17:23:41 +02:00
foghorn-test-connector Version 0.2.0 2026-08-21 17:23:41 +02:00
foghornd autopush: treat unexpected EOF as peer disconnect (#1) 2026-09-23 08:56:47 +00:00
qml toot toot 2026-08-21 11:00:07 +02:00
rpm Version 0.2.0 2026-08-21 17:23:41 +02:00
sfos Version 0.2.0 2026-08-21 17:23:41 +02:00
.gitignore toot toot 2026-08-21 11:00:07 +02:00
Cargo.lock Version 0.2.0 2026-08-21 17:23:41 +02:00
Cargo.toml toot toot 2026-08-21 11:00:07 +02:00
README.md release the toot toot 2026-08-21 13:17:43 +02:00
rustfmt.toml toot toot 2026-08-21 11:00:07 +02:00

Foghorn

Foghorn

A UnifiedPush distributor for Sailfish OS, using the Mozilla Push Service.

  • foghornd: systemd user service holding the push connection and the D-Bus interfaces.
  • foghorn: GUI, with service control, the list of registered apps and what each one has received.
  • foghorn-test-connector: optional subpackage for checking delivery.

Building

Needs Docker or Podman.

sfos/build.sh                # both arches, into RPMS/
sfos/deploy.sh               # install onto a running emulator
ARCH=aarch64 sfos/deploy.sh  # ... or a device

cargo test works on a normal Linux host. The Qt apps only build in the container.

Versions

As in indra and livewire, the whole version lives in RPM's Version field, from git describe:

built from RPM
the v0.1.0 tag foghorn-0.1.0-1
3 commits past it foghorn-0.1.0.3.g1a2b3c4-1
uncommitted changes ... with .dirty appended
--stable foghorn-0.1.0-1, straight from rpm/foghorn.spec

With no tags reachable, or no .git at all, the spec's own Version takes over rather than a bare commit hash: RPM would compare those in hash order, so half the newer builds would look like downgrades. sfos/build.sh --print-version shows what the next build would stamp, and FOGHORN_VERSION overrides it.

Releasing is a tag plus a --stable build:

# bump Version in rpm/foghorn.spec and `version` in foghorn/Cargo.toml,
# foghornd, foghorn-common and foghorn-test-connector, so the package and the
# app's About page agree
git tag -a v0.2.0 -m "Foghorn 0.2.0"
sfos/build.sh --stable --prune

Debugging

systemctl --user status foghornd
devel-su journalctl -f _SYSTEMD_USER_UNIT=foghornd.service
systemctl --user set-environment RUST_LOG=debug

Writing an app that uses Foghorn

See docs/connectors.md.

Why it exists

No Rust UnifiedPush distributor library exists, and KDE's kunifiedpush is Qt 6, which will not build against Sailfish's Qt 5.6. Foghorn implements the UnifiedPush D-Bus specification directly, using kunifiedpush as a reference implementation; docs/kunifiedpush-spec.md transcribes its behavior. Code the specification mandates is marked Spec:.

AI disclaimer

An AI wrote most of this code, and this README.

It worked from the UnifiedPush D-Bus specification and from docs/kunifiedpush-spec.md, which it produced by reading KDE's kunifiedpush. It copied no kunifiedpush code into Foghorn.

A human review is underway, editing where needed. It is not finished.

License

Foghorn is AGPL-3.0-or-later.

kunifiedpush is LGPL-2.0-or-later (Copyright 2022 Volker Krause). Foghorn uses none of its code, so that license does not reach this project. The verbatim excerpts quoted in docs/kunifiedpush-spec.md remain under it.