update to new upstream 006
This commit is contained in:
parent
71a2faac06
commit
ad04d9ed32
@ -1,79 +0,0 @@
|
||||
--- usbutils-003/Makefile.am 2011-03-22 00:23:33.000000000 +0100
|
||||
+++ usbutils-003_/Makefile.am 2011-06-16 15:41:20.927882420 +0200
|
||||
@@ -4,15 +4,9 @@
|
||||
AM_LDFLAGS = \
|
||||
-Wl,--as-needed
|
||||
|
||||
-data_DATA = \
|
||||
- usb.ids
|
||||
-
|
||||
bin_PROGRAMS = \
|
||||
lsusb
|
||||
|
||||
-sbin_SCRIPTS = \
|
||||
- update-usbids.sh
|
||||
-
|
||||
bin_SCRIPTS = \
|
||||
usb-devices \
|
||||
lsusb.py
|
||||
@@ -27,37 +21,22 @@
|
||||
|
||||
lsusb_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(LIBUSB_CFLAGS) \
|
||||
- -DDATADIR=\"$(datadir)\"
|
||||
+ -DDATADIR=\"$(datadir)/hwdata\"
|
||||
|
||||
lsusb_LDADD = \
|
||||
$(LIBUSB_LIBS)
|
||||
|
||||
-if HAVE_ZLIB
|
||||
-data_DATA += usb.ids.gz
|
||||
-lsusb_CPPFLAGS += -DHAVE_LIBZ
|
||||
-lsusb_LDADD += -lz
|
||||
-endif
|
||||
-
|
||||
man_MANS = \
|
||||
lsusb.8 \
|
||||
usb-devices.1
|
||||
|
||||
EXTRA_DIST = \
|
||||
- usb.ids \
|
||||
- update-usbids.sh.in \
|
||||
lsusb.8.in \
|
||||
usb-devices.1.in \
|
||||
usb-devices \
|
||||
lsusb.py \
|
||||
usbutils.pc.in
|
||||
|
||||
-usb.ids.gz: $(srcdir)/usb.ids
|
||||
- gzip -c -9 $< > $@
|
||||
-
|
||||
-update-usbids.sh: $(srcdir)/update-usbids.sh.in
|
||||
- sed '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' $< >$@
|
||||
|
||||
@@ -71,10 +50,8 @@
|
||||
sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@
|
||||
|
||||
DISTCLEANFILES = \
|
||||
- usb.ids.gz \
|
||||
lsusb.8 \
|
||||
usb-devices.1 \
|
||||
- update-usbids.sh \
|
||||
usbutils.pc
|
||||
|
||||
distclean-local:
|
||||
--- usbutils-003/lsusb.py 2010-12-16 01:07:09.000000000 +0100
|
||||
+++ usbutils-003_/lsusb.py 2011-08-11 09:57:57.079327430 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
warnsort = False
|
||||
|
||||
prefix = "/sys/bus/usb/devices/"
|
||||
-usbids = "/usr/share/usb.ids"
|
||||
+usbids = "/usr/share/hwdata/usb.ids"
|
||||
|
||||
esc = chr(27)
|
||||
norm = esc + "[0;0m"
|
@ -1,50 +0,0 @@
|
||||
From d63fa164a4ffebc5247acaa3b80b0d4f2e21d926 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Philippsen <nils@redhat.com>
|
||||
Date: Mon, 30 May 2011 17:19:47 +0200
|
||||
Subject: [PATCH] don't use invalid config descriptors
|
||||
|
||||
This fixes "lsusb -v" crashing if device files are present but can't be
|
||||
opened.
|
||||
---
|
||||
lsusb.c | 23 +++++++++++++++++------
|
||||
1 files changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lsusb.c b/lsusb.c
|
||||
index 6ba2288..25dbc51 100644
|
||||
--- a/lsusb.c
|
||||
+++ b/lsusb.c
|
||||
@@ -3800,14 +3800,25 @@ static void dumpdev(libusb_device *dev)
|
||||
if (desc.bNumConfigurations) {
|
||||
struct libusb_config_descriptor *config;
|
||||
|
||||
- libusb_get_config_descriptor(dev, 0, &config);
|
||||
- otg = do_otg(config) || otg;
|
||||
- libusb_free_config_descriptor(config);
|
||||
+ ret = libusb_get_config_descriptor(dev, 0, &config);
|
||||
+ if (ret) {
|
||||
+ fprintf(stderr, "Couldn't get configuration descriptor 0, "
|
||||
+ "some information will be missing\n");
|
||||
+ } else {
|
||||
+ otg = do_otg(config) || otg;
|
||||
+ libusb_free_config_descriptor(config);
|
||||
+ }
|
||||
|
||||
for (i = 0; i < desc.bNumConfigurations; ++i) {
|
||||
- libusb_get_config_descriptor(dev, i, &config);
|
||||
- dump_config(udev, config);
|
||||
- libusb_free_config_descriptor(config);
|
||||
+ ret = libusb_get_config_descriptor(dev, i, &config);
|
||||
+ if (ret) {
|
||||
+ fprintf(stderr, "Couldn't get configuration "
|
||||
+ "descriptor %d, some information will "
|
||||
+ "be missing\n", i);
|
||||
+ } else {
|
||||
+ dump_config(udev, config);
|
||||
+ libusb_free_config_descriptor(config);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
if (!udev)
|
||||
--
|
||||
1.7.5.4
|
||||
|
@ -1,37 +0,0 @@
|
||||
diff --git a/lsusb-t.c b/lsusb-t.c
|
||||
index a07c902..92a9830 100644
|
||||
--- a/lsusb-t.c
|
||||
+++ b/lsusb-t.c
|
||||
@@ -335,9 +335,7 @@ static void add_usb_interface(const char *d_name)
|
||||
l = snprintf(driver, MY_PATH_MAX, "%s/%s/driver", sys_bus_usb_devices, d_name);
|
||||
if (l > 0 && l < MY_PATH_MAX) {
|
||||
l = readlink(driver, driver, MY_PATH_MAX);
|
||||
- if (l < 0)
|
||||
- perror(d_name);
|
||||
- else {
|
||||
+ if (l >= 0) {
|
||||
if (l < MY_PATH_MAX - 1)
|
||||
driver[l] = '\0';
|
||||
else
|
||||
@@ -400,9 +398,7 @@ static void add_usb_device(const char *d_name)
|
||||
l = snprintf(driver, MY_PATH_MAX, "%s/%s/driver", sys_bus_usb_devices, d_name);
|
||||
if (l > 0 && l < MY_PATH_MAX) {
|
||||
l = readlink(driver, driver, MY_PATH_MAX);
|
||||
- if (l < 0)
|
||||
- perror(d_name);
|
||||
- else {
|
||||
+ if (l >= 0) {
|
||||
if (l < MY_PATH_MAX - 1)
|
||||
driver[l] = '\0';
|
||||
else
|
||||
@@ -423,9 +419,7 @@ static void get_roothub_driver(struct usbbusnode *b, const char *d_name)
|
||||
l = snprintf(path, MY_PATH_MAX, "%s/%s/../driver", sys_bus_usb_devices, d_name);
|
||||
if (l > 0 && l < MY_PATH_MAX) {
|
||||
l = readlink(path, path, MY_PATH_MAX);
|
||||
- if (l < 0)
|
||||
- perror(d_name);
|
||||
- else {
|
||||
+ if (l >= 0) {
|
||||
if (l < MY_PATH_MAX - 1)
|
||||
path[l] = '\0';
|
||||
else
|
13
usbutils-006-hwdata.patch
Normal file
13
usbutils-006-hwdata.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/lsusb.py b/lsusb.py
|
||||
index 14d9a31..a34f736 100755
|
||||
--- a/lsusb.py
|
||||
+++ b/lsusb.py
|
||||
@@ -16,7 +16,7 @@ nohub = False
|
||||
warnsort = False
|
||||
|
||||
prefix = "/sys/bus/usb/devices/"
|
||||
-usbids = "/usr/share/usb.ids"
|
||||
+usbids = "/usr/share/hwdata/usb.ids"
|
||||
|
||||
esc = chr(27)
|
||||
norm = esc + "[0;0m"
|
@ -1,5 +1,5 @@
|
||||
Name: usbutils
|
||||
Version: 005
|
||||
Version: 006
|
||||
Release: 1%{?dist}
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
URL: http://www.linux-usb.org/
|
||||
@ -11,10 +11,9 @@ BuildRequires: autoconf, libtool, libusb-devel >= 0.1.8, libusb1-devel
|
||||
Summary: Linux USB utilities
|
||||
Group: Applications/System
|
||||
Conflicts: hotplug < 3:2002_01_14-2
|
||||
Patch0: usbutils-003-hwdata.patch
|
||||
#Path to usb.ids should be with /hwdata/
|
||||
Patch1: usbutils-make-hwdata.patch
|
||||
Patch2: usbutils-005-readlink.patch
|
||||
|
||||
#Path to usb.ids in lsusb.py should be with /hwdata/
|
||||
Patch0: usbutils-006-hwdata.patch
|
||||
|
||||
%description
|
||||
This package contains utilities for inspecting devices connected to a
|
||||
@ -23,12 +22,10 @@ USB bus.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
./autogen.sh
|
||||
|
||||
%build
|
||||
%configure --sbindir=%{_sbindir}
|
||||
%configure --sbindir=%{_sbindir} --datadir=%{_datadir}/hwdata --disable-usbids
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
@ -46,6 +43,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* Mon Jul 16 2012 Lukáš Nykrýn <lnykryn@redhat.com> - 006-1
|
||||
- new upstream release
|
||||
|
||||
* Thu Apr 19 2012 Lukas Nykryn <lnykryn@redhat.com> 005-1
|
||||
- new upstream release
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user