From 8f972cf547dc1c99b837a285d658e5ee66ae574b Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 14 Mar 2016 14:53:11 +0100 Subject: [PATCH] Fix installation proxy usage --- ..._proxy-when-using-GnuTLS-instead-of-.patch | 41 +++++++++++++++++++ libimobiledevice.spec | 7 +++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch diff --git a/0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch b/0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch new file mode 100644 index 0000000..5ec2aa0 --- /dev/null +++ b/0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch @@ -0,0 +1,41 @@ +From 6070126868069f2ee01ea9414f4cfbe5de285267 Mon Sep 17 00:00:00 2001 +From: "Jay Freeman (saurik)" +Date: Wed, 21 Oct 2015 00:39:14 -0700 +Subject: [PATCH] Fix installation_proxy when using GnuTLS instead of OpenSSL + +--- + src/idevice.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/idevice.c b/src/idevice.c +index 7c33cdd..b776e84 100644 +--- a/src/idevice.c ++++ b/src/idevice.c +@@ -393,10 +393,13 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive_timeout(idevice_ + } + + if (connection->ssl_data) { +-#ifdef HAVE_OPENSSL + uint32_t received = 0; + while (received < len) { ++#ifdef HAVE_OPENSSL + int r = SSL_read(connection->ssl_data->session, (void*)((char*)(data+received)), (int)len-received); ++#else ++ ssize_t r = gnutls_record_recv(connection->ssl_data->session, (void*)(data+received), (size_t)len-received); ++#endif + if (r > 0) { + received += r; + } else { +@@ -404,9 +407,6 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive_timeout(idevice_ + } + } + debug_info("SSL_read %d, received %d", len, received); +-#else +- ssize_t received = gnutls_record_recv(connection->ssl_data->session, (void*)data, (size_t)len); +-#endif + if (received > 0) { + *recv_bytes = received; + return IDEVICE_E_SUCCESS; +-- +2.5.0 + diff --git a/libimobiledevice.spec b/libimobiledevice.spec index fa491ef..ea2a2b7 100644 --- a/libimobiledevice.spec +++ b/libimobiledevice.spec @@ -7,7 +7,7 @@ Name: libimobiledevice Version: 1.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for connecting to mobile devices Group: System Environment/Libraries @@ -16,6 +16,7 @@ URL: http://www.libimobiledevice.org/ Source0: http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2 # Fix the build with gnutls 3.4 Patch0: 0001-Updated-cert-callback-to-gnutls3-API.patch +Patch1: 0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch BuildRequires: glib2-devel BuildRequires: gnutls-devel @@ -65,6 +66,7 @@ Python bindings for libimobiledevice. %prep %setup -q %patch0 -p1 +%patch1 -p1 # Fix dir permissions on html docs chmod +x docs/html @@ -111,6 +113,9 @@ find %{buildroot} -type f -name "*.la" -delete %endif %changelog +* Mon Mar 14 2016 Bastien Nocera 1.2.0-5 +- Fix installation proxy usage + * Thu Feb 04 2016 Fedora Release Engineering - 1.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild