## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond check 1 # F43FailsToInstall: python3-pysaml2 # https://bugzilla.redhat.com/show_bug.cgi?id=2372073 %bcond saml2 0 Name: matrix-synapse Version: 1.136.0 Release: %autorelease Summary: A Matrix reference homeserver written in Python using Twisted License: AGPL-3.0-or-later URL: https://github.com/element-hq/synapse %global upstream_tag v%{lua:return(rpm.expand("%{version}"):gsub("~",""))} %global archive_tag %{lua:return(rpm.expand("%{version}"):gsub("~",""))} 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 Patch3: 0003-Remove-icu_segmenter.patch ExclusiveArch: %{rust_arches} Recommends: %{name}+postgres Recommends: %{name}+systemd Recommends: %{name}+user-search BuildRequires: jq BuildRequires: python3-devel BuildRequires: rust-packaging >= 21 BuildRequires: /usr/bin/openssl BuildRequires: systemd-rpm-macros BuildRequires: tomcli %if %{without saml2} Obsoletes: %{name}+saml2 < 1.136.0-2 %endif %description Matrix is an ambitious new ecosystem for open federated Instant Messaging and VoIP. Synapse is a reference "homeserver" implementation of Matrix from the core development team at matrix.org, written in Python/Twisted. It is intended to showcase the concept of Matrix and let folks see the spec in the context of a coded base and let you run your own homeserver and generally help bootstrap the ecosystem. %pyproject_extras_subpkg -n %{name} matrix-synapse-ldap3 postgres %{?with_saml2:saml2} oidc systemd url_preview sentry jwt cache_memory user-search %prep %autosetup -p1 -n synapse-%{archive_tag} # We don't support the built-in client so remove all the bundled JS. rm -rf synapse/static # We cannot respect upper bounds on the versions of Python build dependencies. echo "$(tomcli get pyproject.toml build-system.requires -F json | jq '.[] |= sub("(,<=.*).*"; "") | .[]' -r)" | xargs -r -x tomcli set pyproject.toml lists str build-system.requires %cargo_prep %generate_buildrequires cd rust %cargo_generate_buildrequires cd .. # Missing: opentracing,redis %pyproject_buildrequires -x test,matrix-synapse-ldap3,postgres%{?with_saml2:,saml2},oidc,systemd,url-preview,sentry,jwt,cache-memory,user-search %build %pyproject_wheel %install %pyproject_install %py3_shebang_fix %{buildroot}%{python3_sitearch}/synapse/_scripts %pyproject_save_files synapse install -p -D -T -m 0644 contrib/systemd/log_config.yaml %{buildroot}%{_sysconfdir}/synapse/log_config.yaml install -p -D -T -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/synapse install -p -D -T -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/synapse.service install -p -d -m 755 %{buildroot}%{_sharedstatedir}/synapse install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}.conf %if %{with check} %check set -o pipefail PYTHONPATH=%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}:$PWD trial-3 %{!?fc41:%_smp_mflags} tests | tee trial.stdout # Guard against new types of tests being skipped. WHITELIST="Requires hiredis Requires jaeger_client Requires Postgres Test only applies when postgres is used as the database not supported not supported yet Synapse does not correctly handle this case \`BaseFederationServlet\` does not support cancellation yet. Once we remove ops from the Sliding Sync response, this test should pass Test is not possible because when everyone leaves the room, the server is \`no_longer_in_room\` and we don't have any \`current_state_events\` to query" REASONS=$(cat trial.stdout | sed -n '/^\[SKIPPED\]$/{n;p;}') SKIPPED=$(comm -23 <(echo "$REASONS" | sort | uniq) <(echo "$WHITELIST" | sort | uniq)) if [ ! -z "$SKIPPED" ]; then echo -e "Failing, because tests were skipped:\n$SKIPPED" exit 1 fi %endif %post %systemd_post synapse.service %preun %systemd_preun synapse.service %postun %systemd_postun_with_restart synapse.service %files -f %{pyproject_files} %license LICENSE-AGPL-3.0 %doc *.rst %config(noreplace) %{_sysconfdir}/sysconfig/synapse %{_bindir}/export_signing_key %{_bindir}/generate_config %{_bindir}/generate_log_config %{_bindir}/generate_signing_key %{_bindir}/hash_password %{_bindir}/register_new_matrix_user %{_bindir}/synapse_homeserver %{_bindir}/synapse_port_db %{_bindir}/synapse_review_recent_signups %{_bindir}/synapse_worker %{_bindir}/synctl %{_bindir}/update_synapse_database %{_unitdir}/synapse.service %attr(755,synapse,synapse) %dir %{_sharedstatedir}/synapse %attr(755,synapse,synapse) %dir %{_sysconfdir}/synapse %attr(644,synapse,synapse) %config(noreplace) %{_sysconfdir}/synapse/log_config.yaml %{_sysusersdir}/%{name}.conf %changelog ## START: Generated by rpmautospec * Thu Aug 14 2025 Benjamin A. Beasley - 1.136.0-2 - Drop the saml2 extra since python-pysaml2 FTI in F43 * Tue Aug 12 2025 Kai A. Hiller - 1.136.0-1 - Update to v1.136.0 * Tue Aug 12 2025 Kai A. Hiller - 1.135.2-3 - RPMAUTOSPEC: unresolvable merge ## END: Generated by rpmautospec