Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356215 - app-emulation/virtualbox-modules-4.0.4 udev usb access changed upstream
Summary: app-emulation/virtualbox-modules-4.0.4 udev usb access changed upstream
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 356217
Blocks:
  Show dependency tree
 
Reported: 2011-02-23 13:59 UTC by Mao PU
Modified: 2012-04-23 14:55 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
diff for the ebuild itself (virtualbox-modules-4.0.4-r1-7759.patch,1.21 KB, patch)
2011-02-23 14:04 UTC, Mao PU
Details | Diff
my nonworking udev rules for vbox (10-virtualbox.rules,724 bytes, text/plain)
2011-05-03 16:57 UTC, Kamen Dokov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mao PU 2011-02-23 13:59:35 UTC
If no usbfs (DEPRECATED) is present but usb devices are handled through udev, the provided udev-rules conflict with other rules. The current solution sets all usb devices to root:vboxusers which might not be desirable for all devices.

The problem has been adressed upstream and a solution is release in VirtualBox 4.x (see http://www.virtualbox.org/wiki/Changelog, http://www.virtualbox.org/ticket/5345, http://www.virtualbox.org/ticket/7759)

Reproducible: Always

Steps to Reproduce:
1. install app-emulation/virtualbox-modules-4.0.4 and app-emulation/virtualbox-bin-4.0.4
2. uncomment udev-rules in /etc/udev/rules.d/10-virtualbox.rules and reload udev (reboot host or udevadm control --reload-rules)
3. start guest 

Actual Results:  
click menu->devices->USB... : all devices are grayed out

Expected Results:  
devices should be selectable for usage in host system.
Comment 1 Mao PU 2011-02-23 14:04:18 UTC
Created attachment 263625 [details, diff]
diff for the ebuild itself

The change creates udev rules for second USB device tree as provided by the upstream install script. Since this has been handled within the ebuild, it needs to be changed accordingly. 

If dependency to app-emulation/virtualbox* would be added, $VBOX_APP_HOME could be used for path and it might be a good idea, to include VBoxCreateUSBNode.sh -script into virtualbox-modules. But since the udev rules are commented out, it should be alright for the moment.
Comment 2 Kamen Dokov 2011-04-28 10:06:31 UTC
I just enabled deprecated /proc/bus/usb into kernel to be able to use usb in virtualbox :)
Comment 3 Mao PU 2011-05-02 07:14:17 UTC
(In reply to comment #2)
> I just enabled deprecated /proc/bus/usb into kernel to be able to use usb in
> virtualbox :)

Right, this is one possible workaround. But the upstream solution for the 4.x-series is provided via VBoxCreateUSBNode.sh.

The udev rule specified in and created by the previous ebuils came from the upstream udev rule provided by the VirtualBox-Team. Since the rule changed, we need to adjust the ebuild accordingly. The patch just reflects those changes.

There are several workarounds for not seeing the problem at the moment, but usbfs (which is /proc/bus/usb) is deprecated and should therefore not be used as a solution.

Please deactivate usbfs in your kernel and test the patched ebuild if you experienced the initial problem.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-05-02 20:47:08 UTC
I will work on a fix the next couple of days. The problem here is that VBoxCreateUSBNode.sh only gets installed by app-emulation/virtualbox-bin at the moment but app-emulation/virtualbox needs to install it as well. I don't want to add a udev rule which references to files not being installed with the same package. So I have so take the udev-rules away from virtualbox-modules and add them to virtualbox{,-bin}. This needs some testing and my time is kinda limited so please be patient with me.
Comment 5 Kamen Dokov 2011-05-03 16:56:19 UTC
Well none of the udev rules that I found with google did not work!
The only thing that actually did the trick is typing in console:

sh /opt/VirtualBox/VBoxCreateUSBNode.sh 0

It exits with an error but creates the nodes in /dev.

I`ll upload my udev rules for vbox if someone more knowledgeable than me can make them work :(
Comment 6 Kamen Dokov 2011-05-03 16:57:51 UTC
Created attachment 271991 [details]
my nonworking udev rules for vbox

My udev rules for vbox if someone more knowledgable than me can make them work.
Comment 7 Kamen Dokov 2011-05-05 10:43:24 UTC
Sorry for the fuss I forgot to make VBoxCreateUSBNode.sh executable!
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-05-08 16:03:50 UTC
Alright, there are now three new ebuilds in the tree:

  app-emulation/virtualbox-modules-4.0.6-r1
  app-emulation/virtualbox-4.0.6-r1
  app-emulation/virtualbox-bin-4.0.6-r1

They should make new USB handling working out of the box. Please give this a thorough testing and report back here if it works (I don't use USB in my VMs so I cannot test it).
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-04-23 14:55:10 UTC
No feedback within ten months... closing as fixed.