summaryrefslogtreecommitdiff
path: root/dev-python/sshtunnel/files
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/sshtunnel/files
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadsrcux-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
srcux-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
srcux-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/sshtunnel/files')
-rw-r--r--dev-python/sshtunnel/files/sshtunnel-0.4.0-dont-deadlock-tests.patch38
-rw-r--r--dev-python/sshtunnel/files/sshtunnel-0.4.0-paramiko-4-compat.patch27
2 files changed, 65 insertions, 0 deletions
diff --git a/dev-python/sshtunnel/files/sshtunnel-0.4.0-dont-deadlock-tests.patch b/dev-python/sshtunnel/files/sshtunnel-0.4.0-dont-deadlock-tests.patch
new file mode 100644
index 000000000000..1e5b06ac49b6
--- /dev/null
+++ b/dev-python/sshtunnel/files/sshtunnel-0.4.0-dont-deadlock-tests.patch
@@ -0,0 +1,38 @@
+From 96a056fb37684496c0495a831f8fd11b48ef01a9 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Sat, 22 Feb 2025 12:40:58 +0200
+Subject: [PATCH] Try to remove defunct threads from running_threads just in
+ case
+
+On Gentoo it was decided to remove server functionality from
+paramiko leading to the ssh-server to be dead before it could be
+properly removed from running_threads. This would lead to a hang where
+memory footprint of the process would grow with repeated "thread
+ssh-server now stopped" messages inevitably leading to an OOM condition.
+
+So try to remove defunct threads from running_threads after the fact to
+stop this problem from coming back and let it fail normally.
+
+Bug: https://github.com/pahaz/sshtunnel/issues/153
+Bug: https://bugs.gentoo.org/666619
+Bug: https://bugs.gentoo.org/683774
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/tests/test_forwarder.py
++++ b/tests/test_forwarder.py
+@@ -251,6 +251,13 @@ class SSHClientTest(unittest.TestCase):
+ who='tearDown')
+ if not x.is_alive():
+ self.log.info('thread {0} now stopped'.format(thread))
++ # Try to remove thread running_threads just in case
++ # the thread is dead but hasn't been properly removed.
++ # https://github.com/pahaz/sshtunnel/issues/153
++ try:
++ self.running_threads.remove(thread)
++ except ValueError:
++ pass
+
+ for attr in ['server', 'tc', 'ts', 'socks', 'ssockl', 'esockl']:
+ if hasattr(self, attr):
+--
+2.49.0
+
diff --git a/dev-python/sshtunnel/files/sshtunnel-0.4.0-paramiko-4-compat.patch b/dev-python/sshtunnel/files/sshtunnel-0.4.0-paramiko-4-compat.patch
new file mode 100644
index 000000000000..d015fbb42832
--- /dev/null
+++ b/dev-python/sshtunnel/files/sshtunnel-0.4.0-paramiko-4-compat.patch
@@ -0,0 +1,27 @@
+https://github.com/pahaz/sshtunnel/issues/302
+https://github.com/pahaz/sshtunnel/pull/300
+
+From 7030d0c76c679c2934bdc27adc48ff5a84d1ae9a Mon Sep 17 00:00:00 2001
+From: lglines <lglines@fleetio.com>
+Date: Mon, 4 Aug 2025 08:58:11 -0600
+Subject: [PATCH] remove DSSKey, which is no longer supported by paramiko
+
+--- a/sshtunnel.py
++++ b/sshtunnel.py
+@@ -1090,7 +1090,6 @@ def get_keys(logger=None, host_pkey_directories=None, allow_agent=False):
+ host_pkey_directories = [DEFAULT_SSH_DIRECTORY]
+
+ paramiko_key_types = {'rsa': paramiko.RSAKey,
+- 'dsa': paramiko.DSSKey,
+ 'ecdsa': paramiko.ECDSAKey}
+ if hasattr(paramiko, 'Ed25519Key'):
+ # NOQA: new in paramiko>=2.2: http://docs.paramiko.org/en/stable/api/keys.html#module-paramiko.ed25519key
+@@ -1295,7 +1294,7 @@ def read_private_key_file(pkey_file,
+ paramiko.Pkey
+ """
+ ssh_pkey = None
+- key_types = (paramiko.RSAKey, paramiko.DSSKey, paramiko.ECDSAKey)
++ key_types = (paramiko.RSAKey, paramiko.ECDSAKey)
+ if hasattr(paramiko, 'Ed25519Key'):
+ # NOQA: new in paramiko>=2.2: http://docs.paramiko.org/en/stable/api/keys.html#module-paramiko.ed25519key
+ key_types += (paramiko.Ed25519Key, )