udev rules of app-emulation/virtualbox-modules-3.0.12 could be simplified or even deleted completely: KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="", MODE="" SUBSYSTEM=="usb_device", GROUP="", MODE="" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="", MODE="" 1. NAME="vboxdrv" does not add anything as udev assigns it automatically. 2. Empty GROUP and MODE should be removed. What are they for? If you want to keep user root, group as root and mode 0660 then strip them off. So the second and third rule gets completely useless and can be deleted and your rules file simplifies to nothing.
i just rewrote the udev rules pushed by the app-emulation/virtualbox-modules ebuilds, using your (and upstream) guidelines. In attachment all the needed patches for the existing (in tree) ebuilds.
Created attachment 211634 [details, diff] virtualbox-modules-3.0.8.ebuild patch
Created attachment 211636 [details, diff] virtualbox-modules-3.0.10.ebuild patch
Created attachment 211638 [details, diff] virtualbox-modules-3.0.12.ebuild patch
Your new rules are: 1. KERNEL=="vboxdrv", OWNER="root", GROUP="root", MODE="0660" 2. SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0644" 3. SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0644" Please don't commit this. Rule number 1 does just re-apply defaults - can be dropped. Rules 2 and 3 unconditionally chown all libusb devices to group vboxusers. For what devices this is needed? If it is really needed in some case, please add it commented out.
Hi, (In reply to comment #5) [..] > Please don't commit this. Rule number 1 does just re-apply defaults - can be > dropped. Ok, i will drop it > Rules 2 and 3 unconditionally chown all libusb devices to group vboxusers. > For what devices this is needed? > If it is really needed in some case, please add it commented out. Well as said before, upstream adopt and suggests this rules (2 and 3) in order to have a fully working usb device emulation (available on PUEL edition). I will comment both rules and add a note on pkg_postinst. BTW thanks for the hint.
Created attachment 211699 [details, diff] virtualbox-modules-3.0.12.ebuild patch updated patch for the (in tree) virtualbox-modules ebuild, virtualbox-modules-3.1.0 ebuild updated on jokey's overlay.
(In reply to comment #6) > Well as said before, upstream adopt and suggests this rules (2 and 3) in order > to have a fully working usb device emulation (available on PUEL edition). > I will comment both rules and add a note on pkg_postinst. > > BTW thanks for the hint. > Only problem with your approach now is: Until now /etc/udev/rules.d is in CONFIG_PROTECT_MASK, so portage will overwrite changes. This should be changed, as udev itself installs its rules to /lib/udev/rules.d and other apps, that provide not to be edited rules should also do.
(In reply to comment #8) > Only problem with your approach now is: Until now /etc/udev/rules.d is in > CONFIG_PROTECT_MASK, so portage will overwrite changes. > This should be changed, as udev itself installs its rules to /lib/udev/rules.d > and other apps, that provide not to be edited rules should also do. > Ok the problem it's clear, how do you suggest to act in this case?
udev-149 ebuild does no longer has /etc/udev/rules.d in CONFIG_PROTECT_MASK.
Can this be closed as fixed?
Mark fixed, as requested :)