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

inkscape: openclipart integration is broken #52963

Closed
bjornfor opened this issue Dec 27, 2018 · 7 comments
Closed

inkscape: openclipart integration is broken #52963

bjornfor opened this issue Dec 27, 2018 · 7 comments

Comments

@bjornfor
Copy link
Contributor

Issue description

Inkscape has support for openclipart but it doesn't work in the package provided by nixpkgs.

Steps to reproduce

  1. Start inkscape
  2. Go to File -> Import Clip Art...
  3. Enter a search term and click the Search button.
  4. See the Could not connect to the Open Clip Art in the GUI and
** (inkscape:19026): WARNING **: 14:25:09.396: ImportDialog::on_xml_file_read():
	Failed to retrieve 'http://openclipart.org/media/feed/rss/car'
	TLS support is not available

in the terminal.

Technical details

NixOS 18.09 and nixpkgs master.

@bjornfor
Copy link
Contributor Author

I researched a bit and thought adding glib-networking would fix it. I wrote the following patch, but it doesn't seem to have any effect:

diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 01243f6bdee..9821b02f48c 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -3,6 +3,7 @@
 , glibmm, libsigcxx, lcms, boost, gettext
 , gsl, python2, poppler, imagemagick, libwpg, librevenge
 , libvisio, libcdr, libexif, potrace, cmake, hicolor-icon-theme
+, glib-networking, wrapGAppsHook
 }:
 
 let
@@ -40,13 +41,13 @@ stdenv.mkDerivation rec {
       --replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"'
   '';
 
-  nativeBuildInputs = [ pkgconfig cmake python2Env ]
+  nativeBuildInputs = [ pkgconfig cmake python2Env wrapGAppsHook ]
     ++ (with perlPackages; [ perl XMLParser ]);
   buildInputs = [
     libXft libpng zlib popt boehmgc
     libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
     gsl poppler imagemagick libwpg librevenge
-    libvisio libcdr libexif potrace hicolor-icon-theme
+    libvisio libcdr libexif potrace hicolor-icon-theme glib-networking
 
     python2Env perlPackages.perl
   ];

@bjornfor bjornfor changed the title inkscape openclipart integration is broken inkscape: openclipart integration is broken Dec 27, 2018
@FRidh
Copy link
Member

FRidh commented Dec 27, 2018

I wonder whether it really is because TLS support is unavailable, or because openclipart.org uses an invalid security certificate?

@bjornfor
Copy link
Contributor Author

Good point.

Hm, that's weird. I followed that URL (http://openclipart.org/media/feed/rss/car) a day or two ago (when I first noticed this) and was redirected to https:// without problems. But now I see the certificate warning in firefox.

@bjornfor
Copy link
Contributor Author

bjornfor commented Dec 27, 2018

I think it may be a packaging bug after all. Look at this grep:

$ grep -rn -exclude="*.po" "TLS support is not available" glib-2.58.1/ glib-networking-2.58.0/
glib-2.58.1/gio/gdummytlsbackend.c:195:		       _("TLS support is not available"));
glib-2.58.1/gio/gdummytlsbackend.c:317:		       _("TLS support is not available"));
glib-2.58.1/gio/gdummytlsbackend.c:419:                       _("DTLS support is not available"));
glib-2.58.1/gio/gdummytlsbackend.c:509:                       _("TLS support is not available"));

The message only appears in the glib tree, in the gdummytlsbackend.c file. No matches from glib-networking, which AFAIK, provides TLS support.

@jtojnar
Copy link
Member

jtojnar commented Dec 27, 2018

I tried the patch and am getting

** (inkscape:11980): WARNING **: 20:52:11.251: ImportDialog::on_xml_file_read():
	Failed to retrieve 'http://openclipart.org/media/feed/rss/hello'
	Operation not supported

Probably because the site is down.

@bjornfor
Copy link
Contributor Author

https://openclipart.org/ is not down for me.

jtojnar added a commit to jtojnar/nixpkgs that referenced this issue Dec 28, 2018
GLib Gio’s GFile uses gvfs daemon for opening files over HTTP protocol.
To support HTTPS, we need to include glib-networking.

Closes: NixOS#52963
@bjornfor
Copy link
Contributor Author

@jtojnar: Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants