summaryrefslogtreecommitdiff
path: root/source/l/libimobiledevice
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2019-02-01 01:26:44 +0000
committerEric Hameleers <alien@slackware.com>2019-02-01 08:59:45 +0100
commite38fab7e3aaf1ad00516bde42341708ace603227 (patch)
tree77c27c38e6239198f858a30d8fc805ee546c6b3b /source/l/libimobiledevice
parente252bed9bc920e449204d39894e5bb036b516c94 (diff)
downloadcurrent-e38fab7e3aaf1ad00516bde42341708ace603227.tar.gz
Fri 01 Feb 2019 01:26:44 AM UTC20190201012644
a/glibc-solibs-2.29-x86_64-1.txz: Upgraded. a/kernel-generic-4.19.19-x86_64-1.txz: Upgraded. a/kernel-huge-4.19.19-x86_64-1.txz: Upgraded. a/kernel-modules-4.19.19-x86_64-1.txz: Upgraded. d/kernel-headers-4.19.19-x86-1.txz: Upgraded. d/ninja-1.9.0-x86_64-1.txz: Upgraded. d/ruby-2.6.1-x86_64-1.txz: Upgraded. k/kernel-source-4.19.19-noarch-1.txz: Upgraded. l/glibc-2.29-x86_64-1.txz: Upgraded. l/glibc-i18n-2.29-x86_64-1.txz: Upgraded. l/glibc-profile-2.29-x86_64-1.txz: Upgraded. l/harfbuzz-2.3.1-x86_64-1.txz: Upgraded. l/libimobiledevice-20190126_d200973-x86_64-1.txz: Upgraded. Switch to git since the latest release no longer works. l/libusbmuxd-20190118_c75605d-x86_64-1.txz: Upgraded. Switch to git since the latest release no longer works. l/mpfr-4.0.2-x86_64-1.txz: Upgraded. x/mesa-18.3.3-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/l/libimobiledevice')
-rw-r--r--source/l/libimobiledevice/02a0e03e24bc96bba2e5ea2438c30baf803fd137.patch89
-rwxr-xr-xsource/l/libimobiledevice/fetch-libimobiledevice.sh47
-rwxr-xr-xsource/l/libimobiledevice/libimobiledevice.SlackBuild14
-rw-r--r--source/l/libimobiledevice/libimobiledevice.use_tlsv1_instead_of_sslv3.diff13
4 files changed, 53 insertions, 110 deletions
diff --git a/source/l/libimobiledevice/02a0e03e24bc96bba2e5ea2438c30baf803fd137.patch b/source/l/libimobiledevice/02a0e03e24bc96bba2e5ea2438c30baf803fd137.patch
deleted file mode 100644
index 3fa0b179..00000000
--- a/source/l/libimobiledevice/02a0e03e24bc96bba2e5ea2438c30baf803fd137.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 02a0e03e24bc96bba2e5ea2438c30baf803fd137 Mon Sep 17 00:00:00 2001
-From: Christophe Fergeau <cfergeau@redhat.com>
-Date: Tue, 25 Apr 2017 14:09:48 +0200
-Subject: [PATCH] Avoid double free with OpenSSL 1.1.0
-
-Since commit OpenSSL_1_1_0-pre3~178
-https://github.com/openssl/openssl/commit/b184e3ef73200cb3b7914a603b43a5b8a074c85f
-OpenSSL automatically cleans up some of its internal data when the
-program exits. This conflicts with some similar clean up
-libimobiledevice attempts to do, which causes a double-free.
-SSL_COMP_free_compression_methods() was available in OpenSSL 1.0.2,
-and is still there in 1.1.0 as a no-op, so we can use that to free
-the compression methods.
-
-This bug can be hit with a simple idevicebackup2 --help
-
-==14299== Invalid read of size 4
-==14299== at 0x547AEBC: OPENSSL_sk_pop_free (stack.c:263)
-==14299== by 0x508B848: ssl_library_stop (ssl_init.c:182)
-==14299== by 0x5424D11: OPENSSL_cleanup (init.c:402)
-==14299== by 0x5DC3134: __cxa_finalize (cxa_finalize.c:56)
-==14299== by 0x53332B2: ??? (in /usr/lib64/libcrypto.so.1.1.0e)
-==14299== by 0x4011232: _dl_fini (dl-fini.c:235)
-==14299== by 0x5DC2DC7: __run_exit_handlers (exit.c:83)
-==14299== by 0x5DC2E19: exit (exit.c:105)
-==14299== by 0x5DA8604: (below main) (libc-start.c:329)
-==14299== Address 0x6585590 is 0 bytes inside a block of size 40 free'd
-==14299== at 0x4C2FCC8: free (vg_replace_malloc.c:530)
-==14299== by 0x4E43381: sk_SSL_COMP_free (ssl.h:830)
-==14299== by 0x4E434E7: internal_idevice_deinit (idevice.c:103)
-==14299== by 0x5B79643: __pthread_once_slow (pthread_once.c:116)
-==14299== by 0x4E5663A: thread_once (thread.c:104)
-==14299== by 0x4E43525: libimobiledevice_deinitialize (idevice.c:140)
-==14299== by 0x4011232: _dl_fini (dl-fini.c:235)
-==14299== by 0x5DC2DC7: __run_exit_handlers (exit.c:83)
-==14299== by 0x5DC2E19: exit (exit.c:105)
-==14299== by 0x5DA8604: (below main) (libc-start.c:329)
-==14299== Block was alloc'd at
-==14299== at 0x4C2EB1B: malloc (vg_replace_malloc.c:299)
-==14299== by 0x5428908: CRYPTO_zalloc (mem.c:100)
-==14299== by 0x547A9AE: OPENSSL_sk_new (stack.c:108)
-==14299== by 0x5087D43: sk_SSL_COMP_new (ssl.h:830)
-==14299== by 0x5087D43: do_load_builtin_compressions (ssl_ciph.c:482)
-==14299== by 0x5087D43: do_load_builtin_compressions_ossl_ (ssl_ciph.c:476)
-==14299== by 0x5B79643: __pthread_once_slow (pthread_once.c:116)
-==14299== by 0x547B198: CRYPTO_THREAD_run_once (threads_pthread.c:106)
-==14299== by 0x5089F96: load_builtin_compressions (ssl_ciph.c:500)
-==14299== by 0x5089F96: SSL_COMP_get_compression_methods (ssl_ciph.c:1845)
-==14299== by 0x508B68B: ossl_init_ssl_base (ssl_init.c:125)
-==14299== by 0x508B68B: ossl_init_ssl_base_ossl_ (ssl_init.c:25)
-==14299== by 0x5B79643: __pthread_once_slow (pthread_once.c:116)
-==14299== by 0x547B198: CRYPTO_THREAD_run_once (threads_pthread.c:106)
-==14299== by 0x508B90A: OPENSSL_init_ssl (ssl_init.c:227)
-==14299== by 0x4E43416: internal_idevice_init (idevice.c:73)
-=
-
-Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
----
- src/idevice.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/src/idevice.c b/src/idevice.c
-index 913038ef..d1f13cb6 100644
---- a/src/idevice.c
-+++ b/src/idevice.c
-@@ -51,6 +51,14 @@
- #include "common/debug.h"
-
- #ifdef HAVE_OPENSSL
-+
-+#if OPENSSL_VERSION_NUMBER < 0x10002000L
-+static void SSL_COMP_free_compression_methods(void)
-+{
-+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
-+}
-+#endif
-+
- static mutex_t *mutex_buf = NULL;
- static void locking_function(int mode, int n, const char* file, int line)
- {
-@@ -100,7 +108,7 @@ static void internal_idevice_deinit(void)
-
- EVP_cleanup();
- CRYPTO_cleanup_all_ex_data();
-- sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
-+ SSL_COMP_free_compression_methods();
- #ifdef HAVE_ERR_REMOVE_THREAD_STATE
- ERR_remove_thread_state(NULL);
- #else
diff --git a/source/l/libimobiledevice/fetch-libimobiledevice.sh b/source/l/libimobiledevice/fetch-libimobiledevice.sh
new file mode 100755
index 00000000..8d2558d2
--- /dev/null
+++ b/source/l/libimobiledevice/fetch-libimobiledevice.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Copyright 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Pull a stable branch + patches
+BRANCH=${1:-master}
+
+# Clear download area:
+rm -rf libimobiledevice
+
+# Clone repository:
+git clone https://github.com/libimobiledevice/libimobiledevice
+
+# checkout $BRANCH:
+( cd libimobiledevice
+ git checkout $BRANCH || exit 1
+)
+
+HEADISAT="$( cd libimobiledevice && git log -1 --format=%h )"
+DATE="$( cd libimobiledevice && git log -1 --format=%ad --date=format:%Y%m%d )"
+# Cleanup. We're not packing up the whole git repo.
+( cd libimobiledevice && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
+mv libimobiledevice libimobiledevice-${DATE}_${HEADISAT}
+tar cf libimobiledevice-${DATE}_${HEADISAT}.tar libimobiledevice-${DATE}_${HEADISAT}
+xz -9 -f libimobiledevice-${DATE}_${HEADISAT}.tar
+rm -rf libimobiledevice-${DATE}_${HEADISAT}
+echo
+echo "libimobiledevice branch $BRANCH with HEAD at $HEADISAT packaged as libimobiledevice-${DATE}_${HEADISAT}.tar.xz"
+echo
diff --git a/source/l/libimobiledevice/libimobiledevice.SlackBuild b/source/l/libimobiledevice/libimobiledevice.SlackBuild
index cb7a0a84..d0f9d83c 100755
--- a/source/l/libimobiledevice/libimobiledevice.SlackBuild
+++ b/source/l/libimobiledevice/libimobiledevice.SlackBuild
@@ -23,8 +23,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=libimobiledevice
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-5}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -67,7 +67,7 @@ fi
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
cd ${PKGNAM}-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
@@ -78,11 +78,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fixes mounting issues with iOS 10:
-zcat $CWD/libimobiledevice.use_tlsv1_instead_of_sslv3.diff.gz | patch -p1 --verbose || exit 1
-
-# Fix for OpenSSL-1.1.x:
-zcat $CWD/02a0e03e24bc96bba2e5ea2438c30baf803fd137.patch.gz | patch -p1 --verbose || exit 1
+if [ ! -r configure ]; then
+ NOCONFIGURE=1 ./autogen.sh
+fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/source/l/libimobiledevice/libimobiledevice.use_tlsv1_instead_of_sslv3.diff b/source/l/libimobiledevice/libimobiledevice.use_tlsv1_instead_of_sslv3.diff
deleted file mode 100644
index edf763ee..00000000
--- a/source/l/libimobiledevice/libimobiledevice.use_tlsv1_instead_of_sslv3.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/idevice.c b/src/idevice.c
-index f2de6a3..1dcdae2 100644
---- a/src/idevice.c
-+++ b/src/idevice.c
-@@ -703,7 +703,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne
- }
- BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE);
-
-- SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv3_method());
-+ SSL_CTX *ssl_ctx = SSL_CTX_new(TLSv1_method());
- if (ssl_ctx == NULL) {
- debug_info("ERROR: Could not create SSL context.");
- BIO_free(ssl_bio);