[arch-commits] Commit in libusb/repos/testing-x86_64 (3 files)

David Runge dvzrv at archlinux.org
Sun Jan 10 19:24:39 UTC 2021


    Date: Sunday, January 10, 2021 @ 19:24:39
  Author: dvzrv
Revision: 406059

archrelease: copy trunk to testing-x86_64

Added:
  libusb/repos/testing-x86_64/PKGBUILD
    (from rev 406058, libusb/trunk/PKGBUILD)
  libusb/repos/testing-x86_64/libusb-1.0.24-descriptor_parsing.patch
    (from rev 406058, libusb/trunk/libusb-1.0.24-descriptor_parsing.patch)
Deleted:
  libusb/repos/testing-x86_64/PKGBUILD

----------------------------------------+
 PKGBUILD                               |   87 ++++++++++++++++---------------
 libusb-1.0.24-descriptor_parsing.patch |   37 +++++++++++++
 2 files changed, 83 insertions(+), 41 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-01-10 19:24:30 UTC (rev 406058)
+++ PKGBUILD	2021-01-10 19:24:39 UTC (rev 406059)
@@ -1,41 +0,0 @@
-# Maintainer: David Runge <dvzrv at archlinux.org>
-# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
-# Contributor: Tobias Powalowski <tpowa at archlinux.org>
-
-pkgname=libusb
-pkgver=1.0.24
-pkgrel=1
-pkgdesc="Library that provides generic access to USB devices"
-arch=('x86_64')
-url="https://libusb.info/"
-license=('LGPL2.1')
-depends=('glibc')
-makedepends=('systemd')
-provides=('libusb-1.0.so')
-source=("https://github.com/${pkgname}/${pkgname}/releases/download/v$pkgver/${pkgname}-$pkgver.tar.bz2")
-sha512sums=('5aea36a530aaa15c6dd656d0ed3ce204522c9946d8d39ffbb290dab4a98cda388a2598da4995123d1032324056090bd429e702459626d3e8d7daeebc4e7ff3dc')
-b2sums=('f6188b5af1225cf8b6d1486b6efcf48e837ee4f2e3592adab3ae6aae0a74a67aa54f40f0dd547f951a194d40954f2ee33acf741d2eee0b8449ce64f2edcf1018')
-
-prepare() {
-  cd "$pkgname-$pkgver"
-  autoreconf -vfi
-}
-
-build() {
-  cd "$pkgname-$pkgver"
-  ./configure --prefix=/usr
-  make
-}
-
-check() {
-  cd "$pkgname-$pkgver"
-  make -k check
-}
-
-package () {
-  depends+=('libudev.so')
-  cd "$pkgname-$pkgver"
-  make DESTDIR="$pkgdir" install
-  install -vDm 644 {AUTHORS,ChangeLog,README} \
-    -t "${pkgdir}/usr/share/doc/${pkgname}/"
-}

Copied: libusb/repos/testing-x86_64/PKGBUILD (from rev 406058, libusb/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-01-10 19:24:39 UTC (rev 406059)
@@ -0,0 +1,46 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Contributor: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=libusb
+pkgver=1.0.24
+pkgrel=2
+pkgdesc="Library that provides generic access to USB devices"
+arch=('x86_64')
+url="https://libusb.info/"
+license=('LGPL2.1')
+depends=('glibc')
+makedepends=('systemd')
+provides=('libusb-1.0.so')
+source=("https://github.com/${pkgname}/${pkgname}/releases/download/v$pkgver/${pkgname}-$pkgver.tar.bz2"
+        "${pkgname}-1.0.24-descriptor_parsing.patch"
+)
+sha512sums=('5aea36a530aaa15c6dd656d0ed3ce204522c9946d8d39ffbb290dab4a98cda388a2598da4995123d1032324056090bd429e702459626d3e8d7daeebc4e7ff3dc'
+            '588624bdcce2ff3ef98ab28b98b00eb48f16ef9e94033f29aaf8c6d6cb3e56d1299ea59f63b0d7a485955fa85182db0db5c043ceca24345c41f40311483606e2')
+b2sums=('f6188b5af1225cf8b6d1486b6efcf48e837ee4f2e3592adab3ae6aae0a74a67aa54f40f0dd547f951a194d40954f2ee33acf741d2eee0b8449ce64f2edcf1018'
+        '65efafcaa87cc75000adb0f6fae6c5fc33d72727bacde327bae5e5e68162783c8203f92ecd3de2f7e8a9869f587ea76a0b1a054369a15cd9b3cec8f7fc44036f')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  patch -Np1 -i ../"${pkgname}-1.0.24-descriptor_parsing.patch"
+  autoreconf -vfi
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  ./configure --prefix=/usr
+  make
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  make -k check
+}
+
+package () {
+  depends+=('libudev.so')
+  cd "$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
+  install -vDm 644 {AUTHORS,ChangeLog,README} \
+    -t "${pkgdir}/usr/share/doc/${pkgname}/"
+}

Copied: libusb/repos/testing-x86_64/libusb-1.0.24-descriptor_parsing.patch (from rev 406058, libusb/trunk/libusb-1.0.24-descriptor_parsing.patch)
===================================================================
--- libusb-1.0.24-descriptor_parsing.patch	                        (rev 0)
+++ libusb-1.0.24-descriptor_parsing.patch	2021-01-10 19:24:39 UTC (rev 406059)
@@ -0,0 +1,37 @@
+diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
+index fb2ed53a..4d2dc8d6 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;



More information about the arch-commits mailing list