summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0040-remove_git.patch2
-rw-r--r--debian/patches/0045-disable_lock_test_at_build_time.patch27
-rw-r--r--debian/patches/0050-Use-python3-shebang.patch16
-rw-r--r--debian/patches/0055-Fix_build_error.patch36
-rw-r--r--debian/patches/0060-cross.patch54
-rw-r--r--debian/patches/0100-source_spelling.patch5
-rw-r--r--debian/patches/0125-multiarch_dll_search_path.patch6
-rw-r--r--debian/patches/0140-avahi.patch54
-rw-r--r--debian/patches/0145-avahi.patch8
-rw-r--r--debian/patches/0150-i386-test.patch1
-rw-r--r--debian/patches/0155-hurd_PATH_MAX.patch10
-rw-r--r--debian/patches/0165-respect_local_only_parameter.patch768
-rw-r--r--debian/patches/0600-scanimage_manpage.patch2
-rw-r--r--debian/patches/0700-mk_reproducible_results.patch1
-rw-r--r--debian/patches/0725-fix_link_60-libsane_rule.patch2
-rw-r--r--debian/patches/series11
16 files changed, 975 insertions, 28 deletions
diff --git a/debian/patches/0040-remove_git.patch b/debian/patches/0040-remove_git.patch
index 290f43b..d3df568 100644
--- a/debian/patches/0040-remove_git.patch
+++ b/debian/patches/0040-remove_git.patch
@@ -13,7 +13,7 @@ Index: trunk/configure.ac
dnl and remove the git suffix.
dnl ******************************************************************
-AC_INIT([sane-backends],m4_esyscmd_s([git describe --dirty]),
-+AC_INIT([sane-backends],[1.0.29-debian],
++AC_INIT([sane-backends],[1.0.31-debian],
[sane-devel@alioth-lists.debian.net])
AC_PREREQ([2.69]) dnl minimum autoconf version required
AC_CONFIG_MACRO_DIR([m4])
diff --git a/debian/patches/0045-disable_lock_test_at_build_time.patch b/debian/patches/0045-disable_lock_test_at_build_time.patch
new file mode 100644
index 0000000..e5f82f3
--- /dev/null
+++ b/debian/patches/0045-disable_lock_test_at_build_time.patch
@@ -0,0 +1,27 @@
+Description: Disable lock test at buildtime
+Author: Jörg Frings-Fürst <debian@jff.emaill>
+Forwarded: not-needed
+Last-Update: 2020-08-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/acinclude.m4
+===================================================================
+--- trunk.orig/acinclude.m4
++++ trunk/acinclude.m4
+@@ -359,11 +359,11 @@ AC_DEFUN([SANE_CHECK_LOCKING],
+ touch sanetest.file
+ chgrp $LOCKPATH_GROUP sanetest.file 2>/dev/null || lasterror=$?
+ rm -f sanetest.file
+- if test ! -z "$lasterror"; then
+- AC_MSG_WARN([Group $LOCKPATH_GROUP does not exist on this system.])
+- AC_MSG_WARN([Locking feature will be disabled.])
+- use_locking=no
+- fi
++# if test ! -z "$lasterror"; then
++# AC_MSG_WARN([Group $LOCKPATH_GROUP does not exist on this system.])
++# AC_MSG_WARN([Locking feature will be disabled.])
++# use_locking=no
++# fi
+ fi
+ if test $use_locking = yes ; then
+ INSTALL_LOCKPATH=install-lockpath
diff --git a/debian/patches/0050-Use-python3-shebang.patch b/debian/patches/0050-Use-python3-shebang.patch
new file mode 100644
index 0000000..c3e85be
--- /dev/null
+++ b/debian/patches/0050-Use-python3-shebang.patch
@@ -0,0 +1,16 @@
+Description: Use python3 shebang
+Author: Jörg Frings-Fürst <debian@jff.email>
+Forwarded: not-needed
+Last-Update: 2020-08-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/backend/pixma/scripts/pixma_gen_options.py
+===================================================================
+--- trunk.orig/backend/pixma/scripts/pixma_gen_options.py
++++ trunk/backend/pixma/scripts/pixma_gen_options.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ from __future__ import print_function
+ import sys,os,re
diff --git a/debian/patches/0055-Fix_build_error.patch b/debian/patches/0055-Fix_build_error.patch
new file mode 100644
index 0000000..3816692
--- /dev/null
+++ b/debian/patches/0055-Fix_build_error.patch
@@ -0,0 +1,36 @@
+Description: Fix build error
+Author: Jörg Frings-Fürst <debian@jff.email>
+Forwarded: not-needed
+Last-Update: 2020-08-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/po/POTFILES.in
+===================================================================
+--- trunk.orig/po/POTFILES.in
++++ trunk/po/POTFILES.in
+@@ -65,7 +65,7 @@ backend/p5.c
+ backend/p5.h
+ backend/p5_device.c
+ backend/pixma/pixma.c
+-backend/pixma/pixma_sane_options.c
++#backend/pixma/pixma_sane_options.c
+ backend/plustek.c
+ backend/plustek_pp.c
+ backend/pnm.c
+Index: trunk/backend/Makefile.am
+===================================================================
+--- trunk.orig/backend/Makefile.am
++++ trunk/backend/Makefile.am
+@@ -947,10 +947,10 @@ $(srcdir)/pixma/pixma.c: \
+
+ $(srcdir)/pixma/pixma_sane_options.h:
+ @echo Generating $@ from $(@D)/pixma.c
+- @(cd $(@D); python scripts/pixma_gen_options.py h < pixma.c > $(@F))
++ @(cd $(@D); python3 scripts/pixma_gen_options.py h < pixma.c > $(@F))
+ $(srcdir)/pixma/pixma_sane_options.c:
+ @echo Generating $@ from $(@D)/pixma.c
+- @(cd $(@D); python scripts/pixma_gen_options.py < pixma.c > $(@F))
++ @(cd $(@D); python3 scripts/pixma_gen_options.py < pixma.c > $(@F))
+
+ EXTRA_DIST += pixma/pixma_sane_options.c
+ EXTRA_DIST += pixma/pixma_sane_options.h
diff --git a/debian/patches/0060-cross.patch b/debian/patches/0060-cross.patch
new file mode 100644
index 0000000..4087882
--- /dev/null
+++ b/debian/patches/0060-cross.patch
@@ -0,0 +1,54 @@
+Description: Make gphoto2 detection use the host architecture pkg-config
+Author: Helmut Grohne <helmut@subdivi.de>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948711
+Forwarded: not-needed
+Last-Update: 2020-08-30
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/acinclude.m4
+===================================================================
+--- trunk.orig/acinclude.m4
++++ trunk/acinclude.m4
+@@ -439,15 +439,19 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
+ # a program. And, if that works, then add the -l flags to
+ # GPHOTO2_LIBS and any other flags to GPHOTO2_LDFLAGS to pass to
+ # sane-config.
+- if test "$with_gphoto2" != "no" ; then
+- AC_CHECK_TOOL(HAVE_GPHOTO2, pkg-config, false)
++ AS_IF([test "$with_gphoto2" != "no"],[
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
++ if test "x$PKG_CONFIG" = x; then
++ HAVE_GPHOTO2=false
++ else
++ HAVE_GPHOTO2=$PKG_CONFIG
++ fi
+
+ if test ${HAVE_GPHOTO2} != "false" ; then
+- if pkg-config --exists libgphoto2 ; then
+- with_gphoto2="`pkg-config --modversion libgphoto2`"
+- GPHOTO2_CPPFLAGS="`pkg-config --cflags libgphoto2`"
+- GPHOTO2_LIBS="`pkg-config --libs libgphoto2`"
+-
++ if $PKG_CONFIG --exists libgphoto2 ; then
++ with_gphoto2="`$PKG_CONFIG --modversion libgphoto2`"
++ GPHOTO2_CPPFLAGS="`$PKG_CONFIG --cflags libgphoto2`"
++ GPHOTO2_LIBS="`$PKG_CONFIG --libs libgphoto2`"
+ saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${GPHOTO2_CPPFLAGS}"
+ saved_LIBS="${LIBS}"
+@@ -467,13 +471,13 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
+ GPHOTO2_LIBS=""
+ else
+ SANE_EXTRACT_LDFLAGS(GPHOTO2_LIBS, GPHOTO2_LDFLAGS)
+- if pkg-config --atleast-version=2.5.0 libgphoto2; then
++ if $PKG_CONFIG --atleast-version=2.5.0 libgphoto2; then
+ AC_DEFINE([GPLOGFUNC_NO_VARGS], [1],
+ [Define if GPLogFunc does not take a va_list.])
+ fi
+ fi
+ fi
+- fi
++ ])
+ AC_SUBST(GPHOTO2_CPPFLAGS)
+ AC_SUBST(GPHOTO2_LIBS)
+ AC_SUBST(GPHOTO2_LDFLAGS)
diff --git a/debian/patches/0100-source_spelling.patch b/debian/patches/0100-source_spelling.patch
index baca168..493c3ae 100644
--- a/debian/patches/0100-source_spelling.patch
+++ b/debian/patches/0100-source_spelling.patch
@@ -1,5 +1,6 @@
Description: Correct source typos
Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Forwarded: not needed
Last-Update: 2019-04-28
----
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -63,7 +64,7 @@ Index: trunk/doc/sane-pixma.man
===================================================================
--- trunk.orig/doc/sane-pixma.man
+++ trunk/doc/sane-pixma.man
-@@ -307,7 +307,7 @@ This will cause all further statements i
+@@ -328,7 +328,7 @@ This will cause all further statements i
.IP -
A line that contains
.B auto_detection=no
@@ -72,7 +73,7 @@ Index: trunk/doc/sane-pixma.man
.SH USB SUPPORT
USB scanners will be auto-detected and require no configuration.
.SH NETWORKING SUPPORT
-@@ -337,7 +337,7 @@ common subnet for scanning.
+@@ -358,7 +358,7 @@ common subnet for scanning.
.PP
Scanner detection is slightly more complicated. The pixma backend sends
a broadcast on all direct connected subnets it can find (provided your OS
diff --git a/debian/patches/0125-multiarch_dll_search_path.patch b/debian/patches/0125-multiarch_dll_search_path.patch
index a213060..25726c7 100644
--- a/debian/patches/0125-multiarch_dll_search_path.patch
+++ b/debian/patches/0125-multiarch_dll_search_path.patch
@@ -7,7 +7,7 @@ Index: trunk/backend/dll.c
===================================================================
--- trunk.orig/backend/dll.c
+++ trunk/backend/dll.c
-@@ -466,7 +466,7 @@ load (struct backend *be)
+@@ -470,7 +470,7 @@ load (struct backend *be)
if (path)
{
@@ -16,7 +16,7 @@ Index: trunk/backend/dll.c
src = malloc (src_len);
if (!src)
{
-@@ -476,11 +476,11 @@ load (struct backend *be)
+@@ -480,11 +480,11 @@ load (struct backend *be)
if (orig_src)
free (orig_src);
orig_src = src;
@@ -39,7 +39,7 @@ Index: trunk/backend/Makefile.am
## included LICENSE file for license information.
-AM_CPPFLAGS += -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include $(USB_CFLAGS) -DLIBDIR="\"$(libdir)/sane\""
-+AM_CPPFLAGS += -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include $(USB_CFLAGS) -DLIBDIR="\"$(libdir)/sane\"" -DDEB_DLL_LIBDIR="\"$(libdir)/sane:$(prefix)/lib/sane\""
++AM_CPPFLAGS += -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include $(USB_CFLAGS) -DLIBDIR="\"$(libdir)/sane\"" -DDEB_DLL_LIBDIR="\"$(libdir)/sane:$(prefix)/lib/sane\:$(prefix)/lib64/sane\""
AM_LDFLAGS += $(STRICT_LDFLAGS)
# The -rpath option is added because we are creating _LTLIBRARIES based
diff --git a/debian/patches/0140-avahi.patch b/debian/patches/0140-avahi.patch
index 89ec3f1..9c993b0 100644
--- a/debian/patches/0140-avahi.patch
+++ b/debian/patches/0140-avahi.patch
@@ -1,6 +1,7 @@
Description: Avoid assertion failure when net_avahi_init failed
Author: Andreas Henriksson <andreas@fatal.se>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861112
+Forwarded: not needed
Last-Update: 2017-06-20
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -8,45 +9,80 @@ Index: trunk/backend/net.c
===================================================================
--- trunk.orig/backend/net.c
+++ trunk/backend/net.c
-@@ -1045,12 +1045,12 @@ sane_init (SANE_Int * version_code, SANE
+@@ -771,7 +771,7 @@ net_avahi_browse_callback (AvahiServiceB
+ {
+ case AVAHI_BROWSER_FAILURE:
+ DBG (1, "net_avahi_browse_callback: %s\n", avahi_strerror (avahi_client_errno (avahi_service_browser_get_client (b))));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ return;
+
+ case AVAHI_BROWSER_NEW:
+@@ -836,7 +836,7 @@ net_avahi_callback (AvahiClient *c, Avah
+ if (avahi_browser == NULL)
+ {
+ DBG (1, "net_avahi_callback: could not create service browser: %s\n", avahi_strerror (avahi_client_errno (c)));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ }
+ break;
+
+@@ -859,14 +859,14 @@ net_avahi_callback (AvahiClient *c, Avah
+ if (avahi_client == NULL)
+ {
+ DBG (1, "net_avahi_init: could not create Avahi client: %s\n", avahi_strerror (error));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ }
+ }
+ else
+ {
+ /* Another error happened - game over */
+ DBG (1, "net_avahi_callback: server connection failure: %s\n", avahi_strerror (error));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ }
+ break;
+ }
+@@ -1045,12 +1041,12 @@ sane_init (SANE_Int * version_code, SANE
continue;
}
- #ifdef WITH_AVAHI
+ #if WITH_AVAHI
- avahi_threaded_poll_lock (avahi_thread);
+ if (avahi_thread) avahi_threaded_poll_lock (avahi_thread);
#endif /* WITH_AVAHI */
DBG (2, "sane_init: trying to add %s\n", device_name);
add_device (device_name, 0);
- #ifdef WITH_AVAHI
+ #if WITH_AVAHI
- avahi_threaded_poll_unlock (avahi_thread);
+ if (avahi_thread) avahi_threaded_poll_unlock (avahi_thread);
#endif /* WITH_AVAHI */
}
-@@ -1096,12 +1096,12 @@ sane_init (SANE_Int * version_code, SANE
+@@ -1096,12 +1092,12 @@ sane_init (SANE_Int * version_code, SANE
continue;
#endif /* ENABLE_IPV6 */
- #ifdef WITH_AVAHI
+ #if WITH_AVAHI
- avahi_threaded_poll_lock (avahi_thread);
+ if (avahi_thread) avahi_threaded_poll_lock (avahi_thread);
#endif /* WITH_AVAHI */
DBG (2, "sane_init: trying to add %s\n", host);
add_device (host, 0);
- #ifdef WITH_AVAHI
+ #if WITH_AVAHI
- avahi_threaded_poll_unlock (avahi_thread);
+ if (avahi_thread) avahi_threaded_poll_unlock (avahi_thread);
#endif /* WITH_AVAHI */
}
free (copy);
-@@ -1519,11 +1519,11 @@ sane_open (SANE_String_Const full_name,
+@@ -1519,11 +1520,11 @@ sane_open (SANE_String_Const full_name,
"sane_open: device %s not found, trying to register it anyway\n",
nd_name);
- #ifdef WITH_AVAHI
+ #if WITH_AVAHI
- avahi_threaded_poll_lock (avahi_thread);
+ if (avahi_thread) avahi_threaded_poll_lock (avahi_thread);
#endif /* WITH_AVAHI */
status = add_device (nd_name, &dev);
- #ifdef WITH_AVAHI
+ #if WITH_AVAHI
- avahi_threaded_poll_unlock (avahi_thread);
+ if (avahi_thread) avahi_threaded_poll_unlock (avahi_thread);
#endif /* WITH_AVAHI */
diff --git a/debian/patches/0145-avahi.patch b/debian/patches/0145-avahi.patch
index 023dec5..67c874b 100644
--- a/debian/patches/0145-avahi.patch
+++ b/debian/patches/0145-avahi.patch
@@ -1,6 +1,7 @@
Description: scanimage assert failure: *** Error in `scanimage': double free or corruption (top)
Author: Laurent Vivier Laurent@vivier.eu
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1208091
+Forwarded: not needed
Last-Update: 2017-06-20
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -12,21 +13,22 @@ Index: trunk/backend/net.c
first_device = NULL;
first_handle = NULL;
--#ifdef WITH_AVAHI
+-#if WITH_AVAHI
- net_avahi_init ();
-#endif /* WITH_AVAHI */
-
auth_callback = authorize;
/* Return the version number of the sane-backends package to allow
-@@ -1119,6 +1115,10 @@ sane_init (SANE_Int * version_code, SANE
+@@ -1119,6 +1115,11 @@ sane_init (SANE_Int * version_code, SANE
DBG (2, "sane_init: connect timeout set to %d seconds from env\n", connect_timeout);
}
-+#ifdef WITH_AVAHI
++#if WITH_AVAHI
+ net_avahi_init ();
+#endif /* WITH_AVAHI */
+
++
DBG (2, "sane_init: done\n");
return SANE_STATUS_GOOD;
}
diff --git a/debian/patches/0150-i386-test.patch b/debian/patches/0150-i386-test.patch
index 211fc84..864d32a 100644
--- a/debian/patches/0150-i386-test.patch
+++ b/debian/patches/0150-i386-test.patch
@@ -1,5 +1,6 @@
Description: Disable some tests that fail on i386
Author: Jörg Frings-Fürst <debian@jff.email>
+Forwarded: not needed
Last-Update: 2020-04-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/debian/patches/0155-hurd_PATH_MAX.patch b/debian/patches/0155-hurd_PATH_MAX.patch
index 4a76248..41952c6 100644
--- a/debian/patches/0155-hurd_PATH_MAX.patch
+++ b/debian/patches/0155-hurd_PATH_MAX.patch
@@ -20,7 +20,7 @@ Index: trunk/backend/escl/escl.h
===================================================================
--- trunk.orig/backend/escl/escl.h
+++ trunk/backend/escl/escl.h
-@@ -61,6 +61,10 @@
+@@ -62,6 +62,10 @@
# define DBGDUMP(level, buf, size)
#endif
@@ -30,7 +30,7 @@ Index: trunk/backend/escl/escl.h
+
#define ESCL_CONFIG_FILE "escl.conf"
- typedef struct {
+
Index: trunk/backend/canon630u.c
===================================================================
--- trunk.orig/backend/canon630u.c
@@ -110,7 +110,7 @@ Index: trunk/backend/hp5400_sane.c
===================================================================
--- trunk.orig/backend/hp5400_sane.c
+++ trunk/backend/hp5400_sane.c
-@@ -109,6 +109,9 @@
+@@ -88,6 +88,9 @@
#define NUM_GAMMA_ENTRIES 65536
@@ -349,8 +349,8 @@ Index: trunk/backend/pixma/pixma_bjnp.c
===================================================================
--- trunk.orig/backend/pixma/pixma_bjnp.c
+++ trunk/backend/pixma/pixma_bjnp.c
-@@ -110,6 +110,12 @@
- # define SSIZE_MAX LONG_MAX
+@@ -117,6 +117,12 @@
+ # endif
#endif
+#ifndef HOST_NAME_MAX
diff --git a/debian/patches/0165-respect_local_only_parameter.patch b/debian/patches/0165-respect_local_only_parameter.patch
new file mode 100644
index 0000000..24fd39c
--- /dev/null
+++ b/debian/patches/0165-respect_local_only_parameter.patch
@@ -0,0 +1,768 @@
+Description: respect 'local_only' parameter of sane_get_devices()
+Author: Barnabás Pőcze <pobrn@protonmail.com>
+Origin: backport, https://gitlab.com/sane-project/backends/-/commit/245564dffe96ddf0fd1c703c48973cd35fddd268
+Bug: https://gitlab.com/sane-project/backends/-/merge_requests/502/
+Forwarded: no
+Last-Update: 2020-09-05
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/backend/dell1600n_net.c
+===================================================================
+--- trunk.orig/backend/dell1600n_net.c
++++ trunk/backend/dell1600n_net.c
+@@ -288,8 +288,7 @@ sane_exit (void)
+ /***********************************************************/
+
+ SANE_Status
+-sane_get_devices (const SANE_Device *** device_list,
+- SANE_Bool __sane_unused__ local_only)
++sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
+ {
+
+ int ret;
+@@ -312,6 +311,10 @@ sane_get_devices (const SANE_Device ***
+ sock = 0;
+ pDevice = NULL;
+ optYes = 1;
++
++ if (local_only)
++ return ret;
++
+ InitComBuf (&queryPacket);
+
+ /* clear previous results */
+Index: trunk/backend/epson2.c
+===================================================================
+--- trunk.orig/backend/epson2.c
++++ trunk/backend/epson2.c
+@@ -813,10 +813,11 @@ attach_one_pio(const char *dev)
+ }
+
+ static SANE_Status
+-attach_one_config(SANEI_Config __sane_unused__ *config, const char *line)
++attach_one_config(SANEI_Config __sane_unused__ *config, const char *line,
++ void *data)
+ {
+ int vendor, product;
+-
++ SANE_Bool local_only = *(SANE_Bool*) data;
+ int len = strlen(line);
+
+ DBG(7, "%s: len = %d, line = %s\n", __func__, len, line);
+@@ -847,13 +848,16 @@ attach_one_config(SANEI_Config __sane_un
+
+ } else if (strncmp(line, "net", 3) == 0) {
+
+- /* remove the "net" sub string */
+- const char *name = sanei_config_skip_whitespace(line + 3);
+-
+- if (strncmp(name, "autodiscovery", 13) == 0)
+- e2_network_discovery();
+- else
+- attach_one_net(name);
++ if (!local_only) {
++ /* remove the "net" sub string */
++ const char *name =
++ sanei_config_skip_whitespace(line + 3);
++
++ if (strncmp(name, "autodiscovery", 13) == 0)
++ e2_network_discovery();
++ else
++ attach_one_net(name);
++ }
+
+ } else if (strncmp(line, "pio", 3) == 0) {
+
+@@ -889,14 +893,14 @@ free_devices(void)
+ }
+
+ static void
+-probe_devices(void)
++probe_devices(SANE_Bool local_only)
+ {
+ DBG(5, "%s\n", __func__);
+
+ free_devices();
+
+ sanei_configure_attach(EPSON2_CONFIG_FILE, NULL,
+- attach_one_config);
++ attach_one_config, &local_only);
+ }
+
+ SANE_Status
+@@ -926,14 +930,14 @@ sane_exit(void)
+ }
+
+ SANE_Status
+-sane_get_devices(const SANE_Device ***device_list, SANE_Bool __sane_unused__ local_only)
++sane_get_devices(const SANE_Device ***device_list, SANE_Bool local_only)
+ {
+ Epson_Device *dev;
+ int i;
+
+ DBG(5, "%s\n", __func__);
+
+- probe_devices();
++ probe_devices(local_only);
+
+ devlist = malloc((num_devices + 1) * sizeof(devlist[0]));
+ if (!devlist) {
+@@ -1470,7 +1474,7 @@ sane_open(SANE_String_Const name, SANE_H
+ /* probe if empty device name provided */
+ if (l == 0) {
+
+- probe_devices();
++ probe_devices(SANE_FALSE);
+
+ if (first_dev == NULL) {
+ DBG(1, "no device detected\n");
+@@ -1507,7 +1511,7 @@ sane_open(SANE_String_Const name, SANE_H
+ */
+
+ if (first_dev == NULL)
+- probe_devices();
++ probe_devices(SANE_FALSE);
+
+ s = device_detect(name, SANE_EPSON_NODEV, 0, &status);
+ if (s == NULL) {
+Index: trunk/backend/epsonds.c
+===================================================================
+--- trunk.orig/backend/epsonds.c
++++ trunk/backend/epsonds.c
+@@ -481,10 +481,11 @@ attach_one_net(const char *dev)
+
+
+ static SANE_Status
+-attach_one_config(SANEI_Config __sane_unused__ *config, const char *line)
++attach_one_config(SANEI_Config __sane_unused__ *config, const char *line,
++ void *data)
+ {
+ int vendor, product;
+-
++ SANE_Bool local_only = *(SANE_Bool*) data;
+ int len = strlen(line);
+
+ DBG(7, "%s: len = %d, line = %s\n", __func__, len, line);
+@@ -513,13 +514,16 @@ attach_one_config(SANEI_Config __sane_un
+
+ } else if (strncmp(line, "net", 3) == 0) {
+
+- /* remove the "net" sub string */
+- const char *name = sanei_config_skip_whitespace(line + 3);
+-
+- if (strncmp(name, "autodiscovery", 13) == 0)
+- e2_network_discovery();
+- else
+- attach_one_net(name);
++ if (!local_only) {
++ /* remove the "net" sub string */
++ const char *name =
++ sanei_config_skip_whitespace(line + 3);
++
++ if (strncmp(name, "autodiscovery", 13) == 0)
++ e2_network_discovery();
++ else
++ attach_one_net(name);
++ }
+
+ } else {
+ DBG(0, "unable to parse config line: %s\n", line);
+@@ -545,12 +549,13 @@ free_devices(void)
+ }
+
+ static void
+-probe_devices(void)
++probe_devices(SANE_Bool local_only)
+ {
+ DBG(5, "%s\n", __func__);
+
+ free_devices();
+- sanei_configure_attach(EPSONDS_CONFIG_FILE, NULL, attach_one_config);
++ sanei_configure_attach(EPSONDS_CONFIG_FILE, NULL,
++ attach_one_config, &local_only);
+ }
+
+ /**** SANE API ****/
+@@ -581,14 +586,14 @@ sane_exit(void)
+ }
+
+ SANE_Status
+-sane_get_devices(const SANE_Device ***device_list, SANE_Bool __sane_unused__ local_only)
++sane_get_devices(const SANE_Device ***device_list, SANE_Bool local_only)
+ {
+ int i;
+ epsonds_device *dev;
+
+ DBG(5, "** %s\n", __func__);
+
+- probe_devices();
++ probe_devices(local_only);
+
+ devlist = malloc((num_devices + 1) * sizeof(devlist[0]));
+ if (!devlist) {
+@@ -793,7 +798,7 @@ sane_open(SANE_String_Const name, SANE_H
+ /* probe if empty device name provided */
+ if (name[0] == '\0') {
+
+- probe_devices();
++ probe_devices(SANE_FALSE);
+
+ if (first_dev == NULL) {
+ DBG(1, "no devices detected\n");
+Index: trunk/backend/escl/escl.c
+===================================================================
+--- trunk.orig/backend/escl/escl.c
++++ trunk/backend/escl/escl.c
+@@ -383,7 +383,8 @@ sane_exit(void)
+ * \return escl_add_in_list(escl_device) if the parsing worked, SANE_STATUS_GOOD otherwise.
+ */
+ static SANE_Status
+-attach_one_config(SANEI_Config __sane_unused__ *config, const char *line)
++attach_one_config(SANEI_Config __sane_unused__ *config, const char *line,
++ void __sane_unused__ *data)
+ {
+ int port = 0;
+ SANE_Status status;
+@@ -487,7 +488,8 @@ sane_get_devices(const SANE_Device ***de
+
+ if (device_list == NULL)
+ return (SANE_STATUS_INVAL);
+- status = sanei_configure_attach(ESCL_CONFIG_FILE, NULL, attach_one_config);
++ status = sanei_configure_attach(ESCL_CONFIG_FILE, NULL,
++ attach_one_config, NULL);
+ if (status != SANE_STATUS_GOOD)
+ return (status);
+ escl_devices(&status);
+Index: trunk/backend/genesys/genesys.cpp
+===================================================================
+--- trunk.orig/backend/genesys/genesys.cpp
++++ trunk/backend/genesys/genesys.cpp
+@@ -5186,7 +5186,8 @@ static SANE_Status attach_one_device(SAN
+
+ // this function is passed to C API, it must not throw
+ static SANE_Status
+-config_attach_genesys(SANEI_Config __sane_unused__ *config, const char *devname) noexcept
++config_attach_genesys(SANEI_Config __sane_unused__ *config, const char *devname,
++ void __sane_unused__ *data) noexcept
+ {
+ /* the devname has been processed and is ready to be used
+ * directly. Since the backend is an USB only one, we can
+@@ -5214,7 +5215,8 @@ static void probe_genesys_devices()
+ config.values = nullptr;
+ config.count = 0;
+
+- auto status = sanei_configure_attach(GENESYS_CONFIG_FILE, &config, config_attach_genesys);
++ auto status = sanei_configure_attach(GENESYS_CONFIG_FILE, &config,
++ config_attach_genesys, NULL);
+ if (status == SANE_STATUS_ACCESS_DENIED) {
+ dbg.vlog(DBG_error0, "Critical error: Couldn't access configuration file '%s'",
+ GENESYS_CONFIG_FILE);
+Index: trunk/backend/kodakaio.c
+===================================================================
+--- trunk.orig/backend/kodakaio.c
++++ trunk/backend/kodakaio.c
+@@ -2513,10 +2513,11 @@ attach_one_net(const char *dev, unsigned
+ }
+
+ static SANE_Status
+-attach_one_config(SANEI_Config __sane_unused__ *config, const char *line)
++attach_one_config(SANEI_Config __sane_unused__ *config, const char *line,
++ void *data)
+ {
+ int vendor, product, timeout;
+-
++ SANE_Bool local_only = *(SANE_Bool*) data;
+ int len = strlen(line);
+
+ DBG(7, "%s: len = %d, line = %s\n", __func__, len, line);
+@@ -2550,27 +2551,30 @@ attach_one_config(SANEI_Config __sane_un
+
+ } else if (strncmp(line, "net", 3) == 0) {
+
+- /* remove the "net" sub string */
+- const char *name = sanei_config_skip_whitespace(line + 3);
+- char IP[1024];
+- unsigned int model = 0;
+-
+- if (strncmp(name, "autodiscovery", 13) == 0) {
+-
+-#if WITH_AVAHI
+- DBG (30, "%s: Initiating network autodiscovery via avahi\n", __func__);
+- kodak_network_discovery(NULL);
+-#else
+- DBG (20, "%s: Network autodiscovery not done because not configured with avahi.\n", __func__);
+-#endif
+-
+- } else if (sscanf(name, "%s %x", IP, &model) == 2) {
+- DBG(30, "%s: Using network device on IP %s, forcing model 0x%x\n", __func__, IP, model);
+- attach_one_net(IP, model);
+- } else {
++ if (!local_only) {
++ /* remove the "net" sub string */
++ const char *name =
++ sanei_config_skip_whitespace(line + 3);
++ char IP[1024];
++ unsigned int model = 0;
++
++ if (strncmp(name, "autodiscovery", 13) == 0) {
++
++ #if WITH_AVAHI
++ DBG (30, "%s: Initiating network autodiscovery via avahi\n", __func__);
++ kodak_network_discovery(NULL);
++ #else
++ DBG (20, "%s: Network autodiscovery not done because not configured with avahi.\n", __func__);
++ #endif
++
++ } else if (sscanf(name, "%s %x", IP, &model) == 2) {
++ DBG(30, "%s: Using network device on IP %s, forcing model 0x%x\n", __func__, IP, model);
++ attach_one_net(IP, model);
++ } else {
+ DBG(1, "%s: net entry %s may be a host name?\n", __func__, name);
+ attach_one_net(name, 0);
+ }
++ }
+
+ } else if (sscanf(line, "snmp-timeout %i\n", &timeout)) {
+ /* Timeout for auto network discovery */
+@@ -2646,7 +2650,7 @@ sane_exit(void)
+ }
+
+ SANE_Status
+-sane_get_devices(const SANE_Device ***device_list, SANE_Bool __sane_unused__ local_only)
++sane_get_devices(const SANE_Device ***device_list, SANE_Bool local_only)
+ {
+ Kodak_Device *dev, *s, *prev=0;
+ int i;
+@@ -2662,7 +2666,7 @@ sane_get_devices(const SANE_Device ***de
+
+ /* Read the config, mark each device as found, possibly add new devs */
+ sanei_configure_attach(KODAKAIO_CONFIG_FILE, NULL,
+- attach_one_config);
++ attach_one_config, &local_only);
+
+ /*delete missing scanners from list*/
+ for (s = first_dev; s;) {
+Index: trunk/backend/magicolor.c
+===================================================================
+--- trunk.orig/backend/magicolor.c
++++ trunk/backend/magicolor.c
+@@ -2157,10 +2157,11 @@ attach_one_net(const char *dev, unsigned
+ }
+
+ static SANE_Status
+-attach_one_config(SANEI_Config __sane_unused__ *config, const char *line)
++attach_one_config(SANEI_Config __sane_unused__ *config, const char *line,
++ void *data)
+ {
+ int vendor, product, timeout;
+-
++ SANE_Bool local_only = *(SANE_Bool*) data;
+ int len = strlen(line);
+
+ DBG(7, "%s: len = %d, line = %s\n", __func__, len, line);
+@@ -2189,24 +2190,27 @@ attach_one_config(SANEI_Config __sane_un
+
+ } else if (strncmp(line, "net", 3) == 0) {
+
+- /* remove the "net" sub string */
+- const char *name = sanei_config_skip_whitespace(line + 3);
+- char IP[1024];
+- unsigned int model = 0;
+-
+- if (strncmp(name, "autodiscovery", 13) == 0) {
+- DBG (50, "%s: Initiating network autodiscovervy via SNMP\n", __func__);
+- mc_network_discovery(NULL);
+- } else if (sscanf(name, "%s %x", IP, &model) == 2) {
+- DBG(50, "%s: Using network device on IP %s, forcing model 0x%x\n", __func__, IP, model);
+- attach_one_net(IP, model);
+- } else {
+- /* use SNMP to detect the type. If not successful,
+- * add the host with model type 0 */
+- DBG(50, "%s: Using network device on IP %s, trying to autodetect model\n", __func__, IP);
+- if (mc_network_discovery(name)==0) {
+- DBG(1, "%s: Autodetecting device model failed, using default model\n", __func__);
+- attach_one_net(name, 0);
++ if (!local_only) {
++ /* remove the "net" sub string */
++ const char *name =
++ sanei_config_skip_whitespace(line + 3);
++ char IP[1024];
++ unsigned int model = 0;
++
++ if (strncmp(name, "autodiscovery", 13) == 0) {
++ DBG (50, "%s: Initiating network autodiscovervy via SNMP\n", __func__);
++ mc_network_discovery(NULL);
++ } else if (sscanf(name, "%s %x", IP, &model) == 2) {
++ DBG(50, "%s: Using network device on IP %s, forcing model 0x%x\n", __func__, IP, model);
++ attach_one_net(IP, model);
++ } else {
++ /* use SNMP to detect the type. If not successful,
++ * add the host with model type 0 */
++ DBG(50, "%s: Using network device on IP %s, trying to autodetect model\n", __func__, IP);
++ if (mc_network_discovery(name)==0) {
++ DBG(1, "%s: Autodetecting device model failed, using default model\n", __func__);
++ attach_one_net(name, 0);
++ }
+ }
+ }
+
+@@ -2279,7 +2283,7 @@ sane_exit(void)
+ }
+
+ SANE_Status
+-sane_get_devices(const SANE_Device ***device_list, SANE_Bool __sane_unused__ local_only)
++sane_get_devices(const SANE_Device ***device_list, SANE_Bool local_only)
+ {
+ Magicolor_Device *dev, *s, *prev=0;
+ int i;
+@@ -2295,7 +2299,7 @@ sane_get_devices(const SANE_Device ***de
+
+ /* Read the config, mark each device as found, possibly add new devs */
+ sanei_configure_attach(MAGICOLOR_CONFIG_FILE, NULL,
+- attach_one_config);
++ attach_one_config, &local_only);
+
+ /*delete missing scanners from list*/
+ for (s = first_dev; s;) {
+Index: trunk/backend/p5.c
+===================================================================
+--- trunk.orig/backend/p5.c
++++ trunk/backend/p5.c
+@@ -1566,7 +1566,8 @@ probe_p5_devices (void)
+ config.count = NUM_CFG_OPTIONS;
+
+ /* generic configure and attach function */
+- status = sanei_configure_attach (P5_CONFIG_FILE, &config, config_attach);
++ status = sanei_configure_attach (P5_CONFIG_FILE, &config,
++ config_attach, NULL);
+ /* free allocated options */
+ for (i = 0; i < NUM_CFG_OPTIONS; i++)
+ {
+@@ -1590,7 +1591,8 @@ probe_p5_devices (void)
+ * SANE_STATUS_INVAL in case of error
+ */
+ static SANE_Status
+-config_attach (SANEI_Config * config, const char *devname)
++config_attach (SANEI_Config __sane_unused__ * config, const char *devname,
++ void __sane_unused__ *data)
+ {
+ /* currently, the config is a global variable so config is useless here */
+ /* the correct thing would be to have a generic sanei_attach_matching_devices
+Index: trunk/backend/p5.h
+===================================================================
+--- trunk.orig/backend/p5.h
++++ trunk/backend/p5.h
+@@ -195,7 +195,8 @@ typedef struct P5_Session
+
+ static SANE_Status probe_p5_devices (void);
+ static P5_Model *probe (const char *devicename);
+-static SANE_Status config_attach (SANEI_Config * config, const char *devname);
++static SANE_Status config_attach (SANEI_Config * config, const char *devname,
++ void *data);
+ static SANE_Status attach_p5 (const char *name, SANEI_Config * config);
+ static SANE_Status init_options (struct P5_Session *session);
+ static SANE_Status compute_parameters (struct P5_Session *session);
+Index: trunk/backend/pixma/pixma.c
+===================================================================
+--- trunk.orig/backend/pixma/pixma.c
++++ trunk/backend/pixma/pixma.c
+@@ -159,10 +159,11 @@ static void mark_all_button_options_cach
+ ss -> button_option_is_cached[i] = 1;
+ }
+
+-static SANE_Status config_attach_pixma(SANEI_Config * config, const char *devname)
++static SANE_Status config_attach_pixma(SANEI_Config __sane_unused__ * config,
++ const char *devname,
++ void __sane_unused__ *data)
+ {
+ int i;
+- UNUSED(config);
+ for (i=0; i < (MAX_CONF_DEVICES -1); i++)
+ {
+ if(conf_devices[i] == NULL)
+@@ -1656,8 +1657,8 @@ sane_init (SANE_Int * version_code, SANE
+ config.descriptors = NULL;
+ config.values = NULL;
+
+- if (sanei_configure_attach(PIXMA_CONFIG_FILE, &config, config_attach_pixma) !=
+- SANE_STATUS_GOOD)
++ if (sanei_configure_attach(PIXMA_CONFIG_FILE, &config,
++ config_attach_pixma, NULL) != SANE_STATUS_GOOD)
+ PDBG(pixma_dbg(2, "Could not read pixma configuration file: %s\n",
+ PIXMA_CONFIG_FILE));
+
+Index: trunk/backend/rts8891.c
+===================================================================
+--- trunk.orig/backend/rts8891.c
++++ trunk/backend/rts8891.c
+@@ -217,7 +217,7 @@ static Rts8891_Config rtscfg;
+ /* ------------------------------------------------------------------------- */
+ static SANE_Status probe_rts8891_devices (void);
+ static SANE_Status config_attach_rts8891 (SANEI_Config * config,
+- const char *devname);
++ const char *devname, void *data);
+ static SANE_Status attach_rts8891 (const char *name);
+ static SANE_Status set_lamp_brightness (struct Rts8891_Device *dev,
+ int level);
+@@ -2374,7 +2374,7 @@ probe_rts8891_devices (void)
+
+ /* generic configure and attach function */
+ status = sanei_configure_attach (RTS8891_CONFIG_FILE, &config,
+- config_attach_rts8891);
++ config_attach_rts8891, NULL);
+ /* free allocated options */
+ for (i = 0; i < NUM_CFG_OPTIONS; i++)
+ {
+@@ -2398,7 +2398,8 @@ probe_rts8891_devices (void)
+ * SANE_STATUS_INVAL in case of error
+ */
+ static SANE_Status
+-config_attach_rts8891 (SANEI_Config * config, const char *devname)
++config_attach_rts8891 (SANEI_Config * config, const char *devname,
++ void __sane_unused__ *data)
+ {
+ /* currently, the config is a global variable so config is useless here */
+ /* the correct thing would be to have a generic sanei_attach_matching_devices
+Index: trunk/backend/umax_pp.c
+===================================================================
+--- trunk.orig/backend/umax_pp.c
++++ trunk/backend/umax_pp.c
+@@ -419,7 +419,8 @@ umax_pp_auto_attach (SANEI_Config * conf
+ * device name to use for attach try.
+ */
+ static SANE_Status
+-umax_pp_configure_attach (SANEI_Config * config, const char *devname)
++umax_pp_configure_attach (SANEI_Config * config, const char *devname,
++ void __sane_unused__ *data)
+ {
+ const char *lp;
+ SANE_Char *token;
+@@ -961,7 +962,7 @@ sane_init (SANE_Int * version_code, SANE
+
+ /* generic configure and attach function */
+ status = sanei_configure_attach (UMAX_PP_CONFIG_FILE, &config,
+- umax_pp_configure_attach);
++ umax_pp_configure_attach, NULL);
+
+ /* free option descriptors */
+ for (i = 0; i < NUM_CFG_OPTIONS; i++)
+Index: trunk/backend/xerox_mfp.c
+===================================================================
+--- trunk.orig/backend/xerox_mfp.c
++++ trunk/backend/xerox_mfp.c
+@@ -1028,7 +1028,8 @@ list_one_device(SANE_String_Const devnam
+
+ /* SANE API ignores return code of this callback */
+ static SANE_Status
+-list_conf_devices(UNUSED(SANEI_Config *config), const char *devname)
++list_conf_devices(SANEI_Config __sane_unused__ *config, const char *devname,
++ void __sane_unused__ *data)
+ {
+ return tr_from_devname(devname)->configure_device(devname, list_one_device);
+ }
+@@ -1080,7 +1081,7 @@ sane_get_devices(const SANE_Device *** d
+ config.count = 0;
+ config.descriptors = NULL;
+ config.values = NULL;
+- sanei_configure_attach(XEROX_CONFIG_FILE, &config, list_conf_devices);
++ sanei_configure_attach(XEROX_CONFIG_FILE, &config, list_conf_devices, NULL);
+
+ for (dev_count = 0, dev = devices_head; dev; dev = dev->next)
+ dev_count++;
+Index: trunk/include/sane/sanei_config.h
+===================================================================
+--- trunk.orig/include/sane/sanei_config.h
++++ trunk/include/sane/sanei_config.h
+@@ -166,7 +166,9 @@ typedef struct
+ extern SANE_Status sanei_configure_attach (
+ const char *config_file,
+ SANEI_Config *config,
+- SANE_Status (*config_attach)(SANEI_Config *config, const char *devname)
++ SANE_Status (*config_attach)(SANEI_Config *config, const char *devname,
++ void *data),
++ void *data
+ );
+
+ /** Return the list of config directories, extracted from the SANE_CONFIG_DIR
+Index: trunk/sanei/sanei_config.c
+===================================================================
+--- trunk.orig/sanei/sanei_config.c
++++ trunk/sanei/sanei_config.c
+@@ -239,7 +239,8 @@ sanei_config_read (char *str, int n, FIL
+ SANE_Status
+ sanei_configure_attach (const char *config_file, SANEI_Config * config,
+ SANE_Status (*attach) (SANEI_Config * config,
+- const char *devname))
++ const char *devname, void *data),
++ void *data)
+ {
+ SANE_Char line[PATH_MAX];
+ SANE_Char *token, *string;
+@@ -443,7 +444,7 @@ sanei_configure_attach (const char *conf
+ DBG (3, "sanei_configure_attach: trying to attach with '%s'\n",
+ lp2);
+ if(attach!=NULL)
+- attach (config, lp2);
++ attach (config, lp2, data);
+ }
+ }
+
+Index: trunk/testsuite/sanei/sanei_config_test.c
+===================================================================
+--- trunk.orig/testsuite/sanei/sanei_config_test.c
++++ trunk/testsuite/sanei/sanei_config_test.c
+@@ -63,7 +63,8 @@ static const SANE_String_Const string_li
+ static char *lastdevname = NULL;
+
+ static SANE_Status
+-check_config_attach (SANEI_Config * config, const char *devname)
++check_config_attach (SANEI_Config * config, const char *devname,
++ void __sane_unused__ *data)
+ {
+ /* silence compiler warning for now */
+ if (config == NULL)
+@@ -97,7 +98,8 @@ inexistent_config (void)
+ config.descriptors = NULL;
+ config.values = NULL;
+ status = sanei_configure_attach (CONFIG_PATH
+- "/data/inexistent.conf", &config, NULL);
++ "/data/inexistent.conf", &config,
++ NULL, NULL);
+
+ /* check results */
+ assert (status != SANE_STATUS_GOOD);
+@@ -114,7 +116,7 @@ null_config (void)
+
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/umax_pp.conf", NULL,
+- check_config_attach);
++ check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -130,7 +132,7 @@ null_attach (void)
+ SANE_Status status;
+
+ status = sanei_configure_attach (CONFIG_PATH
+- "/data/umax_pp.conf", NULL, NULL);
++ "/data/umax_pp.conf", NULL, NULL, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -151,7 +153,7 @@ empty_config (void)
+ config.values = NULL;
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/empty.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -206,7 +208,7 @@ string_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/string.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -250,7 +252,7 @@ int_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/int.conf", &config,
+- check_config_attach);
++ check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -293,7 +295,7 @@ wrong_range_int_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/wrong-range.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_INVAL);
+@@ -336,7 +338,7 @@ word_array_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/word-array.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -382,7 +384,7 @@ string_list_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/string-list.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -428,7 +430,7 @@ wrong_string_list_option (void)
+ status =
+ sanei_configure_attach (CONFIG_PATH
+ "/data/wrong-string-list.conf", &config,
+- check_config_attach);
++ check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_INVAL);
+@@ -563,7 +565,7 @@ umax_pp (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/umax_pp.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -631,7 +633,7 @@ wrong_bool_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/wrong-boolean.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_INVAL);
+@@ -696,7 +698,7 @@ bool_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/boolean.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -767,7 +769,7 @@ fixed_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/fixed.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
+@@ -814,7 +816,7 @@ wrong_fixed_option (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/wrong-fixed.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_INVAL);
+@@ -852,7 +854,7 @@ snapscan (void)
+ /* configure and attach */
+ status =
+ sanei_configure_attach (CONFIG_PATH "/data/snapscan.conf",
+- &config, check_config_attach);
++ &config, check_config_attach, NULL);
+
+ /* check results */
+ assert (status == SANE_STATUS_GOOD);
diff --git a/debian/patches/0600-scanimage_manpage.patch b/debian/patches/0600-scanimage_manpage.patch
index 26cedf4..e163e9c 100644
--- a/debian/patches/0600-scanimage_manpage.patch
+++ b/debian/patches/0600-scanimage_manpage.patch
@@ -1,7 +1,7 @@
Description: Add remark to options.
Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=418630
-Forwarded:
+Forwarded: not needed
Last-Update: 2015-01-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/debian/patches/0700-mk_reproducible_results.patch b/debian/patches/0700-mk_reproducible_results.patch
index 1b0a7bc..78f9e5b 100644
--- a/debian/patches/0700-mk_reproducible_results.patch
+++ b/debian/patches/0700-mk_reproducible_results.patch
@@ -1,5 +1,6 @@
Description: Make build reproducible.
Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Forwarded: not needed
Last-Update: 2019-08-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/debian/patches/0725-fix_link_60-libsane_rule.patch b/debian/patches/0725-fix_link_60-libsane_rule.patch
index 018e796..ec851cf 100644
--- a/debian/patches/0725-fix_link_60-libsane_rule.patch
+++ b/debian/patches/0725-fix_link_60-libsane_rule.patch
@@ -9,7 +9,7 @@ Index: trunk/tools/sane-desc.c
===================================================================
--- trunk.orig/tools/sane-desc.c
+++ trunk/tools/sane-desc.c
-@@ -3665,7 +3665,7 @@ print_udevhwdb_header (void)
+@@ -3651,7 +3651,7 @@ print_udevhwdb_header (void)
("#\n"
"# udev rules file for supported USB and SCSI devices\n"
"#\n"
diff --git a/debian/patches/series b/debian/patches/series
index 75a0ddc..d79cdd7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,10 +5,15 @@
0140-avahi.patch
0145-avahi.patch
0600-scanimage_manpage.patch
-0700-mk_reproducible_results.patch
+#0700-mk_reproducible_results.patch
0705-kfreebsd.patch
-0715-20-sane.hwdb_multi-arch.patch
+#0715-20-sane.hwdb_multi-arch.patch
0725-fix_link_60-libsane_rule.patch
0150-i386-test.patch
0155-hurd_PATH_MAX.patch
-0160-big_endian.patch
+#0160-big_endian.patch
+0045-disable_lock_test_at_build_time.patch
+0050-Use-python3-shebang.patch
+0055-Fix_build_error.patch
+0060-cross.patch
+0165-respect_local_only_parameter.patch