From f8d4e20ce06fae02d1574b76f1501a381fc6a8a8 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 16:22:03 -0400 Subject: [PATCH 1/8] libplist: update to 2.2.0 --- common/shlibs | 4 ++-- srcpkgs/libplist/template | 20 ++++++-------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/common/shlibs b/common/shlibs index d21589f14a5..e7ae75e90b4 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1058,8 +1058,8 @@ libisc.so.1606 bind-libs-9.16.6_1 libisccc.so.1600 bind-libs-9.16.2_1 libisccfg.so.1601 bind-libs-9.16.7_1 libns.so.1604 bind-libs-9.16.5_1 -libplist.so.3 libplist-1.12_1 -libplist++.so.3 libplist++-1.12_1 +libplist-2.0.so.3 libplist-2.2.0_1 +libplist++-2.0.so.3 libplist++-2.2.0_1 libnsbmp.so.0 libnsbmp-0.0.3_1 libnsgif.so.0 libnsgif-0.0.3_1 libparserutils.so.0 libparserutils-0.1.1_1 diff --git a/srcpkgs/libplist/template b/srcpkgs/libplist/template index 97e6918af7d..f6f73a18d1b 100644 --- a/srcpkgs/libplist/template +++ b/srcpkgs/libplist/template @@ -1,37 +1,29 @@ # Template file for 'libplist' pkgname=libplist -version=2.1.0 +version=2.2.0 revision=1 build_style=gnu-configure configure_args="--disable-static" -hostmakedepends="automake libtool pkgconf python-devel python-Cython" -makedepends="python-devel libglib-devel libxml2-devel" +hostmakedepends="automake libtool pkgconf python3-devel python3-Cython" +makedepends="python3-devel libglib-devel libxml2-devel" short_desc="Apple Property List library" maintainer="Orphaned " license="LGPL-2.1-only" homepage="https://github.com/libimobiledevice/libplist/" distfiles="https://github.com/libimobiledevice/libplist/archive/${version}.tar.gz" -checksum=4b33f9af3f9208d54a3c3e1a8c149932513f451c98d1dd696fe42c06e30b7f03 - -pre_configure() { - sed -i 's,-L$(libdir),,g' cython/Makefile.am - export PYTHON_CPPFLAGS=" -I${XBPS_CROSS_BASE}/usr/include/python2.7" - export PYTHON_LDFLAGS=" -L${XBPS_CROSS_BASE}/usr/lib -lpython2.7" - autoreconf -fi - sed -i "s#\$PYTHON-config#__DOES_NOT_EXIST__#" configure -} +checksum=7e654bdd5d8b96f03240227ed09057377f06ebad08e1c37d0cfa2abe6ba0cee2 libplist++_package() { short_desc+=" - C++ runtime library" pkg_install() { - vmove usr/lib/libplist++.so.* + vmove usr/lib/libplist++-2.0.so.* } } libplist-python_package() { lib32disabled=yes short_desc+=" - Python bindings" pkg_install() { - vmove usr/lib/python2.7 + vmove ${py3_lib} } } libplist-devel_package() { From 207b43c3c087ced465e21f20650db932ff46e04a Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 19:23:50 -0400 Subject: [PATCH 2/8] libusbmuxd: update to 2.0.2 --- common/shlibs | 2 +- srcpkgs/libusbmuxd/template | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/shlibs b/common/shlibs index e7ae75e90b4..b67c75ab151 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2039,7 +2039,7 @@ libqtermwidget5.so.0 qtermwidget-0.6.0_1 libnpth.so.0 npth-1.1_1 libnpupnp.so.4 libnpupnp-4.0.2_1 libglfw.so.3 glfw-3.0.4_1 -libusbmuxd.so.6 libusbmuxd-1.0.10_1 +libusbmuxd-2.0.so.6 libusbmuxd-2.0.2_1 libimobiledevice.so.6 libimobiledevice-1.2.0_1 libstfl.so.0 stfl-0.23_1 libCDApplet.so cairo-dock-plugins-3.4.0_1 diff --git a/srcpkgs/libusbmuxd/template b/srcpkgs/libusbmuxd/template index 0592cb5000c..908ee5c2c7e 100644 --- a/srcpkgs/libusbmuxd/template +++ b/srcpkgs/libusbmuxd/template @@ -1,6 +1,6 @@ # Template file for 'libusbmuxd' pkgname=libusbmuxd -version=2.0.1 +version=2.0.2 revision=1 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" @@ -10,7 +10,7 @@ maintainer="Orphaned " license="LGPL-2.1-only" homepage="https://marcan.st/blog/iphonelinux/usbmuxd/" distfiles="https://github.com/libimobiledevice/libusbmuxd/archive/${version}.tar.gz" -checksum=f93faf3b3a73e283646f4d62b3421aeccf58142266b0eb22b2b13dd4b2362eb8 +checksum=8ae3e1d9340177f8f3a785be276435869363de79f491d05d8a84a59efc8a8fdc pre_configure() { autoreconf -fi From 56d720a11e3765347ec0922d0ca2cc158ca3771f Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 19:25:21 -0400 Subject: [PATCH 3/8] libimobiledevice: update to 1.3.0 --- common/shlibs | 2 +- .../patches/CVE-2016-5104.patch | 32 ------------------- .../patches/libresslfix.patch | 22 +++++++++++++ .../libimobiledevice/patches/python3.patch | 30 ----------------- srcpkgs/libimobiledevice/template | 10 ++---- 5 files changed, 26 insertions(+), 70 deletions(-) delete mode 100644 srcpkgs/libimobiledevice/patches/CVE-2016-5104.patch create mode 100644 srcpkgs/libimobiledevice/patches/libresslfix.patch delete mode 100644 srcpkgs/libimobiledevice/patches/python3.patch diff --git a/common/shlibs b/common/shlibs index b67c75ab151..63ad2f50630 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2040,7 +2040,7 @@ libnpth.so.0 npth-1.1_1 libnpupnp.so.4 libnpupnp-4.0.2_1 libglfw.so.3 glfw-3.0.4_1 libusbmuxd-2.0.so.6 libusbmuxd-2.0.2_1 -libimobiledevice.so.6 libimobiledevice-1.2.0_1 +libimobiledevice-1.0.so.6 libimobiledevice-1.3.0_1 libstfl.so.0 stfl-0.23_1 libCDApplet.so cairo-dock-plugins-3.4.0_1 libldns.so.3 libldns-1.7.1_1 diff --git a/srcpkgs/libimobiledevice/patches/CVE-2016-5104.patch b/srcpkgs/libimobiledevice/patches/CVE-2016-5104.patch deleted file mode 100644 index f9b5e12a4fd..00000000000 --- a/srcpkgs/libimobiledevice/patches/CVE-2016-5104.patch +++ /dev/null @@ -1,32 +0,0 @@ -From df1f5c4d70d0c19ad40072f5246ca457e7f9849e Mon Sep 17 00:00:00 2001 -From: Joshua Hill -Date: Tue, 29 Dec 2015 22:27:17 +0100 -Subject: [PATCH] common: [security fix] Make sure sockets only listen locally - ---- - common/socket.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common/socket.c b/common/socket.c -index b276864e..e2968a64 100644 ---- common/socket.c -+++ common/socket.c -@@ -172,7 +172,7 @@ int socket_create(uint16_t port) - - memset((void *) &saddr, 0, sizeof(saddr)); - saddr.sin_family = AF_INET; -- saddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - saddr.sin_port = htons(port); - - if (0 > bind(sfd, (struct sockaddr *) &saddr, sizeof(saddr))) { -@@ -329,7 +329,7 @@ int socket_accept(int fd, uint16_t port) - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; -- addr.sin_addr.s_addr = htonl(INADDR_ANY); -+ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - addr.sin_port = htons(port); - - addr_len = sizeof(addr); - diff --git a/srcpkgs/libimobiledevice/patches/libresslfix.patch b/srcpkgs/libimobiledevice/patches/libresslfix.patch new file mode 100644 index 00000000000..d45de0e721a --- /dev/null +++ b/srcpkgs/libimobiledevice/patches/libresslfix.patch @@ -0,0 +1,22 @@ +From 170e1c445e8c930f4ee9dddfb9f1bcf24c089962 Mon Sep 17 00:00:00 2001 +From: Nikias Bassen +Date: Thu, 6 Aug 2020 20:43:08 +0200 +Subject: [PATCH] idevice: Fix build with LibreSSL + +--- + src/idevice.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/idevice.c b/src/idevice.c +index fea1e03f..47c9ab4d 100644 +--- src/idevice.c ++++ src/idevice.c +@@ -1015,7 +1015,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne + return ret; + } + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + SSL_CTX_set_security_level(ssl_ctx, 0); + #endif + diff --git a/srcpkgs/libimobiledevice/patches/python3.patch b/srcpkgs/libimobiledevice/patches/python3.patch deleted file mode 100644 index dbe0d1281f1..00000000000 --- a/srcpkgs/libimobiledevice/patches/python3.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6198152e8708a36782d48bc9d3a5835b19be3330 Mon Sep 17 00:00:00 2001 -From: Andrew Udvare -Date: Tue, 22 May 2018 17:02:38 -0400 -Subject: [PATCH] Fix for Python 3 - ---- - cython/debugserver.pxi | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git cython/debugserver.pxi cython/debugserver.pxi -index ddbe0667..42430113 100644 ---- cython/debugserver.pxi -+++ cython/debugserver.pxi -@@ -43,14 +43,13 @@ cdef class DebugServerError(BaseError): - BaseError.__init__(self, *args, **kwargs) - - --# from http://stackoverflow.com/a/17511714 --from cpython.string cimport PyString_AsString -+from cpython.bytes cimport PyBytes_AS_STRING - cdef char ** to_cstring_array(list_str): - if not list_str: - return NULL - cdef char **ret = malloc(len(list_str) * sizeof(char *)) - for i in xrange(len(list_str)): -- ret[i] = PyString_AsString(list_str[i]) -+ ret[i] = PyBytes_AS_STRING(list_str[i]) - return ret - - diff --git a/srcpkgs/libimobiledevice/template b/srcpkgs/libimobiledevice/template index 4e99e7a9cd9..d4592018f46 100644 --- a/srcpkgs/libimobiledevice/template +++ b/srcpkgs/libimobiledevice/template @@ -1,7 +1,7 @@ # Template file for 'libimobiledevice' pkgname=libimobiledevice -version=1.2.0 -revision=17 +version=1.3.0 +revision=1 build_style=gnu-configure hostmakedepends="automake libtool pkgconf python3-Cython" makedepends="python3-devel libglib-devel libressl-devel libusb-devel @@ -11,17 +11,13 @@ maintainer="Orphaned " license="LGPL-2.1-only" homepage="https://github.com/libimobiledevice/libimobiledevice" distfiles="https://github.com/libimobiledevice/libimobiledevice/archive/${version}.tar.gz" -checksum=8ba1ea817691b3548b83371f8ec22d73d1e37f8fda7c899ac9c7121d924ca830 +checksum=acbfb73eabee162e64c0d9de207d71c0a5f47c40cd5ad32a5097f734328ce10a if [ "$CROSS_BUILD" ]; then configure_args="ac_cv_sys_file_offset_bits=yes ac_cv_sys_large_file=yes" fi pre_configure() { - sed -i 's,SSLv3_,SSLv23_,g' src/idevice.c - sed -i 's,-L$(libdir),,g' cython/Makefile.am - export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python${py3_ver}" - export PYTHON_LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib -lpython${py3_ver}" autoreconf -fi } From bb190daa8b5303e4f2779e7f8576d31a94a471d9 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 19:27:09 -0400 Subject: [PATCH 4/8] usbmuxd: update to 1.1.1. --- srcpkgs/usbmuxd/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/usbmuxd/template b/srcpkgs/usbmuxd/template index 7d861e8b79d..a80c32e3b64 100644 --- a/srcpkgs/usbmuxd/template +++ b/srcpkgs/usbmuxd/template @@ -1,7 +1,7 @@ # Template file for 'usbmuxd' pkgname=usbmuxd -version=1.1.0 -revision=8 +version=1.1.1 +revision=1 build_style=gnu-configure configure_args="--without-systemd" make_dirs="/var/lib/lockdown 0755 usbmux usbmux" @@ -11,8 +11,8 @@ short_desc="USB Multiplex Daemon" maintainer="Orphaned " license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://marcan.st/blog/iphonelinux/usbmuxd/" -distfiles="http://www.libimobiledevice.org/downloads/${pkgname}-${version}.tar.bz2" -checksum=3e8948b4fe4250ee5c4bd41ccd1b83c09b8a6f5518a7d131a66fd38bd461b42d +distfiles="https://github.com/libimobiledevice/usbmuxd/releases/download/${version}/usbmuxd-${version}.tar.bz2" +checksum=c0ec9700172bf635ccb5bed98daae607d2925c2bc3597f25706ecd9dfbfd2d9e usbmux_homedir="/var/lib/lockdown" system_accounts="usbmux" From 28bbe5cbfc6bca3850b94bf5e36b20c5d1881944 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 19:27:23 -0400 Subject: [PATCH 5/8] ideviceinstaller: update to 1.1.1. --- srcpkgs/ideviceinstaller/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/ideviceinstaller/template b/srcpkgs/ideviceinstaller/template index 2a58365f6bf..1683b9eaa2b 100644 --- a/srcpkgs/ideviceinstaller/template +++ b/srcpkgs/ideviceinstaller/template @@ -1,6 +1,6 @@ # Template file for 'ideviceinstaller' pkgname=ideviceinstaller -version=1.1.0 +version=1.1.1 revision=1 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" @@ -11,7 +11,7 @@ maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://github.com/libimobiledevice/ideviceinstaller" distfiles="https://github.com/libimobiledevice/${pkgname}/archive/${version}.tar.gz" -checksum=847b58708f9e627af2d09283177a2495e6c49d9a99d459499c4f3fd4ad4f0506 +checksum=b1401678a61f28c4aca95375c100b5a83ccc2cdfa0222c0de7ad0a2cfb4e3c9f pre_configure() { sed -i "/AS_COMPILER_FLAGS(/s/-Werror//" configure.ac From 4a1bcbd62058f4975e30c29559d17ebe588ca174 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 19:27:28 -0400 Subject: [PATCH 6/8] ifuse: update to 1.1.4. --- srcpkgs/ifuse/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/ifuse/template b/srcpkgs/ifuse/template index a4255ae1310..d2f3a9823c9 100644 --- a/srcpkgs/ifuse/template +++ b/srcpkgs/ifuse/template @@ -1,7 +1,7 @@ # Template file for 'ifuse' pkgname=ifuse -version=1.1.3 -revision=6 +version=1.1.4 +revision=1 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="libressl-devel fuse-devel libimobiledevice-devel" @@ -9,5 +9,5 @@ short_desc="A fuse filesystem to access the contents of an iPhone or iPod Touch" maintainer="Orphaned " license="LGPL-2.1" homepage="http://libimobiledevice.org/" -distfiles="http://www.libimobiledevice.org/downloads/ifuse-${version}.tar.bz2" -checksum=a788de66fb7720c84a5a775df415f78bbfb7c467a76c732d23292c6986252add +distfiles="https://github.com/libimobiledevice/ifuse/releases/download/${version}/ifuse-${version}.tar.bz2" +checksum=3550702ef94b2f5f16c7db91c6b3282b2aed1340665834a03e47458e09d98d87 From 82da6f758a1d41f1fb691a15e31827cb8afb28c5 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 22:41:08 -0400 Subject: [PATCH 7/8] New package: libirecovery-1.0.0 --- common/shlibs | 1 + srcpkgs/libirecovery-devel | 1 + srcpkgs/libirecovery/template | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 120000 srcpkgs/libirecovery-devel create mode 100644 srcpkgs/libirecovery/template diff --git a/common/shlibs b/common/shlibs index 63ad2f50630..0e5237c78f1 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3992,3 +3992,4 @@ libJudy.so.1 judy-1.0.5_1 libsignal-protocol-c.so.2 libsignal-protocol-c-2.3.3_2 libSeExpr2Editor.so.3 seexpr-krita-3.4.4.0_1 libSeExpr2.so.3 seexpr-krita-3.4.4.0_1 +libirecovery-1.0.so.3 libirecovery-1.0.0_1 diff --git a/srcpkgs/libirecovery-devel b/srcpkgs/libirecovery-devel new file mode 120000 index 00000000000..d093190e4fa --- /dev/null +++ b/srcpkgs/libirecovery-devel @@ -0,0 +1 @@ +libirecovery \ No newline at end of file diff --git a/srcpkgs/libirecovery/template b/srcpkgs/libirecovery/template new file mode 100644 index 00000000000..8f0bb884ad4 --- /dev/null +++ b/srcpkgs/libirecovery/template @@ -0,0 +1,28 @@ +# Template file for 'libirecovery' +pkgname=libirecovery +version=1.0.0 +revision=1 +build_style=gnu-configure +hostmakedepends="automake libtool pkgconf" +makedepends="libusb-devel readline-devel ncurses-devel eudev-libudev-devel" +short_desc="The libirecovery library allows communication with iBoot/iBSS of iOS devices via USB." +maintainer="Orphaned " +license="LGPL-2.1-only" +homepage="https://github.com/libimobiledevice/libirecovery" +distfiles="https://github.com/libimobiledevice/libirecovery/archive/${version}.tar.gz" +checksum=b0228372ae17fc78492f67932caea1c7f04d6a5da3468f240a6dac9173b29864 + +pre_configure() { + autoreconf -fi +} + +libirecovery-devel_package() { + short_desc+=" - development files" + depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/*.a + vmove usr/lib/*.so + vmove usr/lib/pkgconfig + } +} From d2fe1f2dc9c87790672371af7d0b939d79b4c949 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 23 Oct 2020 22:41:38 -0400 Subject: [PATCH 8/8] New package: idevicerestore-1.0.0 --- ...0001-configure.ac-check-for-pthreads.patch | 25 +++++++++ .../patches/WirelessChargingFix.patch | 53 +++++++++++++++++++ srcpkgs/idevicerestore/template | 19 +++++++ 3 files changed, 97 insertions(+) create mode 100644 srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch create mode 100644 srcpkgs/idevicerestore/patches/WirelessChargingFix.patch create mode 100644 srcpkgs/idevicerestore/template diff --git a/srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch b/srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch new file mode 100644 index 00000000000..49dd8152563 --- /dev/null +++ b/srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch @@ -0,0 +1,25 @@ +From 66dc1fa84fbe65f1008255d2b1d9bced9cf9dce6 Mon Sep 17 00:00:00 2001 +From: Ivan Shapovalov +Date: Fri, 25 Sep 2015 23:37:27 +0300 +Subject: [PATCH] configure.ac: check for pthreads + +Fixes building at least on Arch. +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 1db709a..c722910 100644 +--- configure.ac ++++ configure.ac +@@ -35,6 +35,7 @@ AM_PROG_CC_C_O + AC_PROG_LIBTOOL + + # Checks for libraries. ++AC_SEARCH_LIBS([pthread_create], [pthread]) + PKG_CHECK_MODULES(libirecovery, libirecovery-1.0 >= $LIBIRECOVERY_VERSION) + PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= $LIBIMOBILEDEVICE_VERSION) + PKG_CHECK_MODULES(libplist, libplist-2.0 >= $LIBPLIST_VERSION) +-- +2.27.0 + diff --git a/srcpkgs/idevicerestore/patches/WirelessChargingFix.patch b/srcpkgs/idevicerestore/patches/WirelessChargingFix.patch new file mode 100644 index 00000000000..3c8a98eb865 --- /dev/null +++ b/srcpkgs/idevicerestore/patches/WirelessChargingFix.patch @@ -0,0 +1,53 @@ +From 18ba27c74305100146dd9599336dbdcd5e794ad1 Mon Sep 17 00:00:00 2001 +From: Nikias Bassen +Date: Mon, 12 Oct 2020 17:56:20 +0200 +Subject: [PATCH] restore: Fix NORData request by sending new components (fixes + wireless charging on newer devices) + +The NorImageData response didn't include the WCHFirmwareUpdater for newer +devices, resulting in wireless charging capability to be broken on iPhone XS, +iPhone XR, and newer. Upon further inspection it turned out that the selection +for the images to send was only based on `IsFirmwarePayload` property. +However, there are additional components with other properties, as the +WCHFirmwareUpdater one, that don't have the `IsFirmwarePayload` property but +instead `IsSecondaryFirmwarePayload` and `IsLoadedByiBoot` which seem to be +the rule for including these images. +--- + src/restore.c | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/src/restore.c b/src/restore.c +index 3e84689..e35047a 100644 +--- src/restore.c ++++ src/restore.c +@@ -1059,11 +1059,26 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* + plist_dict_next_item(build_id_manifest, iter, &component, &manifest_entry); + if (component && manifest_entry && plist_get_node_type(manifest_entry) == PLIST_DICT) { + uint8_t is_fw = 0; +- plist_t is_fw_node = plist_access_path(manifest_entry, 2, "Info", "IsFirmwarePayload"); +- if (is_fw_node && plist_get_node_type(is_fw_node) == PLIST_BOOLEAN) { +- plist_get_bool_val(is_fw_node, &is_fw); ++ uint8_t is_secondary_fw = 0; ++ uint8_t loaded_by_iboot = 0; ++ plist_t fw_node; ++ ++ fw_node = plist_access_path(manifest_entry, 2, "Info", "IsFirmwarePayload"); ++ if (fw_node && plist_get_node_type(fw_node) == PLIST_BOOLEAN) { ++ plist_get_bool_val(fw_node, &is_fw); ++ } ++ ++ fw_node = plist_access_path(manifest_entry, 2, "Info", "IsLoadedByiBoot"); ++ if (fw_node && plist_get_node_type(fw_node) == PLIST_BOOLEAN) { ++ plist_get_bool_val(fw_node, &loaded_by_iboot); + } +- if (is_fw) { ++ ++ fw_node = plist_access_path(manifest_entry, 2, "Info", "IsSecondaryFirmwarePayload"); ++ if (fw_node && plist_get_node_type(fw_node) == PLIST_BOOLEAN) { ++ plist_get_bool_val(fw_node, &is_secondary_fw); ++ } ++ ++ if (is_fw || (is_secondary_fw && loaded_by_iboot)) { + plist_t comp_path = plist_access_path(manifest_entry, 2, "Info", "Path"); + if (comp_path) { + plist_dict_set_item(firmware_files, component, plist_copy(comp_path)); diff --git a/srcpkgs/idevicerestore/template b/srcpkgs/idevicerestore/template new file mode 100644 index 00000000000..a087829f10a --- /dev/null +++ b/srcpkgs/idevicerestore/template @@ -0,0 +1,19 @@ +# Template file for 'idevicerestore' +pkgname=idevicerestore +version=1.0.0 +revision=1 +build_style=gnu-configure +hostmakedepends="automake libtool pkg-config" +makedepends="libimobiledevice-devel libplist-devel libressl-devel + libzip-devel readline-devel libcurl-devel libirecovery-devel" +depends="usbmuxd" +short_desc="A command-line application to restore firmware files to iOS devices." +maintainer="Orphaned " +license="GPL-2.0-or-later" +homepage="https://github.com/libimobiledevice/idevicerestore" +distfiles="https://github.com/libimobiledevice/${pkgname}/archive/${version}.tar.gz" +checksum=2c83c60b8b7027b3730d63c3ebbdede5b0b43bd5ab1e54caaa52b3b1268881e5 + +pre_configure() { + autoreconf -fi +}