diff --git a/.gitignore b/.gitignore index ee93839..dc53ce1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libmtp-1.1.6.tar.gz +SOURCES/libmtp-1.1.14.tar.gz diff --git a/.libmtp.metadata b/.libmtp.metadata index b54b0e2..e82a86f 100644 --- a/.libmtp.metadata +++ b/.libmtp.metadata @@ -1 +1 @@ -f9e55c75399fc5f4deabcdfa58e1b01b2e6e3283 SOURCES/libmtp-1.1.6.tar.gz +22568b321e467cbc1fe222f8935107a53e57f3ab SOURCES/libmtp-1.1.14.tar.gz diff --git a/SOURCES/0001-PATCH-avoid-unconditional-clear_halt.patch b/SOURCES/0001-PATCH-avoid-unconditional-clear_halt.patch deleted file mode 100644 index eefeeb0..0000000 --- a/SOURCES/0001-PATCH-avoid-unconditional-clear_halt.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 423e1fe71a1bec35c9d11289185aa4b06454cdb0 Mon Sep 17 00:00:00 2001 -From: Marcus Meissner -Date: Mon, 29 Apr 2013 00:00:48 +0200 -Subject: [PATCH] PATCH: avoid unconditional clear_halt - -Hi, - -During debugging weird "access only possible once" scenarios, -on Raspberry Pi and also on regular Linux with USB 3.0 controllers, -I found that clearing halt on a endpoint which is not stalled -will confuse the (kernel) driver and device and make them really -stall until resetted. - -This is probably a Kernel bug. - -So do not do a unconditional clear_halt. - -I am leaving the conditional clear_stall in, as it queries the -status before. - -This might need testing. - -Ciao, Marcus - -Signed-off-by: Marcus Meissner -Signed-off-by: Linus Walleij ---- - src/libusb-glue.c | 3 +++ - src/libusb1-glue.c | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/src/libusb-glue.c b/src/libusb-glue.c -index f9d3a26..ae18c27 100644 ---- a/src/libusb-glue.c -+++ b/src/libusb-glue.c -@@ -1818,11 +1818,14 @@ static void close_usb(PTP_USB* ptp_usb) - * STALL is persistant or not). - */ - clear_stall(ptp_usb); -+#if 0 -+ // causes troubles due to a kernel bug in 3.x kernels before/around 3.8 - // Clear halts on any endpoints - clear_halt(ptp_usb); - // Added to clear some stuff on the OUT endpoint - // TODO: is this good on the Mac too? - // HINT: some devices may need that you comment these two out too. -+#endif - usb_resetep(ptp_usb->handle, ptp_usb->outep); - usb_release_interface(ptp_usb->handle, (int) ptp_usb->interface); - } -diff --git a/src/libusb1-glue.c b/src/libusb1-glue.c -index 404d684..7dee45f 100644 ---- a/src/libusb1-glue.c -+++ b/src/libusb1-glue.c -@@ -1860,12 +1860,15 @@ static void close_usb(PTP_USB* ptp_usb) - * STALL is persistant or not). - */ - clear_stall(ptp_usb); -+#if 0 -+ // causes hangs on Linux 3.x at least up to 3.8 - // Clear halts on any endpoints - clear_halt(ptp_usb); - // Added to clear some stuff on the OUT endpoint - // TODO: is this good on the Mac too? - // HINT: some devices may need that you comment these two out too. - libusb_clear_halt(ptp_usb->handle, ptp_usb->outep); -+#endif - libusb_release_interface(ptp_usb->handle, (int) ptp_usb->interface); - } - if (FLAG_FORCE_RESET_ON_CLOSE(ptp_usb)) { --- -2.7.4 - diff --git a/SOURCES/0001-Simple-memory-leak-fix-in-playlist-spl.c.patch b/SOURCES/0001-Simple-memory-leak-fix-in-playlist-spl.c.patch deleted file mode 100644 index 21a3611..0000000 --- a/SOURCES/0001-Simple-memory-leak-fix-in-playlist-spl.c.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 6890d88b7f50637cea838293388779c5f806d5e7 Mon Sep 17 00:00:00 2001 -From: Reverend Homer -Date: Wed, 18 Mar 2015 23:31:41 +0300 -Subject: [PATCH] Simple memory leak fix in playlist-spl.c - ---- - src/playlist-spl.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/playlist-spl.c b/src/playlist-spl.c -index 2942b4c..5a6a3b0 100644 ---- a/src/playlist-spl.c -+++ b/src/playlist-spl.c -@@ -615,6 +615,7 @@ static void spl_text_t_from_tracks(text_t** p, - if(f != NULL) { - append_text_t(&c, f); - LIBMTP_PLST_DEBUG("track %d = %s (%u)\n", i+1, f, tracks[i]); -+ free(f); - } - else - LIBMTP_ERROR("failed to find filepath for track=%d\n", tracks[i]); --- -2.7.4 - diff --git a/SOURCES/0001-delete-unused-clear_halt-code.patch b/SOURCES/0001-delete-unused-clear_halt-code.patch deleted file mode 100644 index 02bf18b..0000000 --- a/SOURCES/0001-delete-unused-clear_halt-code.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 1bc3a75fa2223884900136201d74905a0ad01426 Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Wed, 6 Nov 2013 04:29:40 +0100 -Subject: [PATCH] delete unused clear_halt()code - -Signed-off-by: Linus Walleij ---- - src/libusb1-glue.c | 29 +---------------------------- - 1 file changed, 1 insertion(+), 28 deletions(-) - -diff --git a/src/libusb1-glue.c b/src/libusb1-glue.c -index 3a6552e..d8bc33b 100644 ---- a/src/libusb1-glue.c -+++ b/src/libusb1-glue.c -@@ -2338,7 +2338,7 @@ static void clear_stall(PTP_USB* ptp_usb) - perror("outep: usb_get_endpoint_status()"); - } else if (status) { - LIBMTP_INFO("Clearing stall on OUT endpoint\n"); -- ret = libusb_clear_halt (ptp_usb->handle, ptp_usb->outep); -+ ret = libusb_clear_halt(ptp_usb->handle, ptp_usb->outep); - if (ret != LIBUSB_SUCCESS) { - perror("usb_clear_stall_feature()"); - } -@@ -2347,24 +2347,6 @@ static void clear_stall(PTP_USB* ptp_usb) - /* TODO: do we need this for INTERRUPT (ptp_usb->intep) too? */ - } - --static void clear_halt(PTP_USB* ptp_usb) --{ -- int ret; -- -- ret = libusb_clear_halt(ptp_usb->handle,ptp_usb->inep); -- if (ret<0) { -- perror("usb_clear_halt() on IN endpoint"); -- } -- ret = libusb_clear_halt(ptp_usb->handle,ptp_usb->outep); -- if (ret<0) { -- perror("usb_clear_halt() on OUT endpoint"); -- } -- ret = libusb_clear_halt(ptp_usb->handle,ptp_usb->intep); -- if (ret<0) { -- perror("usb_clear_halt() on INTERRUPT endpoint"); -- } --} -- - static void close_usb(PTP_USB* ptp_usb) - { - if (!FLAG_NO_RELEASE_INTERFACE(ptp_usb)) { -@@ -2379,15 +2361,6 @@ static void close_usb(PTP_USB* ptp_usb) - * STALL is persistant or not). - */ - clear_stall(ptp_usb); --#if 0 -- // causes hangs on Linux 3.x at least up to 3.8 -- // Clear halts on any endpoints -- clear_halt(ptp_usb); -- // Added to clear some stuff on the OUT endpoint -- // TODO: is this good on the Mac too? -- // HINT: some devices may need that you comment these two out too. -- libusb_clear_halt(ptp_usb->handle, ptp_usb->outep); --#endif - libusb_release_interface(ptp_usb->handle, (int) ptp_usb->interface); - } - if (FLAG_FORCE_RESET_ON_CLOSE(ptp_usb)) { --- -2.7.4 - diff --git a/SOURCES/0001-doc-Don-t-document-internal-endian-macros.patch b/SOURCES/0001-doc-Don-t-document-internal-endian-macros.patch new file mode 100644 index 0000000..0e995c4 --- /dev/null +++ b/SOURCES/0001-doc-Don-t-document-internal-endian-macros.patch @@ -0,0 +1,26 @@ +From 35275512f83d246ddbddd2be2b970925e73df45e Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 9 Oct 2017 14:25:26 +0200 +Subject: [PATCH] doc: Don't document internal endian macros + +As those will change across platforms, and lead to multilib conflicts +--- + doc/Doxyfile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in +index 65c2b83..1bc3b16 100644 +--- a/doc/Doxyfile.in ++++ b/doc/Doxyfile.in +@@ -452,7 +452,7 @@ EXCLUDE_SYMLINKS = NO + # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude + # certain files from those directories. + +-EXCLUDE_PATTERNS = ++EXCLUDE_PATTERNS = */src/gphoto2-endian.h + + # The EXAMPLE_PATH tag can be used to specify one or more files or + # directories that contain example code fragments that are included (see +-- +2.14.2 + diff --git a/SPECS/libmtp.spec b/SPECS/libmtp.spec index 9ba64e5..4aa0b8e 100644 --- a/SPECS/libmtp.spec +++ b/SPECS/libmtp.spec @@ -2,23 +2,21 @@ # RPM repository. Name: libmtp -Version: 1.1.6 -Release: 5%{?dist} +Version: 1.1.14 +Release: 1%{?dist} Summary: A software library for MTP media players URL: http://libmtp.sourceforge.net/ Group: System Environment/Libraries -Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Source0: https://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz License: LGPLv2+ Requires: udev -BuildRequires: libusb1-devel +BuildRequires: libusbx-devel BuildRequires: doxygen -Obsoletes: libmtp-hal +BuildRequires: libgcrypt-devel +BuildRequires: chrpath -Patch0: 0001-PATCH-avoid-unconditional-clear_halt.patch -Patch1: 0001-delete-unused-clear_halt-code.patch -Patch2: 0001-Simple-memory-leak-fix-in-playlist-spl.c.patch +Patch0: 0001-doc-Don-t-document-internal-endian-macros.patch %description This package provides a software library for communicating with MTP @@ -28,7 +26,7 @@ players etc. %package examples Summary: Example programs for libmtp Group: Applications/Multimedia -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description examples This package provides example programs for communicating with MTP @@ -37,9 +35,10 @@ devices. %package devel Summary: Development files for libmtp Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig Requires: libusb1-devel +Requires: libgcrypt-devel %description devel This package provides development files for the libmtp @@ -47,21 +46,15 @@ library for MTP media players. %prep %setup -q -%patch0 -p1 -b .remove-clear_halt -%patch1 -p1 -b .delete-clear_halt -%patch2 -p1 -b .mem-leak +%patch0 -p1 %build -export CFLAGS=-fno-strict-aliasing %configure --disable-static \ - --disable-mtpz \ - --with-udev=/usr/lib/udev \ - --with-udev-rules=69-libmtp.rules -make %{?_smp_mflags} + --with-udev-rules=69-libmtp.rules +%make_build %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +%make_install # Remove libtool archive remnant rm -f $RPM_BUILD_ROOT%{_libdir}/libmtp.la # Replace links with relative links @@ -96,6 +89,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root,root,-) %{_libdir}/libmtp.so.9* /usr/lib/udev/rules.d/* +/usr/lib/udev/hwdb.d/* /usr/lib/udev/mtp-probe %files examples @@ -112,6 +106,18 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Oct 09 2017 Bastien Nocera - 1.1.14-1 +- Update to 1.1.14 +Resolves: #1356288 + +* Mon Oct 09 2017 Bastien Nocera - 1.1.13-2 +- Fix multilib conflict with internal header +Resolves: #1356288 + +* Fri Oct 06 2017 Bastien Nocera - 1.1.13-1 +- Rebase to libmtp 1.1.13 +Resolves: #1356288 + * Mon May 23 2016 Bastien Nocera - 1.1.6-5 - Fix memory leak Resolves: #1040011