Bug 296495 - new port: dns/lightningstream: sync tool for the PowerDNS Authoritative Server
Summary: new port: dns/lightningstream: sync tool for the PowerDNS Authoritative Server
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-03 12:24 UTC by Jordan Ostreff
Modified: 2026-07-11 23:24 UTC (History)
2 users (show)

See Also:


Attachments
dns/lightningstream creation (23.33 KB, patch)
2026-07-03 12:24 UTC, Jordan Ostreff
no flags Details | Diff
dns/lightningstream creation (23.32 KB, patch)
2026-07-03 13:00 UTC, Jordan Ostreff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Ostreff 2026-07-03 12:24:45 UTC
Created attachment 272442 [details]
dns/lightningstream creation

Lightning Stream is a lightweight sync tool designed specifically for the
PowerDNS Authoritative Server when using the Lightning Memory-Mapped Database
(LMDB) backend.

It works by tracking changes made to a local LMDB file and efficiently
replicating them to and from an S3-compatible object storage service (such
as MinIO, Garage, or AWS S3). This enables seamless, near-real-time
masterless replication across multiple independent DNS nodes without
relying on traditional database clustering.

Key features include:
- Bi-directional sync with automatic conflict resolution based on timestamps
- Low resource footprint with snapshot-based diffs
- Support for multiple independent zones and native PowerDNS views

Usage notes:
- The port installs a sample configuration at:
  %%PREFIX%%/etc/lightningstream.yaml.sample
- Enable the service in /etc/rc.conf:
  lightningstream_enable="YES"
- Configuration needs to be adjusted to match your S3/Garage/Minio endpoint.

WWW: https://github.com/PowerDNS/lightningstream
Comment 1 Peter van Dijk 2026-07-03 12:49:03 UTC
you put the wrong LICENSE in
Comment 2 Jordan Ostreff 2026-07-03 13:00:22 UTC
Created attachment 272444 [details]
dns/lightningstream creation

fixed LICENSE
Comment 3 Peter van Dijk 2026-07-05 20:44:00 UTC
> Lightning Stream is a lightweight sync tool designed specifically for the
> PowerDNS Authoritative Server when using the Lightning Memory-Mapped Database
> (LMDB) backend.

Per https://doc.powerdns.com/lightningstream/latest/index.html

yes: "Our main target application is the sync of LMDB databases in the PowerDNS Authoritative Nameserver (PDNS Auth)."

but: "Its use is not limited to the PowerDNS Authoritative server, however. Lightning Stream does not make any assumptions about the contents of the LMDB, and can be used to sync LMDBs for other applications, as long as the data is stored using a compatible schema."
Comment 4 Brad Ackerman 2026-07-11 22:16:58 UTC
I think databases is a better fit per Peter's comment.

Fails to build in poudriere:

===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Building for lightningstream-1.0.0
===>  Regenerating vendor/modules.txt
env: go: No such file or directory
*** Error code 127
Comment 5 Brad Ackerman 2026-07-11 23:24:44 UTC
The Makefile uses a bare "go" instead of ${GO_CMD}.

go mod vendor needs to be pointed at the packages obtained during the download phase, so it should have GOPROXY=${GO_MODCACHE} instead of off. And adding GOCACHE=${WRKDIR}/gocache to GOENV is required to initialize the build cache.

But then we've still got:

go: could not create module cache: mkdir /portdistfiles/go: permission denied

That error comes from from go's src/cmd/go/internal/modfetch/cache.go:837, and we find that mounts are being rearranged between the download and build phases.