Patchwork [057/131] usbutils: Add version 007

login
register
mail settings
Submitter christian.braunersorensen@prevas.dk
Date Jan. 14, 2014, 12:33 p.m.
Message ID <a7a34cfc7600807313333d4c288d83c0b46a11f5.1389702652.git.christian.braunersorensen@prevas.dk>
Download mbox | patch
Permalink /patch/310646/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

christian.braunersorensen@prevas.dk - Jan. 14, 2014, 12:33 p.m.
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

Signed-off-by: Christian Sørensen <christian.braunersorensen@prevas.dk>
---
 .../usbutils-007/Fix-NULL-pointer-crash.patch      | 28 +++++++++++++++++++
 .../usb-devices-avoid-dependency-on-bash.patch     | 30 ++++++++++++++++++++
 recipes/usbutils/usbutils_007.oe                   | 32 ++++++++++++++++++++++
 recipes/usbutils/usbutils_007.oe.sig               |  1 +
 4 files changed, 91 insertions(+)
 create mode 100644 recipes/usbutils/usbutils-007/Fix-NULL-pointer-crash.patch
 create mode 100644 recipes/usbutils/usbutils-007/usb-devices-avoid-dependency-on-bash.patch
 create mode 100644 recipes/usbutils/usbutils_007.oe
 create mode 100644 recipes/usbutils/usbutils_007.oe.sig

Patch

diff --git a/recipes/usbutils/usbutils-007/Fix-NULL-pointer-crash.patch b/recipes/usbutils/usbutils-007/Fix-NULL-pointer-crash.patch
new file mode 100644
index 0000000..0efdc59
--- /dev/null
+++ b/recipes/usbutils/usbutils-007/Fix-NULL-pointer-crash.patch
@@ -0,0 +1,28 @@ 
+Fix NULL pointer crash.
+
+Before use usbbuslist, we should check if it is valid.
+
+Upstream-Status: Pending
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ lsusb-t.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/lsusb-t.c b/lsusb-t.c
+index f604155..583a46a 100644
+--- a/lsusb-t.c
++++ b/lsusb-t.c
+@@ -643,6 +643,10 @@ static void sort_busses(void)
+ 	/* need to reverse sort bus numbers */
+ 	struct usbbusnode *t, *p, **pp;
+ 	int swapped;
++
++	if (!usbbuslist)
++		return;
++
+ 	do {
+ 		p = usbbuslist;
+ 		pp = &usbbuslist;
+-- 
+1.7.4.1
+
diff --git a/recipes/usbutils/usbutils-007/usb-devices-avoid-dependency-on-bash.patch b/recipes/usbutils/usbutils-007/usb-devices-avoid-dependency-on-bash.patch
new file mode 100644
index 0000000..a6b241f
--- /dev/null
+++ b/recipes/usbutils/usbutils-007/usb-devices-avoid-dependency-on-bash.patch
@@ -0,0 +1,30 @@ 
+From 333d5fbbc03481f1aa222bd68c2609db168ae3e0 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Thu, 26 Jul 2012 10:37:32 +0100
+Subject: [PATCH] usb-devices: avoid dependency on bash
+
+By virtue of having #!/bin/bash this script declared that it requires
+bash, however manual examination, checkbashisms and tests with dash
+and busybox show that it doesn't contain any bashisms, so change the
+header to avoid the dependency.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ usb-devices |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usb-devices b/usb-devices
+index b2052e2..14a5358 100755
+--- a/usb-devices
++++ b/usb-devices
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # Copyright: 2009 Greg Kroah-Hartman <greg@kroah.com>
+ #            2009 Randy Dunlap <rdunlap@xenotime.net>
+-- 
+1.7.9.5
+
diff --git a/recipes/usbutils/usbutils_007.oe b/recipes/usbutils/usbutils_007.oe
new file mode 100644
index 0000000..c3b476e
--- /dev/null
+++ b/recipes/usbutils/usbutils_007.oe
@@ -0,0 +1,32 @@ 
+# -*- mode:python; -*-
+DESCRIPTION = "Host side USB console utilities."
+LICENSE = "GPLv2"
+
+COMPATIBLE_HOST_ARCHS = ".*linux"
+
+RECIPE_TYPES = "machine"
+
+inherit autotools pkgconfig
+
+require conf/fetch/kernelorg.conf
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz"
+SRC_URI += "file://usb-devices-avoid-dependency-on-bash.patch"
+SRC_URI += "file://Fix-NULL-pointer-crash.patch"
+
+DEPENDS += "libusb-compat"
+
+do_install[postfuncs] += "do_install_rm_usbids"
+do_install_rm_usbids() {
+	# The 0.86 Makefile.am installs both usb.ids and usb.ids.gz.
+	if [ -f ${D}${datadir}/usb.ids.gz ]
+	then
+		rm -f ${D}${datadir}/usb.ids
+	fi
+}
+
+PACKAGES =+ "${PN}-update"
+
+FILES_${PN} += "${datadir}/usb*"
+FILES_${PN}-update = "${sbindir}/update-usbids.sh"
+RDEPENDS_${PN} += "libc librt libusb-compat"
+DEPENDS_${PN} += "libusb-compat"
diff --git a/recipes/usbutils/usbutils_007.oe.sig b/recipes/usbutils/usbutils_007.oe.sig
new file mode 100644
index 0000000..0f10ecf
--- /dev/null
+++ b/recipes/usbutils/usbutils_007.oe.sig
@@ -0,0 +1 @@ 
+22cff99e342c13d6083c8364501cc002599c95a7  usbutils-007.tar.gz