matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.79k stars 2.13k forks source link

Debian/Ubuntu package versions aren't lexicographically ordered across OS releases #13553

Open ilmari opened 2 years ago

ilmari commented 2 years ago

Description

The versions of the Debian/Ubuntu packages use the codename in the build version, which aren't necessarily monotonic. This means that when upgrading from one OS version to the next, Synapse won't be upgraded to the matching version unless the codenames happen to be in alphabetical order (which they usually are on Ubuntu, but not on Debian).

Steps to reproduce

To fix this, use the OS version number in the build number, instead of the codename, e.g. 1.65.0-1.mxo11+1 for Debian 11 (Bullseye), and 1.65.0-1.mxo22.04+1 for Ubuntu 22.04 (Jammy Jellyfish).

Homeserver

N/A

Synapse Version

N/A

Installation Method

Debian packages from packages.matrix.org

Platform

Debian/Ubuntu

Relevant log output

N/A

Anything else that would be useful to know?

No response

richvdh commented 2 years ago

Yup. I think fixing this just requires changing this line to use $(lsb_release -rs) instead of $DIST.

richvdh commented 2 years ago

oh, we'd want to include "debian" or "ubuntu" in there too.

ilmari commented 2 years ago

Richard van der Hoff @.***> writes:

oh, we'd want to include "debian" or "ubuntu" in there too.

I don't think that's necessary, since they have different version formats, and the packages are in different archive suites.

I was basing the version format on the one used by apt.postgresql.org (which is managed by the Debian PostgreSQL maintainer, who knows what they're doing), and they support both Debian and Ubuntu without the distro name in the version.

richvdh commented 2 years ago

not necessary, just clearer imho.

(why mxo?)

ilmari commented 2 years ago

Richard van der Hoff @.***> writes:

not necessary, just clearer imho.

(why mxo?)

Short for matrix.org, to indicate the origin of the packge. Similarly to how apt.postgresql.org uses pgdg (PostgreSQL Global Development Group) and backports.debian.org uses bpo (formerly backports.org).