23 Commits
Author SHA1 Message Date
Stefan-Sanger c64346e283 fix: copy vnc_fcm_common.lua to prosody lib root so require works
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/11>
2026-07-22 15:43:40 +02:00
Stefan-Sanger 0fbcd183e3 fix: install lua-unbound to silence DNS resolver fallback warning
Prosody 13 prefers lua-unbound for DNS but the image never installed it,
causing a startup warning and a fallback to the old resolver.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/4>
2026-07-15 19:34:59 +02:00
Stefan-Sanger e1c78e7358 feat: add pre-upgrade and post-upgrade DB migration hooks
Dockerfile: add postgresql-client and bake db-customization/ SQL scripts
into the image at /vnc/db-customization/.

config/migrate.sh: detection + migration script with two modes:
- pre-upgrade: runs idempotent prosody-13-new-deployment.sql on 13.0.x
  databases; skips 0.11.6 (unsafe pre-upgrade) and new deployments.
- post-upgrade: waits for Prosody table, then runs the appropriate
  scripts — full 0.11.6->13.0.6 migration (rules-triggers + migration-once
  + new-deployment) or idempotent drift correction for 13.0.x.

Helm chart: two Job templates (db-migration-pre-upgrade.yaml,
db-migration-post-upgrade.yaml) gated by dbMigration.enabled (default
true). Both reuse the Prosody image and DB credentials from existing
values. backoffLimit: 0, hook-delete-policy: hook-succeeded.

Also tracks the db-customization SQL files (previously untracked, now
referenced by the Dockerfile ADD).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:09 +02:00
Stefan-Sanger efa6e73364 fix: pin http-server sidecar version
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 5dca59c4c1 fix(dockerfile): verify prosody source tarball SHA256 on download
Pin the version and expected SHA256 as build ARGs and verify the
download with sha256sum -c so a tampered or corrupt source download
fails the build loudly. Also drops the noisy tar -v and removes the
tarball after extraction.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 26e7512b24 feat: upgrade Prosody 0.12.6 → 13.0.6 (milestone 3)
Bump Dockerfile to prosody-13.0.6; all 8 patches re-ported against 13.0.6.

Re-ported patches (3 changed, 5 applied with offset):
- hidden.lib.patch: 13.0 uses module:may() instead of um_is_admin; changed
  to 'if restrict_public then' (same intent: hide option for everyone)
- mod_muc.patch: 13.0 added restrict_pm between register and
  presence_broadcast; updated hunk 1 context
- mod_muc_unique.patch: 13.0 uses 'require "prosody.util.stanza"'
  (namespaced); updated context
- muc.lib, mod_carbons, mod_mam, mod_muc_mam, register.lib: applied
  with line offsets, no re-port needed

Config changes:
- Remove mod_posix from modules_enabled (13.0 absorbed signal handling,
  pidfile, and run_as_root check into core util/startup.lua)
- Move pubsub from modules_enabled to Component (13.0 requires pubsub
  to be loaded as a component, not a module)

Test fix:
- test_muc_fcm_push_to_offline_member: wait for count=2 captures instead
  of 1 — mod_vnc_muc_fcm pushes to ALL affiliated members (including
  sender, because it can't see main-host sessions from the MUC
  component); the test was racing on which push arrived first

Verified: prosodyctl check config passes; compose-harness testsuite
green (80 passed, 6 skipped, 0 failed).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger bce258107e feat: upgrade Lua 5.2 → 5.4 (milestone 2)
Swap all lua5.2-* Alpine packages to lua5.4-* in both Dockerfile stages
and add --lua-version=5.4 to ./configure.

Dropped packages:
- lua5.2-bitop: Prosody's util.bitcompat uses util.bit53 (native Lua
  5.3/5.4 bitwise operators) when bit32 is unavailable
- lua5.2-lpeg_patterns, lua5.2-rapidjson, lua5.2-redis: not required by
  any require in Prosody 0.12.6 or any vnctalk module
- luarocks5.2: installed but never used
- Duplicate lua5.2-socket entry: removed

Code audit for 5.2→5.4 breakage: clean.
- No bit32/bitop usage in vnctalk modules
- Every Prosody file using unpack has 'local unpack = table.unpack or
  unpack' (resolves to table.unpack on 5.4)
- No string.format('%d', float) patterns in vnctalk modules

Verified: image builds, prosodyctl check config passes, compose-harness
testsuite green (80 passed, 5 skipped — identical to M1).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-SangerandClaude Fable 5 bdb9aed9e3 feat: upgrade prosody 0.11.6 -> 0.12.6 (milestone 1)
Re-port all source patches onto 0.12.6; three are gone entirely:
moduleapi (the two vnc_muc_fcm modules call core.storagemanager
directly now), mod_admin_telnet and portmanager (replaced by
console_interfaces/http_interfaces config). The muc.lib fork keeps its
four functional changes including the externally consumed
muc-config-sub-mitted event; the operator-precedence hunk was fixed
upstream. mod_muc_mam shrinks to keep-archive-on-room-destroy since
muc_log_expires_after="never" disables cleanup upstream in 0.12.

Delete the bundled mod_smacks fork and the no-op mod_smacks_offline;
core 0.12 smacks supersedes them (options audited, dead smacks_max_old
corrected to smacks_max_old_sessions).

Config/startup: drop legacyauth, run_as_root, daemonize; bosh_ports ->
http_ports; cross_domain_* -> http_cors_override; randomize
component_secret at startup (env-overridable); export
log_slow_events_threshold fallback (latent render bug).

Found while smoke-testing: pin --idn-library=idn (0.12's ICU default
segfaults without ICU data in the image); http became a private
service in 0.12 so 5280 needs http_interfaces to stay public; the
telnet console now depends on mod_admin_socket, whose socket moves to
/var/log/prosody.

Verified: prosodyctl check config clean; boots against Postgres with
empty error log and same port bindings as 0.11; healthcheck green;
telnet console and SQL storage round-trip; 0.11->0.12 schema upgrade
rehearsed on a 0.11-created database with data intact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-SangerandClaude Fable 5 2552a58872 refactor: convert prosody patches from full-file copies to unified diffs
Phase 0 of upgrade-plan.md. The 11 forked copies of 0.11.6 files in
patches/ are replaced by unified .patch files applied in the Dockerfile
builder stage with patch -p1 --fuzz=0 before make install, so upstream
drift fails the build instead of silently shipping stale forks. The
cp-over-installed-files block in the final stage is gone and /vnc/patches
no longer ships in the image. Stale patches.list replaced by a README
documenting each patch's intent.

Verified: installed prosody tree (269 files) is byte-identical to the
image built from the previous mechanism.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger ae38d51dc6 fix: upgrade alpine base image
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/1>
2026-06-08 10:04:47 +02:00
Stefan-Sanger abea16205a fix: basic rootless execution, optimize container image size
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/1>
2026-06-08 09:18:18 +02:00
Stefan-Sanger 69530927ee fix: prepare cert automation 2025-06-18 07:43:18 +02:00
Stefan-Sanger 69c0d38a83 fix: typo 2025-06-16 12:34:41 +02:00
Stefan-Sanger bf0f574963 fix: add nginx to build 2025-06-16 12:14:10 +02:00
Stefan-Sanger 06f2766078 fix: cleanup debugging 2023-10-09 08:52:35 +02:00
Stefan-Sanger 04b6cbbb67 fix: add pep log for omemo debug 2023-10-08 08:40:00 +02:00
Stefan-Sanger 28fbba3782 fix: add mountpoint dir for cert 2023-07-02 06:14:02 +02:00
Stefan-Sanger d8002fd380 fix: import upstream mod to add debug info 2022-10-19 11:24:23 +02:00
Stefan-Sanger 974994a52f fix: add htop 2022-10-18 21:28:54 +02:00
Stefan-Sanger 94d16527f9 fix: logging 2022-09-15 08:13:00 +02:00
Stefan-Sanger 7e9ea9ff95 fix: env and logging 2022-09-15 07:10:03 +02:00
Stefan-Sanger a63e6b8d4b fix: add patch for private and public rooms 2022-09-15 05:31:53 +02:00
Stefan-Sanger 7601143bad fix: initial dockerbuild of current prosody for alpine 2022-09-05 06:50:25 +02:00