Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457016 - media-libs/libgphoto2 uses plugdev as group in it's udev rules.d file (?)
Summary: media-libs/libgphoto2 uses plugdev as group in it's udev rules.d file (?)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-12 23:18 UTC by goeland86
Modified: 2013-02-14 09:33 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description goeland86 2013-02-12 23:18:24 UTC
I upgraded to udev-197 as part of the standard ~amd64 updates recently. I then tried to load digital photos from my camera as usual through shotwell. 

The camera would not show up in shotwell or f-spot. Communication with a knowledgeable person in #gphoto on freenode revealed there's a problem with gvfs' gphoto2 server. After doing an 'echo "gnome-base/gvfs -gphoto2" && emerge gvfs' and logout/login, I received the error message from gphoto2:
 *** Error ***              
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***  

Testing revealed that gphoto2 itself had issues (gphoto2 --summary failed), and that these issues were permissions-related (command worked as root). Reading the /lib/udev/rules.d/70-libgphoto2 revealed that it provided access to the "plugdev" group, which was not required with previous versions, only usb group was needed.

Added user to plugdev group and everything working fine.

Reproducible: Always

Steps to Reproduce:
1. emerge udev-197
2. emerge shotwell
3. connect gphoto2-compatible camera
4. run "gphoto2 --summary" as regular user (part of usb group)
Actual Results:  
 *** Error ***              
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***  

Expected Results:  
gphoto2 summary output related to connected digital camera

Worked around the problem adding the user to the plugdev group.
Either this should be noted as part of the news items for udev 197, or message when upgrading to udev 197 should explicitly convey news of changes related to usb group/plugdev group.
Comment 1 Pacho Ramos gentoo-dev 2013-02-13 20:43:21 UTC
I am a plugdev member... but I am really unsure about Gentoo still requiring this group for some things, I am also unsure about if this plugdev requirement is consistent in the tree between different apps :/
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2013-02-13 21:06:28 UTC
(In reply to comment #1)
> I am a plugdev member... but I am really unsure about Gentoo still requiring
> this group for some things, I am also unsure about if this plugdev
> requirement is consistent in the tree between different apps :/

Every package that uses group plugdev must create it on it's on. It's just a common name that stuck from when HAL was still in tree. HAL used to create it, not anymore.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-02-13 21:08:21 UTC
And I see enewgroup in libgphoto2's ebuild already. Then user should use polkit (and consolekit or systemd-logind) to get authorization on apps he is using, then belonging to group "plugdev" shouldn't be necessary -- long as the used application supports polkit!

I don't see anything to do here.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-02-13 21:10:04 UTC
(In reply to comment #0)
> Either this should be noted as part of the news items for udev 197, or
> message when upgrading to udev 197 should explicitly convey news of changes
> related to usb group/plugdev group.

This isn't related to 197, or the upgrade in general. 

If libgphoto2's rules changed from "usb" to "plugdev" when libgphoto2 version changed, that might be different story, but is not related to udev itself.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2013-02-13 21:14:33 UTC
Futhermore, grepped every libgphoto2 ebuild in Portage and plugdev is used in every one of them. Nothing changed here in that regard.

What may have changed is that your session is no longer active according to ConsoleKit or polkit otherwise failed:

$ ck-list-sessions
[ ... ]
active = 'TRUE'
[ ... ]

And when libgphoto2 is used from eg. gvfs, polkit gives authorization without plugdev group
Comment 6 William Hubbs gentoo-dev 2013-02-13 21:15:17 UTC
I've come to the same conclusion as ssuominen; there is nothing for us
(the udev maintainers) to do here.