Skip to content

Commit 3a05245

Browse files
committed
Merge tag 'v1.47.0' into 2021-05
Synapse 1.47.0 (2021-11-17) =========================== No significant changes since 1.47.0rc3. Synapse 1.47.0rc3 (2021-11-16) ============================== Bugfixes -------- - Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\matrix-org#11346](matrix-org#11346)) - Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\matrix-org#11303](matrix-org#11303), [\matrix-org#11353](matrix-org#11353)) Synapse 1.47.0rc2 (2021-11-10) ============================== This fixes an issue with publishing the Debian packages for 1.47.0rc1. It is otherwise identical to 1.47.0rc1. Synapse 1.47.0rc1 (2021-11-09) ============================== Deprecations and Removals ------------------------- - The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more information. ([\matrix-org#11206](matrix-org#11206)) - Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\matrix-org#11213](matrix-org#11213)) Features -------- - Advertise support for Client-Server API r0.6.1. ([\matrix-org#11097](matrix-org#11097)) - Add search by room ID and room alias to the List Room admin API. ([\matrix-org#11099](matrix-org#11099)) - Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\matrix-org#11126](matrix-org#11126)) - Add a module API method to update a user's membership in a room. ([\matrix-org#11147](matrix-org#11147)) - Add metrics for thread pool usage. ([\matrix-org#11178](matrix-org#11178)) - Support the stable room type field for [MSC3288](matrix-org/matrix-spec-proposals#3288). ([\matrix-org#11187](matrix-org#11187)) - Add a module API method to retrieve the current state of a room. ([\matrix-org#11204](matrix-org#11204)) - Calculate a default value for `public_baseurl` based on `server_name`. ([\matrix-org#11210](matrix-org#11210)) - Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\matrix-org#11211](matrix-org#11211)) - Add admin APIs to pause, start and check the status of background updates. ([\matrix-org#11263](matrix-org#11263)) Bugfixes -------- - Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\matrix-org#10097](matrix-org#10097)) - Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine. ([\matrix-org#10969](matrix-org#10969), [\matrix-org#11212](matrix-org#11212)) - Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\matrix-org#11033](matrix-org#11033)) - Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver. ([\matrix-org#11129](matrix-org#11129)) - Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint and the author of the historical messages is already part of the current room state at the given `?prev_event_id`. ([\matrix-org#11188](matrix-org#11188)) - Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p. ([\matrix-org#11191](matrix-org#11191)) - Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\matrix-org#11199](matrix-org#11199)) - Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\matrix-org#11200](matrix-org#11200)) - Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at Beeper. ([\matrix-org#11207](matrix-org#11207)) - Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\matrix-org#11217](matrix-org#11217)) - Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried. ([\matrix-org#11234](matrix-org#11234)) - Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection. ([\matrix-org#11240](matrix-org#11240)) - Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\matrix-org#11255](matrix-org#11255), [\matrix-org#11276](matrix-org#11276)) - Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed. ([\matrix-org#11262](matrix-org#11262)) - Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu. ([\matrix-org#11157](matrix-org#11157)) Updates to the Docker image --------------------------- - Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\matrix-org#11209](matrix-org#11209)) Improved Documentation ---------------------- - Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly. ([\matrix-org#11128](matrix-org#11128)) - Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\matrix-org#11151](matrix-org#11151)) - Clarify lack of support for Windows. ([\matrix-org#11198](matrix-org#11198)) - Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\matrix-org#11221](matrix-org#11221)) - Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\matrix-org#11257](matrix-org#11257)) Internal Changes ---------------- - Add type annotations for the `log_function` decorator. ([\matrix-org#10943](matrix-org#10943)) - Add type hints to `synapse.events`. ([\matrix-org#11098](matrix-org#11098)) - Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\matrix-org#11137](matrix-org#11137)) - Add type hints so that `synapse.http` passes `mypy` checks. ([\matrix-org#11164](matrix-org#11164)) - Update scripts to pass Shellcheck lints. ([\matrix-org#11166](matrix-org#11166)) - Add knock information in admin export. Contributed by Rafael Gonçalves. ([\matrix-org#11171](matrix-org#11171)) - Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly. ([\matrix-org#11179](matrix-org#11179)) - Refactor `Filter` to check different fields depending on the data type. ([\matrix-org#11194](matrix-org#11194)) - Improve type hints for the relations datastore. ([\matrix-org#11205](matrix-org#11205)) - Replace outdated links in the pull request checklist with links to the rendered documentation. ([\matrix-org#11225](matrix-org#11225)) - Fix a bug in unit test `test_block_room_and_not_purge`. ([\matrix-org#11226](matrix-org#11226)) - In `ObservableDeferred`, run observers in the order they were registered. ([\matrix-org#11229](matrix-org#11229)) - Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\matrix-org#11231](matrix-org#11231)) - Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\matrix-org#11233](matrix-org#11233)) - Allow `stream_writers.typing` config to be a list of one worker. ([\matrix-org#11237](matrix-org#11237)) - Remove debugging statement in tests. ([\matrix-org#11239](matrix-org#11239)) - Fix [MSC2716](matrix-org/matrix-spec-proposals#2716) historical messages backfilling in random order on remote homeservers. ([\matrix-org#11244](matrix-org#11244)) - Add an additional test for the `cachedList` method decorator. ([\matrix-org#11246](matrix-org#11246)) - Make minor correction to the type of `auth_checkers` callbacks. ([\matrix-org#11253](matrix-org#11253)) - Clean up trivial aspects of the Debian package build tooling. ([\matrix-org#11269](matrix-org#11269), [\matrix-org#11273](matrix-org#11273)) - Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\matrix-org#11270](matrix-org#11270)) Signed-off-by: Aaron Raimist <[email protected]>
2 parents 54a7bf1 + 9f9d82a commit 3a05245

File tree

168 files changed

+4113
-1293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+4113
-1293
lines changed

.ci/scripts/test_export_data_command.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Test for the export-data admin command against sqlite and postgres
44

55
set -xe
6-
cd `dirname $0`/../..
6+
cd "$(dirname "$0")/../.."
77

88
echo "--- Install dependencies"
99

.ci/scripts/test_synapse_port_db.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
set -xe
10-
cd `dirname $0`/../..
10+
cd "$(dirname "$0")/../.."
1111

1212
echo "--- Install dependencies"
1313

.github/PULL_REQUEST_TEMPLATE.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
### Pull Request Checklist
22

3-
<!-- Please read CONTRIBUTING.md before submitting your pull request -->
3+
<!-- Please read https://matrix-org.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request -->
44

55
* [ ] Pull request is based on the develop branch
6-
* [ ] Pull request includes a [changelog file](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md#changelog). The entry should:
6+
* [ ] Pull request includes a [changelog file](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should:
77
- Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
88
- Use markdown where necessary, mostly for `code blocks`.
99
- End with either a period (.) or an exclamation mark (!).
1010
- Start with a capital letter.
11-
* [ ] Pull request includes a [sign off](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md#sign-off)
12-
* [ ] Code style is correct (run the [linters](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md#code-style))
11+
* [ ] Pull request includes a [sign off](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off)
12+
* [ ] [Code style](https://matrix-org.github.io/synapse/latest/code_style.html) is correct
13+
(run the [linters](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))

CHANGES.md

+110
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,113 @@
1+
Synapse 1.47.0 (2021-11-17)
2+
===========================
3+
4+
No significant changes since 1.47.0rc3.
5+
6+
7+
Synapse 1.47.0rc3 (2021-11-16)
8+
==============================
9+
10+
Bugfixes
11+
--------
12+
13+
- Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\#11346](https://github.com/matrix-org/synapse/issues/11346))
14+
- Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\#11303](https://github.com/matrix-org/synapse/issues/11303), [\#11353](https://github.com/matrix-org/synapse/issues/11353))
15+
16+
17+
Synapse 1.47.0rc2 (2021-11-10)
18+
==============================
19+
20+
This fixes an issue with publishing the Debian packages for 1.47.0rc1.
21+
It is otherwise identical to 1.47.0rc1.
22+
23+
24+
Synapse 1.47.0rc1 (2021-11-09)
25+
==============================
26+
27+
Deprecations and Removals
28+
-------------------------
29+
30+
- The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more information. ([\#11206](https://github.com/matrix-org/synapse/issues/11206))
31+
- Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\#11213](https://github.com/matrix-org/synapse/issues/11213))
32+
33+
34+
Features
35+
--------
36+
37+
- Advertise support for Client-Server API r0.6.1. ([\#11097](https://github.com/matrix-org/synapse/issues/11097))
38+
- Add search by room ID and room alias to the List Room admin API. ([\#11099](https://github.com/matrix-org/synapse/issues/11099))
39+
- Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\#11126](https://github.com/matrix-org/synapse/issues/11126))
40+
- Add a module API method to update a user's membership in a room. ([\#11147](https://github.com/matrix-org/synapse/issues/11147))
41+
- Add metrics for thread pool usage. ([\#11178](https://github.com/matrix-org/synapse/issues/11178))
42+
- Support the stable room type field for [MSC3288](https://github.com/matrix-org/matrix-doc/pull/3288). ([\#11187](https://github.com/matrix-org/synapse/issues/11187))
43+
- Add a module API method to retrieve the current state of a room. ([\#11204](https://github.com/matrix-org/synapse/issues/11204))
44+
- Calculate a default value for `public_baseurl` based on `server_name`. ([\#11210](https://github.com/matrix-org/synapse/issues/11210))
45+
- Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\#11211](https://github.com/matrix-org/synapse/issues/11211))
46+
- Add admin APIs to pause, start and check the status of background updates. ([\#11263](https://github.com/matrix-org/synapse/issues/11263))
47+
48+
49+
Bugfixes
50+
--------
51+
52+
- Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\#10097](https://github.com/matrix-org/synapse/issues/10097))
53+
- Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine. ([\#10969](https://github.com/matrix-org/synapse/issues/10969), [\#11212](https://github.com/matrix-org/synapse/issues/11212))
54+
- Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\#11033](https://github.com/matrix-org/synapse/issues/11033))
55+
- Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver. ([\#11129](https://github.com/matrix-org/synapse/issues/11129))
56+
- Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint and the author of the historical messages is already part of the current room state at the given `?prev_event_id`. ([\#11188](https://github.com/matrix-org/synapse/issues/11188))
57+
- Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p. ([\#11191](https://github.com/matrix-org/synapse/issues/11191))
58+
- Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\#11199](https://github.com/matrix-org/synapse/issues/11199))
59+
- Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\#11200](https://github.com/matrix-org/synapse/issues/11200))
60+
- Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at Beeper. ([\#11207](https://github.com/matrix-org/synapse/issues/11207))
61+
- Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\#11217](https://github.com/matrix-org/synapse/issues/11217))
62+
- Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried. ([\#11234](https://github.com/matrix-org/synapse/issues/11234))
63+
- Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection. ([\#11240](https://github.com/matrix-org/synapse/issues/11240))
64+
- Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\#11255](https://github.com/matrix-org/synapse/issues/11255), [\#11276](https://github.com/matrix-org/synapse/issues/11276))
65+
- Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed. ([\#11262](https://github.com/matrix-org/synapse/issues/11262))
66+
- Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu. ([\#11157](https://github.com/matrix-org/synapse/issues/11157))
67+
68+
69+
Updates to the Docker image
70+
---------------------------
71+
72+
- Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\#11209](https://github.com/matrix-org/synapse/issues/11209))
73+
74+
75+
Improved Documentation
76+
----------------------
77+
78+
- Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly. ([\#11128](https://github.com/matrix-org/synapse/issues/11128))
79+
- Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\#11151](https://github.com/matrix-org/synapse/issues/11151))
80+
- Clarify lack of support for Windows. ([\#11198](https://github.com/matrix-org/synapse/issues/11198))
81+
- Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\#11221](https://github.com/matrix-org/synapse/issues/11221))
82+
- Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\#11257](https://github.com/matrix-org/synapse/issues/11257))
83+
84+
85+
Internal Changes
86+
----------------
87+
88+
- Add type annotations for the `log_function` decorator. ([\#10943](https://github.com/matrix-org/synapse/issues/10943))
89+
- Add type hints to `synapse.events`. ([\#11098](https://github.com/matrix-org/synapse/issues/11098))
90+
- Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\#11137](https://github.com/matrix-org/synapse/issues/11137))
91+
- Add type hints so that `synapse.http` passes `mypy` checks. ([\#11164](https://github.com/matrix-org/synapse/issues/11164))
92+
- Update scripts to pass Shellcheck lints. ([\#11166](https://github.com/matrix-org/synapse/issues/11166))
93+
- Add knock information in admin export. Contributed by Rafael Gonçalves. ([\#11171](https://github.com/matrix-org/synapse/issues/11171))
94+
- Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly. ([\#11179](https://github.com/matrix-org/synapse/issues/11179))
95+
- Refactor `Filter` to check different fields depending on the data type. ([\#11194](https://github.com/matrix-org/synapse/issues/11194))
96+
- Improve type hints for the relations datastore. ([\#11205](https://github.com/matrix-org/synapse/issues/11205))
97+
- Replace outdated links in the pull request checklist with links to the rendered documentation. ([\#11225](https://github.com/matrix-org/synapse/issues/11225))
98+
- Fix a bug in unit test `test_block_room_and_not_purge`. ([\#11226](https://github.com/matrix-org/synapse/issues/11226))
99+
- In `ObservableDeferred`, run observers in the order they were registered. ([\#11229](https://github.com/matrix-org/synapse/issues/11229))
100+
- Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\#11231](https://github.com/matrix-org/synapse/issues/11231))
101+
- Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\#11233](https://github.com/matrix-org/synapse/issues/11233))
102+
- Allow `stream_writers.typing` config to be a list of one worker. ([\#11237](https://github.com/matrix-org/synapse/issues/11237))
103+
- Remove debugging statement in tests. ([\#11239](https://github.com/matrix-org/synapse/issues/11239))
104+
- Fix [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) historical messages backfilling in random order on remote homeservers. ([\#11244](https://github.com/matrix-org/synapse/issues/11244))
105+
- Add an additional test for the `cachedList` method decorator. ([\#11246](https://github.com/matrix-org/synapse/issues/11246))
106+
- Make minor correction to the type of `auth_checkers` callbacks. ([\#11253](https://github.com/matrix-org/synapse/issues/11253))
107+
- Clean up trivial aspects of the Debian package build tooling. ([\#11269](https://github.com/matrix-org/synapse/issues/11269), [\#11273](https://github.com/matrix-org/synapse/issues/11273))
108+
- Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\#11270](https://github.com/matrix-org/synapse/issues/11270))
109+
110+
1111
Synapse 1.46.0 (2021-11-02)
2112
===========================
3113

contrib/purge_api/purge_history.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ AUTH="Authorization: Bearer $TOKEN"
8484
###################################################################################################
8585
# finally start pruning the room:
8686
###################################################################################################
87-
POSTDATA='{"delete_local_events":"true"}' # this will really delete local events, so the messages in the room really disappear unless they are restored by remote federation
87+
# this will really delete local events, so the messages in the room really
88+
# disappear unless they are restored by remote federation. This is because
89+
# we pass {"delete_local_events":true} to the curl invocation below.
8890

8991
for ROOM in "${ROOMS_ARRAY[@]}"; do
9092
echo "########################################### $(date) ################# "
@@ -104,7 +106,7 @@ for ROOM in "${ROOMS_ARRAY[@]}"; do
104106
SLEEP=2
105107
set -x
106108
# call purge
107-
OUT=$(curl --header "$AUTH" -s -d $POSTDATA POST "$API_URL/admin/purge_history/$ROOM/$EVENT_ID")
109+
OUT=$(curl --header "$AUTH" -s -d '{"delete_local_events":true}' POST "$API_URL/admin/purge_history/$ROOM/$EVENT_ID")
108110
PURGE_ID=$(echo "$OUT" |grep purge_id|cut -d'"' -f4 )
109111
if [ "$PURGE_ID" == "" ]; then
110112
# probably the history purge is already in progress for $ROOM

debian/build_virtualenv

+6-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export DH_VIRTUALENV_INSTALL_ROOT=/opt/venvs
1515
# python won't look in the right directory. At least this way, the error will
1616
# be a *bit* more obvious.
1717
#
18-
SNAKE=`readlink -e /usr/bin/python3`
18+
SNAKE=$(readlink -e /usr/bin/python3)
1919

2020
# try to set the CFLAGS so any compiled C extensions are compiled with the most
2121
# generic as possible x64 instructions, so that compiling it on a new Intel chip
@@ -24,7 +24,7 @@ SNAKE=`readlink -e /usr/bin/python3`
2424
# TODO: add similar things for non-amd64, or figure out a more generic way to
2525
# do this.
2626

27-
case `dpkg-architecture -q DEB_HOST_ARCH` in
27+
case $(dpkg-architecture -q DEB_HOST_ARCH) in
2828
amd64)
2929
export CFLAGS=-march=x86-64
3030
;;
@@ -40,6 +40,7 @@ dh_virtualenv \
4040
--upgrade-pip \
4141
--preinstall="lxml" \
4242
--preinstall="mock" \
43+
--preinstall="wheel" \
4344
--extra-pip-arg="--no-cache-dir" \
4445
--extra-pip-arg="--compile" \
4546
--extras="all,systemd,test"
@@ -56,8 +57,8 @@ case "$DEB_BUILD_OPTIONS" in
5657
*)
5758
# Copy tests to a temporary directory so that we can put them on the
5859
# PYTHONPATH without putting the uninstalled synapse on the pythonpath.
59-
tmpdir=`mktemp -d`
60-
trap "rm -r $tmpdir" EXIT
60+
tmpdir=$(mktemp -d)
61+
trap 'rm -r $tmpdir' EXIT
6162

6263
cp -r tests "$tmpdir"
6364

@@ -98,7 +99,7 @@ esac
9899
--output-file="${PACKAGE_BUILD_DIR}/etc/matrix-synapse/log.yaml"
99100

100101
# add a dependency on the right version of python to substvars.
101-
PYPKG=`basename $SNAKE`
102+
PYPKG=$(basename "$SNAKE")
102103
echo "synapse:pydepends=$PYPKG" >> debian/matrix-synapse-py3.substvars
103104

104105

debian/changelog

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
matrix-synapse-py3 (1.47.0) stable; urgency=medium
2+
3+
* New synapse release 1.47.0.
4+
5+
-- Synapse Packaging team <[email protected]> Wed, 17 Nov 2021 13:09:43 +0000
6+
7+
matrix-synapse-py3 (1.47.0~rc3) stable; urgency=medium
8+
9+
* New synapse release 1.47.0~rc3.
10+
11+
-- Synapse Packaging team <[email protected]> Tue, 16 Nov 2021 14:32:47 +0000
12+
13+
matrix-synapse-py3 (1.47.0~rc2) stable; urgency=medium
14+
15+
[ Dan Callahan ]
16+
* Update scripts to pass Shellcheck lints.
17+
* Remove unused Vagrant scripts from debian/ directory.
18+
* Allow building Debian packages for any architecture, not just amd64.
19+
* Preinstall the "wheel" package when building virtualenvs.
20+
* Do not error if /etc/default/matrix-synapse is missing.
21+
22+
[ Synapse Packaging team ]
23+
* New synapse release 1.47.0~rc2.
24+
25+
-- Synapse Packaging team <[email protected]> Wed, 10 Nov 2021 09:41:01 +0000
26+
127
matrix-synapse-py3 (1.46.0) stable; urgency=medium
228

329
[ Richard van der Hoff ]

debian/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Standards-Version: 3.9.8
1919
Homepage: https://github.com/matrix-org/synapse
2020

2121
Package: matrix-synapse-py3
22-
Architecture: amd64
22+
Architecture: any
2323
Provides: matrix-synapse
2424
Conflicts:
2525
matrix-synapse (<< 0.34.0.1-0matrix2),

debian/matrix-synapse-py3.config

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
set -e
44

5+
# shellcheck disable=SC1091
56
. /usr/share/debconf/confmodule
67

78
# try to update the debconf db according to whatever is in the config files

debian/matrix-synapse-py3.postinst

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/sh -e
22

3+
# shellcheck disable=SC1091
34
. /usr/share/debconf/confmodule
45

56
CONFIGFILE_SERVERNAME="/etc/matrix-synapse/conf.d/server_name.yaml"

debian/matrix-synapse.service

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description=Synapse Matrix homeserver
55
Type=notify
66
User=matrix-synapse
77
WorkingDirectory=/var/lib/matrix-synapse
8-
EnvironmentFile=/etc/default/matrix-synapse
8+
EnvironmentFile=-/etc/default/matrix-synapse
99
ExecStartPre=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys
1010
ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/
1111
ExecReload=/bin/kill -HUP $MAINPID

debian/test/.gitignore

-2
This file was deleted.

debian/test/provision.sh

-23
This file was deleted.

debian/test/stretch/Vagrantfile

-13
This file was deleted.

debian/test/xenial/Vagrantfile

-10
This file was deleted.

demo/clean.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"
66

77
PID_FILE="$DIR/servers.pid"
88

9-
if [ -f $PID_FILE ]; then
9+
if [ -f "$PID_FILE" ]; then
1010
echo "servers.pid exists!"
1111
exit 1
1212
fi
1313

1414
for port in 8080 8081 8082; do
15-
rm -rf $DIR/$port
16-
rm -rf $DIR/media_store.$port
15+
rm -rf "${DIR:?}/$port"
16+
rm -rf "$DIR/media_store.$port"
1717
done
1818

19-
rm -rf $DIR/etc
19+
rm -rf "${DIR:?}/etc"

0 commit comments

Comments
 (0)