[ifuse] Add patch to work with newer libimobiledevice (980949)

Peter Robinson pbrobinson at fedoraproject.org
Thu Sep 19 03:32:42 UTC 2013


commit c4ba3bdab5a36906acaa1d2b2f431901c3560e5f
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Thu Sep 19 04:32:19 2013 +0100

    Add patch to work with newer libimobiledevice (980949)

 ifuse-libimobiledevice115.patch |   78 +++++++++++++++++++++++++++++++++++++++
 ifuse.spec                      |    8 +++-
 2 files changed, 85 insertions(+), 1 deletions(-)
---
diff --git a/ifuse-libimobiledevice115.patch b/ifuse-libimobiledevice115.patch
new file mode 100644
index 0000000..8d74cf8
--- /dev/null
+++ b/ifuse-libimobiledevice115.patch
@@ -0,0 +1,78 @@
+From 9ac32aa3cb2ed5242c0fe3c58ef5f571bf2b95d7 Mon Sep 17 00:00:00 2001
+From: Nikias Bassen
+Date: Sun, 24 Mar 2013 01:45:23 +0000
+Subject: Updated for libimobiledevice >= 1.1.5
+
+---
+diff --git a/configure.ac b/configure.ac
+index 85d131a..ca518ff 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,6 +17,10 @@ PKG_CHECK_MODULES(libimobiledevice11, libimobiledevice-1.0 >= 1.1.0, libimobiled
+ if test x"$libimobiledevice_1_1" = xyes; then
+   AC_DEFINE([HAVE_LIBIMOBILEDEVICE_1_1], 1, [Define if libimobiledevice is using 1.1.0 API])
+ fi
++PKG_CHECK_MODULES(libimobiledevice11, libimobiledevice-1.0 >= 1.1.5, libimobiledevice_1_1_5=yes, libimobiledevice_1_1_5=no)
++if test x"$libimobiledevice_1_1_5" = xyes; then
++  AC_DEFINE([HAVE_LIBIMOBILEDEVICE_1_1_5], 1, [Define if libimobiledevice is using 1.1.5 API])
++fi
+ libimobiledevice_VERSION=`$PKG_CONFIG --modversion "libimobiledevice-1.0" 2>&1`
+ PKG_CHECK_MODULES(libfuse, fuse >= 2.7.0)
+ PKG_CHECK_MODULES(libplist, libplist)
+diff --git a/src/ifuse.c b/src/ifuse.c
+index b5735ee..9fafb47 100644
+--- a/src/ifuse.c
++++ b/src/ifuse.c
+@@ -71,7 +71,11 @@ static struct {
+ 	char *appid;
+ #endif
+ 	char *service_name;
++#ifdef HAVE_LIBIMOBILEDEVICE_1_1_5
++	lockdownd_service_descriptor_t service;
++#else
+ 	uint16_t port;
++#endif
+ } opts;
+ 
+ enum {
+@@ -402,7 +406,11 @@ void *ifuse_init(struct fuse_conn_info *conn)
+ 		afc_client_new_from_house_arrest_client(house_arrest, &afc);
+ 	} else { 
+ #endif
++#ifdef HAVE_LIBIMOBILEDEVICE_1_1_5
++		afc_client_new(phone, opts.service, &afc);
++#else
+ 		afc_client_new(phone, opts.port, &afc);
++#endif
+ #ifdef HAVE_LIBIMOBILEDEVICE_1_1
+ 	}
+ #endif
+@@ -744,7 +752,13 @@ int main(int argc, char *argv[])
+ 		return EXIT_FAILURE;
+ 	}
+ 
+-	if ((lockdownd_start_service(control, opts.service_name, &opts.port) != LOCKDOWN_E_SUCCESS) || !opts.port) {
++	if (
++#ifdef HAVE_LIBIMOBILEDEVICE_1_1_5
++	(lockdownd_start_service(control, opts.service_name, &opts.service) != LOCKDOWN_E_SUCCESS) || !opts.service
++#else
++	(lockdownd_start_service(control, opts.service_name, &opts.port) != LOCKDOWN_E_SUCCESS) || !opts.port
++#endif
++ 	) {
+ 		lockdownd_client_free(control);
+ 		idevice_free(phone);
+ 		fprintf(stderr, "Failed to start AFC service '%s' on the device.\n", opts.service_name);
+@@ -757,7 +771,11 @@ int main(int argc, char *argv[])
+ 
+ #ifdef HAVE_LIBIMOBILEDEVICE_1_1
+ 	if (!strcmp(opts.service_name, HOUSE_ARREST_SERVICE_NAME)) {
++#ifdef HAVE_LIBIMOBILEDEVICE_1_1_5
++		house_arrest_client_new(phone, opts.service, &house_arrest);
++#else
+ 		house_arrest_client_new(phone, opts.port, &house_arrest);
++#endif
+ 		if (!house_arrest) {
+ 			fprintf(stderr, "Could not start document sharing service!\n");
+ 			return EXIT_FAILURE;
+--
+cgit v0.9.1-1-gc6f5
diff --git a/ifuse.spec b/ifuse.spec
index 62b8a57..eab0f2a 100644
--- a/ifuse.spec
+++ b/ifuse.spec
@@ -1,12 +1,14 @@
 Name:          ifuse
 Version:       1.1.2
-Release:       5%{?dist}
+Release:       6%{?dist}
 Summary:       Mount Apple iPhone and iPod touch devices
 
 Group:         System Environment/Libraries
 License:       GPLv2+
 URL:           http://www.libimobiledevice.org/
 Source0:       http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
+# http://cgit.sukimashita.com/ifuse.git/commit/?id=9ac32aa3cb2ed5242c0fe3c58ef5f571bf2b95d7
+Patch0:        ifuse-libimobiledevice115.patch
 
 BuildRequires: fuse-devel
 BuildRequires: libimobiledevice-devel
@@ -17,6 +19,7 @@ A fuse filesystem for mounting iPhone and iPod touch devices
 
 %prep
 %setup -q
+%patch0 -p1 -b .115
 
 %build
 %configure --disable-static
@@ -31,6 +34,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
 %{_mandir}/man1/*
 
 %changelog
+* Thu Sep 19 2013 Peter Robinson <pbrobinson at fedoraproject.org> 1.1.2-6
+- Add patch to work with newer libimobiledevice (980949)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.2-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list