diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-09 05:19:13 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-09 05:19:13 +0200 |
| commit | deee67755991994742ef144400857dd5f6b8aafa (patch) | |
| tree | 1daf5196d03046d7c33bc4ec00480ccf66289bc6 /packaging/README.md | |
| parent | 42556800d103ede20b4e97f2d91d20bbc0000c1e (diff) | |
| download | meshbay-deee67755991994742ef144400857dd5f6b8aafa.tar.gz | |
chore: add RPM/DEB packaging artifacts — 5.10
3 packages: python3-meshbay-common (dep), meshbay-hub, meshbay-node.
RPM: spec files with pre/post scriptlets (useradd, systemd macros).
DEB: DEBIAN/control + postinst for hub, control for node + common.
Systemd: hub.service (system, security hardening) + node.service
(user template @%i, EnvironmentFile for MESHBAY_UNLOCK_KEY).
packaging/README.md: build + install instructions.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'packaging/README.md')
| -rw-r--r-- | packaging/README.md | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/packaging/README.md b/packaging/README.md new file mode 100644 index 0000000..2e31b7f --- /dev/null +++ b/packaging/README.md @@ -0,0 +1,80 @@ +# MeshBay — Packaging + +Three distributable packages: + +| Package | RPM spec | DEB control | Description | +|---|---|---|---| +| `python3-meshbay-common` | `rpm/python3-meshbay-common.spec` | `deb/python3-meshbay-common/` | Shared crypto + protocol lib | +| `meshbay-hub` | `rpm/meshbay-hub.spec` | `deb/meshbay-hub/` | Hub server (FastAPI + PostgreSQL) | +| `meshbay-node` | `rpm/meshbay-node.spec` | `deb/meshbay-node/` | Node daemon + local UI | + +## Building RPMs (Fedora/RHEL) + +```bash +# Install build tools +sudo dnf install -y rpm-build python3-pip + +# Build all three packages +for pkg in python3-meshbay-common meshbay-hub meshbay-node; do + rpmbuild -ba packaging/rpm/${pkg}.spec +done +``` + +## Building DEBs (Debian/Ubuntu) + +```bash +# Install build tools +sudo apt install -y dpkg-dev debhelper python3-pip + +# Build common library first (dependency) +dpkg-deb --build packaging/deb/python3-meshbay-common +dpkg-deb --build packaging/deb/meshbay-hub +dpkg-deb --build packaging/deb/meshbay-node + +# Install +sudo dpkg -i python3-meshbay-common_0.1.0_all.deb +sudo dpkg -i meshbay-hub_0.1.0_all.deb +sudo dpkg -i meshbay-node_0.1.0_all.deb +``` + +## Install order + +Always install `python3-meshbay-common` first (dependency of both hub and node). + +## Post-install (hub) + +```bash +# Generate hub keypair +sudo -u meshbay meshbay-hub --generate-keys + +# Edit config +sudo nano /etc/meshbay/hub.toml + +# Configure Caddy for HTTPS +sudo nano /etc/caddy/Caddyfile + +# Start +sudo systemctl enable --now meshbay-hub +``` + +## Post-install (node) + +```bash +# Initialize node (writes example config) +meshbay-node init + +# Edit config +nano ~/.config/meshbay/node.toml + +# Start as user service +systemctl --user enable --now meshbay-node +``` + +## Systemd service files + +| File | Location | +|---|---| +| `systemd/meshbay-hub.service` | `/usr/lib/systemd/system/meshbay-hub.service` | +| `systemd/meshbay-node.service` | `/usr/lib/systemd/user/meshbay-node.service` | + +The node service is a **user service** (runs as the user's own account, with access to their home directory). The hub is a **system service** (runs as the `meshbay` system account). |