[sane-devel] Preparing for a sane-backends release

Johannes Meixner jsmeix at suse.de
Tue Aug 4 11:11:21 UTC 2015


On Aug 3 14:08 m. allan noah wrote (excerpt):
> ... I know that Gentoo has some systemd compilation fixes.

Everey Linux distribution should submit their patches to SANE
upstream (provided their changes make sense for upstream).

Here our (i.e. openSUSE) patches that we still have:

Right now I filed
with my fix-buffer-overflow.patch attached
that fixes a too small array in backend/niash.c

to sane.h which was erroneously removed in sane-backends-1.0.20 so that
sane-frontends and xsane can no longer build, see

--- include/sane/sane.h.orig    2009-06-12 10:19:19.000000000 +0200
+++ include/sane/sane.h 2009-06-12 10:20:12.000000000 +0200
@@ -115,6 +115,7 @@ SANE_Device;
  #define SANE_CAP_AUTOMATIC             (1 << 4)
  #define SANE_CAP_INACTIVE              (1 << 5)
  #define SANE_CAP_ADVANCED              (1 << 6)
+#define SANE_CAP_ALWAYS_SETTABLE       (1 << 7)

  #define SANE_OPTION_IS_ACTIVE(cap)     (((cap) & SANE_CAP_INACTIVE) == 0)
  #define SANE_OPTION_IS_SETTABLE(cap)   (((cap) & SANE_CAP_SOFT_SELECT) != 0)

The re-add-SANE_CAP_ALWAYS_SETTABLE.patch still applies for
current sane-backends-git20150804.tar.gz so that I assume
SANE_CAP_ALWAYS_SETTABLE is still missing in sane-backends.

I did not verify whether or not meanwhile all SANE frontends
also no longer use SANE_CAP_ALWAYS_SETTABLE so that it could
meanwhile be really removed in sane-backends.

My fix-mustek_pp_ccd300.c.patch fixes undefined 'foo = ++foo modulo bar'
operations in mustek_pp_ccd300.c see
where the upstream maintainer did not understand what is wrong and
closed it  as "Wont Fix" so that we must keep this patch forever
to make at least the code somehow valid for the compiler.
fix-mustek_pp_ccd300.c.patch is attached to the above
alioth.debian.org bug tracker issue.
Of course because the result of 'foo = ++foo' is undefined
I cannot know if my patch implements what is actually intended.
My patch implements an arbitrary result that only makes the
compiler happy.

My install-umax_pp-tool.patch installs tools/umax_pp as /usr/bin/umax_pp
which is built but not installed but it is needed to recover from
a failed scan with scanners which use the umax_pp backend, see

--- tools/Makefile.am.orig      2009-02-20 17:51:09.000000000 +0100
+++ tools/Makefile.am   2009-06-05 15:08:45.000000000 +0200
@@ -7,8 +7,8 @@
  AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include \

-bin_PROGRAMS = sane-find-scanner gamma4scanimage
-noinst_PROGRAMS = sane-desc umax_pp
+bin_PROGRAMS = sane-find-scanner gamma4scanimage umax_pp
+noinst_PROGRAMS = sane-desc


The install-umax_pp-tool.patch still applies for current
sane-backends-git20150804.tar.gz so that I assume
tools/umax_pp is still not installed by default.

In general regarding parallel port scanner drivers:

The above issues 3) and 4) are about parallel port scanner drivers.

I wonder if support for parallel port scanners is still needed?

I assume that basically nobody tests parallel port scanners.
Probably also basically nobody usues parallel port scanners.

In this case parallel port scanner drivers should be dropped
because in practice they are no longer maintained.

As a first step parallel port scanner drivers could be
no longer built by default e.g. via something like
   configure --without-parport
by default.

Kind Regards
Johannes Meixner
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Dilip Upmanyu, Graham Norton - HRB 21284 (AG Nuernberg)

More information about the sane-devel mailing list