1
0
forked from pool/sane-backends
OBS User unknown 2008-10-22 16:46:52 +00:00 committed by Git OBS Bridge
parent e6504f4811
commit a19a75ef54
3 changed files with 31 additions and 5 deletions

View File

@ -36,6 +36,7 @@ bash create_scanner_database ASCII | egrep '^sane-backends|^iscan-free|^hplip' |
# Output header:
echo 'ACTION!="add", GOTO="sane_backends_autoconfig_rules_end"'
echo 'SUBSYSTEM!="usb", GOTO="sane_backends_autoconfig_rules_end"'
echo
# Output the scanner model entries:
@ -87,7 +88,7 @@ do [ -z "$BACKEND" ] && { echo "Ignoring $USBID because there is no driver entry
[ -z "$BEST_BACKEND" ] && BEST_BACKEND=$( echo $BACKENDS_FOR_SAME_MODEL | cut -d ' ' -f 1 )
if [ -n "$BEST_BACKEND" ]
then USED_BACKENDS=$( echo "$USED_BACKENDS $BEST_BACKEND" )
echo "SYSFS{idVendor}==\"$PREVIOUS_VENDOR\", SYSFS{idProduct}==\"$PREVIOUS_MODEL\", ENV{sane_backend_$BEST_BACKEND}=\"yes\""
echo "ATTR{idVendor}==\"$PREVIOUS_VENDOR\", ATTR{idProduct}==\"$PREVIOUS_MODEL\", ENV{sane_backend_$BEST_BACKEND}=\"yes\""
fi
# Remember the current model:
BACKENDS_FOR_SAME_MODEL="$BACKEND"

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Oct 21 13:12:42 CEST 2008 - jsmeix@suse.de
- Changed /etc/udev/rules.d/55-libsane.rules to jump to the end
if SUBSYSTEM!="usb" and replaced SYSFS by ATTR and did
the same chages in create_sane-backends-autoconfig.rules
(see Novell/Suse Bugzilla bnc#436085).
-------------------------------------------------------------------
Thu May 15 15:51:11 CEST 2008 - jsmeix@suse.de

View File

@ -2,9 +2,16 @@
# spec file for package sane-backends (Version 1.0.19)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@ -18,7 +25,7 @@ Group: Hardware/Scanner
AutoReqProv: on
Summary: SANE (Scanner Access Now Easy) Scanner Drivers
Version: 1.0.19
Release: 43
Release: 94
Url: http://www.sane-project.org/
# URL for Source0: http://alioth.debian.org/frs/download.php/2318/sane-backends-1.0.19.tar.gz
Source0: sane-backends-%{version}.tar.bz2
@ -413,8 +420,13 @@ sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{build
# should usually require the same kind of security.
# Regarding SUBSYSTEM=="usb" see the Novell/Suse Bugzilla bug
# https://bugzilla.novell.com/show_bug.cgi?id=294161#c11
# Regarding SYSFS{} versus ATTR{} see the Novell/Suse Bugzilla bug
# https://bugzilla.novell.com/show_bug.cgi?id=436085#c0
# 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=="usb_device", GOTO="libsane_rules_begin"$/iSUBSYSTEM=="usb", GOTO="libsane_rules_begin"' 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/^ENV{DEVTYPE}/# ENV{DEVTYPE}/' tools/udev/libsane.rules
# Install the udev rules file:
install -d %{buildroot}%{_sysconfdir}/udev/rules.d
install -m644 tools/udev/libsane.rules %{buildroot}%{_sysconfdir}/udev/rules.d/55-libsane.rules
@ -534,6 +546,11 @@ exit 0
%{_sysconfdir}/udev/rules.d/56-sane-backends-autoconfig.rules
%changelog
* Tue Oct 21 2008 jsmeix@suse.de
- Changed /etc/udev/rules.d/55-libsane.rules to jump to the end
if SUBSYSTEM!="usb" and replaced SYSFS by ATTR and did
the same chages in create_sane-backends-autoconfig.rules
(see Novell/Suse Bugzilla bnc#436085).
* Thu May 15 2008 jsmeix@suse.de
- Changed create_sane-backends-autoconfig.rules
to output '$$' insead of '$' because in udev rules files