public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/matrix-synapse] rawhide: Update to 0.159
@ 2026-08-27 18:53 Xavier Bachelot
  0 siblings, 0 replies; only message in thread
From: Xavier Bachelot @ 2026-08-27 18:53 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/matrix-synapse
Branch : rawhide
Commit : c13a7c22afd52f3ad6c9fba024a0b8326a7ce824
Author : Xavier Bachelot <xavier@bachelot.org>
Date   : 2026-08-27T20:44:01+02:00
Stats  : +317/-110 in 8 file(s)
URL    : https://src.fedoraproject.org/rpms/matrix-synapse/c/c13a7c22afd52f3ad6c9fba024a0b8326a7ce824?branch=rawhide

Log:
Update to 0.159

---
diff --git a/0001-pyo3-Disable-abi3-feature.patch b/0001-pyo3-Disable-abi3-feature.patch
deleted file mode 100644
index c2da764..0000000
--- a/0001-pyo3-Disable-abi3-feature.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From bbe5c1e519aa300ba6316307a94478dd82908464 Mon Sep 17 00:00:00 2001
-From: "Kai A. Hiller" <V02460@gmail.com>
-Date: Fri, 8 Sep 2023 14:10:56 +0200
-Subject: [PATCH 1/2] pyo3: Disable abi3 feature
-
-Fedora does not require compatibility with Python versions different to
-the one at compile time.
----
- build_rust.py   | 22 ++--------------------
- rust/Cargo.toml |  2 --
- 2 files changed, 2 insertions(+), 22 deletions(-)
-
-diff --git a/build_rust.py b/build_rust.py
-index a9e9265daf..65d9ac301d 100644
---- a/build_rust.py
-+++ b/build_rust.py
-@@ -1,10 +1,8 @@
- # A build script for poetry that adds the rust extension.
- 
--import itertools
- import os
- from typing import Any
- 
--from packaging.specifiers import SpecifierSet
- from setuptools_rust import Binding, RustExtension
- 
- 
-@@ -16,27 +14,11 @@ def build(setup_kwargs: dict[str, Any]) -> None:
-         target="synapse.synapse_rust",
-         path=cargo_toml_path,
-         binding=Binding.PyO3,
--        # This flag is a no-op in the latest versions. Instead, we need to
--        # specify this in the `bdist_wheel` config below.
--        py_limited_api=True,
-+        # This flag is a no-op in the latest versions.
-+        py_limited_api=False,
-         # We always build in release mode, as we can't distinguish
-         # between using `poetry` in development vs production.
-         debug=False,
-     )
-     setup_kwargs.setdefault("rust_extensions", []).append(extension)
-     setup_kwargs["zip_safe"] = False
--
--    # We look up the minimum supported Python version with
--    # `python_requires` (e.g. ">=3.10.0,<4.0.0") and finding the first Python
--    # version that matches. We then convert that into the `py_limited_api` form,
--    # e.g. cp310 for Python 3.10.
--    py_limited_api: str
--    python_bounds = SpecifierSet(setup_kwargs["python_requires"])
--    for minor_version in itertools.count(start=10):
--        if f"3.{minor_version}.0" in python_bounds:
--            py_limited_api = f"cp3{minor_version}"
--            break
--
--    setup_kwargs.setdefault("options", {}).setdefault("bdist_wheel", {})[
--        "py_limited_api"
--    ] = py_limited_api
-diff --git a/rust/Cargo.toml b/rust/Cargo.toml
-index 8199a4e02b..9eae4cc297 100644
---- a/rust/Cargo.toml
-+++ b/rust/Cargo.toml
-@@ -33,8 +33,6 @@ mime = "0.3.17"
- pyo3 = { version = "0.27.2", features = [
-     "macros",
-     "anyhow",
--    "abi3",
--    "abi3-py310",
-     # So we can pass `bytes::Bytes` directly back to Python efficiently,
-     # https://docs.rs/pyo3/latest/pyo3/bytes/index.html
-     "bytes",
--- 
-2.53.0
-

diff --git a/0002-Build-RustExtension-with-debug-symbols.patch b/0002-Build-RustExtension-with-debug-symbols.patch
deleted file mode 100644
index 68f2198..0000000
--- a/0002-Build-RustExtension-with-debug-symbols.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6452deb91594dd1ba8b2ed27e937033110c19f54 Mon Sep 17 00:00:00 2001
-From: "Kai A. Hiller" <V02460@gmail.com>
-Date: Wed, 29 Mar 2023 12:28:31 +0200
-Subject: [PATCH 2/2] Build RustExtension with debug symbols
-
----
- build_rust.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/build_rust.py b/build_rust.py
-index 65d9ac301d..ecc98a5ec8 100644
---- a/build_rust.py
-+++ b/build_rust.py
-@@ -3,7 +3,7 @@
- import os
- from typing import Any
- 
--from setuptools_rust import Binding, RustExtension
-+from setuptools_rust import Binding, RustExtension, Strip
- 
- 
- def build(setup_kwargs: dict[str, Any]) -> None:
-@@ -19,6 +19,7 @@ def build(setup_kwargs: dict[str, Any]) -> None:
-         # We always build in release mode, as we can't distinguish
-         # between using `poetry` in development vs production.
-         debug=False,
-+        strip=Strip.No,
-     )
-     setup_kwargs.setdefault("rust_extensions", []).append(extension)
-     setup_kwargs["zip_safe"] = False
--- 
-2.51.1
-

diff --git a/matrix-synapse-1.151.0-no_parameterized.patch b/matrix-synapse-1.151.0-no_parameterized.patch
new file mode 100644
index 0000000..afd609b
--- /dev/null
+++ b/matrix-synapse-1.151.0-no_parameterized.patch
@@ -0,0 +1,27 @@
+--- a/pyproject.toml	2026-04-07 14:30:11.000000000 +0200
++++ b/pyproject.toml	2026-05-22 18:44:05.056539860 +0200
+@@ -106,7 +106,6 @@
+     "cffi>=1.15", # via cryptography
+     "pynacl>=1.3", # via signedjson
+     "pyparsing>=2.4",  # via packaging
+-    "pyrsistent>=0.18.0",  # via jsonschema
+     "requests>=2.16.0", # 2.16.0+ no longer vendors urllib3, avoiding Python 3.10+ incompatibility
+     "urllib3>=1.26.5", # via treq; 1.26.5 fixes Python 3.10+ collections.abc compatibility
+     # 5.2 is the current version in Debian oldstable. If we don't care to support that, then 5.4 is
+@@ -156,7 +155,7 @@
+ cache-memory = ["pympler>=1.0"]
+ # If this is updated, don't forget to update the equivalent lines in
+ # `dependency-groups.dev` below.
+-test = ["parameterized>=0.9.0", "idna>=3.3"]
++test = ["idna>=3.3"]
+ 
+ # The duplication here is awful.
+ #
+@@ -283,7 +282,6 @@
+     #
+     # If this is updated, don't forget to update the equivalent lines in
+     # project.optional-dependencies.test.
+-    "parameterized>=0.9.0",
+     "idna>=3.3",
+ 
+     # The following are used by the release script

diff --git a/matrix-synapse-1.159-Build-RustExtension-with-debug-symbols.patch b/matrix-synapse-1.159-Build-RustExtension-with-debug-symbols.patch
new file mode 100644
index 0000000..68f2198
--- /dev/null
+++ b/matrix-synapse-1.159-Build-RustExtension-with-debug-symbols.patch
@@ -0,0 +1,33 @@
+From 6452deb91594dd1ba8b2ed27e937033110c19f54 Mon Sep 17 00:00:00 2001
+From: "Kai A. Hiller" <V02460@gmail.com>
+Date: Wed, 29 Mar 2023 12:28:31 +0200
+Subject: [PATCH 2/2] Build RustExtension with debug symbols
+
+---
+ build_rust.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build_rust.py b/build_rust.py
+index 65d9ac301d..ecc98a5ec8 100644
+--- a/build_rust.py
++++ b/build_rust.py
+@@ -3,7 +3,7 @@
+ import os
+ from typing import Any
+ 
+-from setuptools_rust import Binding, RustExtension
++from setuptools_rust import Binding, RustExtension, Strip
+ 
+ 
+ def build(setup_kwargs: dict[str, Any]) -> None:
+@@ -19,6 +19,7 @@ def build(setup_kwargs: dict[str, Any]) -> None:
+         # We always build in release mode, as we can't distinguish
+         # between using `poetry` in development vs production.
+         debug=False,
++        strip=Strip.No,
+     )
+     setup_kwargs.setdefault("rust_extensions", []).append(extension)
+     setup_kwargs["zip_safe"] = False
+-- 
+2.51.1
+

diff --git a/matrix-synapse-1.159-pyo3-Disable-abi3-feature.patch b/matrix-synapse-1.159-pyo3-Disable-abi3-feature.patch
new file mode 100644
index 0000000..c12ae34
--- /dev/null
+++ b/matrix-synapse-1.159-pyo3-Disable-abi3-feature.patch
@@ -0,0 +1,73 @@
+From bbe5c1e519aa300ba6316307a94478dd82908464 Mon Sep 17 00:00:00 2001
+From: "Kai A. Hiller" <V02460@gmail.com>
+Date: Fri, 8 Sep 2023 14:10:56 +0200
+Subject: [PATCH 1/2] pyo3: Disable abi3 feature
+
+Fedora does not require compatibility with Python versions different to
+the one at compile time.
+---
+ build_rust.py   | 22 ++--------------------
+ rust/Cargo.toml |  2 --
+ 2 files changed, 2 insertions(+), 22 deletions(-)
+
+diff --git a/build_rust.py b/build_rust.py
+index a9e9265daf..65d9ac301d 100644
+--- a/build_rust.py
++++ b/build_rust.py
+@@ -1,10 +1,8 @@
+ # A build script for poetry that adds the rust extension.
+ 
+-import itertools
+ import os
+ from typing import Any
+ 
+-from packaging.specifiers import SpecifierSet
+ from setuptools_rust import Binding, RustExtension
+ 
+ 
+@@ -16,27 +14,11 @@ def build(setup_kwargs: dict[str, Any]) -> None:
+         target="synapse.synapse_rust",
+         path=cargo_toml_path,
+         binding=Binding.PyO3,
+-        # This flag is a no-op in the latest versions. Instead, we need to
+-        # specify this in the `bdist_wheel` config below.
+-        py_limited_api=True,
++        # This flag is a no-op in the latest versions.
++        py_limited_api=False,
+         # We always build in release mode, as we can't distinguish
+         # between using `poetry` in development vs production.
+         debug=False,
+     )
+     setup_kwargs.setdefault("rust_extensions", []).append(extension)
+     setup_kwargs["zip_safe"] = False
+-
+-    # We look up the minimum supported Python version with
+-    # `python_requires` (e.g. ">=3.10.0,<4.0.0") and finding the first Python
+-    # version that matches. We then convert that into the `py_limited_api` form,
+-    # e.g. cp310 for Python 3.10.
+-    py_limited_api: str
+-    python_bounds = SpecifierSet(setup_kwargs["python_requires"])
+-    for minor_version in itertools.count(start=10):
+-        if f"3.{minor_version}.0" in python_bounds:
+-            py_limited_api = f"cp3{minor_version}"
+-            break
+-
+-    setup_kwargs.setdefault("options", {}).setdefault("bdist_wheel", {})[
+-        "py_limited_api"
+-    ] = py_limited_api
+diff --git a/rust/Cargo.toml b/rust/Cargo.toml
+index 8199a4e02b..9eae4cc297 100644
+--- a/rust/Cargo.toml
++++ b/rust/Cargo.toml
+@@ -34,8 +34,6 @@ mime = "0.3.17"
+ pyo3 = { version = "0.28.3", features = [
+     "macros",
+     "anyhow",
+-    "abi3",
+-    "abi3-py310",
+     # So we can pass `bytes::Bytes` directly back to Python efficiently,
+     # https://docs.rs/pyo3/latest/pyo3/bytes/index.html
+     "bytes",
+-- 
+2.53.0
+

diff --git a/matrix-synapse-1.159-pyo3_pythonize_0.29.patch b/matrix-synapse-1.159-pyo3_pythonize_0.29.patch
new file mode 100644
index 0000000..a125433
--- /dev/null
+++ b/matrix-synapse-1.159-pyo3_pythonize_0.29.patch
@@ -0,0 +1,178 @@
+From 11de9503fb053dcc2ad47b8038a4b98631842950 Mon Sep 17 00:00:00 2001
+From: Andrew Ferrazzutti <andrewf@element.io>
+Date: Thu, 20 Aug 2026 07:49:03 -0400
+Subject: [PATCH] Update Rust dependencies for security fixes (#20131)
+
+---
+ Cargo.lock                 | 29 ++++++++++++++---------------
+ changelog.d/20131.misc     |  1 +
+ changelog.d/20131.misc.1   |  1 +
+ rust/Cargo.toml            |  6 +++---
+ rust/src/deferred.rs       |  2 +-
+ rust/src/storage/db/mod.rs |  3 ++-
+ 6 files changed, 22 insertions(+), 20 deletions(-)
+ create mode 100644 changelog.d/20131.misc
+ create mode 100644 changelog.d/20131.misc.1
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 50daff2dd90..3cb739d4952 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -843,9 +843,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "pyo3"
+-version = "0.28.3"
++version = "0.29.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
++checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
+ dependencies = [
+  "anyhow",
+  "bytes",
+@@ -859,18 +859,18 @@ dependencies = [
+ 
+ [[package]]
+ name = "pyo3-build-config"
+-version = "0.28.3"
++version = "0.29.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
++checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
+ dependencies = [
+  "target-lexicon",
+ ]
+ 
+ [[package]]
+ name = "pyo3-ffi"
+-version = "0.28.3"
++version = "0.29.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
++checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
+ dependencies = [
+  "libc",
+  "pyo3-build-config",
+@@ -889,9 +889,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "pyo3-macros"
+-version = "0.28.3"
++version = "0.29.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
++checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
+ dependencies = [
+  "proc-macro2",
+  "pyo3-macros-backend",
+@@ -901,22 +901,21 @@ dependencies = [
+ 
+ [[package]]
+ name = "pyo3-macros-backend"
+-version = "0.28.3"
++version = "0.29.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
++checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
+ dependencies = [
+  "heck",
+  "proc-macro2",
+- "pyo3-build-config",
+  "quote",
+  "syn 2.0.104",
+ ]
+ 
+ [[package]]
+ name = "pythonize"
+-version = "0.28.0"
++version = "0.29.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "0b79f670c9626c8b651c0581011b57b6ba6970bb69faf01a7c4c0cfc81c43f95"
++checksum = "6ec376e1216e0c929a74964ce2020012a1a39f32d80e78aa688721219ea7fb89"
+ dependencies = [
+  "pyo3",
+  "serde",
+@@ -1193,9 +1192,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "rustls-webpki"
+-version = "0.103.13"
++version = "0.103.14"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
++checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a"
+ dependencies = [
+  "ring",
+  "rustls-pki-types",
+diff --git a/changelog.d/20131.misc b/changelog.d/20131.misc
+new file mode 100644
+index 00000000000..a90fd7d4ada
+--- /dev/null
++++ b/changelog.d/20131.misc
+@@ -0,0 +1 @@
++Update rustls-webpki to address GHSA-82j2-j2ch-gfr8.
+diff --git a/changelog.d/20131.misc.1 b/changelog.d/20131.misc.1
+new file mode 100644
+index 00000000000..c0c211ed8cd
+--- /dev/null
++++ b/changelog.d/20131.misc.1
+@@ -0,0 +1 @@
++Update pyo3 to address GHSA-36hh-v3qg-5jq4 and GHSA-chgr-c6px-7xpp.
+diff --git a/rust/Cargo.toml b/rust/Cargo.toml
+index 612ab09f6d0..f6b12c4c1b0 100644
+--- a/rust/Cargo.toml
++++ b/rust/Cargo.toml
+@@ -31,7 +31,7 @@ http = "1.1.0"
+ lazy_static = "1.4.0"
+ log = "0.4.17"
+ mime = "0.3.17"
+-pyo3 = { version = "0.28.3", features = [
++pyo3 = { version = "0.29.0", features = [
+     "macros",
+     "anyhow",
+     # So we can pass `bytes::Bytes` directly back to Python efficiently,
+@@ -40,8 +40,8 @@ pyo3 = { version = "0.28.3", features = [
+     # https://docs.rs/pyo3/latest/pyo3/bytes/index.html
+     "bytes",
+ ] }
+-pyo3-log = "0.13.3"
+-pythonize = { version = "0.28.0", features = ["arbitrary_precision"] }
++pyo3-log = "0.13.4"
++pythonize = { version = "0.29.0", features = ["arbitrary_precision"] }
+ regex = "1.6.0"
+ sha2 = "0.10.8"
+ serde = { version = "1.0.144", features = ["derive", "rc"] }
+diff --git a/rust/src/deferred.rs b/rust/src/deferred.rs
+index 62a1ce6b903..3da5defb83b 100644
+--- a/rust/src/deferred.rs
++++ b/rust/src/deferred.rs
+@@ -141,7 +141,7 @@ pub(crate) async fn run_python_awaitable<F>(
+     make_awaitable: F,
+ ) -> PyResult<Py<PyAny>>
+ where
+-    F: for<'py> Fn(Python<'py>) -> PyResult<Bound<'py, PyAny>> + Send + 'static,
++    F: for<'py> Fn(Python<'py>) -> PyResult<Bound<'py, PyAny>> + Send + Sync + 'static,
+ {
+     // Resolves when the awaitable completes; carries the resolved value or error.
+     let (tx, rx) = oneshot::channel::<PyResult<Py<PyAny>>>();
+diff --git a/rust/src/storage/db/mod.rs b/rust/src/storage/db/mod.rs
+index fd40d52f082..175f66e76d5 100644
+--- a/rust/src/storage/db/mod.rs
++++ b/rust/src/storage/db/mod.rs
+@@ -32,7 +32,7 @@ pub mod python_db_pool;
+ /// It may be invoked multiple times under certain failure modes (serialization
+ /// and deadlock errors), so it is `Fn` rather than `FnOnce`.
+ pub type ErasedInteraction =
+-    Box<dyn for<'txn> Fn(&'txn mut dyn Transaction) -> BoxFuture<'txn, ErasedResult> + Send>;
++    Box<dyn for<'txn> Fn(&'txn mut dyn Transaction) -> BoxFuture<'txn, ErasedResult> + Send + Sync>;
+ 
+ /// The type-erased *result* of an [`ErasedInteraction`]
+ /// [`DatabasePool::run_interaction_erased`].
+@@ -114,6 +114,7 @@ pub trait DatabasePoolExt: DatabasePool {
+         R: Send + 'static,
+         F: for<'txn> Fn(&'txn mut dyn Transaction) -> BoxFuture<'txn, anyhow::Result<R>>
+             + Send
++            + Sync
+             + 'static,
+     {
+         // Erase the concrete return type `R` into `Box<dyn Any>` so we can call

diff --git a/matrix-synapse.spec b/matrix-synapse.spec
index 68ca6b9..4387dfe 100644
--- a/matrix-synapse.spec
+++ b/matrix-synapse.spec
@@ -4,7 +4,7 @@
 %bcond saml2 0
 
 Name:       matrix-synapse
-Version:    1.151.0
+Version:    1.159.0
 Release:    %autorelease
 Summary:    A Matrix reference homeserver written in Python using Twisted
 License:    AGPL-3.0-or-later
@@ -17,8 +17,10 @@ Source0:    %{url}/archive/%{upstream_tag}/synapse-%{version}.tar.gz
 Source1:    synapse.sysconfig
 Source2:    synapse.service
 Source3:    matrix-synapse.sysusers
-Patch1:     0001-pyo3-Disable-abi3-feature.patch
-Patch2:     0002-Build-RustExtension-with-debug-symbols.patch
+Patch1:     matrix-synapse-1.159-pyo3-Disable-abi3-feature.patch
+Patch2:     matrix-synapse-1.159-Build-RustExtension-with-debug-symbols.patch
+Patch3:     matrix-synapse-1.151.0-no_parameterized.patch
+Patch4:     matrix-synapse-1.159-pyo3_pythonize_0.29.patch
 ExclusiveArch:  %{rust_arches}
 
 Recommends:     %{name}+postgres

diff --git a/sources b/sources
index c617542..6606c70 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (synapse-1.151.0.tar.gz) = 6bd144744f21ff9948c2975329273d4dda538161fe6655f4f873cd3645fba243a3b02002cb3850bf3ba43f74436e7ae72718149ae34caea9af0e36e3761ef531
+SHA512 (synapse-1.159.0.tar.gz) = 0c08207d0b0408ec6bc7a8f25a652a87e3676f698e017674201cc76562dd780dde5123fb138fb244bc7a2c8fac6cc669c5699f53c41b473d1b32f855502b49b0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-27 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27 18:53 [rpms/matrix-synapse] rawhide: Update to 0.159 Xavier Bachelot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox