update to 0.1.8

This commit is contained in:
yangkunlin 2023-07-17 19:29:58 +08:00
parent dd873a5e2b
commit d0712009d4
5 changed files with 15 additions and 78 deletions

View File

@ -1,7 +1,7 @@
From a9e8373030b39aadfc33af67443085df83e9e344 Mon Sep 17 00:00:00 2001 From c61d4088ab18ef327128d3776d93a5f80ff24875 Mon Sep 17 00:00:00 2001
From: Daniel Berrange <berrange@redhat.com> From: Daniel Berrange <berrange@redhat.com>
Date: Wed, 14 Aug 2013 16:00:56 +0200 Date: Wed, 14 Aug 2013 16:00:56 +0200
Subject: [libusb-compat PATCH] Link with -znodelete to disallow unloading Subject: [PATCH] Link with -znodelete to disallow unloading
Since libusb-0.1 did not have any init / exit function, code using the Since libusb-0.1 did not have any init / exit function, code using the
libusb-0.1 API will not call libusb_exit. libusb-0.1 API will not call libusb_exit.
@ -25,27 +25,16 @@ Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libusb/Makefile.am b/libusb/Makefile.am diff --git a/libusb/Makefile.am b/libusb/Makefile.am
index 33a609a..a20fdb5 100644 index 651434b..21f973e 100644
--- a/libusb/Makefile.am --- a/libusb/Makefile.am
+++ b/libusb/Makefile.am +++ b/libusb/Makefile.am
@@ -5,5 +5,5 @@ libusb_la_SOURCES = core.c usbi.h @@ -9,5 +9,5 @@ else
libusb_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) $(LIBUSB_1_0_CFLAGS)
libusb_la_LIBADD = $(LIBUSB_1_0_LIBS) libusb_la_LIBADD = $(LIBUSB_1_0_LIBS)
libusb_la_LDFLAGS = -version-info $(LT_MAJOR):$(LT_REVISION):$(LT_AGE) \ endif
libusb_la_LDFLAGS = -no-undefined -version-info $(LT_MAJOR):$(LT_REVISION):$(LT_AGE) \
- -release 0.1 - -release 0.1
+ -release 0.1 -Wl,-z -Wl,nodelete + -release 0.1 -Wl,-z -Wl,nodelete
--- libusb-compat-0.1.5.orig/libusb/Makefile.in 2013-05-21 00:40:35.000000000 +0100
+++ libusb-compat-0.1.5.orig/libusb/Makefile.in 2013-08-13 22:20:32.831532426 +0100
@@ -297,7 +297,7 @@ libusb_la_SOURCES = core.c usbi.h
libusb_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) $(LIBUSB_1_0_CFLAGS)
libusb_la_LIBADD = $(LIBUSB_1_0_LIBS)
libusb_la_LDFLAGS = -version-info $(LT_MAJOR):$(LT_REVISION):$(LT_AGE) \
- -release 0.1
+ -release 0.1 -Wl,-z -Wl,nodelete
all: all-am
-- --
1.8.3.1 2.27.0

View File

@ -1,55 +0,0 @@
From eb590b4dac00a5188b93e1d6ebdd60b06f9ab3d7 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 13 Feb 2014 17:25:27 +0100
Subject: [libusb-compat PATCH 2/2] Revert "use atexit() to call libusb_exit()"
The use of atexit() breaks various users of libusb-compat,
see ie: https://bugzilla.redhat.com/show_bug.cgi?id=1003193
This reverts commit 0be16b8dd25733d242ae32b57823a9513ec21353.
Closes libusbx/libusb-compat-0.1#2
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
libusb/core.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/libusb/core.c b/libusb/core.c
index c0ccb1f..2dd1b5f 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -21,7 +21,6 @@
#include <config.h>
#include <errno.h>
#include <stdarg.h>
-#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -137,13 +136,6 @@ static void usbi_log(enum usbi_log_level level, const char *function,
fprintf(stream, "\n");
}
-static void _usb_finalize(void) {
- if (ctx) {
- libusb_exit(ctx);
- ctx = NULL;
- }
-}
-
API_EXPORTED void usb_init(void)
{
int r;
@@ -159,8 +151,6 @@ API_EXPORTED void usb_init(void)
/* usb_set_debug can be called before usb_init */
if (usb_debug)
libusb_set_debug(ctx, 3);
-
- atexit(_usb_finalize);
}
}
--
1.8.5.3

Binary file not shown.

BIN
libusb-compat-0.1.8.tar.bz2 Normal file

Binary file not shown.

View File

@ -1,14 +1,13 @@
Name: libusb Name: libusb
Epoch: 1 Epoch: 1
Version: 0.1.5 Version: 0.1.8
Release: 18 Release: 1
Summary: USB Library Summary: USB Library
License: LGPLv2+ License: LGPLv2+
URL: http://sourceforge.net/projects/libusb/ URL: http://sourceforge.net/projects/libusb/
Source0: http://downloads.sourceforge.net/libusb/libusb-compat-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/libusb/libusb-compat-%{version}.tar.bz2
Patch0: 0000-Link-with-znodelete-to-disallow-unloading.patch Patch0: 0000-Link-with-znodelete-to-disallow-unloading.patch
Patch1: 0001-Revert-use-atexit-to-call-libusb_exit.patch BuildRequires: gcc libusb1-devel libtool
BuildRequires: gcc libusb1-devel
%description %description
This package provides a library that allows userspace access to USB devices. This package provides a library that allows userspace access to USB devices.
@ -24,6 +23,7 @@ This package contains the files needed to develop applications that use libusb-0
%autosetup -n libusb-compat-%{version} -p1 %autosetup -n libusb-compat-%{version} -p1
%build %build
./autogen.sh
%configure --disable-static %configure --disable-static
%make_build %make_build
@ -49,7 +49,10 @@ make check
%{_libdir}/libusb.so %{_libdir}/libusb.so
%changelog %changelog
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.1.5-18 * Mon Jul 17 2023 Kunlin Yang <yangkunlin7@huawei.com> - 1:0.1.8-1
- update from 0.1.5 to 0.1.8
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1:0.1.5-18
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git - DESC: delete -Sgit from %autosetup, and delete BuildRequires git
* Wed Nov 4 2020 lixiaokeng <lixiaokeng@hauwei.com> - 1:0.1.5-17 * Wed Nov 4 2020 lixiaokeng <lixiaokeng@hauwei.com> - 1:0.1.5-17