summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2011-05-08 16:00:55 +0000
committerLars Wendler <polynomial-c@gentoo.org>2011-05-08 16:00:55 +0000
commit09a59e73a9a96a9eede4709dec5e86d06248453a (patch)
treea386d9297e7fc70789425ff8dd239f51b5b6ca53 /app-emulation/virtualbox
parentDon't install non-functional udev rules anymore. (diff)
downloadgentoo-2-09a59e73a9a96a9eede4709dec5e86d06248453a.tar.gz
gentoo-2-09a59e73a9a96a9eede4709dec5e86d06248453a.tar.bz2
gentoo-2-09a59e73a9a96a9eede4709dec5e86d06248453a.zip
Handle USB devices better (bug #356215)
(Portage version: 2.2.0_alpha31/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/virtualbox')
-rw-r--r--app-emulation/virtualbox/ChangeLog10
-rw-r--r--app-emulation/virtualbox/files/10-virtualbox.rules7
-rw-r--r--app-emulation/virtualbox/virtualbox-4.0.6-r1.ebuild (renamed from app-emulation/virtualbox/virtualbox-4.0.6.ebuild)14
3 files changed, 27 insertions, 4 deletions
diff --git a/app-emulation/virtualbox/ChangeLog b/app-emulation/virtualbox/ChangeLog
index a67094c89769..a524d5f56e4b 100644
--- a/app-emulation/virtualbox/ChangeLog
+++ b/app-emulation/virtualbox/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-emulation/virtualbox
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/ChangeLog,v 1.68 2011/04/22 16:10:32 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/ChangeLog,v 1.69 2011/05/08 16:00:55 polynomial-c Exp $
+
+*virtualbox-4.0.6-r1 (08 May 2011)
+
+ 08 May 2011; Lars Wendler <polynomial-c@gentoo.org>
+ +files/10-virtualbox.rules, -virtualbox-4.0.6.ebuild,
+ +virtualbox-4.0.6-r1.ebuild:
+ Handle USB devices through new udev rules as intended by upstream (bug
+ #356215).
22 Apr 2011; Lars Wendler <polynomial-c@gentoo.org>
+files/virtualbox-4.0.4-gcc46.patch, virtualbox-4.0.6.ebuild:
diff --git a/app-emulation/virtualbox/files/10-virtualbox.rules b/app-emulation/virtualbox/files/10-virtualbox.rules
new file mode 100644
index 000000000000..8efff249f8fc
--- /dev/null
+++ b/app-emulation/virtualbox/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="/lib/udev/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
+SUBSYSTEM=="usb", ACTION!="remove", ENV{DEVTYPE}=="usb_device", RUN="/lib/udev/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
+SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/lib/udev/VBoxCreateUSBNode.sh --remove $major $minor"
+SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/lib/udev/VBoxCreateUSBNode.sh --remove $major $minor"
diff --git a/app-emulation/virtualbox/virtualbox-4.0.6.ebuild b/app-emulation/virtualbox/virtualbox-4.0.6-r1.ebuild
index 4e8218bf1567..351f59dc2acc 100644
--- a/app-emulation/virtualbox/virtualbox-4.0.6.ebuild
+++ b/app-emulation/virtualbox/virtualbox-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/virtualbox-4.0.6.ebuild,v 1.2 2011/04/22 16:09:06 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/virtualbox-4.0.6-r1.ebuild,v 1.1 2011/05/08 16:00:55 polynomial-c Exp $
EAPI=4
@@ -305,6 +305,12 @@ src_install() {
done
popd &>/dev/null || die
+ # New way of handling USB device nodes for VBox (bug #356215)
+ exeinto /lib/udev
+ doexe VBoxCreateUSBNode.sh
+ insinto /lib/udev/rules.d
+ doins "${FILESDIR}"/10-virtualbox.rules
+
insinto /usr/share/${PN}
if ! use headless && use qt4 ; then
doins -r nls
@@ -321,13 +327,15 @@ src_install() {
java-pkg_regjar "${D}/usr/$(get_libdir)/${PN}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
java-pkg_regso "${D}/usr/$(get_libdir)/${PN}/libvboxjxpcom.so"
fi
-
}
pkg_postinst() {
fdo-mime_desktop_database_update
+
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
if ! use headless && use qt4 ; then
- elog "To launch VirtualBox just type: \"VirtualBox\""
+ elog "To launch VirtualBox just type: \"VirtualBox\"."
fi
elog "You must be in the vboxusers group to use VirtualBox."
elog ""