[Pkg-hpijs-devel] Bug#517297: hplip udev rules never match

Pelayo Gonzalez pelayogmp at orange.es
Thu Feb 26 21:07:18 UTC 2009


Package: hplip
Version: 2.8.12-3
Severity: important

Severity important as may case serious headaches to users.

This bug is related to #486912. The udev rules in z60_hplip.rules never match
for me. As result my PSC1100 devices always was owned by root:root, so printing
or scaning was imposible for non root users.

Please find attached udev rules which solved my problem (adapted from libsane
rules).

I may expend some time fixing the rules and send a patch if you think this is
the right way. 
I think that printing only devices may be owned by root:lp, but 
multifunction devices must be owned by lp:scanner.

TIA
Pelayo González

-- Package-specific info:
error: Version: (Not available. CUPS may not be installed or not running.)

HP Linux Imaging and Printing System (ver. 2.8.12)
Dependency/Version Check Utility ver. 14.1

Copyright (c) 2001-8 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
are installed to successfully compile HPLIP.                                    
2. Run-time check mode (-r or --run): Use this mode to determine if a distro    
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball   
has the proper dependencies installed to successfully run.                      
3. Both compile- and run-time check mode (-b or --both) (Default): This mode    
will check both of the above cases (both compile- and run-time dependencies).   

Saving output in log file: hp-check.log

Initializing. Please wait...

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux palas-sid 2.6.26-1-686-bigmem #1 SMP Sat Jan 10 19:13:22 UTC 2009 i686 GNU/Linux

Distribution:
debian 5.0

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.5.4 installed

Checking PyQt 3.x version...
OK, version 3.17 installed.

Checking PyQt 4.x version...

Checking for CUPS...
Status: el programa de planificación de tareas se está ejecutando

Checking for dbus/python-dbus...
dbus daemon is running.
python-dbus version: 0.83.0


------------------------
| RUNTIME DEPENDENCIES |
------------------------


Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-ddk - CUPS driver development kit...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency: PyQt 3- Qt interface for Python (for Qt version 3.x)...
OK, found.

Checking for dependency: PyQt 4- Qt interface for Python (for Qt version 4.x)...
OK, found.

Checking for dependency: python-ctypes - A foreign function library for Python...
OK, found.

Checking for dependency: python-dbus - Python bindings for dbus...
OK, found.

Checking for dependency: Python XML libraries...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.


----------------------
| HPLIP INSTALLATION |
----------------------


Currently installed HPLIP version...
HPLIP 2.8.12 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
[dirs]
run = /var/run
cupsbackend = /usr/lib/cups/backend
ppd = /usr/share/ppd/hpijs/HP
doc = /usr/share/doc/hplip-doc/HTML
drv = /usr/share/cups/drv
ppdbase = /usr/share/ppd/hpijs
home = /usr/share/hplip
icon = no
cupsfilter = /usr/lib/cups/filter

[hplip]
version = 2.8.12

[installation]
version = 2.8.12.26
date_time = 02/26/09 18:49:57

[configure]
foomatic-rip-hplip-install = no
qt4 = yes
doc-build = yes
qt3 = yes
cups11-build = no
gui-build = yes
internal-tag = 2.8.12.26
foomatic-ppd-install = no
network-build = yes
ui-toolkit = qt3
pp-build = yes
fax-build = yes
scanner-build = yes
restricted-build = no
dbus-build = yes
shadow-build = no
foomatic-drv-install = yes



Current contents of '~/.hplip/hplip.conf' file:
[last_used]
printer_name = psc_1100_6c
device_uri = hp:/usb/psc_1100_series?serial=MY37MD92YQB0

[commands]
fax = hp-sendfax -d %FAX_URI%
scan = kooka -warning: No queues found.
error: 1 error or warning.
d %SANE_URI%
prnt = hp-print -p%PRINTER%
pcard = hp-unload -d %DEVICE_URI%
cpy = hp-makecopies -d %DEVICE_URI%

[installation]
version = 2.8.12.26
date_time = 02/26/09 21:55:22

[refresh]
rate = 30
enable = False
type = 0



-------------------------------
| DISCOVERED PARALLEL DEVICES |
-------------------------------

No devices found.

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

  Device URI                        Model             
  --------------------------------  ------------------
  hp:/usb/psc_1100_series?serial=M  HP psc 1100 series
  Y37MD92YQB0                                         

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------



----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
'hpaio' in '/etc/sane.d/dll.d/hplip'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...
device `hpaio:/usb/psc_1100_series?serial=MY37MD92YQB0' is a Hewlett-Packard psc_1100_series all-in-one


---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.


-----------------
| USB I/O SETUP |
-----------------


Checking for permissions of USB attached printers...

HP Device 0x3011 at 006:021: 
    Device URI: hp:/usb/psc_1100_series?serial=MY37MD92YQB0
    Device node: /dev/bus/usb/006/021
    Mode: 0664
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/006/021
# owner: lp
# group: scanner
user::rw-
group::rw-
other::r--



-----------
| SUMMARY |
-----------


Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html


Done.

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hplip depends on:
ii  adduser                  3.110           add and remove users and groups
ii  coreutils                7.1-2           The GNU core utilities
ii  cups                     1.3.8-1lenny4.1 Common UNIX Printing System(tm) - 
ii  hplip-data               2.8.12-3        HP Linux Printing and Imaging - da
ii  libc6                    2.9-3           GNU C Library: Shared libraries
ii  libcups2                 1.3.9-14        Common UNIX Printing System(tm) - 
ii  libdbus-1-3              1.2.12-1        simple interprocess messaging syst
ii  libsane                  1.0.19-25       API library for scanners
ii  libsnmp15                5.4.1~dfsg-12   SNMP (Simple Network Management Pr
ii  libssl0.9.8              0.9.8g-15       SSL shared libraries
ii  libusb-0.1-4             2:0.1.12-13     userspace USB programming library
ii  lsb-base                 3.2-20          Linux Standard Base 3.2 init scrip
ii  python                   2.5.4-1         An interactive high-level object-o
ii  python-dbus              0.83.0-1        simple interprocess messaging syst
ii  python-imaging           1.1.6-3         Python Imaging Library
ii  python-support           0.8.7           automated rebuilding support for P

Versions of packages hplip recommends:
ii  cups-client                   1.3.9-14   Common UNIX Printing System(tm) - 
ii  hpijs                         2.8.12-3   HP Linux Printing and Imaging - gs
ii  sane-utils                    1.0.19-25  API library for scanners -- utilit

Versions of packages hplip suggests:
ii  gtklp                   1.2.3-1.1        printing tool for CUPS on the GNOM
ii  hplip-doc               2.8.12-3         HP Linux Printing and Imaging - do
ii  hplip-gui               2.8.12-3         HP Linux Printing and Imaging - GU
ii  kdeprint                4:3.5.9.dfsg.1-6 print system for KDE
pn  openprinting-ppds       <none>           (no description available)

-- no debconf information
-------------- next part --------------
# udev rules file for HP PSC 1100
#
#
# To add a USB device, add a rule to the list below between the
# LABEL="hplip_pgm_rules_begin" and LABEL="hplip_pgm_rules_end" lines.
#
# To run a script when your scanner is plugged in, add RUN="/path/to/script"
# to the appropriate rule.
#

ACTION!="add", GOTO="hplip_pgm_rules_end"
ENV{DEVTYPE}=="usb_device", GOTO="hplip_pgm_create_usb_dev"
SUBSYSTEM=="usb_device", GOTO="hplip_pgm_rules_begin"
SUBSYSTEM!="usb_device", GOTO="hplip_pgm_rules_end"

# Kernel >= 2.6.22 jumps here
LABEL="hplip_pgm_create_usb_dev"

# For Linux >= 2.6.22 without CONFIG_USB_DEVICE_CLASS=y
# If the following rule does not exist on your system yet, uncomment it
# ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664", OWNER="root", GROUP="root"

# Kernel < 2.6.22 jumps here
LABEL="hplip_pgm_rules_begin"

# PGM: Hewlett-Packard PSC 1100 series
SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="3011", MODE="0664", OWNER="lp", GROUP="scanner", ENV{hplip_pgm_matched}="yes"


# The following rule will disable USB autosuspend for the device
ENV{hplip_pgm_matched}=="yes", RUN+="/bin/sh -c 'test -e /sys/$env{DEVPATH}/power/level && echo on > /sys/$env{DEVPATH}/power/level'"

LABEL="hplip_pgm_rules_end"


More information about the Pkg-hpijs-devel mailing list