summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2011-05-08 16:01:09 +0000
committerLars Wendler <polynomial-c@gentoo.org>2011-05-08 16:01:09 +0000
commit876abbc9212bd4d1a36b3149471e648a5e8a533e (patch)
tree1e6dcd5daad81c126b98e6bf6ebb5dd7b84a8e41 /app-emulation
parentHandle USB devices better (bug #356215) (diff)
downloadgentoo-2-876abbc9212bd4d1a36b3149471e648a5e8a533e.tar.gz
gentoo-2-876abbc9212bd4d1a36b3149471e648a5e8a533e.tar.bz2
gentoo-2-876abbc9212bd4d1a36b3149471e648a5e8a533e.zip
Handle USB devices better (bug #356215)
(Portage version: 2.2.0_alpha31/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox-bin/ChangeLog10
-rw-r--r--app-emulation/virtualbox-bin/files/10-virtualbox.rules7
-rw-r--r--app-emulation/virtualbox-bin/virtualbox-bin-4.0.6-r1.ebuild (renamed from app-emulation/virtualbox-bin/virtualbox-bin-4.0.6.ebuild)8
3 files changed, 23 insertions, 2 deletions
diff --git a/app-emulation/virtualbox-bin/ChangeLog b/app-emulation/virtualbox-bin/ChangeLog
index daf7c24f26b2..40b8272dc1d3 100644
--- a/app-emulation/virtualbox-bin/ChangeLog
+++ b/app-emulation/virtualbox-bin/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-emulation/virtualbox-bin
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/ChangeLog,v 1.105 2011/04/22 15:43:26 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/ChangeLog,v 1.106 2011/05/08 16:01:09 polynomial-c Exp $
+
+*virtualbox-bin-4.0.6-r1 (08 May 2011)
+
+ 08 May 2011; Lars Wendler <polynomial-c@gentoo.org>
+ +files/10-virtualbox.rules, -virtualbox-bin-4.0.6.ebuild,
+ +virtualbox-bin-4.0.6-r1.ebuild:
+ Handle USB devices through new udev rules as intended by upstream (bug
+ #356215).
*virtualbox-bin-4.0.6 (22 Apr 2011)
diff --git a/app-emulation/virtualbox-bin/files/10-virtualbox.rules b/app-emulation/virtualbox-bin/files/10-virtualbox.rules
new file mode 100644
index 000000000000..a629704f4d76
--- /dev/null
+++ b/app-emulation/virtualbox-bin/files/10-virtualbox.rules
@@ -0,0 +1,7 @@
+# create second tree of USB devices according to
+# http://www.virtualbox.org/ticket/7759#comment:5
+
+SUBSYSTEM=="usb_device", ACTION!="remove", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
+SUBSYSTEM=="usb", ACTION!="remove", ENV{DEVTYPE}=="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
+SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
+SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-4.0.6.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-4.0.6-r1.ebuild
index f1fd6ab1833a..8004b8ac3021 100644
--- a/app-emulation/virtualbox-bin/virtualbox-bin-4.0.6.ebuild
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-4.0.6-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/virtualbox-bin-4.0.6.ebuild,v 1.1 2011/04/22 15:43:26 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/virtualbox-bin-4.0.6-r1.ebuild,v 1.1 2011/05/08 16:01:09 polynomial-c Exp $
EAPI=2
@@ -291,10 +291,16 @@ src_install() {
# set an env-variable for 3rd party tools
echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
doenvd "${T}/90virtualbox"
+
+ insinto /lib/udev/rules.d
+ doins "${FILESDIR}"/10-virtualbox.rules
}
pkg_postinst() {
fdo-mime_desktop_database_update
+
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
elog ""
if ! use headless ; then
elog "To launch VirtualBox just type: \"VirtualBox\""