After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751635 - depends on deprecated libwebkitgtk-1.0-0
depends on deprecated libwebkitgtk-1.0-0
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
2.6.6
Other All
: Urgent critical
: future
Assigned To: Geert Janssens
gnucash-general-maint
Depends on:
Blocks: 778981
 
 
Reported: 2015-06-29 08:36 UTC by Dmitry Smirnov
Modified: 2018-06-29 23:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dmitry Smirnov 2015-06-29 08:36:09 UTC
As reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790204
GnuCash depends on libwebkitgtk-1.0-0, which is deprecated in favor
of libwebkit2gtk-4.0-37. GnuCash should be ported to the new
webkitgtk.

As an intermediate step you can port gnucash to libwebkitgtk-3.0-0,
which has a similar API to libwebkitgtk-1.0-0 but is based on GTK+
3.0. Thus you'd be porting gnucash to GTK+ 3.0 first, using
libwebkitgtk-3.0-0, and you could then port to libwebkit2gtk-4.0-37
later. But note that libwebkitgtk-3.0-0 is also deprecated.
Comment 1 John Ralls 2015-06-29 14:46:55 UTC
Gtk2 is also obsolete, and we have many years of work to sufficiently decouple other code from Gtk2 before we can consider upgrading. WebKitGtk is also cross-platform hostile and incredibly heavyweight, so we're more likely to look for a lighter weight and more focused alternative. We don't need a full-featured browser, we just need to run javascript for charts and render html onto a cairo surface.

Any suggestions?
Comment 2 Christian Stadelmann 2016-05-08 23:08:17 UTC
I second gnucash doesn't require WebKit since those charts are relatively simple.

baobab (gnome disk usage analyzer) is rendering charts with clickable segments. It is based on Gtk+ 3.x with pango/cairo. Here is some vala code:
https://git.gnome.org/browse/baobab/tree/src/baobab-treemap.vala
Look here for a screenshot: https://wiki.gnome.org/Apps/Baobab
Comment 3 David Evans 2016-09-30 15:48:10 UTC
MacPorts is currently considering removing webkit-gtk-1.0 on the basis that it has not been supported upstream for some time and has a number of known vulnerabilities.  Preferred replacement is webkit2-gtk-4.0.

Projects that continue to use the deprecated API, such as gnucash, may unfortunately also be in danger of removal.

See https://trac.macports.org/ticket/52404
Comment 4 John Ralls 2016-10-05 15:14:04 UTC
(In reply to David Evans from comment #3)
> MacPorts is currently considering removing webkit-gtk-1.0 on the basis that
> it has not been supported upstream for some time and has a number of known
> vulnerabilities.  Preferred replacement is webkit2-gtk-4.0.
> 
> Projects that continue to use the deprecated API, such as gnucash, may
> unfortunately also be in danger of removal.
> 
> See https://trac.macports.org/ticket/52404

We're not really very interested in whether MacPorts supports GnuCash; we distribute a GnuCash application bundle and prefer that our users run that.

GnuCash isn't affected by WebKit vulnerabilities, WebKit is used exclusively to render HTML and interpret Javascript both created by GnuCash itself.
Comment 5 Geert Janssens 2017-02-07 11:17:12 UTC
Just to add to the list, Fedora is also about to remove support for webkitgtk 1.0:
https://bugzilla.redhat.com/show_bug.cgi?id=1375812

We have shifted our priorities for gnucash 2.8 because of this issue and will focus on getting this solved. This entails completing our port to gtk3 first. Expect this to be worked on in the coming weeks/months.
Comment 6 Dmitry Smirnov 2017-02-07 12:47:12 UTC
Great news. :) I hope updating obsolete goffice dependency is also an the roadmap.
Comment 7 Geert Janssens 2017-02-07 12:55:48 UTC
The goffice dependency will be resolved as well. I'm currently finishing work on a branch that drops our dependency on goffice completely. I expect to merge it this month.
Comment 8 Disabled User 2017-03-18 20:16:01 UTC
If the JavaScript for the charts is the problem for removing the Webkit dependency, I'd suggest to do some alternative research. Googling reveals this StackOverflow question[1], which contains pointers to Gnuplot (probably too large), MathGL, libgd and others. On the first glance, libgd[2] looks most fitting for the purpose.

As a Gentoo user, I would very much appreciate Gnucash moving away from WebkitGtk+, since it takes hours to compile! ;-)

Marvin

[1]: http://stackoverflow.com/questions/1275484/good-plotting-library-for-c
[2]: https://libgd.github.io/
Comment 9 John Ralls 2017-03-18 20:33:44 UTC
Thanks, I'd already found that SO article. libgd does indeed look promising at first blush, I'll look into that some more.

Our first-pass plan is to convert to Gtk3. Geert's already got most of the conversion done in his Github repo and I have the Webkit2 conversion done in mine. I'll merge the two after next weekend's release and then we'll merge the result into master.

Our second-pass plan is to try to replace WebKit with litehtml (https://github.com/litehtml/litehtml), drawing on a cairo surface. There are a couple of alternatives for rendering charts: One is to integrate V8 (the Google javascript interpreter) with litehtml and continue to use jqplot and the other is to replace jqplot with a C or C++ plotting library. In that context the size of the library is competing with V8, so that's not as much of a consideration as ensuring that whatever we end up with will build on all three supported platforms.
Comment 10 Michael Catanzaro 2017-03-18 21:41:22 UTC
(In reply to John Ralls from comment #9)
> Our first-pass plan is to convert to Gtk3. Geert's already got most of the
> conversion done in his Github repo and I have the Webkit2 conversion done in
> mine. I'll merge the two after next weekend's release and then we'll merge
> the result into master.

Is it possible to do some experimental tarball release, if only just so that we can have something to put into Fedora rawhide in the meantime? We removed the WebKit2 package last Tuesday, and GnuCash was one of the most important users of it IMO. I figure having a possibly-buggy Gnucash in rawhide is a lot better than no Gnucash at all.
Comment 11 John Ralls 2017-03-18 22:19:30 UTC
We'll begin beta tarballs in June. I'll put up a schedule on https://wiki.gnucash.org/wiki/Release_Schedule after the 2.6.16 release next weekend.

I hope you mean you removed the WebKit1 package!

It's OK to have a beta GnuCash in Rawhide, especially if you keep it up to date--we'll make new beta releases monthly until November, then every 2 weeks until the release. I hope that the Debian folks will do the same for their unstable branch. That will help us get beta testers, which is good.

Bill Nottingham, who does the GnuCash package for Fedora, said on our development list that he intends to package Webkit1 into the GnuCash rpm for F27. He didn't say how. I think that's a better solution until we get a stable Gtk3/WebKit2 GnuCash released in December.
Comment 12 Michael Catanzaro 2017-03-18 23:27:57 UTC
(In reply to John Ralls from comment #11)
> I hope you mean you removed the WebKit1 package!

Yup, oops!

> It's OK to have a beta GnuCash in Rawhide, especially if you keep it up to
> date--we'll make new beta releases monthly until November, then every 2
> weeks until the release. I hope that the Debian folks will do the same for
> their unstable branch. That will help us get beta testers, which is good.
> 
> Bill Nottingham, who does the GnuCash package for Fedora, said on our
> development list that he intends to package Webkit1 into the GnuCash rpm for
> F27. He didn't say how. I think that's a better solution until we get a
> stable Gtk3/WebKit2 GnuCash released in December.

Yeah, that works too, but note that F27 is due to be released in November so there's not really a huge schedule issue here; it would probably be easier to just stick with the beta releases until then. Anyway, I'll leave it to you two to sort out!
Comment 13 Maciej (Matthew) Piechotka 2017-04-13 00:23:17 UTC
I'm not sure if gtk+ 3 plan from comment #9 is still current - since gtk+3 is needed for HiDPI displays as well should I post separate bug?
Comment 14 John Ralls 2017-04-13 00:51:24 UTC
(In reply to Maciej Piechotka from comment #13)
> I'm not sure if gtk+ 3 plan from comment #9 is still current - since gtk+3
> is needed for HiDPI displays as well should I post separate bug?

A bug about GnuCash not supporting HiDPI? We already have two, bug 692831 and bug 759934. If neither seems to apply to your problem and it isn't about converting the WebKit1 API then yes, file a new bug.
Comment 15 yaomtc 2017-06-25 04:54:34 UTC
This issue in particular is preventing GnuCash from being available on Solus. https://dev.solus-project.com/T441
Comment 16 Dan Xu 2017-06-29 22:52:11 UTC
This issue has caused GnuCash to be removed from the arch linux official repositories: https://lists.archlinux.org/pipermail/arch-dev-public/2017-June/028900.html .
Comment 17 Geert Janssens 2017-07-09 20:04:49 UTC
An update on our progress: this weekend we have merged the gtk+3/webkitgtk2 branch into master. Aside from some cosmetics everything seems to work ok on linux (my development box runs Fedora 25).

We still need to do some work to get it up and running on Windows as well. We can only begin making beta tarballs when that issue is solved. So unfortunately our schedule has slipped a bit compared to what John said in comment 11.
Comment 18 Michael Catanzaro 2017-07-09 20:28:07 UTC
(In reply to Geert Janssens from comment #17) 
> We still need to do some work to get it up and running on Windows as well.

What are your plans for Windows support?
Comment 19 John Ralls 2017-07-09 20:34:57 UTC
(In reply to Michael Catanzaro from comment #18)
> (In reply to Geert Janssens from comment #17) 
> > We still need to do some work to get it up and running on Windows as well.
> 
> What are your plans for Windows support?

Conditional compilation. It's only a few functions in a single file, so it's not that big a deal.
Comment 20 Geert Janssens 2017-07-10 09:02:59 UTC
To clarify John's comment: we will stick with libwebkitgtk-1 on Windows until we have time to implement a full replacement for webkit altogether. We're too late in the 2.7/2.8 development cycle to start such a project.

For those on Fedora I have a copr repository that builds current master nightly (if there were changes against the previous night that is). So you can test the current state if you like and provide feedback in the form of bug reports. Patches are obviously welcome as well :)
Comment 21 Christian Stadelmann 2017-07-31 14:42:32 UTC
(In reply to Geert Janssens from comment #20)
> For those on Fedora I have a copr repository that builds current master
> nightly (if there were changes against the previous night that is). So you
> can test the current state if you like and provide feedback in the form of
> bug reports. Patches are obviously welcome as well :)

That's https://copr.fedorainfracloud.org/coprs/gjanssens/gnucash-master/

Is there any schedule for 2.7/2.8? I couldn't find it on the wiki on https://wiki.gnucash.org/wiki/Release_Schedule
Comment 22 John Ralls 2017-07-31 18:12:06 UTC
That's because we haven't figured it out yet. I just got the Gtk3/Webkit2 packaging scripts done enough to set up automatic nightly builds on Saturday and built on MacOS today. That means that we can start to figure out a release schedule now; I hope we'll have it worked out in a couple of weeks, with the 2.7.0 release shortly after I get back from vacation at the end of the month.
Comment 23 Micha Lenk 2017-09-20 18:27:36 UTC
FWIW, Debian intends to remove libwebkitgtk-1.0-0 in its next stable release too.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790204

Do we already have any Gnucash beta release that is based on Gtk3/Webkit2?
Comment 24 Christian Stadelmann 2017-09-20 20:48:05 UTC
(In reply to Micha Lenk from comment #23)
> FWIW, Debian intends to remove libwebkitgtk-1.0-0 in its next stable release
> too.
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790204
> 
> Do we already have any Gnucash beta release that is based on Gtk3/Webkit2?

There is a 2.7.0 release, but you'll have to build it from source code I guess: https://github.com/Gnucash/gnucash/releases/tag/2.7.0
https://wiki.gnucash.org/wiki/Building describes how to build it.
Comment 25 John Ralls 2017-09-21 00:28:18 UTC
There is not yet a 2.7.0 release because of WebKit2 problems on Mac and Windows, but 2.7.0 has been tagged in git and the source tarballs are on SourceForge. We'll do the formal release as soon as we sort out the Mac and Windows problems.
Comment 26 John Ralls 2017-11-27 17:40:15 UTC
We've just released 2.7.2 and packagers should be working on getting it ready for their distros... I know the OP is.
Comment 27 John Ralls 2018-06-29 23:41:29 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=751635. Please update any external references or bookmarks.