Name: meshbay-hub Version: __VERSION__ Release: 1%{?dist} Summary: MeshBay Hub — identity authority and group registry server License: AGPLv3+ URL: https://meshbay.org AutoReqProv: no BuildArch: noarch Requires: meshbay-common = %{version} Recommends: caddy Recommends: postgresql-server %description MeshBay Hub provides user registration, JWT issuance, group management, WebRTC signaling, notifications, and moderation for MeshBay networks. Installs hub code into the shared venv at /opt/meshbay-common/venv/. Runs as a systemd service behind Caddy for HTTPS. %install cp -a %{_staging_root}/* %{buildroot}/ %pre getent group meshbay >/dev/null || groupadd -r meshbay getent passwd meshbay >/dev/null || \ useradd -r -g meshbay -d /var/lib/meshbay -s /sbin/nologin \ -c "MeshBay service account" meshbay %post %systemd_post meshbay-hub.service install -d -o meshbay -g meshbay -m 750 /var/lib/meshbay/hub install -d -o meshbay -g meshbay -m 750 /var/log/meshbay # 750, not 755: this directory holds the hub's private key and its # database password. The file modes protect the contents, but a # world-listable config directory tells anyone with a shell what a # hub keeps and where. The service reads it by group. install -d -o root -g meshbay -m 750 /etc/meshbay %preun %systemd_preun meshbay-hub.service %postun %systemd_postun_with_restart meshbay-hub.service %files /opt/meshbay-hub /opt/meshbay-common/venv/lib/python*/site-packages/meshbay_hub/ /opt/meshbay-common/venv/lib/python*/site-packages/meshbay_hub-*.dist-info/ /opt/meshbay-common/venv/bin/meshbay-hub /usr/bin/meshbay-hub %{_unitdir}/meshbay-hub.service # The example config, and the directory it lands in. Both have to be declared: # build-hub.sh stages them, and rpmbuild fails the build on an installed file # no %files line claims. %config so an operator's edits are kept as .rpmsave # rather than silently replaced — it is under /etc, whatever its name says. # The mode matches %post; the `meshbay` group exists by then, %pre makes it. %dir %attr(0750, root, meshbay) /etc/meshbay %config %attr(0644, root, meshbay) /etc/meshbay/hub.toml.example %changelog * Sun Aug 31 2026 MeshBay Team - %{version}-1 - Packaging overhaul: installs into shared venv under /opt