Compare commits
34 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a3bd6f9ec | ||
|
|
3c2e5bfcc5 | ||
|
|
378cca96bd | ||
|
|
1029314e65 | ||
|
|
48b605aa37 | ||
|
|
3d48eee863 | ||
|
|
200675a582 |
||
|
|
3af8635952 |
||
|
|
6c14dc7303 | ||
|
|
fbcadef2f4 | ||
|
|
8756bdd701 | ||
|
|
abbe292d8b | ||
|
|
31c1f013c1 | ||
|
|
2e36c0bb64 | ||
|
|
60468ae8bb | ||
|
|
8ea6134119 | ||
|
|
07032b3e9c | ||
|
|
1dcfc6520a | ||
|
|
31b51b7c83 | ||
|
|
758eaec579 | ||
|
|
6952413693 | ||
|
|
bf42a855b4 | ||
|
|
91d4c17a0b | ||
|
|
b6b18ebcd9 | ||
|
|
6352bb192a | ||
|
|
5e2dcc2c62 | ||
|
|
e1239cc046 | ||
|
|
36cafe8c9f | ||
|
|
ddf6170c92 | ||
|
|
ac977fad6e | ||
|
|
6719df21e1 | ||
|
|
608ae59ae9 | ||
|
|
99125e46ea | ||
|
|
9fa4de03da |
14 changed files with 257 additions and 370 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -1 +1,9 @@
|
||||||
/libusb-1.0.24.tar.bz2
|
/libusb-1.0.24.tar.bz2
|
||||||
|
/libusb-1.0.25.tar.bz2
|
||||||
|
/libusb-1.0.26.tar.bz2
|
||||||
|
/libusb-1.0.27.tar.bz2
|
||||||
|
/libusb-1.0.27.tar.bz2.asc
|
||||||
|
/libusb-1.0.28.tar.bz2
|
||||||
|
/libusb-1.0.28.tar.bz2.asc
|
||||||
|
/libusb-1.0.29.tar.bz2
|
||||||
|
/libusb-1.0.29.tar.bz2.asc
|
||||||
|
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
From c486d01297a366aae8dcd3f715d0bfd8b995949b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
||||||
Date: Mon, 8 Feb 2021 09:27:20 -0800
|
|
||||||
Subject: [PATCH 1/2] linux_usbfs: Accept sysfs attributes not terminated with
|
|
||||||
newline
|
|
||||||
|
|
||||||
Benjamin Berg reports that some CI systems that simulate sysfs devices
|
|
||||||
are causing libusb to report errors because such systems are not
|
|
||||||
conforming to the sysfs pattern of terminating attribute values with a
|
|
||||||
newline character. Reduce the severity of encountering such
|
|
||||||
non-conforming attibute values from an error that prevents enumeration
|
|
||||||
to a warning message.
|
|
||||||
|
|
||||||
Closes #857
|
|
||||||
|
|
||||||
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
||||||
---
|
|
||||||
libusb/os/linux_usbfs.c | 12 +++++++-----
|
|
||||||
libusb/version_nano.h | 2 +-
|
|
||||||
2 files changed, 8 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
|
|
||||||
index 4882c0f..ebf8cfe 100644
|
|
||||||
--- a/libusb/os/linux_usbfs.c
|
|
||||||
+++ b/libusb/os/linux_usbfs.c
|
|
||||||
@@ -505,7 +505,7 @@ static int read_sysfs_attr(struct libusb_context *ctx,
|
|
||||||
if (fd < 0)
|
|
||||||
return fd;
|
|
||||||
|
|
||||||
- r = read(fd, buf, sizeof(buf));
|
|
||||||
+ r = read(fd, buf, sizeof(buf) - 1);
|
|
||||||
if (r < 0) {
|
|
||||||
r = errno;
|
|
||||||
close(fd);
|
|
||||||
@@ -523,16 +523,18 @@ static int read_sysfs_attr(struct libusb_context *ctx,
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* The kernel does *not* NULL-terminate the string, but every attribute
|
|
||||||
+ /* The kernel does *not* NUL-terminate the string, but every attribute
|
|
||||||
* should be terminated with a newline character. */
|
|
||||||
if (!isdigit(buf[0])) {
|
|
||||||
usbi_err(ctx, "attribute %s doesn't have numeric value?", attr);
|
|
||||||
return LIBUSB_ERROR_IO;
|
|
||||||
} else if (buf[r - 1] != '\n') {
|
|
||||||
- usbi_err(ctx, "attribute %s doesn't end with newline?", attr);
|
|
||||||
- return LIBUSB_ERROR_IO;
|
|
||||||
+ usbi_warn(ctx, "attribute %s doesn't end with newline?", attr);
|
|
||||||
+ } else {
|
|
||||||
+ /* Remove the terminating newline character */
|
|
||||||
+ r--;
|
|
||||||
}
|
|
||||||
- buf[r - 1] = '\0';
|
|
||||||
+ buf[r] = '\0';
|
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
value = strtol(buf, &endptr, 10);
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
From f6d2cb561402c3b6d3627c0eb89e009b503d9067 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
||||||
Date: Sun, 13 Dec 2020 15:49:19 -0800
|
|
||||||
Subject: [PATCH] linux_usbfs: Fix parsing of descriptors for
|
|
||||||
multi-configuration devices
|
|
||||||
|
|
||||||
Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device
|
|
||||||
initialization") introduced a regression for devices with multiple
|
|
||||||
configurations. The logic that verifies the reported length of the
|
|
||||||
configuration descriptors failed to count the length of the
|
|
||||||
configuration descriptor itself and would truncate the actual length by
|
|
||||||
9 bytes, leading to a parsing error for subsequent descriptors.
|
|
||||||
|
|
||||||
Closes #825
|
|
||||||
|
|
||||||
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
||||||
---
|
|
||||||
libusb/os/linux_usbfs.c | 12 ++++++++----
|
|
||||||
libusb/version_nano.h | 2 +-
|
|
||||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
|
|
||||||
index fb2ed53..4d2dc8d 100644
|
|
||||||
--- a/libusb/os/linux_usbfs.c
|
|
||||||
+++ b/libusb/os/linux_usbfs.c
|
|
||||||
@@ -641,7 +641,12 @@ static int seek_to_next_config(struct libusb_context *ctx,
|
|
||||||
uint8_t *buffer, size_t len)
|
|
||||||
{
|
|
||||||
struct usbi_descriptor_header *header;
|
|
||||||
- int offset = 0;
|
|
||||||
+ int offset;
|
|
||||||
+
|
|
||||||
+ /* Start seeking past the config descriptor */
|
|
||||||
+ offset = LIBUSB_DT_CONFIG_SIZE;
|
|
||||||
+ buffer += LIBUSB_DT_CONFIG_SIZE;
|
|
||||||
+ len -= LIBUSB_DT_CONFIG_SIZE;
|
|
||||||
|
|
||||||
while (len > 0) {
|
|
||||||
if (len < 2) {
|
|
||||||
@@ -718,7 +723,7 @@ static int parse_config_descriptors(struct libusb_device *dev)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->sysfs_dir) {
|
|
||||||
- /*
|
|
||||||
+ /*
|
|
||||||
* In sysfs wTotalLength is ignored, instead the kernel returns a
|
|
||||||
* config descriptor with verified bLength fields, with descriptors
|
|
||||||
* with an invalid bLength removed.
|
|
||||||
@@ -727,8 +732,7 @@ static int parse_config_descriptors(struct libusb_device *dev)
|
|
||||||
int offset;
|
|
||||||
|
|
||||||
if (num_configs > 1 && idx < num_configs - 1) {
|
|
||||||
- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE,
|
|
||||||
- remaining - LIBUSB_DT_CONFIG_SIZE);
|
|
||||||
+ offset = seek_to_next_config(ctx, buffer, remaining);
|
|
||||||
if (offset < 0)
|
|
||||||
return offset;
|
|
||||||
sysfs_config_len = (uint16_t)offset;
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
||||||
|
|
@ -1,220 +0,0 @@
|
||||||
From f38f09da98acc63966b65b72029b1f7f81166bef Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
||||||
Date: Mon, 8 Feb 2021 11:56:13 -0800
|
|
||||||
Subject: [PATCH 2/2] linux_usbfs: Gracefully handle buggy devices with a
|
|
||||||
configuration 0
|
|
||||||
|
|
||||||
The USB spec states that a configuration value of 0 is reserved and is
|
|
||||||
used to indicate the device in not configured (e.g. is in the address
|
|
||||||
state). Unfortunately some devices do exist that violate this and use 0
|
|
||||||
as the bConfigurationValue of the configuration descriptor.
|
|
||||||
|
|
||||||
Improve how the Linux backend handles such non-conformant devices by
|
|
||||||
adding special handling around the configuration value 0. Most devices
|
|
||||||
will not require this special handling, but for those that do there is
|
|
||||||
no way to distinguish between the device being unconfigured and using
|
|
||||||
configuration 0.
|
|
||||||
|
|
||||||
Closes #850
|
|
||||||
|
|
||||||
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
||||||
---
|
|
||||||
libusb/os/linux_usbfs.c | 94 ++++++++++++++++++++++++++---------------
|
|
||||||
libusb/version_nano.h | 2 +-
|
|
||||||
2 files changed, 60 insertions(+), 36 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
|
|
||||||
index ebf8cfe..3a1894c 100644
|
|
||||||
--- a/libusb/os/linux_usbfs.c
|
|
||||||
+++ b/libusb/os/linux_usbfs.c
|
|
||||||
@@ -128,7 +128,7 @@ struct linux_device_priv {
|
|
||||||
void *descriptors;
|
|
||||||
size_t descriptors_len;
|
|
||||||
struct config_descriptor *config_descriptors;
|
|
||||||
- uint8_t active_config; /* cache val for !sysfs_available */
|
|
||||||
+ int active_config; /* cache val for !sysfs_available */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct linux_device_handle_priv {
|
|
||||||
@@ -169,6 +169,21 @@ struct linux_transfer_priv {
|
|
||||||
int iso_packet_offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
+static int dev_has_config0(struct libusb_device *dev)
|
|
||||||
+{
|
|
||||||
+ struct linux_device_priv *priv = usbi_get_device_priv(dev);
|
|
||||||
+ struct config_descriptor *config;
|
|
||||||
+ uint8_t idx;
|
|
||||||
+
|
|
||||||
+ for (idx = 0; idx < dev->device_descriptor.bNumConfigurations; idx++) {
|
|
||||||
+ config = &priv->config_descriptors[idx];
|
|
||||||
+ if (config->desc->bConfigurationValue == 0)
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int get_usbfs_fd(struct libusb_device *dev, mode_t mode, int silent)
|
|
||||||
{
|
|
||||||
struct libusb_context *ctx = DEVICE_CTX(dev);
|
|
||||||
@@ -574,22 +589,12 @@ static int sysfs_scan_device(struct libusb_context *ctx, const char *devname)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* read the bConfigurationValue for a device */
|
|
||||||
-static int sysfs_get_active_config(struct libusb_device *dev, uint8_t *config)
|
|
||||||
+static int sysfs_get_active_config(struct libusb_device *dev, int *config)
|
|
||||||
{
|
|
||||||
struct linux_device_priv *priv = usbi_get_device_priv(dev);
|
|
||||||
- int ret, tmp;
|
|
||||||
-
|
|
||||||
- ret = read_sysfs_attr(DEVICE_CTX(dev), priv->sysfs_dir, "bConfigurationValue",
|
|
||||||
- UINT8_MAX, &tmp);
|
|
||||||
- if (ret < 0)
|
|
||||||
- return ret;
|
|
||||||
|
|
||||||
- if (tmp == -1)
|
|
||||||
- tmp = 0; /* unconfigured */
|
|
||||||
-
|
|
||||||
- *config = (uint8_t)tmp;
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
+ return read_sysfs_attr(DEVICE_CTX(dev), priv->sysfs_dir, "bConfigurationValue",
|
|
||||||
+ UINT8_MAX, config);
|
|
||||||
}
|
|
||||||
|
|
||||||
int linux_get_device_address(struct libusb_context *ctx, int detached,
|
|
||||||
@@ -765,6 +770,9 @@ static int parse_config_descriptors(struct libusb_device *dev)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (config_desc->bConfigurationValue == 0)
|
|
||||||
+ usbi_warn(ctx, "device has configuration 0");
|
|
||||||
+
|
|
||||||
priv->config_descriptors[idx].desc = config_desc;
|
|
||||||
priv->config_descriptors[idx].actual_len = config_len;
|
|
||||||
|
|
||||||
@@ -798,7 +806,7 @@ static int op_get_active_config_descriptor(struct libusb_device *dev,
|
|
||||||
{
|
|
||||||
struct linux_device_priv *priv = usbi_get_device_priv(dev);
|
|
||||||
void *config_desc;
|
|
||||||
- uint8_t active_config;
|
|
||||||
+ int active_config;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
if (priv->sysfs_dir) {
|
|
||||||
@@ -810,12 +818,12 @@ static int op_get_active_config_descriptor(struct libusb_device *dev,
|
|
||||||
active_config = priv->active_config;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (active_config == 0) {
|
|
||||||
+ if (active_config == -1) {
|
|
||||||
usbi_err(DEVICE_CTX(dev), "device unconfigured");
|
|
||||||
return LIBUSB_ERROR_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
- r = op_get_config_descriptor_by_value(dev, active_config, &config_desc);
|
|
||||||
+ r = op_get_config_descriptor_by_value(dev, (uint8_t)active_config, &config_desc);
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
@@ -863,17 +871,26 @@ static int usbfs_get_active_config(struct libusb_device *dev, int fd)
|
|
||||||
|
|
||||||
/* we hit this error path frequently with buggy devices :( */
|
|
||||||
usbi_warn(DEVICE_CTX(dev), "get configuration failed, errno=%d", errno);
|
|
||||||
+
|
|
||||||
+ /* assume the current configuration is the first one if we have
|
|
||||||
+ * the configuration descriptors, otherwise treat the device
|
|
||||||
+ * as unconfigured. */
|
|
||||||
+ if (priv->config_descriptors)
|
|
||||||
+ priv->active_config = (int)priv->config_descriptors[0].desc->bConfigurationValue;
|
|
||||||
+ else
|
|
||||||
+ priv->active_config = -1;
|
|
||||||
} else if (active_config == 0) {
|
|
||||||
- /* some buggy devices have a configuration 0, but we're
|
|
||||||
- * reaching into the corner of a corner case here, so let's
|
|
||||||
- * not support buggy devices in these circumstances.
|
|
||||||
- * stick to the specs: a configuration value of 0 means
|
|
||||||
- * unconfigured. */
|
|
||||||
- usbi_warn(DEVICE_CTX(dev), "active cfg 0? assuming unconfigured device");
|
|
||||||
+ if (dev_has_config0(dev)) {
|
|
||||||
+ /* some buggy devices have a configuration 0, but we're
|
|
||||||
+ * reaching into the corner of a corner case here. */
|
|
||||||
+ priv->active_config = 0;
|
|
||||||
+ } else {
|
|
||||||
+ priv->active_config = -1;
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ priv->active_config = (int)active_config;
|
|
||||||
}
|
|
||||||
|
|
||||||
- priv->active_config = active_config;
|
|
||||||
-
|
|
||||||
return LIBUSB_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1004,9 +1021,9 @@ static int initialize_device(struct libusb_device *dev, uint8_t busnum,
|
|
||||||
usbi_warn(ctx, "Missing rw usbfs access; cannot determine "
|
|
||||||
"active configuration descriptor");
|
|
||||||
if (priv->config_descriptors)
|
|
||||||
- priv->active_config = priv->config_descriptors[0].desc->bConfigurationValue;
|
|
||||||
+ priv->active_config = (int)priv->config_descriptors[0].desc->bConfigurationValue;
|
|
||||||
else
|
|
||||||
- priv->active_config = 0; /* No config dt */
|
|
||||||
+ priv->active_config = -1; /* No config dt */
|
|
||||||
|
|
||||||
return LIBUSB_SUCCESS;
|
|
||||||
}
|
|
||||||
@@ -1428,22 +1445,27 @@ static int op_get_configuration(struct libusb_device_handle *handle,
|
|
||||||
uint8_t *config)
|
|
||||||
{
|
|
||||||
struct linux_device_priv *priv = usbi_get_device_priv(handle->dev);
|
|
||||||
+ int active_config;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
if (priv->sysfs_dir) {
|
|
||||||
- r = sysfs_get_active_config(handle->dev, config);
|
|
||||||
+ r = sysfs_get_active_config(handle->dev, &active_config);
|
|
||||||
} else {
|
|
||||||
struct linux_device_handle_priv *hpriv = usbi_get_device_handle_priv(handle);
|
|
||||||
|
|
||||||
r = usbfs_get_active_config(handle->dev, hpriv->fd);
|
|
||||||
if (r == LIBUSB_SUCCESS)
|
|
||||||
- *config = priv->active_config;
|
|
||||||
+ active_config = priv->active_config;
|
|
||||||
}
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
- if (*config == 0)
|
|
||||||
- usbi_err(HANDLE_CTX(handle), "device unconfigured");
|
|
||||||
+ if (active_config == -1) {
|
|
||||||
+ usbi_warn(HANDLE_CTX(handle), "device unconfigured");
|
|
||||||
+ active_config = 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ *config = (uint8_t)active_config;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1467,11 +1489,13 @@ static int op_set_configuration(struct libusb_device_handle *handle, int config)
|
|
||||||
return LIBUSB_ERROR_OTHER;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (config == -1)
|
|
||||||
- config = 0;
|
|
||||||
+ /* if necessary, update our cached active config descriptor */
|
|
||||||
+ if (!priv->sysfs_dir) {
|
|
||||||
+ if (config == 0 && !dev_has_config0(handle->dev))
|
|
||||||
+ config = -1;
|
|
||||||
|
|
||||||
- /* update our cached active config descriptor */
|
|
||||||
- priv->active_config = (uint8_t)config;
|
|
||||||
+ priv->active_config = config;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return LIBUSB_SUCCESS;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
||||||
15
changelog
Normal file
15
changelog
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
* Fri Sep 30 2022 Kate Hsuan <hpa@redhat.com> 1.0.26-1
|
||||||
|
- Update to 1.0.26
|
||||||
|
|
||||||
|
* Wed Feb 02 2022 Benjamin Berg <bberg@redhat.com> 1.0.25-1
|
||||||
|
- Update to 1.0.25
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.24-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.24-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 19 18:47:55 CET 2021 Benjamin Berg <bberg@redhat.com> - 1.0.24-3
|
||||||
|
- New libusb1 package replacing libusbx
|
||||||
|
Resolves: #1918269
|
||||||
|
|
@ -3,4 +3,10 @@ product_versions:
|
||||||
- fedora-*
|
- fedora-*
|
||||||
decision_context: bodhi_update_push_testing
|
decision_context: bodhi_update_push_testing
|
||||||
rules:
|
rules:
|
||||||
- !PassingTestCaseRule {test_case_name: dist.depcheck}
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- fedora-*
|
||||||
|
decision_context: bodhi_update_push_stable
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||||
|
|
|
||||||
117
libusb1.keyring
Normal file
117
libusb1.keyring
Normal file
|
|
@ -0,0 +1,117 @@
|
||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
Comment: Hostname:
|
||||||
|
Version: Hockeypuck 2.2
|
||||||
|
|
||||||
|
xsFNBF7yPL0BEADQc/2dx8H7a7r1SGYph5hmkszs0O9V/43m8XhNnbnFraXjmbEv
|
||||||
|
xm2wE6AuR301mjAqYSt/mphmH54z4GBbgmLBrK8TGdhlK0K11PeSudRN4jsLs+U3
|
||||||
|
ErtkAHODmzyg7QiW3GWudP/lJQRSqNBoadeOdOsKMoJxm7T2a9fyyf8FR/FfShjv
|
||||||
|
NB62jSWq0x0WnglI/V/ZOi/mOnqoggCoWXLzwqbKasicvfNsTPJIsjiu24US6mif
|
||||||
|
nRllMWr/6aHyCOX6+x6PsQ35NF5C5B7b0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lka9y4YISw
|
||||||
|
3fbGjfOSNXab2R5xEkHX8fF/u8Xs897kVIi/imRrVSgmzf3X4QdTLQJ2MdhH02lh
|
||||||
|
lYdkvecAEQEAAcLDqwQYAQgAIBYhBMaBhzebI96e/EZlHiyA/1bGgwoOBQJe8j3J
|
||||||
|
AhsCAj8JECyA/1bGgwoOwXMgBBkBCAAdFiEEnH6pSTnGnE+8Pb+oqgY5B577YbkF
|
||||||
|
Al7yPckACgkQqgY5B577YbkUig/3XOT/88S0edOfgNfFtntAYCj4w3NztXiRClFQ
|
||||||
|
FohRupjP7h6y24VgKD1I0595fCGs9YKl9MiI9PAxNUVdKD6WOcjrRL6B8eMhxle4
|
||||||
|
MefL4UK5kvUKTn2QqE8GgwAqgFkn0wbdOOxPVmGtJ3tuS5Hok9nn9RHUkeMKvOeR
|
||||||
|
Hx38NyozjZxoUJ+3gFngliM1BKlR3Dq1XlvXz/7fWKzl3AkneLHfca/0yzB67qvs
|
||||||
|
3G6q0btyZqjp0GSrGSVUnqpK670b1l6DQd6raej76RPq8OsxP1DkfwVsyNQV/EN0
|
||||||
|
atj+MsruUPBbesZ5oP/XFrQkjjDDIGhbmg0xB9Bxp8v+y9EiFB9LC4nmLvw9gn2c
|
||||||
|
K3j1JXdiKUVWzPMKdUrZ/Y5lksrn6a326zDOJZwT4/XYiclgM+vKQb1RWdXvbz3o
|
||||||
|
TpSyeCdKZQ845aNM1Q8AHJ2NVlGBbiMsFTmKnM/wcU8+6saWflF0JeiNgal0wcGv
|
||||||
|
mkossrOVQZh10959HT8Eb4Vzgf0MD4YATmM6CbGxv1tuDxhK12e8MDsI7wulM5OD
|
||||||
|
LWpb3zwgLU/O3IeinbRlr30lhvnTzgdYx5CgYqUYUm/MSb0+vWpr67smoBbRpWi4
|
||||||
|
j2zcTtay/iNL9pFCLFegkJtXwLehh8sgEj28c/jOH2XEfOgEEniVM57dFONmn5ba
|
||||||
|
3xTKRSS8D/44K3JJSPi2urzO+wXtcbZ1QSWypTV8dI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
|
NtLfN6M7WpF42uz7PLJP60wdNPYDHYdSkGiRs9KNPpmBY2PldkkA9IX1L5/TvcPR
|
||||||
|
mvzTnVVTlycj5N8bMrU4uIBxU3FwozpyNIfjQxRYXMe5GOU2eqtVYtxgeN7wqGZ8
|
||||||
|
dFzovMtHTKPPhEJ8uFSd//npnP6QMZgQA53Heaif9EbyrXJBlzRTPfGvr61XyNQk
|
||||||
|
5p5PG8RVrp3CdwEGZrYEkh5U4WR+C7SPZccMApzKGcb3
|
||||||
|
=sExt
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
99
libusb1.spec
99
libusb1.spec
|
|
@ -1,20 +1,32 @@
|
||||||
|
%bcond mingw %[0%{?fedora} && !0%{?flatpak}]
|
||||||
|
|
||||||
Summary: Library for accessing USB devices
|
Summary: Library for accessing USB devices
|
||||||
Name: libusb1
|
Name: libusb1
|
||||||
Version: 1.0.24
|
Version: 1.0.29
|
||||||
Release: 3%{?dist}
|
Release: %autorelease
|
||||||
Source0: https://github.com/libusb/libusb/releases/download/v%{version}/libusb-%{version}.tar.bz2
|
Source0: https://github.com/libusb/libusb/releases/download/v%{version}/libusb-%{version}.tar.bz2
|
||||||
License: LGPLv2+
|
Source1: https://github.com/libusb/libusb/releases/download/v%{version}/libusb-%{version}.tar.bz2.asc
|
||||||
|
Source2: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xc68187379b23de9efc46651e2c80ff56c6830a0e#/%{name}.keyring
|
||||||
|
License: LGPL-2.1-or-later
|
||||||
URL: http://libusb.info
|
URL: http://libusb.info
|
||||||
BuildRequires: systemd-devel doxygen libtool
|
BuildRequires: systemd-devel doxygen libtool
|
||||||
|
BuildRequires: umockdev-devel
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
BuildRequires: gnupg2
|
||||||
# libusbx was removed in F34
|
# libusbx was removed in F34
|
||||||
Provides: libusbx = %{version}-%{release}
|
Provides: libusbx = %{version}-%{release}
|
||||||
Obsoletes: libusbx < %{version}-%{release}
|
Obsoletes: libusbx < %{version}-%{release}
|
||||||
|
|
||||||
Patch001: 0001-linux_usbfs-Accept-sysfs-attributes-not-terminated-w.patch
|
%if %{with mingw}
|
||||||
Patch002: 0001-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch
|
BuildRequires: mingw32-filesystem >= 95
|
||||||
Patch003: 0002-linux_usbfs-Gracefully-handle-buggy-devices-with-a-c.patch
|
BuildRequires: mingw32-gcc-c++
|
||||||
|
BuildRequires: mingw64-filesystem >= 95
|
||||||
|
BuildRequires: mingw64-gcc-c++
|
||||||
|
# mingw-libusbx was removed in F42
|
||||||
|
Provides: mingw-libusbx = %{version}-%{release}
|
||||||
|
Obsoletes: mingw-libusbx < %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides a way for applications to access USB devices.
|
This package provides a way for applications to access USB devices.
|
||||||
|
|
@ -58,14 +70,40 @@ Obsoletes: libusbx-tests-examples < %{version}-%{release}
|
||||||
%description tests-examples
|
%description tests-examples
|
||||||
This package contains tests and examples for %{name}.
|
This package contains tests and examples for %{name}.
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
%package -n mingw32-%{name}
|
||||||
|
Summary: MinGW Windows %{name} library
|
||||||
|
Provides: mingw32-libusbx = %{version}-%{release}
|
||||||
|
Obsoletes: mingw32-libusbx < %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n mingw32-%{name}
|
||||||
|
MinGW Windows %{name} library.
|
||||||
|
|
||||||
|
%package -n mingw64-%{name}
|
||||||
|
Summary: MinGW Windows %{name} library
|
||||||
|
Provides: mingw64-libusbx = %{version}-%{release}
|
||||||
|
Obsoletes: mingw64-libusbx < %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n mingw64-%{name}
|
||||||
|
MinGW Windows %{name} library.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||||
%autosetup -p1 -n libusb-%{version}
|
%autosetup -p1 -n libusb-%{version}
|
||||||
chmod -x examples/*.c
|
chmod -x examples/*.c
|
||||||
mkdir -p m4
|
mkdir -p m4
|
||||||
|
sed -i '/AM_LDFLAGS = -static/d' tests/Makefile.am
|
||||||
|
autoscan
|
||||||
|
aclocal
|
||||||
|
autoconf
|
||||||
|
automake --add-missing
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
mkdir %{_target_os}
|
||||||
|
pushd %{_target_os}
|
||||||
|
%define _configure ../configure
|
||||||
%configure --disable-static --enable-examples-build
|
%configure --disable-static --enable-examples-build
|
||||||
%{make_build}
|
%{make_build}
|
||||||
pushd doc
|
pushd doc
|
||||||
|
|
@ -74,12 +112,24 @@ popd
|
||||||
pushd tests
|
pushd tests
|
||||||
make
|
make
|
||||||
popd
|
popd
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
# MinGW build
|
||||||
|
%mingw_configure --disable-static
|
||||||
|
%mingw_make_build
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
pushd %{_target_os}
|
||||||
%{make_install}
|
%{make_install}
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||||
|
install -m 755 tests/.libs/init_context $RPM_BUILD_ROOT%{_bindir}/libusb-test-init_context
|
||||||
|
install -m 755 tests/.libs/set_option $RPM_BUILD_ROOT%{_bindir}/libusb-test-set_option
|
||||||
install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
||||||
|
install -m 755 tests/.libs/stress_mt $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress_mt
|
||||||
|
install -m 755 tests/.libs/umockdev $RPM_BUILD_ROOT%{_bindir}/libusb-test-umockdev
|
||||||
install -m 755 examples/.libs/testlibusb \
|
install -m 755 examples/.libs/testlibusb \
|
||||||
$RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
$RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
||||||
# Some examples are very device-specific / require specific hw and miss --help
|
# Some examples are very device-specific / require specific hw and miss --help
|
||||||
|
|
@ -89,13 +139,23 @@ for i in fxload listdevs xusb; do
|
||||||
$RPM_BUILD_ROOT%{_bindir}/libusb-example-$i
|
$RPM_BUILD_ROOT%{_bindir}/libusb-example-$i
|
||||||
done
|
done
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
%mingw_make_install
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
pushd %{_target_os}
|
||||||
LD_LIBRARY_PATH=libusb/.libs ldd $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
LD_LIBRARY_PATH=libusb/.libs ldd $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
||||||
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-init_context
|
||||||
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-set_option
|
||||||
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
||||||
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-umockdev
|
||||||
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
||||||
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
@ -112,17 +172,36 @@ LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
||||||
%{_libdir}/pkgconfig/libusb-1.0.pc
|
%{_libdir}/pkgconfig/libusb-1.0.pc
|
||||||
|
|
||||||
%files devel-doc
|
%files devel-doc
|
||||||
%doc doc/api-1.0 examples/*.c
|
%doc %{_target_os}/doc/api-1.0 examples/*.c
|
||||||
|
|
||||||
%files tests-examples
|
%files tests-examples
|
||||||
%{_bindir}/libusb-example-fxload
|
%{_bindir}/libusb-example-fxload
|
||||||
%{_bindir}/libusb-example-listdevs
|
%{_bindir}/libusb-example-listdevs
|
||||||
%{_bindir}/libusb-example-xusb
|
%{_bindir}/libusb-example-xusb
|
||||||
|
%{_bindir}/libusb-test-init_context
|
||||||
|
%{_bindir}/libusb-test-set_option
|
||||||
%{_bindir}/libusb-test-stress
|
%{_bindir}/libusb-test-stress
|
||||||
|
%{_bindir}/libusb-test-stress_mt
|
||||||
|
%{_bindir}/libusb-test-umockdev
|
||||||
%{_bindir}/libusb-test-libusb
|
%{_bindir}/libusb-test-libusb
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
%files -n mingw32-libusb1
|
||||||
|
%license COPYING
|
||||||
|
%doc AUTHORS README ChangeLog
|
||||||
|
%{mingw32_bindir}/libusb-1.0.dll
|
||||||
|
%{mingw32_includedir}/libusb-1.0
|
||||||
|
%{mingw32_libdir}/*.dll.a
|
||||||
|
%{mingw32_libdir}/pkgconfig/libusb-1.0.pc
|
||||||
|
|
||||||
|
%files -n mingw64-libusb1
|
||||||
|
%license COPYING
|
||||||
|
%doc AUTHORS README ChangeLog
|
||||||
|
%{mingw64_bindir}/libusb-1.0.dll
|
||||||
|
%{mingw64_includedir}/libusb-1.0
|
||||||
|
%{mingw64_libdir}/*.dll.a
|
||||||
|
%{mingw64_libdir}/pkgconfig/libusb-1.0.pc
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Jan 19 18:47:55 CET 2021 Benjamin Berg <bberg@redhat.com> - 1.0.24-3
|
%autochangelog
|
||||||
- New libusb1 package replacing libusbx
|
|
||||||
Resolves: #1918269
|
|
||||||
|
|
|
||||||
11
plans/integration.fmf
Normal file
11
plans/integration.fmf
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
summary: Basic smoke test
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
prepare:
|
||||||
|
- name: packages
|
||||||
|
how: install
|
||||||
|
package:
|
||||||
|
- glibc-common
|
||||||
|
- libusb1-tests-examples
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
||||||
SHA512 (libusb-1.0.24.tar.bz2) = 5aea36a530aaa15c6dd656d0ed3ce204522c9946d8d39ffbb290dab4a98cda388a2598da4995123d1032324056090bd429e702459626d3e8d7daeebc4e7ff3dc
|
SHA512 (libusb-1.0.29.tar.bz2) = 04f8bda8197c9ecf52709609b8fbfea762fd82ddb5cde153a7630b0e8ed557d42da8cbc44f2f593aa22fdd0762e16716300565d67adb0c5240d7f3723321f690
|
||||||
|
SHA512 (libusb-1.0.29.tar.bz2.asc) = 57e12d3a58d8ac418e28f6d83a7cb8c0268ed5d2752707796aa5bf1f8bcf2a8083aa664d36ffcdcc96da62153afa792728662fa8230be9e2865d4a37003e199d
|
||||||
|
|
|
||||||
6
tests/integration/main.fmf
Normal file
6
tests/integration/main.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
summary:
|
||||||
|
Test for libusb1
|
||||||
|
test: bash ./run.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -4,5 +4,6 @@ set -e
|
||||||
|
|
||||||
ldd /usr/bin/libusb-test-stress
|
ldd /usr/bin/libusb-test-stress
|
||||||
/usr/bin/libusb-test-stress
|
/usr/bin/libusb-test-stress
|
||||||
|
/usr/bin/libusb-test-umockdev
|
||||||
/usr/bin/libusb-test-libusb
|
/usr/bin/libusb-test-libusb
|
||||||
/usr/bin/libusb-example-listdevs
|
/usr/bin/libusb-example-listdevs
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
roles:
|
|
||||||
- role: standard-test-source
|
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
required_packages:
|
|
||||||
- git
|
|
||||||
- role: standard-test-basic
|
|
||||||
tags:
|
|
||||||
- atomic
|
|
||||||
- classic
|
|
||||||
tests:
|
|
||||||
- test:
|
|
||||||
dir: .
|
|
||||||
run: run.sh
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue