[packages/libimobiledevice] - updated to 1.4.0; python2 module (version 1.3.0) saved in python-imobiledevice.spec
qboosh
qboosh at pld-linux.org
Sun Mar 29 09:36:38 CEST 2026
commit 1e50d40a4293336411c2ae2adcabea22a51ec9e6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 29 09:36:50 2026 +0200
- updated to 1.4.0; python2 module (version 1.3.0) saved in python-imobiledevice.spec
libimobiledevice-cython.patch | 45 -------
libimobiledevice-libplist.patch | 28 ----
libimobiledevice-python3.patch | 276 ----------------------------------------
libimobiledevice-sh.patch | 45 +++++++
libimobiledevice.spec | 127 +++++++-----------
5 files changed, 90 insertions(+), 431 deletions(-)
---
diff --git a/libimobiledevice.spec b/libimobiledevice.spec
index 72ff353..7501847 100644
--- a/libimobiledevice.spec
+++ b/libimobiledevice.spec
@@ -1,58 +1,57 @@
#
# Conditional build:
+%bcond_without apidocs # Doxygen documentation
%bcond_without static_libs # static library
%bcond_without cython # Cython based Python bindings
-%bcond_without python3 # Python 3 module
%bcond_without openssl # OpenSSL for SSL support
%bcond_with gnutls # GnuTLS for SSL support
+%bcond_with mbedtls # mbedTLS for SSL support
-%if %{without cython}
-%undefine with_python3
-%endif
-%if %{with gnutls}
+%if %{with gnutls} || %{with mbedtls}
%undefine with_openssl
%endif
Summary: Library for connecting to mobile devices
Summary(pl.UTF-8): Biblioteka do łączenia się z urządzeniami mobilnymi
Name: libimobiledevice
-Version: 1.3.0
-Release: 9
+Version: 1.4.0
+Release: 1
License: LGPL v2+
Group: Libraries
#Source0Download: https://www.libimobiledevice.org/
Source0: https://github.com/libimobiledevice/libimobiledevice/releases/download/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: c50a3a32acf33dc8c9ec88137ad12ec4
-Patch0: %{name}-cython.patch
-Patch1: %{name}-libplist.patch
-Patch2: %{name}-python3.patch
+# Source0-md5: 487f89a041a1ffd068768ea099cbb358
+Patch0: %{name}-sh.patch
URL: https://libimobiledevice.org/
-BuildRequires: autoconf >= 2.64
+BuildRequires: autoconf >= 2.68
BuildRequires: automake
+%{?with_apidocs:BuildRequires: doxygen}
%{?with_gnutls:BuildRequires: gnutls-devel >= 2.2.0}
BuildRequires: libgcrypt-devel
+BuildRequires: libimobiledevice-glue-devel >= 1.3.0
BuildRequires: libplist-devel >= 2.3.0
BuildRequires: libplist-c++-devel >= 2.3.0
BuildRequires: libstdc++-devel
%{?with_gnutls:BuildRequires: libtasn1-devel >= 1.1}
+BuildRequires: libtatsu-devel >= 1.0.3
BuildRequires: libtool
BuildRequires: libusbmuxd-devel >= 2.0.2
+%{?with_mbedtls:BuildRequires: mbedtls-devel}
%{?with_openssl:BuildRequires: openssl-devel >= 0.9.8}
-BuildRequires: pkgconfig
+BuildRequires: pkgconfig >= 1:0.9.0
%if %{with cython}
-BuildRequires: python-Cython >= 0.17.0
-BuildRequires: python-devel >= 1:2.3
-BuildRequires: python-modules >= 1:2.3
-BuildRequires: python-plist-devel >= 2.2.0
-%endif
-%if %{with python3}
-BuildRequires: python3-Cython >= 0.17.0
+BuildRequires: python-plist-devel >= 2.3.0
+BuildRequires: python3-Cython >= 3.0.0
BuildRequires: python3-devel >= 1:3.2
BuildRequires: python3-modules >= 1:3.2
%endif
+BuildRequires: readline-devel >= 1.0
BuildRequires: rpmbuild(macros) >= 2.043
BuildRequires: rpm-pythonprov
+Requires: libimobiledevice-glue >= 1.3.0
Requires: libplist >= 2.3.0
Requires: libplist-c++ >= 2.3.0
+# required by ideviceimagemounter
+Requires: libtatsu >= 1.0.3
Requires: libusbmuxd >= 2.0.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -69,10 +68,12 @@ Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libimobiledevice
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%{?with_gnutls:Requires: gnutls-devel >= 2.2.0}
+Requires: libimobiledevice-glue-devel >= 1.3.0
Requires: libplist-devel >= 2.3.0
Requires: libplist-c++-devel >= 2.3.0
%{?with_gnutls:Requires: libtasn1-devel >= 1.1}
Requires: libusbmuxd-devel >= 2.0.2
+%{?with_mbedtls:Requires: mbedtls-devel}
%{?with_openssl:Requires: openssl-devel >= 0.9.8}
%description devel
@@ -105,25 +106,12 @@ API documentation for libimobiledevice library.
%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki libimobiledevice.
-%package -n python-imobiledevice
-Summary: libimobiledevice Python 2 bindings
-Summary(pl.UTF-8): Wiązania libimobiledevice dla Pythona 2
-Group: Development/Languages/Python
-Requires: %{name} = %{version}-%{release}
-Requires: python-plist >= 2.2.0
-
-%description -n python-imobiledevice
-libimobiledevice Python 2 bindings.
-
-%description -n python-imobiledevice -l pl.UTF-8
-Wiązania libimobiledevice dla Pythona 2.
-
%package -n python3-imobiledevice
Summary: libimobiledevice Python 3 bindings
Summary(pl.UTF-8): Wiązania libimobiledevice dla Pythona 3
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
-Requires: python3-plist >= 2.2.0
+Requires: python3-plist >= 2.3.0
%description -n python3-imobiledevice
libimobiledevice Python 3 bindings.
@@ -133,9 +121,7 @@ Wiązania libimobiledevice dla Pythona 3.
%prep
%setup -q
-%patch -P 0 -p1
-%patch -P 1 -p1
-%patch -P 2 -p1
+%patch -P0 -p1
%build
%{__libtoolize}
@@ -143,55 +129,30 @@ Wiązania libimobiledevice dla Pythona 3.
%{__autoconf}
%{__autoheader}
%{__automake}
-
-install -d build
-cd build
-%define configuredir ..
%configure \
- CYTHON=cython2 \
- PYTHON=%{__python} \
- %{!?with_openssl:--disable-openssl} \
- --disable-silent-rules \
- %{!?with_static_libs:--disable-static} \
- %{!?with_cython:--without-cython}
-
-%{__make}
-cd ..
-
-%if %{with python3}
-topdir=$(pwd)
-install -d build-py3
-cd build-py3
-%define configuredir ..
-%configure \
- CYTHON=cython3 \
+ CYTHON=/usr/bin/cython3 \
PYTHON=%{__python3} \
--disable-silent-rules \
- %{!?with_static_libs:--disable-static}
+ %{!?with_static_libs:--disable-static} \
+ %{!?with_cython:--without-cython} \
+ %{?with_gnutls:--with-gnutls} \
+ %{?with_mbedtls:--with-mbedtls} \
+ %{!?with_openssl:--without-openssl}
-%{__make} -C cython \
- top_builddir="${topdir}/build"
+%if %{with apidocs}
+%{__make} docs
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} -C build install \
+%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libimobiledevice-1.0.la
%if %{with cython}
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la \
- %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/*.a}
-%endif
-
-%if %{with python3}
-%{__make} -C build-py3/cython install \
- DESTDIR=$RPM_BUILD_ROOT \
- top_builddir="$(pwd)/build"
-
%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la \
%{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/*.a}
%endif
@@ -205,13 +166,16 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS NEWS README.md
+%attr(755,root,root) %{_bindir}/afcclient
%attr(755,root,root) %{_bindir}/idevice_id
%attr(755,root,root) %{_bindir}/idevicebackup
%attr(755,root,root) %{_bindir}/idevicebackup2
+%attr(755,root,root) %{_bindir}/idevicebtlogger
%attr(755,root,root) %{_bindir}/idevicecrashreport
%attr(755,root,root) %{_bindir}/idevicedate
%attr(755,root,root) %{_bindir}/idevicedebug
%attr(755,root,root) %{_bindir}/idevicedebugserverproxy
+%attr(755,root,root) %{_bindir}/idevicedevmodectl
%attr(755,root,root) %{_bindir}/idevicediagnostics
%attr(755,root,root) %{_bindir}/ideviceenterrecovery
%attr(755,root,root) %{_bindir}/ideviceimagemounter
@@ -223,15 +187,18 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/idevicescreenshot
%attr(755,root,root) %{_bindir}/idevicesetlocation
%attr(755,root,root) %{_bindir}/idevicesyslog
-%attr(755,root,root) %{_libdir}/libimobiledevice-1.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libimobiledevice-1.0.so.6
+%{_libdir}/libimobiledevice-1.0.so.*.*.*
+%ghost %{_libdir}/libimobiledevice-1.0.so.6
+%{_mandir}/man1/afcclient.1*
%{_mandir}/man1/idevice_id.1*
%{_mandir}/man1/idevicebackup.1*
%{_mandir}/man1/idevicebackup2.1*
+%{_mandir}/man1/idevicebtlogger.1*
%{_mandir}/man1/idevicecrashreport.1*
%{_mandir}/man1/idevicedate.1*
%{_mandir}/man1/idevicedebug.1*
%{_mandir}/man1/idevicedebugserverproxy.1*
+%{_mandir}/man1/idevicedevmodectl.1*
%{_mandir}/man1/idevicediagnostics.1*
%{_mandir}/man1/ideviceenterrecovery.1*
%{_mandir}/man1/ideviceimagemounter.1*
@@ -246,7 +213,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libimobiledevice-1.0.so
+%{_libdir}/libimobiledevice-1.0.so
%{_includedir}/libimobiledevice
%{_pkgconfigdir}/libimobiledevice-1.0.pc
@@ -256,18 +223,14 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libimobiledevice-1.0.a
%endif
+%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
-%doc docs/html/*
-
-%if %{with cython}
-%files -n python-imobiledevice
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/imobiledevice.so
+%doc docs/html/*.{css,html,ico,js,png}
%endif
-%if %{with python3}
+%if %{with cython}
%files -n python3-imobiledevice
%defattr(644,root,root,755)
-%attr(755,root,root) %{py3_sitedir}/imobiledevice.so
+%{py3_sitedir}/imobiledevice.so
%endif
diff --git a/libimobiledevice-cython.patch b/libimobiledevice-cython.patch
deleted file mode 100644
index 2a8c3d2..0000000
--- a/libimobiledevice-cython.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -urNp -x '*.orig' libimobiledevice-1.3.0.org/cython/lockdown.pxi libimobiledevice-1.3.0/cython/lockdown.pxi
---- libimobiledevice-1.3.0.org/cython/lockdown.pxi 2017-07-18 21:03:02.000000000 +0200
-+++ libimobiledevice-1.3.0/cython/lockdown.pxi 2021-03-05 22:34:55.596823231 +0100
-@@ -263,7 +263,7 @@ cdef class LockdownClient(PropertyListSe
- cdef:
- lockdownd_error_t err
- char* c_session_id = NULL
-- bint ssl_enabled
-+ int ssl_enabled
- bytes session_id
- err = lockdownd_start_session(self._c_client, host_id, &c_session_id, <int *>&ssl_enabled)
- try:
---- libimobiledevice-1.3.0/cython/installation_proxy.pxi.orig 2017-07-18 21:03:02.000000000 +0200
-+++ libimobiledevice-1.3.0/cython/installation_proxy.pxi 2025-04-12 19:00:25.736985506 +0200
-@@ -27,7 +27,7 @@ cdef extern from "libimobiledevice/insta
- instproxy_error_t instproxy_restore(instproxy_client_t client, char *appid, plist.plist_t client_options, instproxy_status_cb_t status_cb, void *user_data)
- instproxy_error_t instproxy_remove_archive(instproxy_client_t client, char *appid, plist.plist_t client_options, instproxy_status_cb_t status_cb, void *user_data)
-
--cdef void instproxy_notify_cb(plist.plist_t command, plist.plist_t status, void *py_callback) with gil:
-+cdef void instproxy_notify_cb(plist.plist_t command, plist.plist_t status, void *py_callback) noexcept with gil:
- (<object>py_callback)(plist.plist_t_to_node(command, False), plist.plist_t_to_node(status, False))
-
- cdef class InstallationProxyError(BaseError):
---- libimobiledevice-1.3.0/cython/imobiledevice.pyx.orig 2020-06-07 16:57:09.000000000 +0200
-+++ libimobiledevice-1.3.0/cython/imobiledevice.pyx 2025-04-12 19:02:20.821035188 +0200
-@@ -94,7 +94,7 @@ cdef class iDeviceEvent:
- def __get__(self):
- return self._c_event.conn_type
-
--cdef void idevice_event_cb(const_idevice_event_t c_event, void *user_data) with gil:
-+cdef void idevice_event_cb(const_idevice_event_t c_event, void *user_data) noexcept with gil:
- cdef iDeviceEvent event = iDeviceEvent.__new__(iDeviceEvent)
- event._c_event = c_event
- (<object>user_data)(event)
---- libimobiledevice-1.3.0/cython/notification_proxy.pxi.orig 2017-07-18 21:03:02.000000000 +0200
-+++ libimobiledevice-1.3.0/cython/notification_proxy.pxi 2025-04-12 19:03:04.957976592 +0200
-@@ -70,7 +70,7 @@ NP_ITDBPREP_DID_END = C_NP_ITDBPREP_DID_
- NP_LANGUAGE_CHANGED = C_NP_LANGUAGE_CHANGED
- NP_ADDRESS_BOOK_PREF_CHANGED = C_NP_ADDRESS_BOOK_PREF_CHANGED
-
--cdef void np_notify_cb(const_char_ptr notification, void *py_callback):
-+cdef void np_notify_cb(const_char_ptr notification, void *py_callback) noexcept with gil:
- (<object>py_callback)(notification)
-
- cdef class NotificationProxyError(BaseError):
diff --git a/libimobiledevice-libplist.patch b/libimobiledevice-libplist.patch
deleted file mode 100644
index 87607ba..0000000
--- a/libimobiledevice-libplist.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- libimobiledevice-1.3.0/common/utils.h.orig 2020-03-19 19:56:37.000000000 +0100
-+++ libimobiledevice-1.3.0/common/utils.h 2023-11-26 09:34:42.338076752 +0100
-@@ -51,13 +51,8 @@ char *generate_uuid(void);
- void buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length);
- void buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length);
-
--enum plist_format_t {
-- PLIST_FORMAT_XML,
-- PLIST_FORMAT_BINARY
--};
--
- int plist_read_from_filename(plist_t *plist, const char *filename);
--int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format);
-+int plist_write_to_filename(plist_t plist, const char *filename, plist_format_t format);
-
- void plist_print_to_stream(plist_t plist, FILE* stream);
-
---- libimobiledevice-1.3.0/common/utils.c.orig 2020-03-19 19:56:37.000000000 +0100
-+++ libimobiledevice-1.3.0/common/utils.c 2023-11-26 09:35:54.671018224 +0100
-@@ -314,7 +314,7 @@ int plist_read_from_filename(plist_t *pl
- return 1;
- }
-
--int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format)
-+int plist_write_to_filename(plist_t plist, const char *filename, plist_format_t format)
- {
- char *buffer = NULL;
- uint32_t length;
diff --git a/libimobiledevice-python3.patch b/libimobiledevice-python3.patch
deleted file mode 100644
index 1eb5a9d..0000000
--- a/libimobiledevice-python3.patch
+++ /dev/null
@@ -1,276 +0,0 @@
-From 7044571b4f243d2fda4dd3aa491f2f279787ee19 Mon Sep 17 00:00:00 2001
-From: wendyisgr33n <wendyisgr33n at gmail.com>
-Date: Mon, 30 Jul 2018 10:43:57 -0700
-Subject: [PATCH] Fixed AFC afc.pxi definitions for Python2/3 compatibility.
- Added missing public method 'remove_path_and_contents'
-
----
- cython/afc.pxi | 28 ++++++++++++++++------------
- 1 file changed, 16 insertions(+), 12 deletions(-)
-
-diff --git a/cython/afc.pxi b/cython/afc.pxi
-index e34588f96..6bd81824d 100644
---- a/cython/afc.pxi
-+++ b/cython/afc.pxi
-@@ -52,6 +52,7 @@ cdef extern from "libimobiledevice/afc.h":
- afc_error_t afc_read_directory(afc_client_t client, char *dir, char ***list)
- afc_error_t afc_get_file_info(afc_client_t client, char *filename, char ***infolist)
- afc_error_t afc_remove_path(afc_client_t client, char *path)
-+ afc_error_t afc_remove_path_and_contents(afc_client_t client, char *path)
- afc_error_t afc_rename_path(afc_client_t client, char *f, char *to)
- afc_error_t afc_make_directory(afc_client_t client, char *dir)
- afc_error_t afc_truncate(afc_client_t client, char *path, uint64_t newsize)
-@@ -235,17 +236,17 @@ cdef class AfcClient(BaseService):
- afc_file_mode_t c_mode
- uint64_t handle
- AfcFile f
-- if mode == <bytes>'r':
-+ if mode == b'r':
- c_mode = AFC_FOPEN_RDONLY
-- elif mode == <bytes>'r+':
-+ elif mode == b'r+':
- c_mode = AFC_FOPEN_RW
-- elif mode == <bytes>'w':
-+ elif mode == b'w':
- c_mode = AFC_FOPEN_WRONLY
-- elif mode == <bytes>'w+':
-+ elif mode == b'w+':
- c_mode = AFC_FOPEN_WR
-- elif mode == <bytes>'a':
-+ elif mode == b'a':
- c_mode = AFC_FOPEN_APPEND
-- elif mode == <bytes>'a+':
-+ elif mode == b'a+':
- c_mode = AFC_FOPEN_RDAPPEND
- else:
- raise ValueError("mode string must be 'r', 'r+', 'w', 'w+', 'a', or 'a+'")
-@@ -282,6 +283,9 @@ cdef class AfcClient(BaseService):
- cpdef remove_path(self, bytes path):
- self.handle_error(afc_remove_path(self._c_client, path))
-
-+ cpdef remove_path_and_contents(self, bytes path):
-+ self.handle_error(afc_remove_path_and_contents(self._c_client, path))
-+
- cpdef rename_path(self, bytes f, bytes t):
- self.handle_error(afc_rename_path(self._c_client, f, t))
-
-@@ -308,17 +312,17 @@ cdef class Afc2Client(AfcClient):
- afc_file_mode_t c_mode
- uint64_t handle
- AfcFile f
-- if mode == <bytes>'r':
-+ if mode == b'r':
- c_mode = AFC_FOPEN_RDONLY
-- elif mode == <bytes>'r+':
-+ elif mode == b'r+':
- c_mode = AFC_FOPEN_RW
-- elif mode == <bytes>'w':
-+ elif mode == b'w':
- c_mode = AFC_FOPEN_WRONLY
-- elif mode == <bytes>'w+':
-+ elif mode == b'w+':
- c_mode = AFC_FOPEN_WR
-- elif mode == <bytes>'a':
-+ elif mode == b'a':
- c_mode = AFC_FOPEN_APPEND
-- elif mode == <bytes>'a+':
-+ elif mode == b'a+':
- c_mode = AFC_FOPEN_RDAPPEND
- else:
- raise ValueError("mode string must be 'r', 'r+', 'w', 'w+', 'a', or 'a+'")
-From 1df0e4bfe86fde89772bf54d06c4546af85e303c Mon Sep 17 00:00:00 2001
-From: wendyisgr33n <wendyisgr33n at gmail.com>
-Date: Mon, 30 Jul 2018 10:44:40 -0700
-Subject: [PATCH] Fixed debugserver.pxi PyString_AsString compatibility with
- Python3
-
----
- cython/debugserver.pxi | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/cython/debugserver.pxi b/cython/debugserver.pxi
-index 4ecb9e1a1..a3b7d1e53 100644
---- a/cython/debugserver.pxi
-+++ b/cython/debugserver.pxi
-@@ -44,7 +44,12 @@ cdef class DebugServerError(BaseError):
-
-
- # from http://stackoverflow.com/a/17511714
--from cpython.string cimport PyString_AsString
-+# https://github.com/libimobiledevice/libimobiledevice/pull/198
-+from cpython cimport PY_MAJOR_VERSION
-+if PY_MAJOR_VERSION <= 2:
-+ from cpython.string cimport PyString_AsString
-+else:
-+ from cpython.bytes cimport PyBytes_AsString as PyString_AsString
- cdef char ** to_cstring_array(list_str):
- if not list_str:
- return NULL
-From 88ea0e3b553c26bddb7e49ec2aac6197c84aab25 Mon Sep 17 00:00:00 2001
-From: wendyisgr33n <wendyisgr33n at gmail.com>
-Date: Mon, 30 Jul 2018 10:45:22 -0700
-Subject: [PATCH] Fixed bytes/strings check in imobiledevice.pyx for
- compatibility with Python2/3
-
----
- cython/imobiledevice.pyx | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx
-index aac4fdbc5..2a125aa18 100644
---- a/cython/imobiledevice.pyx
-+++ b/cython/imobiledevice.pyx
-@@ -176,7 +176,7 @@ from libc.stdlib cimport *
- cdef class iDevice(Base):
- def __cinit__(self, object udid=None, *args, **kwargs):
- cdef char* c_udid = NULL
-- if isinstance(udid, basestring):
-+ if isinstance(udid, (str, bytes)):
- c_udid = <bytes>udid
- elif udid is not None:
- raise TypeError("iDevice's constructor takes a string or None as the udid argument")
-From 652dfdb12ebcdec64dba066550d893de17839365 Mon Sep 17 00:00:00 2001
-From: wendyisgr33n <wendyisgr33n at gmail.com>
-Date: Mon, 30 Jul 2018 10:45:55 -0700
-Subject: [PATCH] Fixed bytes/strings checks in lockdown.pxi for compatibility
- with Python2/3
-
----
- cython/lockdown.pxi | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/cython/lockdown.pxi b/cython/lockdown.pxi
-index f24904974..1bf7072e1 100644
---- a/cython/lockdown.pxi
-+++ b/cython/lockdown.pxi
-@@ -230,9 +230,9 @@ cdef class LockdownClient(PropertyListService):
-
- if issubclass(service, BaseService) and \
- service.__service_name__ is not None \
-- and isinstance(service.__service_name__, basestring):
-+ and isinstance(service.__service_name__, (str, bytes)):
- c_service_name = <bytes>service.__service_name__
-- elif isinstance(service, basestring):
-+ elif isinstance(service, (str, bytes)):
- c_service_name = <bytes>service
- else:
- raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument")
-@@ -253,7 +253,7 @@ cdef class LockdownClient(PropertyListService):
-
- if not hasattr(service_class, '__service_name__') and \
- not service_class.__service_name__ is not None \
-- and not isinstance(service_class.__service_name__, basestring):
-+ and not isinstance(service_class.__service_name__, (str, bytes)):
- raise TypeError("LockdownClient.get_service_client() takes a BaseService as its first argument")
-
- descriptor = self.start_service(service_class)
-From 12d3a070717ad734b1048b1dcacffae5b903f190 Mon Sep 17 00:00:00 2001
-From: wendyisgr33n <wendyisgr33n at gmail.com>
-Date: Mon, 30 Jul 2018 10:47:48 -0700
-Subject: [PATCH] Fixed method visibility in mobilebackup2.pxi API
-
----
- cython/mobilebackup2.pxi | 31 ++++++++++++++++++-------------
- 1 file changed, 18 insertions(+), 13 deletions(-)
-
-diff --git a/cython/mobilebackup2.pxi b/cython/mobilebackup2.pxi
-index 4eccae6c0..4b47e5b6f 100644
---- a/cython/mobilebackup2.pxi
-+++ b/cython/mobilebackup2.pxi
-@@ -58,10 +58,10 @@ cdef class MobileBackup2Client(PropertyListService):
- cdef inline BaseError _error(self, int16_t ret):
- return MobileBackup2Error(ret)
-
-- cdef send_message(self, bytes message, plist.Node options):
-+ cpdef send_message(self, bytes message, plist.Node options):
- self.handle_error(mobilebackup2_send_message(self._c_client, message, options._c_node))
-
-- cdef tuple receive_message(self):
-+ cpdef tuple receive_message(self):
- cdef:
- char* dlmessage = NULL
- plist.plist_t c_node = NULL
-@@ -77,29 +77,34 @@ cdef class MobileBackup2Client(PropertyListService):
- free(dlmessage)
- raise
-
-- cdef int send_raw(self, bytes data, int length):
-+ cpdef int send_raw(self, bytes data, int length):
- cdef:
-- uint32_t bytes = 0
-+ uint32_t bytes_recvd = 0
- mobilebackup2_error_t err
-- err = mobilebackup2_send_raw(self._c_client, data, length, &bytes)
-+ err = mobilebackup2_send_raw(self._c_client, data, length, &bytes_recvd)
- try:
- self.handle_error(err)
-- return <bint>bytes
-+ return <bint>bytes_recvd
- except BaseError, e:
- raise
-
-- cdef int receive_raw(self, bytes data, int length):
-+ cpdef int receive_raw(self, bytearray data, int length):
- cdef:
-- uint32_t bytes = 0
-+ uint32_t bytes_recvd = 0
- mobilebackup2_error_t err
-- err = mobilebackup2_receive_raw(self._c_client, data, length, &bytes)
-+ err = mobilebackup2_receive_raw(self._c_client, data, length, &bytes_recvd)
-+
-+ # Throwing an exception when we test if theres more data to read is excessive
-+ if err == -1 and bytes_recvd == 0:
-+ return 0
-+
- try:
- self.handle_error(err)
-- return <bint>bytes
-+ return <bint>bytes_recvd
- except BaseError, e:
- raise
-
-- cdef float version_exchange(self, double[::1] local_versions):
-+ cpdef float version_exchange(self, double[::1] local_versions):
- cdef:
- double[::1] temp = None
- double remote_version = 0.0
-@@ -111,8 +116,8 @@ cdef class MobileBackup2Client(PropertyListService):
- except BaseError, e:
- raise
-
-- cdef send_request(self, bytes request, bytes target_identifier, bytes source_identifier, plist.Node options):
-+ cpdef send_request(self, bytes request, bytes target_identifier, bytes source_identifier, plist.Node options):
- self.handle_error(mobilebackup2_send_request(self._c_client, request, target_identifier, source_identifier, options._c_node))
-
-- cdef send_status_response(self, int status_code, bytes status1, plist.Node status2):
-+ cpdef send_status_response(self, int status_code, bytes status1, plist.Node status2):
- self.handle_error(mobilebackup2_send_status_response(self._c_client, status_code, status1, status2._c_node))
-From a7f993d45cf1516a2ed6c82fcddd9677984a65c8 Mon Sep 17 00:00:00 2001
-From: Dave Nicolson <david.nicolson at gmail.com>
-Date: Thu, 23 Nov 2023 22:28:49 +0100
-Subject: [PATCH] cython: Fix Python 3 LockdownClient exception
-
-Fixes #1110
----
- cython/lockdown.pxi | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/cython/lockdown.pxi b/cython/lockdown.pxi
-index 1bf7072e1..6b88f9d82 100644
---- a/cython/lockdown.pxi
-+++ b/cython/lockdown.pxi
-@@ -231,11 +231,12 @@ cdef class LockdownClient(PropertyListService):
- if issubclass(service, BaseService) and \
- service.__service_name__ is not None \
- and isinstance(service.__service_name__, (str, bytes)):
-- c_service_name = <bytes>service.__service_name__
-+ c_service_name_str = service.__service_name__.encode('utf-8')
- elif isinstance(service, (str, bytes)):
-- c_service_name = <bytes>service
-+ c_service_name_str = service.encode('utf-8')
- else:
- raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument")
-+ c_service_name = c_service_name_str
-
- try:
- self.handle_error(lockdownd_start_service(self._c_client, c_service_name, &c_descriptor))
diff --git a/libimobiledevice-sh.patch b/libimobiledevice-sh.patch
new file mode 100644
index 0000000..ab4e11e
--- /dev/null
+++ b/libimobiledevice-sh.patch
@@ -0,0 +1,45 @@
+--- libimobiledevice-1.4.0/configure.ac.orig 2025-10-05 23:29:21.000000000 +0200
++++ libimobiledevice-1.4.0/configure.ac 2026-03-29 07:48:52.428873035 +0200
+@@ -85,7 +85,7 @@ if test "x$ac_cv_have_endian_h" = "xno";
+ fi
+
+ CACHED_CFLAGS="$CFLAGS"
+-CFLAGS+=" $libplist_CFLAGS -Werror"
++CFLAGS="$CFLAGS $libplist_CFLAGS -Werror"
+
+ AC_CHECK_DECL([plist_from_json], [AC_DEFINE([HAVE_PLIST_JSON], [1], [Define if libplist has JSON support])], [], [[#include <plist/plist.h>]])
+
+@@ -138,7 +138,7 @@ if test "$build_cython" = "true"; then
+ AM_PATH_PYTHON([3.0], [
+ CYTHON_PYTHON
+ AS_COMPILER_FLAG([-Wno-cast-function-type -Werror], [
+- CYTHON_CFLAGS+=" -Wno-cast-function-type"
++ CYTHON_CFLAGS="$CYTHON_CFLAGS -Wno-cast-function-type"
+ AC_SUBST([CYTHON_CFLAGS])
+ ], [])
+ ])
+@@ -204,12 +204,12 @@ if test "x$use_mbedtls" = "xyes"; then
+ fi
+ conf_mbedtls_LIBS=""
+ if test -n "$mbedtls_LIBDIR"; then
+- conf_mbedtls_LIBS+=" -L$mbedtls_LIBDIR"
++ conf_mbedtls_LIBS="$conf_mbedtls_LIBS -L$mbedtls_LIBDIR"
+ fi
+ if test -n "$mbedtls_LIBS"; then
+- conf_mbedtls_LIBS+=" $mbedtls_LIBS"
++ conf_mbedtls_LIBS="$conf_mbedtls_LIBS $mbedtls_LIBS"
+ else
+- conf_mbedtls_LIBS+=" -lmbedtls -lmbedx509 -lmbedcrypto"
++ conf_mbedtls_LIBS="$conf_mbedtls_LIBS -lmbedtls -lmbedx509 -lmbedcrypto"
+ fi
+ AC_CHECK_HEADER(mbedtls/ssl.h, [break], [AC_MSG_ERROR([MbedTLS support explicitly requested, but includes could not be found. Try setting mbedtls_INCLUDES=/path/to/mbedtls/include])])
+ CFLAGS="$CACHED_CFLAGS"
+@@ -316,7 +316,7 @@ fi
+ AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden")
+
+ if test "x$enable_static" = "xyes" -a "x$enable_shared" = "xno"; then
+- GLOBAL_CFLAGS+=" -DLIBIMOBILEDEVICE_STATIC"
++ GLOBAL_CFLAGS="$GLOBAL_CFLAGS -DLIBIMOBILEDEVICE_STATIC"
+ fi
+
+ AC_SUBST(GLOBAL_CFLAGS)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libimobiledevice.git/commitdiff/1e50d40a4293336411c2ae2adcabea22a51ec9e6
More information about the pld-cvs-commit
mailing list