summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-02-16 15:39:42 +0100
committerLars Wendler <polynomial-c@gentoo.org>2018-02-16 15:56:06 +0100
commitd087dca3521231a1e62ed53ab5a72795a0d2f0c9 (patch)
tree784838a5be7abbf039ae7eaa58f9c20e7b0bfe04 /app-emulation
parentapp-office/libreoffice*: Fix Manifests (diff)
downloadgentoo-d087dca3521231a1e62ed53ab5a72795a0d2f0c9.tar.gz
gentoo-d087dca3521231a1e62ed53ab5a72795a0d2f0c9.tar.bz2
gentoo-d087dca3521231a1e62ed53ab5a72795a0d2f0c9.zip
app-emulation/virtualbox: Improved USB device detection.
Closes: https://bugs.gentoo.org/639352 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox/files/virtualbox-detect-usb-fix.patch24
-rw-r--r--app-emulation/virtualbox/virtualbox-5.1.32.ebuild1
-rw-r--r--app-emulation/virtualbox/virtualbox-5.2.6.ebuild1
3 files changed, 26 insertions, 0 deletions
diff --git a/app-emulation/virtualbox/files/virtualbox-detect-usb-fix.patch b/app-emulation/virtualbox/files/virtualbox-detect-usb-fix.patch
new file mode 100644
index 000000000000..bbb28943c129
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-detect-usb-fix.patch
@@ -0,0 +1,24 @@
+Patch by Maciej S. Szmigiero to make the script work even if no USB device was
+plugged in before virtualbox got started.
+
+https://bugs.gentoo.org/639352
+
+--- a/src/VBox/Installer/linux/VBoxCreateUSBNode.sh
++++ b/src/VBox/Installer/linux/VBoxCreateUSBNode.sh
+@@ -32,13 +32,13 @@
+ devpath="`printf "/dev/vboxusb/%.3d/%.3d" $bus $device`"
+ case "$do_remove" in
+ 0)
++ case "$group" in "") group="vboxusers";; esac
++ mkdir /dev/vboxusb -m 0750 2>/dev/null
++ chown root:$group /dev/vboxusb 2>/dev/null
+ if test -n "$class" -a "$class" -eq "$usb_class_hub"
+ then
+ exit 0
+ fi
+- case "$group" in "") group="vboxusers";; esac
+- mkdir /dev/vboxusb -m 0750 2>/dev/null
+- chown root:$group /dev/vboxusb 2>/dev/null
+ mkdir "$devdir" -m 0750 2>/dev/null
+ chown root:$group "$devdir" 2>/dev/null
+ mknod "$devpath" c $1 $2 -m 0660 2>/dev/null
diff --git a/app-emulation/virtualbox/virtualbox-5.1.32.ebuild b/app-emulation/virtualbox/virtualbox-5.1.32.ebuild
index 8c962fe7c1ff..698f0b56ddab 100644
--- a/app-emulation/virtualbox/virtualbox-5.1.32.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.1.32.ebuild
@@ -193,6 +193,7 @@ src_prepare() {
fi
eapply "${WORKDIR}/patches"
+ eapply "${FILESDIR}/${PN}-detect-usb-fix.patch"
eapply_user
}
diff --git a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild b/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
index 1464aa7bcd9d..46c3c3cba7a0 100644
--- a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
@@ -193,6 +193,7 @@ src_prepare() {
fi
eapply "${WORKDIR}/patches"
+ eapply "${FILESDIR}/${PN}-detect-usb-fix.patch"
eapply_user
}