[libimobiledevice] Add iOS 5 support patches from upstream
Bastien Nocera
hadess at fedoraproject.org
Thu Dec 1 19:36:03 UTC 2011
commit f700f459c0fa7b61d838c6d1146d736593602df8
Author: Bastien Nocera <hadess at hadess.net>
Date: Thu Dec 1 20:06:26 2011 +0100
Add iOS 5 support patches from upstream
0001-lockdown-fix-support-for-iOS-5.patch | 27 ++++++++++++++
...S-5-handle-Error-key-in-lockdown_check_re.patch | 39 ++++++++++++++++++++
libimobiledevice.spec | 11 +++++-
3 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/0001-lockdown-fix-support-for-iOS-5.patch b/0001-lockdown-fix-support-for-iOS-5.patch
new file mode 100644
index 0000000..8c9983c
--- /dev/null
+++ b/0001-lockdown-fix-support-for-iOS-5.patch
@@ -0,0 +1,27 @@
+From f0487376671ffd6ac3fc121657f1fbd0acea3cb0 Mon Sep 17 00:00:00 2001
+From: Nikias Bassen <nikias at gmx.li>
+Date: Tue, 7 Jun 2011 17:59:22 +0200
+Subject: [PATCH] lockdown: fix support for iOS 5
+
+---
+ src/lockdown.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/lockdown.c b/src/lockdown.c
+index 935f24e..15b3d69 100644
+--- a/src/lockdown.c
++++ b/src/lockdown.c
+@@ -86,7 +86,9 @@ static int lockdown_check_result(plist_t dict, const char *query_match)
+
+ plist_t result_node = plist_dict_get_item(dict, "Result");
+ if (!result_node) {
+- return ret;
++ /* iOS 5: the 'Result' key is not present anymore.
++ Just assume success here */
++ return RESULT_SUCCESS;
+ }
+
+ plist_type result_type = plist_get_node_type(result_node);
+--
+1.7.7.3
+
diff --git a/0001-lockdown-iOS-5-handle-Error-key-in-lockdown_check_re.patch b/0001-lockdown-iOS-5-handle-Error-key-in-lockdown_check_re.patch
new file mode 100644
index 0000000..984b45c
--- /dev/null
+++ b/0001-lockdown-iOS-5-handle-Error-key-in-lockdown_check_re.patch
@@ -0,0 +1,39 @@
+From e855f246b3d869a60375207fde1294bbe761fe23 Mon Sep 17 00:00:00 2001
+From: Nikias Bassen <nikias at gmx.li>
+Date: Mon, 21 Nov 2011 16:50:24 +0100
+Subject: [PATCH] lockdown: iOS 5: handle 'Error' key in lockdown_check_result
+
+---
+ src/lockdown.c | 16 +++++++++++++++-
+ 1 files changed, 15 insertions(+), 1 deletions(-)
+
+diff --git a/src/lockdown.c b/src/lockdown.c
+index 327d9e5..1783df6 100644
+--- a/src/lockdown.c
++++ b/src/lockdown.c
+@@ -87,7 +87,21 @@ static int lockdown_check_result(plist_t dict, const char *query_match)
+ plist_t result_node = plist_dict_get_item(dict, "Result");
+ if (!result_node) {
+ /* iOS 5: the 'Result' key is not present anymore.
+- Just assume success here */
++ But we need to check for the 'Error' key. */
++ plist_t err_node = plist_dict_get_item(dict, "Error");
++ if (err_node) {
++ if (plist_get_node_type(err_node) == PLIST_STRING) {
++ char *err_value = NULL;
++ plist_get_string_val(err_node, &err_value);
++ if (err_value) {
++ debug_info("ERROR: %s", err_value);
++ free(err_value);
++ } else {
++ debug_info("ERROR: unknown error occured");
++ }
++ }
++ return RESULT_FAILURE;
++ }
+ return RESULT_SUCCESS;
+ }
+
+--
+1.7.7.3
+
diff --git a/libimobiledevice.spec b/libimobiledevice.spec
index b372bd8..a202f21 100644
--- a/libimobiledevice.spec
+++ b/libimobiledevice.spec
@@ -2,7 +2,7 @@
Name: libimobiledevice
Version: 1.1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Library for connecting to mobile devices
Group: System Environment/Libraries
@@ -25,6 +25,10 @@ Obsoletes: libiphone < 0.9.7
# http://cgit.sukimashita.com/libimobiledevice.git/commit/?id=6dccecddf012a0a404d121cc2c42ddce7c485fb7
Patch0: 0001-Remove-deprecated-gnutls_-_set_priority-and-use-gnut.patch
+# http://cgit.sukimashita.com/libimobiledevice.git/commit/?id=f0487376671ffd6ac3fc121657f1fbd0acea3cb0
+Patch1: 0001-lockdown-fix-support-for-iOS-5.patch
+# http://cgit.sukimashita.com/libimobiledevice.git/commit/?id=e855f246b3d869a60375207fde1294bbe761fe23
+Patch2: 0001-lockdown-iOS-5-handle-Error-key-in-lockdown_check_re.patch
%description
libimobiledevice is a library for connecting to mobile devices including phones
@@ -55,6 +59,8 @@ Python bindings for libimobiledevice.
%prep
%setup -q
%patch0 -p1 -b .gnutls
+%patch1 -p1 -b .result
+%patch2 -p1 -b .error
# Fix dir permissions on html docs
chmod +x docs/html
@@ -102,6 +108,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%{python_sitearch}/imobiledevice/
%changelog
+* Thu Dec 01 2011 Bastien Nocera <bnocera at redhat.com> 1.1.1-3
+- Add iOS 5 support patches from upstream
+
* Wed Sep 21 2011 Bastien Nocera <bnocera at redhat.com> 1.1.1-2
- Fix compilation against recent version of gnutls
More information about the scm-commits
mailing list