1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
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 <devel@meshbay.org> - %{version}-1
- Packaging overhaul: installs into shared venv under /opt
|