summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
commit7e9455b3b15671ff99ed168638c405e2acedb6df (patch)
tree444e59ece236e09dc153f665e42160aeb0208c24 /debian
parentbc8a517abd2e11e1435f4ef042cfcc8648b62ef7 (diff)
parentbce41b3c37c2a68e7dab234ce0247755a61ceb40 (diff)
Merge branch 'release/debian/1.0.31-1_experimental1' into masterdebian/1.0.31-1_experimental1
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog40
-rw-r--r--debian/control29
-rw-r--r--debian/copyright30
-rw-r--r--debian/libsane-common.lintian-overrides6
-rw-r--r--debian/libsane1.symbols14
-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
-rw-r--r--debian/po/de.po30
-rwxr-xr-xdebian/rules29
-rw-r--r--debian/sane-utils.dirs1
-rw-r--r--debian/sane-utils.logrotate9
-rw-r--r--debian/sane-utils.saned@.service4
-rw-r--r--debian/saned.socket10
-rw-r--r--debian/saned@.service16
28 files changed, 1117 insertions, 104 deletions
diff --git a/debian/changelog b/debian/changelog
index 4208140..3917c26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,43 @@
+sane-backends (1.0.31-1~experimental1) experimental; urgency=medium
+
+ * New upstream release (Closes: #968949, #962539).
+ * Add back libsane transitional package, to ease upgrades (Closes: #962936):
+ - debian/control: Add package libsane as oldlibs.
+ Thanks to Gianfranco Costamagna <locutusofborg@debian.org>.
+ * debian/copyright:
+ - Fix lintian *-globbing-patterns errors.
+ - Refresh to the new upstream release.
+ * Convert debian/po/de.po to utf-8.
+ * New patches:
+ - debian/patches/0045-disable_lock_test_at_build_time.patch
+ - debian/patches/0050-Use-python3-shebang.patch
+ - debian/patches/0055-Fix_build_error.patch
+ - debian/patches/0165-respect_local_only_parameter.patch
+ * debian/rules:
+ - Use --enable-locking instead --disable-locking.
+ * debian/control:
+ - Add libpoppler-glib-dev to Build-Depends.
+ - Add ipp-usb to libsane1 Recommends (Closes: #968953).
+ * debian/libsane1.symbols:
+ - Remove 7 not longer available symbols.
+ * debian/saned@.service:
+ - Switch Standard[Output|Error] from syslog to append:/var/log/saned.log.
+ - New debian/sane-utils.logrotate to pack and remove old logs.
+ * debian/libsane-common.lintian-overrides:
+ - Rename tags.
+ * debian/patches/0125-multiarch_dll_search_path.patch:
+ - Add $(prefix)/lib64/sane to lib search path (Closes: #931297).
+ * Fix FTCBFS: (Closes: #948711)
+ - 0060-cross.patch: Make gphoto2 detection use the host architecture
+ pkg-config.
+ - Build tools/sane-desc for the build architecture.
+ - Thanks to Helmut Grohne <helmut@subdivi.de>.
+ * Remove files no longer needed:
+ - debian/saned.socket
+ - debian/saned@.service
+
+ -- Jörg Frings-Fürst <debian@jff.email> Sat, 05 Sep 2020 17:48:20 +0200
+
sane-backends (1.0.30-1~experimental2) experimental; urgency=medium
* debian/not-installed:
diff --git a/debian/control b/debian/control
index fe40df3..b5e3f42 100644
--- a/debian/control
+++ b/debian/control
@@ -17,6 +17,7 @@ Build-Depends:
libieee1284-3-dev [!hurd-i386],
libjpeg-dev,
libltdl3-dev,
+ libpoppler-glib-dev,
libsnmp-dev [!kfreebsd-any],
libsystemd-dev [linux-any],
libtiff-dev,
@@ -24,7 +25,8 @@ Build-Depends:
libxml2-dev,
pkg-config,
po-debconf,
- xutils-dev
+ xutils-dev,
+ python3-minimal
Homepage: http://www.sane-project.org
Vcs-Git: git://jff.email/opt/git/sane-backends.git
Vcs-Browser: https://jff.email/cgit/sane-backends.git
@@ -94,7 +96,9 @@ Depends:
udev [linux-any],
${misc:Depends},
${shlibs:Depends}
-Recommends: sane-utils (>= ${binary:Version})
+Recommends:
+ sane-utils (>= ${binary:Version}),
+ ipp-usb
Suggests: avahi-daemon, hplip
Description: API library for scanners
SANE stands for "Scanner Access Now Easy" and is an application
@@ -131,3 +135,24 @@ Description: API development library for scanners [development files]
.
This package contains the files needed to build your applications
using SANE.
+
+Package: libsane
+Architecture: any
+Multi-Arch: same
+Section: oldlibs
+Depends:
+ libsane1 (>= ${source:Version}),
+ ${misc:Depends}
+Description: API library for scanners [transitional package]
+ SANE stands for "Scanner Access Now Easy" and is an application
+ programming interface (API) that provides standardized access to any
+ raster image scanner hardware (flatbed scanner, hand-held scanner,
+ video- and still-cameras, frame-grabbers, etc.). The SANE standard is
+ free and its discussion and development are open to everybody. The
+ current source code is written to support several operating systems,
+ including GNU/Linux, OS/2, Win32 and various Unices and is available
+ under the GNU General Public License (commercial applications and
+ backends are welcome, too, however).
+ .
+ This package is here to ensure smooth upgrades. It can be removed when
+ you see fit.
diff --git a/debian/copyright b/debian/copyright
index 80efaa3..9d9458a 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -121,7 +121,7 @@ License: GPL-2+ with sane exception
Files: backend/escl/*
Copyright: 2019 Touboul Nathane
- 2019 Thierry HUCHARD <thierry@ordissimo.com>
+ 2019-2020 Thierry HUCHARD <thierry@ordissimo.com>
License: GPL-2+ with sane exception
Files: backend/epjitsu*.*
@@ -181,7 +181,10 @@ License: GPL-2+ with sane exception
Files: backend/genesys/error.cpp
backend/genesys/serialize.h
backend/genesys/error.h
-Copyright: 2019 Povilas Kanapickas <povilas@radix.lt>
+ backend/genesys/value_filter.h
+ backend/genesys/tables_memory_layout.cpp
+ backend/genesys/gl842.cpp
+Copyright: 2019-2020 Povilas Kanapickas <povilas@radix.lt>
License: GPL-2+ with sane exception
Files: backend/genesys/gl646.h
@@ -253,6 +256,7 @@ Files: backend/hp5400.*
backend/hp5400_xfer.*
Copyright: 2003 Martijn van Oosterhout <kleptog@svana.org>
2003 Thomas Soumarmon <thomas.soumarmon@cogitae.net>
+ 2020 2020 Ralph Little <skelband@gmail.com>
License: GPL-2+ with sane exception
Files: backend/hp5400_internal.*
@@ -260,6 +264,7 @@ Files: backend/hp5400_internal.*
Copyright: 2003 Martijn van Oosterhout <kleptog@svana.org>
2003 Thomas Soumarmon <thomas.soumarmon@cogitae.net>
2003 Henning Meier-Geinitz, <henning@meier-geinitz.de>
+ 2020 Ralph Little <skelband@gmail.com>
License: GPL-2+ with sane exception
Files: backend/hp5590*.*
@@ -299,7 +304,6 @@ License: GPL-2+
Files: backend/leo.*
backend/matsushita.*
backend/sceptre.*
- backend/sceptre.c
backend/teco1.*
backend/teco3.*
backend/umax-usb.c
@@ -424,7 +428,7 @@ License: GPL-2+ with sane exception
Files: backend/pixma/pixma*.*
Copyright: 2007-2008 Nicolas Martin, <nicols-guest@alioth.debian.org>
2006-2007 Wittawat Yamwong <wittawat@web.de>
- 2011-2019 Rolf Bensch <rolf@bensch-online.de>
+ 2011-2020 Rolf Bensch <rolf@bensch-online.de>
License: GPL-2+ with sane exception
Files: backend/pixma/pixma_bjnp*.*
@@ -727,7 +731,11 @@ License: GPL-2+ with sane exception
Files: po/he.po
po/ca@valencia.po
po/ca.po
-Copyright: 2018 The SANE developers
+Copyright: 2018-2020 The SANE developers
+License: GPL-2+ with sane exception
+
+Files: po/de.po
+Copyright: 2002-2020 SANE Project
License: GPL-2+ with sane exception
Files: po/fr.po
@@ -864,16 +872,12 @@ Copyright: 2001-2005 Henning Meier-Geinitz
2011 Reinhold Kainhofer <reinhold@kainhofer.com>
License: GPL-2+ with sane exception
-Files: testsuite/backend/Makefile.am
- testsuite/backend/genesys/Makefile.am
-Copyright: 2019 Sane Developers
-License: GPL-2+ with sane exception
-
Files: testsuite/backend/genesys/*
Copyright: 2019 Povilas Kanapickas <povilas@radix.lt>
License: GPL-2+ with sane exception
-Files: testsuite/backend/genesys/Makefile.am
+Files: testsuite/backend/Makefile.am
+ testsuite/backend/genesys/Makefile.am
Copyright: 2019 Sane Developers
License: GPL-2+ with sane exception
@@ -893,10 +897,6 @@ Copyright: 2003-2005 Henning Meier-Geinitz <henning@meier-geinitz.de>
2003 Gerard Klaver <gerard@gkall.hobby.nl>
License: GPL-2+ with sane exception
-Files: tools/gamma4scanimage.c
-Copyright: 1997-2004 Oliver Rauch
-License: GPL-2+
-
Files: tools/mustek600iin-off.c
Copyright: 1997-1999 Andreas Czechanowski
License: GPL-2+
diff --git a/debian/libsane-common.lintian-overrides b/debian/libsane-common.lintian-overrides
index 1386138..4eede3d 100644
--- a/debian/libsane-common.lintian-overrides
+++ b/debian/libsane-common.lintian-overrides
@@ -1,6 +1,6 @@
#
# doc/gt68xx/gt68xx.CHANGES:442:- Added "afe" option for gt68xx.conf for selecting default afe values.
#
-libsane-common: spelling-error-in-manpage usr/share/man/man5/sane-gt68xx.5.gz afe safe
-libsane-common: spelling-error-in-manpage usr/share/man/man5/sane-gt68xx.5.gz afe safe
-libsane-common: spelling-error-in-manpage usr/share/man/man5/sane-gt68xx.5.gz afe safe
+libsane-common: typo-in-manual-page usr/share/man/man5/sane-gt68xx.5.gz afe safe
+libsane-common: typo-in-manual-page usr/share/man/man5/sane-gt68xx.5.gz afe safe
+libsane-common: typo-in-manual-page usr/share/man/man5/sane-gt68xx.5.gz afe safe
diff --git a/debian/libsane1.symbols b/debian/libsane1.symbols
index ee8e53d..45a21ff 100644
--- a/debian/libsane1.symbols
+++ b/debian/libsane1.symbols
@@ -79,10 +79,10 @@ libsane.so.1 libsane1 #MINVER#
sanei_usb_testing_get_backend@Base 1.0.29
sanei_usb_testing_record_message@Base 1.0.29
sanei_usb_write_bulk@Base 1.0.29
- testing_append_commands_node@Base 1.0.29
- testing_known_commands_input_failed@Base 1.0.29
- testing_last_known_seq@Base 1.0.29
- testing_record_backend@Base 1.0.29
- testing_xml_doc@Base 1.0.29
- testing_xml_next_tx_node@Base 1.0.29
- testing_xml_path@Base 1.0.29
+#MISSING: 1.0.31# testing_append_commands_node@Base 1.0.29
+#MISSING: 1.0.31# testing_known_commands_input_failed@Base 1.0.29
+#MISSING: 1.0.31# testing_last_known_seq@Base 1.0.29
+#MISSING: 1.0.31# testing_record_backend@Base 1.0.29
+#MISSING: 1.0.31# testing_xml_doc@Base 1.0.29
+#MISSING: 1.0.31# testing_xml_next_tx_node@Base 1.0.29
+#MISSING: 1.0.31# testing_xml_path@Base 1.0.29
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
diff --git a/debian/po/de.po b/debian/po/de.po
index 54ff942..175e51c 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -27,7 +27,7 @@ msgstr "Aktiviere Saned als Einzel-Server?"
msgid ""
"The saned server, when enabled, makes scanners available over the network."
msgstr ""
-"Der Saned-Server stellt Scanner über das Netz zu Verfügung, wenn er "
+"Der Saned-Server stellt Scanner über das Netz zu Verfügung, wenn er "
"aktiviert ist."
#. Type: boolean
@@ -41,10 +41,10 @@ msgid ""
"runs in the background all by itself and listens for client connections."
msgstr ""
"Es gibt zwei Arten, Saned zu betreiben:\n"
-" - als Inetd-Service, gestartet über den Inetd-Superserver. In diesem Modus\n"
+" - als Inetd-Service, gestartet über den Inetd-Superserver. In diesem Modus\n"
"wird Saned nach Bedarf gestartet, wenn sich ein Client mit dem Server\n"
"verbindet.\n"
-" - als Einzel-Server, gestartet beim Systemstart. In diesem Modus läuft "
+" - als Einzel-Server, gestartet beim Systemstart. In diesem Modus läuft "
"Saned\n"
" selbst im Hintergrund und wartet auf Anfragen von Clients."
@@ -58,24 +58,24 @@ msgid ""
"from your clients. This feature is experimental and requires a running Avahi "
"daemon."
msgstr ""
-"Im Einzel-Server-Modus macht sich Saned über das Netz bekannt und kann von "
+"Im Einzel-Server-Modus macht sich Saned über das Netz bekannt und kann von "
"SANE-Clients ohne Konfiguration auf der Clientseite automatisch erkannt "
-"werden. Sie müssen dennoch den Server konfigurieren, damit er Verbindungen "
-"von den Clients akzeptiert. Diese Funktionalität ist experimentell und "
-"benötigt einen laufenden Avahi-Daemon."
+"werden. Sie müssen dennoch den Server konfigurieren, damit er Verbindungen "
+"von den Clients akzeptiert. Diese Funktionalität ist experimentell und "
+"benötigt einen laufenden Avahi-Daemon."
#. Type: boolean
#. Description
#: ../sane-utils.templates:1001
msgid "Accept this option if you want to make use of this feature."
msgstr ""
-"Akzeptieren Sie diese Option, falls Sie diese Funktionalität nutzen wollen."
+"Akzeptieren Sie diese Option, falls Sie diese Funktionalität nutzen wollen."
#. Type: boolean
#. Description
#: ../sane-utils.templates:2001
msgid "Add saned user to the scanner group?"
-msgstr "Saned-Benutzer zu der Scanner-Gruppe hinzufügen?"
+msgstr "Saned-Benutzer zu der Scanner-Gruppe hinzufügen?"
#. Type: boolean
#. Description
@@ -86,9 +86,9 @@ msgid ""
"your machine, you can control which ones will be made available over the "
"network."
msgstr ""
-"Falls er aktiviert wird, stellt der Saned-Server Scanner über das Netz "
+"Falls er aktiviert wird, stellt der Saned-Server Scanner über das Netz "
"bereit. Durch Verteilen verschiedener Rechte auf verschiedene Scanner an "
-"Ihrer Maschine können Sie steuern, welche davon über Netz bereitgestellt "
+"Ihrer Maschine können Sie steuern, welche davon über Netz bereitgestellt "
"werden."
#. Type: boolean
@@ -99,8 +99,8 @@ msgid ""
"permissions for saned. By default, saned is run under the saned user and "
"group."
msgstr ""
-"Lesen Sie /usr/share/doc/sane-utils/README.Debian für Details über die "
-"Rechteverwaltung für Saned. Standardmäßig läuft Saned unter dem saned-"
+"Lesen Sie /usr/share/doc/sane-utils/README.Debian für Details über die "
+"Rechteverwaltung für Saned. Standardmäßig läuft Saned unter dem saned-"
"Benutzer und dessen Gruppe."
#. Type: boolean
@@ -110,5 +110,5 @@ msgid ""
"Accept this option if you want to make all your scanners available over the "
"network without restriction."
msgstr ""
-"Akzeptieren Sie diese Option, falls Sie alle Ihre Scanner über das Netz ohne "
-"Einschränkungen zur Verfügung stellen wollen."
+"Akzeptieren Sie diese Option, falls Sie alle Ihre Scanner über das Netz ohne "
+"Einschränkungen zur Verfügung stellen wollen."
diff --git a/debian/rules b/debian/rules
index eac8ba3..8bab3c0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,10 +23,24 @@ endif
%:
dh $@
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+SANE_DESC = $(CURDIR)/tools/sane-desc
+else
+SANE_DESC = $(CURDIR)/debian/sane-desc
+endif
+
override_dh_auto_configure:
autoconf
- dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) \
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+ dpkg-architecture -f "-a$(DEB_BUILD_ARCH)" -c dh_auto_configure
+ $(MAKE) -C $(CURDIR)/lib liblib.la
+ $(MAKE) -C $(CURDIR)/sanei libsanei.la
+ $(MAKE) -C $(CURDIR)/tools sane-desc
+ mv $(CURDIR)/tools/sane-desc $(CURDIR)/debian/sane-desc
+ $(RM) include/byteorder.h include/_stdint.h
+ dh_auto_clean
+endif
+ dh_auto_configure -- \
--prefix=/usr \
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
--sysconfdir=/etc \
@@ -34,7 +48,7 @@ override_dh_auto_configure:
--datadir=\$${prefix}/share \
--mandir=\$${prefix}/share/man \
--docdir=\$${prefix}/share/doc/libsane \
- --disable-locking \
+ --enable-locking \
--enable-static \
--enable-pthread \
--with-gphoto2 \
@@ -49,8 +63,8 @@ override_dh_autoreconf:
override_dh_auto_build-indep:
# generate POT file for translators
- (cd po && make sane-backends.pot)
$(MAKE)
+ (cd po && make sane-backends.pot)
override_dh_auto_clean:
# Autoconf-generated files
@@ -59,6 +73,7 @@ override_dh_auto_clean:
[ ! -f Makefile ] || $(MAKE) distclean
$(RM) debian/libsane1.udev
dh_auto_clean
+ $(RM) $(SANE_DESC)
override_dh_auto_install-arch:
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
@@ -75,6 +90,7 @@ override_dh_install-arch:
# Install the pkg-config file
mkdir -p debian/libsane-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
cp tools/sane-backends.pc debian/libsane-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
+ cp debian/sane-utils.logrotate debian/sane-utils/etc/logrotate.d/sane-utils
override_dh_install-indep:
dh_install
@@ -116,8 +132,9 @@ override_dh_installudev-arch:
ifeq (linux,$(DEB_HOST_ARCH_OS))
# udev support
# Generate the udev rules file
- $(CURDIR)/tools/sane-desc -s $(CURDIR)/doc/descriptions -m udev+hwdb > $(CURDIR)/debian/libsane1.udev
- $(CURDIR)/tools/sane-desc -s $(CURDIR)/doc/descriptions -m hwdb > $(CURDIR)/debian/20-sane.hwdb
+ $(SANE_DESC) -s $(CURDIR)/doc/descriptions -m udev+hwdb > $(CURDIR)/debian/libsane1.udev
+ $(SANE_DESC) -s $(CURDIR)/doc/descriptions -m hwdb > $(CURDIR)/debian/20-sane.hwdb
+
cp $(CURDIR)/debian/20-sane.hwdb $(CURDIR)/debian/libsane1/lib/udev/hwdb.d/
dh_installudev
endif
diff --git a/debian/sane-utils.dirs b/debian/sane-utils.dirs
new file mode 100644
index 0000000..ebf3df5
--- /dev/null
+++ b/debian/sane-utils.dirs
@@ -0,0 +1 @@
+/etc/logrotate.d
diff --git a/debian/sane-utils.logrotate b/debian/sane-utils.logrotate
new file mode 100644
index 0000000..654e370
--- /dev/null
+++ b/debian/sane-utils.logrotate
@@ -0,0 +1,9 @@
+/var/log/saned.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ copytruncate
+ notifempty
+ create 640 saned saned
+}
diff --git a/debian/sane-utils.saned@.service b/debian/sane-utils.saned@.service
index 425ee7a..2ef2d2f 100644
--- a/debian/sane-utils.saned@.service
+++ b/debian/sane-utils.saned@.service
@@ -7,8 +7,8 @@ ExecStart=/usr/sbin/saned
User=saned
Group=saned
StandardInput=null
-StandardOutput=syslog
-StandardError=syslog
+StandardOutput=append:/var/log/saned.log
+StandardError=append:/var/log/saned.log
Environment=SANE_CONFIG_DIR=/etc/sane.d
# Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255
diff --git a/debian/saned.socket b/debian/saned.socket
deleted file mode 100644
index a14daef..0000000
--- a/debian/saned.socket
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=saned incoming socket
-
-[Socket]
-ListenStream=6566
-Accept=yes
-MaxConnections=64
-
-[Install]
-WantedBy=sockets.target
diff --git a/debian/saned@.service b/debian/saned@.service
deleted file mode 100644
index 425ee7a..0000000
--- a/debian/saned@.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=Scanner Service
-Requires=saned.socket
-
-[Service]
-ExecStart=/usr/sbin/saned
-User=saned
-Group=saned
-StandardInput=null
-StandardOutput=syslog
-StandardError=syslog
-Environment=SANE_CONFIG_DIR=/etc/sane.d
-# Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255
-
-[Install]
-Also=saned.socket