Accepting request 944119 from home:Vogtinator:boo1192731

- Add patch to fix sftp connection if the server requires compression
  (boo#1192731):
  * 0001-sftp-Allow-compression-if-necessary.patch

OBS-URL: https://build.opensuse.org/request/show/944119
OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kio-extras5?expand=0&rev=167
This commit is contained in:
Luca Beltrame 2022-01-05 23:34:53 +00:00 committed by Git OBS Bridge
parent 8ae797e90e
commit b02588b210
3 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From f3ad370f237c69c018c968bab6f79b16c27edbba Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Tue, 16 Nov 2021 08:35:45 +0100
Subject: [PATCH] sftp: Allow compression if necessary
Specifying only "none" as compression method causes the exchange to fail if
the server doesn't support "none".
Use the same options as OpenSSH does by default. The Compression=yes/no option
in the config file overrides them if specified.
Setting the options explicitly can be dropped in the future after libssh
adjusts its built-in defaults.
(cherry picked from commit c5a9722de86f111ded36488e9bb676a70e80aea0)
---
sftp/kio_sftp.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sftp/kio_sftp.cpp b/sftp/kio_sftp.cpp
index 1afc51f5..c90aab76 100644
--- a/sftp/kio_sftp.cpp
+++ b/sftp/kio_sftp.cpp
@@ -592,13 +592,13 @@ Result SFTPInternal::sftpOpenConnection(const AuthInfo &info)
return Result::fail(KIO::ERR_INTERNAL, i18n("Could not disable Nagle's Algorithm."));
}
- // Don't use any compression
- rc = ssh_options_set(mSession, SSH_OPTIONS_COMPRESSION_C_S, "none");
+ // Prefer not to use compression
+ rc = ssh_options_set(mSession, SSH_OPTIONS_COMPRESSION_C_S, "none,zlib@openssh.com,zlib");
if (rc < 0) {
return Result::fail(KIO::ERR_INTERNAL, i18n("Could not set compression."));
}
- rc = ssh_options_set(mSession, SSH_OPTIONS_COMPRESSION_S_C, "none");
+ rc = ssh_options_set(mSession, SSH_OPTIONS_COMPRESSION_S_C, "none,zlib@openssh.com,zlib");
if (rc < 0) {
return Result::fail(KIO::ERR_INTERNAL, i18n("Could not set compression."));
}
--
2.33.1

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jan 5 13:50:36 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix sftp connection if the server requires compression
(boo#1192731):
* 0001-sftp-Allow-compression-if-necessary.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 3 19:22:06 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr> Fri Dec 3 19:22:06 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -33,6 +33,8 @@ Source1: https://download.kde.org/stable/release-service/%{version}/src/%
Source2: applications.keyring Source2: applications.keyring
%endif %endif
Source99: %{name}-rpmlintrc Source99: %{name}-rpmlintrc
# PATCH-FIX-UPSTREAM
Patch1: 0001-sftp-Allow-compression-if-necessary.patch
# openEXR causes build issues for Leap 15.2 & 15.3 # openEXR causes build issues for Leap 15.2 & 15.3
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1500
BuildRequires: OpenEXR-devel BuildRequires: OpenEXR-devel