Re: [ptxdist] OSELAS.Toolchain 2019.09.0 - incorrect install path

2019-10-02 Thread Christoph Rüdiger
You are right. I was switching toolchain versions back and forth and didn't 
notice that 2019.09.0 does not have this behavior anymore.

Sorry for causing confusion.

Christoph

-Ursprüngliche Nachricht-
Von: ptxdist  im Auftrag von Michael Olbrich 

Antworten an: 
Datum: Freitag, 20. September 2019 um 15:39
An: 
Cc: Rüdiger, Christoph 
Betreff: Re: [ptxdist] OSELAS.Toolchain 2019.09.0 - incorrect install path

On Fri, Sep 20, 2019 at 07:55:52AM +0200, Juergen Borleis wrote:
> Hi Christoph (hope, this time its correct :) ),
> 
> On Thursday 19 September 2019 21:01:30 Rüdiger, Christoph wrote:
> > that was the key. For everyone else running into this issue, the command
> > to install the toolchain to /opt/OSELAS... is now
> >
> > ptxdist make install
> 
> \o/
> 
> > However, ptxdist still checks the existence of /opt/OSELAS.Toolchain...
> > at the very beginning of the build. Shouldn't it do that as part of the
> > make install step, given that it never touches /opt/ during ptxdist go?
> 
> Hmm, seems some old code still remains... Michael?

I've not seen anything like this when I built the toolchains. What exactly
happens for you?

Michael

-- 
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- |

___
ptxdist mailing list
ptxdist@pengutronix.de




___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 2/3] mtd-utils: version bump 2.0.2 -> 2.1.1

2019-10-02 Thread Ladislav Michl
Hi,

On Wed, Oct 02, 2019 at 03:06:00PM +0200, Alexander Dahl wrote:
> Signed-off-by: Alexander Dahl 
> ---
>  ...01-nandmarkbad-new-util-to-mark-blocks-as-bad.patch |  0
>  .../{mtd-utils-2.0.2 => mtd-utils-2.1.1}/autogen.sh|  0
>  patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/series|  0
>  rules/host-mtd-utils.make  |  6 +-
>  rules/mtd-utils.make   | 10 +++---
>  5 files changed, 12 insertions(+), 4 deletions(-)
>  rename patches/{mtd-utils-2.0.2 => 
> mtd-utils-2.1.1}/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch (100%)
>  rename patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/autogen.sh (100%)
>  rename patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/series (100%)
> 
> diff --git 
> a/patches/mtd-utils-2.0.2/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch
>  
> b/patches/mtd-utils-2.1.1/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch
> similarity index 100%
> rename from 
> patches/mtd-utils-2.0.2/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch
> rename to 
> patches/mtd-utils-2.1.1/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch
> diff --git a/patches/mtd-utils-2.0.2/autogen.sh 
> b/patches/mtd-utils-2.1.1/autogen.sh
> similarity index 100%
> rename from patches/mtd-utils-2.0.2/autogen.sh
> rename to patches/mtd-utils-2.1.1/autogen.sh
> diff --git a/patches/mtd-utils-2.0.2/series b/patches/mtd-utils-2.1.1/series
> similarity index 100%
> rename from patches/mtd-utils-2.0.2/series
> rename to patches/mtd-utils-2.1.1/series
> diff --git a/rules/host-mtd-utils.make b/rules/host-mtd-utils.make
> index 09709ba80..f49a08261 100644
> --- a/rules/host-mtd-utils.make
> +++ b/rules/host-mtd-utils.make
> @@ -25,9 +25,13 @@ HOST_MTD_UTILS_CONF_OPT:= \
>   --disable-unit-tests \
>   --disable-tests \
>   --disable-install-tests \
> + --disable-lsmtd \
>   --without-jffs \
>   --with-ubifs \
>   --with-xattr \
> - --with-lzo
> + --with-lzo \
> + --without-zstd \
> + --without-selinux \
> + --without-crypto
>  
>  # vim: syntax=make
> diff --git a/rules/mtd-utils.make b/rules/mtd-utils.make
> index aa64bd2c9..57b7691fc 100644
> --- a/rules/mtd-utils.make
> +++ b/rules/mtd-utils.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_MTD_UTILS) += mtd-utils
>  #
>  # Paths and names
>  #
> -MTD_UTILS_VERSION:= 2.0.2
> -MTD_UTILS_MD5:= 3f05981551e73f1c6de28b2ea4edec7c
> +MTD_UTILS_VERSION:= 2.1.1
> +MTD_UTILS_MD5:= 94bbd31b217a5169ae26ab8c0442f691
>  MTD_UTILS:= mtd-utils-$(MTD_UTILS_VERSION)
>  MTD_UTILS_SUFFIX := tar.bz2
>  MTD_UTILS_URL:= 
> ftp://ftp.infradead.org/pub/mtd-utils/$(MTD_UTILS).$(MTD_UTILS_SUFFIX)
> @@ -36,10 +36,14 @@ MTD_UTILS_CONF_OPT:= \
>   --disable-unit-tests \
>   --disable-tests \
>   --disable-install-tests \
> + --disable-lsmtd \
>   --$(call ptx/wwo, PTXCONF_MTD_UTILS_JFFS)-jffs \
>   --$(call ptx/wwo, PTXCONF_MTD_UTILS_UBIFS)-ubifs \
>   --without-xattr \
> - --$(call ptx/wwo, PTXCONF_MTD_UTILS_USE_LIBLZO)-lzo
> + --$(call ptx/wwo, PTXCONF_MTD_UTILS_USE_LIBLZO)-lzo \
> + --without-zstd \
> + --without-selinux \

We have global selinux option available...

> + --without-crypto
>  
>  # 
> 
>  # Target-Install
> -- 
> 2.20.1
> 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de

___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/3] usbutils: version bump 007 -> 012

2019-10-02 Thread Michael Olbrich
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 12 patches/usbutils-012/autogen.sh
> 
> diff --git a/patches/usbutils-012/autogen.sh b/patches/usbutils-012/autogen.sh
> new file mode 12
> index ..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
> ptxdist@pengutronix.de
> 

-- 
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- |

___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/3] mtd-utils: Add option for new tool 'lsmtd'

2019-10-02 Thread Alexander Dahl
Signed-off-by: Alexander Dahl 
---
 rules/mtd-utils.in   | 8 
 rules/mtd-utils.make | 6 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
index 6e829667a..8988ba116 100644
--- a/rules/mtd-utils.in
+++ b/rules/mtd-utils.in
@@ -119,6 +119,14 @@ config MTD_UTILS_FTL_FORMAT
  Utility to create an FTL (Flash Translation Layer) partition
  in a memory region
 
+config MTD_UTILS_LSMTD
+   bool
+   prompt "lsmtd"
+   help
+ Pretty prints a list with hierarchical information about all
+ available or the specified MTD and UBI devices. Tries to
+ imitate the lsblk program from util-linux.
+
 config MTD_UTILS_JFFS2_DUMP
bool
prompt "jffs2dump"
diff --git a/rules/mtd-utils.make b/rules/mtd-utils.make
index 57b7691fc..7e2f3c13a 100644
--- a/rules/mtd-utils.make
+++ b/rules/mtd-utils.make
@@ -36,7 +36,7 @@ MTD_UTILS_CONF_OPT:= \
--disable-unit-tests \
--disable-tests \
--disable-install-tests \
-   --disable-lsmtd \
+   --$(call ptx/endis, PTXCONF_MTD_UTILS_LSMTD)-lsmtd \
--$(call ptx/wwo, PTXCONF_MTD_UTILS_JFFS)-jffs \
--$(call ptx/wwo, PTXCONF_MTD_UTILS_UBIFS)-ubifs \
--without-xattr \
@@ -110,6 +110,10 @@ ifdef PTXCONF_MTD_UTILS_FTL_FORMAT
@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
/usr/sbin/ftl_format)
 endif
+ifdef PTXCONF_MTD_UTILS_LSMTD
+   @$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+   /usr/sbin/lsmtd)
+endif
 ifdef PTXCONF_MTD_UTILS_JFFS2_DUMP
@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
/usr/sbin/jffs2dump)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/3] mtd-utils: version bump 2.0.2 -> 2.1.1

2019-10-02 Thread Alexander Dahl
Signed-off-by: Alexander Dahl 
---
 ...01-nandmarkbad-new-util-to-mark-blocks-as-bad.patch |  0
 .../{mtd-utils-2.0.2 => mtd-utils-2.1.1}/autogen.sh|  0
 patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/series|  0
 rules/host-mtd-utils.make  |  6 +-
 rules/mtd-utils.make   | 10 +++---
 5 files changed, 12 insertions(+), 4 deletions(-)
 rename patches/{mtd-utils-2.0.2 => 
mtd-utils-2.1.1}/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch (100%)
 rename patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/autogen.sh (100%)
 rename patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/series (100%)

diff --git 
a/patches/mtd-utils-2.0.2/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch 
b/patches/mtd-utils-2.1.1/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch
similarity index 100%
rename from 
patches/mtd-utils-2.0.2/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch
rename to 
patches/mtd-utils-2.1.1/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch
diff --git a/patches/mtd-utils-2.0.2/autogen.sh 
b/patches/mtd-utils-2.1.1/autogen.sh
similarity index 100%
rename from patches/mtd-utils-2.0.2/autogen.sh
rename to patches/mtd-utils-2.1.1/autogen.sh
diff --git a/patches/mtd-utils-2.0.2/series b/patches/mtd-utils-2.1.1/series
similarity index 100%
rename from patches/mtd-utils-2.0.2/series
rename to patches/mtd-utils-2.1.1/series
diff --git a/rules/host-mtd-utils.make b/rules/host-mtd-utils.make
index 09709ba80..f49a08261 100644
--- a/rules/host-mtd-utils.make
+++ b/rules/host-mtd-utils.make
@@ -25,9 +25,13 @@ HOST_MTD_UTILS_CONF_OPT  := \
--disable-unit-tests \
--disable-tests \
--disable-install-tests \
+   --disable-lsmtd \
--without-jffs \
--with-ubifs \
--with-xattr \
-   --with-lzo
+   --with-lzo \
+   --without-zstd \
+   --without-selinux \
+   --without-crypto
 
 # vim: syntax=make
diff --git a/rules/mtd-utils.make b/rules/mtd-utils.make
index aa64bd2c9..57b7691fc 100644
--- a/rules/mtd-utils.make
+++ b/rules/mtd-utils.make
@@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_MTD_UTILS) += mtd-utils
 #
 # Paths and names
 #
-MTD_UTILS_VERSION  := 2.0.2
-MTD_UTILS_MD5  := 3f05981551e73f1c6de28b2ea4edec7c
+MTD_UTILS_VERSION  := 2.1.1
+MTD_UTILS_MD5  := 94bbd31b217a5169ae26ab8c0442f691
 MTD_UTILS  := mtd-utils-$(MTD_UTILS_VERSION)
 MTD_UTILS_SUFFIX   := tar.bz2
 MTD_UTILS_URL  := 
ftp://ftp.infradead.org/pub/mtd-utils/$(MTD_UTILS).$(MTD_UTILS_SUFFIX)
@@ -36,10 +36,14 @@ MTD_UTILS_CONF_OPT  := \
--disable-unit-tests \
--disable-tests \
--disable-install-tests \
+   --disable-lsmtd \
--$(call ptx/wwo, PTXCONF_MTD_UTILS_JFFS)-jffs \
--$(call ptx/wwo, PTXCONF_MTD_UTILS_UBIFS)-ubifs \
--without-xattr \
-   --$(call ptx/wwo, PTXCONF_MTD_UTILS_USE_LIBLZO)-lzo
+   --$(call ptx/wwo, PTXCONF_MTD_UTILS_USE_LIBLZO)-lzo \
+   --without-zstd \
+   --without-selinux \
+   --without-crypto
 
 # 
 # Target-Install
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 0/3] mtd-utils

2019-10-02 Thread Alexander Dahl
Hei hei,

I wanted to investigate the hot and new 'ubihealthd' [1] from
mtd-utils master, so I decided to upgrade mtd-utils first, also
because I was curious about the new tool 'lsmtd'. While at it I
stumbled over something I forgot when doing the bump from 1.5.x to
2.0.x two years ago … you might want to review that first patch a
little more closely!

Greets
Alex

[1] 
http://git.infradead.org/mtd-utils.git/commitdiff/7f0e2dc21fb291a9815fedb6e9e2c572db43c8c9

Alexander Dahl (3):
  host-mtd-utils: Switch to autoconf based build
  mtd-utils: version bump 2.0.2 -> 2.1.1
  mtd-utils: Add option for new tool 'lsmtd'

 ...rkbad-new-util-to-mark-blocks-as-bad.patch |  0
 .../autogen.sh|  0
 .../series|  0
 rules/host-mtd-utils.make | 29 +++
 rules/mtd-utils.in|  8 +
 rules/mtd-utils.make  | 14 +++--
 6 files changed, 36 insertions(+), 15 deletions(-)
 rename patches/{mtd-utils-2.0.2 => 
mtd-utils-2.1.1}/0001-nandmarkbad-new-util-to-mark-blocks-as-bad.patch (100%)
 rename patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/autogen.sh (100%)
 rename patches/{mtd-utils-2.0.2 => mtd-utils-2.1.1}/series (100%)

-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/3] host-mtd-utils: Switch to autoconf based build

2019-10-02 Thread Alexander Dahl
mtd-utils went from plain Makefile to autotools with version 2. This was
considered for the target package, but not for the host package.
host-mtd-utils build will break however when upgrading to mtd-utils
v2.1.x, so we fix this first before the version bump.

Fixes: 11c111c3af11 ("mtd-utils: Upgrade from 1.5.2 to 2.0.1")
Signed-off-by: Alexander Dahl 
---
 rules/host-mtd-utils.make | 25 +
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/rules/host-mtd-utils.make b/rules/host-mtd-utils.make
index 457ecefb4..09709ba80 100644
--- a/rules/host-mtd-utils.make
+++ b/rules/host-mtd-utils.make
@@ -12,21 +12,22 @@
 #
 HOST_PACKAGES-$(PTXCONF_HOST_MTD_UTILS) += host-mtd-utils
 
-#
-# Paths and names
-#
-HOST_MTD_UTILS_DIR = $(HOST_BUILDDIR)/$(MTD_UTILS)
-
 # 
 # Prepare
 # 
 
-# don't use := here
-HOST_MTD_UTILS_MAKEVARS= \
-   PREFIX=/ \
-   BUILDDIR=$(HOST_MTD_UTILS_DIR) \
-   DESTDIR=$(HOST_MTD_UTILS_PKGDIR)
-
-HOST_MTD_UTILS_CFLAGS  := -fgnu89-inline
+#
+# autoconf
+#
+HOST_MTD_UTILS_CONF_TOOL   := autoconf
+HOST_MTD_UTILS_CONF_OPT:= \
+   $(HOST_AUTOCONF) \
+   --disable-unit-tests \
+   --disable-tests \
+   --disable-install-tests \
+   --without-jffs \
+   --with-ubifs \
+   --with-xattr \
+   --with-lzo
 
 # vim: syntax=make
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/3] usbutils: version bump 007 -> 012

2019-10-02 Thread Roland Hieber
On Tue, Oct 01, 2019 at 06:15:14PM +0200, Alexander Dahl wrote:
> Hello Roland,
> 
> Am Dienstag, 1. Oktober 2019, 13:15:20 CEST schrieb Roland Hieber:
> > 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],
> > 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.
> 
> I would expect version bump and license issues in two separate commits. ;-)

Hmm, good point. They are not related here.

 - Roland

> 
> > 
> > [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 12 patches/usbutils-012/autogen.sh
> > 
> > diff --git a/patches/usbutils-012/autogen.sh
> > b/patches/usbutils-012/autogen.sh new file mode 12
> > index ..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.
> > +
> >  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=d1a09bbc0904287c70ce0a7aba17d63
> > 7 \ +   
> > 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)
> 
> Alex
> 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Roland Hieber | r.hie...@pengutronix.de |
Pengutronix e.K.  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 2/3] usb-ids: new package

2019-10-02 Thread Roland Hieber
On Tue, Oct 01, 2019 at 06:12:37PM +0200, Alexander Dahl wrote:
> Hello Roland,
> 
> Am Dienstag, 1. Oktober 2019, 13:15:19 CEST schrieb Roland Hieber:
> > The usb.ids file is no longer installed by usbutils since v008, create a
> > new package to fetch it. Since the file is not a tarball, we cannot use
> > $(call extract) and need to extract it ourselves.
> > 
> > Signed-off-by: Roland Hieber 
> > ---
> >  rules/usb-ids.in   |  4 ++
> >  rules/usb-ids.make | 92 ++
> >  2 files changed, 96 insertions(+)
> >  create mode 100644 rules/usb-ids.in
> >  create mode 100644 rules/usb-ids.make
> > 
> > diff --git a/rules/usb-ids.in b/rules/usb-ids.in
> > new file mode 100644
> > index ..8c447c5c2c47
> > --- /dev/null
> > +++ b/rules/usb-ids.in
> > @@ -0,0 +1,4 @@
> > +## SECTION=shell_and_console
> > +
> > +config USB_IDS
> > +   tristate
> > diff --git a/rules/usb-ids.make b/rules/usb-ids.make
> > new file mode 100644
> > index ..904cec9537d6
> > --- /dev/null
> > +++ b/rules/usb-ids.make
> > @@ -0,0 +1,92 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2019 by Roland Hieber 
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_USB_IDS) += usb-ids
> > +
> > +#
> > +# Paths and names
> > +#
> > +USB_IDS_VERSION:= 0
> > +USB_IDS_MD5:= 47a791eab0bf9aa41a33a82bbccaedb3
> > +USB_IDS:= usb-ids
> > +USB_IDS_SUFFIX := bz2
> > +USB_IDS_URL:= http://www.linux-usb.org/usb.ids.$(USB_IDS_SUFFIX)
> > +USB_IDS_SOURCE := $(SRCDIR)/$(USB_IDS).$(USB_IDS_SUFFIX)
> > +USB_IDS_DIR:= $(BUILDDIR)/$(USB_IDS)
> > +USB_IDS_LICENSE:= GPL-2.0-or-later OR BSD-3-Clause
> > +
> > +#
> > ---
> > - +# Extract
> > +#
> > ---
> > - +
> > +$(STATEDIR)/usb-ids.extract:
> > +   @$(call targetinfo)
> > +   @$(call clean, $(USB_IDS_DIR))
> > +   @mkdir -p $(USB_IDS_DIR) && \
> > +   cd $(USB_IDS_DIR) && \
> > +   bzcat $(USB_IDS_SOURCE) > usb.ids
> > +   @$(call touch)
> 
> Is there a benefit of calling bzcat and redirecting the output, instead of 
> just calling bunzip2?

Yes. bunzip2 deletes the source file and saves the extracted file to the
same folder, but here we want a different output.

 - Roland

> 
> > +
> > +#
> > ---
> > - +# Prepare
> > +#
> > ---
> > - +
> > +$(STATEDIR)/usb-ids.prepare:
> > +   @$(call targetinfo)
> > +   @$(call touch)
> > +
> > +#
> > ---
> > - +# Compile
> > +#
> > ---
> > - +
> > +$(STATEDIR)/usb-ids.compile:
> > +   @$(call targetinfo)
> > +   @$(call touch)
> > +
> > +#
> > ---
> > - +# Install
> > +#
> > ---
> > - +
> > +$(STATEDIR)/usb-ids.install:
> > +   @$(call targetinfo)
> > +   @mkdir -p $(USB_IDS_PKGDIR)/usr/share/
> > +   @cd $(USB_IDS_DIR) && \
> > +   install -m0644 usb.ids $(USB_IDS_PKGDIR)/usr/share/
> > +   @$(call touch)
> > +
> > +#
> > ---
> > - +# Target-Install
> > +#
> > ---
> > - +
> > +$(STATEDIR)/usb-ids.targetinstall:
> > +   @$(call targetinfo)
> > +
> > +   @$(call install_init, usb-ids)
> > +   @$(call install_fixup, usb-ids,PRIORITY,optional)
> > +   @$(call install_fixup, usb-ids,SECTION,base)
> > +   @$(call install_fixup, usb-ids,AUTHOR,"Roland Hieber
> > ") +   @$(call install_fixup,
> > usb-ids,DESCRIPTION,missing)
> > +
> > +   @$(call install_copy, usb-ids, 0, 0, 0644, -, /usr/share/usb.ids)
> > +
> > +   @$(call install_finish, usb-ids)
> > +
> > +   @$(call touch)
> > +
> > +#
> > ---
> > - +# Clean
> > +#
> > ---
> > - +
> > +#$(STATEDIR)/usb-ids.clean:
> > +#  @$(call targetinfo)
> > +#  @$(call clean_pkg, USB_IDS)
> > +
> > +# vim: syntax=make
> 
> Alex
> 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Roland Hieber | r.hie...@pengutronix.de |
Pengutronix e.K.  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917- |