summarylogtreecommitdiffstats
path: root/synapse.install
blob: 60a066619faa48a45c796955e5bcad04433bbc6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash

# arg 1:  the new package version
post_install() {
	if [[ ! -e /etc/synapse/homeserver.yaml ]]; then
		cat <<-EOF
		==> A synapse configuration file needs to be generated before you can
		    start synapse, and you should make sure that it's readable by the
		    synapse user.

		    cd /var/lib/synapse
		    sudo -u synapse python -m synapse.app.homeserver \\
		      --server-name my.domain.name \\
		      --config-path /etc/synapse/homeserver.yaml \\
		      --generate-config \\
		      --report-stats=yes

		    N.B.: The default synapse config enables the webclient feature.
		          You need to either disable it, install the syweb python package
		          from matrix-angular-sdk, or set 'web_client_location' to a path
		          to make synapse not try to serve it using syweb.
		EOF
	fi
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
	if [[ "$(vercmp "$2" 1.4.0-2)" -lt 0 ]]; then
		cat <<-EOF
		==> Upstream email templates are no longer available in /var/lib/synapse/res/templates.

		    If you want to customize the templates, you can copy the default ones from
		    /usr/lib/python3.x/site-packages/synapse/res/templates/
		EOF
	fi

	if [[ "$(vercmp "$2" 1.26.0-1)" -lt 0 ]]; then
		cat <<-EOF
		==> Synapse 1.26.0 includes a new database schema version.

		    If you need to downgrade, see the following document:
		    https://github.com/matrix-org/synapse/blob/v1.26.0/UPGRADE.rst#upgrading-to-v1260
		EOF
	fi

	if [[ "$(vercmp "$2" 1.38.0)" -lt 0 ]]; then
		cat <<-EOF
		==> Synapse 1.38.0 includes a database migration that re-indexes the events table.

		    > This could result in increased disk I/O for several hours or days
		    > after upgrading while the migration completes. Furthermore,
		    > because we have to keep the old indexes until the new indexes are
		    > ready, it could result in a significant, temporary, increase in
		    > disk space.

		    See https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1380
		EOF
	fi

	if [[ "$(vercmp "$2" 1.41.0)" -lt 0 ]]; then
		cat <<-EOF
		==> Synapse 1.41.0 changes how template directories are handled,
		    and adds a new path for media workers.

		    See https://matrix-org.github.io/synapse/v1.41/upgrade.html#upgrading-to-v1410
		EOF
	fi

	if [[ "$(vercmp "$2" 1.45.1)" -lt 0 ]]; then
		cat <<-EOF
		==> Changes required to media storage provider modules
		    Media storage provider modules that read from the Synapse configuration
		    object (i.e. that read the value of hs.config.[...])
		    now need to specify the configuration section they're reading from.

		    see https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1450
		EOF
	fi

	if [[ "$(vercmp "$2" 1.51.0)" -lt 0 ]]; then
		cat <<-EOF
		==> Deprecation of webclient listeners and non-HTTP(S) web_client_location
		    Listeners of type webclient are deprecated and scheduled to be removed in
		    Synapse v1.53.0.
		    Similarly, a non-HTTP(S) web_client_location configuration is deprecated
		    and will become a configuration error in Synapse v1.53.0.
		EOF
	fi
	if [[ "$(vercmp "$2" 1.53.0)" -lt 0 ]]; then
		cat <<-EOF
		==> Dropping support for webclient listeners and non-HTTP(S) web_client_location
		    Per the deprecation notice in Synapse v1.51.0, listeners of type
		    webclient are no longer supported and configuring them is a now
		    a configuration error.
		    Configuring a non-HTTP(S) web_client_location configuration is now
		    a configuration error.
		EOF
	fi
	if [[ "$(vercmp "$2" 1.56.0)" -lt 0 ]]; then
		cat <<-EOF
		==> Open registration without verification is now disabled by default
		    Synapse will refuse to start if registration is enabled without email,
		    captcha, or token-based verification unless the new config flag
		    enable_registration_without_verification is set to "true".
		EOF
	fi
	if [[ "$(vercmp "$2" 1.60.0)" -lt 0 ]]; then
		cat <<-EOF
		==> Adding a new unique index to state_group_edges could fail if your database is corrupted
		    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
		    for mor information.
		EOF
	fi
	if [[ "$(vercmp "$2" 1.66.0)" -lt 0 ]]; then
		cat <<-EOF
		==> Delegation of email validation no longer supported
		    see: https://matrix-org.github.io/synapse/v1.66/upgrade.html#delegation-of-email-validation-no-longer-supported
		    for mor information.
		EOF
	fi
	if [[ "$(vercmp "$2" 1.76.0)" -lt 0 ]]; then
		cat <<-EOF
		==> The upgrade from 1.75 to 1.76 changes the account data replication streams in a backwards-incompatible manner
		    see: https://github.com/matrix-org/synapse/blob/release-v1.76/docs/upgrade.md#changes-to-the-account-data-replication-streams
		    for mor information.
		EOF
	fi
	if [[ "$(vercmp "$2" 1.88.0)" -lt 0 ]]; then
		cat <<-EOF
		==> The 'worker_replication_*' settings that have been deprecated since v1.84.0 were removed in v1.88.0.
		    see: https://github.com/matrix-org/synapse/blob/release-v1.88/docs/upgrade.md#upgrading-to-v1880
		    for mor information.
		EOF
	fi
}