From 44f1f6829084d77c630b0a0cb268162e56750120 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 28 Feb 2018 22:19:47 +0100 Subject: [PATCH] New 2.5.2 release --- 0001-Fix-crash-on-early-fail.patch | 29 ------------------- ...h-count-the-target-devices-from-zero.patch | 12 ++++---- ...sb_modeswitch-fix-a-wrong-comparison.patch | 26 ----------------- rhbz948451-fix-manual-pages.patch | 23 --------------- sources | 2 +- usb_modeswitch.spec | 24 ++++++--------- 6 files changed, 16 insertions(+), 100 deletions(-) delete mode 100644 0001-Fix-crash-on-early-fail.patch rename 0002-usb_modeswitch-count-the-target-devices-from-zero.patch => 0001-usb_modeswitch-count-the-target-devices-from-zero.patch (67%) delete mode 100644 0001-usb_modeswitch-fix-a-wrong-comparison.patch delete mode 100644 rhbz948451-fix-manual-pages.patch diff --git a/0001-Fix-crash-on-early-fail.patch b/0001-Fix-crash-on-early-fail.patch deleted file mode 100644 index bab74dc..0000000 --- a/0001-Fix-crash-on-early-fail.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 73001792b29f080fcabc57f30d6030bedb2a24b0 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Wed, 20 Jul 2016 21:14:10 +0200 -Subject: [PATCH] Fix crash on early fail - -Don't uninitialize libusb if it has not been initialized yet. - -https://bugzilla.redhat.com/show_bug.cgi?id=1358472 ---- - usb_modeswitch.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/usb_modeswitch.c b/usb_modeswitch.c -index cbb8c28..f9c8b2e 100644 ---- a/usb_modeswitch.c -+++ b/usb_modeswitch.c -@@ -2021,7 +2021,8 @@ void close_all() - libusb_close(devh); - // libusb_exit will crash on Raspbian 7, crude protection - #ifndef __ARMEL__ -- libusb_exit(NULL); -+ if (ctx) -+ libusb_exit(NULL); - #endif - if (sysmode) - closelog(); --- -2.7.4 - diff --git a/0002-usb_modeswitch-count-the-target-devices-from-zero.patch b/0001-usb_modeswitch-count-the-target-devices-from-zero.patch similarity index 67% rename from 0002-usb_modeswitch-count-the-target-devices-from-zero.patch rename to 0001-usb_modeswitch-count-the-target-devices-from-zero.patch index 144d93d..822ee72 100644 --- a/0002-usb_modeswitch-count-the-target-devices-from-zero.patch +++ b/0001-usb_modeswitch-count-the-target-devices-from-zero.patch @@ -1,7 +1,7 @@ -From 9d05fe0e0f6b049520d97a47d042d5cfad35b5d6 Mon Sep 17 00:00:00 2001 +From 99cade3624c432a478e624f278692cdedf4e0450 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Fri, 18 Aug 2017 10:40:41 +0200 -Subject: [PATCH 2/2] usb_modeswitch: count the target devices from zero +Subject: [PATCH] usb_modeswitch: count the target devices from zero Most likely a typo here. --- @@ -9,18 +9,18 @@ Most likely a typo here. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usb_modeswitch.c b/usb_modeswitch.c -index 6948a84..4a1fb5c 100644 +index 3239946..1b3bf9d 100644 --- a/usb_modeswitch.c +++ b/usb_modeswitch.c -@@ -1579,7 +1579,7 @@ int checkSuccess() - * Target device on the same bus with higher device number is returned, +@@ -1582,7 +1582,7 @@ int checkSuccess() * description is read for syslog message */ + // Wait counter passed on from previous loop - for (i=i; i < CheckSuccess; i++) { + for (i=0; i < CheckSuccess; i++) { SHOW_PROGRESS(output," Search for target devices ...\n"); dev = search_devices(&newTargetCount, TargetVendor, TargetProductList, TargetClass, 0, SEARCH_TARGET); -- -2.13.0 +2.14.3 diff --git a/0001-usb_modeswitch-fix-a-wrong-comparison.patch b/0001-usb_modeswitch-fix-a-wrong-comparison.patch deleted file mode 100644 index 863e880..0000000 --- a/0001-usb_modeswitch-fix-a-wrong-comparison.patch +++ /dev/null @@ -1,26 +0,0 @@ -From bcb5b8702adbf568598988fccf256586b5788fcb Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Fri, 18 Aug 2017 10:37:15 +0200 -Subject: [PATCH 1/2] usb_modeswitch: fix a wrong comparison - -The char pointer should be dereferences when checking the string is empty. ---- - usb_modeswitch.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/usb_modeswitch.c b/usb_modeswitch.c -index b2b930b..6948a84 100644 ---- a/usb_modeswitch.c -+++ b/usb_modeswitch.c -@@ -1707,7 +1707,7 @@ struct libusb_device* search_devices( int *numFound, int vendor, char* productLi - *numFound = 0; - - /* Sanity check */ -- if (!vendor || productList == '\0') -+ if (!vendor || *productList == '\0') - return NULL; - - listcopy = malloc(strlen(productList)+1); --- -2.13.0 - diff --git a/rhbz948451-fix-manual-pages.patch b/rhbz948451-fix-manual-pages.patch deleted file mode 100644 index 32238b9..0000000 --- a/rhbz948451-fix-manual-pages.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/usb_modeswitch.c b/usb_modeswitch.c -index 52598f7..cbb8c28 100644 ---- a/usb_modeswitch.c -+++ b/usb_modeswitch.c -@@ -2060,7 +2060,8 @@ void printHelp() - " -g, --device-num NUM system device number (for hard ID)\n" - " -m, --message-endpoint NUM direct the message transfer there (optional)\n" - " -M, --message-content message to send (hex number as string)\n" -- " -2 , -3 additional messages to send (-n recommended)\n" -+ " -2, --message-content2 additional messages to send (-n recommended)\n" -+ " -3, --message-content3 additional messages to send (-n recommended)\n" - " -w, --release-delay NUM wait NUM ms before releasing the interface\n" - " -n, --need-response obsolete, no effect (always on)\n" - " -r, --response-endpoint NUM read response from there (optional)\n" -@@ -2084,7 +2085,7 @@ void printHelp() - " -Q, --quiet don't show progress or error messages\n" - " -W, --verbose print all settings and debug output\n" - " -D, --sysmode specific result and syslog message\n" -- " -s, --success switching result check with timeout\n" -+ " -s, --check-success switching result check with timeout\n" - " -I, --inquire obsolete, no effect\n\n" - " -c, --config-file load long configuration from file\n\n" - " -t, --stdinput read long configuration from stdin\n\n" diff --git a/sources b/sources index 33497be..f0f3584 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (usb-modeswitch-2.5.1.tar.bz2) = 23f1866cbb5882280369362f6d3e01d991136f322284d3f343da132520569f9e303cd9c4368a71893a3d959bae6bde2d4325f6dc175a1cb2d4dd5faa61add6ab +SHA512 (usb-modeswitch-2.5.2.tar.bz2) = ad2a7e5134379664fca83b85803e52ec8e3fe3c2d6c633eb5af3c291c43b15ca4a67198612864de01d146a029ee5c475c8c7dc71d16e3a475b532837c5dd34ea diff --git a/usb_modeswitch.spec b/usb_modeswitch.spec index 49cbc4f..3887da0 100644 --- a/usb_modeswitch.spec +++ b/usb_modeswitch.spec @@ -1,8 +1,8 @@ %define source_name usb-modeswitch Name: usb_modeswitch -Version: 2.5.1 -Release: 3%{?dist} +Version: 2.5.2 +Release: 1%{?dist} Summary: USB Modeswitch gets mobile broadband cards in operational mode Summary(de): USB Modeswitch aktiviert UMTS-Karten Group: Applications/System @@ -12,16 +12,10 @@ URL: http://www.draisberghof.de/usb_modeswitch/ Source0: http://www.draisberghof.de/%{name}/%{source_name}-%{version}.tar.bz2 Source1: http://www.draisberghof.de/usb_modeswitch/device_reference.txt -# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2546 -Patch0: rhbz948451-fix-manual-pages.patch # Submitted upstream (2014-11-24) -Patch1: device_reference-utf8.patch -# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2556 -Patch2: 0001-Fix-crash-on-early-fail.patch -# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2732 -Patch3: 0001-usb_modeswitch-fix-a-wrong-comparison.patch +Patch0: device_reference-utf8.patch # http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2733 -Patch4: 0002-usb_modeswitch-count-the-target-devices-from-zero.patch +Patch1: 0001-usb_modeswitch-count-the-target-devices-from-zero.patch BuildRequires: libusbx-devel BuildRequires: jimtcl-devel @@ -47,11 +41,8 @@ Vodafone, Option, ZTE und Novatell werden unterstützt. %setup -q -n %{source_name}-%{version} cp -f %{SOURCE1} device_reference.txt -%patch0 -p1 -b .manpage -%patch1 -p0 -b .utf8 -%patch2 -p1 -b .libusb_exit -%patch3 -p1 -b .char_deref -%patch4 -p1 -b .zero_iter +%patch0 -p0 +%patch1 -p1 %build @@ -79,6 +70,9 @@ make install \ %changelog +* Wed Feb 28 2018 Lubomir Rintel - 2.5.2-1 +- New 2.5.2 release + * Fri Feb 23 2018 Florian Weimer - 2.5.1-3 - Use LDFLAGS from redhat-rpm-config