aboutsummaryrefslogtreecommitdiffstats
path: root/main/usbredir
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-07-23 07:25:48 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-07-23 07:25:48 +0000
commite2b923657caff029ec18b5b9a0e5f490b9acf374 (patch)
tree03dc9f9ea7f6fc3ee45337af6887b8476f1fd910 /main/usbredir
parentaae0e965caf8a5da08003b14a735b34b15735daf (diff)
downloadaports-e2b923657caff029ec18b5b9a0e5f490b9acf374.tar.bz2
aports-e2b923657caff029ec18b5b9a0e5f490b9acf374.tar.xz
main/usbredir: add some patches from upstream
Diffstat (limited to 'main/usbredir')
-rw-r--r--main/usbredir/APKBUILD23
-rw-r--r--main/usbredir/Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch51
-rw-r--r--main/usbredir/usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch24
-rw-r--r--main/usbredir/usbredirtestclient-Fix-a-memory-leak.patch22
4 files changed, 115 insertions, 5 deletions
diff --git a/main/usbredir/APKBUILD b/main/usbredir/APKBUILD
index b56234c30f..5a0c752db8 100644
--- a/main/usbredir/APKBUILD
+++ b/main/usbredir/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=usbredir
pkgver=0.7
-pkgrel=1
+pkgrel=2
pkgdesc="USB network redirection protocol libraries"
url="http://spice-space.org/page/UsbRedir"
arch="all"
@@ -11,7 +11,11 @@ depends_dev="libusb-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-server"
-source="http://spice-space.org/download/usbredir/usbredir-$pkgver.tar.bz2"
+source="http://spice-space.org/download/usbredir/usbredir-$pkgver.tar.bz2
+ Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch
+ usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch
+ usbredirtestclient-Fix-a-memory-leak.patch
+ "
_builddir="$srcdir"/usbredir-$pkgver
prepare() {
@@ -51,6 +55,15 @@ server() {
mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/
}
-md5sums="bc096f160e4ebb848c3a0f0fbf9500fc usbredir-0.7.tar.bz2"
-sha256sums="0a63a0712b5dc62be9cca44f97270fea5d1ec1fe7dde0c11dc74a01c8e2006aa usbredir-0.7.tar.bz2"
-sha512sums="f615fc52f195c7159d16b551f6ecd9426f2aad64222f24b964fbd66fbf59498d80d4d5cf851cc1be9ddd27a9d962afa05970e1379f1ef02e8ac304235e82ad4a usbredir-0.7.tar.bz2"
+md5sums="bc096f160e4ebb848c3a0f0fbf9500fc usbredir-0.7.tar.bz2
+ad93b58e63ba30c1df2f0fc933eb7d74 Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch
+a56584d5298fb196851ccaa7525c19d2 usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch
+227300e89ac76ffcc1e15248408a8a73 usbredirtestclient-Fix-a-memory-leak.patch"
+sha256sums="0a63a0712b5dc62be9cca44f97270fea5d1ec1fe7dde0c11dc74a01c8e2006aa usbredir-0.7.tar.bz2
+9c00ec29047575a1875f0128bf4bf4798c459bb98952e468bab73824d03283e9 Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch
+eae2360f95883c8aa87c1e1a92c532dbd05493d863288fdbf90d437de80cf264 usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch
+dc8c8950f880294cc53373904eb98b0e9ae8cdd802d293bcde007bbe5b4de26a usbredirtestclient-Fix-a-memory-leak.patch"
+sha512sums="f615fc52f195c7159d16b551f6ecd9426f2aad64222f24b964fbd66fbf59498d80d4d5cf851cc1be9ddd27a9d962afa05970e1379f1ef02e8ac304235e82ad4a usbredir-0.7.tar.bz2
+a5b0813a98507b22616341814b997b04a2d0259b75d3a6e39c85d9e85e92a422b29edfbb023749e5dc8a2c680858e6ffc4b3ec5b97c077ab99f57c8bc05c799e Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch
+150ac5c43cf0f353e19da61a9a8abe8400c929fe435f2b6184b1f4cf1998083eda559cce3113e4a493e106036fb69a216652964bf7bef464aa17a84e07105166 usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch
+3bd98d50571f3682359a15401d46dee9ba9f2727ca94ecf47eae826f438fc9a224627510715d0535a08e35e72f97827162704ecdfe0b06a0cc81f0bbd0d19d33 usbredirtestclient-Fix-a-memory-leak.patch"
diff --git a/main/usbredir/Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch b/main/usbredir/Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch
new file mode 100644
index 0000000000..30f2842f51
--- /dev/null
+++ b/main/usbredir/Initialize-usb_redir_hello_header-to-0-in-usbredirparser_init.patch
@@ -0,0 +1,51 @@
+From 95aef51fa3efb7ae5722afc429665f9a0d0af154 Mon Sep 17 00:00:00 2001
+From: Christophe Fergeau <cfergeau@redhat.com>
+Date: Thu, 20 Nov 2014 18:01:27 +0100
+Subject: Initialize usb_redir_hello_header to 0 in usbredirparser_init
+
+This fixes this valgrind warning during virt-viewer startup:
+
+==29279== Uninitialised byte(s) found during client check request
+==29279== at 0x5C85FCD: usbredirparser_queue (usbredirparser.c:1154)
+==29279== by 0x5C83E5F: usbredirparser_init (usbredirparser.c:185)
+==29279== by 0x5A79BA9: usbredirhost_open_full (usbredirhost.c:739)
+==29279== by 0x573E462: spice_usbredir_channel_set_context (channel-usbredir.c:212)
+==29279== by 0x57439CA: channel_new (usb-device-manager.c:738)
+==29279== by 0x3E1980FD34: g_closure_invoke (gclosure.c:768)
+==29279== by 0x3E19821A41: signal_emit_unlocked_R (gsignal.c:3553)
+==29279== by 0x3E1982A180: g_signal_emit_valist (gsignal.c:3309)
+==29279== by 0x3E1982A3AE: g_signal_emit (gsignal.c:3365)
+==29279== by 0x571A1F2: spice_session_channel_new (spice-session.c:1939)
+==29279== by 0x571BAD9: spice_channel_constructed (spice-channel.c:142)
+==29279== by 0x3E198154F3: g_object_new_internal (gobject.c:1814)
+==29279== Address 0x115bc729 is 41 bytes inside a block of size 80 alloc'd
+==29279== at 0x4A06BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
+==29279== by 0x5C85E56: usbredirparser_queue (usbredirparser.c:1132)
+==29279== by 0x5C83E5F: usbredirparser_init (usbredirparser.c:185)
+==29279== by 0x5A79BA9: usbredirhost_open_full (usbredirhost.c:739)
+==29279== by 0x573E462: spice_usbredir_channel_set_context (channel-usbredir.c:212)
+==29279== by 0x57439CA: channel_new (usb-device-manager.c:738)
+==29279== by 0x3E1980FD34: g_closure_invoke (gclosure.c:768)
+==29279== by 0x3E19821A41: signal_emit_unlocked_R (gsignal.c:3553)
+==29279== by 0x3E1982A180: g_signal_emit_valist (gsignal.c:3309)
+==29279== by 0x3E1982A3AE: g_signal_emit (gsignal.c:3365)
+==29279== by 0x571A1F2: spice_session_channel_new (spice-session.c:1939)
+==29279== by 0x571BAD9: spice_channel_constructed (spice-channel.c:142)
+=
+
+diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
+index 2cebada..8076b72 100644
+--- a/usbredirparser/usbredirparser.c
++++ b/usbredirparser/usbredirparser.c
+@@ -161,7 +161,7 @@ void usbredirparser_init(struct usbredirparser *parser_pub,
+ {
+ struct usbredirparser_priv *parser =
+ (struct usbredirparser_priv *)parser_pub;
+- struct usb_redir_hello_header hello;
++ struct usb_redir_hello_header hello = { { 0 }, };
+
+ parser->flags = (flags & ~usbredirparser_fl_no_hello);
+ if (parser->callb.alloc_lock_func) {
+--
+cgit v0.10.2
+
diff --git a/main/usbredir/usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch b/main/usbredir/usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch
new file mode 100644
index 0000000000..9438808971
--- /dev/null
+++ b/main/usbredir/usbredirhost-Add-2798-0001-to-the-do-not-reset-blacklist.patch
@@ -0,0 +1,24 @@
+From 0cb17bd49ce07e4cdc19b88ae7cda4045fcc1362 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Thu, 2 Oct 2014 14:51:59 +0200
+Subject: usbredirhost: Add 2798:0001 to the do-not-reset blacklist
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1115917
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c
+index bbaafa4..ad30722 100644
+--- a/usbredirhost/usbredirhost.c
++++ b/usbredirhost/usbredirhost.c
+@@ -139,6 +139,7 @@ struct usbredirhost_dev_ids {
+
+ static const struct usbredirhost_dev_ids usbredirhost_reset_blacklist[] = {
+ { 0x1210, 0x001c },
++ { 0x2798, 0x0001 },
+ { -1, -1 } /* Terminating Entry */
+ };
+
+--
+cgit v0.10.2
+
diff --git a/main/usbredir/usbredirtestclient-Fix-a-memory-leak.patch b/main/usbredir/usbredirtestclient-Fix-a-memory-leak.patch
new file mode 100644
index 0000000000..a49293b09e
--- /dev/null
+++ b/main/usbredir/usbredirtestclient-Fix-a-memory-leak.patch
@@ -0,0 +1,22 @@
+From bcb6db72d481965bcfdd890d338b54b0f502a486 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
+Date: Fri, 18 Jul 2014 17:27:09 +0200
+Subject: usbredirtestclient: Fix a memory leak
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+diff --git a/usbredirtestclient/usbredirtestclient.c b/usbredirtestclient/usbredirtestclient.c
+index 42b16dc..9546b30 100644
+--- a/usbredirtestclient/usbredirtestclient.c
++++ b/usbredirtestclient/usbredirtestclient.c
+@@ -404,6 +404,7 @@ static int usbredirtestclient_cmdline_ctrl(void)
+ }
+ usbredirparser_send_control_packet(parser, id, &control_packet,
+ data, data_len);
++ free(data);
+ printf("Send control packet with id: %u\n", id);
+ id++;
+ return 1;
+--
+cgit v0.10.2
+