diff --git a/194.patch b/194.patch new file mode 100644 index 0000000..0c5828a --- /dev/null +++ b/194.patch @@ -0,0 +1,61 @@ +From 110a7c22926c067e65cfaa05c19aac12b637eb79 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= +Date: Wed, 6 Mar 2019 15:25:28 +0100 +Subject: [PATCH] Test ed25519 and curve448 only if is available + +--- + tests/test_agent.py | 3 ++- + tests/test_kex.py | 5 +++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/tests/test_agent.py b/tests/test_agent.py +index 6dd30b1..08237c1 100644 +--- a/tests/test_agent.py ++++ b/tests/test_agent.py +@@ -29,6 +29,7 @@ + + import asyncssh + ++from asyncssh.crypto.ed import ed25519_available + from asyncssh.agent import SSH_AGENT_SUCCESS, SSH_AGENT_FAILURE + from asyncssh.packet import Byte, String + +@@ -175,7 +176,7 @@ def test_sign(self, agent): + + algs = ['ssh-dss', 'ssh-rsa', 'ecdsa-sha2-nistp256'] + +- if libnacl_available: # pragma: no branch ++ if ed25519_available: # pragma: no branch + algs.append('ssh-ed25519') + + for alg_name in algs: +diff --git a/tests/test_kex.py b/tests/test_kex.py +index 1512e40..86a75c6 100644 +--- a/tests/test_kex.py ++++ b/tests/test_kex.py +@@ -27,6 +27,7 @@ + + import asyncssh + ++ + from asyncssh.kex_dh import MSG_KEXDH_INIT, MSG_KEXDH_REPLY + from asyncssh.kex_dh import MSG_KEX_DH_GEX_REQUEST, MSG_KEX_DH_GEX_GROUP + from asyncssh.kex_dh import MSG_KEX_DH_GEX_INIT, MSG_KEX_DH_GEX_REPLY, _KexDHGex +@@ -39,6 +40,7 @@ + from asyncssh.kex import register_kex_alg, get_kex_algs, get_kex + from asyncssh.packet import SSHPacket, Boolean, Byte, MPInt, String + from asyncssh.public_key import SSHLocalKeyPair, decode_ssh_public_key ++from asyncssh.crypto.ed import curve448_available + + from .util import asynctest, gss_available, patch_gss + from .util import AsyncTestCase, ConnectionStub +@@ -523,6 +525,9 @@ def test_curve448dh_errors(self): + except ImportError: # pragma: no cover + return + ++ if not curve448_available: # pragma: no cover ++ return ++ + client_conn, server_conn = \ + _KexClientStub.make_pair(b'curve448-sha512') + diff --git a/python-asyncssh.changes b/python-asyncssh.changes index 928d524..2f08737 100644 --- a/python-asyncssh.changes +++ b/python-asyncssh.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 6 14:55:29 UTC 2019 - Ondřej Súkup + +- remove python-nacl from builddeps +- add 194.patch to fix testsuite + + ------------------------------------------------------------------- Wed Mar 6 12:36:52 UTC 2019 - Tomáš Chvátal diff --git a/python-asyncssh.spec b/python-asyncssh.spec index b06e7e4..831f6a7 100644 --- a/python-asyncssh.spec +++ b/python-asyncssh.spec @@ -26,10 +26,10 @@ License: EPL-2.0 OR GPL-2.0-or-later Group: Development/Languages/Python Url: http://asyncssh.timeheart.net Source: https://files.pythonhosted.org/packages/source/a/asyncssh/asyncssh-%{version}.tar.gz +Patch0: 194.patch BuildRequires: %{python_module bcrypt >= 3.1.3} BuildRequires: %{python_module cryptography >= 2.6.1} BuildRequires: %{python_module gssapi >= 1.2.0} -BuildRequires: %{python_module libnacl >= 1.4.2} BuildRequires: %{python_module pyOpenSSL >= 17.0.0} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -53,6 +53,7 @@ asyncio framework. %prep %setup -q -n asyncssh-%{version} +%autopatch -p1 %build %python_build @@ -62,6 +63,7 @@ asyncio framework. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +ssh-agent %python_exec -m unittest discover -s tests_py35 %python_exec setup.py test