anonymousland-synapse/debian
Dan Callahan fa6deb298b
Fix failures in Debian packaging (#9079)
Debian package builds were failing for two reasons:

 1. Python versions prior to 3.7 throw exceptions when attempting to print
    Unicode characters under a "C" locale. (#9076)

 2. We depended on `dh-systemd` which no longer exists in Debian Bullseye, but
    is necessary in Ubuntu Xenial. (#9073)

Setting `LANG="C.UTF-8"` in the build environment fixes the first issue.
See also: https://bugs.python.org/issue19846

The second issue is a bit trickier. The dh-systemd package was merged into
debhelper version 9.20160709 and a transitional package left in its wake.

The transitional dh-systemd package was removed in Debian Bullseye.

However, Ubuntu Xenial ships an older debhelper, and still needs dh-systemd.

Thus, builds were failing on Bullseye since we depended on a package which had
ceased existing, but we couldn't remove it from the debian/control file and our
build scripts because we still needed it for Ubuntu Xenial.

We can fix the debian/control issue by listing dh-systemd as an alternative to
the newer versions of debhelper. Since dh-systemd declares that it depends on
debhelper, Ubuntu Xenial will select its older dh-systemd which will in turn
pull in its older debhelper, resulting in no change from the status quo. All
other supported releases will satisfy the debhelper dependency constraint and
skip the dh-systemd alternative.

Build scripts were fixed by unconditionally attempting to install dh-systemd on
all releases and suppressing failures.

Once we drop support for Ubuntu Xenial, we can revert most of this commit and
rely on the version constraint on debhelper in debian/control.

Fixes #9076
Fixes #9073

Signed-off-by: Dan Callahan <danc@element.io>
2021-01-12 14:15:04 +00:00
..
po Add information about .well-known to Debian installation. (#7227) 2020-04-06 17:02:44 -04:00
source Debian packaging via dh_virtualenv (#4285) 2018-12-20 11:33:29 +00:00
test Some vagrant hackery for testing the debs 2019-05-17 12:56:46 +01:00
.gitignore Debian packaging via dh_virtualenv (#4285) 2018-12-20 11:33:29 +00:00
build_virtualenv Explicitly install test dependencies when building deb packages (#8523) 2020-10-12 17:44:11 +01:00
changelog Fix failures in Debian packaging (#9079) 2021-01-12 14:15:04 +00:00
compat import from package-debian-synapse 2018-12-20 11:15:52 +00:00
control Fix failures in Debian packaging (#9079) 2021-01-12 14:15:04 +00:00
copyright Debian packaging via dh_virtualenv (#4285) 2018-12-20 11:33:29 +00:00
dirs import from package-debian-synapse 2018-12-20 11:15:52 +00:00
hash_password.1 import from package-debian-synapse 2018-12-20 11:15:52 +00:00
hash_password.ronn import from package-debian-synapse 2018-12-20 11:15:52 +00:00
install Automate generation of the sample and debian log configs (#6627) 2020-01-03 17:14:00 +00:00
manage_debconf.pl Debian: fix overwriting of config settings on upgrade (#4696) 2019-02-22 15:02:39 +00:00
manpages import from package-debian-synapse 2018-12-20 11:15:52 +00:00
matrix-synapse-py3.config Debian package: fix warning during preconfiguration. 2019-03-07 07:18:06 +00:00
matrix-synapse-py3.links Debian packaging via dh_virtualenv (#4285) 2018-12-20 11:33:29 +00:00
matrix-synapse-py3.postinst Debian: fix overwriting of config settings on upgrade (#4696) 2019-02-22 15:02:39 +00:00
matrix-synapse-py3.preinst Debian packaging via dh_virtualenv (#4285) 2018-12-20 11:33:29 +00:00
matrix-synapse-py3.triggers Debian packaging via dh_virtualenv (#4285) 2018-12-20 11:33:29 +00:00
matrix-synapse.default Various improvements to the docs (#7899) 2020-07-29 10:35:44 -04:00
matrix-synapse.service Update debian systemd service to use Type=notify (#8169) 2020-08-27 10:39:13 +01:00
NEWS Mention updating extensions 2018-12-20 23:32:59 +00:00
register_new_matrix_user.1 import from package-debian-synapse 2018-12-20 11:15:52 +00:00
register_new_matrix_user.ronn import from package-debian-synapse 2018-12-20 11:15:52 +00:00
rules Fix the debian build in a better way. (#7212) 2020-04-03 10:23:36 +01:00
synapse_port_db.1 import from package-debian-synapse 2018-12-20 11:15:52 +00:00
synapse_port_db.ronn import from package-debian-synapse 2018-12-20 11:15:52 +00:00
synctl.1 import from package-debian-synapse 2018-12-20 11:15:52 +00:00
synctl.ronn Various improvements to the docs (#7899) 2020-07-29 10:35:44 -04:00
templates Add information about .well-known to Debian installation. (#7227) 2020-04-06 17:02:44 -04:00