archrelease: copy trunk to community-any
[ArchLinux/community.git] / matrix-synapse / repos / community-x86_64 / synapse.install
blob86c532090733585d6f25e80e5e3a9307b7f69c43
1 #!/bin/bash
3 # arg 1: the new package version
4 post_install() {
5 if [[ ! -e /etc/synapse/homeserver.yaml ]]; then
6 cat <<-EOF
7 ==> A synapse configuration file needs to be generated before you can
8 start synapse, and you should make sure that it's readable by the
9 synapse user.
11 cd /var/lib/synapse
12 sudo -u synapse python -m synapse.app.homeserver \\
13 --server-name my.domain.name \\
14 --config-path /etc/synapse/homeserver.yaml \\
15 --generate-config \\
16 --report-stats=yes
18 N.B.: The default synapse config enables the webclient feature.
19 You need to either disable it, install the syweb python package
20 from matrix-angular-sdk, or set 'web_client_location' to a path
21 to make synapse not try to serve it using syweb.
22 EOF
26 # arg 1: the new package version
27 # arg 2: the old package version
28 post_upgrade() {
29 if [[ "$(vercmp "$2" 1.4.0-2)" -lt 0 ]]; then
30 cat <<-EOF
31 ==> Upstream email templates are no longer available in /var/lib/synapse/res/templates.
33 If you want to customize the templates, you can copy the default ones from
34 /usr/lib/python3.x/site-packages/synapse/res/templates/
35 EOF
38 if [[ "$(vercmp "$2" 1.26.0-1)" -lt 0 ]]; then
39 cat <<-EOF
40 ==> Synapse 1.26.0 includes a new database schema version.
42 If you need to downgrade, see the following document:
43 https://github.com/matrix-org/synapse/blob/v1.26.0/UPGRADE.rst#upgrading-to-v1260
44 EOF
47 if [[ "$(vercmp "$2" 1.38.0)" -lt 0 ]]; then
48 cat <<-EOF
49 ==> Synapse 1.38.0 includes a database migration that re-indexes the events table.
51 > This could result in increased disk I/O for several hours or days
52 > after upgrading while the migration completes. Furthermore,
53 > because we have to keep the old indexes until the new indexes are
54 > ready, it could result in a significant, temporary, increase in
55 > disk space.
57 See https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1380
58 EOF
61 if [[ "$(vercmp "$2" 1.41.0)" -lt 0 ]]; then
62 cat <<-EOF
63 ==> Synapse 1.41.0 changes how template directories are handled,
64 and adds a new path for media workers.
66 See https://matrix-org.github.io/synapse/v1.41/upgrade.html#upgrading-to-v1410
67 EOF
70 if [[ "$(vercmp "$2" 1.45.1)" -lt 0 ]]; then
71 cat <<-EOF
72 ==> Changes required to media storage provider modules
73 Media storage provider modules that read from the Synapse configuration
74 object (i.e. that read the value of hs.config.[...])
75 now need to specify the configuration section they're reading from.
77 see https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1450
78 EOF
81 if [[ "$(vercmp "$2" 1.51.0)" -lt 0 ]]; then
82 cat <<-EOF
83 ==> Deprecation of webclient listeners and non-HTTP(S) web_client_location
84 Listeners of type webclient are deprecated and scheduled to be removed in
85 Synapse v1.53.0.
86 Similarly, a non-HTTP(S) web_client_location configuration is deprecated
87 and will become a configuration error in Synapse v1.53.0.
88 EOF
90 if [[ "$(vercmp "$2" 1.53.0)" -lt 0 ]]; then
91 cat <<-EOF
92 ==> Dropping support for webclient listeners and non-HTTP(S) web_client_location
93 Per the deprecation notice in Synapse v1.51.0, listeners of type
94 webclient are no longer supported and configuring them is a now
95 a configuration error.
96 Configuring a non-HTTP(S) web_client_location configuration is now
97 a configuration error.
98 EOF
100 if [[ "$(vercmp "$2" 1.56.0)" -lt 0 ]]; then
101 cat <<-EOF
102 ==> Open registration without verification is now disabled by default
103 Synapse will refuse to start if registration is enabled without email,
104 captcha, or token-based verification unless the new config flag
105 enable_registration_without_verification is set to "true".
108 if [[ "$(vercmp "$2" 1.60.0)" -lt 0 ]]; then
109 cat <<-EOF
110 ==> Adding a new unique index to state_group_edges could fail if your database is corrupted
111 see: https://github.com/matrix-org/synapse/blob/develop/docs/upgrade.md#adding-a-new-unique-index-to-state_group_edges-could-fail-if-your-database-is-corrupted
112 for mor information.
115 if [[ "$(vercmp "$2" 1.66.0)" -lt 0 ]]; then
116 cat <<-EOF
117 ==> Delegation of email validation no longer supported
118 see: https://matrix-org.github.io/synapse/v1.66/upgrade.html#delegation-of-email-validation-no-longer-supported
119 for mor information.
122 if [[ "$(vercmp "$2" 1.76.0)" -lt 0 ]]; then
123 cat <<-EOF
124 ==> The upgrade from 1.75 to 1.76 changes the account data replication streams in a backwards-incompatible manner
125 see: https://github.com/matrix-org/synapse/blob/release-v1.76/docs/upgrade.md#changes-to-the-account-data-replication-streams
126 for mor information.