Skip to content

include unsupported usb is in hwdb

symphorien requested to merge symphorien/backends:hwdb_unsupported into master

The precomputed udev rules distributed in the release tarballs have a number of drawbacks (for example chowning scanners to the scanner group, which can prevent printing). The alternative is to generate udev and hwdb files with sane-desc:

./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external > $out/etc/udev/rules.d/49-libsane.rules
./tools/sane-desc -m udev+hwdb -s doc/descriptions -m hwdb > $out/etc/udev/hwdb.d/20-sane.hwdb

This is great, but sane-desc does not include unsupported .desc entries like EPSON V300 PHOTO, which was present in the distributed udev rules. So even when installing the required unfree driver to make the corresponding epkowa backend work, it only works as root as there is no corresponding hwdb entry.

This patch modifies sane-desc to include usb ids of unsupported scanners in the hwdb, so that these scanners get the required permissions applied.

Fixes #619

Applied downstream in NixOS with success for a year

Merge request reports