summaryrefslogtreecommitdiffhomepage
path: root/packaging/s6/dispatch-api-log
AgeCommit message (Collapse)Author
2026-05-29fix(packaging): add notification-fd to dispatch-s6 loggersAdam Malczewski
The dispatch-{api,frontend}-log run scripts invoke `s6-log -d3` (send a readiness notification on fd 3), but the service dirs lacked a notification-fd file, so s6-supervise never opened fd 3. s6-log aborted with "invalid notification fd: Bad file descriptor" (exit 100) and crash-looped, so nothing drained the producer's stdout pipe. The API then filled its 64KB stdout pipe and blocked in write() before reaching listen(), so port 18390 never opened and the frontend could not reach the backend (the frontend survived only because it logs almost nothing). Add notification-fd=3 to both logger service dirs and install them via PKGBUILD, matching every other logger on the system. This also makes s6-rc bring the logger up ready-first, preventing the pipe-fill race.
2026-05-27refactor(packaging): split into dispatch/dispatch-systemd/dispatch-s6, ↵Adam Malczewski
separate dispatch-electron, add bun-based frontend serve PKGBUILD is now a split package producing three .pkg.tar.zst files in one makepkg run: - dispatch base application files (/opt/dispatch), CLI wrappers (dispatch-api, dispatch-frontend), env configs (/etc/dispatch/dispatch-api.conf, /etc/dispatch/dispatch-frontend.conf) - dispatch-systemd systemd user units for dispatch-api + dispatch-frontend (conflicts with dispatch-s6) - dispatch-s6 s6-rc service pipelines (-srv + -log) for both services (conflicts with dispatch-systemd) The Electron desktop wrapper moved to its own self-contained PKGBUILD at packaging/electron/, producing dispatch-electron. It bundles its own copy of the frontend dist + electron entry points under /opt/dispatch-electron and does not depend on the base dispatch package, so users can install it standalone and point VITE_API_URL at any backend at build time. Files under packaging/ are now read directly from ${_projectdir}/packaging/ rather than via source=(); the two s6 service dirs share basenames (run, type) which would collide inside ${srcdir}. New frontend static server: packages/frontend/serve.ts uses Bun's built-in HTTP server (no extra runtime deps) with SPA fallback to index.html and path-traversal protection. PORT/HOST/DIST_DIR overridable via env. Exposed as 'bun run --cwd packages/frontend serve' and via /usr/bin/dispatch-frontend. Build scripts: - bin/build-pkg now prints the freshest built packages - bin/install-pkg installs dispatch + dispatch-systemd by default; accepts package names or --all; searches both packaging/ and packaging/electron/ - bin/build-pkg-electron new, builds the electron split - bin/build-pkg-windows replaces bin/windows-pkg; drops the hard-coded WSL copy step, just prints the win-unpacked path .gitignore extended to cover packaging/*.tar.zst and packaging/electron/{src,pkg,*.pkg.tar.zst,*.tar.zst}.