the change from libsane to libsane1 broke many (all?) 3rd party plug-ins for sane

Bug #1707352 reported by PeterPall on 2017-07-29
198
This bug affects 38 people
Affects Status Importance Assigned to Milestone
sane-backends (Debian)
New
Unknown
sane-backends (Ubuntu)
Medium
Unassigned
Artful
Medium
Unassigned

Bug Description

Note to SRU Team
================
The first proposed fix (1.0.27-1~experimental2ubuntu2) failed because it needed to be a versioned Provides, not just a Provides.

Impact
======

1) The Debian maintainer renamed libsane to libsane1-experimental "to match with the soname". This apparently fixes a Lintian warning, but makes installing 3rd-party plug-ins hard, as they typically depend on "libsane", not on "libsane1". The first try to add a "Provides: libsane" to libsane1 (which created a virtual package) didn't make drivers installable that claim to depend on a minimum version of libsane as virtual packages are ignored in this case.

2) The soname change might be justified by the new version breaking (several? most?) 3rd party plug-ins even if the library version number doesn't indicate any bigger change than any ordinary new version of the library - which might indicate that this phenomenon might be an upstream bug.

libsane 1.0.25 in zesty includes libsane.so.1.25
libsane1 1.0.27 in artful includes libsane.so.1.27

It is to note that depending on the manufacturer for many old scanners there won't be new versions of the plug-ins that are recompiled like this.

Test Case
=========
Visit http://support.epson.net/linux/en/iscan_c.html
Download the amd64 deb .tar.gz
Unzip it.
Install the iscan .deb from the core folder.

It won't install before this SRU because it Depends: libsane

Regression Potential
====================
The fix here was proposed to the Debian maintainer in July but there's been virtually zero response on it. In the meantime the workaround that was proposed initially has started to result in automatically uninstalling gtk - which makes the system basically useless.

It doesn't seem like adding the Provides will make things any worse for third-party drivers but it has a goodme chance of making things better for some.

Original Bug Report
===================
I don't know if that can be prevented in the long run. But both brscan (for my brother scanner) and iscan (for my epson scanners) have been broken by the change from libsane to libsane1. For iscan I have unpackaged the debian package, changed the dependency it contains from libsane to libsane1 and installed the changed package. But even then my epson scanners no more work leaving me without any scanner => Reporting a bug.

Impossibility of workarounds
----------------------------
Just installing an old version of libsane is impossible as it uninstalls libgtk (which depends on libsane1 which conflicts with libsane) making the system basically useless.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: libsane1 1.0.27-1~experimental1ubuntu2
Uname: Linux 4.13.0-041300rc2-lowlatency x86_64
ApportVersion: 2.20.6-0ubuntu4
Architecture: amd64
Date: Sat Jul 29 08:38:15 2017
EcryptfsInUse: Yes
SourcePackage: sane-backends
UpgradeStatus: No upgrade log present (probably fresh install)

PeterPall (peterpall) wrote :
summary: - the change from libsane to libsane1 broke many (all?) 2rd party plug-ins
+ the change from libsane to libsane1 broke many (all?) 3rd party plug-ins
+ for sane
Jörg Frings-Fürst (jff-de) wrote :

Hello Peter,

I really don't understand why Ubuntu use packages from the Debian experimental branch.

The experimental version is very buggy and the requested transition from libsane to libsane1 isn't
ready to start.

CU
Jörg Frings-Fürst
Maintainer of sane-backends at Debian

On 29.07.2017 11:32, Jörg Frings-Fürst wrote:
> Hello Peter,
>
> I really don't understand why Ubuntu use packages from the Debian
> experimental branch.
>
> The experimental version is very buggy and the requested transition from libsane to libsane1 isn't
> ready to start.
>

Debian unstable sometimes lacks behind the real development by years.
Testing often is much more stable, which means that ubuntu on a regular
basis pulls packages from debian-testing. Unfortunately this way broken
packages tend to enter ubuntu, as well...

PeterPall (peterpall) on 2017-07-29
affects: debian → sane-backends (Debian)
Changed in sane-backends (Debian):
status: Unknown → New
Changed in sane-backends (Debian):
status: New → Fix Released
Jeremy Bicha (jbicha) wrote :

Jörg, I pushed 1.0.27 from experimental to Ubuntu 17.10 because Ubuntu had been using an old git snapshot before which wasn't good at all.

Jörg, does it make sense to add 'Provides: libsane' to libsane1?

PeterPall, please report this issue to the providers of those third-party plugins.

PeterPall (peterpall) wrote :

I don't know all makers of scanners that aren't supported by a stock sane. Also if I wrote a mail to <email address hidden> or <email address hidden> telling them that their driver doesn't work with the newest experimental package from debian, but that I don't know any details what has changed I don't expect them to panick and to do something.

The "provides" looks like being a first step, though, if the two libraries are in fact compatible to each other: This would at least allow to install scanner drivers from 3rd party manufacturers.

marco ghidinelli (marcogh) wrote :

Hello,

force (dpkg install --force-all) the installation doesn't solve the problem, so I think that the "provides" will not solve anything.

Let me know if i can help testing things.

I have been using (x)sane with my 17.02 without a problem.
After upgrade to 17.10:
 - my Xerox WorkCentre 3525 doesn't get detected (editing /etc/sane.d/xerox_mfp.conf helps though).
 - the XSane GUI closes after preview or scan with the following message "Not a JPEG file: starts with 0x00 0x00"
If this can't be fixed, a roll-back to 1.0.25 should probably be considered?

Looks like other distributions suffer from the same:
https://bugzilla.redhat.com/show_bug.cgi?id=1468986

Jörg Frings-Fürst (jff-de) wrote :

Hi Mariusz,

as already written in the post 2 it is irresponsible to use a package from the Experimental branch in a production system.

CU
Jörg

PeterPall (peterpall) wrote :

Same question from me: We cannot possibly want to break a big percentage of all scanners and MFC devices out in the wild.

Jeremy Bicha (jbicha) wrote :

Jörg, thanks for your feedback but could you respond to comment 4?

dino99 (9d9) wrote :

@Jeremy

only a comment : why not renaming libsane1 to libsane ?

and from the debian report above:
" Renaming the package to libsane1 without adding a "provides" breaks that dependency and it seems
like merely adding the "provides" does not get them into a working order again."

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sane-backends (Ubuntu):
status: New → Confirmed
Jeremy Bicha (jbicha) wrote :

@dino99, because I'm trying to coordinate that kind of thing with the Debian maintainer… See comment 4.

Linking libsane.so.1.0.27 as libsane.so or copying doesn't seem to solve the problem.
Anyone checked if Debian works with that?

luca.mg (luca-mg) wrote :

Hi all, as a workaround on ubuntu artful I got rolled back to libsane libsane-common from zesty, that is 1.0.25+git20150528-1ubuntu4, and xsane xsane-common 0999.3ubuntu2, locked to those releases; my Epson Perfection 4490 scanner (third party epkowa backend) would only run as root; added the lines
# Epson Perfection 4490
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0119", ENV{libsane_matched}="yes"
to the file /lib/udev/rules.d/60-libsane.rules right after the line
LABEL="libsane_usb_rules_begin"
and the scanner is now working as it always did.
Would be great if this libsane1 thing would be fixed though.

Neil Gunther (neil-gunther) wrote :

Another workaround is to install this ppa:

https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git

And launch Iscan with sudo iscan.

guascoe (guascoe) wrote :

Hi all, none of the suggested workaround works for me: change of libsane and libsane-common to older or different version leads to uninstall of gnome-control-center,ubuntu-desktop, and several other packages, leaving the system in an unconsistent state.
Bye

PeterPall (peterpall) wrote :

On my system uninstalling libsane1 uninstalls colord - which uninstalls gnome - which means that this isn't an option.

Vuescan (costly!) and manually extracting and placing the contents of the .deb packages with the scanner plug-ins seems to currently work. But - I still wonder if there is a better way...

We had a working set of software.
Now we have a non-working set of software without a feasible workaround (maybe except for phone camera).
May I kindly ask why don't "we" revert the "improvement" to the previous state and happily use our scanners for everyday work and fun?

dino99 (9d9) wrote :

You still can try the zesty version: download the required package(s), then install via 'dpkg -i' over the installed one(s)
https://launchpad.net/ubuntu/+source/sane-backends

Jeremy Bicha (jbicha) on 2017-10-17
description: updated
Changed in sane-backends (Ubuntu):
importance: Undecided → Medium
status: Confirmed → In Progress
Jeremy Bicha (jbicha) on 2017-10-17
description: updated
PeterPall (peterpall) wrote :
Download full text (4.3 KiB)

@dino99: You cannot sqitch the zesty version any more. At least if you want your computer have a working graphical user interface: lib colord depends in libsane1 - and colord on libcolord. And gnome on colord:

gunter@Marius:~$ sudo apt-get remove libcolord2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  emacs25-lucid xaw3dg
Suggested packages:
  emacs25-common-non-dfsg
The following packages will be REMOVED:
  apport-gtk apturl bamfdaemon baobab brasero brasero-cdrkit cairo-dock
  cairo-dock-core cairo-dock-plug-ins
  cairo-dock-plug-ins-dbus-interface-python cairo-dock-plug-ins-integration
  caribou cheese chrome-gnome-shell classicmenu-indicator colord compiz
  compiz-gnome dconf-editor easytag emacs24 emacs25 evince
  evolution-data-server evolution-data-server-online-accounts file-roller
  firefox frei0r-plugins gcr gedit gir1.2-appindicator3-0.1 gir1.2-caribou-1.0
  gir1.2-clutter-1.0 gir1.2-gcr-3 gir1.2-gdl-3 gir1.2-gnomebluetooth-1.0
  gir1.2-gnomedesktop-3.0 gir1.2-gspell-1 gir1.2-gtk-3.0 gir1.2-gtksource-3.0
  gir1.2-gtkspell3-3.0 gir1.2-gweather-3.0 gir1.2-mutter-1 gir1.2-nautilus-3.0
  gir1.2-nmgtk-1.0 gir1.2-peas-1.0 gir1.2-rb-3.0 gir1.2-totem-1.0
  gir1.2-vte-2.91 gir1.2-webkit2-4.0 gir1.2-wnck-3.0 gjs gkbd-capplet
  gnome-bluetooth gnome-control-center gnome-disk-utility gnome-font-viewer
  gnome-getting-started-docs gnome-getting-started-docs-de gnome-keyring
  gnome-online-accounts gnome-power-manager gnome-screensaver gnome-screenshot
  gnome-session gnome-session-bin gnome-session-wayland gnome-settings-daemon
  gnome-shell gnome-software gnome-software-plugin-snap gnome-system-log
  gnome-system-monitor gnome-system-tools gnome-terminal gnome-tweak-tool
  gnome-user-docs gnome-user-guide gnome-user-share gstreamer1.0-clutter-3.0
  gstreamer1.0-plugins-bad gtk3-engines-unico gucharmap gufw handbrake ibus
  ibus-gtk3 indicator-application indicator-printers language-selector-gnome
  libappindicator3-1 libavahi-ui-gtk3-0 libbrasero-media3-1 libcanberra-gtk3-0
  libcanberra-gtk3-module libcaribou0 libcheese-gtk25 libcheese8
  libclutter-1.0-0 libclutter-gst-3.0-0 libclutter-gtk-1.0-0 libcolord-gtk1
  libcolord2 libcolorhug2 libevdocument3-4 libevview3-3 libgail-3-0
  libgcr-ui-3-1 libgdl-3-5 libgdl-3-dev libgjs0g libgldi3 libgnome-bluetooth13
  libgnome-desktop-3-12 libgnomekbd8 libgoa-backend-1.0-1 libgspell-1-1
  libgspell-1-dev libgtk-3-0 libgtk-3-bin libgtk-3-dev libgtkmm-3.0-1v5
  libgtkmm-3.0-dev libgtksourceview-3.0-1 libgtksourceview-3.0-dev
  libgtkspell3-3-0 libgtkspell3-3-dev libgtkspellmm-3.0-0v5
  libgtkspellmm-3.0-dev libgucharmap-2-90-7 libgweather-3-6 libido3-0.1-0
  libindicator3-7 libmetacity1 libmutter-1-0 libnautilus-extension1a
  libnm-gtk0 libnma0 libopencv-calib3d3.1 libopencv-contrib3.1
  libopencv-features2d3.1 libopencv-highgui3.1 libopencv-objdetect3.1
  libopencv-stitching3.1 libopencv-videostab3.1 libpeas-1.0-0
  libreoffice-avmedia-backend-gstreamer libreoffice-gnome libreoffice-gtk3
  librhythmbox-core10 librsvg2-bin libtimezonemap1 libtotem0 libunique-3.0-0
  libunity-settings-daemon1 libvte-...

Read more...

PeterPall (peterpall) wrote :

In the above I didn't copy-and-paste the additional info that about 100 packages can be autoremoved after removing libsane1 because after removing all applications that depend on gtk many libraries are unused.

PeterPall (peterpall) on 2017-10-18
description: updated
Changed in sane-backends (Debian):
status: Fix Released → New

Hello PeterPall, or anyone else affected,

Accepted sane-backends into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sane-backends/1.0.27-1~experimental2ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in sane-backends (Ubuntu Artful):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-artful

Im sorry but https://launchpad.net/ubuntu/+source/sane-backends/1.0.27-1~experimental2ubuntu2 doesn't solve the problem.

This is what I get when I want to install my Epson V300 (sorry comments are in german, but I'm sure you understand what goes wrong: libsane is missing):

Hinweis: »libsane1« wird an Stelle von »libsane« gewählt.
libsane1 ist schon die neueste Version (1.0.27-1~experimental2ubuntu2).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Vormals nicht ausgewähltes Paket iscan wird gewählt.
(Lese Datenbank ... 154273 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../core/iscan_2.30.2-2_amd64.deb ...
»Umleitung von /usr/share/man/man5/sane-epkowa.5.gz zu /usr/share/man/man5/sane-epkowa-deb.5.gz durch iscan« wird hinzugefügt
Entpacken von iscan (2.30.2-2) ...
Vorbereitung zum Entpacken von .../iscan-data_1.36.0-1_all.deb ...
Entpacken von iscan-data (1.36.0-1) über (1.36.0-1) ...
Vormals nicht ausgewähltes Paket esci-interpreter-gt-f720 wird gewählt.
Vorbereitung zum Entpacken von .../esci-interpreter-gt-f720_0.1.1-2_amd64.deb ...
Entpacken von esci-interpreter-gt-f720 (0.1.1-2) ...
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von iscan:
 iscan hängt ab von libsane (>= 1.0.11-3); aber:
  Paket libsane ist nicht installiert.
  Version von libsane auf dem System, bereitgestellt von libsane1:amd64, ist <keine>.

dpkg: Fehler beim Bearbeiten des Paketes iscan (--install):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
iscan-data (1.36.0-1) wird eingerichtet ...
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von esci-interpreter-gt-f720:
 esci-interpreter-gt-f720 hängt ab von iscan (>= 2.16.1); aber:
  Paket iscan ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes esci-interpreter-gt-f720 (--install):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Trigger für man-db (2.7.6.1-2) werden verarbeitet ...
Trigger für gnome-menus (3.13.3-6ubuntu5) werden verarbeitet ...
Trigger für desktop-file-utils (0.23-1ubuntu3) werden verarbeitet ...
Trigger für mime-support (3.60ubuntu1) werden verarbeitet ...
Trigger für udev (234-2ubuntu12) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 iscan
 esci-interpreter-gt-f720

PeterPall (peterpall) wrote :

The next question would be if things would now work if libsane1 would contain a "provides libsane".
Would it be possible for you to install esci-interpreter-gt-f720 ignoring the missing dependency?

I think the command that does do this would be:

sudo dpkg -i --force-depends esci-interpreter-gt-f720

Thanks a lot in advance! Will try if the new sane-backends would make my brother scanner work again if the "provides libsane" were present in "libsane1" as soon as I get home.

Jeremy Bicha (jbicha) wrote :

staedtler-przyborski, are you sure that you installed libsane1 1.0.27-1~experimental2ubuntu2 ?
Try prefixing your terminal command with LANGUAGE=C.UTF-8 to get English translations.

PeterPall (peterpall) wrote :

The same happens here: Cannot install any plug-ins as they depend on libsane the default way: What I have installed is libsane1 1.0.27-1~experimental2ubuntu2 which isn't named "libsane".

Forcing the install still means that neither my Brother nor my Epson scanner is detected even with the new version of sane-backends.

PeterPall (peterpall) on 2017-10-19
description: updated

Installed the prereleased libsane-common, libsane1, sane-utils:
- libsane-common is already the newest version (1.0.27-1~experimental2ubuntu2).
- libsane1 is already the newest version (1.0.27-1~experimental2ubuntu2).
- libsane1 set to manually installed.
- sane-utils is already the newest version (1.0.27-1~experimental2ubuntu2).
My Xerox Workcentre 3225 still does not work.
No change in comparison to the previous experimental version whatsoever.

Jeremy Bicha (jbicha) on 2017-10-19
tags: added: verification-failed-artful
removed: verification-needed-artful

Just for the record. When installing iscan and esci-interpreter-gt-f720 using 'sudo dpkg -i --force-depends', they get installed. But my Epson V300 is not recognized.

When I start 'scanimage -L' only my Epson XP-540 networkscanner is found, not my local attached Epson V300

scanimage -L
device `imagescan:esci:networkscan://192.168.50.24:1865' is a Epson XP-540.

And yes 'libsane1 1.0.27-1~experimental2ubuntu2' is installed and in use. Luckily it don't breaks my Epson XP-540.

To be exact, when specified in xerox_mfp.conf with tcp <address>, the device gets detected.
The problem is that an attempt to scan or acquire a preview results in an error and the Workcentre remains in "scanning" forever - kind of hang. I wouldn't call it "being functional".
Above means that despite your Epson XP-540 gets detected, doesn't mean it will work.

My Epson XP-540 works.

Curiously with simple-scan and with xsane, but not with Imagescan provided by Epson.
But thats another problem, image-scan scans but can't save the scanned image ... With Ubuntu 17.04 (using Sane 1.0.25) behaviour of imagescan was identical. I already reported this months ago Epson at https://github.com/utsushi to be exactly. Maybe Olaf Meeuwissen (Sane developer) someday will fix it.

Seems time that I should try what happens when I attach the XP 540 locally, then it needs another plugin than networkscan. Hopefully I find the time this weekend to test.

Epson XP-540 attached locally also works (tested with simple-scan)

scanimage -L
device `imagescan:esci:networkscan://192.168.50.24:1865' is a Epson XP-540
device `imagescan:esci:usb:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0' is a EPSON XP-540_Series

It uses the imagescan-plugin-gt-s650 which installed flawless

In the meanwhile I discovered:

The Epson XP-540 Scanner-part is identical to the Standalone Epson V39 Scanner. For the V39 the plugin-gt-s650 comes in two flavours: As fully functional imagescan plugin, which doesn't have libsane as dependency and as non-functional iscan plugin which relys on libsane.

Hopefully this bug will be fixed eventually, but for now I found an ugly workaround which made my Brother scanner (brscan3 driver) work again.

- Installed the equivs package.

- Purged libsane1 by 'sudo dpkg --purge --ignore-depends=libsane1 libsane1'.

- Installed the zesty versions of libsane, libsane-common and sane-utils by 'sudo dpkg -i' and marked them not to be upgraded by 'sudo apt-mark hold libsane libsane-common sane-utils'.

- Created a controlfile 'libsane1' by 'equivs-control libsane1' and edited it so that it looks like this:
------------
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2

Package: libsane1
Version: 4:99
# Maintainer: Your Name <email address hidden>
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
# Architecture: all
# Multi-Arch: <one of: foreign|same|allowed>
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
# <more pairs, if there's more than one file to include. Notice the starting space>
Description: dummy package
 dummy package for libsane1

------------

- Built a dummy package libsane1_99_all.deb by 'equivs-build libsane1' and installed it by 'sudo dpkg -i' to satisfy dependencies.

Unbekannte Person (dm60) wrote :

How can ubuntu make such mistakes? I hope a patch comes immediately, because for a new release is very shameful!

guascoe (guascoe) wrote :

Hans Schwimmbeck "ugly" workaround works for me.
Epson xp-312 is now working also with ISCAN on lan
TNX Hans!

Daniel Eckl (daniel-eckl) wrote :

The status for Artful is "fix committed". I think that's a mistake. With the committed sane version in artful-proposed, the iscan package does not install like described above, and when installed forcefully, it does not recognize the scanner.

Neil Gunther (neil-gunther) wrote :

Still no joy:

Hit:1 http://security.ubuntu.com/ubuntu artful-security InRelease
Hit:2 http://archive.canonical.com/ubuntu artful InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu artful InRelease
Get:4 http://gb.archive.ubuntu.com/ubuntu artful-updates InRelease [65.4 kB]
Hit:5 http://qgis.org/debian-nightly artful InRelease
Fetched 65.4 kB in 0s (71.4 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libsane is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libsane1:i386 libsane1

E: Package 'libsane' has no installation candidate

Jeremy Bicha (jbicha) wrote :

I think we can fix this instead by adding a transitional package libsane which will depend on libsane1.

PeterPall (peterpall) on 2017-10-23
description: updated
Jeremy Bicha (jbicha) on 2017-10-24
description: updated
tags: added: verification-failed
Jeremy Bicha (jbicha) on 2017-10-25
description: updated
Changed in sane-backends (Ubuntu):
status: Fix Committed → Fix Released
Adam Conrad (adconrad) on 2017-10-27
tags: added: verification-needed-artful
removed: verification-failed verification-failed-artful
26 comments hidden view all 106 comments

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of sane-backends from artful-proposed was performed and bug 1728198 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and add the tag "bot-stop-nagging" to bug 1728198 (not this bug). Thanks!

tags: added: verification-failed
Warren (wseverin) wrote :

I have created a generalized bash script that rebuilds .deb packages, changing the dependency from libsane (whatever version) to libsane1 (>= 1.0.27). Here for your enjoyment is "fixlibsane1.sh":

[code]
#!/bin/bash

# A simple script to make packages that are uninstallable due to change from
# libsane to libsane1 installable, by changing the dependency in the .deb package.
# First parameter is path to .deb file to modify, like so:
# ./fixlibsane1.sh iscan_2.30.3-1_amd64.deb
# The "Depends: field will have libsane (version)" changed to "libsane1 (>= 1.0.27)"
# A new deb package will be created alongside the original, ending in "-mod.deb"
# --Warren Severin

indebfull=$1
indebbase=$(basename "$indebfull")
indebdir=$(dirname "$indebfull")
indebext="${indebbase##*.}"
indebroot="${indebbase%.*}"
tmpdir=$(mktemp -d)

if [ ! "$indebext" = "deb" ]; then
  echo "Did you enter the path to the .deb file as the first parameter? Exiting."; exit 1; fi
if [ ! -e "$indebfull" ]; then
  echo "Not finding $indebfull. Exiting."; exit 1; fi
if [ -z $(which perl) ]; then
  echo "This script requires perl. Do you need to install it? Exiting."; exit 1; fi

dpkg-deb -x "$indebfull" "$tmpdir"
dpkg-deb --control "$indebfull" "$tmpdir/DEBIAN"
perl -i -pe 's/^(Depends:.*?)libsane( +\(.*?\))?/\1libsane1 (>= 1.0.27)/' "$tmpdir/DEBIAN/control"
dpkg -b "$tmpdir" "${indebdir}/${indebroot}-mod.deb"

rmdir --ignore-fail-on-non-empty "$tmpdir"
echo "Done!"
[/code]

Jeremy Bicha (jbicha) wrote :

Warren, that's unnecessary. There is a fix in artful-proposed that just needs to wait a week or so before promoting to artful-updates.

Jeremy Bicha (jbicha) wrote :

After installing libsane1 1.0.27-1~experimental2ubuntu2.1 from artful-proposed, I was able to complete the test case successfully and install the Epson iscan .deb's.

tags: added: verification-done verification-done-artful
removed: verification-failed verification-needed verification-needed-artful
Warren (wseverin) wrote :

I truly hope that in the very near future that script becomes unnecessary. Anybody who wants their scanner software installed sooner is welcome to give the script a try. And, thanks for your work on resolving this issue!

True Epson iscan .deb's can be installed now.

But nevertheless Epson scanners relying on iscan refuse to work (Epson V300 in my case).

scanimage -L doesn't detect them, neither iscan, simple-scan or xsane.

This is less than half a fix.

BTW. in Ubuntu 17.04 the scanner worked with libsane 1.0.25 and with libsane 1.0.27 (provided by Rolf Bensch https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git/+packages).

PeterPall (peterpall) wrote :

On my computer when I try to scan ltrace tells me:

sane_get_devices(0x7ffc84845e50, 0, 0, 0) = 0

Martin (martin3000) wrote :

I just installed the artful-proposed files.
"sane-find-scanner" finds my epson scanner. But "scanimage -L" does not find anything.

luca.mg (luca-mg) wrote :

Hi there, I uninstalled the ugly workaround and purged the zesty packages sane, libsane, xsane, scanner drivers, and all the bells and whistles; reinstalled libsane1 1.0.27-1~experimental2ubuntu2.1, sane, xsane, simple-scan, Brother and Epson drivers with no issues. In short: the Epson 4490 Photo scanner doesn't work at all, the Brother MDC-1910W scanner only works as root. In details:

Epson 4490 Photo as user
sane-find-scanner detects a bunch of USB devices including the scanner, but has not enough permission
scanimage -l no SANE devices found
iscan, simple-scan, and xsane do not work

Epson 4490 Photo as root
sane-find-scanner ok
scanimage -l no SANE devices found
iscan, simple-scan, and xsane do not work

Brother MFC-1910W as user
sane-find-scanner detects a bunch of USB devices including the scanner, but has not enough permission
scanimage -l no SANE devices found
simple-scan and xsane do not work

Brother MFC-1910W as root
sane-find-scanner ok
scanimage -l ok
simple-scan ok
xsane ok

Following the PeterPall's suggestion I have moved my "issue" discussion to the broken scanner list.
Looks like we still keep discussing failure here though. Here are my remarks:
My malfunction hasn't changed a bit with the 1.0.27-1~experimental2ubuntu2.1 package.
Like before xsane crashes with the following message:
  Not a JPEG file: starts with 0x00 0x00
and/or hangs with "Scanning" status.
And it looks like we have a 3rd bug that relates to the "uprade": https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1724078
Some of you might wan't to "be affected" too.

Martin (martin3000) wrote :

I found out that I have to run scanimage -L with "sudo" to detect my scanner.

Today I managed to bring back my dead Epson V300 alive :-)

1. Install libsane1 1.0.27-1~experimental2ubuntu2.1

2. Install iscan-gt-f720-bundle-1.0.1.x64.deb.tar.gz

3. Copy (or move) the files from /usr/lib/sane (libsane-epkowa.la, libsane-epkowa.so.1, libsane-epkowa.so.1.0.15 in my case) to /usr/lib/x86_64-linux-gnu/sane

4. reboot.

Guess this works with all Iscan depend scanners from Epson

For me the bug is fixed ...

Just for the record

scanimage -L
device `epkowa:interpreter:003:007' is a Epson Perfection V300 flatbed scanner
device `imagescan:esci:networkscan://192.168.50.24:1865' is a Epson XP-540

Iscan, simple-scan, Xsane are working as expected.

BRScan users can you try what happens when you copy the files (libsane-brother*) from /usr/lib64/sane/ to /usr/lib/x86_64-linux-gnu/sane.

Maybe the fix for brother scanners is as easy as the one for the epson ones ...

floriankeim (floriankeim) wrote :

mmh, I tried that for my Epson using iscan-perfection-v330-bundle-1.0.1.x64.deb.tar.gz, but it still does not work.

Can you try it as root ?

"Today I managed to bring back my dead Epson V300 alive :-)

1. Install libsane1 1.0.27-1~experimental2ubuntu2.1

2. Install iscan-gt-f720-bundle-1.0.1.x64.deb.tar.gz

3. Copy (or move) the files from /usr/lib/sane (libsane-epkowa.la, libsane-epkowa.so.1, libsane-epkowa.so.1.0.15 in my case) to /usr/lib/x86_64-linux-gnu/sane"

Please forgive my ignorance.

I assume that I need to add a PPA to get to libsane1 1.0.27-1~experimental2ubuntu2.1. What is the apt command for this?

Having added the PPA, what then is the apt command to install libsane1 1.0.27-1~experimental2ubuntu2.1

Also, is iscan-gt-f720-bundle-1.0.1.x64.deb.tar.gz scanner specific? I think that I have been using iscan-gt-x770-bundle-1.0.1.x64.deb.tar.gz for my Epson Perfection V500.

Any help would be much appreciated.

Downloaded and installed (no error messages) libsane-common, libsane1 and sane-utils. Thank you.

Installed iscan-gt-x770-bundle-1.0.1.x64.deb with no errors.

sudo sane-find-scanner gives

found USB scanner (vendor=0x04b8 [EPSON], product=0x0130 [EPSON Scanner]) at libusb:006:004
  # Your USB scanner was (probably) detected.

scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in [YES], turned on [YES] and detected by the
sane-find-scanner tool [YES - see above]

iscan gives "Could not send command to scanner. Check the scanner's status"
xsane gives "No devices available"

Please try 'sudo scanimage -L'

if scanimage succeeds and finds the scanner check if you have a file named 79-udev-epson.rules in /etc/udev/rules.d

If yes content:

If no it should have the following content:

# chmod device EPSON group
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

sudo scanimage -L

No scanners were identified.

Rolf Bensch (rolfbensch) wrote :

@Peter:
Alternatively you could use the sources from SANE's daily git snapshots instead of using Debian experimental branch.

This also breaks my ppa, which provides builds from SANE's daily git snapshots.

Do you have really copied the content of /usr/lib64/sane/ to /usr/lib/x86_64-linux-gnu/sane ?

Whats with 79-udev-epson.rules in /etc/udev/rules.d ?

I verified that my Epson V300 works with a fresh Ubuntu 17.10 installation by doing the following steps

1. Install libsane1 1.0.27-1~experimental2ubuntu2.1

If you don't want to enable the proposed repository the easiest way is to download the files and install them from local

https://launchpad.net/ubuntu/artful/+upload/16734103/+files/libsane1_1.0.27-1~experimental2ubuntu2.1_amd64.deb

https://launchpad.net/ubuntu/artful/+upload/16734103/+files/sane-utils_1.0.27-1~experimental2ubuntu2.1_amd64.deb

https://launchpad.net/ubuntu/artful/+upload/16734103/+files/libsane-common_1.0.27-1~experimental2ubuntu2.1_all.deb

2. Install iscan-gt-f720-bundle-1.0.1.x64.deb.tar.gz

3. Copy (or move) the files from /usr/lib/sane (libsane-epkowa.la, libsane-epkowa.so.1, libsane-epkowa.so.1.0.15) to /usr/lib/x86_64-linux-gnu/sane

4. generate a file /etc/udev/rules.d/79-udev-epson.rules with the following content:
# chmod device EPSON group
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

No reboot needed

After these steps you can attach your scanner and turn it on. It will start to download the firmware (you can see some blinking lights and hear some noise). As soon downloading of firmware has finished you can use the scanner by either Simple-scan, iScan or Xsane (if installed). No root needed (except for installation).

As other Epson scanners using Iscan differ 'only' by the scanner specific plugin I expect them to work too.

floriankeim (floriankeim) wrote :

I'm sorry, it still does not work for me with my Perfection V33 Scanner, even though everything is similar.

Martin (martin3000) wrote :

The funny thing is: scanimage -L does not work.
Then I do something on the system and change things and after 1 hour of changing scanimage -L works fine. The next day same again: not work. So my experience is: if you run scanimage many times, it becomes better and better and at the end it works. No matter what you changed. So it may happen that it does not work without sudo and then work with sudo. But its not the "sudo". It's because you tried 5 times.

Here is the command for debugging:

user@ubuntu1:home$ SANE_DEBUG_SANEI_CONFIG=3 SANE_DEBUG_SANEI_USB=128 SANE_USB_WORKAROUND=0 SANE_DEBUG_DLL=128 SANE_DEBUG_EPSON2=128 scanimage -L

guascoe (guascoe) wrote :

Coping the content of /usr/lib64/sane/ to /usr/lib/x86_64-linux-gnu/sane works fine for me and my Epson XP-312.
I've tested the procedure on a clean install an also on my production machine.
After installing libsane1 1.0.27-1~experimental2ubuntu2.1, sane-utils_1.0.27-1~experimental2ubuntu2.1and libsane-common_1.0.27-1~experimental2ubuntu2.1 I runned ISCAN install via standard Epson script with no issue.
Then i copied the files /usr/lib64/sane/ to /usr/lib/x86_64-linux-gnu/saneand modified dll.conf and Epkowa.conf in /etc/sane.d (as I've ever done for my LAN connected scanner).
Now I can run ISCAN as user with no problem and simple-scan works too.

I don't have a /usr/lib64/sane/, but I do have those files in /usr/lib/sane - should I copy those?

I also don't have a /usr/lib/x86_64-linux-gnu - should I create that?

@Michael Barraclough

Are you on 32 bit ?

Martin (martin3000) wrote :

Yes it is /usr/lib/sane

No - I am as 64-bit as they come!!

Kubuntu 17.10 reports:

OS Type - 64 bit
Processors: 4 x AMD A10-7870K Radeon R7

Success!

Copied the 3 files from /usr/lib/sane to /usr/lib/x86_64-linux-gnu/sane

Created /etc/udev/rules.d/79-udev-epson.rules with the following content:

# chmod device EPSON group
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

Didn't reboot - didn't work. However, after rebooting, Vuescan and ScanLite both found the scanner . Yay!

Thanks for the great support.

@Michael Barraclough

Is it a fresh install ?

If yes, I'm sorry I'm not familiar with Kubuntu

If no, please consider a fresh installation of Kubuntu 17.10 (too many things have changed since 16.04)

Warren (wseverin) wrote :

@staedtler-przyborski -- Thanks!! It worked for my V500. Now BOTH the WF-3540 scanner and V500 are working as well as ever. scanimage -L finds them both; and iscan, simplescan, and xsane run them.

Good work!

I'm guessing there's a lot of old driver install debs out in the world that are putting their stuff into /usr/lib/sane instead of into /usr/lib/x86_64-linux-gnu/sane which seems to be the current "proper" place. Since those installers are not likely to be rebuilt, the next best solution would be for sane to look in /user/lib/sane if it fails to find what it's looking for in /usr/lib/x86_64-linux-gnu/sane.

derlybyn (derlybyn) wrote :

@staedtler-przyborski

Thanks a lot. This worked for my Epson Perfection V10 on Ubuntu Mate 17.10, upgraded from 17.04.

Please use the workaround for Epson Iscan, Brother brscan,brscan2 and brscan3 Scanners from here

https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1728012/comments/36

brscan4 no luck until now

Warren (wseverin) wrote :

Here is an update to my simple and "unnecessary" script to fix .deb packages so they install correctly. This version adds moving the installation of the libraries from /usr/lib/sane to /usr/lib/x86_64-linux-gnu/sane. Should work well with most Epson driver .deb's, not sure about others.

In attachment.

Paul Nickerson (pgn674) wrote :

Thank you, staedtler-przyborski. The workaround you link to in comment #102 worked immediately for my Brother MFC-J220 scanner, on Ubuntu 17.10.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sane-backends - 1.0.27-1~experimental2ubuntu2.1

---------------
sane-backends (1.0.27-1~experimental2ubuntu2.1) artful; urgency=medium

  * Add version to Provides. Use Conflicts instead of Breaks (LP: #1707352)

sane-backends (1.0.27-1~experimental2ubuntu2) artful; urgency=medium

  * Add "Provides: libsane" to libsane1 (LP: #1707352)

 -- Jeremy Bicha <email address hidden> Tue, 24 Oct 2017 21:43:06 -0400

Changed in sane-backends (Ubuntu Artful):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for sane-backends has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Displaying first 40 and last 40 comments. View all 106 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.