runv-server

server tooling for runv.club
Log | Files | Refs | README

commit ed97deb1e348c8786bd6c080db00374127f59866
parent d6ab5efcf02d0de615a856434cbe7724a079caf7
Author: Pablo Murad <pablo@pablomurad.com>
Date:   Sun, 22 Mar 2026 18:54:51 -0300

documentação: still-1-1

Diffstat:
Mdocs/05-tools-and-system-experience.md | 2+-
Mpatches/patch_irc.py | 7++++++-
Mtools/bin/chat | 12+++++++++++-
Mtools/manifests/apt_packages.txt | 3+++
4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/docs/05-tools-and-system-experience.md b/docs/05-tools-and-system-experience.md @@ -6,7 +6,7 @@ **Função:** orquestrar no servidor Debian: -1. Pacotes APT listados em `tools/manifests/apt_packages.txt` (alias `chat` → pacote `weechat`). +1. Pacotes APT listados em `tools/manifests/apt_packages.txt` (alias `chat` → metapacote `weechat`). O manifesto inclui **`weechat-curses`** explicitamente porque `tools.py` usa `apt-get install --no-install-recommends`: sem isso, o metapacote `weechat` pode satisfazer-se **só** com `weechat-headless` e o comando `chat` deixa de encontrar cliente interactivo (`weechat` / `weechat-curses` no PATH). 2. Cópia de `tools/bin/` para `/usr/local/bin` (`runv-help`, `runv-links`, `runv-status`, `chat`, …). 3. MOTD dinâmico: `tools/motd/60-runv` → `/etc/update-motd.d/60-runv`. 4. Modelos para novas contas: `tools/skel/` → `/etc/skel/`. diff --git a/patches/patch_irc.py b/patches/patch_irc.py @@ -132,7 +132,12 @@ for c in weechat weechat-curses; do command -v "$c" >/dev/null 2>&1 && IRC_UI=$c && break done if [ -z "$IRC_UI" ]; then - echo "runv: cliente IRC interactivo não encontrado; corra tools/tools.py." >&2 + for p in /usr/bin/weechat-curses /usr/bin/weechat; do + [ -x "$p" ] && IRC_UI=$p && break + done +fi +if [ -z "$IRC_UI" ]; then + echo "runv: instale weechat-curses (apt) ou corra tools/tools.py." >&2 exit 127 fi CONFIG_DIR="${WEECHAT_HOME:-$HOME/.config/weechat}" diff --git a/tools/bin/chat b/tools/bin/chat @@ -10,9 +10,19 @@ for c in weechat weechat-curses; do break fi done +# Fallback se PATH estiver estranho mas o pacote Debian estiver instalado +if [ -z "$IRC_UI" ]; then + for p in /usr/bin/weechat-curses /usr/bin/weechat; do + if [ -x "$p" ]; then + IRC_UI=$p + break + fi + done +fi if [ -z "$IRC_UI" ]; then - echo "runv: cliente IRC interactivo não encontrado; peça ao admin para correr tools/tools.py (pacotes globais)." >&2 + echo "runv: cliente IRC interactivo não encontrado (instale o pacote weechat-curses)." >&2 + echo "runv: no servidor: sudo apt install -y weechat-curses ou sudo python3 tools/tools.py" >&2 exit 127 fi diff --git a/tools/manifests/apt_packages.txt b/tools/manifests/apt_packages.txt @@ -10,6 +10,9 @@ jailkit byobu tmux lynx +# IRC: o metapacote «chat»→weechat pode resolver só com weechat-headless (já listado abaixo) +# quando apt usa --no-install-recommends em tools.py — sem cliente interactivo no PATH. +weechat-curses chat weechat-headless mutt