summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
}