diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 17:47:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 17:47:36 +0000 |
commit | 7a45763ef91e6aedd9903fd736cc4490622fe333 (patch) | |
tree | f3b05657cebd31f81b2a7bb175dd32a3e0926588 /debian/patches | |
parent | Adding upstream version 3.4.0. (diff) | |
download | paramiko-7a45763ef91e6aedd9903fd736cc4490622fe333.tar.xz paramiko-7a45763ef91e6aedd9903fd736cc4490622fe333.zip |
Adding debian version 3.4.0-1.debian/3.4.0-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
4 files changed, 147 insertions, 0 deletions
diff --git a/debian/patches/0001-Fix-32-bit-ism-in-protocol-seqno-rollover-test-from-.patch b/debian/patches/0001-Fix-32-bit-ism-in-protocol-seqno-rollover-test-from-.patch new file mode 100644 index 0000000..6806276 --- /dev/null +++ b/debian/patches/0001-Fix-32-bit-ism-in-protocol-seqno-rollover-test-from-.patch @@ -0,0 +1,55 @@ +From 9f6fe4c926931920570fac84fa2fcdc9de8a3324 Mon Sep 17 00:00:00 2001 +From: Jeff Forcier <jeff@bitprophet.org> +Date: Sat, 10 Feb 2024 21:29:48 -0500 +Subject: [PATCH] Fix 32-bit-ism in protocol seqno rollover test from Terrapin + fix + +Fixes #2353 +--- + sites/www/changelog.rst | 2 ++ + tests/test_transport.py | 9 ++++++--- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst +index 00f42a70..3f886fc8 100644 +--- a/sites/www/changelog.rst ++++ b/sites/www/changelog.rst +@@ -2,6 +2,8 @@ + Changelog + ========= + ++- :bug:`2353` Fix a 64-bit-ism in the test suite so the tests don't encounter a ++ false negative on 32-bit systems. Reported by Stanislav Levin. + - :release:`3.4.0 <2023-12-18>` + - :feature:`-` `Transport` grew a new ``packetizer_class`` kwarg for overriding + the packet-handler class used internally. Mostly for testing, but advanced +diff --git a/tests/test_transport.py b/tests/test_transport.py +index 67e2eb45..59f871b8 100644 +--- a/tests/test_transport.py ++++ b/tests/test_transport.py +@@ -1419,16 +1419,19 @@ class TestStrictKex: + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Induce an about-to-rollover seqno, such that it rolls over +- # during initial kex. ++ # during initial kex. (Sequence numbers are uint32, so we need ++ # the largest possible 32bit integer such that incrementing it ++ # will roll over to 0.) ++ last_seq = 2**32 - 1 + setattr( + self.packetizer, + "_Packetizer__sequence_number_in", +- sys.maxsize, ++ last_seq, + ) + setattr( + self.packetizer, + "_Packetizer__sequence_number_out", +- sys.maxsize, ++ last_seq, + ) + + with raises( +-- +2.43.0 + diff --git a/debian/patches/0001-Use-pytest-s-setup_method-in-pytest-8-the-nose-metho.patch b/debian/patches/0001-Use-pytest-s-setup_method-in-pytest-8-the-nose-metho.patch new file mode 100644 index 0000000..a0de1f7 --- /dev/null +++ b/debian/patches/0001-Use-pytest-s-setup_method-in-pytest-8-the-nose-metho.patch @@ -0,0 +1,26 @@ +From d71046151d9904df467ff72709585cde39cdd4ca Mon Sep 17 00:00:00 2001 +From: Alex Gaynor <alex.gaynor@gmail.com> +Date: Sat, 27 Jan 2024 17:04:18 -0500 +Subject: [PATCH] Use pytest's setup_method -- in pytest 8 the nose method + setup is deprecated + +--- + tests/test_config.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_config.py b/tests/test_config.py +index 2e49aa3d..1e623e0a 100644 +--- a/tests/test_config.py ++++ b/tests/test_config.py +@@ -53,7 +53,7 @@ def load_config(name): + + + class TestSSHConfig: +- def setup(self): ++ def setup_method(self): + self.config = load_config("robey") + + def test_init(self): +-- +2.43.0 + diff --git a/debian/patches/remove_pytest_relaxed.patch b/debian/patches/remove_pytest_relaxed.patch new file mode 100644 index 0000000..70a8e0a --- /dev/null +++ b/debian/patches/remove_pytest_relaxed.patch @@ -0,0 +1,63 @@ +From: Debian Python Modules Team + <python-modules-team@lists.alioth.debian.org> +Date: Wed, 2 Sep 2020 10:30:06 +0200 +Subject: remove_pytest_relaxed + +--- + setup.cfg | 1 - + tests/test_client.py | 23 ++++++++++++----------- + 2 files changed, 12 insertions(+), 12 deletions(-) + +Index: paramiko/tests/test_client.py +=================================================================== +--- paramiko.orig/tests/test_client.py ++++ paramiko/tests/test_client.py +@@ -33,7 +33,7 @@ import weakref + from tempfile import mkstemp + + import pytest +-from pytest_relaxed import raises ++from pytest import raises + from unittest.mock import patch, Mock + + import paramiko +@@ -797,13 +797,13 @@ class PasswordPassphraseTests(ClientTest + # Straightforward / duplicate of earlier basic password test. + self._test_connection(password="pygmalion") + +- # TODO: more granular exception pending #387; should be signaling "no auth +- # methods available" because no key and no password +- @raises(SSHException) + @requires_sha1_signing + 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") ++ # TODO: more granular exception pending #387; should be signaling "no auth ++ # methods available" because no key and no password ++ with raises(SSHException): ++ self._test_connection(passphrase='pygmalion') + + @requires_sha1_signing + def test_passphrase_kwarg_used_for_key_passphrase(self): +@@ -823,15 +823,15 @@ class PasswordPassphraseTests(ClientTest + password="television", + ) + +- @raises(AuthenticationException) # TODO: more granular + @requires_sha1_signing + def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given( # noqa + self, + ): + # 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 ++ self._test_connection( ++ key_filename=_support("test_rsa_password.key"), ++ password="television", ++ passphrase="wat? lol no", ++ ) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0e6becc --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +remove_pytest_relaxed.patch +0001-Use-pytest-s-setup_method-in-pytest-8-the-nose-metho.patch +0001-Fix-32-bit-ism-in-protocol-seqno-rollover-test-from-.patch |