Opened 4 years ago

Closed 5 months ago

#52404 closed defect (fixed)

Update gnucash ports to use webkit2-gtk

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: dbevans (David B. Evans), jralls@…, mopihopi, jjstickel (Jonathan Stickel)
Port: gnucash gnucash-devel

Description

Please update gnucash and gnucash-devel to use webkit2-gtk rather than webkit-gtk.

The older version of webkit-gtk hasn't been supported upstream for quite some time and is full of vulnerabilities.

See #52398

Attachments (1)

patch-cmakelists-enable-webkit2-gtk.diff (1.0 KB) - added by kencu (Ken) 3 years ago.
tiny patch to version 3.2 of gnucash to build it against webkit2-gtk, for anyone interested in manually trying this out for now.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 4 years ago by dbevans (David B. Evans)

Cc: devans@… added
Owner: changed from devans@… to dports@…

This port not only uses gtk2 but also uses the old gnome2 libraries. To use webkit2-gtk, upstream needs to get rid of the gnome2 lib usage and update to gtk3 before porting to the webkit2 API. This is a sizeable effort and there appears to be no upstream development in this area at present.

Based on the current situation, if webkit-gtk were removed, gnucash would have to be removed as well. Some other distros, such as Fedora, are considering moving in this direction.

Reassigning ticket to the maintainer for further comment/action.

comment:2 Changed 4 years ago by dbevans (David B. Evans)

Cc: jralls@… added

See https://bugzilla.gnome.org/show_bug.cgi?id=751635 for an upstream ticket on this issue. A suggested solution is to move away from webkit-gtk altogether. CCing upstream developer for possible comment.

comment:3 Changed 4 years ago by jralls (John Ralls)

Upstream's comment: We have no resources either to rewrite the webkit interface for webkit2 or to use a different renderer & javascript interpreter any time soon. If someone here would like to volunteer, please start by subscribing to our developer mailing list (gnucash-devel@…) and propose what you want to do.

comment:4 Changed 3 years ago by dbevans (David B. Evans)

The current unstable branch of gnucash has been ported to gtk3 and uses webkit2-gtk. See #55446.

comment:5 Changed 3 years ago by mopihopi

Cc: mopihopi added

comment:6 Changed 3 years ago by ken-cunningham-webuse

In 2ccb2310a230bd5bbfec2a16b2a28c26b81b70e7/macports-ports (master):

gnucash: remove peg for webkit-gtk3-2.0

webkit-gtk3 builds on all supported systems
<http://packages.macports.org/webkit-gtk3>
so no need to peg older webkit-gtk3-2.0 any longer

see: #52404
see: #52398

comment:7 Changed 3 years ago by jralls (John Ralls)

No you didn't, you just broke your port. You need to patch CMakeLists.txt so that GnuCash will actually link Webkit2 on Macs. It currently doesn't because the last time I tried with WebKit 2.18 it wouldn't render the javascript-generated graphical reports. Debugging showed libjavascript running in a separate thread and apparently not connecting back to the GtkWebKitWebView. I wasn't able to figure out why not and got no assistance from the WebKitGtk folks so I reverted MacOS builds to WebKit1.

The X11 version may not have the problem; if that works by all means submit a PR to change CMakeLists.txt to link WebKit2 on Mac with X11.

comment:8 Changed 3 years ago by kencu (Ken)

Hi John; the referenced commit did not change gnucash to link into webkit2; gnucash still links against webkit. Some older systems were previously forced to use an old version of webkit due to toolchain issues with c++11. We sorted that out, and MacPorts' last available version of webkit now builds on all systems (except PPC), so we now use that version for all systems in ports such as gnucash.

MacPorts has evolved a somewhat confusing array of webkit builds over time, which we are trying to simplify.

We all hope that one day gnucash might no longer need webkit and will either use the more-up-to-date webkit2 or some other javascript implementation. We look forward to hearing from you / finding out about this when this is possible.

We recently updated our webkit2 offerings on MacPorts; webkit2-gtk offers version 2.20.3, and webkit2-gtk-devel offers 2.21.4. Perhaps one of these versions might pass your tests and we could eventually default to using one of them instead.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

Changed 3 years ago by kencu (Ken)

tiny patch to version 3.2 of gnucash to build it against webkit2-gtk, for anyone interested in manually trying this out for now.

comment:9 Changed 7 months ago by jjstickel (Jonathan Stickel)

Cc: jjstickel added

comment:10 Changed 7 months ago by jjstickel (Jonathan Stickel)

For those cc'd on this ticket, you may be interested to see https://github.com/macports/macports-ports/pull/8069 . It seems webkit2-gtk mostly works, but there are some broken features (e.g., reports).

comment:11 Changed 7 months ago by jralls (John Ralls)

but there are some broken features (e.g., reports).

Which is the only thing that GnuCash uses WebKit for, so of course everything else works.

comment:12 Changed 5 months ago by drkp (Dan Ports)

Resolution: fixed
Status: newclosed

In b10120ce120a9a5ee33332dfabd15c07f2d3e310/macports-ports (master):

gnucash, gnucash-docs: update to v4.2

  • switch to webkit2-gtk instead of outdated webkit-gtk3
  • add patch to fix DYLD_LOAD_PATH

Closes: #52404
Closes: https://github.com/macports/macports-ports/pull/8069

Note: See TracTickets for help on using tickets.