From a93907f058154d8f544dd65a2ea999376e836cacdeaa1392cb19735bce901b22 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 18 Mar 2010 15:27:29 +0000 Subject: [PATCH 1/5] Updating link to change in openSUSE:Factory/sane-backends revision 41.0 OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=bb1e4908a59705e615e251502afe48c7 --- ready | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ready diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 From bb433511acb129bcd798b6a2196038f1a452283c7e160d4cebb3fe0ff4339199 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Wed, 28 Apr 2010 10:52:45 +0000 Subject: [PATCH 2/5] Accepting request 38988 from home:jsmeix:branches:graphics Copy from home:jsmeix:branches:graphics/sane-backends via accept of submit request 38988 revision 2. Request was accepted with message: Removed HAL stuff (bnc#593946) and removed libsane.so and libsane.la (bnc#592143) OBS-URL: https://build.opensuse.org/request/show/38988 OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=20 --- sane-backends.changes | 13 +++++++ sane-backends.spec | 89 ++++++++----------------------------------- 2 files changed, 28 insertions(+), 74 deletions(-) diff --git a/sane-backends.changes b/sane-backends.changes index fff593c..89f8f97 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Apr 28 11:27:50 CEST 2010 - jsmeix@suse.de + +- HAL is deprecated and does no longer support to grant read/write + device access permissions for scanners to the currently logged + in "desktop" user. Therefore all HAL related stuff was removed + (see Novell/Suse Bugzilla bnc#593946). +- Removed /usr/lib[64]/libsane.so and /usr/lib[64]/libsane.la + which are not needed by scanning frontends which are provided + by openSUSE because /usr/bin/scanimage, /usr/bin/xsane, + and /usr/bin/skanlite link with /usr/libi[64]/libsane.so.1 + (see Novell/Suse Bugzilla bnc#592143). + ------------------------------------------------------------------- Mon Feb 1 12:29:15 UTC 2010 - jengelh@medozas.de diff --git a/sane-backends.spec b/sane-backends.spec index ec3896e..9102f76 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -396,11 +396,17 @@ make install DESTDIR=%{buildroot} # The dll meta-backend needs neither libsane-.so nor libsane-.la. # RPMLINT complains about libsane-.so with "devel-file-in-non-devel-package". # Therefore the libsane-.so and libsane-.la files are simply removed. -# Note that those files for the dll meta-backend /usr/lib/libsane.so and /usr/lib/libsane.la -# are not removed because it is unknown how whatever third-party scanning frontend -# may like to link with SANE (i.e. with the dll meta-backend). rm %{buildroot}%{_libdir}/sane/libsane-*.so rm %{buildroot}%{_libdir}/sane/libsane-*.la +# Because of https://bugzilla.novell.com/show_bug.cgi?id=592143 for openSUSE 11.3 +# even those files for the dll meta-backend /usr/lib/libsane.so and /usr/lib/libsane.la +# are removed regardless that it is unknown how whatever third-party scanning frontend +# may like to link with SANE (i.e. with the dll meta-backend). +# At least the frontends which are provided by openSUSE /usr/bin/scanimage, /usr/bin/xsane, +# and /usr/bin/skanlite link with /usr/lib/libsane.so.1 so that those frontends +# neither need /usr/lib/libsane.so nor /usr/lib/libsane.la: +rm %{buildroot}%{_libdir}/libsane.so +rm %{buildroot}%{_libdir}/libsane.la # Disable all backends in /etc/sane.d/dll.conf to avoid problems when backends are active by default: perl -pi -e 's/^([^#].*)$/#$1/' %{buildroot}%{_sysconfdir}/sane.d/dll.conf # Allow all users to write into /var/lock/sane/ so that the backends work for normal users @@ -465,7 +471,7 @@ sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{build # 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 +# But this is already in place via the the udev libsane.rules 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 @@ -476,8 +482,7 @@ sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{build # (the usual delimiter '/' cannot be used because buildroot contains it too): sed -i -e 's|/usr/share/sane/descriptions|%{buildroot}/usr/share/sane/descriptions|' create_scanner_database # Create the scanner database and store it because it is also needed later -# to disable "unsupported" model entries both in the udev rules file libsane.rules -# and in the HAL fdi file 70-scanner.fdi. +# to disable "unsupported" model entries in the udev libsane.rules file. # The file name "scanner.database" is used hardcoded in create_sane-backends-autoconfig.rules. ./create_scanner_database >scanner.database # Run create_sane-backends-autoconfig.rules which reads scanner.database @@ -528,9 +533,7 @@ sed -i -e 's/^ENV{DEVTYPE}/# ENV{DEVTYPE}/' tools/udev/libsane.rules # supported by SANE which would even cause conflicts if such a # device is supported by whatever other software, # see https://bugzilla.novell.com/show_bug.cgi?id=439193 -# Extract a list of USB IDs for "unsupported" scanners -# and store it because it is also needed later to -# disable "unsupported" model entries in the HAL fdi file 70-scanner.fdi +# Extract a list of USB IDs for "unsupported" scanners and store them in unsupportedUSBIDs. # It can happen that there is a status "unsupported" entry for a backend # for a model which is actually supported by another backend, for example # the "Epson Perfection 1670" is "unsupported" by the "epkowa" backend @@ -545,68 +548,11 @@ done for m in $( sed -e 's/0x/./ig' -e 's/:/.,.ATTR.idProduct.==/' unsupportedUSBIDs ) do sed -i -e "/^ATTR.idVendor.==$m/Is/^ATTR/# ATTR/" tools/udev/libsane.rules done -# newer udev versions complain about NAME="%k" usage, saying it's superfluous +# Newer udev versions complain about NAME="%k" usage with warning messages like +# 'udevd[1234]: NAME="%k" is superfluous and breaks kernel supplied names...' sed -i -e 's/NAME="%k", //' tools/udev/libsane.rules # Install the udev rules file: install -m644 tools/udev/libsane.rules %{buildroot}%{_sysconfdir}/udev/rules.d/55-libsane.rules -# Regarding HAL: -# Modify the generated tools/hal/libsane.fdi file as follows: -# Remove 'key="scanner.access_method"' lines. -sed -i -e '/key="scanner.access_method"/d' tools/hal/libsane.fdi -# There is a small number of USB scanners which are not talked to via libusb. -# They talk an unusual protocol which is a derivative of usb storage. -# User space should treat them as SCSI scanners. -# Furthermore, granting access via libusb here could oops the kernel. -# Therefore USB user access for those scanners must be disabled. -# See the Novell/Suse Bugzilla bug -# https://bugzilla.novell.com/show_bug.cgi?id=341565 -# This is done by replacing the append of "scanner" to info.capabilities by "SCSIviaUSBscanner". -# This way the YaST scanner module can inspect 70-scanner.fdi to learn which models -# it must not add to 80-scanner.fdi (i.e. the explicitely marked as "SCSIviaUSBscanner" models). -# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters -# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used: -sed -i -e '/usb.vendor_id.*0x04ce/I,/append key/{/usb.product_id.*0x0300/I,/append key/s/scanner/SCSIviaUSBscanner/g}' tools/hal/libsane.fdi -for ID in 0094 0099 009a 00a0 00a3 80a3 80ac 00b6 -do sed -i -e "/usb.vendor_id.*0x05da/I,/append key/{/usb.product_id.*0x$ID/I,/append key/s/scanner/SCSIviaUSBscanner/g}" tools/hal/libsane.fdi -done -# Disable entries for USB scanners which are "unsupported" -# but keep the entries for models for which the support status -# is "complete", "good", "basic", "minimal", "untested" -# because the HAL fdi file is used to grant normal user access -# for scanner devices which is needed for any scanner -# (regardless to what extent it is actually supported). -# The only exception are unsupported models -# because it seems to be wrong to have "known but unsupported" devices -# listed in the HAL fdi file because it seems not to make sense -# to grant normal user access for devices which are not -# supported by SANE which would even cause conflicts if such a -# device is supported by whatever other software, -# see https://bugzilla.novell.com/show_bug.cgi?id=444158 -# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters -# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used: -for ID in $( cat unsupportedUSBIDs ) -do V="$( echo $ID | cut -d : -s -f 1 )" - P="$( echo $ID | cut -d : -s -f 2 )" - sed -i -e "/usb.vendor_id.*$V/I,/info.capabilities/{/usb.product_id.*$P/I,/info.capabilities/{s//append> -->/}}" tools/hal/libsane.fdi -done -%if 0%{?suse_version} < 1110 -# for hal-resmgr -# Replace 'key="info.bus" string="usb"' by 'key="info.subsystem" string="usb_device"', -# and replace 'key="usb.vendor_id"' by 'key="usb_device.vendor_id"', -# and replace 'key="usb.product_id"' by 'key="usb_device.product_id"', -# see the Novell/Suse Bugzilla bug -# https://bugzilla.novell.com/show_bug.cgi?id=250659 -sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb_device"/' tools/hal/libsane.fdi -sed -i -e 's/key="usb.vendor_id"/key="usb_device.vendor_id"/' tools/hal/libsane.fdi -sed -i -e 's/key="usb.product_id"/key="usb_device.product_id"/' tools/hal/libsane.fdi -%else -# for hal-acl-tool -# https://bugzilla.novell.com/show_bug.cgi?id=438867 -sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb"/' tools/hal/libsane.fdi -%endif -# Install the HAL fdi file: -install -d %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty -install -m644 tools/hal/libsane.fdi %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi # xinetd stuff: install -d -m755 %{buildroot}%{_sysconfdir}/xinetd.d/ install -m644 %{SOURCE101} %{buildroot}%{_sysconfdir}/xinetd.d/ @@ -617,7 +563,7 @@ install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d %post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun -p /sbin/ldconfig %files -f sane-backends.lang %defattr(-,root,root) @@ -628,11 +574,6 @@ install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d %dir %{_sysconfdir}/udev %dir %{_sysconfdir}/udev/rules.d %{_sysconfdir}/udev/rules.d/55-libsane.rules -%dir %{_datadir}/hal -%dir %{_datadir}/hal/fdi -%dir %{_datadir}/hal/fdi/information -%dir %{_datadir}/hal/fdi/information/20thirdparty -%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi %{_sbindir}/saned %{_bindir}/scanimage %{_bindir}/sane-config From fb658fbcb5583dad9fa1ae73537824ac74709505f6e86a91d1aa7d500783d234 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Wed, 28 Apr 2010 13:42:06 +0000 Subject: [PATCH 3/5] Accepting request 39007 from home:jsmeix:branches:graphics Copy from home:jsmeix:branches:graphics/sane-backends via accept of submit request 39007 revision 2. Request was accepted with message: Re-added /usr/lib[64]/libsane.so OBS-URL: https://build.opensuse.org/request/show/39007 OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=21 --- sane-backends.changes | 5 +---- sane-backends.spec | 12 ++++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/sane-backends.changes b/sane-backends.changes index 89f8f97..fc9126f 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -5,10 +5,7 @@ Wed Apr 28 11:27:50 CEST 2010 - jsmeix@suse.de device access permissions for scanners to the currently logged in "desktop" user. Therefore all HAL related stuff was removed (see Novell/Suse Bugzilla bnc#593946). -- Removed /usr/lib[64]/libsane.so and /usr/lib[64]/libsane.la - which are not needed by scanning frontends which are provided - by openSUSE because /usr/bin/scanimage, /usr/bin/xsane, - and /usr/bin/skanlite link with /usr/libi[64]/libsane.so.1 +- Removed /usr/lib[64]/libsane.la (see Novell/Suse Bugzilla bnc#592143). ------------------------------------------------------------------- diff --git a/sane-backends.spec b/sane-backends.spec index 9102f76..6a2aa77 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -399,13 +399,13 @@ make install DESTDIR=%{buildroot} rm %{buildroot}%{_libdir}/sane/libsane-*.so rm %{buildroot}%{_libdir}/sane/libsane-*.la # Because of https://bugzilla.novell.com/show_bug.cgi?id=592143 for openSUSE 11.3 -# even those files for the dll meta-backend /usr/lib/libsane.so and /usr/lib/libsane.la -# are removed regardless that it is unknown how whatever third-party scanning frontend +# even the /usr/lib/libsane.la file for the dll meta-backend is removed +# regardless that it is unknown how whatever third-party scanning frontend # may like to link with SANE (i.e. with the dll meta-backend). -# At least the frontends which are provided by openSUSE /usr/bin/scanimage, /usr/bin/xsane, -# and /usr/bin/skanlite link with /usr/lib/libsane.so.1 so that those frontends -# neither need /usr/lib/libsane.so nor /usr/lib/libsane.la: -rm %{buildroot}%{_libdir}/libsane.so +# The frontends which are provided by openSUSE /usr/bin/scanimage, +# /usr/bin/xsane, and /usr/bin/skanlite do not need it. +# The /usr/lib/libsane.so link for the dll meta-backend is kept because it is needed +# during build-time by other packages which need sane-backends to build. rm %{buildroot}%{_libdir}/libsane.la # Disable all backends in /etc/sane.d/dll.conf to avoid problems when backends are active by default: perl -pi -e 's/^([^#].*)$/#$1/' %{buildroot}%{_sysconfdir}/sane.d/dll.conf From dd95fb41c1d7b63df8c285fac653561190bdf0949d828e5416f6cf1a89de61bf Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 28 Apr 2010 21:09:37 +0000 Subject: [PATCH 4/5] Accepting request 39009 from graphics checked in (request 39009) OBS-URL: https://build.opensuse.org/request/show/39009 OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=22 --- sane-backends.changes | 10 ----- sane-backends.spec | 89 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 74 insertions(+), 25 deletions(-) diff --git a/sane-backends.changes b/sane-backends.changes index fc9126f..fff593c 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,13 +1,3 @@ -------------------------------------------------------------------- -Wed Apr 28 11:27:50 CEST 2010 - jsmeix@suse.de - -- HAL is deprecated and does no longer support to grant read/write - device access permissions for scanners to the currently logged - in "desktop" user. Therefore all HAL related stuff was removed - (see Novell/Suse Bugzilla bnc#593946). -- Removed /usr/lib[64]/libsane.la - (see Novell/Suse Bugzilla bnc#592143). - ------------------------------------------------------------------- Mon Feb 1 12:29:15 UTC 2010 - jengelh@medozas.de diff --git a/sane-backends.spec b/sane-backends.spec index 6a2aa77..ec3896e 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -396,17 +396,11 @@ make install DESTDIR=%{buildroot} # The dll meta-backend needs neither libsane-.so nor libsane-.la. # RPMLINT complains about libsane-.so with "devel-file-in-non-devel-package". # Therefore the libsane-.so and libsane-.la files are simply removed. +# Note that those files for the dll meta-backend /usr/lib/libsane.so and /usr/lib/libsane.la +# are not removed because it is unknown how whatever third-party scanning frontend +# may like to link with SANE (i.e. with the dll meta-backend). rm %{buildroot}%{_libdir}/sane/libsane-*.so rm %{buildroot}%{_libdir}/sane/libsane-*.la -# Because of https://bugzilla.novell.com/show_bug.cgi?id=592143 for openSUSE 11.3 -# even the /usr/lib/libsane.la file for the dll meta-backend is removed -# regardless that it is unknown how whatever third-party scanning frontend -# may like to link with SANE (i.e. with the dll meta-backend). -# The frontends which are provided by openSUSE /usr/bin/scanimage, -# /usr/bin/xsane, and /usr/bin/skanlite do not need it. -# The /usr/lib/libsane.so link for the dll meta-backend is kept because it is needed -# during build-time by other packages which need sane-backends to build. -rm %{buildroot}%{_libdir}/libsane.la # Disable all backends in /etc/sane.d/dll.conf to avoid problems when backends are active by default: perl -pi -e 's/^([^#].*)$/#$1/' %{buildroot}%{_sysconfdir}/sane.d/dll.conf # Allow all users to write into /var/lock/sane/ so that the backends work for normal users @@ -471,7 +465,7 @@ sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{build # 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 the udev libsane.rules file +# 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 @@ -482,7 +476,8 @@ sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{build # (the usual delimiter '/' cannot be used because buildroot contains it too): sed -i -e 's|/usr/share/sane/descriptions|%{buildroot}/usr/share/sane/descriptions|' create_scanner_database # Create the scanner database and store it because it is also needed later -# to disable "unsupported" model entries in the udev libsane.rules file. +# to disable "unsupported" model entries both in the udev rules file libsane.rules +# and in the HAL fdi file 70-scanner.fdi. # The file name "scanner.database" is used hardcoded in create_sane-backends-autoconfig.rules. ./create_scanner_database >scanner.database # Run create_sane-backends-autoconfig.rules which reads scanner.database @@ -533,7 +528,9 @@ sed -i -e 's/^ENV{DEVTYPE}/# ENV{DEVTYPE}/' tools/udev/libsane.rules # supported by SANE which would even cause conflicts if such a # device is supported by whatever other software, # see https://bugzilla.novell.com/show_bug.cgi?id=439193 -# Extract a list of USB IDs for "unsupported" scanners and store them in unsupportedUSBIDs. +# Extract a list of USB IDs for "unsupported" scanners +# and store it because it is also needed later to +# disable "unsupported" model entries in the HAL fdi file 70-scanner.fdi # It can happen that there is a status "unsupported" entry for a backend # for a model which is actually supported by another backend, for example # the "Epson Perfection 1670" is "unsupported" by the "epkowa" backend @@ -548,11 +545,68 @@ done for m in $( sed -e 's/0x/./ig' -e 's/:/.,.ATTR.idProduct.==/' unsupportedUSBIDs ) do sed -i -e "/^ATTR.idVendor.==$m/Is/^ATTR/# ATTR/" tools/udev/libsane.rules done -# Newer udev versions complain about NAME="%k" usage with warning messages like -# 'udevd[1234]: NAME="%k" is superfluous and breaks kernel supplied names...' +# newer udev versions complain about NAME="%k" usage, saying it's superfluous sed -i -e 's/NAME="%k", //' tools/udev/libsane.rules # Install the udev rules file: install -m644 tools/udev/libsane.rules %{buildroot}%{_sysconfdir}/udev/rules.d/55-libsane.rules +# Regarding HAL: +# Modify the generated tools/hal/libsane.fdi file as follows: +# Remove 'key="scanner.access_method"' lines. +sed -i -e '/key="scanner.access_method"/d' tools/hal/libsane.fdi +# There is a small number of USB scanners which are not talked to via libusb. +# They talk an unusual protocol which is a derivative of usb storage. +# User space should treat them as SCSI scanners. +# Furthermore, granting access via libusb here could oops the kernel. +# Therefore USB user access for those scanners must be disabled. +# See the Novell/Suse Bugzilla bug +# https://bugzilla.novell.com/show_bug.cgi?id=341565 +# This is done by replacing the append of "scanner" to info.capabilities by "SCSIviaUSBscanner". +# This way the YaST scanner module can inspect 70-scanner.fdi to learn which models +# it must not add to 80-scanner.fdi (i.e. the explicitely marked as "SCSIviaUSBscanner" models). +# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters +# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used: +sed -i -e '/usb.vendor_id.*0x04ce/I,/append key/{/usb.product_id.*0x0300/I,/append key/s/scanner/SCSIviaUSBscanner/g}' tools/hal/libsane.fdi +for ID in 0094 0099 009a 00a0 00a3 80a3 80ac 00b6 +do sed -i -e "/usb.vendor_id.*0x05da/I,/append key/{/usb.product_id.*0x$ID/I,/append key/s/scanner/SCSIviaUSBscanner/g}" tools/hal/libsane.fdi +done +# Disable entries for USB scanners which are "unsupported" +# but keep the entries for models for which the support status +# is "complete", "good", "basic", "minimal", "untested" +# because the HAL fdi file is used to grant normal user access +# for scanner devices which is needed for any scanner +# (regardless to what extent it is actually supported). +# The only exception are unsupported models +# because it seems to be wrong to have "known but unsupported" devices +# listed in the HAL fdi file because it seems not to make sense +# to grant normal user access for devices which are not +# supported by SANE which would even cause conflicts if such a +# device is supported by whatever other software, +# see https://bugzilla.novell.com/show_bug.cgi?id=444158 +# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters +# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used: +for ID in $( cat unsupportedUSBIDs ) +do V="$( echo $ID | cut -d : -s -f 1 )" + P="$( echo $ID | cut -d : -s -f 2 )" + sed -i -e "/usb.vendor_id.*$V/I,/info.capabilities/{/usb.product_id.*$P/I,/info.capabilities/{s//append> -->/}}" tools/hal/libsane.fdi +done +%if 0%{?suse_version} < 1110 +# for hal-resmgr +# Replace 'key="info.bus" string="usb"' by 'key="info.subsystem" string="usb_device"', +# and replace 'key="usb.vendor_id"' by 'key="usb_device.vendor_id"', +# and replace 'key="usb.product_id"' by 'key="usb_device.product_id"', +# see the Novell/Suse Bugzilla bug +# https://bugzilla.novell.com/show_bug.cgi?id=250659 +sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb_device"/' tools/hal/libsane.fdi +sed -i -e 's/key="usb.vendor_id"/key="usb_device.vendor_id"/' tools/hal/libsane.fdi +sed -i -e 's/key="usb.product_id"/key="usb_device.product_id"/' tools/hal/libsane.fdi +%else +# for hal-acl-tool +# https://bugzilla.novell.com/show_bug.cgi?id=438867 +sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb"/' tools/hal/libsane.fdi +%endif +# Install the HAL fdi file: +install -d %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty +install -m644 tools/hal/libsane.fdi %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi # xinetd stuff: install -d -m755 %{buildroot}%{_sysconfdir}/xinetd.d/ install -m644 %{SOURCE101} %{buildroot}%{_sysconfdir}/xinetd.d/ @@ -563,7 +617,7 @@ install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d %post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun -p /sbin/ldconfig %files -f sane-backends.lang %defattr(-,root,root) @@ -574,6 +628,11 @@ install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d %dir %{_sysconfdir}/udev %dir %{_sysconfdir}/udev/rules.d %{_sysconfdir}/udev/rules.d/55-libsane.rules +%dir %{_datadir}/hal +%dir %{_datadir}/hal/fdi +%dir %{_datadir}/hal/fdi/information +%dir %{_datadir}/hal/fdi/information/20thirdparty +%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi %{_sbindir}/saned %{_bindir}/scanimage %{_bindir}/sane-config From 6f19cd39d0b524c59bc0a960cd70a7d80e0ddd682384112a005cdebeb7a452d1 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Wed, 28 Apr 2010 21:09:38 +0000 Subject: [PATCH 5/5] Updating link to change in openSUSE:Factory/sane-backends revision 42.0 OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=72851e13cf1f326387469d3c08e8f73a --- sane-backends.changes | 10 +++++ sane-backends.spec | 91 ++++++++----------------------------------- 2 files changed, 26 insertions(+), 75 deletions(-) diff --git a/sane-backends.changes b/sane-backends.changes index fff593c..fc9126f 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Apr 28 11:27:50 CEST 2010 - jsmeix@suse.de + +- HAL is deprecated and does no longer support to grant read/write + device access permissions for scanners to the currently logged + in "desktop" user. Therefore all HAL related stuff was removed + (see Novell/Suse Bugzilla bnc#593946). +- Removed /usr/lib[64]/libsane.la + (see Novell/Suse Bugzilla bnc#592143). + ------------------------------------------------------------------- Mon Feb 1 12:29:15 UTC 2010 - jengelh@medozas.de diff --git a/sane-backends.spec b/sane-backends.spec index ec3896e..761be15 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -25,7 +25,7 @@ Group: Hardware/Scanner AutoReqProv: on Summary: SANE (Scanner Access Now Easy) Scanner Drivers Version: 1.0.20 -Release: 10 +Release: 11 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 @@ -396,11 +396,17 @@ make install DESTDIR=%{buildroot} # The dll meta-backend needs neither libsane-.so nor libsane-.la. # RPMLINT complains about libsane-.so with "devel-file-in-non-devel-package". # Therefore the libsane-.so and libsane-.la files are simply removed. -# Note that those files for the dll meta-backend /usr/lib/libsane.so and /usr/lib/libsane.la -# are not removed because it is unknown how whatever third-party scanning frontend -# may like to link with SANE (i.e. with the dll meta-backend). rm %{buildroot}%{_libdir}/sane/libsane-*.so rm %{buildroot}%{_libdir}/sane/libsane-*.la +# Because of https://bugzilla.novell.com/show_bug.cgi?id=592143 for openSUSE 11.3 +# even the /usr/lib/libsane.la file for the dll meta-backend is removed +# regardless that it is unknown how whatever third-party scanning frontend +# may like to link with SANE (i.e. with the dll meta-backend). +# The frontends which are provided by openSUSE /usr/bin/scanimage, +# /usr/bin/xsane, and /usr/bin/skanlite do not need it. +# The /usr/lib/libsane.so link for the dll meta-backend is kept because it is needed +# during build-time by other packages which need sane-backends to build. +rm %{buildroot}%{_libdir}/libsane.la # Disable all backends in /etc/sane.d/dll.conf to avoid problems when backends are active by default: perl -pi -e 's/^([^#].*)$/#$1/' %{buildroot}%{_sysconfdir}/sane.d/dll.conf # Allow all users to write into /var/lock/sane/ so that the backends work for normal users @@ -465,7 +471,7 @@ sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{build # 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 +# But this is already in place via the the udev libsane.rules 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 @@ -476,8 +482,7 @@ sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{build # (the usual delimiter '/' cannot be used because buildroot contains it too): sed -i -e 's|/usr/share/sane/descriptions|%{buildroot}/usr/share/sane/descriptions|' create_scanner_database # Create the scanner database and store it because it is also needed later -# to disable "unsupported" model entries both in the udev rules file libsane.rules -# and in the HAL fdi file 70-scanner.fdi. +# to disable "unsupported" model entries in the udev libsane.rules file. # The file name "scanner.database" is used hardcoded in create_sane-backends-autoconfig.rules. ./create_scanner_database >scanner.database # Run create_sane-backends-autoconfig.rules which reads scanner.database @@ -528,9 +533,7 @@ sed -i -e 's/^ENV{DEVTYPE}/# ENV{DEVTYPE}/' tools/udev/libsane.rules # supported by SANE which would even cause conflicts if such a # device is supported by whatever other software, # see https://bugzilla.novell.com/show_bug.cgi?id=439193 -# Extract a list of USB IDs for "unsupported" scanners -# and store it because it is also needed later to -# disable "unsupported" model entries in the HAL fdi file 70-scanner.fdi +# Extract a list of USB IDs for "unsupported" scanners and store them in unsupportedUSBIDs. # It can happen that there is a status "unsupported" entry for a backend # for a model which is actually supported by another backend, for example # the "Epson Perfection 1670" is "unsupported" by the "epkowa" backend @@ -545,68 +548,11 @@ done for m in $( sed -e 's/0x/./ig' -e 's/:/.,.ATTR.idProduct.==/' unsupportedUSBIDs ) do sed -i -e "/^ATTR.idVendor.==$m/Is/^ATTR/# ATTR/" tools/udev/libsane.rules done -# newer udev versions complain about NAME="%k" usage, saying it's superfluous +# Newer udev versions complain about NAME="%k" usage with warning messages like +# 'udevd[1234]: NAME="%k" is superfluous and breaks kernel supplied names...' sed -i -e 's/NAME="%k", //' tools/udev/libsane.rules # Install the udev rules file: install -m644 tools/udev/libsane.rules %{buildroot}%{_sysconfdir}/udev/rules.d/55-libsane.rules -# Regarding HAL: -# Modify the generated tools/hal/libsane.fdi file as follows: -# Remove 'key="scanner.access_method"' lines. -sed -i -e '/key="scanner.access_method"/d' tools/hal/libsane.fdi -# There is a small number of USB scanners which are not talked to via libusb. -# They talk an unusual protocol which is a derivative of usb storage. -# User space should treat them as SCSI scanners. -# Furthermore, granting access via libusb here could oops the kernel. -# Therefore USB user access for those scanners must be disabled. -# See the Novell/Suse Bugzilla bug -# https://bugzilla.novell.com/show_bug.cgi?id=341565 -# This is done by replacing the append of "scanner" to info.capabilities by "SCSIviaUSBscanner". -# This way the YaST scanner module can inspect 70-scanner.fdi to learn which models -# it must not add to 80-scanner.fdi (i.e. the explicitely marked as "SCSIviaUSBscanner" models). -# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters -# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used: -sed -i -e '/usb.vendor_id.*0x04ce/I,/append key/{/usb.product_id.*0x0300/I,/append key/s/scanner/SCSIviaUSBscanner/g}' tools/hal/libsane.fdi -for ID in 0094 0099 009a 00a0 00a3 80a3 80ac 00b6 -do sed -i -e "/usb.vendor_id.*0x05da/I,/append key/{/usb.product_id.*0x$ID/I,/append key/s/scanner/SCSIviaUSBscanner/g}" tools/hal/libsane.fdi -done -# Disable entries for USB scanners which are "unsupported" -# but keep the entries for models for which the support status -# is "complete", "good", "basic", "minimal", "untested" -# because the HAL fdi file is used to grant normal user access -# for scanner devices which is needed for any scanner -# (regardless to what extent it is actually supported). -# The only exception are unsupported models -# because it seems to be wrong to have "known but unsupported" devices -# listed in the HAL fdi file because it seems not to make sense -# to grant normal user access for devices which are not -# supported by SANE which would even cause conflicts if such a -# device is supported by whatever other software, -# see https://bugzilla.novell.com/show_bug.cgi?id=444158 -# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters -# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used: -for ID in $( cat unsupportedUSBIDs ) -do V="$( echo $ID | cut -d : -s -f 1 )" - P="$( echo $ID | cut -d : -s -f 2 )" - sed -i -e "/usb.vendor_id.*$V/I,/info.capabilities/{/usb.product_id.*$P/I,/info.capabilities/{s//append> -->/}}" tools/hal/libsane.fdi -done -%if 0%{?suse_version} < 1110 -# for hal-resmgr -# Replace 'key="info.bus" string="usb"' by 'key="info.subsystem" string="usb_device"', -# and replace 'key="usb.vendor_id"' by 'key="usb_device.vendor_id"', -# and replace 'key="usb.product_id"' by 'key="usb_device.product_id"', -# see the Novell/Suse Bugzilla bug -# https://bugzilla.novell.com/show_bug.cgi?id=250659 -sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb_device"/' tools/hal/libsane.fdi -sed -i -e 's/key="usb.vendor_id"/key="usb_device.vendor_id"/' tools/hal/libsane.fdi -sed -i -e 's/key="usb.product_id"/key="usb_device.product_id"/' tools/hal/libsane.fdi -%else -# for hal-acl-tool -# https://bugzilla.novell.com/show_bug.cgi?id=438867 -sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb"/' tools/hal/libsane.fdi -%endif -# Install the HAL fdi file: -install -d %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty -install -m644 tools/hal/libsane.fdi %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi # xinetd stuff: install -d -m755 %{buildroot}%{_sysconfdir}/xinetd.d/ install -m644 %{SOURCE101} %{buildroot}%{_sysconfdir}/xinetd.d/ @@ -617,7 +563,7 @@ install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d %post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun -p /sbin/ldconfig %files -f sane-backends.lang %defattr(-,root,root) @@ -628,11 +574,6 @@ install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d %dir %{_sysconfdir}/udev %dir %{_sysconfdir}/udev/rules.d %{_sysconfdir}/udev/rules.d/55-libsane.rules -%dir %{_datadir}/hal -%dir %{_datadir}/hal/fdi -%dir %{_datadir}/hal/fdi/information -%dir %{_datadir}/hal/fdi/information/20thirdparty -%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi %{_sbindir}/saned %{_bindir}/scanimage %{_bindir}/sane-config