--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: hp-plugin generates libsane udev rules lacking LABEL
- From: Christian Kastner <ckk@debian.org>
- Date: Wed, 20 Mar 2019 12:58:39 +0100
- Message-id: <550764b7-9182-2c74-7c64-135ce737c676@debian.org>
Package: hplip
Version: 3.18.12+dfsg0-2
Severity: minor
The utility hp-plugin generated a file S99-2000S1.rules in
/etc/udev/rules.d/, which I've attached. This sets up permissions for my
HP LaserJet Pro MFP 176n.
Note that in line 26, there's a GOTO="libsane_rules_end", but there is
no LABEL= for that.
Compare this to libsane's /lib/udev/rules.d/60-libsane.rules, which has
a similar structure, but has such a matching LABEL.
Regards,
Christian
PS: I guess that the simplest solution would be to get this LaserJet
model into libsane's 60-libsane.rules (where 3 other LaserJets are
already listed), but I don't have any experience with that -- can the
maintainer do that trivially, or does this require code in the upstream
project? If you happen to have experience with this process and it is
trivial, please do share. Thanks!
# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.22 on Thu May 16 18:59:16 2013
#
# udev rules file for supported USB and SCSI devices
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# To add a USB device, add a rule to the list below between the
# LABEL="libsane_usb_rules_begin" and LABEL="libsane_usb_rules_end" lines.
#
# To run a script when your device is plugged in, add RUN+="/path/to/script"
# to the appropriate rule.
#
# If your scanner isn't listed below, you can add it as explained above.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"
ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
SUBSYSTEM!="usb_device", GOTO="libsane_usb_rules_end"
# Kernel >= 2.6.22 jumps here
LABEL="libsane_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", MODE="0664", OWNER="root", GROUP="root"
# Kernel < 2.6.22 jumps here
LABEL="libsane_usb_rules_begin"
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="5905", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes"
# The following rule will disable USB autosuspend for the device
ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'test -e /sys/$env{DEVPATH}/power/level && echo on > /sys/$env{DEVPATH}/power/level'"
LABEL="libsane_usb_rules_end"
--- End Message ---
--- Begin Message ---
- To: 925142-done@bugs.debian.org
- Subject: Re: Bug#925142: hp-plugin generates libsane udev rules lacking LABEL
- From: Brian Potkin <claremont102@gmail.com>
- Date: Tue, 7 May 2019 11:23:49 +0100
- Message-id: <07052019105715.1f73a2813379@desktop.copernicus.org.uk>
- In-reply-to: <550764b7-9182-2c74-7c64-135ce737c676@debian.org>
- References: <550764b7-9182-2c74-7c64-135ce737c676@debian.org>
On Wed 20 Mar 2019 at 12:58:39 +0100, Christian Kastner wrote:
> Package: hplip
> Version: 3.18.12+dfsg0-2
> Severity: minor
>
> The utility hp-plugin generated a file S99-2000S1.rules in
> /etc/udev/rules.d/, which I've attached. This sets up permissions for my
> HP LaserJet Pro MFP 176n.
>
> Note that in line 26, there's a GOTO="libsane_rules_end", but there is
> no LABEL= for that.
>
> Compare this to libsane's /lib/udev/rules.d/60-libsane.rules, which has
> a similar structure, but has such a matching LABEL.
>
> Regards,
> Christian
>
> PS: I guess that the simplest solution would be to get this LaserJet
> model into libsane's 60-libsane.rules (where 3 other LaserJets are
> already listed), but I don't have any experience with that -- can the
> maintainer do that trivially, or does this require code in the upstream
> project? If you happen to have experience with this process and it is
> trivial, please do share. Thanks!
S99-2000S1.rules is not a file distributed by Debian. The issue could
be reported upstream (https://bugs.launchpad.net/hplip/).
Regards,
Brian.
--- End Message ---