Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201028 - media-libs/libgphoto2-2.4.0-r1 installs buggy udev rules and breaks usb-printer/cups
Summary: media-libs/libgphoto2-2.4.0-r1 installs buggy udev rules and breaks usb-print...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 212574 212898 253236 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-02 21:49 UTC by Tiziano Müller (RETIRED)
Modified: 2008-12-31 13:38 UTC (History)
6 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 Tiziano Müller (RETIRED) gentoo-dev 2007-12-02 21:49:20 UTC
It seems like a variation of this bug here: https://bugs.launchpad.net/ubuntu/+source/udev/+bug/76077
... but in our case it's caused by line 11 (see below) which sets the group for all usb devices to plugdev. This also overwrites GROUP="lp" for usb printers which results in cups not being able to detect or print to usb printers.


# do not edit this file, it will be overwritten on update
#
# udev rules file for libgphoto2 devices (for udev 0.98 version)
# Created from this library:
#   libgphoto2      2.4.0          i686-pc-linux-gnu-gcc, ltdl, EXIF
#   libgphoto2_port 0.8.0          i686-pc-linux-gnu-gcc, ltdl, USB, serial without locking
#
SUBSYSTEM!="usb|usb_device", GOTO="libgphoto2_rules_end"
ACTION!="add", GOTO="libgphoto2_rules_end"

GROUP="plugdev"
[...]
Comment 1 David Girault 2007-12-04 16:49:15 UTC
Hi all,
I have exactly the same problem here. I'll try to temporary put 'lp' user in the 'plugdev' group so cups can access the printer, but it doesn't work.

If someone has a quick fix, I'll be happy.

Thanks
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-12-04 16:57:18 UTC
I just had a look at the ubuntu bug. I'll take a look at their patch and forward it upstream if necessary in the coming days (probably tomorrow).
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2007-12-04 18:14:03 UTC
@David: Please don't do that. As a workaround you can comment out the line 'GROUP="plugdev"' in /etc/udev/rules.d/70-libgphoto2.rules and reload the udev-rules by either restarting or doing 'udevcontrol --reload_rules'

@Gilles: It's not the same problem, but a similar one. We don't have the match for all vendor-id's, but the buggy 'GROUP="plugdev"' line instead, as written above.
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-03-07 17:25:01 UTC
*** Bug 212574 has been marked as a duplicate of this bug. ***
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-03-10 09:15:03 UTC
*** Bug 212898 has been marked as a duplicate of this bug. ***
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-03-30 21:43:36 UTC
looks like the issue is resolved in 2.4.1. Please reopen if it's not the case.
Comment 7 Aron 2008-03-30 22:57:06 UTC
Yep, this is fixed.  It also fixed the problem with my Olympus camera not being recognized as a mass storage device. :-)
Comment 8 gtlinuxman 2008-06-06 19:49:09 UTC
Hi
This problem is not solved in =media-libs/libgphoto2-2.4.1-r1 and =media-libs/libgphoto2-2.4.1-r1.
Both versions have /etc/udev/rules.d/70-libgphoto2.rules with structure:

# do not edit this file, it will be overwritten on update
#
# udev rules file for libgphoto2 devices (for udev 0.98 version)
# Created from this library:
#   libgphoto2      2.4.1          i686-pc-linux-gnu-gcc, ltdl, no EXIF
#   libgphoto2_port 0.8.0          i686-pc-linux-gnu-gcc, ltdl, USB, serial without locking
#

SUBSYSTEM!="usb|usb_device", GOTO="libgphoto2_rules_end"
ACTION!="add", GOTO="libgphoto2_rules_end"
...
GROUP="plugdev"
...
LABEL="libgphoto2_rules_end"

This rule still sets the group for all usb devices to plugdev and also overwrites GROUP="lp" for usb printers.

Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-06 22:35:59 UTC
(In reply to comment #8)

Please provide emerge --info. I've tested this a different machines with difference settings: directory and/or template or all cameras or canon and ptp and in all cases I didn't have the broken rule.
Comment 10 gtlinuxman 2008-06-07 06:48:49 UTC
% emerge -pvt media-libs/libgphoto2

These are the packages that would be merged, in reverse order:

Calculating dependencies                 ... done!
[ebuild   R   ] media-libs/libgphoto2-2.4.1  USE="exif hal nls -doc" CAMERAS="directory spca50x sx330z template -adc65 -agfa_cl20 -aox -barbie -canon -casio_qv -clicksmart310 -digigr8 -digita -dimagev -dimera3500 -enigma13 -fuji -gsmart300 -hp215 -iclick -jamcam -jd11 -kodak_dc120 -kodak_dc210 -kodak_dc240 -kodak_dc3200 -kodak_ez200 -konica -konica_qm150 -largan -lg_gsm -mars -mustek -panasonic_coolshot -panasonic_dc1000 -panasonic_dc1580 -panasonic_l859 -pccam300 -pccam600 -polaroid_pdc320 -polaroid_pdc640 -polaroid_pdc700 -ptp2 -ricoh -ricoh_g3 -samsung -sierra -sipix_blink -sipix_blink2 -sipix_web2 -smal -sonix -sony_dscf1 -sony_dscf55 -soundvision -sq905 -stv0674 -stv0680 -toshiba_pdrm11" 0 kB

emerge --info: http://pastebin.ca/1041053

Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-07 09:46:18 UTC
please don't put informations you're asked on external websites, there is plenty of space in our server so that emerge --info or build logs can be hosted here.
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-08-03 22:13:13 UTC
Ok udev rules are broken by template driver it seems. I'll try to fix that quickly and see if 2.4.2 fixes that.

CAMERAS="template" emerge -1av libgphoto2
Comment 13 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-08-04 22:03:03 UTC
hopefully this is fixed with 2.4.2. Some parts of it has been rewritten and I couldn't reproduce this problem.
Comment 14 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-12-31 13:38:23 UTC
*** Bug 253236 has been marked as a duplicate of this bug. ***