From 643a5be1aa1a52108c278774b11b2449ba5a73a5 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 27 Jul 2019 13:51:37 +0200 Subject: [PATCH] matrix-synapse: 0.99.5.2 -> 1.2.1 security update: https://github.com/matrix-org/synapse/releases/tag/v1.2.1 --- .../service_identity/default.nix | 2 ++ pkgs/servers/matrix-synapse/default.nix | 22 ++++++++++++++----- .../matrix-synapse/homeserver-script.patch | 18 ++++++++------- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/service_identity/default.nix b/pkgs/development/python-modules/service_identity/default.nix index 93e172a4f606c9..7d9039123cd096 100644 --- a/pkgs/development/python-modules/service_identity/default.nix +++ b/pkgs/development/python-modules/service_identity/default.nix @@ -10,6 +10,8 @@ , pytest }: +# Note to maintainers: package duplicated in nixpkgs/pkgs/servers/matrix-synapse/default.nix + buildPythonPackage rec { pname = "service_identity"; version = "17.0.0"; diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index acc3061e3f09c4..8245069bbd872a 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -1,8 +1,20 @@ -{ lib, stdenv, python3 +{ lib, stdenv, fetchFromGitHub, python3, openssl , enableSystemd ? stdenv.isLinux }: -with python3.pkgs; +with python3.pkgs.override { + overrides = self: super: { + service-identity = super.service-identity.overrideAttrs (oldAttrs: rec { + version = "18.1.0"; + src = fetchFromGitHub { + owner = "pyca"; + repo = "service_identity"; + rev = version; + sha256 = "1aw475ksmd4vpl8cwfdcsw2v063nbhnnxpy633sb75iqp9aazhlx"; + }; + }); + }; +}; let matrix-synapse-ldap3 = buildPythonPackage rec { @@ -23,11 +35,11 @@ let in buildPythonApplication rec { pname = "matrix-synapse"; - version = "0.99.5.2"; + version = "1.2.1"; src = fetchPypi { inherit pname version; - sha256 = "0c1kf9zq7cg9scwnvph4vwk449gypbprmdjzrzrg0wp1rcc8h3gn"; + sha256 = "0pr17n52vdq490q6c282nqnn51j5k0lf7mzaazpxjy4q86pxdfy5"; }; patches = [ @@ -72,7 +84,7 @@ in buildPythonApplication rec { unpaddedbase64 ] ++ lib.optional enableSystemd systemd; - checkInputs = [ mock parameterized ]; + checkInputs = [ mock parameterized openssl ]; checkPhase = '' PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial tests diff --git a/pkgs/servers/matrix-synapse/homeserver-script.patch b/pkgs/servers/matrix-synapse/homeserver-script.patch index 95e28196a2292a..554a2c5f66c12d 100644 --- a/pkgs/servers/matrix-synapse/homeserver-script.patch +++ b/pkgs/servers/matrix-synapse/homeserver-script.patch @@ -1,21 +1,23 @@ diff --git a/homeserver b/homeserver new file mode 120000 -index 0000000..2f1d413 +index 000000000..2f1d41351 --- /dev/null +++ b/homeserver -@@ -0,0 +1,1 @@ +@@ -0,0 +1 @@ +synapse/app/homeserver.py \ No newline at end of file diff --git a/setup.py b/setup.py -index b00c2af..c7f6e0a 100755 +index 5ce06c898..f1ccd95bc 100755 --- a/setup.py +++ b/setup.py -@@ -92,6 +92,6 @@ setup( - include_package_data=True, - zip_safe=False, - long_description=long_description, +@@ -115,6 +115,6 @@ setup( + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + ], - scripts=["synctl"] + glob.glob("scripts/*"), + scripts=["synctl", "homeserver"] + glob.glob("scripts/*"), - cmdclass={'test': TestCommand}, + cmdclass={"test": TestCommand}, ) +-- +2.22.0