HAL deprecated, replaced by udev
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned |
Bug Description
HAL (Hardware Abstraction Layer) is deprecated. It is replaced by udev. HPLIP uses HAL to mark HPLIP-supported printers as having the scanner capability so that HAL opens access to their low-level USB device files (/dev/bus/usb/*/*) for the user currently logged in to the desktop.
Now udev rules have to take over this responsibility. For that upstream udev has now the rule
ENV{ID_HPLIP}=="1", ENV{ACL_MANAGE}="1"
in /lib/udev/
HPLIP now only need to mark the supported devices with its own udev rules, for example with rules like this:
ACTION!="add", GOTO="hpmud_
SUBSYSTEM=="usb", ENV{DEVTYPE}
SUBSYSTEM!
LABEL="pid_test"
...
ATTRS{idVendor}
...
in
/lib/udev/
The complete 40-hplip.rules is attached.
Can you ship these rules with HPLIP? They will work for all distributions as the new rule in 70-acl.rules is already implemented in udev upstream.
FYI:
A note when you revise the HPLIP udev rules regarding LABELs:
Bad:
... GOTO="pid_test"
LABEL="pid_test"
Good: pid_test" hpmud_pid_ test"
... GOTO="hpmud_
LABEL="
Having unique labels in all udev files on the whole system is crucial. _label" would jump to an ambiguous_ label" target.
The reason is that all udev files are concatenated to one single
big blob of data wherein all labels must be unique.
Otherwise GOTO="ambiguous
arbitrary LABEL="
Therefore one must make sure with appropriate name prefixes
that all labels in all udev files are unique.
Perhaps nowadays there might be this or that subtle exception
from the general rule but to be on the safe side, I recommend
to use appropriate name prefixes in any case.
Welcome to the hell of udev/HAL!