Update to a git snapshot which should be pretty close to the final 1.0.9
Many bugfixes Needed for: http://fedoraproject.org/wiki/Features/UsbNetworkRedirection
This commit is contained in:
parent
cf530c9b5a
commit
b803583310
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
libusb-1.0.8.tar.bz2
|
libusb-1.0.8.tar.bz2
|
||||||
|
/libusb-1.0.9-0.1.tar.bz2
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
From 22d61cd0891d8304dfc1a70579cf154fd8e6644a Mon Sep 17 00:00:00 2001
|
|
||||||
From b33c3cb9651459de1f3d549677cbac67a017a295 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Drake <dan@reactivated.net>
|
|
||||||
Date: Tue, 22 Jun 2010 18:20:23 -0500
|
|
||||||
Subject: [PATCH] Linux: fix log message that was being unconditionally sent to stderr (#44)
|
|
||||||
|
|
||||||
This message was put in place to aid libusb-compat-0.1 users, who
|
|
||||||
may run into the change that libusb-0.1 allowed you to usb_open() a
|
|
||||||
device that you don't have write access to, but libusb-1.0 does not.
|
|
||||||
|
|
||||||
As explained on the ticket this change is dangerous so it should go through
|
|
||||||
the usual logging mechanism. I also added a similar regular log message
|
|
||||||
to libusb-compat-0.1.
|
|
||||||
|
|
||||||
Resolves: #628356
|
|
||||||
|
|
||||||
diff -uNPrp libusb-1.0.8/libusb/os/linux_usbfs.c libusb-1.0.8.new/libusb/os/linux_usbfs.c
|
|
||||||
--- libusb-1.0.8/libusb/os/linux_usbfs.c 2010-04-22 23:14:46.000000000 +0200
|
|
||||||
+++ libusb-1.0.8.new/libusb/os/linux_usbfs.c 2010-09-14 16:22:31.314772148 +0200
|
|
||||||
@@ -1055,10 +1055,10 @@ static int op_open(struct libusb_device_
|
|
||||||
hpriv->fd = open(filename, O_RDWR);
|
|
||||||
if (hpriv->fd < 0) {
|
|
||||||
if (errno == EACCES) {
|
|
||||||
- fprintf(stderr, "libusb couldn't open USB device %s: "
|
|
||||||
- "Permission denied.\n"
|
|
||||||
- "libusb requires write access to USB device nodes.\n",
|
|
||||||
- filename);
|
|
||||||
+ usbi_err(HANDLE_CTX(handle), "libusb couldn't open USB device %s: "
|
|
||||||
+ "Permission denied.", filename);
|
|
||||||
+ usbi_err(HANDLE_CTX(handle),
|
|
||||||
+ "libusb requires write access to USB device nodes.");
|
|
||||||
return LIBUSB_ERROR_ACCESS;
|
|
||||||
} else if (errno == ENOENT) {
|
|
||||||
return LIBUSB_ERROR_NO_DEVICE;
|
|
32
libusb1.spec
32
libusb1.spec
@ -1,16 +1,24 @@
|
|||||||
Summary: A library which allows userspace access to USB devices
|
Summary: A library which allows userspace access to USB devices
|
||||||
Name: libusb1
|
Name: libusb1
|
||||||
Version: 1.0.8
|
Version: 1.0.9
|
||||||
Release: 7%{?dist}
|
Release: 0.1.git212ca37c%{?dist}
|
||||||
Source0: http://downloads.sourceforge.net/libusb/libusb-%{version}.tar.bz2
|
# This is a git snapshot of what will hopefully soon become 1.0.9, but
|
||||||
|
# we need this now, to get things in place for:
|
||||||
|
# http://fedoraproject.org/wiki/Features/UsbNetworkRedirection
|
||||||
|
# To regenerate do:
|
||||||
|
# git clone git://people.freedesktop.org/~jwrdegoede/usbredir
|
||||||
|
# cd usbredir
|
||||||
|
# git checkout fedora-1.0.9-0.1
|
||||||
|
# ./autogen.sh
|
||||||
|
# make dist
|
||||||
|
# mv libusb-1.0.8.tar.bz2 libusb-1.0.9-0.1.tar.bz2
|
||||||
|
Source0: libusb-1.0.9-0.1.tar.bz2
|
||||||
|
#Source0: http://downloads.sourceforge.net/libusb/libusb-%{version}.tar.bz2
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
URL: http://libusb.wiki.sourceforge.net/Libusb1.0
|
URL: http://libusb.wiki.sourceforge.net/Libusb1.0
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
|
|
||||||
Patch0: libusb1-error-access-log-message.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides a way for applications to access USB devices. Note that
|
This package provides a way for applications to access USB devices. Note that
|
||||||
this library is not compatible with the original libusb-0.1 series.
|
this library is not compatible with the original libusb-0.1 series.
|
||||||
@ -45,8 +53,7 @@ Requires: %{name}-devel = %{version}-%{release}
|
|||||||
This package contains static libraries to develop applications that use libusb1.
|
This package contains static libraries to develop applications that use libusb1.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n libusb-%{version}
|
%setup -q -n libusb-1.0.8
|
||||||
%patch0 -p1 -b error-access-log-message
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --libdir=/%{_lib}
|
%configure --libdir=/%{_lib}
|
||||||
@ -56,16 +63,12 @@ make docs
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
rm -f $RPM_BUILD_ROOT/%{_lib}/*.la
|
rm -f $RPM_BUILD_ROOT/%{_lib}/*.la
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_libdir}/pkgconfig
|
mkdir -p %{buildroot}%{_libdir}/pkgconfig
|
||||||
mv %{buildroot}/%{_lib}/pkgconfig/* %{buildroot}%{_libdir}/pkgconfig/
|
mv %{buildroot}/%{_lib}/pkgconfig/* %{buildroot}%{_libdir}/pkgconfig/
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -90,6 +93,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/%{_lib}/*.a
|
/%{_lib}/*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 14 2011 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.1.git212ca37c
|
||||||
|
- Update to a git snapshot which should be pretty close to the final 1.0.9
|
||||||
|
- Many bugfixes
|
||||||
|
- Needed for: http://fedoraproject.org/wiki/Features/UsbNetworkRedirection
|
||||||
|
|
||||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-7
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-7
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user