Skip to content

weechat: add new package - #30649

Open
BKPepe wants to merge 1 commit into
openwrt:masterfrom
BKPepe:weechat
Open

BKPepe wants to merge 1 commit into
openwrt:masterfrom
BKPepe:weechat

Conversation

@BKPepe

@BKPepe BKPepe commented Sep 28, 2026

Copy link
Copy Markdown
Member

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).
  • 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.

Run tested on Turris Omnia, mvebu, OpenWrt 24.10.

Copilot AI lite review requested due to automatic review settings September 28, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@openwrt openwrt Bot added the Add package label Sep 28, 2026
@BKPepe
BKPepe force-pushed the weechat branch 4 times, most recently from 15b5fa3 to 8c67a6b Compare September 28, 2026 22:31
@BKPepe
BKPepe force-pushed the weechat branch 2 times, most recently from 7c258b3 to adb0e5c Compare September 28, 2026 22:49
Comment thread net/weechat/files/weechat.init Outdated
Comment thread net/weechat/files/weechat.init
Comment thread net/weechat/test.sh Outdated
@BKPepe
BKPepe force-pushed the weechat branch 6 times, most recently from 8b4495b to 6602468 Compare September 28, 2026 23:31

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread net/weechat/files/weechat.init Outdated
@BKPepe
BKPepe force-pushed the weechat branch 2 times, most recently from 5fd5925 to 4cbd2f7 Compare September 29, 2026 07:42
Comment thread net/weechat/Makefile
Comment thread net/weechat/files/weechat.init Outdated
@BKPepe
BKPepe force-pushed the weechat branch 9 times, most recently from 5d32cea to 3b1ef01 Compare September 29, 2026 11:26
@BKPepe
BKPepe force-pushed the weechat branch 3 times, most recently from 5d44abf to 4d573ff Compare September 29, 2026 12:34
Comment thread net/weechat/test.sh Outdated
Comment thread net/weechat/test.sh
Comment thread net/weechat/test.sh Outdated
@BKPepe
BKPepe force-pushed the weechat branch 2 times, most recently from 47784b5 to 56752a2 Compare September 29, 2026 17:32
Comment thread net/weechat/test.sh
. /lib/functions.sh
# shellcheck disable=SC1091
. /etc/init.d/weechat
start_service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by Claude Code


Generated by Claude Code

Comment on lines +219 to +223
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: -h and -L are the same test, so the second one is redundant (line 216 already uses only -L).

Suggested change
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants