element-hq / element-hq/synapse

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

Open
#13,553 0 comments 0 reactions 0 assignees View on GitHub
A-Packaging O-Uncommon S-Minor T-Task Z-Help-Wanted
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#13553](https://github.com/matrix-org/synapse/issues/13553).

---

### 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

- Install `matrix-synapse-py3` from packages.matrix.org on Debian Buster
- Upgrade to Bullseye, adjusting the codename in `/etc/apt/sources.list.d/matrix-org.list`
- Note that `matrix-synapse-py3` is still the Buster version

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

```shell
N/A
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the Debian package build and version-generation process used for packages.matrix.org, then reproduce the upgrade from Debian Buster to Bullseye by changing /etc/apt/sources.list.d/matrix-org.list. Done means package versions use numeric OS release values, such as m̈xo11 or mxo22.04, so APT selects the matching package across OS upgrades.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, python, ubuntu
Domain
build-system, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.