Bug 159567 - System proxy settings not used when building deps with jhbuild
Summary: System proxy settings not used when building deps with jhbuild
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-08 09:48 PDT by Olivier Blin
Modified: 2016-07-11 11:05 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.05 KB, patch)
2016-07-08 09:58 PDT, Olivier Blin
no flags Details | Formatted Diff | Diff
Patch (3.14 KB, patch)
2016-07-11 09:20 PDT, Olivier Blin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Blin 2016-07-08 09:48:38 PDT
The system proxy settings (dconf org.gnome.system.proxy) are not used by WebKitGTK when deps have been built through jhbuild.
Comment 1 Olivier Blin 2016-07-08 09:58:22 PDT
Created attachment 283179 [details]
Patch
Comment 2 Olivier Blin 2016-07-08 10:02:55 PDT
This is my first attempt, mostly for reference.
It enables dconf and gnome proxy modules in gio, in the jhbuild root.

The disadvantage is that it pulls dconf in the jhbuild modules for everyone, as pointed by Konstantin.

Fujii suggested instead to use the libproxy support in glib-networking.
I'll post a second patch to do that.
Comment 3 Konstantin Tokarev 2016-07-08 10:19:05 PDT
I think there is no need to build libproxy with jhbuild, just add appropriate packages to Tools/gtk/install-dependencies (and also for EFL if you like). glib-networking activates proxy support automatically when building if libproxy headers are available.
Comment 4 Olivier Blin 2016-07-08 10:20:21 PDT
(In reply to comment #3)
> I think there is no need to build libproxy with jhbuild, just add
> appropriate packages to Tools/gtk/install-dependencies (and also for EFL if
> you like). glib-networking activates proxy support automatically when
> building if libproxy headers are available.

Yes, that's what I plan to propose as a patch, once I get this working.
Comment 5 Philippe Normand 2016-07-11 00:13:22 PDT
Not sure you saw this Wiki page?

https://trac.webkit.org/wiki/WebKitGTK/StartHacking#Workingbehindaproxy

I don't think we need a patch for this.
Comment 6 Olivier Blin 2016-07-11 06:00:11 PDT
(In reply to comment #5)
> Not sure you saw this Wiki page?
> 
> https://trac.webkit.org/wiki/WebKitGTK/StartHacking#Workingbehindaproxy
> 
> I don't think we need a patch for this.

I was not aware of this wiki page, building dconf this way is a good solution.
Though, on my system, this didn't work by default, since libgiognomeproxy.so was not built in glib-networking, because gsettings.m4 was not installed on my system.

What do you think of just adding the following in Tools/gtk/install-dependencies? 
- gsettings-desktop-schemas-dev: for gsettings.m4, to enable libgiognomeproxy.so in libnetworking
- libproxy-dev: to enable libgiolibproxy.so in glib-networking for generic proxy support, including through environment variables

libproxy support in glib-networking works for me without dconf, provided I unset GNOME_DESKTOP_SESSION_ID, in which case it uses the usual proxy environment variables (envvar libproxy module).

Otherwise, it uses the gnome3 libproxy module, which will use system proxy settings only if the libdconfsettings.so gio module is available in the jhbuild root.
Comment 7 Michael Catanzaro 2016-07-11 06:46:28 PDT
Good investigation. I've never understood why we have so many different proxy modules.

(In reply to comment #6)
> What do you think of just adding the following in
> Tools/gtk/install-dependencies? 
> - gsettings-desktop-schemas-dev: for gsettings.m4, to enable
> libgiognomeproxy.so in libnetworking
> - libproxy-dev: to enable libgiolibproxy.so in glib-networking for generic
> proxy support, including through environment variables

Sounds good to me.

Please look up the Arch dependencies too; you can use the package search on https://www.archlinux.org/
Comment 8 Olivier Blin 2016-07-11 09:20:11 PDT
Created attachment 283319 [details]
Patch
Comment 9 WebKit Commit Bot 2016-07-11 11:05:48 PDT
Comment on attachment 283319 [details]
Patch

Clearing flags on attachment: 283319

Committed r203069: <http://trac.webkit.org/changeset/203069>
Comment 10 WebKit Commit Bot 2016-07-11 11:05:54 PDT
All reviewed patches have been landed.  Closing bug.