From 7452d5b77e1036c43bc85b5b836ebd05a8e1e109 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 28 May 2026 15:53:51 +1000 Subject: [PATCH] fix(docker): add libolm-dev so matrix lazy-install can build python-olm Closes #25495 (matrix/synapse broken in the official docker image). `tools/lazy_deps.py` routes `platform.matrix` to `mautrix[encryption]==0.21.0`, which transitively depends on `python-olm`. `python-olm` is a Cython extension that links against `libolm`; without `libolm-dev` in the image's apt set the lazy-install build fails. Add `libolm-dev` to the runtime apt install line so the in-container source build succeeds on first matrix use. Salvages #27795 by @konsisumer. Their PR targeted a pre-rework Dockerfile (still had `build-essential nodejs npm` in the apt list, no `ca-certificates`); cherry-pick conflicts on incidental apt-list churn, so this re-applies the same one-word insert against the current apt line plus the matching pyproject.toml comment update. Co-authored-by: konsisumer <11262660+konsisumer@users.noreply.github.com> --- Dockerfile | 2 +- pyproject.toml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f04909cc10..10a4ff2acf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ ENV PLAYWRIGHT_BROWSERS_PATH=/opt/hermes/.playwright # hermes process, the dashboard, and per-profile gateways. RUN apt-get update && \ apt-get install -y --no-install-recommends \ - ca-certificates curl python3 python-is-python3 ripgrep ffmpeg gcc python3-dev libffi-dev procps git openssh-client docker-cli xz-utils && \ + ca-certificates curl python3 python-is-python3 ripgrep ffmpeg gcc python3-dev libffi-dev libolm-dev procps git openssh-client docker-cli xz-utils && \ rm -rf /var/lib/apt/lists/* # ---------- s6-overlay install ---------- diff --git a/pyproject.toml b/pyproject.toml index 327088d399..af4e2a98f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -197,7 +197,9 @@ all = [ # no native build path on Windows or modern macOS. With matrix in # [all], `uv sync --locked` on Windows tried to build it from sdist # and failed on `make`. Lazy-install routes that build to first use, - # where the user is expected to have a toolchain available. + # where the user is expected to have a toolchain available. The Docker + # image ships `libolm-dev` so the lazy-install can build python-olm + # from source in the container. "hermes-agent[cron]", "hermes-agent[cli]", "hermes-agent[dev]",