From patchwork Tue Jan 14 12:33:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: christian.braunersorensen@prevas.dk X-Patchwork-Id: 310646 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 198EC2C00B1 for ; Tue, 14 Jan 2014 23:35:58 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 88C8C3FF6B for ; Tue, 14 Jan 2014 13:35:57 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail01.prevas.se (mail01.prevas.se [62.95.78.3]) by hugin.dotsrc.org (Postfix) with ESMTPS id 253103FF10 for ; Tue, 14 Jan 2014 13:35:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=4331; q=dns/txt; s=ironport1; t=1389702905; x=1421238905; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=BJTP2DDzNgvcNj30ucyLCtDK1rsexk3wps/Zgx3Y4gs=; b=J5sZYjIYrV0KAU1uRRtIogxc0wdyxgUaD51/DpP25SxysJJm3EBe7Ci1 60q5SLCH0Gff/jfrdQV8N9JcJfZBLRQdqitIE20g6oD+PmkQv/w2HC15e ZU/rbmuPrvXGNsD9tY9G8MEKokV4gP2gC4jCEcvsqr5OjxIb9IC/QVRh5 E=; X-IronPort-AV: E=Sophos;i="4.95,658,1384297200"; d="scan'208";a="4300234" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport1.prevas.se with ESMTP/TLS/AES128-SHA; 14 Jan 2014 13:35:02 +0100 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.347.0; Tue, 14 Jan 2014 13:35:02 +0100 Received: by localhost (Postfix, from userid 30007) id 42943681565; Tue, 14 Jan 2014 12:35:02 +0000 (UTC) From: To: Subject: [PATCH 057/131] usbutils: Add version 007 Date: Tue, 14 Jan 2014 12:33:44 +0000 Message-ID: X-Mailer: git-send-email 1.8.4 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Christian Sørensen Signed-off-by: Christian Sørensen --- .../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 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 +--- + 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 +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 +--- + 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 + # 2009 Randy Dunlap +-- +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