diff --git a/sane-backends.changes b/sane-backends.changes index 311f186..465095c 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Mar 29 13:07:20 CEST 2011 - jsmeix@suse.de + +- Fixed udev rules for SCSI scanners: + For SCSI scanners "ATTRS" is mandatory for every sysfs attribute + (in particular ATTRS{type}, ATTRS{vendor}, and ATTRS{model}) + so that "ATTRS" is replaced by "ATTR" only for USB scanners + (see openSUSE/Novell Bugzilla bnc#681146). + ------------------------------------------------------------------- Fri Mar 25 10:27:36 CET 2011 - jsmeix@suse.de diff --git a/sane-backends.spec b/sane-backends.spec index 6db3a22..d8878ce 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -522,10 +522,7 @@ install -m644 autoconfig.rules %{buildroot}%{_sysconfdir}/udev/rules.d/56-sane-b # Also the evil-hack init-script "sane-dev" is no longer provided. # Regarding udev: # Modify the generated tools/udev/libsane.rules file as follows: -# All GROUP="scanner" are replaced by GROUP="lp" and -# SUBSYSTEM=="usb" is added before the SUBSYSTEM=="usb_device" test -# but the latter is kept for backward compatibility. -# The reasons are: +# All GROUP="scanner" are replaced by GROUP="lp". # There is no group "scanner" in /etc/group for openSUSE. # For all-in-one devices (i.e. printer + scanner, e.g. "EPSON Stylus" devices) # the group must be "lp" so that the CUPS usb backend which runs @@ -536,19 +533,17 @@ install -m644 autoconfig.rules %{buildroot}%{_sysconfdir}/udev/rules.d/56-sane-b # usually require physical user access (to get the printed paper or # to place a paper on the scanner) so that both kind of devices # should usually require the same kind of security. +sed -i -e 's/GROUP="scanner"/GROUP="lp"/' tools/udev/libsane.rules # Regarding SUBSYSTEM=="usb" see the Novell/Suse Bugzilla bug # https://bugzilla.novell.com/show_bug.cgi?id=294161#c11 +sed -i -e '/^SUBSYSTEM/s/"usb_device"/"usb"/' tools/udev/libsane.rules # Regarding SYSFS{} or ATTRS{} versus ATTR{} see the Novell/Suse Bugzilla bug # https://bugzilla.novell.com/show_bug.cgi?id=436085#c0 -# but for SCSI scanners "ATTRS{type}" is mandatory see the Novell/Suse Bugzilla bug -# https://bugzilla.novell.com/show_bug.cgi?id=681146#c15 -# so that "ATTRS{type}" which was replaced by "ATTR{type}" is re-replaced by "ATTRS{type}" +# but for SCSI scanners "ATTRS" is mandatory see the Novell/Suse Bugzilla bug +# https://bugzilla.novell.com/show_bug.cgi?id=681146#c20 +# so that "ATTRS" is replaced by "ATTR" only for USB scanners. +sed -i -e '/^LABEL="libsane_usb_rules_begin"/,/^LABEL="libsane_usb_rules_end"/s/ATTRS/ATTR/g' tools/udev/libsane.rules # Disable all ENV{DEVTYPE} lines because we (Suse/Novell) do not need them. -sed -i -e 's/GROUP="scanner"/GROUP="lp"/' tools/udev/libsane.rules -sed -i -e '/^SUBSYSTEM/s/"usb_device"/"usb"/' tools/udev/libsane.rules -sed -i -e 's/SYSFS/ATTR/g' tools/udev/libsane.rules -sed -i -e 's/ATTRS/ATTR/g' tools/udev/libsane.rules -sed -i -e 's/ATTR{type}/ATTRS{type}/g' tools/udev/libsane.rules sed -i -e 's/^ENV{DEVTYPE}/# ENV{DEVTYPE}/' tools/udev/libsane.rules # Disable entries for USB scanners which are "unsupported" # but keep the entries for models for which the support status