Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package matrix-synapse for openSUSE:Factory checked in at 2022-10-15 16:37:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/matrix-synapse (Old) and /work/SRC/openSUSE:Factory/.matrix-synapse.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "matrix-synapse" Sat Oct 15 16:37:24 2022 rev:71 rq:1010937 version:1.68.0 Changes: -------- --- /work/SRC/openSUSE:Factory/matrix-synapse/matrix-synapse.changes 2022-09-21 14:43:48.289976550 +0200 +++ /work/SRC/openSUSE:Factory/.matrix-synapse.new.2275/matrix-synapse.changes 2022-10-15 16:40:21.838572493 +0200 @@ -1,0 +2,181 @@ +Fri Oct 14 13:34:26 UTC 2022 - Marcus Rueckert <mrueck...@suse.de> + +- Add workaround for poetry >= 1.3.0 (boo#1204312) + Also add the unnormalized name to the Metadata so that the + checks inside synapse work correctly. + +------------------------------------------------------------------- +Sun Oct 9 21:58:05 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Reduce BuildRequires footprint with poetry-core instead of poetry + +------------------------------------------------------------------- +Fri Sep 30 09:37:21 UTC 2022 - Marcus Rueckert <mrueck...@suse.de> + +- added https://patch-diff.githubusercontent.com/raw/matrix-org/synapse/pull/13952.patch + this prevents setuptools-rust being enforced as a runtime + dependency. Drop dependency in the package again. + +------------------------------------------------------------------- +Wed Sep 28 01:07:43 UTC 2022 - Marcus Rueckert <mrueck...@suse.de> + +- synapse checks for setuptools-rust as a runtime dep. add this + until we figured out a better solution + +------------------------------------------------------------------- +Tue Sep 27 20:50:59 UTC 2022 - Marcus Rueckert <mrueck...@suse.de> + +- Update to 1.68.0 + Please note that Synapse will now refuse to start if configured + to use a version of SQLite older than 3.27. + + In addition, please note that installing Synapse from a source + checkout now requires a recent Rust compiler. Those using + packages will not be affected. On most platforms, installing with + pip install matrix-synapse will not be affected. See the upgrade + notes. + + - Features + - Keep track of when we fail to process a pulled event over + federation so we can intelligently back off in the future. + (#13589, #13814) + - Add an admin API endpoint to fetch messages within a + particular window of time. (#13672) + - Add an admin API endpoint to find a user based on their + external ID in an auth provider. (#13810) + - Cancel the processing of key query requests when they time + out. (#13680) + - Improve validation of request bodies for the following + client-server API endpoints: + /account/3pid/msisdn/requestToken, + /org.matrix.msc3720/account_status, /account/3pid/add, + /account/3pid/bind, /account/3pid/delete and + /account/3pid/unbind. (#13687, #13736) + - Document the timestamp when a user accepts the consent, if + consent tracking is used. (#13741) + - Add a listeners[x].request_id_header configuration option to + specify which request header to extract and use as the + request ID in order to correlate requests from a reverse + proxy. (#13801) + - Bugfixes + - Fix packaging to include Cargo.lock in sdist. (#13909) + - Fix building from packaged sdist. Broken in v1.68.0rc1. + (#13866) + - Fix a bug introduced in Synapse 1.41.0 where the /hierarchy + API returned non-standard information (a room_id field under + each entry in children_state). (#13506) + - Fix a long-standing bug where previously rejected events + could end up in room state because they pass auth checks + given the current state of the room. (#13723) + - Fix a long-standing bug where Synapse fails to start if a + signing key file contains an empty line. (#13738) + - Fix a long-standing bug where Synapse would fail to handle + malformed user IDs or room aliases gracefully in certain + cases. (#13746) + - Fix a long-standing bug where device lists would remain + cached when remote users left and rejoined the last room + shared with the local homeserver. (#13749, #13826) + - Fix a long-standing bug that could cause stale caches in some + rare cases on the first startup of Synapse with replication. + (#13766) + - Fix a long-standing spec compliance bug where Synapse would + accept a trailing slash on the end of /get_missing_events + federation requests. (#13789) + - Delete associated data from event_failed_pull_attempts, + insertion_events, insertion_event_extremities, + insertion_event_extremities, insertion_event_extremities when + purging the room. (#13825) + - Improved Documentation + - Note that libpq is required on ARM-based Macs. (#13480) + - Fix a mistake in the config manual introduced in Synapse + 1.22.0: the event_cache_size is scaled by + caches.global_factor. (#13726) + - Fix a typo in the documentation for the login ratelimiting + configuration. (#13727) + - Define Synapse's compatability policy for SQLite versions. + (#13728) + - Add docs for the common fix of deleting the + matrix_synapse.egg-info/ directory for fixing Python + dependency problems. (#13785) + - Update request log format documentation to mention the format + used when the authenticated user is controlling another user. + (#13794) + - Deprecations and Removals + - Synapse will now refuse to start if configured to use SQLite + < 3.27. (#13760) + - Don't include redundant prev_state in new events. Contributed + by Denis Kariakin (@dakariakin). (#13791) + - Internal Changes + - Fix the release script not publishing binary wheels. (#13850) + - Lower minimum supported rustc version to 1.58.1. (#13857) + - Lock Rust dependencies' versions. (#13858) + - Add a stub Rust crate. (#12595, #13734, #13735, #13743, + #13763, #13769, #13778) + - Bump the minimum dependency of matrix_common to 1.3.0 to make + use of the MXCUri class. Use MXCUri to simplify media + retention test code. (#13162) + - Add and populate the event_stream_ordering column on the + receipts table for future optimisation of push action + processing. Contributed by Nick @ Beeper (@Fizzadar). + (#13703) + - Rename the EventFormatVersions enum values so that they line + up with room version numbers. (#13706) + - Update trial old deps CI to use Poetry 1.2.0. (#13707, + #13725) + - Add experimental configuration option to allow disabling + legacy Prometheus metric names. (#13714, #13717, #13718) + - Fix typechecking with latest types-jsonschema. (#13724) + - Strip number suffix from instance name to consolidate + services that traces are spread over. (#13729) + - Instrument get_metadata_for_events for understandable traces + in Jaeger. (#13730) + - Remove old queries to join room memberships to current state + events. Contributed by Nick @ Beeper (@Fizzadar). (#13745) + - Avoid raising an error due to malformed user IDs in + get_current_hosts_in_room. Malformed user IDs cannot + currently join a room, so this error would not be hit. + (#13748) + - Update the docstrings for get_users_in_room and + get_current_hosts_in_room to explain the impact of partial + state. (#13750) + - Use an additional database query when persisting receipts. + (#13752) + - Preparatory work for storing thread IDs for notifications and + receipts. (#13753) + - Re-type hint some collections as read-only. (#13754) + - Remove unused Prometheus recording rules from + synapse-v2.rules and add comments describing where the rest + are used. (#13756) + - Add a check for editable installs if the Rust library needs + rebuilding. (#13759) + - Tag traces with the instance name to be able to easily jump + into the right logs and filter traces by instance. (#13761) + - Concurrently fetch room push actions when calculating badge + counts. Contributed by Nick @ Beeper (@Fizzadar). (#13765) + - Update the script which makes full schema dumps. (#13770) + - Deduplicate is_server_notices_room. (#13780) + - Simplify the dependency DAG in the tests workflow. (#13784) + - Remove an old, incorrect migration file. (#13788) + - Remove unused method in synapse.api.auth.Auth. (#13795) + - Fix a memory leak when running the unit tests. (#13798) + - Use partial indices on SQLite. (#13802) + - Check that portdb generates the same postgres schema as that + in the source tree. (#13808) + - Fix Docker build when Rust .so has been built locally first. + (#13811) + - Complement: Initialise the Postgres database directly inside + the target image instead of the base Postgres image to fix + building using Buildah. (#13819) + - Support providing an index predicate clause when doing + upserts. (#13822) + - Minor speedups to linting in CI. (#13827) +- update dependencies + bcrypt to 3.1.7 + matrix-common to 1.3.0 +- add handling for the rust based parts: + - new dependencies + - setuptools-rust + - cargo + - update _service file to also vendor the cargo dependencies + +------------------------------------------------------------------- Old: ---- matrix-synapse-1.67.0.obscpio New: ---- 13952.patch cargo_config matrix-synapse-1.68.0.obscpio vendor.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ matrix-synapse-test.spec ++++++ --- /var/tmp/diff_new_pack.c9jjaR/_old 2022-10-15 16:40:22.558574223 +0200 +++ /var/tmp/diff_new_pack.c9jjaR/_new 2022-10-15 16:40:22.562574233 +0200 @@ -27,7 +27,7 @@ %define pkgname matrix-synapse Name: %{pkgname}-test -Version: 1.67.0 +Version: 1.68.0 Release: 0 Summary: Test package for %{pkgname} License: Apache-2.0 ++++++ matrix-synapse.spec ++++++ --- /var/tmp/diff_new_pack.c9jjaR/_old 2022-10-15 16:40:22.582574281 +0200 +++ /var/tmp/diff_new_pack.c9jjaR/_new 2022-10-15 16:40:22.590574301 +0200 @@ -34,7 +34,7 @@ %global idna_version 3.3 %global ijson_version 3.1.4 %global jsonschema_version 4.4.6 -%global matrix_common_version 1.2.1 +%global matrix_common_version 1.3.0 %global matrix_common_max_version 2 %global msgpack_version 1.0.3 %global netaddr_version 0.8.0 @@ -75,7 +75,7 @@ %global PyYAML_version 3.11 %global Twisted_version 18.9.0 %global attrs_version 21.1.1 -%global bcrypt_version 3.1.0 +%global bcrypt_version 3.1.7 %global bleach_version 1.4.3 %global canonicaljson_version 1.5.0 %global canonicaljson_max_version 2 @@ -84,7 +84,7 @@ %global idna_version 2.5 %global ijson_version 3.1.4 %global jsonschema_version 3.0.0 -%global matrix_common_version 1.2.1 +%global matrix_common_version 1.3.0 %global matrix_common_max_version 2 %global msgpack_version 0.5.2 %global netaddr_version 0.7.18 @@ -155,13 +155,15 @@ %define pkgname matrix-synapse %define eggname matrix_synapse Name: %{pkgname} -Version: 1.67.0 +Version: 1.68.0 Release: 0 Summary: Matrix protocol reference homeserver License: Apache-2.0 Group: Productivity/Networking/Instant Messenger URL: https://github.com/matrix-org/synapse Source0: %{pkgname}-%{version}.tar.xz +Source1: vendor.tar.xz +Source2: cargo_config Source47: matrix-synapse-user.conf Source48: README.SUSE Source49: matrix-synapse.tmpfiles.d @@ -173,14 +175,16 @@ Source99: series Patch: matrix-synapse-1.4.1-paths.patch Patch1: bump-dependencies.patch +Patch2: https://patch-diff.githubusercontent.com/raw/matrix-org/synapse/pull/13952.patch # https://github.com/matrix-org/synapse/pull/10719 # disable by marking as source until we get a decision upstream Source100: 10719-Fix-instert-of-duplicate-key-into-event_json.patch BuildRequires: %{use_python}-base >= 3.8 BuildRequires: %{use_python}-pip -BuildRequires: %{use_python}-poetry +BuildRequires: %{use_python}-poetry-core BuildRequires: %{use_python}-setuptools BuildRequires: %{use_python}-wheel +BuildRequires: cargo BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: systemd-rpm-macros @@ -190,6 +194,7 @@ %{?systemd_ordering} %{sysusers_requires} %requires_peq %{use_python}-base +BuildRequires: %{use_python}-setuptools-rust # NOTE: Keep this is in the same order as pyproject.toml. # some version locks based on poetry.lock BuildRequires: %{use_python}-Jinja2 >= %{Jinja2_version} @@ -292,7 +297,6 @@ %endif BuildRequires: %{use_python}-Pympler >= %{Pympler_version} %requires_peq %{use_python}-Pympler -BuildArch: noarch # We only provide/obsolete python2 to ensure that users upgrade. Obsoletes: python2-matrix-synapse < %{version}-%{release} Provides: python2-matrix-synapse = %{version}-%{release} @@ -304,7 +308,8 @@ Matrix. Matrix is a system for federated Instant Messaging and VoIP. %prep -%autosetup -p1 +%autosetup -p1 -a1 +install -m 0644 -D %{SOURCE2} .cargo/config # Remove all un-needed #!-lines. find synapse/ -type f -exec sed -i '1{/^#!/d}' {} \; @@ -328,6 +333,14 @@ install -d -m 0755 %{buildroot}%{_libexecdir}/%{pkgname} %pyproject_install +# workaround for poetry >= 1.3.0 boo#1204312 +METADATA_FILE="%{buildroot}%{python3_sitearch}/%{eggname}-%{version}.dist-info/METADATA" +if [ -e ${METADATA_FILE} ] ; then + perl -p -i.backup -e 's/(Provides-Extra: url-preview\n)/${1}Provides-Extra: url_preview\n/g' ${METADATA_FILE} + diff -urN ${METADATA_FILE}{.backup,} ||: + rm -f ${METADATA_FILE}.backup +fi + install -d -m 0755 %{buildroot}%{_bindir} %{buildroot}%{_libexecdir}/%{pkgname}/ # move scripts to the old place. mv %{buildroot}%{_bindir}/* %{buildroot}%{_libexecdir}/%{pkgname}/ @@ -382,8 +395,8 @@ %config(noreplace) %attr(-,root,synapse) %{_sysconfdir}/%{pkgname}/ %dir %attr(0750,%{modname},%{modname}) %{_localstatedir}/lib/%{pkgname} %dir %attr(0750,%{modname},%{modname}) %{_localstatedir}/log/%{pkgname} -%{python3_sitelib}/%{modname} -%{python3_sitelib}/%{eggname}-*-info +%{python3_sitearch}/%{modname} +%{python3_sitearch}/%{eggname}-*-info # Python helper scripts. %{_bindir}/synctl %{_libexecdir}/%{pkgname} ++++++ 13952.patch ++++++ >From ceff48c7bfc5ff9b738c539d02b4590e4ec26d24 Mon Sep 17 00:00:00 2001 From: David Robertson <dav...@element.io> Date: Thu, 29 Sep 2022 19:26:15 +0100 Subject: [PATCH 1/3] Don't require `setuptools_rust` at runtime --- synapse/util/check_dependencies.py | 13 ++++++++++++- tests/util/test_check_dependencies.py | 20 ++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/synapse/util/check_dependencies.py b/synapse/util/check_dependencies.py index 66f1da75028..0fb1a8fb72a 100644 --- a/synapse/util/check_dependencies.py +++ b/synapse/util/check_dependencies.py @@ -66,6 +66,17 @@ def _is_dev_dependency(req: Requirement) -> bool: ) +def _should_ignore_runtime_requirement(req: Requirement) -> bool: + # This is a build-time dependency. Irritatingly, `poetry build` ignores the + # requirements listed in the [build-system] section of pyproject.toml, so in order + # to support `poetry install --no-dev` we have to mark it as a runtime dependency. + # Workaround this by ignoring it here. (It might be slightly cleaner to put + # `setuptools_rust` in a `build` extra or similar, but . But for now I' + if req.name == "setuptools_rust": + return True + return False + + class Dependency(NamedTuple): requirement: Requirement must_be_installed: bool @@ -77,7 +88,7 @@ def _generic_dependencies() -> Iterable[Dependency]: assert requirements is not None for raw_requirement in requirements: req = Requirement(raw_requirement) - if _is_dev_dependency(req): + if _is_dev_dependency(req) or _should_ignore_runtime_requirement(req): continue # https://packaging.pypa.io/en/latest/markers.html#usage notes that diff --git a/tests/util/test_check_dependencies.py b/tests/util/test_check_dependencies.py index 5d1aa025d12..6913de24b9c 100644 --- a/tests/util/test_check_dependencies.py +++ b/tests/util/test_check_dependencies.py @@ -40,7 +40,10 @@ class TestDependencyChecker(TestCase): def mock_installed_package( self, distribution: Optional[DummyDistribution] ) -> Generator[None, None, None]: - """Pretend that looking up any distribution yields the given `distribution`.""" + """Pretend that looking up any package yields the given `distribution`. + + If `distribution = None`, we pretend that the package is not installed. + """ def mock_distribution(name: str): if distribution is None: @@ -81,7 +84,7 @@ def test_version_reported_as_none(self) -> None: self.assertRaises(DependencyException, check_requirements) def test_checks_ignore_dev_dependencies(self) -> None: - """Bot generic and per-extra checks should ignore dev dependencies.""" + """Both generic and per-extra checks should ignore dev dependencies.""" with patch( "synapse.util.check_dependencies.metadata.requires", return_value=["dummypkg >= 1; extra == 'mypy'"], @@ -142,3 +145,16 @@ def test_release_candidates_satisfy_dependency(self) -> None: with self.mock_installed_package(new_release_candidate): # should not raise check_requirements() + + def test_setuptools_rust_ignored(self) -> None: + """Test a workaround for a `poetry build` problem. Reproduces #13926.""" + with patch( + "synapse.util.check_dependencies.metadata.requires", + return_value=["setuptools_rust >= 1.3"], + ): + with self.mock_installed_package(None): + # should not raise, even if setuptools_rust is not installed + check_requirements() + with self.mock_installed_package(old): + # We also ignore old versions of setuptools_rust + check_requirements() >From b7dab6f99ac46ce35f90f8cd25eab56a8ebd67ec Mon Sep 17 00:00:00 2001 From: David Robertson <dav...@element.io> Date: Thu, 29 Sep 2022 19:32:02 +0100 Subject: [PATCH 2/3] Changelog --- changelog.d/13952.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/13952.bugfix diff --git a/changelog.d/13952.bugfix b/changelog.d/13952.bugfix new file mode 100644 index 00000000000..a6af20f0518 --- /dev/null +++ b/changelog.d/13952.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in v1.68.0 where Synapse would require `setuptools_rust` at runtime, even though the package is only required at build time. >From 76abcb27b7f21e0978f1ad7019b816fe9731a816 Mon Sep 17 00:00:00 2001 From: David Robertson <dav...@element.io> Date: Thu, 29 Sep 2022 19:43:04 +0100 Subject: [PATCH 3/3] Finish your sentence, boy; poetry issue reference --- synapse/util/check_dependencies.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/synapse/util/check_dependencies.py b/synapse/util/check_dependencies.py index 0fb1a8fb72a..3b1e2057002 100644 --- a/synapse/util/check_dependencies.py +++ b/synapse/util/check_dependencies.py @@ -70,8 +70,12 @@ def _should_ignore_runtime_requirement(req: Requirement) -> bool: # This is a build-time dependency. Irritatingly, `poetry build` ignores the # requirements listed in the [build-system] section of pyproject.toml, so in order # to support `poetry install --no-dev` we have to mark it as a runtime dependency. - # Workaround this by ignoring it here. (It might be slightly cleaner to put - # `setuptools_rust` in a `build` extra or similar, but . But for now I' + # See discussion on https://github.com/python-poetry/poetry/issues/6154 (it sounds + # like the poetry authors don't consider this a bug?) + # + # In any case, workaround this by ignoring setuptools_rust here. (It might be + # slightly cleaner to put `setuptools_rust` in a `build` extra or similar, but for + # now let's do something quick and dirty. if req.name == "setuptools_rust": return True return False ++++++ _service ++++++ --- /var/tmp/diff_new_pack.c9jjaR/_old 2022-10-15 16:40:22.646574435 +0200 +++ /var/tmp/diff_new_pack.c9jjaR/_new 2022-10-15 16:40:22.650574445 +0200 @@ -4,7 +4,7 @@ <param name="versionformat">@PARENT_TAG@</param> <param name="url">https://github.com/matrix-org/synapse.git</param> <param name="scm">git</param> - <param name="revision">v1.67.0</param> + <param name="revision">v1.68.0</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="versionrewrite-replacement">\1</param> <!-- @@ -13,6 +13,9 @@ <param name="versionrewrite-replacement">\1~\2</param> --> </service> + <service name="cargo_vendor" mode="disabled"> + <param name="srcdir">synapse</param> + </service> <service name="set_version" mode="disabled"/> <service name="tar" mode="buildtime"/> <service name="recompress" mode="buildtime"> ++++++ cargo_config ++++++ [source.crates-io] replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor" (No newline at EOF) ++++++ matrix-synapse-1.67.0.obscpio -> matrix-synapse-1.68.0.obscpio ++++++ /work/SRC/openSUSE:Factory/matrix-synapse/matrix-synapse-1.67.0.obscpio /work/SRC/openSUSE:Factory/.matrix-synapse.new.2275/matrix-synapse-1.68.0.obscpio differ: char 49, line 1 ++++++ matrix-synapse.obsinfo ++++++ --- /var/tmp/diff_new_pack.c9jjaR/_old 2022-10-15 16:40:22.722574618 +0200 +++ /var/tmp/diff_new_pack.c9jjaR/_new 2022-10-15 16:40:22.722574618 +0200 @@ -1,5 +1,5 @@ name: matrix-synapse -version: 1.67.0 -mtime: 1663059310 -commit: 80bb098d8775cc2ad1bf5abd150913577e643481 +version: 1.68.0 +mtime: 1664278471 +commit: 3853011d01ad3f5034f53a9dfb7a06e36cf70ae9