diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..700f50a --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,8 @@ +/matrix-synapse-py3.*.debhelper +/matrix-synapse-py3.debhelper.log +/matrix-synapse-py3.substvars +/matrix-synapse-*/ +/files +/debhelper-build-stamp +/source/ +/.debhelper diff --git a/debian/build_debian.sh b/debian/build_debian.sh new file mode 100644 index 0000000..4c27c48 --- /dev/null +++ b/debian/build_debian.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +dpkg-buildpackage -us -uc -b + +cp ../*.deb /synapse/build/debs \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 2016797..9733ca0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,630 +1,5 @@ -matrix-synapse (0.33.9-1matrix1) stretch; urgency=medium +matrix-synapse-py3 (0.33.9) stretch; urgency=medium - [ Erik Johnston ] - * Remove dependency on python-pydenticon - - [ Richard van der Hoff ] * New upstream version 0.33.9 - * Refresh patches for 0.33.9 - - -- Richard van der Hoff Tue, 20 Nov 2018 10:26:05 +0000 - -matrix-synapse (0.33.8-1) stretch; urgency=medium - - * New upstream version 0.33.8 - - -- Erik Johnston Thu, 01 Nov 2018 14:33:26 +0000 - -matrix-synapse (0.33.7-1matrix1) stretch; urgency=medium - - * New upstream version 0.33.7 - - -- Richard van der Hoff Thu, 18 Oct 2018 16:18:26 +0100 - -matrix-synapse (0.33.6-1matrix1) stretch; urgency=medium - - * Imported Upstream version 0.33.6 - * Remove redundant explicit dep on python-bcrypt - * Run the tests during build - * Add dependency on python-attr 16.0 - * Refresh patches for 0.33.6 - - -- Richard van der Hoff Thu, 04 Oct 2018 14:40:29 +0100 - -matrix-synapse (0.33.5.1-1matrix1) stretch; urgency=medium - - * Imported Upstream version 0.33.5.1 - - -- Richard van der Hoff Mon, 24 Sep 2018 18:20:51 +0100 - -matrix-synapse (0.33.5-1matrix1) stretch; urgency=medium - - * Imported Upstream version 0.33.5 - - -- Richard van der Hoff Mon, 24 Sep 2018 16:06:23 +0100 - -matrix-synapse (0.33.4-1mx1) stretch; urgency=medium - - * Imported Upstream version 0.33.4 - * Avoid telling people to install packages with pip - (fixes https://github.com/matrix-org/synapse/issues/3743) - - -- Richard van der Hoff Fri, 07 Sep 2018 14:06:17 +0100 - -matrix-synapse (0.33.3.1-1mx1) stretch; urgency=critical - - [ Richard van der Hoff ] - * Imported Upstream version 0.33.3.1 - - -- Richard van der Hoff Thu, 06 Sep 2018 11:20:37 +0100 - -matrix-synapse (0.33.3-2) stretch; urgency=medium - - * We now require python-twisted 17.1.0 or later - * Add recommendations for python-psycopg2 and python-lxml - - -- Richard van der Hoff Thu, 23 Aug 2018 19:04:08 +0100 - -matrix-synapse (0.33.3-1) jessie; urgency=medium - - * New upstream version 0.33.3 - - -- Richard van der Hoff Wed, 22 Aug 2018 14:50:30 +0100 - -matrix-synapse (0.33.2-1) jessie; urgency=medium - - * New upstream version 0.33.2 - - -- Richard van der Hoff Thu, 09 Aug 2018 15:40:42 +0100 - -matrix-synapse (0.33.1-1) jessie; urgency=medium - - * New upstream version 0.33.1 - - -- Erik Johnston Thu, 02 Aug 2018 15:52:19 +0100 - -matrix-synapse (0.33.0-1) jessie; urgency=medium - - * New upstream version 0.33.0 - - -- Richard van der Hoff Thu, 19 Jul 2018 13:38:41 +0100 - -matrix-synapse (0.32.1-1) jessie; urgency=medium - - * New upstream version 0.32.1 - - -- Richard van der Hoff Fri, 06 Jul 2018 17:16:29 +0100 - -matrix-synapse (0.32.0-1) jessie; urgency=medium - - * New upstream version 0.32.0 - - -- Erik Johnston Fri, 06 Jul 2018 15:34:06 +0100 - -matrix-synapse (0.31.2-1) jessie; urgency=high - - * New upstream version 0.31.2 - - -- Richard van der Hoff Thu, 14 Jun 2018 16:49:07 +0100 - -matrix-synapse (0.31.1-1) jessie; urgency=medium - - * New upstream version 0.31.1 - * Require python-prometheus-client >= 0.0.14 - - -- Richard van der Hoff Fri, 08 Jun 2018 16:11:55 +0100 - -matrix-synapse (0.31.0-1) jessie; urgency=medium - - * New upstream version 0.31.0 - - -- Richard van der Hoff Wed, 06 Jun 2018 17:23:10 +0100 - -matrix-synapse (0.30.0-1) jessie; urgency=medium - - [ Michael Kaye ] - * update homeserver.yaml to be somewhat more modern. - - [ Erik Johnston ] - * New upstream version 0.30.0 - - -- Erik Johnston Thu, 24 May 2018 16:43:16 +0100 - -matrix-synapse (0.29.0-1) jessie; urgency=medium - - * New upstream version 0.29.0 - - -- Erik Johnston Wed, 16 May 2018 17:43:06 +0100 - -matrix-synapse (0.28.1-1) jessie; urgency=medium - - * New upstream version 0.28.1 - - -- Erik Johnston Tue, 01 May 2018 19:21:39 +0100 - -matrix-synapse (0.28.0-1) jessie; urgency=medium - - * New upstream 0.28.0 - - -- Erik Johnston Fri, 27 Apr 2018 13:15:49 +0100 - -matrix-synapse (0.27.4-1) jessie; urgency=medium - - * Bump canonicaljson version - * New upstream 0.27.4 - - -- Erik Johnston Fri, 13 Apr 2018 13:37:47 +0100 - -matrix-synapse (0.27.3-1) jessie; urgency=medium - - * Report stats should default to off - * Refresh patches - * New upstream 0.27.3 - - -- Erik Johnston Wed, 11 Apr 2018 11:43:47 +0100 - -matrix-synapse (0.27.2-1) jessie; urgency=medium - - * New upstream version 0.27.2 - - -- Erik Johnston Mon, 26 Mar 2018 16:41:57 +0100 - -matrix-synapse (0.27.1-1) jessie; urgency=medium - - * New upstream version 0.27.1 - - -- Erik Johnston Mon, 26 Mar 2018 16:22:03 +0100 - -matrix-synapse (0.27.0-2) jessie; urgency=medium - - * Fix bcrypt dependency - - -- Erik Johnston Mon, 26 Mar 2018 16:00:26 +0100 - -matrix-synapse (0.27.0-1) jessie; urgency=medium - - * New upstream version 0.27.0 - - -- Erik Johnston Mon, 26 Mar 2018 15:07:52 +0100 - -matrix-synapse (0.26.1-1) jessie; urgency=medium - - * Ignore RC - * New upstream version 0.26.1 - - -- Erik Johnston Fri, 16 Mar 2018 00:40:08 +0000 - -matrix-synapse (0.26.0-1) jessie; urgency=medium - - [ Richard van der Hoff ] - * Remove `level` for `file` log handler - - [ Erik Johnston ] - - -- Erik Johnston Fri, 05 Jan 2018 11:21:26 +0000 - -matrix-synapse (0.25.1-1) jessie; urgency=medium - - * New upstream version 0.25.1 - - -- Erik Johnston Mon, 20 Nov 2017 10:05:37 +0000 - -matrix-synapse (0.25.0-1) jessie; urgency=medium - - * New upstream version 0.25.0 - - -- Erik Johnston Wed, 15 Nov 2017 11:36:32 +0000 - -matrix-synapse (0.24.1-1) jessie; urgency=medium - - * New upstream version 0.24.1 - - -- Erik Johnston Tue, 24 Oct 2017 15:05:03 +0100 - -matrix-synapse (0.24.0-1) jessie; urgency=medium - - * New upstream version 0.24.0 - - -- Erik Johnston Mon, 23 Oct 2017 14:11:46 +0100 - -matrix-synapse (0.23.1-1) xenial; urgency=medium - - * Imported upstream version 0.23.1 - - -- Erik Johnston Thu, 05 Oct 2017 15:28:25 +0100 - -matrix-synapse (0.23.0-1) jessie; urgency=medium - - * Fix patch after refactor - * Add patch to remove requirement on affinity package - * refresh webclient patch - - -- Erik Johnston Mon, 02 Oct 2017 15:34:57 +0100 - -matrix-synapse (0.22.1-1) jessie; urgency=medium - - * Imported Upstream version 0.22.1 - - -- Erik Johnston Thu, 06 Jul 2017 18:14:13 +0100 - -matrix-synapse (0.22.0-1) jessie; urgency=medium - - * Imported upstream version 0.22.0 - - -- Erik Johnston Thu, 06 Jul 2017 10:47:45 +0100 - -matrix-synapse (0.21.1-1) jessie; urgency=medium - - * Imported upstream version 0.21.1 - - -- Erik Johnston Thu, 15 Jun 2017 13:31:13 +0100 - -matrix-synapse (0.21.0-1) jessie; urgency=medium - - * Imported upstream version 0.21.0 - * Update patches - - -- Erik Johnston Thu, 18 May 2017 14:16:54 +0100 - -matrix-synapse (0.20.0-2) jessie; urgency=medium - - * Depend on python-jsonschema - - -- Erik Johnston Wed, 12 Apr 2017 10:41:46 +0100 - -matrix-synapse (0.20.0-1) jessie; urgency=medium - - * Imported upstream version 0.20.0 - - -- Erik Johnston Tue, 11 Apr 2017 12:58:26 +0100 - -matrix-synapse (0.19.3-1) jessie; urgency=medium - - * Imported upstream version 0.19.3 - - -- Erik Johnston Tue, 21 Mar 2017 13:45:41 +0000 - -matrix-synapse (0.19.2-1) jessie; urgency=medium - - [ Sunil Mohan Adapa ] - * Bump standards version to 3.9.8 - * Add debian/copyright file - * Don't ignore errors in debian/config - * Reformat depenedencies in debian/control - * Internationalize strings in template file - * Update package description - * Add lsb-base as dependency - * Update questions for debconf style - * Add man pages for all binaries - - [ Erik Johnston ] - * Imported upstream version 0.19.2 - - -- Erik Johnston Tue, 21 Feb 2017 13:55:00 +0000 - -matrix-synapse (0.19.1-1) jessie; urgency=medium - - * Imported upstream version 0.19.1 - - -- Erik Johnston Thu, 09 Feb 2017 11:53:27 +0000 - -matrix-synapse (0.19.0-1) jessie; urgency=medium - - This build requires python-twisted 0.19.0, which may need to be installed - from backports. - - [ Bryce Chidester ] - * Add EnvironmentFile to the systemd service - * Create matrix-synapse.default - - [ Erik Johnston ] - * Imported upstream version 0.19.0 - - -- Erik Johnston Sat, 04 Feb 2017 09:58:29 +0000 - -matrix-synapse (0.18.7-1) trusty; urgency=medium - - * Imported Upstream version 0.18.4 - - -- Erik Johnston Mon, 09 Jan 2017 15:10:21 +0000 - -matrix-synapse (0.18.5-1) trusty; urgency=medium - - * Imported Upstream version 0.18.5 - - -- Erik Johnston Fri, 16 Dec 2016 10:51:59 +0000 - -matrix-synapse (0.18.4-1) trusty; urgency=medium - - * Imported Upstream version 0.18.4 - - -- Erik Johnston Tue, 22 Nov 2016 10:33:41 +0000 - -matrix-synapse (0.18.3-1) trusty; urgency=medium - - * Imported Upstream version 0.18.3 - * Remove upstreamed ldap3 patch - - -- Erik Johnston Tue, 08 Nov 2016 15:01:49 +0000 - -matrix-synapse (0.18.2-2) trusty; urgency=high - - * Patch ldap3 support to workaround differences in python-ldap3 0.9, - bug allowed unauthorized logins if ldap3 0.9 was used. - - -- Erik Johnston Tue, 08 Nov 2016 13:48:09 +0000 - -matrix-synapse (0.18.2-1) trusty; urgency=medium - - * Imported Upstream version 0.18.2 - - -- Erik Johnston Tue, 01 Nov 2016 13:30:45 +0000 - -matrix-synapse (0.18.1-1) trusty; urgency=medium - - * Imported Upstream version 0.18.1 - - -- Erik Johnston Wed, 05 Oct 2016 14:52:53 +0100 - -matrix-synapse (0.18.0-1) trusty; urgency=medium - - * Imported Upstream version 0.18.0 - - -- Erik Johnston Mon, 19 Sep 2016 17:38:48 +0100 - -matrix-synapse (0.17.3-1) trusty; urgency=medium - - * Imported Upstream version 0.17.3 - - -- Erik Johnston Fri, 09 Sep 2016 11:18:18 +0100 - -matrix-synapse (0.17.2-1) trusty; urgency=medium - - * Imported Upstream version 0.17.2 - - -- Erik Johnston Thu, 08 Sep 2016 15:37:14 +0100 - -matrix-synapse (0.17.1-1) trusty; urgency=medium - - * Imported Upstream version 0.17.1 - - -- Erik Johnston Wed, 24 Aug 2016 15:11:29 +0100 - -matrix-synapse (0.17.0-1) trusty; urgency=medium - - * Imported Upstream version 0.17.0 - - -- Erik Johnston Mon, 08 Aug 2016 13:56:15 +0100 - -matrix-synapse (0.16.1-r1-1) trusty; urgency=medium - - * Imported Upstream version 0.16.1-r1 - - -- Erik Johnston Fri, 08 Jul 2016 16:47:35 +0100 - -matrix-synapse (0.16.1-2) trusty; urgency=critical - - * Apply security patch - - -- Erik Johnston Fri, 08 Jul 2016 11:05:27 +0100 - -matrix-synapse (0.16.1-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Tue, 21 Jun 2016 14:56:48 +0100 - -matrix-synapse (0.16.0-3) trusty; urgency=medium - - * Don't require strict nacl==0.3.0 requirement - - -- Erik Johnston Mon, 20 Jun 2016 13:24:22 +0100 - -matrix-synapse (0.16.0-2) trusty; urgency=medium - - * Also change the permissions of /etc/matrix-synapse - * Add apt webclient instructions - * Fix up patches - * Update default homeserver.yaml - * Add patch - - -- Erik Johnston Fri, 10 Jun 2016 14:06:20 +0100 - -matrix-synapse (0.16.0-1) trusty; urgency=medium - - [ David A Roberts ] - * systemd - - [ Erik Johnston ] - * Fixup postinst and matrix-synapse.service - * Handle email optional deps - * New upstream release - - -- Erik Johnston Thu, 09 Jun 2016 16:17:01 +0100 - -matrix-synapse (0.14.0-1) trusty; urgency=medium - - * Remove saml2 module requirements - - -- Erik Johnston Wed, 30 Mar 2016 14:31:17 +0100 - -matrix-synapse (0.13.3-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Thu, 11 Feb 2016 16:35:39 +0000 - -matrix-synapse (0.13.2-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Thu, 11 Feb 2016 11:01:16 +0000 - -matrix-synapse (0.13.0-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Wed, 10 Feb 2016 16:34:39 +0000 - -matrix-synapse (0.12.0-2) trusty; urgency=medium - - * Don't default `registerion_shared_secret` config option - - -- Erik Johnston Wed, 06 Jan 2016 16:34:02 +0000 - -matrix-synapse (0.12.0-1) stable; urgency=medium - - * Imported Upstream version 0.12.0 - - -- Mark Haines Mon, 04 Jan 2016 15:38:33 +0000 - -matrix-synapse (0.11.1-1) unstable; urgency=medium - - * Imported Upstream version 0.11.1 - - -- Erik Johnston Fri, 20 Nov 2015 17:56:52 +0000 - -matrix-synapse (0.11.0-r2-1) stable; urgency=medium - - * Imported Upstream version 0.11.0-r2 - * Add gbp.conf - - -- Erik Johnston Thu, 19 Nov 2015 13:52:36 +0000 - -matrix-synapse (0.11.0-1) wheezy; urgency=medium - - * Fix dependencies. - - -- Erik Johnston Tue, 17 Nov 2015 16:28:06 +0000 - -matrix-synapse (0.11.0-0) wheezy; urgency=medium - - * New upstream release - - -- Erik Johnston Tue, 17 Nov 2015 16:03:01 +0000 - -matrix-synapse (0.10.0-2) wheezy; urgency=medium - - * Rebuild for wheezy. - - -- Erik Johnston Fri, 04 Sep 2015 14:21:03 +0100 - -matrix-synapse (0.10.0-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Thu, 03 Sep 2015 10:08:34 +0100 - -matrix-synapse (0.10.0~rc6-3) trusty; urgency=medium - - * Create log directory. - - -- Erik Johnston Wed, 02 Sep 2015 17:49:07 +0100 - -matrix-synapse (0.10.0~rc6-2) trusty; urgency=medium - - * Add patch to work around upstream bug in config directory handling. - - -- Erik Johnston Wed, 02 Sep 2015 17:42:42 +0100 - -matrix-synapse (0.10.0~rc6-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Wed, 02 Sep 2015 17:21:21 +0100 - -matrix-synapse (0.10.0~rc5-3) trusty; urgency=medium - - * Update init script to work. - - -- Erik Johnston Fri, 28 Aug 2015 10:51:56 +0100 - -matrix-synapse (0.10.0~rc5-2) trusty; urgency=medium - - * Fix where python files are installed. - - -- Erik Johnston Thu, 27 Aug 2015 11:55:39 +0100 - -matrix-synapse (0.10.0~rc5-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Thu, 27 Aug 2015 11:26:54 +0100 - -matrix-synapse (0.10.0~rc4-1) trusty; urgency=medium - - * New upstream version. - - -- Erik Johnston Thu, 27 Aug 2015 10:29:31 +0100 - -matrix-synapse (0.10.0~rc3-7) trusty; urgency=medium - - * Add debian/watch - - -- Erik Johnston Wed, 26 Aug 2015 17:57:08 +0100 - -matrix-synapse (0.10.0~rc3-6) trusty; urgency=medium - - * Deps. - - -- Erik Johnston Wed, 26 Aug 2015 17:07:13 +0100 - -matrix-synapse (0.10.0~rc3-5) trusty; urgency=medium - - * Deps. - - -- Erik Johnston Wed, 26 Aug 2015 16:18:02 +0100 - -matrix-synapse (0.10.0~rc3-4) trusty; urgency=medium - - * More deps. - - -- Erik Johnston Wed, 26 Aug 2015 14:09:27 +0100 - -matrix-synapse (0.10.0~rc3-3) trusty; urgency=medium - - * Update deps. - - -- Erik Johnston Wed, 26 Aug 2015 13:49:20 +0100 - -matrix-synapse (0.10.0~rc3-2) trusty; urgency=medium - - * Add more deps. - - -- Erik Johnston Wed, 26 Aug 2015 13:25:45 +0100 - -matrix-synapse (0.10.0~rc3-1) trusty; urgency=medium - - * New upstream release - - -- Erik Johnston Tue, 25 Aug 2015 17:52:33 +0100 - -matrix-synapse (0.9.3-1~trusty1) trusty; urgency=medium - - * Rebuild for trusty. - - -- Erik Johnston Thu, 20 Aug 2015 15:05:43 +0100 - -matrix-synapse (0.9.3-1) wheezy; urgency=medium - - * New upstream release - * Create a user, "matrix-synapse", to run as - * Log to /var/log/matrix-synapse/ directory - * Override the way synapse looks for the angular SDK (syweb) so it finds the - packaged one - - -- Paul "LeoNerd" Evans Fri, 07 Aug 2015 15:32:12 +0100 - -matrix-synapse (0.9.2-2) wheezy; urgency=medium - - * Supply a default config file - * Create directory in /var/lib - * Use debconf to ask the user for the server name at installation time - - -- Paul "LeoNerd" Evans Thu, 06 Aug 2015 15:28:00 +0100 - -matrix-synapse (0.9.2-1) wheezy; urgency=low - - * source package automatically created by stdeb 0.8.2 - -- Paul "LeoNerd" Evans Fri, 12 Jun 2015 14:32:03 +0100 + -- Amber Tue, 27 Nov 2018 14:33:26 +0000 \ No newline at end of file diff --git a/debian/config b/debian/config index 9fb6913..009e39c 100755 --- a/debian/config +++ b/debian/config @@ -4,6 +4,6 @@ set -e . /usr/share/debconf/confmodule -db_input high matrix-synapse/server-name || true -db_input high matrix-synapse/report-stats || true +db_input high matrix-synapse-py3/server-name || true +db_input high matrix-synapse-py3/report-stats || true db_go diff --git a/debian/control b/debian/control index 854d968..318516d 100644 --- a/debian/control +++ b/debian/control @@ -1,77 +1,35 @@ -Source: matrix-synapse -Maintainer: Erik Johnston -Section: python -Priority: optional +Source: matrix-synapse-py3 +Section: contrib/python +Priority: extra +Maintainer: Synapse Developers Build-Depends: - debhelper (>= 9), - dh-python, - dh-systemd (>= 1.5), - po-debconf, - python (>= 2.6.6-3), - python-bcrypt, - python-blist, - python-canonicaljson (>=1.1.3), - python-daemonize, - python-frozendict (>= 0.4), - python-lxml, - python-mock, - python-msgpack (>=0.3.0), - python-nacl (>= 0.3.0), - python-netaddr, - python-openssl (>= 0.14), - python-pil, - python-psutil, - python-pyasn1, - python-pydenticon, - python-pymacaroons-pynacl, - python-pysaml2, - python-service-identity (>= 1.0.0), - python-setuptools (>= 0.6b3), - python-signedjson (>= 1.0.0), - python-sortedcontainers, - python-syutil (>= 0.0.7), - python-treq (>= 15.1.0), - python-twisted (>= 17.1.0), - python-unpaddedbase64 (>= 1.0.1), - python-yaml, - python-phonenumbers (>= 8.2.0), - python-jsonschema (>=2.5.1), - python-prometheus-client, - python-attr -Standards-Version: 3.9.8 -X-Python-Version: >= 2.7 + debhelper (>= 9), + dh-virtualenv (>= 0.10), + libffi-dev, + libjpeg-dev, + libssl-dev, + libxslt1-dev, + lsb-release, + python3-dev, + python3, + tar, +Standards-Version: 3.9.5 +Homepage: https://github.com/matrix-org/synapse -Package: matrix-synapse -Architecture: all +Package: matrix-synapse-py3 +Architecture: any +Pre-Depends: dpkg (>= 1.16.1) Depends: - ${misc:Depends}, - ${python:Depends}, - adduser, - debconf, - lsb-base (>= 3.0-6), - python-attr (>= 16.0.0), - python-twisted (>= 17.1.0), - python-canonicaljson (>=1.1.3), - python-prometheus-client (>=0.0.14), -Suggests: - python-bleach (>= 1.4.2), - python-jinja2 (>= 2.8), -Recommends: - python-psycopg2, - python-lxml, + adduser, + libffi6, + libjpeg-turbo8, + libpq5, + libxslt1.1, + openssl, + python3-distutils, + python3, + sqlite3, Description: Open federated Instant Messaging and VoIP server Matrix is an ambitious new ecosystem for open federated Instant Messaging and VoIP. Synapse is a reference Matrix server - implementation. - . - Everything in Matrix happens in a room. Rooms are distributed and do - not exist on any single server. Rooms can be located using - convenience aliases like #matrix:matrix.org or #test:localhost:8448. - . - Matrix user IDs look like @matthew:matrix.org (although in the future - you will normally refer to yourself and others using a 3PID: email - address, phone number, etc rather than manipulating Matrix user IDs) - . - The overall architecture is: - client <------> homeserver <=============> homeserver <------> client - https://a.org/_matrix https://b.net/_matrix + implementation. \ No newline at end of file diff --git a/debian/copyright b/debian/copyright index 35597e0..95c21ea 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,7 +3,7 @@ Upstream-Name: synapse Source: https://github.com/matrix-org/synapse Files: * -Copyright: 2014-2017, OpenMarket Ltd +Copyright: 2014-2017, OpenMarket Ltd, 2017-2018 New Vector Ltd License: Apache-2.0 Files: synapse/config/saml2.py diff --git a/debian/gbp.conf b/debian/gbp.conf deleted file mode 100644 index 0432acc..0000000 --- a/debian/gbp.conf +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -debian-branch = debian - -[dch] -distribution = stable diff --git a/debian/install b/debian/install index d1f42c8..d4427cf 100644 --- a/debian/install +++ b/debian/install @@ -1,2 +1,3 @@ -debian/homeserver.yaml etc/matrix-synapse -debian/log.yaml etc/matrix-synapse +../homeserver.yaml etc/matrix-synapse +../log.yaml etc/matrix-synapse +../*.service lib/systemd/system \ No newline at end of file diff --git a/debian/matrix-synapse.default b/debian/matrix-synapse-py3.default similarity index 100% rename from debian/matrix-synapse.default rename to debian/matrix-synapse-py3.default diff --git a/debian/matrix-synapse-py3.links b/debian/matrix-synapse-py3.links new file mode 100644 index 0000000..90d9821 --- /dev/null +++ b/debian/matrix-synapse-py3.links @@ -0,0 +1,4 @@ +opt/venvs/matrix-synapse/bin/hash_password usr/bin/hash_password +opt/venvs/matrix-synapse/bin/register_new_matrix_user usr/bin/register_new_matrix_user +opt/venvs/matrix-synapse/bin/synapse_port_db usr/bin/synapse_port_db +opt/venvs/matrix-synapse/bin/synctl usr/bin/synctl \ No newline at end of file diff --git a/debian/postinst b/debian/matrix-synapse-py3.postinst old mode 100755 new mode 100644 similarity index 100% rename from debian/postinst rename to debian/matrix-synapse-py3.postinst diff --git a/debian/matrix-synapse-py3.service b/debian/matrix-synapse-py3.service new file mode 100644 index 0000000..2e9cd83 --- /dev/null +++ b/debian/matrix-synapse-py3.service @@ -0,0 +1,15 @@ +[Unit] +Description=Synapse Matrix homeserver + +[Service] +Type=simple +User=matrix-synapse +WorkingDirectory=/var/lib/matrix-synapse +EnvironmentFile=/etc/default/matrix-synapse +ExecStartPre=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys +ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target diff --git a/debian/matrix-synapse-py3.triggers b/debian/matrix-synapse-py3.triggers new file mode 100644 index 0000000..4fac39b --- /dev/null +++ b/debian/matrix-synapse-py3.triggers @@ -0,0 +1,9 @@ +# Register interest in Python interpreter changes (Python 2 for now); and +# don't make the Python package dependent on the virtualenv package +# processing (noawait) +interest-noawait /usr/bin/python3.5 +interest-noawait /usr/bin/python3.6 +interest-noawait /usr/bin/python3.7 + +# Also provide a symbolic trigger for all dh-virtualenv packages +interest dh-virtualenv-interpreter-update diff --git a/debian/matrix-synapse.init b/debian/matrix-synapse.init deleted file mode 100755 index 7a9e8b3..0000000 --- a/debian/matrix-synapse.init +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: matrix-synapse -# Required-Start: $local_fs $network $remote_fs $syslog -# Required-Stop: $local_fs $network $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: -# Description: -# <...> -# <...> -### END INIT INFO - -# Author: Paul "LeoNerd" Evans - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="matrix-synapse" -NAME=matrix-synapse -SCRIPTNAME=/etc/init.d/$NAME - -PYTHON="/usr/bin/python" -CONFIGS="--config-path /etc/matrix-synapse/homeserver.yaml --config-path /etc/matrix-synapse/conf.d/" -USER="matrix-synapse" -SHAREDIR=/var/lib/$NAME - -# Exit if the package is not installed -[ -f "/etc/matrix-synapse/homeserver.yaml" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.2-14) to ensure that this file is present -# and status_of_proc is working. -. /lib/lsb/init-functions - -get_config_key() -{ - python -m synapse.config read "$1" $CONFIGS || return 2 -} - -# -# Function that starts the daemon/service -# -do_start() -{ - # Running --generate-config to create keys if any are absent. - # Doesn't matter if not - $PYTHON -m "synapse.app.homeserver" $CONFIGS --generate-keys || return 2 - - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - PIDFILE=`get_config_key "pid_file"` - RETVAL=$? - if [ "$RETVAL" != 0 ]; then - return $RETVAL - fi - if [ -r "$PIDFILE" ]; then - kill -0 `cat $PIDFILE` && return 1 - fi - - export PYTHONPATH - - # Create the PID file so that synapse can write to it as nonroot - touch $PIDFILE - chown $USER:nogroup $PIDFILE - chown $USER:nogroup $SHAREDIR/media/ - chown $USER:nogroup $SHAREDIR/uploads/ - - start-stop-daemon --start --pidfile $PIDFILE --chuid $USER \ - --exec $PYTHON -- -m "synapse.app.homeserver" $CONFIGS --daemonize || return 2 - - return 0 -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - PIDFILE=`get_config_key "pid_file"` - RETVAL=$? - if [ "$RETVAL" != 0 ]; then - return $RETVAL - fi - - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --user $USER --exec $PYTHON - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - return 1 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - PIDFILE=`get_config_key "pid_file"` - RETVAL=$? - if [ "$RETVAL" != 0 ]; then - return $RETVAL - fi - status_of_proc -p "$PIDFILE" "$PYTHON" "$NAME" && exit 0 || exit $? - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/debian/matrix-synapse.service b/debian/matrix-synapse.service deleted file mode 100644 index ab94e07..0000000 --- a/debian/matrix-synapse.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Synapse Matrix homeserver - -[Service] -Type=simple -User=matrix-synapse -WorkingDirectory=/var/lib/matrix-synapse -EnvironmentFile=/etc/default/matrix-synapse -ExecStartPre=/usr/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys -ExecStart=/usr/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ -Restart=always -RestartSec=3 - -[Install] -WantedBy=multi-user.target diff --git a/debian/patches/0001-tox.patch b/debian/patches/0001-tox.patch deleted file mode 100644 index 2cf3ec0..0000000 --- a/debian/patches/0001-tox.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Erik Johnston -Date: Fri, 10 Jun 2016 10:57:07 +0100 -Subject: tox - ---- - tox.ini | 1 + - 1 file changed, 1 insertion(+) - -Index: package-synapse-debian/tox.ini -=================================================================== ---- package-synapse-debian.orig/tox.ini -+++ package-synapse-debian/tox.ini -@@ -1,5 +1,6 @@ - [tox] - envlist = packaging, py27, py36, pep8, check_isort -+sitepackages = True - - [base] - deps = diff --git a/debian/patches/0002-change_instructions.patch b/debian/patches/0002-change_instructions.patch deleted file mode 100644 index 933de3a..0000000 --- a/debian/patches/0002-change_instructions.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Erik Johnston -Date: Fri, 10 Jun 2016 10:57:07 +0100 -Subject: change_instructions - ---- - synapse/config/_base.py | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/synapse/config/_base.py -+++ b/synapse/config/_base.py -@@ -31,6 +31,11 @@ - MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ - Please opt in or out of reporting anonymized homeserver usage statistics, by - setting the `report_stats` key in your config file to either True or False. -+ -+To set it run: -+ -+ dpkg-reconfigure matrix-synapse -+ - """ - - MISSING_REPORT_STATS_SPIEL = """\ -@@ -45,6 +50,11 @@ - - MISSING_SERVER_NAME = """\ - Missing mandatory `server_name` config option. -+ -+To set it run: -+ -+ dpkg-reconfigure matrix-synapse -+ - """ - - diff --git a/debian/patches/0004-webclient-instructions.patch b/debian/patches/0004-webclient-instructions.patch deleted file mode 100644 index e2e61a8..0000000 --- a/debian/patches/0004-webclient-instructions.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Erik Johnston -Date: Fri, 10 Jun 2016 10:57:07 +0100 -Subject: webclient-instructions - ---- - synapse/app/homeserver.py | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -Index: package-synapse-debian/synapse/app/homeserver.py -=================================================================== ---- package-synapse-debian.orig/synapse/app/homeserver.py -+++ package-synapse-debian/synapse/app/homeserver.py -@@ -86,12 +86,11 @@ def build_resource_for_web_client(hs): - "Please either install the matrix-angular-sdk or configure\n" - "the location of the source to serve via the configuration\n" - "option `web_client_location`\n\n" -- "To install the `matrix-angular-sdk` via pip, run:\n\n" -- " pip install '%(dep)s'\n" -+ "To install the `matrix-angular-sdk` via apt-get, run:\n\n" -+ " apt-get install matrix-synapse-angular-client\n" - "\n" - "You can also disable hosting of the webclient via the\n" - "configuration option `web_client`\n" -- % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} - ) - syweb_path = os.path.dirname(syweb.__file__) - webclient_path = os.path.join(syweb_path, "webclient") diff --git a/debian/patches/0006-Don-t-require-strict-nacl-0.3.0-requirement.patch b/debian/patches/0006-Don-t-require-strict-nacl-0.3.0-requirement.patch deleted file mode 100644 index 8370c96..0000000 --- a/debian/patches/0006-Don-t-require-strict-nacl-0.3.0-requirement.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Erik Johnston -Date: Mon, 20 Jun 2016 13:20:37 +0100 -Subject: Don't require strict nacl==0.3.0 requirement - ---- - synapse/python_dependencies.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: package-synapse-debian/synapse/python_dependencies.py -=================================================================== ---- package-synapse-debian.orig/synapse/python_dependencies.py -+++ package-synapse-debian/synapse/python_dependencies.py -@@ -37,7 +37,7 @@ REQUIREMENTS = { - "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], - "canonicaljson>=1.1.3": ["canonicaljson>=1.1.3"], - "signedjson>=1.0.0": ["signedjson>=1.0.0"], -- "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], -+ "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], - "service_identity>=16.0.0": ["service_identity>=16.0.0"], - "Twisted>=17.1.0": ["twisted>=17.1.0"], - "treq>=15.1": ["treq>=15.1"], diff --git a/debian/patches/bcrypt.patch b/debian/patches/bcrypt.patch deleted file mode 100644 index a962949..0000000 --- a/debian/patches/bcrypt.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: package-synapse-debian/synapse/handlers/auth.py -=================================================================== ---- package-synapse-debian.orig/synapse/handlers/auth.py -+++ package-synapse-debian/synapse/handlers/auth.py -@@ -921,10 +921,10 @@ class AuthHandler(BaseHandler): - # Normalise the Unicode in the password - pw = unicodedata.normalize("NFKC", password) - -- return bcrypt.checkpw( -+ return bcrypt.hashpw( - pw.encode('utf8') + self.hs.config.password_pepper.encode("utf8"), - stored_hash -- ) -+ ) == stored_hash - - if stored_hash: - if not isinstance(stored_hash, bytes): -Index: package-synapse-debian/synapse/python_dependencies.py -=================================================================== ---- package-synapse-debian.orig/synapse/python_dependencies.py -+++ package-synapse-debian/synapse/python_dependencies.py -@@ -49,7 +49,7 @@ REQUIREMENTS = { - "pyasn1>=0.1.9": ["pyasn1"], - "pyasn1-modules>=0.0.7": ["pyasn1_modules"], - "daemonize>=2.3.1": ["daemonize"], -- "bcrypt>=3.1.0": ["bcrypt>=3.1.0"], -+ "bcrypt": ["bcrypt"], - "pillow>=3.1.2": ["PIL"], - "sortedcontainers>=1.4.4": ["sortedcontainers"], - "psutil>=2.0.0": ["psutil>=2.0.0"], diff --git a/debian/patches/no_install_with_pip b/debian/patches/no_install_with_pip deleted file mode 100644 index 654656f..0000000 --- a/debian/patches/no_install_with_pip +++ /dev/null @@ -1,43 +0,0 @@ -Index: package-synapse-debian/synapse/app/__init__.py -=================================================================== ---- package-synapse-debian.orig/synapse/app/__init__.py -+++ package-synapse-debian/synapse/app/__init__.py -@@ -25,8 +25,8 @@ try: - except python_dependencies.MissingRequirementError as e: - message = "\n".join([ - "Missing Requirement: %s" % (str(e),), -- "To install run:", -- " pip install --upgrade --force \"%s\"" % (e.dependency,), -+ "To install, try:", -+ " sudo apt-get install python-%s" % (e.dependency,), - "", - ]) - sys.stderr.writelines(message) -Index: package-synapse-debian/synapse/config/jwt_config.py -=================================================================== ---- package-synapse-debian.orig/synapse/config/jwt_config.py -+++ package-synapse-debian/synapse/config/jwt_config.py -@@ -19,7 +19,7 @@ MISSING_JWT = ( - """Missing jwt library. This is required for jwt login. - - Install by running: -- pip install pyjwt -+ sudo apt-get install python-jwt - """ - ) - -Index: package-synapse-debian/synapse/config/repository.py -=================================================================== ---- package-synapse-debian.orig/synapse/config/repository.py -+++ package-synapse-debian/synapse/config/repository.py -@@ -27,9 +27,7 @@ MISSING_LXML = ( - """Missing lxml library. This is required for URL preview API. - - Install by running: -- pip install lxml -- -- Requires libxslt1-dev system package. -+ sudo apt-get install python-lxml - """ - ) - diff --git a/debian/patches/remove-webclient.patch b/debian/patches/remove-webclient.patch deleted file mode 100644 index bfd2fce..0000000 --- a/debian/patches/remove-webclient.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: package-synapse-debian/synapse/app/homeserver.py -=================================================================== ---- package-synapse-debian.orig/synapse/app/homeserver.py -+++ package-synapse-debian/synapse/app/homeserver.py -@@ -124,7 +124,7 @@ class SynapseHomeServer(HomeServer): - for res in listener_config["resources"]: - for name in res["names"]: - resources.update(self._configure_named_resource( -- name, res.get("compress", False), -+ config, name, res.get("compress", False), - )) - - additional_resources = listener_config.get("additional_resources", {}) -@@ -171,7 +171,7 @@ class SynapseHomeServer(HomeServer): - ) - logger.info("Synapse now listening on port %d", port) - -- def _configure_named_resource(self, name, compress=False): -+ def _configure_named_resource(self, config, name, compress=False): - """Build a resource map for a named resource - - Args: -@@ -235,7 +235,7 @@ class SynapseHomeServer(HomeServer): - if name in ["keys", "federation"]: - resources[SERVER_KEY_V2_PREFIX] = KeyApiV2Resource(self) - -- if name == "webclient": -+ if name == "webclient" and config.web_client: - resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) - - if name == "metrics" and self.get_config().enable_metrics: diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index ae46209..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,7 +0,0 @@ -0001-tox.patch -0002-change_instructions.patch -0004-webclient-instructions.patch -0006-Don-t-require-strict-nacl-0.3.0-requirement.patch -remove-webclient.patch -bcrypt.patch -no_install_with_pip diff --git a/debian/pydist-overrides b/debian/pydist-overrides deleted file mode 100644 index e2e34b7..0000000 --- a/debian/pydist-overrides +++ /dev/null @@ -1,5 +0,0 @@ -matrix-angular-sdk -jinja2 -bleach -ldap3 -matrix-synapse-ldap3 diff --git a/debian/rules b/debian/rules index ad0e95c..cf6a60b 100755 --- a/debian/rules +++ b/debian/rules @@ -1,18 +1,45 @@ #!/usr/bin/make -f +# +# Build Debian package using https://github.com/spotify/dh-virtualenv +# +# The below targets create a clean copy of the workdir via +# using "sdist", else "pip" goes haywire when installing from +# sourcedir ".", because that includes the debian build stage, +# and a recursive explosion ensues when symlinks are followed. +# +# It also ensures your MANIFEST is complete and at least covers +# all files needed for a release build. -# This file was automatically generated by stdeb 0.8.2 at -# Fri, 12 Jun 2015 14:32:03 +0100 -export PYBUILD_NAME=matrix-synapse -%: - dh $@ --with python2 --with systemd --buildsystem=pybuild --no-guessing-deps +# Increase trace logging, see debhelper(7) (uncomment to enable) +#DH_VERBOSE=1 + +export DH_VIRTUALENV_INSTALL_ROOT=/opt/venvs +export CFLAGS=-march=x86-64 +SNAKE=/usr/bin/python3 +DEB_BUILD_OPTIONS=noddebs +EXTRA_REQUIREMENTS=--preinstall "setuptools>=17.1" --preinstall "pip>=7" --preinstall "wheel" --preinstall "no-manylinux1" --preinstall "lxml" +DH_VENV_ARGS=--with python-virtualenv --setuptools --python $(SNAKE) $(EXTRA_REQUIREMENTS) --extra-pip-arg="--no-cache-dir" --extra-pip-arg="--compile" --extra-pip-arg="--no-binary=lxml" +PACKAGE=$(shell dh_listpackages) +VERSION=$(shell $(SNAKE) setup.py --version) +SDIST_DIR=debian/$(PACKAGE)-$(VERSION) +RELEASE_VERSION=$(VERSION)~$(shell lsb_release -c -s) -override_dh_auto_install: - python setup.py install --root=debian/matrix-synapse --install-layout=deb +clean: + test ! -d dist || rm -rf dist + test ! -d $(SDIST_DIR) || rm -rf $(SDIST_DIR) + dh $@ $(DH_VENV_ARGS) -override_dh_auto_build: +build-arch: + $(SNAKE) setup.py sdist --formats tar + mkdir -p $(SDIST_DIR) + tar -x -C $(SDIST_DIR) --strip-components=1 --exclude '*.egg-info' -f dist/*.tar + dh $@ $(DH_VENV_ARGS) --sourcedir $(SDIST_DIR) -override_dh_installinit: - dh_installinit --no-start +override_dh_gencontrol: + dh_gencontrol -- -v$(RELEASE_VERSION) -override_dh_auto_test: - PYTHONPATH=. trial tests +override_dh_builddeb: + dh_builddeb -- -z9 + +%: + dh $@ $(DH_VENV_ARGS) --sourcedir $(SDIST_DIR) diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/templates b/debian/templates index 6473587..3b1fe0e 100644 --- a/debian/templates +++ b/debian/templates @@ -1,11 +1,11 @@ -Template: matrix-synapse/server-name +Template: matrix-synapse-py3/server-name Type: string _Description: Name of the server: The name that this homeserver will appear as, to clients and other servers via federation. This name should match the SRV record published in DNS. -Template: matrix-synapse/report-stats +Template: matrix-synapse-py3/report-stats Type: boolean Default: false _Description: Report anonymous statistics? diff --git a/debian/watch b/debian/watch deleted file mode 100644 index b1b10d4..0000000 --- a/debian/watch +++ /dev/null @@ -1,11 +0,0 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# See uscan(1) for format - -# Compulsory line, this is a version 3 file -version=3 - - -opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/matrix-synapse-$1\.tar\.gz/,uversionmangle=s/-?rc/~rc/ \ - https://github.com/matrix-org/synapse/tags .*/v?(\d[^\s\-]*)\.tar\.gz debian uupdate diff --git a/docker/Dockerfile-dhvirtualenv b/docker/Dockerfile-dhvirtualenv new file mode 100644 index 0000000..6a07ed3 --- /dev/null +++ b/docker/Dockerfile-dhvirtualenv @@ -0,0 +1,9 @@ +ARG distro="debian:stable" +FROM ${distro} AS dpkg-build +RUN apt-get update -qq -o Acquire::Languages=none \ + && env DEBIAN_FRONTEND=noninteractive apt-get install \ + -yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \ + build-essential debhelper devscripts equivs dh-virtualenv libpq-dev sqlite3 python3-dev libffi-dev libjpeg-dev zlib1g-dev libxslt1-dev python3-setuptools libssl-dev lsb-release +WORKDIR /synapse/build +ENTRYPOINT ["bash","/synapse/build/debian/build_debian.sh"] + diff --git a/docker/build_debian_packages.sh b/docker/build_debian_packages.sh new file mode 100755 index 0000000..bf091fd --- /dev/null +++ b/docker/build_debian_packages.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +mkdir -p ../debs + +docker build --tag dh-venv-builder:bionic --build-arg distro=ubuntu:bionic -f Dockerfile-dhvirtualenv . +#docker build --tag dh-venv-builder:stretch --build-arg distro=debian:stretch -f Dockerfile-dhvirtualenv . + +docker run -it --rm --volume=$(pwd)/../\:/synapse/build dh-venv-builder:bionic +#ocker run -it --rm --volume=$(pwd)/../\:/build dh-venv-builder:stretch + +sudo chown $(id -u):$(id -g) -R ../debs/ \ No newline at end of file