weechat: add new package - #30649
weechat: add new package#30649BKPepe wants to merge 1 commit into
Conversation
15b5fa3 to
8c67a6b
Compare
7c258b3 to
adb0e5c
Compare
8b4495b to
6602468
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- 6602468 "weechat: add new package" — also deletes the top-level
README.md, which is unrelated to the package and not mentioned in the message; drop that hunk from the commit.
Generated by Claude Code
5fd5925 to
4cbd2f7
Compare
5d32cea to
3b1ef01
Compare
5d44abf to
4d573ff
Compare
47784b5 to
56752a2
Compare
| . /lib/functions.sh | ||
| # shellcheck disable=SC1091 | ||
| . /etc/init.d/weechat | ||
| start_service |
There was a problem hiding this comment.
rc.common isn't sourced here, so procd_open_instance/procd_set_param/procd_close_instance are undefined, and start_service returns 127 even if the relay validation is removed. As written, this check (and the one at line 144) can't fail. Stub the procd helpers so that only the validation can make it return non-zero.
| start_service | |
| procd_open_instance() { :; } | |
| procd_set_param() { :; } | |
| procd_close_instance() { :; } | |
| start_service |
Generated by Claude Code
WeeChat (Wee Enhanced Environment for Chat) is a fast, light and extensible chat client with a modular architecture and relay support. This package provides: - weechat-minimal (default variant): headless background daemon without ncurses dependency, suited for embedded routers and headless operation via relay web or mobile clients. - weechat-full: terminal ncurses UI client as well as the headless daemon. - Config.in: menuconfig options for zstd, cJSON, and scripting plugins (Python, Lua, Ruby, Perl, Tcl). - procd init script and UCI configuration: supports declarative relay and IRC server provisioning, service triggers, and protects flash storage by disabling disk logging by default. - test.sh: functional runtime test verifying binaries, essential plugins, command-line options, and clean termination. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
| if [ ! -d "$CONFIG_DIR/tls" ]; then | ||
| mkdir -p "$CONFIG_DIR/tls" || return 1 | ||
| chmod 0755 "$CONFIG_DIR/tls" || return 1 | ||
| chown root:root "$CONFIG_DIR/tls" || return 1 | ||
| fi |
There was a problem hiding this comment.
Root ownership is only applied when the directory is missing, so a tls/ that already exists as a weechat-owned directory stays that way. That covers earlier installs, and also the weechat user renaming tls/ inside its own $CONFIG_DIR and creating a new one. Apply chmod/chown on every start.
| if [ ! -d "$CONFIG_DIR/tls" ]; then | |
| mkdir -p "$CONFIG_DIR/tls" || return 1 | |
| chmod 0755 "$CONFIG_DIR/tls" || return 1 | |
| chown root:root "$CONFIG_DIR/tls" || return 1 | |
| fi | |
| mkdir -p "$CONFIG_DIR/tls" || return 1 | |
| chmod 0755 "$CONFIG_DIR/tls" || return 1 | |
| chown root:root "$CONFIG_DIR/tls" || return 1 |
Generated by Claude Code
| fi | ||
|
|
||
| # Ensure volatile cache and runtime directories | ||
| if [ -L /tmp/weechat ] || [ -h /tmp/weechat ] || { [ -e /tmp/weechat ] && [ ! -d /tmp/weechat ]; }; then |
There was a problem hiding this comment.
nit: -h and -L are the same test, so the second one is redundant (line 216 already uses only -L).
| if [ -L /tmp/weechat ] || [ -h /tmp/weechat ] || { [ -e /tmp/weechat ] && [ ! -d /tmp/weechat ]; }; then | |
| if [ -L /tmp/weechat ] || { [ -e /tmp/weechat ] && [ ! -d /tmp/weechat ]; }; then |
Generated by Claude Code
WeeChat (Wee Enhanced Environment for Chat) is a fast, light and extensible chat client with a modular architecture and relay support.
Features in this package:
weechat-minimal(default variant): headless background daemon without ncurses dependency, ideal for embedded routers and headless operation via relay web/mobile clients.weechat-full: terminal ncurses UI client as well as the headless daemon.Config.in: menuconfig options for zstd, cJSON, and scripting plugins (Python, Lua, Ruby, Perl, Tcl).test.sh: functional runtime test verifying binaries, essential plugins, command-line options, and clean termination.Run tested on Turris Omnia, mvebu, OpenWrt 24.10.