[LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-15 Thread Rosen Penev
4 patches were added to revert the libudev changes as the libudev wrapper in 
OpenWrt is not good enough.

Signed-off-by: Rosen Penev 
---
 package/utils/usbutils/Makefile|   8 +-
 .../patches/010-remove-python-usbids.patch |  68 ++
 .../patches/020-revert-removal-of-usb.ids.patch| 897 +
 .../usbutils/patches/030-revert-port-to-hwdb.patch | 549 +
 .../patches/040-add-back-update-usbids.patch   |  77 ++
 5 files changed, 1596 insertions(+), 3 deletions(-)
 create mode 100644 
package/utils/usbutils/patches/010-remove-python-usbids.patch
 create mode 100644 
package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
 create mode 100644 package/utils/usbutils/patches/030-revert-port-to-hwdb.patch
 create mode 100644 
package/utils/usbutils/patches/040-add-back-update-usbids.patch

diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile
index 7f798954ae..3fbc4e0b50 100644
--- a/package/utils/usbutils/Makefile
+++ b/package/utils/usbutils/Makefile
@@ -8,15 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usbutils
-PKG_VERSION:=007
-PKG_RELEASE:=7
+PKG_VERSION:=009
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
-PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
+PKG_HASH:=8bbff0e54cb5f65a52be4feb9162fc0b022a97eb841b44784f7a89a9ea567160
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
diff --git a/package/utils/usbutils/patches/010-remove-python-usbids.patch 
b/package/utils/usbutils/patches/010-remove-python-usbids.patch
new file mode 100644
index 00..19e3cc1dd3
--- /dev/null
+++ b/package/utils/usbutils/patches/010-remove-python-usbids.patch
@@ -0,0 +1,68 @@
+From a1c2fd7bbd5b2e26f8f752fd3386a953b3b1ec37 Mon Sep 17 00:00:00 2001
+From: Rosen Penev 
+Date: Fri, 9 Mar 2018 10:31:09 -0800
+Subject: [PATCH] Revert "substitute usb.id location in lsusb Python script"
+
+This reverts commit 199756013624bfa497865eb498bf7331eb07ef56.
+---
+ Makefile.am | 7 +--
+ lsusb.py.in => lsusb.py | 4 ++--
+ 3 files changed, 3 insertions(+), 9 deletions(-)
+ rename lsusb.py.in => lsusb.py (99%)
+ mode change 100644 => 100755
+
+diff --git a/Makefile.am b/Makefile.am
+index b18ff69..67def60 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -39,13 +39,9 @@ EXTRA_DIST = \
+   lsusb.8.in \
+   usb-devices.1.in \
+   usb-devices \
+-  lsusb.py.in \
++  lsusb.py \
+   usbutils.pc.in
+ 
+-lsusb.py: $(srcdir)/lsusb.py.in
+-  sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+-  chmod 755 $@
+-
+ lsusb.8: $(srcdir)/lsusb.8.in
+   sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+ 
+@@ -59,7 +55,6 @@ usbutils.pc: $(srcdir)/usbutils.pc.in
+   sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@
+ 
+ DISTCLEANFILES = \
+-  lsusb.py \
+   lsusb.8 \
+   usb-devices.1 \
+   usbutils.pc
+diff --git a/lsusb.py.in b/lsusb.py
+old mode 100644
+new mode 100755
+similarity index 99%
+rename from lsusb.py.in
+rename to lsusb.py
+index db2e1e0..aa410fc
+--- a/lsusb.py.in
 b/lsusb.py
+@@ -1,5 +1,5 @@
+ #!/usr/bin/env python
+-# lsusb-VERSION.py
++# lsusb.py
+ # Displays your USB devices in reasonable form.
+ # (c) Kurt Garloff , 2/2009, GPL v2 or v3.
+ # (c) Kurt Garloff , 9/2013, GPL v2 or v3.
+@@ -18,7 +18,7 @@ warnsort = False
+ showeps = False
+ 
+ prefix = "/sys/bus/usb/devices/"
+-usbids = "@usbids@"
++usbids = "/usr/share/usb.ids"
+ 
+ esc = chr(27)
+ norm = esc + "[0;0m"
+-- 
+2.16.2
+
diff --git a/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch 
b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
new file mode 100644
index 00..bdf9f9f7d4
--- /dev/null
+++ b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
@@ -0,0 +1,897 @@
+From 2bfca703b324e21aee2fabbe4f998aa663f03a15 Mon Sep 17 00:00:00 2001
+From: Rosen Penev 
+Date: Fri, 9 Mar 2018 10:31:24 -0800
+Subject: [PATCH] Revert "drop dependency on usb.ids"
+
+This reverts commit 5d7ea40bc94cbf3069a25beba3146de13bcdcf02.
+
+commit 5d7ea40bc94cbf3069a25beba3146de13bcdcf02
+Author: Tom Gundersen 
+Date:   Wed Sep 4 14:47:08 2013 +0200
+
+drop dependency on usb.ids
+
+Also remove usb.ids from the repository. [Note that these were probably
+never used by distributions regarless, as most distros ship the usb.ids
+directly from upstream.]
+
+Hardcode the usb-spec information that used to be in usb.ids,
+but which was not moved to hwdb.
+
+Increase the size of tha hash table from 16 to 512, though using a
+hash at all is probably overkill at this point.
+
+Signed-off-by: Greg Kroah-Hartman 

Re: [LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-15 Thread Rosen Penev
On Wed, Mar 14, 2018 at 11:59 PM, Bjørn Mork  wrote:
> Great!
>
> Note that the OpenWrt usbreset utility has been included in this version
> of usbutils.  usbreset is currently packaged separately with its source.
> Maybe consider merging the two source packages and start building
> usbreset as part of the usbutils package?
I'll ask jow what he thinks about doing so. Contingent on this getting
merged though. No idea if nbd wants this or the monstrosity that is
udev.
>
>
>
> Bjørn
>
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-15 Thread Rosen Penev
On Thu, Mar 15, 2018 at 2:26 AM, Karl Palsson  wrote:
>
> Rosen Penev  wrote:
>> 4 patches were added to revert the libudev changes as the
>> libudev wrapper in OpenWrt is not good enough.
>
> Personally, I'd like to see substantially better descriptions in
> the patches explaining their purpose. The simple "revert "
> and the filename doesn't say much, many of it seems unrelated,
> and _none_ of them talk about libudev!
>
To be fair, I just used git format-patch on individual commits. I can
add the original commit message if needed.

usbutils switched to using hwdb which uses udev instead of a usbids file.
> Cheers,
> Karl P
>
>>
>> Signed-off-by: Rosen Penev 
>> ---
>>  package/utils/usbutils/Makefile|   8 +-
>>  .../patches/010-remove-python-usbids.patch |  68 ++
>>  .../patches/020-revert-removal-of-usb.ids.patch| 879 
>> +
>>  .../usbutils/patches/030-revert-port-to-hwdb.patch | 529 +
>>  .../patches/040-add-back-update-usbids.patch   |  66 ++
>>  5 files changed, 1547 insertions(+), 3 deletions(-)
>>  create mode 100644 
>> package/utils/usbutils/patches/010-remove-python-usbids.patch
>>  create mode 100644 
>> package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
>>  create mode 100644 
>> package/utils/usbutils/patches/030-revert-port-to-hwdb.patch
>>  create mode 100644 
>> package/utils/usbutils/patches/040-add-back-update-usbids.patch
>>
>> diff --git a/package/utils/usbutils/Makefile
>> b/package/utils/usbutils/Makefile index 7f798954ae..3fbc4e0b50
>> 100644
>> --- a/package/utils/usbutils/Makefile
>> +++ b/package/utils/usbutils/Makefile
>> @@ -8,15 +8,17 @@
>>  include $(TOPDIR)/rules.mk
>>
>>  PKG_NAME:=usbutils
>> -PKG_VERSION:=007
>> -PKG_RELEASE:=7
>> +PKG_VERSION:=009
>> +PKG_RELEASE:=1
>>
>>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>>  PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
>> -PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
>> +PKG_HASH:=8bbff0e54cb5f65a52be4feb9162fc0b022a97eb841b44784f7a89a9ea567160
>>  PKG_LICENSE:=GPL-2.0
>>  PKG_LICENSE_FILES:=COPYING
>>
>> +PKG_FIXUP:=autoreconf
>> +
>>  PKG_BUILD_PARALLEL:=1
>>  PKG_INSTALL:=1
>>
>> diff --git
>> a/package/utils/usbutils/patches/010-remove-python-usbids.patch
>> b/package/utils/usbutils/patches/010-remove-python-usbids.patch
>> new file mode 100644 index 00..19e3cc1dd3
>> --- /dev/null
>> +++ b/package/utils/usbutils/patches/010-remove-python-usbids.patch
>> @@ -0,0 +1,68 @@
>> +From a1c2fd7bbd5b2e26f8f752fd3386a953b3b1ec37 Mon Sep 17
>> 00:00:00 2001 +From: Rosen Penev  +Date: Fri,
>> 9 Mar 2018 10:31:09 -0800 +Subject: [PATCH] Revert "substitute
>> usb.id location in lsusb Python script"
>> +
>> +This reverts commit 199756013624bfa497865eb498bf7331eb07ef56.
>> +---
>> + Makefile.am | 7 +--
>> + lsusb.py.in => lsusb.py | 4 ++--
>> + 3 files changed, 3 insertions(+), 9 deletions(-)
>> + rename lsusb.py.in => lsusb.py (99%)
>> + mode change 100644 => 100755
>> +
>> +diff --git a/Makefile.am b/Makefile.am
>> +index b18ff69..67def60 100644
>> +--- a/Makefile.am
>>  b/Makefile.am
>> +@@ -39,13 +39,9 @@ EXTRA_DIST = \
>> + lsusb.8.in \
>> + usb-devices.1.in \
>> + usb-devices \
>> +-lsusb.py.in \
>> ++lsusb.py \
>> + usbutils.pc.in
>> +
>> +-lsusb.py: $(srcdir)/lsusb.py.in
>> +-sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
>> +-chmod 755 $@
>> +-
>> + lsusb.8: $(srcdir)/lsusb.8.in
>> + sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
>> +
>> +@@ -59,7 +55,6 @@ usbutils.pc: $(srcdir)/usbutils.pc.in
>> + sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@
>> +
>> + DISTCLEANFILES = \
>> +-lsusb.py \
>> + lsusb.8 \
>> + usb-devices.1 \
>> + usbutils.pc
>> +diff --git a/lsusb.py.in b/lsusb.py
>> +old mode 100644
>> +new mode 100755
>> +similarity index 99%
>> +rename from lsusb.py.in
>> +rename to lsusb.py
>> +index db2e1e0..aa410fc
>> +--- a/lsusb.py.in
>>  b/lsusb.py
>> +@@ -1,5 +1,5 @@
>> + #!/usr/bin/env python
>> +-# lsusb-VERSION.py
>> ++# lsusb.py
>> + # Displays your USB devices in reasonable form.
>> + # (c) Kurt Garloff , 2/2009, GPL v2 or v3.
>> + # (c) Kurt Garloff , 9/2013, GPL v2 or v3.
>> +@@ -18,7 +18,7 @@ warnsort = False
>> + showeps = False
>> +
>> + prefix = "/sys/bus/usb/devices/"
>> +-usbids = "@usbids@"
>> ++usbids = "/usr/share/usb.ids"
>> +
>> + esc = chr(27)
>> + norm = esc + "[0;0m"
>> +--
>> +2.16.2
>> +
>> diff --git
>> a/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
>> b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
>> new file mode 100644 index 00..ae38b06a77
>> --- /dev/null
>> +++ b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
>> @@ -0,0 +1,879 @@
>> +From 

Re: [LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-15 Thread Bjørn Mork
Great!

Note that the OpenWrt usbreset utility has been included in this version
of usbutils.  usbreset is currently packaged separately with its source.
Maybe consider merging the two source packages and start building
usbreset as part of the usbutils package?



Bjørn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-14 Thread Rosen Penev
4 patches were added to revert the libudev changes as the libudev wrapper in 
OpenWrt is not good enough.

Signed-off-by: Rosen Penev 
---
 package/utils/usbutils/Makefile|   8 +-
 .../patches/010-remove-python-usbids.patch |  68 ++
 .../patches/020-revert-removal-of-usb.ids.patch| 879 +
 .../usbutils/patches/030-revert-port-to-hwdb.patch | 529 +
 .../patches/040-add-back-update-usbids.patch   |  66 ++
 5 files changed, 1547 insertions(+), 3 deletions(-)
 create mode 100644 
package/utils/usbutils/patches/010-remove-python-usbids.patch
 create mode 100644 
package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
 create mode 100644 package/utils/usbutils/patches/030-revert-port-to-hwdb.patch
 create mode 100644 
package/utils/usbutils/patches/040-add-back-update-usbids.patch

diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile
index 7f798954ae..3fbc4e0b50 100644
--- a/package/utils/usbutils/Makefile
+++ b/package/utils/usbutils/Makefile
@@ -8,15 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usbutils
-PKG_VERSION:=007
-PKG_RELEASE:=7
+PKG_VERSION:=009
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
-PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
+PKG_HASH:=8bbff0e54cb5f65a52be4feb9162fc0b022a97eb841b44784f7a89a9ea567160
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
diff --git a/package/utils/usbutils/patches/010-remove-python-usbids.patch 
b/package/utils/usbutils/patches/010-remove-python-usbids.patch
new file mode 100644
index 00..19e3cc1dd3
--- /dev/null
+++ b/package/utils/usbutils/patches/010-remove-python-usbids.patch
@@ -0,0 +1,68 @@
+From a1c2fd7bbd5b2e26f8f752fd3386a953b3b1ec37 Mon Sep 17 00:00:00 2001
+From: Rosen Penev 
+Date: Fri, 9 Mar 2018 10:31:09 -0800
+Subject: [PATCH] Revert "substitute usb.id location in lsusb Python script"
+
+This reverts commit 199756013624bfa497865eb498bf7331eb07ef56.
+---
+ Makefile.am | 7 +--
+ lsusb.py.in => lsusb.py | 4 ++--
+ 3 files changed, 3 insertions(+), 9 deletions(-)
+ rename lsusb.py.in => lsusb.py (99%)
+ mode change 100644 => 100755
+
+diff --git a/Makefile.am b/Makefile.am
+index b18ff69..67def60 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -39,13 +39,9 @@ EXTRA_DIST = \
+   lsusb.8.in \
+   usb-devices.1.in \
+   usb-devices \
+-  lsusb.py.in \
++  lsusb.py \
+   usbutils.pc.in
+ 
+-lsusb.py: $(srcdir)/lsusb.py.in
+-  sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+-  chmod 755 $@
+-
+ lsusb.8: $(srcdir)/lsusb.8.in
+   sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+ 
+@@ -59,7 +55,6 @@ usbutils.pc: $(srcdir)/usbutils.pc.in
+   sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@
+ 
+ DISTCLEANFILES = \
+-  lsusb.py \
+   lsusb.8 \
+   usb-devices.1 \
+   usbutils.pc
+diff --git a/lsusb.py.in b/lsusb.py
+old mode 100644
+new mode 100755
+similarity index 99%
+rename from lsusb.py.in
+rename to lsusb.py
+index db2e1e0..aa410fc
+--- a/lsusb.py.in
 b/lsusb.py
+@@ -1,5 +1,5 @@
+ #!/usr/bin/env python
+-# lsusb-VERSION.py
++# lsusb.py
+ # Displays your USB devices in reasonable form.
+ # (c) Kurt Garloff , 2/2009, GPL v2 or v3.
+ # (c) Kurt Garloff , 9/2013, GPL v2 or v3.
+@@ -18,7 +18,7 @@ warnsort = False
+ showeps = False
+ 
+ prefix = "/sys/bus/usb/devices/"
+-usbids = "@usbids@"
++usbids = "/usr/share/usb.ids"
+ 
+ esc = chr(27)
+ norm = esc + "[0;0m"
+-- 
+2.16.2
+
diff --git a/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch 
b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
new file mode 100644
index 00..ae38b06a77
--- /dev/null
+++ b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
@@ -0,0 +1,879 @@
+From 2bfca703b324e21aee2fabbe4f998aa663f03a15 Mon Sep 17 00:00:00 2001
+From: Rosen Penev 
+Date: Fri, 9 Mar 2018 10:31:24 -0800
+Subject: [PATCH] Revert "drop dependency on usb.ids"
+
+This reverts commit 5d7ea40bc94cbf3069a25beba3146de13bcdcf02.
+---
+ Makefile.am  |27 +-
+ configure.ac |12 +
+ lsusb.c  |13 +-
+ names.c  |   600 +-
+ names.h  | 2 +-
+ 5 files changed, 18559 insertions(+), 1775 deletions(-)
+ delete mode 100644 usb-spec.h
+ create mode 100644 usb.ids
+
+diff --git a/Makefile.am b/Makefile.am
+index 67def60..31afb20 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -20,7 +20,6 @@ lsusb_SOURCES = \
+   lsusb-t.c \
+   list.h \
+   names.c names.h \
+-  usb-spec.h \
+   usbmisc.c usbmisc.h
+ 
+ lsusb_CPPFLAGS = \
+@@ -31,17 +30,41 @@ lsusb_LDADD = \
+   $(LIBUSB_LIBS) \
+   $(UDEV_LIBS)
+ 
++if HAVE_ZLIB