On Tue, Oct 01, 2019 at 01:15:20PM +0200, Roland Hieber wrote:
> The upstream tarball currently does not provide a pre-built configure
> script [1], we need to generate it during the extract stage.
> 
> The usb.ids file was removed from the source tarball in v008 [3],

I know. There is a reason why I didn't update to a newer version myself.

At least Debian uses hwdb now. But creating that pulls in several more
dependencies :-/.

> instead we now install it through an extra package. With that, zlib is
> no longer needed for the build.
> 
> A look through the source tree shows GPL-2.0-or-later files too. Pin
> down all relevant license files.
> 
> [1]: https://github.com/gregkh/usbutils/issues/95#issuecomment-490086696
> [3]: https://github.com/gregkh/usbutils/commit/5d7ea40bc94c
> ---
>  patches/usbutils-012/autogen.sh |  1 +
>  rules/usbutils.in               | 15 +++++++++++++--
>  rules/usbutils.make             | 15 ++++++++-------
>  3 files changed, 22 insertions(+), 9 deletions(-)
>  create mode 120000 patches/usbutils-012/autogen.sh
> 
> diff --git a/patches/usbutils-012/autogen.sh b/patches/usbutils-012/autogen.sh
> new file mode 120000
> index 000000000000..9f8a4cb7ddcb
> --- /dev/null
> +++ b/patches/usbutils-012/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/rules/usbutils.in b/rules/usbutils.in
> index f259f9c4e560..42eb0b77c6b0 100644
> --- a/rules/usbutils.in
> +++ b/rules/usbutils.in
> @@ -1,9 +1,13 @@
>  ## SECTION=shell_and_console
>  
>  menuconfig USBUTILS
> -     select LIBUSB
>       tristate
>       prompt "usbutils                      "
> +     select LIBUSB
> +     select UDEV
> +     select UDEV_LIBUDEV
> +     select USB_IDS          if USBUTILS_IDS
> +
>       help
>         Linux USB utilities
>  
> @@ -44,8 +48,15 @@ config USBUTILS_USBHIDDUMP
>  
>  config USBUTILS_USBDEVICES
>       bool
> -     prompt "usbdevices"
> +     prompt "usb-devices"
>       help
>         Print out sysfs information about usb devices.
>  
> +config USBUTILS_IDS
> +     bool
> +     prompt "usb.ids"
> +     help
> +       Install /usr/share/usb.ids, the database of known USB vendor and
> +       product IDs.

No. The real benefit of the 'real' lsusb compared to busybox is that
database. This should not be optional.

Michael

> +
>  endif
> diff --git a/rules/usbutils.make b/rules/usbutils.make
> index 80af5a2bbf17..df1f44a5a2c7 100644
> --- a/rules/usbutils.make
> +++ b/rules/usbutils.make
> @@ -15,14 +15,18 @@ PACKAGES-$(PTXCONF_USBUTILS) += usbutils
>  #
>  # Paths and names
>  #
> -USBUTILS_VERSION     := 007
> -USBUTILS_MD5         := c9df5107ae9d26b10a1736a261250139
> +USBUTILS_VERSION     := 012
> +USBUTILS_MD5         := 0da98eb80159071fdbb00905390509d9
>  USBUTILS             := usbutils-$(USBUTILS_VERSION)
>  USBUTILS_SUFFIX              := tar.xz
>  USBUTILS_URL         := $(call ptx/mirror, KERNEL, 
> utils/usb/usbutils/$(USBUTILS).$(USBUTILS_SUFFIX))
>  USBUTILS_SOURCE              := $(SRCDIR)/$(USBUTILS).$(USBUTILS_SUFFIX)
>  USBUTILS_DIR         := $(BUILDDIR)/$(USBUTILS)
> -USBUTILS_LICENSE     := GPL-2.0-only
> +USBUTILS_LICENSE     := GPL-2.0-only AND GPL-2.0-or-later
> +USBUTILS_LICENSE_FILES       := \
> +     
> file://README.md;startline=2;endline=3;md5=d1a09bbc0904287c70ce0a7aba17d637 \
> +     file://LICENSES/GPL-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> +     file://LICENSES/GPL-3.0.txt;md5=1ebbd3e34237af26da5dc08a4e440464
>  
>  # 
> ----------------------------------------------------------------------------
>  # Prepare
> @@ -36,9 +40,7 @@ USBUTILS_ENV        := $(CROSS_ENV)
>  #
>  USBUTILS_AUTOCONF := \
>       $(CROSS_AUTOCONF_USR) \
> -     $(GLOBAL_LARGE_FILE_OPTION) \
> -     --disable-zlib \
> -     --enable-usbids
> +     $(GLOBAL_LARGE_FILE_OPTION)
>  
>  # 
> ----------------------------------------------------------------------------
>  # Target-Install
> @@ -62,7 +64,6 @@ endif
>  ifdef PTXCONF_USBUTILS_USBDEVICES
>       @$(call install_copy, usbutils, 0, 0, 0755, -, /usr/bin/usb-devices)
>  endif
> -     @$(call install_copy, usbutils, 0, 0, 0644, -, /usr/share/usb.ids,n)
>  
>       @$(call install_finish, usbutils)
>  
> -- 
> 2.23.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> [email protected]
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to