Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utsushi: init at 3.57.0 #65223

Merged
merged 3 commits into from Aug 14, 2019

Conversation

@symphorien
Copy link
Contributor

commented Jul 21, 2019

Motivation for this change

#64985

Things done

Completely untested as I don't have access to the corresponding hardware.
@thedavidmeister can you test this and probably fix the problem you encounter ?

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

pkgs/misc/drivers/utsushi/default.nix Outdated Show resolved Hide resolved
pkgs/misc/drivers/utsushi/default.nix Outdated Show resolved Hide resolved
pkgs/misc/drivers/utsushi/default.nix Outdated Show resolved Hide resolved
@symphorien

This comment has been minimized.

Copy link
Contributor Author

commented Aug 1, 2019

Thanks for your review, @jtojnar. I will wait for @thedavidmeister feedback before applying your suggestions, though.

@symphorien symphorien force-pushed the symphorien:utsushi branch from 511ca4e to 7f8fb0d Aug 5, 2019

@symphorien

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2019

@thedavidmeister this version should not require imagemagick in $PATH. Can you test it ?

@thedavidmeister

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2019

@symphorien

latest is that utsushi mostly works (it complains about a config file on launch)

[thedavidmeister@nixos:~/nixpkgs]$ utsushi 

(utsushi-scan-gtkmm:16750): Gtk-WARNING **: 16:58:14.446: Unable to locate theme engine in module_path: "adwaita",

(utsushi-scan-gtkmm:16750): Gtk-WARNING **: 16:58:14.449: Unable to locate theme engine in module_path: "adwaita",
2019-Aug-06 16:58:14.452841[140027803146816]: duplicate key:26:combo007.udi = combo::?adf=esci:usb:04b8:0176&fb=esci:gt-s650:usb:04b8:013c
2019-Aug-06 16:58:14.453012[140027803146816]: duplicate key:30:combo007.udi = combo::?adf=esci:usb:04b8:016b&fb=esci:gt-s650:usb:04b8:013d
2019-Aug-06 16:58:14.453123[140027803146816]: duplicate key:31:combo007.udi = combo::?adf=esci:usb:04b8:0176&fb=esci:gt-s650:usb:04b8:013d
2019-Aug-06 16:58:14.453594[140027803146816]: no such file: /nix/store/4c3wc2ywgysci5l93nn6kwalsssqqkxw-imagescanv3-3.57.0/etc/utsushi/utsushi.conf
2019-Aug-06 16:58:14.617730[140027803146816]: falling back to device defaults
2019-Aug-06 16:58:14.623712[140027803146816]: disabling flip-side scan parameter support
2019-Aug-06 16:58:38.626148[140027626374912]: assuming top-to-bottom scan direction

and xsane does not work, still erroring on convert

[thedavidmeister@nixos:~/nixpkgs]$ xsane

(xsane:21488): Gtk-WARNING **: 17:23:03.112: Unable to locate theme engine in module_path: "adwaita",

(xsane:21488): Gtk-WARNING **: 17:23:03.115: Unable to locate theme engine in module_path: "adwaita",
sh: convert: command not found
@yegortimoshenko

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

$out/libexec/utsushi/get-text-orientation is likely to be causing this failure. While this doesn't fix the root cause of the issue (i.e. why first argument to get-text-orientation still assumes ImageMagick convert is on $PATH), this should help:

  postFixup = ''
    substituteInPlace $out/libexec/utsushi/get-text-orientation \
      --replace '$convert' ${imagemagick}/bin/convert
  '';
@symphorien

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

I won't have time to try other things this week, unfortunately. Try what @yegortimoshenko said, or attach a debugger on xsane, break on execve and or system and figure out what exactly is calling convert.
I checked quickly that no library in the dependency tree of libsane-utsushi.so contains the string convert except in human readable sentences or as an absolute path.

@symphorien

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

oh, by the way, after you rebuilt with the new version, did you reboot ?

@thedavidmeister

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2019

@symphorien @yegortimoshenko i probably did not reboot, here is the latest

xsane

[thedavidmeister@nixos:~]$ xsane

(xsane:1903): Gtk-WARNING **: 14:22:33.899: Unable to locate theme engine in module_path: "adwaita",

(xsane:1903): Gtk-WARNING **: 14:22:33.903: Unable to locate theme engine in module_path: "adwaita",
2019-Aug-10 14:22:34.153609[140591011195520]: duplicate key:26:combo007.udi = combo::?adf=esci:usb:04b8:0176&fb=esci:gt-s650:usb:04b8:013c
2019-Aug-10 14:22:34.153885[140591011195520]: duplicate key:30:combo007.udi = combo::?adf=esci:usb:04b8:016b&fb=esci:gt-s650:usb:04b8:013d
2019-Aug-10 14:22:34.153967[140591011195520]: duplicate key:31:combo007.udi = combo::?adf=esci:usb:04b8:0176&fb=esci:gt-s650:usb:04b8:013d
2019-Aug-10 14:22:34.154945[140591011195520]: no such file: /nix/store/4c3wc2ywgysci5l93nn6kwalsssqqkxw-imagescanv3-3.57.0/etc/utsushi/utsushi.conf
2019-Aug-10 14:22:44.590940[140591011195520]: falling back to device defaults
2019-Aug-10 14:22:44.596877[140591011195520]: disabling flip-side scan parameter support
2019-Aug-10 14:22:58.033103[140590813935360]: assuming top-to-bottom scan direction
2019-Aug-10 14:23:00.205905[140591011195520]: sane_utsushi_set_io_mode: Operation not supported
2019-Aug-10 14:23:03.394898[140591011195520]: sane_utsushi_read: End of file reached

(xsane:1903): Gtk-CRITICAL **: 14:23:03.435: IA__gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

utsushi

[thedavidmeister@nixos:~]$ utsushi 

(utsushi-scan-gtkmm:2444): Gtk-WARNING **: 14:24:14.980: Unable to locate theme engine in module_path: "adwaita",

(utsushi-scan-gtkmm:2444): Gtk-WARNING **: 14:24:15.054: Unable to locate theme engine in module_path: "adwaita",
2019-Aug-10 14:24:15.188426[139998712957504]: duplicate key:26:combo007.udi = combo::?adf=esci:usb:04b8:0176&fb=esci:gt-s650:usb:04b8:013c
2019-Aug-10 14:24:15.189154[139998712957504]: duplicate key:30:combo007.udi = combo::?adf=esci:usb:04b8:016b&fb=esci:gt-s650:usb:04b8:013d
2019-Aug-10 14:24:15.189363[139998712957504]: duplicate key:31:combo007.udi = combo::?adf=esci:usb:04b8:0176&fb=esci:gt-s650:usb:04b8:013d
2019-Aug-10 14:24:15.191404[139998712957504]: no such file: /nix/store/4c3wc2ywgysci5l93nn6kwalsssqqkxw-imagescanv3-3.57.0/etc/utsushi/utsushi.conf
2019-Aug-10 14:24:15.907100[139998712957504]: falling back to device defaults
2019-Aug-10 14:24:15.917235[139998712957504]: disabling flip-side scan parameter support
2019-Aug-10 14:24:35.610428[139998485542656]: assuming top-to-bottom scan direction

looks good!

@symphorien

This comment has been minimized.

Copy link
Contributor Author

commented Aug 10, 2019

looks good!

You mean that scanning works with xsane, despite the error messages ?

@thedavidmeister

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

@symphorien yeah it all seems to work fine to me on both xsane and utsushi

i'm not expert but i've got PDFs popping out so 🤷‍♂

@symphorien symphorien marked this pull request as ready for review Aug 13, 2019

@symphorien

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

Great!
The PR should be good to merge, then :)

@@ -0,0 +1,3 @@
absolute-path-to-convert.patch
print-errors.patch
absolute_path_for_tesseract.patch

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Aug 13, 2019

Member

Should this be committed?

This comment has been minimized.

Copy link
@symphorien

symphorien Aug 13, 2019

Author Contributor

If the patches have to be modified in the future (there are updates of this driver, the last one was this year) it will be easier to do this with quilt and this file. But I agree this is a very small advantage.

*/

stdenv.mkDerivation rec {
pname = "imagescanv3";

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Aug 13, 2019

Member

Should probably match the package name (utsushi).

This comment has been minimized.

Copy link
@symphorien

symphorien Aug 13, 2019

Author Contributor

done

Alternatively, this package could use the "community source" at
https://gitlab.com/utsushi/utsushi/
Epson provides proprietary plugins for networking, ocr and some more
scanner models. Those are not (yet ?) packaged here.

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Aug 13, 2019

Member

Would be easier to upstream these patches to a community fork.

This comment has been minimized.

Copy link
@symphorien

symphorien Aug 13, 2019

Author Contributor

I was unable to build the community sources (autoconf fails with

configure.ac:54: error: possibly undefined macro: AS_IF
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:205: error: possibly undefined macro: AC_MSG_ERROR

)

This comment has been minimized.

@yegortimoshenko

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

@GrahamcOfBorg build utsushi

@yegortimoshenko yegortimoshenko merged commit 757ac88 into NixOS:master Aug 14, 2019

13 checks passed

Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details

WhittlesJr added a commit to WhittlesJr/nixpkgs that referenced this pull request Aug 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.