diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2012-05-16 00:48:37 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2012-05-16 00:48:37 +0000 |
commit | df7bbc055791b3a3d7f9a8d09b9509cc3e85d902 (patch) | |
tree | c6c992f6b2d34fb68d18d916f4dff1c6046ee9a0 /app-pda | |
parent | keyword ~amd64-fbsd (compile tested only) (diff) | |
download | gentoo-2-df7bbc055791b3a3d7f9a8d09b9509cc3e85d902.tar.gz gentoo-2-df7bbc055791b3a3d7f9a8d09b9509cc3e85d902.tar.bz2 gentoo-2-df7bbc055791b3a3d7f9a8d09b9509cc3e85d902.zip |
Upstream patch for "fix openssl initialization and handle error to avoid crash". Since Cython 0.16 is not supported yet, avoid bailing out when it's installed wrt #414063.
(Portage version: 2.2.0_alpha105/cvs/Linux x86_64)
Diffstat (limited to 'app-pda')
-rw-r--r-- | app-pda/libimobiledevice/ChangeLog | 8 | ||||
-rw-r--r-- | app-pda/libimobiledevice/files/libimobiledevice-1.1.4-openssl.patch | 49 | ||||
-rw-r--r-- | app-pda/libimobiledevice/libimobiledevice-1.1.4.ebuild | 15 |
3 files changed, 68 insertions, 4 deletions
diff --git a/app-pda/libimobiledevice/ChangeLog b/app-pda/libimobiledevice/ChangeLog index 8774e6881a49..efb148b007fd 100644 --- a/app-pda/libimobiledevice/ChangeLog +++ b/app-pda/libimobiledevice/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-pda/libimobiledevice # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-pda/libimobiledevice/ChangeLog,v 1.28 2012/05/03 20:20:59 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-pda/libimobiledevice/ChangeLog,v 1.29 2012/05/16 00:48:36 ssuominen Exp $ + + 16 May 2012; Samuli Suominen <ssuominen@gentoo.org> + libimobiledevice-1.1.4.ebuild, +files/libimobiledevice-1.1.4-openssl.patch: + Upstream patch for "fix openssl initialization and handle error to avoid + crash". Since Cython 0.16 is not supported yet, avoid bailing out when it's + installed wrt #414063. 03 May 2012; Jeff Horelick <jdhore@gentoo.org> libimobiledevice-1.1.1.ebuild, libimobiledevice-1.1.4.ebuild: diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.1.4-openssl.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.1.4-openssl.patch new file mode 100644 index 000000000000..dbb052c04080 --- /dev/null +++ b/app-pda/libimobiledevice/files/libimobiledevice-1.1.4-openssl.patch @@ -0,0 +1,49 @@ +From 54dad58468a9879fb44aff0d760bbd6c3288b812 Mon Sep 17 00:00:00 2001 +From: Nikias Bassen +Date: Wed, 18 Apr 2012 15:07:04 +0000 +Subject: idevice: fix openssl initialization and handle error to avoid crash + +--- +diff --git a/src/idevice.c b/src/idevice.c +index 91d67e6..a1cc013 100644 +--- a/src/idevice.c ++++ b/src/idevice.c +@@ -559,6 +559,7 @@ static void internal_ssl_cleanup(ssl_data_t ssl_data) + if (ssl_data->ctx) { + SSL_CTX_free(ssl_data->ctx); + } ++ openssl_init_done = 0; + #else + if (ssl_data->session) { + gnutls_deinit(ssl_data->session); +@@ -667,6 +668,11 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) + } + + /* Set up OpenSSL */ ++ if (openssl_init_done == 0) { ++ SSL_library_init(); ++ openssl_init_done = 1; ++ } ++ + BIO *ssl_bio = BIO_new(BIO_s_socket()); + if (!ssl_bio) { + debug_info("ERROR: Could not create SSL bio."); +@@ -674,11 +680,12 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) + } + BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE); + +- if (openssl_init_done == 0) { +- SSL_library_init(); +- openssl_init_done = 1; +- } + SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv3_method()); ++ if (ssl_ctx == NULL) { ++ debug_info("ERROR: Could not create SSL context."); ++ BIO_free(ssl_bio); ++ return ret; ++ } + + BIO* membp; + X509* rootCert = NULL; +-- +cgit v0.8.3.1-34-gbf3d diff --git a/app-pda/libimobiledevice/libimobiledevice-1.1.4.ebuild b/app-pda/libimobiledevice/libimobiledevice-1.1.4.ebuild index 5b7893350333..4522ced08211 100644 --- a/app-pda/libimobiledevice/libimobiledevice-1.1.4.ebuild +++ b/app-pda/libimobiledevice/libimobiledevice-1.1.4.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-pda/libimobiledevice/libimobiledevice-1.1.4.ebuild,v 1.2 2012/05/03 20:20:59 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-pda/libimobiledevice/libimobiledevice-1.1.4.ebuild,v 1.3 2012/05/16 00:48:36 ssuominen Exp $ EAPI=4 PYTHON_DEPEND="python? 2:2.7" -inherit python +inherit eutils python DESCRIPTION="Support library to communicate with Apple iPhone/iPod Touch devices" HOMEPAGE="http://www.libimobiledevice.org/" @@ -25,7 +25,7 @@ RDEPEND=">=app-pda/libplist-1.8-r1[python?] !gnutls? ( dev-libs/openssl:0 )" DEPEND="${RDEPEND} virtual/pkgconfig - python? ( >=dev-python/cython-0.13 )" + python? ( >=dev-python/cython-0.14.1 )" DOCS="AUTHORS NEWS README" @@ -37,6 +37,8 @@ pkg_setup() { } src_prepare() { + epatch "${FILESDIR}"/${P}-openssl.patch + >py-compile } @@ -44,6 +46,13 @@ src_configure() { local myconf='--disable-static' use python || myconf+=' --without-cython' use gnutls && myconf+=' --disable-openssl' + + if has_version '~dev-python/cython-0.16'; then + myconf+=' --without-cython' + ewarn "Disabling Cython support because 0.16 is not supported yet." + ewarn "See, http://bugs.gentoo.org/414063" + fi + econf ${myconf} } |