Hello community,
here is the log from the commit of package sane-backends
checked in at Thu Mar 13 19:06:11 CET 2008.
--------
--- sane-backends/sane-backends.changes 2008-03-11 15:35:58.000000000 +0100
+++ /mounts/work_src_done/STABLE/sane-backends/sane-backends.changes 2008-03-13 14:03:56.000000000 +0100
@@ -1,0 +2,9 @@
+Thu Mar 13 14:00:15 CET 2008 - jsmeix@suse.de
+
+- Added "scanner autoconfiguration" support via
+ create_scanner_database, create_sane-backends-autoconfig.rules
+ which create /etc/udev/rules.d/56-sane-backends-autoconfig.rules
+ and provide it in the new sane-backends-autoconfig sub-package
+ (see Novell/Suse Bugzilla bnc#347943).
+
+-------------------------------------------------------------------
New:
----
create_sane-backends-autoconfig.rules
create_scanner_database
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sane-backends.spec ++++++
--- /var/tmp/diff_new_pack.B24725/_old 2008-03-13 19:05:55.000000000 +0100
+++ /var/tmp/diff_new_pack.B24725/_new 2008-03-13 19:05:55.000000000 +0100
@@ -18,7 +18,7 @@
AutoReqProv: on
Summary: SANE (Scanner Access Now Easy) Scanner Drivers
Version: 1.0.19
-Release: 8
+Release: 10
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
@@ -59,6 +59,18 @@
# Source107 is obsolete since sane-backends-1.0.19 because it has udev and HAL support.
# Source108 is a script which outputs a HAL fdi file.
# Source108 is obsolete since sane-backends-1.0.19 because it has udev and HAL support.
+# Source200... is scanner autoconfiguration stuff:
+# Source200 and Source201 generate the 56-sane-backends-autoconfig.rules file
+# for automated scanner driver activation via udev ("scanner autoconfiguration").
+# Source200 is a copy of /usr/lib/YaST2/bin/create_scanner_database
+# to avoid yast2-scanner in BuildRequires which would drag almost the whole YaST:
+Source200: create_scanner_database
+# Source201 actually generates the 56-sane-backends-autoconfig.rules file
+# by calling create_scanner_database which reads the description files
+# to extract the needed info from which create_sane-backends-autoconfig.rules
+# generates the 56-sane-backends-autoconfig.rules file:
+Source201: create_sane-backends-autoconfig.rules
+# based upon the data which is
# Patch1 does locale rename: no -> nb:
# Patch1 is obsolete since sane-backends-1.0.19 because it uses 'nb'.
# Patch2 fixes too small arrays in backend/niash.c:
@@ -214,6 +226,47 @@
Ulrich Deiters
Wittawat Yamwong
+%package autoconfig
+Group: Hardware/Scanner
+Summary: USB Scanner Autoconfiguration
+Requires: sane-backends
+
+%description autoconfig
+USB scanner autoconfiguration happens via udev.
+
+The file /etc/udev/rules.d/56-sane-backends-autoconfig.rules contains
+entries for those USB scanners where the USB IDs are known, which are
+supported by a free driver, where the support status is "complete" or
+"good", and which do not require firmware upload.
+
+When a USB scanner is connected and its USB IDs match to an entry in
+the 56-sane-backends-autoconfig.rules file, the matching scanner driver
+is activated (i.e. the driver line in /etc/sane.d/dll.conf is
+activated).
+
+It enables scanner drivers but never disables them. The reason is that
+enabled drivers do not hurt so that an automated disable would make it
+only overcomplicated because when more than one scanner uses the same
+driver, a complicated check would be needed to avoid that the driver is
+accidentally disabled when only one scanner was disconnected.
+
+Note that driver activation alone is not sufficient to have a usable
+"scanner autoconfiguration" for the user. What is also needed are
+appropriate USB device file permissions so that the user's scanning
+software can access the device. But this is already in place via the
+HAL 70-scanner.fdi file which triggers the resmgr to grant access
+permissions for the user who is currently locally logged in (i.e. who
+works directly at the computer where the USB scanner is).
+
+If you do not like automated driver activation, do not install this
+package or remove it when it is already installed.
+
+
+
+Authors:
+--------
+ Johannes Meixner
+
%prep
%setup -q
# Patch2 fixes too small arrays in backend/niash.c:
@@ -323,7 +376,7 @@
# sane-teco2: mentiones only "firmware 1.09" (no firmware upload)
# As far as we know all scanners which use
# the backend gt68xx and the related backend artec_eplus48u
-# or the backend sane-epjitsu require a firmware upload,
+# or the backend epjitsu require a firmware upload,
# see "man sane-gt68xx" and http://www.meier-geinitz.de/sane/gt68xx-backend/
# and see "man sane-artec_eplus48u" and "man sane-epjitsu"
#
@@ -402,6 +455,33 @@
# OpenSLP registration stuff:
install -d -m755 %{buildroot}%{_sysconfdir}/slp.reg.d
install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d
+# Scanner autoconfiguration stuff (packaged in sane-backends-autoconfig):
+# This requires the installed descriptions and descriptions-external files
+# because create_sane-backends-autoconfig.rules calls create_scanner_database
+# which reads the description files to extract the needed info from which
+# it generates the 56-sane-backends-autoconfig.rules file
+# for automated scanner driver activation via udev.
+# Note that driver activation alone is not sufficient
+# to have a usable "scanner autoconfiguration" for the user.
+# What is also needed are appropriate USB device file permissions
+# so that the user's scanning software can access the device.
+# But this is already in place via the HAL 70-scanner.fdi file
+# which contains a superset of USB scanner IDs (all known USB scanner IDs)
+# compared to the USB scanner IDs in 56-sane-backends-autoconfig.rules,
+# see create_sane-backends-autoconfig.rules for which USB scanners
+# automated driver activation is done (basically only those scanners
+# which are supported by a free driver, which do not require firmware upload,
+# and where the support status is "complete" or "good").
+# Modify create_scanner_database to find the description files in the BuildRoot directory
+# (the usual delimiter '/' cannot be used because buildroot contains it too):
+sed -i -e 's|/usr/share/sane/descriptions|%{buildroot}/usr/share/sane/descriptions|' %{SOURCE200}
+# Modify create_sane-backends-autoconfig.rules to call create_scanner_database with the right path
+# (the usual delimiter '/' cannot be used because SOURCE200 contains it too):
+sed -i -e 's|^bash create_scanner_database|bash %{SOURCE200}|' %{SOURCE201}
+# Run it:
+bash %{SOURCE201} >autoconfig.rules
+# Install the scanner autoconfiguration udev rules file:
+install -m644 autoconfig.rules %{buildroot}%{_sysconfdir}/udev/rules.d/56-sane-backends-autoconfig.rules
%post
/sbin/ldconfig
@@ -445,7 +525,19 @@
%doc %{_mandir}/man7/sane.7.gz
%doc %{_mandir}/man8/saned.8.gz
+%files autoconfig
+%defattr(-,root,root)
+%dir %{_sysconfdir}/udev
+%dir %{_sysconfdir}/udev/rules.d
+%{_sysconfdir}/udev/rules.d/56-sane-backends-autoconfig.rules
+
%changelog
+* Thu Mar 13 2008 jsmeix@suse.de
+- Added "scanner autoconfiguration" support via
+ create_scanner_database, create_sane-backends-autoconfig.rules
+ which create /etc/udev/rules.d/56-sane-backends-autoconfig.rules
+ and provide it in the new sane-backends-autoconfig sub-package
+ (see Novell/Suse Bugzilla bnc#347943).
* Tue Mar 11 2008 jsmeix@suse.de
- Replaced "scanner" by "SCSIviaUSBscanner" in info.capabilities
in 70-scanner.fdi to explicitely mark those special USB scanners
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org