-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update debian scripts for debhelper-compat 12 #9792
Conversation
This is part removing support for Debian Stretch and Ubuntu Xenial following the end of life for Python 3.5. Other notable changes: - Architecture is set to `any` to allow (but not mandate) ARM builds - The dh-virtualenv Dockerfile was overhauled to more closely follow the example provided upstream, including a necessary tweak to ensure builds work on Ubuntu bionic. Signed-off-by: Dan Callahan <danc@element.io>
Looking at the artifacts produced for Buster (and excluding expected changes like timestamps and checksums, eggs vs wheels), here's what's different:
Otherwise, everything else is effectively identical. All other modifications are as seen in this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll admit that I'm not very confident reviewing deb build scripts, but nothing added here looks inherently wrong.
Attempting to build the image and then a .deb
with that image using distro=bionic
worked flawlessly on my machine.
$ docker build --build-arg distro=ubuntu:bionic -t callahad/synapse-deb -f docker/Dockerfile-dhvirtualenv .
$ docker run -v /path/to/synapse/checkout:/synapse/source -v /output/deb/dir:/debs callahad/synapse-deb
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Signed-off-by: Dan Callahan <danc@element.io>
SyTest flaked, re-running. Otherwise everything is green.
|
Signed-off-by: Dan Callahan <danc@element.io>
Looks like this is to be expected with the move to just using |
This file goes away with dh_installsystemd and the removal of sysv init. Our systemd service files will still read and use it if present. Signed-off-by: Dan Callahan <danc@element.io>
Another flakey sytest, on the
|
This time the flakey SyTest was on Details
|
interest-noawait /usr/bin/python3.8 | ||
interest-noawait /usr/bin/python3.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum; the fact we forgot to do this sooner isn't good. I wonder if we should add a comment somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or build this dynamically?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say we could generate this based on our Trove classifiers, but... 😉
@@ -5,7 +5,7 @@ Description=Synapse Matrix homeserver | |||
Type=notify | |||
User=matrix-synapse | |||
WorkingDirectory=/var/lib/matrix-synapse | |||
EnvironmentFile=/etc/default/matrix-synapse | |||
EnvironmentFile=-/etc/default/matrix-synapse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the logic behind removing /etc/default/matrix-synapse
?
it feels odd to remove the file but leave this in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still suggest people use it in our docs, so we might as well still honor it if present. Plus, existing installations may depend on its behavior.
Systemd upstream considers EnvironmentFile
as hack that would ideally go away, but there's no clear replacement other than directly editing the Synapse config or overriding the systemd unit file locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly I feel like if we're going to leave the EnvironmentFile
directive in place, we should probably also leave an example file there too. In my experience people get scared when they discover a config file doesn't exist at all.
I don't feel too strongly about it though.
%: | ||
dh $@ --with python-virtualenv --with systemd | ||
dh $@ --with python-virtualenv --buildsystem=pybuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to my future self: previously we used the python_distutils
build system; switching to pybuild
matches the recommendation at https://wiki.debian.org/Python/LibraryStyleGuide. I don't think there was a good reason why we used python_distutils
, other than that it was the default.
Also: |
Yep, but that's part of the pull request itself -- that comment was trying to call attention to the additional changes in the generated artifacts above and beyond what's evident in the PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might as well merge this rather than get hung up on the fine details. OTOH the changelog is now out of date.
lgtm once the changelog is updated.
@@ -1,6 +1,7 @@ | |||
matrix-synapse-py3 (1.31.0+nmu1) UNRELEASED; urgency=medium | |||
|
|||
* Skip tests when DEB_BUILD_OPTIONS contains "nocheck". | |||
* Update Debian build scripts for debhelper-compat level 12. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs moving to the right version, since the world has moved on in the last couple of months
(Holding this back until the 1.36 RC is branched; I'd like to couple this PR with one to actually build debs in CI) |
1.36 has been both branched and released |
@callahad is this still on your radar? |
I think much of this got re-done for #10429. |
I'm going to close this, because I think most of it is redundant now. |
This is part removing support for Debian Stretch and Ubuntu Xenial
following the end of life for Python 3.5.
Other notable changes:
Architecture is set to
any
to allow (but not mandate) ARM buildsThe dh-virtualenv Dockerfile was overhauled to more closely follow the
example provided upstream, including a necessary tweak to ensure
builds work on Ubuntu bionic.
Signed-off-by: Dan Callahan danc@element.io
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.