The GIMP package in portage, for some time now, fails to load images from remote sites using either the File, Open Location... option or by trying to load a URL through the command line (eg., gimp http://domain.com/image.jpg). GIMP relies on curl for this functionality (or at least the portage version does), and I've confirmed that curl support is enabled, but it still fails. It'll download the file - you can see the progress of the download - but then fail when trying to actually load it. I don't have a screenshot of the error message from the GUI, but it was something vague along the lines of "operation failed". If I open GIMP from the command line, it reports this: /usr/lib64/gimp/2.0/plug-ins/file-uri: fatal error: Segmentation fault There's been a lot of discussion about this problem on the Arch bug tracker here: https://bugs.archlinux.org/task/12321 They've supplied a patch to fix the problem, which I've tested against the current stable version of GIMP, and it works great. I've attached the patch to this bug for convenience. Please include this patch so that remote images can be properly opened in GIMP once again. Thanks. Reproducible: Always
Created attachment 278067 [details, diff] uri-backend-libcurl.diff
Created attachment 278069 [details, diff] gimp-2.6.11-r1.diff Small, and probably unnecessary, patch to the stable ebuild to add support for the file-uri fix.
(In reply to comment #1) > Created attachment 278067 [details, diff] > uri-backend-libcurl.diff What I see in this patch: 1) Adding support for gopher: URIs 2) Moving response_code from gint to glong 3) Adding a function uri_backend_map_image 4) Treating HTTP response code 226 as success, too Especially (3) puzzles me, as function uri_backend_map_image does not seem to be used elsewhere in the patch. Could you explain how these changes fix the problem?
No, I'm afraid I can't. As mentioned in my description, I found that patch on the Arch bug tracker, tried it in desperation, and it just worked. I'm not a C/C++ programmer, so I normally don't worry too much about *how* it works, as long as it fixes my problem. :-) There's a long discussion about this on the Arch thread, so you can probably find answers to most of your questions there. Also, I just took another look at the thread, and it looks like this was submitted and accepted upstream about a week after I posted it. Here's the bug report and resultant discussion from that: http://bugzilla-attachments.gnome.org/attachment.cgi?id=191340 It's different from what I submitted here, and seems to omit the uri_backend_map_image function while also including support for https. It's probably the better patch. If you'd like, I'll be happy to test and verify it when I get home tonight.
Created attachment 285247 [details] uri-backend-libcurl-2.6.patch I just realized that I linked directly to the the upstream patch rather than upstream bug report. Here's the correct link: https://bugzilla.gnome.org/show_bug.cgi?id=653980 Also, I tested that patch and it also works. I had to make a couple changes to get it to apply to the 2.6 version in portage, though, so I've attached a lightly edited version to this bug report. Does this one look better?
(In reply to comment #5) > I just realized that I linked directly to the the upstream patch rather than > upstream bug report. Here's the correct link: > https://bugzilla.gnome.org/show_bug.cgi?id=653980 Thanks! > Also, I tested that patch and it also works. I had to make a couple changes to > get it to apply to the 2.6 version in portage, though, so I've attached a > lightly edited version to this bug report. Looks like you ported http://git.gnome.org/browse/gimp/commit/?id=039d4636f84ade6387216e347f5af597f43b99fc for me. Thanks! > Does this one look better? The cases of loading remote images I tested didn't work well (or better) but that may be my config or the server I tested with. I trust that it improves the situation for you and that upstream put thought into it. +*gimp-2.6.11-r3 (02 Sep 2011) + + 02 Sep 2011; Sebastian Pipping <sping@gentoo.org> +gimp-2.6.11-r3.ebuild, + +files/gimp-2.6.11-file-uri.patch: + Apply file-uri patch by upstream (bug #372941) + Closing.
Thanks Sebastian. I'm happy to help where I can, especially if it means one less package to keep in my local overlay. :-) On the issue of it not working for you, this is probably a stupid question, but do you have the curl flag enabled for gimp? I overlooked this for a while when initially troubleshooting this. With USE=curl and the new patch, remote image loading works great for me on the two boxes I've tested.
(In reply to comment #7) > Thanks Sebastian. I'm happy to help where I can, especially if it means one > less package to keep in my local overlay. :-) That's in my interest, too. Good attitude. > On the issue of it not working for you, this is probably a stupid question, but > do you have the curl flag enabled for gimp? I overlooked this for a while when > initially troubleshooting this. With USE=curl and the new patch, remote image > loading works great for me on the two boxes I've tested. Good point, I seem to have USE=-curl here.