commit
6083b695f5
17
paramiko-2.3.1-disable-gssapi-on-unsupported-version.patch
Normal file
17
paramiko-2.3.1-disable-gssapi-on-unsupported-version.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -ru paramiko-2.3.1.orig/paramiko/ssh_gss.py paramiko-2.3.1/paramiko/ssh_gss.py
|
||||
--- paramiko-2.3.1.orig/paramiko/ssh_gss.py 2017-09-22 21:15:16.000000000 +0100
|
||||
+++ paramiko-2.3.1/paramiko/ssh_gss.py 2017-10-29 21:16:08.071429184 +0100
|
||||
@@ -51,7 +51,12 @@
|
||||
|
||||
try:
|
||||
import gssapi
|
||||
- GSS_EXCEPTIONS = (gssapi.GSSException,)
|
||||
+ try:
|
||||
+ GSS_EXCEPTIONS = (gssapi.GSSException,)
|
||||
+ except AttributeError:
|
||||
+ # Unsupported GSS API
|
||||
+ GSS_AUTH_AVAILABLE = False
|
||||
+ _API = None
|
||||
except (ImportError, OSError):
|
||||
try:
|
||||
import pywintypes
|
||||
49
paramiko-2.4.1-drop-pytest-relaxed.patch
Normal file
49
paramiko-2.4.1-drop-pytest-relaxed.patch
Normal file
@ -0,0 +1,49 @@
|
||||
diff --git a/tests/test_client.py b/tests/test_client.py
|
||||
index 7163fdc..947e4b3 100644
|
||||
--- a/tests/test_client.py
|
||||
+++ b/tests/test_client.py
|
||||
@@ -33,7 +33,7 @@ import warnings
|
||||
import weakref
|
||||
from tempfile import mkstemp
|
||||
|
||||
-from pytest_relaxed import raises
|
||||
+from pytest import raises
|
||||
|
||||
import paramiko
|
||||
from paramiko.pkey import PublicBlob
|
||||
@@ -656,10 +656,10 @@ class PasswordPassphraseTests(ClientTest):
|
||||
|
||||
# TODO: more granular exception pending #387; should be signaling "no auth
|
||||
# methods available" because no key and no password
|
||||
- @raises(SSHException)
|
||||
def test_passphrase_kwarg_not_used_for_password_auth(self):
|
||||
- # Using the "right" password in the "wrong" field shouldn't work.
|
||||
- self._test_connection(passphrase='pygmalion')
|
||||
+ with raises(SSHException):
|
||||
+ # Using the "right" password in the "wrong" field shouldn't work.
|
||||
+ self._test_connection(passphrase='pygmalion')
|
||||
|
||||
def test_passphrase_kwarg_used_for_key_passphrase(self):
|
||||
# Straightforward again, with new passphrase kwarg.
|
||||
@@ -675,12 +675,12 @@ class PasswordPassphraseTests(ClientTest):
|
||||
password='television',
|
||||
)
|
||||
|
||||
- @raises(AuthenticationException) # TODO: more granular
|
||||
def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(self): # noqa
|
||||
- # Sanity: if we're given both fields, the password field is NOT used as
|
||||
- # a passphrase.
|
||||
- self._test_connection(
|
||||
- key_filename=_support('test_rsa_password.key'),
|
||||
- password='television',
|
||||
- passphrase='wat? lol no',
|
||||
- )
|
||||
+ with raises(AuthenticationException): # TODO: more granular
|
||||
+ # Sanity: if we're given both fields, the password field is NOT used as
|
||||
+ # a passphrase.
|
||||
+ self._test_connection(
|
||||
+ key_filename=_support('test_rsa_password.key'),
|
||||
+ password='television',
|
||||
+ passphrase='wat? lol no',
|
||||
+ )
|
||||
|
||||
BIN
paramiko-2.4.1.tar.gz
Normal file
BIN
paramiko-2.4.1.tar.gz
Normal file
Binary file not shown.
94
python-paramiko.spec
Normal file
94
python-paramiko.spec
Normal file
@ -0,0 +1,94 @@
|
||||
Name: python-paramiko
|
||||
Version: 2.4.1
|
||||
Release: 7
|
||||
Summary: Python SSH module
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/paramiko/paramiko
|
||||
Source0: https://github.com/paramiko/paramiko/archive/%{version}/paramiko-%{version}.tar.gz
|
||||
|
||||
Patch0: paramiko-2.3.1-disable-gssapi-on-unsupported-version.patch
|
||||
Patch1: paramiko-2.4.1-drop-pytest-relaxed.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Paramiko is a combination of the Esperanto words for "paranoid" and "friend". It is a module
|
||||
for Python 2.7/3.4+ that implements the SSH2 protocol for secure (encrypted and authenticated)
|
||||
connections to remote machines.
|
||||
|
||||
%package -n python2-paramiko
|
||||
Summary: Python SSH module
|
||||
BuildRequires: python2-devel python2-setuptools python2-bcrypt >= 3.1.3 python2-pytest
|
||||
BuildRequires: python2-pyasn1 >= 0.1.7 python2-pynacl >= 1.0.1 python2-cryptography >= 1.5
|
||||
Requires: python2-bcrypt >= 3.1.3 python2-cryptography >= 1.5
|
||||
Requires: python2-pyasn1 >= 0.1.7 python2-pynacl >= 1.0.1
|
||||
%{?python_provide:%python_provide python2-paramiko}
|
||||
|
||||
%description -n python2-paramiko
|
||||
Paramiko is a combination of the Esperanto words for "paranoid" and "friend". python2-paramiko is
|
||||
a module for Python 2.7 that implements the SSH2 protocol for secure (encrypted and authenticated)
|
||||
connections to remote machines. Unlike SSL (aka TLS), SSH2 protocol does not require hierarchical
|
||||
certificates signed by a powerful central authority. You may know SSH2 as the protocol that replaced
|
||||
Telnet and rsh for secure access to remote shells, but the protocol also includes the ability to open
|
||||
arbitrary channels to remote services across the encrypted tunnel (this is how SFTP works, for example).
|
||||
|
||||
%package -n python3-paramiko
|
||||
Summary: Python SSH module
|
||||
BuildRequires: python3-devel python3-setuptools python3-bcrypt >= 3.1.3 python3-pytest
|
||||
BuildRequires: python3-cryptography >= 1.5 python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1
|
||||
Requires: python3-bcrypt >= 3.1.3 python3-cryptography >= 1.5
|
||||
Requires: python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1
|
||||
%{?python_provide:%python_provide python3-paramiko}
|
||||
|
||||
%description -n python3-paramiko
|
||||
Paramiko is a combination of the Esperanto words for "paranoid" and "friend". python3-paramiko is
|
||||
a module for Python 3.4+ that implements the SSH2 protocol for secure (encrypted and authenticated)
|
||||
connections to remote machines. Unlike SSL (aka TLS), SSH2 protocol does not require hierarchical
|
||||
certificates signed by a powerful central authority. You may know SSH2 as the protocol that replaced
|
||||
Telnet and rsh for secure access to remote shells, but the protocol also includes the ability to open
|
||||
arbitrary channels to remote services across the encrypted tunnel (this is how SFTP works, for example).
|
||||
|
||||
%package help
|
||||
Summary: Docs and demos for SSH2 protocol library for python
|
||||
BuildRequires: python2-Sphinx
|
||||
Provides: python-paramiko-doc = %{version}-%{release}
|
||||
Obsoletes: python-paramiko-doc <= %{version}-%{release}
|
||||
|
||||
%description help
|
||||
This is the documentation and demos for python-paramiko.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n paramiko-%{version}
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
sphinx-build -b html sites/docs/ html/
|
||||
rm -f html/.buildinfo
|
||||
|
||||
%check
|
||||
rm -f tests/test_sftp*.py
|
||||
PYTHONPATH=%{buildroot}%{python2_sitelib} pytest-%{python2_version}
|
||||
PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version}
|
||||
|
||||
%files -n python2-paramiko
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/paramiko-*.egg-info/
|
||||
%{python2_sitelib}/paramiko/
|
||||
|
||||
%files -n python3-paramiko
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/paramiko-*.egg-info/
|
||||
%{python3_sitelib}/paramiko/
|
||||
|
||||
%files help
|
||||
%doc html/ demos/ NEWS README.rst
|
||||
|
||||
%changelog
|
||||
* Wed Nov 06 2019 Lijin Yang <yanglijin@huawei.com> - 2.4.1-7
|
||||
- init package
|
||||
Loading…
x
Reference in New Issue
Block a user