# Template: scripts/gen-spec.sh ('make gen-spec') fills in the version, the # commit and the changelog. Do not build this file directly. %global units node-tracker.service node-tracker-once.service node-tracker-once.timer node-tracker-report.service node-tracker-report.timer # Offline build with the vendored modules and the distro's Go. No -trimpath: # the debugsource package needs the source paths. %global goenv GOFLAGS=-mod=vendor GOPROXY=off GOTOOLCHAIN=local CGO_ENABLED=0 Name: node-tracker Version: 1.3.0 Release: 1%{?dist} Summary: Alert when a Bitcoin node falls behind the chain tip License: GPL-3.0-only URL: https://github.com/al-maisan/node-tracker # The tagged tree plus the vendored modules, from scripts/src-tarball.sh. Source0: node-tracker-%{version}.tar.gz # From the checkout (scripts/srpm.sh), so they also work for older tags. Source1: install-units.sh Source2: node-tracker.sysusers BuildRequires: golang >= 1.26 BuildRequires: systemd-rpm-macros %description node-tracker compares a Bitcoin node's block height with independent views of the chain (mempool.space, blockstream.info or other nodes) and sends a Telegram message when the node falls behind, and another when it catches up. Alerts are debounced and queued until they are delivered. It runs as a daemon, from a systemd timer or cron, or by hand. The package ships systemd system and user units and creates the node-tracker system user; no unit is enabled or started. %prep %autosetup # The binary links go-yaml (MIT and Apache-2.0). cp -p vendor/go.yaml.in/yaml/v3/LICENSE LICENSE.go-yaml cp -p vendor/go.yaml.in/yaml/v3/NOTICE NOTICE.go-yaml %build # Build time = changelog date, so a rebuild gives the same binary. build_time=$(date -u -d "@${SOURCE_DATE_EPOCH:?}" +%%Y-%%m-%%dT%%H:%%M:%%SZ) %{goenv} go build -ldflags "-X main.version=v%{version} -X main.commit=8d2d512 -X main.buildTime=$build_time" \ -o bin/node-tracker ./cmd/node-tracker %check # The integration tests need bitcoind and are not built without their tag. %{goenv} go test ./... %install install -Dpm 0755 bin/node-tracker %{buildroot}%{_bindir}/node-tracker install -Dpm 0644 -t %{buildroot}%{_docdir}/%{name} README.md install -Dpm 0644 -t %{buildroot}%{_docdir}/%{name}/assets assets/* install -Dpm 0644 -t %{buildroot}%{_docdir}/%{name}/docs docs/*.md install -Dpm 0644 -t %{buildroot}%{_docdir}/%{name}/examples examples/config.yaml install -Dpm 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/node-tracker.conf bash %{SOURCE1} deploy/systemd %{buildroot}%{_unitdir} %{buildroot}%{_userunitdir} # The binary, and the man page if the tag has one (v1.0.0 has none; an # empty file list is an error). The placeholders are spelled @VERSION[@] # here, so gen-spec.sh leaves them alone. echo '%{_bindir}/node-tracker' >bin.files if [ -f node-tracker.1 ]; then man_date=$(date -u -d "@${SOURCE_DATE_EPOCH:?}" +%%Y-%%m-%%d) install -d %{buildroot}%{_mandir}/man1 sed -e "s/@VERSION[@]/%{version}/g" -e "s/@DATE[@]/$man_date/g" node-tracker.1 >%{buildroot}%{_mandir}/man1/node-tracker.1 echo '%{_mandir}/man1/node-tracker.1*' >>bin.files fi # Presets, not enable: Fedora's default preset leaves the units disabled. %post %systemd_post %{units} %systemd_user_post %{units} %preun %systemd_preun %{units} %systemd_user_preun %{units} %postun # An upgrade restarts the running units, like the deb. %systemd_postun_with_restart %{units} %systemd_user_postun %{units} %files -f bin.files %license LICENSE LICENSE.go-yaml NOTICE.go-yaml %{_docdir}/%{name}/ %{_sysusersdir}/node-tracker.conf %{_unitdir}/node-tracker* %{_userunitdir}/node-tracker* %changelog * Mon Nov 02 2026 Muharem Hrnjadovic - 1.3.0-1 - design: root's setup reads other users' bitcoind processes (#89) - setup: clear Telegram step; keep the config's bot and chat, existing bot, chat menu (#88) - sudo setup: point at a user's bitcoind, found from its process; docs: system or user service (#87) - Docs: fix what drifted from the code (#84) - README, operations: the tracker name for several trackers (#83) * Sun Nov 01 2026 Muharem Hrnjadovic - 1.2.0-1 - README: concise, install details to docs/install.md; fresh demo GIF (#82) - Tracker name in front of every message: config name, setup -tracker-name (#81) * Sun Nov 01 2026 Muharem Hrnjadovic - 1.1.1-1 - README: link the PPA and COPR in the install line (#80) - down_for: Tor docs, setup explains it and takes -down-for; proxy examples (#79) - Logo: NODETRACKER follows the shield outline, split NODET | RACKER at the tip (#78) - alert.down_for: NODE_DOWN can wait longer than LAGGING, e.g. for a node over Tor (#76) (#77) - bitcoind: resend the RPC call on a stale kept-alive connection (#74) (#75) - Logo: NT shield above a chain of blocks, light and dark (#73) - Container image on ghcr.io (#35) (#72) - README: install from the Ubuntu PPA and Fedora COPR (#71) - pkg-changelog: read the releases with curl, no gh needed for make ppa/copr (#70) * Sun Nov 01 2026 Muharem Hrnjadovic - 1.1.0-1 - README: the .deb first for Debian, Ubuntu and Raspberry Pi OS (#59) (#69) - config: a proxy on a plain-http endpoint must be loopback, as for .onion (#68) - setup: right defaults for node boxes; a way past an unreachable Telegram; proxy: for notifiers (#56, #57) (#67) - Plain error messages in alerts, check and test-notify (#58, #60, #62 L1) (#66) - Hardening: cookie path in errors, root setup paths, no .bak of secrets, *_env warning (#62) (#65) - A reference on the node's host answering alone is NO_REFERENCE, not OK (#61) (#64) - README: verify a release in 3 steps; brew services after check (#59) (#63) - Logo: add the name node-tracker (#54) (#55) - Example config and docs fixes; rpm upgrades restart running units (#38) (#53) - Release .deb for amd64, arm64 and armhf in make dist (#29) (#51) - node-tracker setup: interactive wizard that writes, tests and installs the config (#23) (#52) - Auto-detect the local bitcoind; default references, alert and notify (#48) - Homebrew: brew services support (#33) (#40) - README: point to the easiest install options at the top (#38) (#50) - config: never echo a secret pasted into a *_file, *_env or cookie_file field (#47) (#49) - Friendlier YAML errors, a no-config hint, a missing cookie is a warning (#32) (#46) - Config path: ~/.config on every OS, macOS included (#28) (#45) - docs: node boxes: Umbrel, StartOS, RaspiBlitz, myNode (#37) (#42) - docs: create the RPC onion service on the node (#36) (#41) - check: a verdict at the end and hints for NODE_DOWN (#31) (#44) - version: no "unknown" for go install builds (#34) (#43) - Man page node-tracker.1 (#24) (#39) - node-tracker install-service: write and enable the systemd unit (#22) (#27) - Per-endpoint proxy, with Tor defaults for .onion URLs (#20) (#26) - Fedora COPR package (#14) (#19) - Config errors show the rejected value, redacted, with hints (#21) (#25) - Ubuntu PPA package (#13) (#18) - docs: Tor section in operations.md (#17) - README: screenshot of a real Telegram alert (#2) (#16) - README: demo GIF of check, test-notify and once raising an alert (#15) * Sun Nov 01 2026 Muharem Hrnjadovic - 1.0.0-1 - Homebrew formula for al-maisan/tap, written by make release (#4) (#12) - Logo: light/dark SVG in the README and the release archives (#11) - Release archives and signed SHA256SUMS (#10) - node-tracker v1: alert when a Bitcoin node falls behind the chain tip (#9) - Initial commit