15
0

Accepting request 682200 from home:mimi_vx:branches:devel:languages:python

- remove python-nacl from builddeps
- add 194.patch to fix testsuite

OBS-URL: https://build.opensuse.org/request/show/682200
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-asyncssh?expand=0&rev=8
This commit is contained in:
2019-03-06 14:56:41 +00:00
committed by Git OBS Bridge
parent 841bc9ea2f
commit 7007e2c24c
3 changed files with 71 additions and 1 deletions

61
194.patch Normal file
View File

@@ -0,0 +1,61 @@
From 110a7c22926c067e65cfaa05c19aac12b637eb79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= <mimi.vx@gmail.com>
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')

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Mar 6 14:55:29 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- remove python-nacl from builddeps
- add 194.patch to fix testsuite
-------------------------------------------------------------------
Wed Mar 6 12:36:52 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -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