FS#69868 - [sane] udev breakage in 1.0.32

Attached to Project: Arch Linux
Opened by Stephan Eisvogel (bsdice) - Wednesday, 03 March 2021, 13:41 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 04 May 2021, 12:08 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When updating sane from 1.0.31 to 1.0.32, the new udev rules generation in PKGBUILD breaks chgrp to group "scanner" for my scanner:

Bus 001 Device 013: ID 04a9:1608 Canon, Inc. DR-2580C Scanner

Responsible change appears to be https://github.com/archlinux/svntogit-packages/commit/8740376ffe0890a9d9c1cbfbb35b15149992619b#diff-3e341d2d9c67be01819b25b25d5e53ea3cdf3a38d28846cda85a195eb9b7203a

grep Canon /usr/lib/udev/rules.d/6?-sane*.rules | wc -l
0

whereas in 1.0.31

grep Canon /usr/lib/udev/rules.d/49-sane.rules | wc -l
328

Looks incomplete... scanimage -L returns no devices unless run by root in 1.0.32. For 1.0.31 it works as long as a user is in the "scanner" group.

I can checkout test packages from any git and compile and test.

Regards,
Stephan
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Tuesday, 04 May 2021, 12:08 GMT
Reason for closing:  None
Comment by David Runge (dvzrv) - Wednesday, 21 April 2021, 10:11 GMT
@bsdice: Thanks for the report!

Please check whether  FS#57391  or  FS#68062  discuss/solve your issue.

TL;DR: The udev integration (now based on hwdb) works for the current user or the "saned" user (used in saned@.service).

Did you log out and back in again after the upgrade?
Comment by Stephan Eisvogel (bsdice) - Thursday, 22 April 2021, 06:00 GMT
Hi David,

thanks for taking the time to answer, appreciated.

I updated to sane 1.0.32 and tried re-login. I read the two mentioned other FS but they seem not to apply.

Also I am not using saned@, just the bare USB device with a processing script that uses scanimage for duplex batch scan, empty page check+discard with ImageMagick, scantailor-cli postprocessing, OCRmyPDF postprocessing, alternatively tiffcp/tiff2pdf for tiff-out or jpeg-out, with resulting file depending on user selection or button 1-3 on scanner presses that are polled using insaned at the start of the script. Bit 'insane' pipeline but results are very good.

As a workaround and to close this out as WONTFIX to save time, I am now overriding the USB device permissions myself:

# cat /etc/udev/rules.d/93-canon-scanner.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="04a9", ATTR{idProduct}=="1608", MODE="0660", OWNER="root", GROUP="scanner"

In theory 66-saned.rules should match the scanner and set ACL to group "saned" rw, but I was too lazy to reboot and just used my old group and udevadm control -R. Instead just adding my user to group "saned" should also have worked.

Loading...