Bug 33009 - PackageKit does not respect no_proxy
Summary: PackageKit does not respect no_proxy
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 21:07 UTC by Chris Smart
Modified: 2011-03-10 16:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smart 2011-01-11 21:07:41 UTC
Overview:
PackageKit respects proxy settings such as "http_proxy" from the system environment, but not "no_proxy". This means it fails when certain repositories (such as local mirrors) cannot use a proxy, and their address is listed in ignore (no_proxy).

Steps to Reproduce:
Set a system proxy, exclude for your repository mirror, install new package from repository mirror.

    1) Set your package mirror to a specific server (if not already).

    2) Set proxy:
export http_proxy=http://localhost:3128

    3) Set exclude for mirror:
export no_proxy=[mirror],[mirror-ip]

    4) Install a _new_ package (one not yet downloaded)
pkcon install [package]

Actual Results:
PackageKit cannot download the package & deps, even though it should not be using the proxy for that mirror.

Expected Results:
PackageKit should respect the no_proxy environment variable, as it is the http_proxy variables.

Build Date & Platform:
Version 0.6.11 release 1.fc14 on Fedora 14 x86_64

Additional Information: Unset your proxy (unset http_proxy) and re-try the command. It works (as expected, because there is no proxy).
Comment 1 Richard Hughes 2011-01-12 01:29:38 UTC
PackageKit has never supported the no_proxy environment variable. 

At the moment, the only things that are passed to the daemon as part of the per-user proxy settings is the http_proxy and the ftp_proxy. Is this obviously less than ideal, as we have other people wanting to use the https proxy setting too.

What I want to do is expand the interface, and have:

string: http_proxy
string: https_proxy
string: ftp_proxy
string: ignore_proxy (comma delimited)

Do you think there are any other settings required?

Richard.
Comment 2 Chris Smart 2011-01-12 01:38:03 UTC
(In reply to comment #1)
> 
> What I want to do is expand the interface, and have:

That would be fantastic!

> 
> string: http_proxy
> string: https_proxy
> string: ftp_proxy
> string: ignore_proxy (comma delimited)
> 
> Do you think there are any other settings required?
> 

I'm not sure whether support for socks would be required, but other than that it looks good. Generally the environment variable is no_proxy I believe, not sure if you want to use that for the sake of consistency.

Presumably it will still support the format,
protocol://username:password@server:port

because, you might use a http proxy server for https traffic.

Cheers,
-c
Comment 3 Richard Hughes 2011-03-10 07:06:11 UTC
commit 0d9258e2faddf2fd87efcba491dae74403e0bd6b
Author: Richard Hughes <richard@hughsie.com>
Date:   Fri Mar 4 11:50:22 2011 +0000

    Introduce other attributes in the SetProxy() method
    
    This commit adds the proxy_https, proxy_socks, no_proxy and pac attributes to the
    DBus method. It breaks DBus interface API, but is careful to maintain packagekit-glib
    and packagekit-qt API and ABI compatibility.
Comment 4 Chris Smart 2011-03-10 16:37:34 UTC
(In reply to comment #3)
> commit 0d9258e2faddf2fd87efcba491dae74403e0bd6b

Thanks Richard!

-c


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.