1
0
forked from pool/sane-backends
OBS User unknown 2008-02-28 17:24:23 +00:00 committed by Git OBS Bridge
parent df76a8fc61
commit 733cf8a792
14 changed files with 311 additions and 1711 deletions

View File

@ -1,61 +0,0 @@
#! /bin/bash
#
# Johannes Meixner <jsmeix@suse.de>, 2004, 2005, 2006
#set -x
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
MY_NAME=${0##*/}
# Input:
# Create temporary files:
TMP_DATA=$(mktemp -u /tmp/$MY_NAME.XXXXXX)
# Extract USB entries from the libsane.rules file:
test -n "$1" && RULES_FILE="$1" || RULES_FILE="libsane.rules"
ls $RULES_FILE &>/dev/null || { echo "$MY_NAME error: Required libsane.rules file $RULRS_FILE not found." 1>&2 ; exit 3 ; }
sed -n -e 's/^SYSFS{idVendor}=="\([^"]*\)", SYSFS{idProduct}=="\([^"]*\)",.*/\1 \2/p' $RULES_FILE | tr '[:upper:]' '[:lower:]' | sort -u >$TMP_DATA
# Output:
# Output header:
echo '<?xml version="1.0" encoding="ISO-8859-1"?>'
echo '<deviceinfo version="0.2">'
echo ' <device>'
echo
# Output generic SCSI scanner entry for those SCSI scanners which show up with scsi.type = scanner:
echo ' <match key="info.category" string="scsi_generic">'
echo ' <match key="@info.parent:scsi.type" string="scanner">'
echo ' <append key="info.capabilities" type="strlist">scanner</append>'
echo ' </match>'
echo ' </match>'
echo
# Output model specific USB scanner entries:
exec <$TMP_DATA
while read VENDOR PRODUCT
do echo ' <match key="info.bus" string="usb_device">'
echo " <match key=\"usb_device.vendor_id\" int=\"0x$VENDOR\">"
echo " <match key=\"usb_device.product_id\" int=\"0x$PRODUCT\">"
echo ' <append key="info.capabilities" type="strlist">scanner</append>'
echo ' </match>'
echo ' </match>'
echo ' </match>'
echo
done
# Output footer:
echo ' </device>'
echo '</deviceinfo>'
# Remove the temporary file
rm $TMP_DATA
exit 0

View File

@ -1,12 +0,0 @@
--- backend/canon-sane.c.orig 2006-12-08 12:05:25.000000000 +0100
+++ backend/canon-sane.c 2006-12-08 13:13:33.000000000 +0100
@@ -1797,7 +1797,8 @@ read_fs2710 (SANE_Handle handle, SANE_By
for (p = buf; p < buf + nread; p++)
{
b = *p;
- *p++ = *(p + 1);
+ *p = *(p + 1);
+ p++;
*p = b;
}
#endif

View File

@ -1,42 +1,3 @@
--- backend/epson.c.orig 2006-07-04 14:45:33.000000000 +0200
+++ backend/epson.c 2006-07-04 14:46:27.000000000 +0200
@@ -1331,7 +1331,7 @@ set_gamma_table (Epson_Scanner * s)
{
for (i = 0; i < 256; i += 16)
{
- char gammaValues[16 * 3 + 1], newValue[3];
+ char gammaValues[16 * 3 + 1], newValue[4];
gammaValues[0] = '\0';
--- backend/as6e.c.orig 2004-10-03 16:21:45.000000000 +0200
+++ backend/as6e.c 2006-10-27 12:52:54.000000000 +0200
@@ -811,9 +811,11 @@ check_for_driver (const char *devname)
dir[count - offset] = path[count];
count++;
}
- strncpy (fullname, dir, NAMESIZE);
- strncat (fullname, "/", NAMESIZE);
- strncat (fullname, devname, NAMESIZE);
+ /* use sizeof(fullname)-1 to make sure there is at least one padded null byte */
+ strncpy (fullname, dir, sizeof(fullname)-1);
+ /* take into account that fullname already contains non-null bytes */
+ strncat (fullname, "/", sizeof(fullname)-strlen(fullname)-1);
+ strncat (fullname, devname, sizeof(fullname)-strlen(fullname)-1);
if (!stat (fullname, &statbuf))
{
modes = statbuf.st_mode;
--- sanei/sanei_ab306.c.orig 2007-01-31 14:13:16.000000000 +0100
+++ sanei/sanei_ab306.c 2007-01-31 14:38:26.000000000 +0100
@@ -273,7 +273,7 @@ sanei_ab306_open (const char *dev, int *
if (port[i].base == base)
break;
- if (port[i].base != base)
+ if (i >= NELEMS(port))
{
DBG(1, "sanei_ab306_open: %lx is not a valid base address\n", base);
return SANE_STATUS_INVAL;
--- backend/niash.c.orig 2006-02-04 12:34:28.000000000 +0100
+++ backend/niash.c 2007-02-21 15:38:12.000000000 +0100
@@ -89,7 +89,9 @@ typedef enum

View File

@ -1,11 +1,14 @@
--- backend/teco2.c.orig 2005-09-20 10:11:59.000000000 +0200
+++ backend/teco2.c 2006-09-18 14:35:06.000000000 +0200
@@ -1524,7 +1524,7 @@ teco_request_sense (Teco_Scanner * dev)
--- backend/avision.c.orig 2008-02-09 11:42:46.000000000 +0100
+++ backend/avision.c 2008-02-27 13:35:18.000000000 +0100
@@ -4375,8 +4375,9 @@ set_calib_data (Avision_Scanner* s, stru
static uint8_t*
sort_and_average (struct calibration_format* format, uint8_t* data)
{
CDB cdb;
SANE_Status status;
- size_t size;
+ size_t size = 0;
MKSCSI_REQUEST_SENSE (cdb, size);
- int stride, i, line;
- int elements_per_line;
+ int stride = 1;
+ int i, line;
+ int elements_per_line = format->pixel_per_line * format->channels;
uint8_t *sort_data, *avg_data;

View File

@ -1,19 +0,0 @@
--- backend/fujitsu.c.orig 2006-06-26 19:08:38.000000000 +0200
+++ backend/fujitsu.c 2006-09-04 11:19:25.000000000 +0200
@@ -2682,7 +2682,15 @@ get_hardware_status (struct fujitsu *s)
s->hw_skew_angle = get_HW_skew_angle(buffer);
- s->hw_ink_remain = get_HW_ink_remain(buffer);
+ /* This would read the 11-th byte from buffer because
+ * get_HW_ink_remain(buffer) expands to buffer[10].
+ * Asking the scanner for 11 bytes will cause some older
+ * models to choke, as they only provide 10 bytes.
+ * Therefore hw_ink_remain is disabled, as the ink level
+ * is of no use currently, since the endorser is disabled.
+ * (See Suse Bugzilla bug 202243).
+ s->hw_ink_remain = get_HW_ink_remain(buffer);
+ */
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
--- backend/Makefile.in
+++ backend/Makefile.in
@@ -180,7 +180,7 @@ DISTFILES = abaton.c abaton.conf.in abaton.h agfafocus.c agfafocus.conf.in \
libsane-%.la: %.lo %-s.lo $(EXTRA) $(LIBOBJS)
@$(LIBTOOL) $(MLINK) $(CC) -export-dynamic -o $@ $($*_LIBS) \
$(LDFLAGS) $(BACKENDLIBS) $^ @LIBTOOL_LINK_EXTRA@ -rpath $(libsanedir) \
- -version-info $(V_MAJOR):$(V_REV):$(V_MINOR) $(DYNAMIC_FLAG)
+ -module -avoid-version -no-undefined
%-s.lo: %-s.c
@$(LIBTOOL) $(MCOMP) $(COMPILE) -DSTUBS -DBACKEND_NAME=$* $<

View File

@ -1,32 +0,0 @@
--- sanei/sanei_scsi.c 22 Nov 2005 21:17:20 -0000 1.58
+++ sanei/sanei_scsi.c 19 Jan 2007 07:10:30 -0000
@@ -281,6 +281,20 @@ static char lastrcmd[16]; /* hold comman
# define MAX_DATA (32*1024)
#endif
+#ifdef SG_SET_TIMEOUT
+# ifdef _SC_CLK_TCK
+# define GNU_HZ sysconf(_SC_CLK_TCK)
+# else
+# ifdef HZ
+# define GNU_HZ HZ
+# else
+# ifdef CLOCKS_PER_SEC
+# define GNU_HZ CLOCKS_PER_SEC
+# endif
+# endif
+# endif
+#endif
+
/* default timeout value: 120 seconds */
static int sane_scsicmd_timeout = 120;
int sanei_scsi_max_request_size = MAX_DATA;
@@ -1273,7 +1287,7 @@ sanei_scsi_open (const char *dev, int *f
disconnect... ;-( */
{
int timeout;
- timeout = sane_scsicmd_timeout * HZ;
+ timeout = sane_scsicmd_timeout * GNU_HZ;
ioctl (fd, SG_SET_TIMEOUT, &timeout);
}
#endif

View File

@ -1,11 +0,0 @@
--- po/Makefile.in.orig 2005-07-15 22:50:41.000000000 +0200
+++ po/Makefile.in 2005-08-08 15:25:50.000000000 +0200
@@ -2,7 +2,7 @@
#
# See po/README for documentation.
-ALL_LINGUAS = bg cs da de es fi fr it nl no pl pt ru sv
+ALL_LINGUAS = bg cs da de es fi fr it nl nb pl pt ru sv
SRC_FILES = ../include/sane/saneopts.h ../backend/artec_eplus48u.c \
../backend/avision.h \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30efa94c16320676f8146db1b5bf740306f14114585888eb38a757d4a6836c7d
size 2828432

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1ff8db743b8aab67e0b28e30f86af53c15df81b3bf9d61c26ae7d6338034105a
size 3345711

View File

@ -1,8 +1,64 @@
-------------------------------------------------------------------
Thu Feb 28 13:56:15 CET 2008 - jsmeix@suse.de
- Updated to sane-backends version 1.0.19:
New backends:
cardscan (Corex Cardscan 800c), epjitsu (Epson-based Fujitsu),
epson2 (various Epson scanners), hp3900 (HP ScanJet 3970 and
more), hp5590 (HP ScanJet 5590 and more), hpljm1005 (HP LaserJet
M1005 and more), hs2p (Ricoh IS400 series)
Updated backends:
abaton, agfafocus, apple, artec, artec_eplus48u, as6e, avision,
canon, coolscan, coolscan2, dc25, dell1600n_net, dll, epson,
fujitsu, genesys, gt68xx, hp3500, ibm, lexmark, microtek,
microtek2, mustek, nec, net, pie, pint, pixma, plustek,
plustek_pp, ricoh, s9036, sm3600, sm3840, snapscan, sp15c,
st400, tamarack, teco2, test, u12, umax, umax1220u, umax_pp
Plus:
Scanimage detects more chipsets.
Internal scsi, usb, tcp and udp code updates.
Basic HAL .fdi creation support
Build system updates.
Updated translations.
Documentation updates.
Bugfixes.
Note:
This will be (hopefully) the last release of the SANE 1.0 series.
The next release will be extended (in a backwards compatible
fashion) to support more features of modern scanners.
- sane-backends-1.0.16-nb.patch (did locale rename: no -> nb)
is obsolete since version 1.0.19 because it uses already 'nb'.
- in fix-buffer-overflow.patch the overflows in backend/epson.c
backend/as6e.c and sanei/sanei_ab306.c are obsolete because
they are fixed in the source (only backend/niash.c is left).
- replace-HZ-by-sysconf_SC_CLK_TCK.patch is obsolete because
it is fixed in the source.
- fujitsu-disable-hw_ink_remain.patch is obsolete because
it is fixed in the source.
- in fix-uninitialized-variables.patch the fix regarding
teco2.c is obsolete because it is fixed in the source
but a new fix regarding avision.c was added.
- fix-ambiguous-post-pre-increment.patch is obsolete because
it is fixed in the source.
- module-build.diff is dropped because there is no reason to build
driver modules as libtool modules and furthermore it makes our
package incompatible with the rest of the SANE world.
- Since version 1.0.19 there is udev and HAL support.
Therefore the old/outdated hotplug stuff (libsane.usermap
and libusbscanner) is dropped (it was never used by openSUSE).
Also the evil-hack init-script "sane-dev" is no longer provided.
libsane.rules.CVS-2007-07-29.using-lp is obsolete because
the udev rules file 55-libsane.rules is directly derived
from tools/udev/libsane.rules.
create_hal_global_fdi_from_libsane.rules is obsolete because
the HAL fdi file 70-scanner.fdi is directly derived
from tools/hal/libsane.fdi.
-------------------------------------------------------------------
Thu Jan 31 10:45:45 CET 2008 - adrian@suse.de
- call create_hal_global_fdi_for_scanners via bash. We can not rely
on source file permissions
- Call create_hal_global_fdi_from_libsane.rules via bash.
We can not rely on source file permissions
-------------------------------------------------------------------
Tue Aug 14 16:07:08 CEST 2007 - jsmeix@suse.de
@ -10,7 +66,7 @@ Tue Aug 14 16:07:08 CEST 2007 - jsmeix@suse.de
- Replaced create_hal_global_fdi_for_scanners by
create_hal_global_fdi_from_libsane.rules which creates the
global HAL 70-scanner.fdi file during build-time from the
libsane.rules file (see Novell/Suse Bugzilla bug 298878).
libsane.rules file (see Novell/Suse Bugzilla bnc#298878).
-------------------------------------------------------------------
Fri Aug 10 14:48:13 CEST 2007 - jsmeix@suse.de
@ -32,12 +88,12 @@ Fri Aug 3 13:29:39 CEST 2007 - jsmeix@suse.de
Wed Jun 13 11:50:30 CEST 2007 - jsmeix@suse.de
- Adapted create_hal_global_fdi_for_scanners according to the
currently newest changes in HAL (see Suse Bugzilla bug 250659).
currently newest changes in HAL (see Suse Bugzilla bnc#250659).
-------------------------------------------------------------------
Wed Jun 6 15:25:26 CEST 2007 - dmueller@suse.de
- Build modules as libtool modules.
- module-build.diff builds driver modules as libtool modules.
-------------------------------------------------------------------
Sat Apr 21 15:15:08 CEST 2007 - aj@suse.de
@ -49,14 +105,14 @@ Wed Feb 21 15:40:03 CET 2007 - jsmeix@suse.de
- Added a fix for an "array subscript is above array bounds"
error in niash.c to fix-buffer-overflow.patch
(see Suse Bugzilla bug 246654).
(see Suse Bugzilla bnc#246654).
-------------------------------------------------------------------
Wed Jan 31 14:41:10 CET 2007 - jsmeix@suse.de
- Added a fix for an "array subscript is above array bounds"
error in sanei_ab306.c to fix-buffer-overflow.patch
(see Suse Bugzilla bug 239953).
(see Suse Bugzilla bnc#239953).
-------------------------------------------------------------------
Mon Jan 29 14:29:35 CET 2007 - jsmeix@suse.de
@ -84,7 +140,7 @@ Fri Oct 27 11:50:40 CEST 2006 - jsmeix@suse.de
to fix-buffer-overflow.patch.
- Replaced the complicated postinstall script by calling
create_hal_global_fdi_for_scanners which should obsolete
sane-dev (see Suse Bugzilla bug 160899).
sane-dev (see Suse Bugzilla bnc#160899).
- Moved sane-dev from {_initrddir} to {_datadir}/sane/ to have it
still available in case of backward compatibility problems.
@ -97,10 +153,10 @@ Sun Oct 22 12:25:08 CEST 2006 - meissner@suse.de
Mon Sep 18 14:47:07 CEST 2006 - jsmeix@suse.de
- fix-uninitialized-variables.patch fixes an uninitialized
variable in teco2.c (see Suse Bugzilla bug 205451).
variable in teco2.c (see Suse Bugzilla bnc#205451).
- create_hal_global_fdi_for_scanners can be called by HAL or YaST
to create a global HAL fdi file for scanners which are known
by the current SANE version (see Suse Bugzilla bug 160899).
by the current SANE version (see Suse Bugzilla bnc#160899).
-------------------------------------------------------------------
Mon Sep 11 10:53:35 CEST 2006 - jsmeix@suse.de
@ -114,19 +170,19 @@ Mon Sep 4 11:23:09 CEST 2006 - jsmeix@suse.de
- Replaced the fix from Thu Aug 31 in fujitsu.c by a new fix
fujitsu-disable-hw_ink_remain.patch which disables hw_ink_remain
which causes a buffer overflow (see Suse Bugzilla bug 202243).
which causes a buffer overflow (see Suse Bugzilla bnc#202243).
-------------------------------------------------------------------
Thu Aug 31 15:09:06 CEST 2006 - jsmeix@suse.de
- Added a fix of a too small char array in fujitsu.c to
fix-buffer-overflow.patch (see Suse Bugzilla bug 202243).
fix-buffer-overflow.patch (see Suse Bugzilla bnc#202243).
-------------------------------------------------------------------
Fri Jul 21 10:20:00 CEST 2006 - jsmeix@suse.de
- canon-backend-autoprobing.patch lets the "canon" backend
do scanner auto-recognition (see Suse Bugzilla bug 177492).
do scanner auto-recognition (see Suse Bugzilla bnc#177492).
-------------------------------------------------------------------
Tue Jul 4 14:47:26 CEST 2006 - jsmeix@suse.de
@ -162,7 +218,7 @@ Mon Mar 13 11:52:47 CET 2006 - jsmeix@suse.de
- Added automagic but safe pos-install script which tries
to update resmgr permissions for scanners for an update
from Suse Linux 10.0 to 10.1 (see Suse Bugzilla bug 157055).
from Suse Linux 10.0 to 10.1 (see Suse Bugzilla bnc#157055).
-------------------------------------------------------------------
Fri Jan 27 13:22:30 CET 2006 - jsmeix@suse.de
@ -308,7 +364,7 @@ Wed Nov 10 16:19:48 CET 2004 - jsmeix@suse.de
- Changed "sane" runlevel script which sets permissions in /dev/
and renamed it to "sane-dev" to avoid confusion with the
SANE network daemon "saned" and its service name "sane-port"
respectively "sane" (see SUSE bugzilla bug 41233).
respectively "sane" (see SUSE bugzilla bnc#41233).
-------------------------------------------------------------------
Mon Nov 8 15:57:37 CET 2004 - jsmeix@suse.de
@ -326,17 +382,17 @@ Mon Sep 20 17:47:53 CEST 2004 - jsmeix@suse.de
- Added a test in /etc/init.d/sane whether slpd is really
running before "/etc/init.d/slpd reload" is done.
(SUSE bugzilla bug 42032).
(SUSE bugzilla bnc#42032).
-------------------------------------------------------------------
Wed Sep 15 13:50:05 CEST 2004 - jsmeix@suse.de
- Added sane-backends-1.0.14-epson_d8.patch which fixes the
problem with EPSON D8 function level scanners that have
a transparency unit (SUSE bugzilla bug 45075).
a transparency unit (SUSE bugzilla bnc#45075).
- Changed the file name of /etc/xinetd.d/sane.xinetd to
/etc/xinetd.d/sane-port because xinetd ignores files
with names containing a dot (SUSE bugzilla bug 45313).
with names containing a dot (SUSE bugzilla bnc#45313).
-------------------------------------------------------------------
Fri Aug 13 14:46:04 CEST 2004 - jsmeix@suse.de
@ -380,7 +436,7 @@ Mon Mar 29 14:27:04 CEST 2004 - jsmeix@suse.de
- Removed sane-descriptions-external-epkowa.desc.dif and
disabled all entries in all descriptions-external/*.desc files
because none of the external backends is included in the sane
package (see bugzilla bug #37169) and for details see
package (see bugzilla bnc#37169) and for details see
.../doc/packages/sane/sane-backends/sane-backends-external.html
-------------------------------------------------------------------
@ -390,7 +446,7 @@ Thu Mar 25 15:44:37 CET 2004 - jsmeix@suse.de
disables those entries in descriptions-external/epkowa.desc
which are also in descriptions/epson.desc
because we want to prefer the open source backend "epson"
(see bugzilla bug #36584).
(see bugzilla bnc#36584).
-------------------------------------------------------------------
Tue Mar 23 08:00:24 CET 2004 - meissner@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package sane-backends (Version 1.0.18)
# 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
@ -10,20 +10,24 @@
# norootforbuild
Name: sane-backends
BuildRequires: libgphoto2-devel libieee1284 libjpeg-devel libpng net-snmp-devel pkg-config texlive-latex
BuildRequires: libgphoto2-devel libieee1284 libjpeg-devel net-snmp-devel pkg-config texlive-latex
License: GPL v2 or later; LGPL v2.1 or later; Public Domain, Freeware
Group: Hardware/Scanner
AutoReqProv: on
Summary: SANE (Scanner Access Now Easy) Scanner Drivers
Version: 1.0.18
Release: 125
Version: 1.0.19
Release: 1
Url: http://www.sane-project.org/
# URL for Source0: http://alioth.debian.org/download.php/1669/sane-backends-1.0.18.tar.gz
# URL for Source0: http://alioth.debian.org/frs/download.php/2318/sane-backends-1.0.19.tar.gz
Source0: sane-backends-%{version}.tar.bz2
# Source100... is SUSE specific stuff:
Source100: sane-dev
# Source100 is the evil-hack init-script "sane-dev" to grant scanner access permissions.
# Source100 is no longer provided because sane-backends-1.0.19 has udev and HAL support.
# Source101 is the xinetd file for the saned:
Source101: sane-port
# Source102 is the OpenSLP registration file for the saned:
Source102: sane.reg
# Since openSUSE 10.3 "Source103: hpoj.desc" is dropped because the package hp-officeJet is dropped.
# The descriptions-external file for the hpaio backend is provided by the package hplip:
@ -51,35 +55,42 @@ Source104: hpaio.desc
Source105: epkowa.desc
# Since openSUSE 10.3 "Source106: create_hal_global_fdi_for_scanners" is dropped because
# it is replaced by "Source108: create_hal_global_fdi_from_libsane.rules".
# Readymade udev rules for openSUSE 10.3 derived from sane-backends 1.0.18-cvs:
Source107: libsane.rules.CVS-2007-07-29.using-lp
# Script which outputs a global HAL fdi file for scanners which are known to SANE:
Source108: create_hal_global_fdi_from_libsane.rules
# Source107 are readymade udev rules for openSUSE 10.3 derived from sane-backends 1.0.18-cvs.
# 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.
# Patch1 does locale rename: no -> nb:
Patch1: sane-backends-1.0.16-nb.patch
# Patch2 fixes a too small char array which causes a buffer overflow if SANE_DEBUG_EPSON is set:
# Patch1 is obsolete since sane-backends-1.0.19 because it uses 'nb'.
# Patch2 fixes too small arrays in backend/niash.c:
Patch2: fix-buffer-overflow.patch
# Patch3 replaces fixed HZ compile-time value by sysconf(_SC_CLK_TCK) runtime value:
Patch3: replace-HZ-by-sysconf_SC_CLK_TCK.patch
# Patch3 is obsolete since sane-backends-1.0.19 because it is fixed in the source.
# Patch4 disables hw_ink_remain which causes a buffer overflow in fujitsu.c:
Patch4: fujitsu-disable-hw_ink_remain.patch
# Patch5 fixes an uninitialized variable in teco2.c:
# Patch4 is obsolete since sane-backends-1.0.19 because it is fixed in the source.
# Patch5 fixes uninitialized variables in avision.c:
Patch5: fix-uninitialized-variables.patch
# Patch6 fixes an ambiguous post/pre increment in canon-sane.c:
Patch6: fix-ambiguous-post-pre-increment.patch
# Patch6 is obsolete since sane-backends-1.0.19 because it is fixed in the source.
# Patch100... is SUSE specific stuff:
# Patch100 lets the "canon" backend do scanner auto-recognition:
Patch100: canon-backend-autoprobing.patch
# Patch101 disables the special resmgr support in SANE (resmgr works now via ACLs):
Patch101: disable-resmgr-support.patch
# Patch102 builds libsane-* modules as libtool modules:
Patch102: module-build.diff
# SANE backends (i.e. driver modules) are regular shared libraries.
# Nothing is linked directly with a /usr/lib/sane/libsane-<driver>.so module.
# In particular scanning frontends (like scanimage, xscanimage, xsane, kooka)
# are linked with libsane.so.1 which is the dll meta-backend which dlopen()s the
# driver modules according to which drivers are activated in /etc/sane.d/dll.conf.
# One could "cp /usr/lib/sane/libsane-<driver>.so /usr/lib/libsane.so"
# and scanning would also work (but now one can use only this single driver).
# The libtool script used in sane-backends is slightly modified to support that.
# Patch102 was dropped because there is no reason to build them as libtool modules
# and it would make our package incompatible with the rest of the SANE world.
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# The postinstall script requires this:
PreReq: coreutils, /bin/sed, /bin/grep
# Built with libieee1284 which is needed to access parallel port scanners:
Requires: libieee1284
# Suse Linux and openSUSE have the package name 'sane' for 'sane-backends'.
# Therefore this RPM provides 'sane' and it also obsoletes it:
Provides: sane
@ -126,26 +137,30 @@ Authors:
David Stevenson <david.stevenson@zoom.co.uk>
Didier Carlier <didier@sema.be>
Earle F. Philhower III <earle@ziplabel.com>
Eddy De Greef <eddy_de_greef@tiscali.be>
Eddy De Greef <eddy_de_greef at scarlet dot be>
Eugene S. Weiss <yossarian@users.sourceforge.net>
Feico W. Dillema <dillema@acm.org>
Franck Schneider <schnefra@hol.fr>
Frank Zago <sane@zago.net>
Frank Zago <sane at zago dot net>
Frederik Ramm <frederik@remote.org>
Gerard Klaver <gerard@gkall.hobby.nl>
Fred Odendaal <freshshelf at rogers dot com>
Gerard Klaver <gerard at gkall dot hobby dot nl>
Gerhard Jaeger <gerhard@gjaeger.de>
Giuseppe Sacco <eppesuig@debian.org>
Glenn Ramsey <glenn@componic.com>
Gordon Matzigkeit <gord@gnu.org>
Gordon Matzigkeit <gord@gnu.ai.mit.edu>
Guido Muesch <odiug@faho.rwth-aachen.de>
Helmut Koeberle <helmut.koeberle@bytec.de>
Henning Meier-Geinitz <henning@meier-geinitz.de>
Henning Geinitz <sane@geinitz.org>
Henrik Johansson <henrikjo@post.urfors.se>
Ilia Sotnikov <hostcc@gmail.com>
Ingo Schneider <schneidi@informatik.tu-muenchen.de>
Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
James Perry <jamesp@epcc.ed.ac.uk>
Jeff Freedman <jsf@hevanet.com>
Jochen Eisinger <jochen.eisinger@gmx.net>
Jonathan Bravo Lopez <jkdsoft@gmail.com>
Jon Chambers <jon@jon.demon.co.uk>
Juergen G. Schimmer <schimmi@nbgm.siemens.de>
Julien Blache <jb@jblache.org>
Karl Anders Oygard <karlo@opera.no>
@ -154,8 +169,7 @@ Authors:
Kazuhiro Sasayama <kaz@hypercore.co.jp>
Kazuya Fukuda <kaafuu@mug.biglobe.ne.jp>
Kevin Charter <charter@cs.rice.edu>
M. Allan Noah <anoah@pfeiffer.edu>
M.F. <massifr@tiscalinet.it>
M. Allan Noah <kitno455@gmail.com>
Manuel Panea <Manuel.Panea@rzg.mpg.de>
Marcio Teixeira <marciot@users.sourceforge.net>
Marian Eichholz <eichholz@computer.org>
@ -166,7 +180,8 @@ Authors:
Mattias Ellert <mattias.ellert@tsl.uu.se>
Max Vorobiev <pcwizard@yandex.ru>
Meino Christian Cramer <mccramer@s.netic.de>
Michael Herder <crapsite@gmx.net>
M.F. <massifr@tiscalinet.it>
Michael Herder <crapmail@nurfuerspam.de>
Michael K. Johnson <johnsonm@redhat.com>
Michel Roelofs <michelr@stack.nl>
Milon Firikis <milonf@ariadne-t.gr>
@ -175,47 +190,41 @@ Authors:
Oliver Rauch <Oliver.Rauch@Rauch-domain.de>
Oliver Schirrmeister <oschirr@abm.de>
Oliver Schwartz <oliverschwartz@users.sourceforge.net>
Patrick Lessard <palessar@cgocable.ca>
Patrick Reynolds <patrickr@virginia.edu>
Peter Fales <peter@fales-lorenz.net>
Peter Kirchgessner <peter@kirchgessner.net>
Petter Reinholdtsen <pere@hungry.com>
Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
Randolph Bentson <bentson@grieg.holmsjoen.com>
Rene Rebe <rene@rocklinux.org>
Rene Rebe <rene@exactcode.de>
Roger Wolff <R.E.Wolff@BitWizard.nl>
Roy Zhou <Roy@mail.mustek-hz.com.cn>
Sebastien Sable <Sebastien.Sable@snv.jussieu.fr>
Sergey Vlasov <vsu@altlinux.ru>
Simon Krix <kinsei@users.sourceforge.net>
Simon Munton <simon@munton.demon.co.uk>
Stephane Voltz <svoltz@wanadoo.fr>
Stephane Voltz <stef.dev@free.fr>
Thomas Soumarmon <soumarmt@nerim.net>
Tom Martone <tom@martoneconsulting.com>
Tom Wang <tom.wang@mustek.com.tw>
Tristan Tarrant <ttarrant@etnoteam.it>
Troy Rollo <sane@troy.rollo.name>
Ullrich Sigwanz <usigwanz@freesurf.ch>
Ulrich Deiters <ukd@xenon.pc.Uni-Koeln.DE>
Wittawat Yamwong <wittawat@web.de>
%prep
%setup -q
# locale rename: no -> nb:
%patch1 -b .nb
mv po/sane-backends.no.po po/sane-backends.nb.po
# Patch2 fixes a too small char array which causes a buffer overflow if SANE_DEBUG_EPSON is set:
# Patch2 fixes too small arrays in backend/niash.c:
%patch2
# Patch3 replaces fixed HZ compile-time value by sysconf(_SC_CLK_TCK) runtime value:
%patch3
# Patch4 disables hw_ink_remain which causes a buffer overflow in fujitsu.c:
%patch4
# Patch5 fixes an uninitialized variable in teco2.c:
# Patch5 fixes uninitialized variables in avision.c:
%patch5
# Patch6 fixes an ambiguous post/pre increment in canon-sane.c:
%patch6
# Patch100... is SUSE specific stuff:
# Patch100 lets the "canon" backend do scanner auto-recognition:
%patch100
# Patch101 disables the special resmgr support in SANE (resmgr works now via ACLs):
%patch101
# Patch102 builds libsane-* modules as libtool modules:
%patch102
# Source100... is SUSE specific stuff:
# Remove hpoj.desc completely to avoid confusion with its successor hpaio.desc
# because since openSUSE 10.3 the package hp-officeJet (for hpoj.desc) is dropped.
@ -227,7 +236,14 @@ cp %{SOURCE105} doc/descriptions-external/epkowa.desc
%build
%{?suse_update_config:%{suse_update_config -f}}
autoreconf -fi
# 'autoreconf -fi' fails for sane-backends-1.0.19 with the message:
# aclocal: acinclude.m4:606: file m4/libtool.m4 does not exist
# The m4 dir from CVS was not included in the 1.0.18 tar, so it was
# not included in 1.0.19 either, but it has new files since 1.0.18.
# It is a bit strange because autoconf never complained before.
# Because it is not clear whether or not 'autoreconf -fi' is best
# and because it builds without it, it is simply disabled for now:
#autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DGIMP_ENABLE_COMPAT_CRUFT=1 -fno-strict-aliasing"
export LDFLAGS="-L/%_lib $LDFLAGS"
# Disable locking because /var/lock/sane/ would be a world-writable directory:
@ -244,6 +260,7 @@ export LDFLAGS="-L/%_lib $LDFLAGS"
# Enable locking for backends where "99" is the group of the lockfile path (LOCKPATH_GROUP)
# because "99" is the group of the user who runs the build when norootforbuild is used
# and set localstatedir to have the lock files in /var/lock/sane (see backend/Makefile.in).
# Disabled because locking requires a world-writable /var/lock/sane/ directory:
# --enable-locking \
# --with-group=99 \
# --localstatedir=/var
@ -251,15 +268,25 @@ make
%install
make install DESTDIR=%{buildroot}
# Add libsane-dll links to _libdir so that it will be found by all SANE frontends.
# Change directory to get relative paths in the links (i.e. without $RPM_BUILD_ROOT)
# but use a subshell to avoid a permanent directory change:
rm -rf %{buildroot}%{_libdir}/libsane-dll.so*
( cd %{buildroot}%{_libdir} && ln -s sane/libsane-dll.so* . )
# The actual driver modules are installed as libsane-<driver>.so.%{version}
# and two libsane-<driver>.so.1 and libsane-<driver>.so links point to them.
# Additionally a libsane-<driver>.la libtool archive file is installed
# which could be used to find the correct module file name to dlopen the module.
# Only the dll meta-backend (/usr/lib/libsane.so.1.0.19) links with driver modules.
# The dll meta-backend looks only for libsane-<driver>.so.1 and uses dlopen(3) directly.
# The dll meta-backend needs neither libsane-<driver>.so nor libsane-<driver>.la.
# RPMLINT complains about libsane-<driver>.so with "devel-file-in-non-devel-package".
# Therefore the libsane-<driver>.so and libsane-<driver>.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
# 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
# and set the sticky bit (i.e. others are not allowed to remove lock files):
# and set the sticky bit (i.e. others are not allowed to remove lock files).
# Disabled because package-specific world-writable directories are not allowed:
#chmod 1777 %{buildroot}/var/lock/sane/
# Install the descriptions and descriptions-external files.
# These files are the sources to make %{_defaultdocdir}/sane/sane-backends/*.html
@ -272,11 +299,35 @@ done
# Add ':firmware "required"' entries for the respective scanners to the descriptions files
# so that YaST can show firmware upload related information to the user of such a scanner.
# This must be done after build because those entries are a SUSE specific extension.
# As far as we know all scanners which use the backend gt68xx
# and the related backend artec_eplus48u require a firmware upload,
# To determine scanners which require firmware upload, search the man pages
# for backends which provide support for firmware upload.
# Use a command like
# for m in /usr/share/man/man5/sane-*
# do man -E ascii -P cat -l $m 2>/dev/null | grep -q -i firmware && echo $m
# done
# to find backend man pages which mention "firmware".
# In version 1.0.19 the following man pages mention "firmware":
# sane-agfafocus: mentiones only "firmware revision" (no firmware upload)
# sane-apple: mentiones only "firmware revision" (no firmware upload)
# sane-artec: mentiones only "problems with firmware v1.92" (no firmware upload)
# sane-artec_eplus48u: "you need a firmware file for your scanner" (unconditioned firmware upload)
# sane-bh: mentiones only "requires RSC firmware level 1.5" (no firmware upload)
# sane-epjitsu: "these scanners require a firmware file" (unconditioned firmware upload)
# sane-gt68xx: "you need a firmware file for your scanner" (unconditioned firmware upload)
# sane-hp: mentiones only "no firmware support for contrast" (no firmware upload)
# sane-matsushita: mentiones only "scanner with proper firmware" (no firmware upload)
# sane-microtek2: mentiones only "firmware of the scanner provides" (no firmware upload)
# sane-sharp: mentiones only "bug in the firmware" (no firmware upload)
# sane-snapscan: "USB scanners ... scanners that need a firmware upload" (conditioned firmware upload)
# sane-st400: mentiones only "firmware revision" (no firmware upload)
# 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,
# see "man sane-gt68xx" and http://www.meier-geinitz.de/sane/gt68xx-backend/
# and see "man sane-artec_eplus48u":
for b in gt68xx artec_eplus48u
# and see "man sane-artec_eplus48u" and "man sane-epjitsu"
#
for b in gt68xx artec_eplus48u epjitsu
do sed -i -e 's/^:model.*$/&\n:firmware "required"/' %{buildroot}%{_datadir}/sane/descriptions/$b.desc
done
# As far as we know (almost) all USB scanners (but not the SCSI scanners)
@ -285,21 +336,50 @@ done
sed -i -e 's/^:interface "USB".*$/&\n:firmware "required"/' %{buildroot}%{_datadir}/sane/descriptions/snapscan.desc
# Only the "SnapScan 1236u" needs no firmware upload (see Suse/Novell bug #73960):
sed -i -e '/:model "SnapScan 1236u"/,/:firmware "required"/s/required//' %{buildroot}%{_datadir}/sane/descriptions/snapscan.desc
# Install the USB usermap file (list of USB manufacturer and model IDs)
# and the matching hotplug script under /usr/share/sane because we do not actually use it
# because we use our udev/HAL/hal-resmgr machinery to grant USB access for normal users:
install -m644 tools/hotplug/libsane.usermap %{buildroot}%{_datadir}/sane/
install -m755 tools/hotplug/libusbscanner %{buildroot}%{_datadir}/sane/
# Have sane-dev still available in case of backward compatibility problems:
install -m755 %{SOURCE100} %{buildroot}%{_datadir}/sane/
# Install the readymade udev rules for openSUSE 10.3:
# Since version 1.0.19 there is udev and HAL support.
# Therefore the old/outdated hotplug stuff is dropped (was never used by openSUSE).
# Neither tools/hotplug/libsane.usermap nor tools/hotplug/libusbscanner is installed.
# 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:
# 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
# as user "lp" (who is member of the group "lp") can send printing data
# to the printer unit (i.e. the printer interface of the USB device).
# It is sufficiently secure and reasonable easy to use by default
# the same group "lp" for printers and scanners because both kind of devices
# 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.
# Regarding SUBSYSTEM=="usb" see the Novell/Suse Bugzilla bug
# https://bugzilla.novell.com/show_bug.cgi?id=294161#c11
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
# Install the udev rules file:
install -d %{buildroot}%{_sysconfdir}/udev/rules.d
install -m644 %{SOURCE107} %{buildroot}%{_sysconfdir}/udev/rules.d/55-libsane.rules
# Run the script which outputs a global HAL fdi file for scanners which are known to SANE
# and install its output as /etc/hal/fdi/policy/10osvendor/70-scanner.fdi:
bash %{SOURCE108} %{SOURCE107} >70-scanner.fdi
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:
# Add a generic entry for SCSI scanners.
# Replace 'key="info.bus" string="usb"' by 'key="info.bus" 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
# Remove 'key="scanner.access_method"' lines.
sed -i -e '/<device>/a<match key="info.category" string="scsi_generic">\n <match key="@info.parent:scsi.type" string="scanner">\n <append key="info.capabilities" type="strlist">scanner<\/append>\n <\/match>\n<\/match>' tools/hal/libsane.fdi
sed -i -e '/key="info.bus"/s/string="usb"/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
sed -i -e '/key="scanner.access_method"/d' tools/hal/libsane.fdi
# Install the HAL fdi file:
install -d %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor
install -m644 70-scanner.fdi %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor/70-scanner.fdi
install -m644 tools/hal/libsane.fdi %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor/70-scanner.fdi
# xinetd stuff:
install -d -m755 %{buildroot}%{_sysconfdir}/xinetd.d/
install -m644 %{SOURCE101} %{buildroot}%{_sysconfdir}/xinetd.d/
@ -350,14 +430,67 @@ exit 0
%doc %{_mandir}/man8/saned.8.gz
%changelog
* Thu Feb 28 2008 jsmeix@suse.de
- Updated to sane-backends version 1.0.19:
New backends:
cardscan (Corex Cardscan 800c), epjitsu (Epson-based Fujitsu),
epson2 (various Epson scanners), hp3900 (HP ScanJet 3970 and
more), hp5590 (HP ScanJet 5590 and more), hpljm1005 (HP LaserJet
M1005 and more), hs2p (Ricoh IS400 series)
Updated backends:
abaton, agfafocus, apple, artec, artec_eplus48u, as6e, avision,
canon, coolscan, coolscan2, dc25, dell1600n_net, dll, epson,
fujitsu, genesys, gt68xx, hp3500, ibm, lexmark, microtek,
microtek2, mustek, nec, net, pie, pint, pixma, plustek,
plustek_pp, ricoh, s9036, sm3600, sm3840, snapscan, sp15c,
st400, tamarack, teco2, test, u12, umax, umax1220u, umax_pp
Plus:
Scanimage detects more chipsets.
Internal scsi, usb, tcp and udp code updates.
Basic HAL .fdi creation support
Build system updates.
Updated translations.
Documentation updates.
Bugfixes.
Note:
This will be (hopefully) the last release of the SANE 1.0 series.
The next release will be extended (in a backwards compatible
fashion) to support more features of modern scanners.
- sane-backends-1.0.16-nb.patch (did locale rename: no -> nb)
is obsolete since version 1.0.19 because it uses already 'nb'.
- in fix-buffer-overflow.patch the overflows in backend/epson.c
backend/as6e.c and sanei/sanei_ab306.c are obsolete because
they are fixed in the source (only backend/niash.c is left).
- replace-HZ-by-sysconf_SC_CLK_TCK.patch is obsolete because
it is fixed in the source.
- fujitsu-disable-hw_ink_remain.patch is obsolete because
it is fixed in the source.
- in fix-uninitialized-variables.patch the fix regarding
teco2.c is obsolete because it is fixed in the source
but a new fix regarding avision.c was added.
- fix-ambiguous-post-pre-increment.patch is obsolete because
it is fixed in the source.
- module-build.diff is dropped because there is no reason to build
driver modules as libtool modules and furthermore it makes our
package incompatible with the rest of the SANE world.
- Since version 1.0.19 there is udev and HAL support.
Therefore the old/outdated hotplug stuff (libsane.usermap
and libusbscanner) is dropped (it was never used by openSUSE).
Also the evil-hack init-script "sane-dev" is no longer provided.
libsane.rules.CVS-2007-07-29.using-lp is obsolete because
the udev rules file 55-libsane.rules is directly derived
from tools/udev/libsane.rules.
create_hal_global_fdi_from_libsane.rules is obsolete because
the HAL fdi file 70-scanner.fdi is directly derived
from tools/hal/libsane.fdi.
* Thu Jan 31 2008 adrian@suse.de
- call create_hal_global_fdi_for_scanners via bash. We can not rely
on source file permissions
- Call create_hal_global_fdi_from_libsane.rules via bash.
We can not rely on source file permissions
* Tue Aug 14 2007 jsmeix@suse.de
- Replaced create_hal_global_fdi_for_scanners by
create_hal_global_fdi_from_libsane.rules which creates the
global HAL 70-scanner.fdi file during build-time from the
libsane.rules file (see Novell/Suse Bugzilla bug 298878).
libsane.rules file (see Novell/Suse Bugzilla bnc#298878).
* Fri Aug 10 2007 jsmeix@suse.de
- Removed hpoj.desc completely to avoid confusion with its
successor hpaio.desc because since openSUSE 10.3 the package
@ -370,19 +503,19 @@ exit 0
derived from what sane-desc in sane-backends 1.0.18-cvs creates.
* Wed Jun 13 2007 jsmeix@suse.de
- Adapted create_hal_global_fdi_for_scanners according to the
currently newest changes in HAL (see Suse Bugzilla bug 250659).
currently newest changes in HAL (see Suse Bugzilla bnc#250659).
* Wed Jun 06 2007 dmueller@suse.de
- Build modules as libtool modules.
- module-build.diff builds driver modules as libtool modules.
* Sat Apr 21 2007 aj@suse.de
- Use texlive.
* Wed Feb 21 2007 jsmeix@suse.de
- Added a fix for an "array subscript is above array bounds"
error in niash.c to fix-buffer-overflow.patch
(see Suse Bugzilla bug 246654).
(see Suse Bugzilla bnc#246654).
* Wed Jan 31 2007 jsmeix@suse.de
- Added a fix for an "array subscript is above array bounds"
error in sanei_ab306.c to fix-buffer-overflow.patch
(see Suse Bugzilla bug 239953).
(see Suse Bugzilla bnc#239953).
* Mon Jan 29 2007 jsmeix@suse.de
- Renamed the package from 'sane' (which is only used by Suse)
to 'sane-backends' which is used by the rest of the world
@ -401,17 +534,17 @@ exit 0
to fix-buffer-overflow.patch.
- Replaced the complicated postinstall script by calling
create_hal_global_fdi_for_scanners which should obsolete
sane-dev (see Suse Bugzilla bug 160899).
sane-dev (see Suse Bugzilla bnc#160899).
- Moved sane-dev from {_initrddir} to {_datadir}/sane/ to have it
still available in case of backward compatibility problems.
* Sun Oct 22 2006 meissner@suse.de
- buildrequires libgphoto2-devel.
* Mon Sep 18 2006 jsmeix@suse.de
- fix-uninitialized-variables.patch fixes an uninitialized
variable in teco2.c (see Suse Bugzilla bug 205451).
variable in teco2.c (see Suse Bugzilla bnc#205451).
- create_hal_global_fdi_for_scanners can be called by HAL or YaST
to create a global HAL fdi file for scanners which are known
by the current SANE version (see Suse Bugzilla bug 160899).
by the current SANE version (see Suse Bugzilla bnc#160899).
* Mon Sep 11 2006 jsmeix@suse.de
- disable-resmgr-support.patch disables the resmgr support in SANE
which is no longer needed in SANE because resmgr works now
@ -419,13 +552,13 @@ exit 0
* Mon Sep 04 2006 jsmeix@suse.de
- Replaced the fix from Thu Aug 31 in fujitsu.c by a new fix
fujitsu-disable-hw_ink_remain.patch which disables hw_ink_remain
which causes a buffer overflow (see Suse Bugzilla bug 202243).
which causes a buffer overflow (see Suse Bugzilla bnc#202243).
* Thu Aug 31 2006 jsmeix@suse.de
- Added a fix of a too small char array in fujitsu.c to
fix-buffer-overflow.patch (see Suse Bugzilla bug 202243).
fix-buffer-overflow.patch (see Suse Bugzilla bnc#202243).
* Fri Jul 21 2006 jsmeix@suse.de
- canon-backend-autoprobing.patch lets the "canon" backend
do scanner auto-recognition (see Suse Bugzilla bug 177492).
do scanner auto-recognition (see Suse Bugzilla bnc#177492).
* Tue Jul 04 2006 jsmeix@suse.de
- Updated to sane-backends version 1.0.18:
New backends: dell1600n_net, hp3500, pixma, stv680.
@ -449,7 +582,7 @@ exit 0
* Mon Mar 13 2006 jsmeix@suse.de
- Added automagic but safe pos-install script which tries
to update resmgr permissions for scanners for an update
from Suse Linux 10.0 to 10.1 (see Suse Bugzilla bug 157055).
from Suse Linux 10.0 to 10.1 (see Suse Bugzilla bnc#157055).
* Fri Jan 27 2006 jsmeix@suse.de
- Current epkowa.desc from the current iscan package.
- Current hpaio.desc made from the current hplip package.
@ -538,7 +671,7 @@ exit 0
- Changed "sane" runlevel script which sets permissions in /dev/
and renamed it to "sane-dev" to avoid confusion with the
SANE network daemon "saned" and its service name "sane-port"
respectively "sane" (see SUSE bugzilla bug 41233).
respectively "sane" (see SUSE bugzilla bnc#41233).
* Mon Nov 08 2004 jsmeix@suse.de
- new sane-backends version 1.0.15
- sane-frontends stuff is moved to the new package sane-frontends
@ -547,14 +680,14 @@ exit 0
* Mon Sep 20 2004 jsmeix@suse.de
- Added a test in /etc/init.d/sane whether slpd is really
running before "/etc/init.d/slpd reload" is done.
(SUSE bugzilla bug 42032).
(SUSE bugzilla bnc#42032).
* Wed Sep 15 2004 jsmeix@suse.de
- Added sane-backends-1.0.14-epson_d8.patch which fixes the
problem with EPSON D8 function level scanners that have
a transparency unit (SUSE bugzilla bug 45075).
a transparency unit (SUSE bugzilla bnc#45075).
- Changed the file name of /etc/xinetd.d/sane.xinetd to
/etc/xinetd.d/sane-port because xinetd ignores files
with names containing a dot (SUSE bugzilla bug 45313).
with names containing a dot (SUSE bugzilla bnc#45313).
* Fri Aug 13 2004 jsmeix@suse.de
- Changed "sane" to "sane-port" in sane.xinetd see bug 41233
* Thu Jul 15 2004 jsmeix@suse.de
@ -580,14 +713,14 @@ exit 0
- Removed sane-descriptions-external-epkowa.desc.dif and
disabled all entries in all descriptions-external/*.desc files
because none of the external backends is included in the sane
package (see bugzilla bug #37169) and for details see
package (see bugzilla bnc#37169) and for details see
.../doc/packages/sane/sane-backends/sane-backends-external.html
* Thu Mar 25 2004 jsmeix@suse.de
- Patch sane-descriptions-external-epkowa.desc.dif
disables those entries in descriptions-external/epkowa.desc
which are also in descriptions/epson.desc
because we want to prefer the open source backend "epson"
(see bugzilla bug #36584).
(see bugzilla bnc#36584).
* Tue Mar 23 2004 meissner@suse.de
- gimp plugins are now in ../2.0/...
* Mon Mar 22 2004 meissner@suse.de

152
sane-dev
View File

@ -1,152 +0,0 @@
#! /bin/bash
# Copyright (c) 2004 SUSE LINUX Products GmbH, Nuernberg, Germany
#
# Author: Johannes Meixner <http://www.suse.de/feedback>
#
# System startup script for setting scanner permissions in /dev/
#
### BEGIN INIT INFO
# Provides: sane-dev
# Required-Start: $remote_fs $syslog
# Should-Start: hal haldaemon
# Required-Stop: $remote_fs $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Setting scanner permissions in /dev/.
### END INIT INFO
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num><num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
. /etc/rc.status
# First reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.
store_dir=/var/lib/sane
store_file=$store_dir/devices
maximum_wait=30
if [ "$1" != "status" -a "$( id -u )" != "0" ]
then echo "You must be root (except for \"$0 status\")."
rc_failed 4
rc_status
rc_exit
fi
case "$1" in
start)
if [ -x /usr/bin/scanimage ]
then echo -n "Searching for configured scanners in SANE."
[ -d $store_dir ] || mkdir -m 755 $store_dir
[ -f $store_file ] && mv $store_file ${store_file}.old
/usr/bin/scanimage -f '%d,' 1>${store_file}.raw 2>/dev/null &
scanimagePID=$!
for i in $( seq $maximum_wait )
do grep scanimage /proc/$scanimagePID/cmdline &>/dev/null || break
sleep 1
echo -n "."
done
if grep scanimage /proc/$scanimagePID/cmdline &>/dev/null
then echo -n " Aborted."
kill -9 $scanimagePID &>/dev/null
rc_failed 1
rc_status -v
rc_exit
fi
cat ${store_file}.raw | tr ',' '\n' | grep -v 'net:' | tr ':' '\n' | grep '^/dev/' | sort -u >$store_file
if [ -s $store_file ]
then echo -e "\nSetting scanner access mode to rw-rw-rw- for"
# to be safe only character device files are changed (e.g. harddisks are not changed)
for d in $( cat $store_file )
do [ -c $d ] && chmod 666 $d && echo -n "$d "
done
else echo -en "\nNo scanner device files found."
fi
else echo -n "Cannot execute /usr/bin/scanimage"
rc_failed 5
rc_status -v
rc_exit
fi
# Remember status and be verbose
rc_status -v
;;
stop)
if [ -s $store_file ]
then echo "Resetting scanner access mode to rw-r----- for"
# to be safe only character device files are changed (e.g. harddisks are not changed)
for d in $( cat $store_file )
do [ -c $d ] && chmod 640 $d && echo -n "$d "
done
else echo -n "There are no scanner device files in $store_file"
fi
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
force-reload)
## Signal the daemon to reload its config. Most daemons
## do this on signal 1 (SIGHUP).
## If it does not support it, restart.
rc_failed 3
rc_status -v
;;
reload)
## Like force-reload, but if daemon does not support
## signalling, do nothing (!)
# If it supports signalling:
rc_failed 3
;;
status)
if [ -s $store_file ]
then echo "Scanner access mode is"
# only character device files are of interest
for d in $( cat $store_file )
do [ -c $d ] && ls -l $d | cut -b 2-10 | tr -d '\n' && echo " for $d"
done
else echo "There are no scanner device files in $store_file"
fi
rc_status
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
rc_exit