no_proxy ignored if https_proxy set
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | apt (Ubuntu) |
Medium
|
Unassigned | ||
| | Precise |
Medium
|
Brian Murray | ||
| | Trusty |
Medium
|
Brian Murray | ||
| | Wily |
Medium
|
Unassigned | ||
Bug Description
Description:
When using the https transport mechanism, $no_proxy is ignored if apt is getting it's proxy information from $https_proxy. If the source of proxy information is Acquire:
Package Versions:
1.0.1ubuntu2.13 on 14.04 LTS
1.2.10ubuntu1 on 16.04 LTS
Expected result:
Apt would pull down my packages from my internal repository without trying to put it through the proxy.
I've submitted a patch upstream that seems to fix the behavior, see https:/
| Patrick Cable (5-pc) wrote : | #1 |
| Patrick Cable (5-pc) wrote : | #3 |
Updated the patch with the help of the debian-apt upstream.
| Brian Murray (brian-murray) wrote : | #4 |
Would you mind updating the bug description according to the the Stable Release Update process?
https:/
Having a test case will help us get the bug SRUed.
| Changed in apt (Ubuntu): | |
| status: | New → Triaged |
| importance: | Undecided → Medium |
| milestone: | none → xenial-updates |
| tags: | added: xenial |
| tags: | added: yakkety |
| Patrick Cable (5-pc) wrote : | #5 |
Sure thing. SRU to follow:
[Impact]
This bug breaks users who use a proxy to access externally-hosted https apt repositories, but do not need to use a proxy to access internally hosted https apt repositories. Specifically, if a user has a https_proxy (or http_proxy and no https_proxy) setting in their environment, apt will no longer honor no_proxy.
The normal http transport mechanism handles this fine, so backporting will allow the expected behavior to work for both http and https transports and save system administrators in some proxy environments some frustration :-)
The previous behavior only checked for no_proxy in the event that Acquire:
[Test Case]
1) Ensure that Acquire:
2) Set https_proxy and no_proxy in the environment.
3) Run apt-get update. Apt will still attempt to use https_proxy on a host that is named in no_proxy.
I tested this behavior in Trusty and Xenial. It'd be wonderful if I didn't have to maintain a patch package for Trusty, but I understand if you don't backport to out of date LTSes.
[Regression Potential]
The patch does not introduce any new code to the branch, only a) moves the placement of a check that would return out the function earlier and b) changes the control flow such that a check for https_proxy and http_proxy will be performed each time HttpsMethod:
[Other Info]
I worked with the folks in the debian-apt channel on oftc on this to reach an easier-to-read refactor and intended functionality, and they've already merged it in upstream. See http://
| Julian Andres Klode (juliank) wrote : | #6 |
We are pushing for SRUing APT 1.2.12 in xenial in Bug #1580952
| Julian Andres Klode (juliank) wrote : | #7 |
Fixed in 1.2.12 and 1.3~exp1 in yakkety, xenial SRU is tracked in #1580952
| Changed in apt (Ubuntu): | |
| status: | Triaged → Fix Released |
| Patrick Cable (5-pc) wrote : | #8 |
Question: Is there a process by which to get this fix into Trusty as well? The code diff is the same.
| Patrick Cable (5-pc) wrote : | #9 |
I've created a debdiff for patching Trusty for this bug.
| Patrick Cable (5-pc) wrote : | #10 |
I've also created a debdiff for patching Precise for this bug.
| Brian Murray (brian-murray) wrote : | #11 |
I'll review these shortly as a part of my patch pilot shift today. Thanks for working on the debdiffs and the test case.
| Brian Murray (brian-murray) wrote : | #12 |
It'd probably be nice to fix this in wily too.
| Changed in apt (Ubuntu Precise): | |
| status: | New → Triaged |
| importance: | Undecided → Medium |
| Changed in apt (Ubuntu Trusty): | |
| status: | New → Triaged |
| importance: | Undecided → Medium |
| Changed in apt (Ubuntu Wily): | |
| status: | New → Triaged |
| importance: | Undecided → Medium |
| Brian Murray (brian-murray) wrote : | #13 |
The trusty debdiff has UNRELEASED in the changelog, but I'll fix that.
| Changed in apt (Ubuntu Trusty): | |
| assignee: | nobody → Brian Murray (brian-murray) |
| Changed in apt (Ubuntu Precise): | |
| assignee: | nobody → Brian Murray (brian-murray) |
| Patrick Cable (5-pc) wrote : | #14 |
I can toss together one for Wily tomorrow; I figured keeping unreleased in the changelog was important for debdiffs that hadn't been accepted yet.
Hello Patrick, or anyone else affected,
Accepted apt into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in apt (Ubuntu Trusty): | |
| status: | Triaged → Fix Committed |
| tags: | added: verification-needed |
| Changed in apt (Ubuntu Precise): | |
| status: | Triaged → Fix Committed |
| Martin Pitt (pitti) wrote : | #16 |
Hello Patrick, or anyone else affected,
Accepted apt into precise-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Patrick Cable (5-pc) wrote : | #17 |
Precise: tested failure condition, added -proposed repo, updated apt and retested -- all good.
Trusty: tested failure condition, added -proposed repo, updated apt and retested -- all good.
Xenial: tested failure condition, added -proposed repo, updated apt and retested -- all good.
Not sure how to add the tags, must be missing something in the interface? "Fix Released" doesnt seem like the appropriate thing to select (for me anyways)
Will work on a debdiff for Wily now.
| Patrick Cable (5-pc) wrote : | #18 |
Here's a debdiff for fixing Wily.
| Brian Murray (brian-murray) wrote : | #19 |
I've sponsored the wily patch, thanks again for working on this.
| tags: |
added: verification-done removed: verification-needed |
| Changed in apt (Ubuntu): | |
| milestone: | xenial-updates → none |
| Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package apt - 0.8.16~
---------------
apt (0.8.16~
* When using the https transport mechanism, $no_proxy is ignored if apt is
getting it's proxy information from $https_proxy (as opposed to
Acquire:
information is Acquire:
then $no_proxy is honored. This patch makes the behavior similar for
both methods of setting the proxy. (LP: #1575877)
-- Patrick Cable <email address hidden> Tue, 17 May 2016 13:49:45 -0700
| Changed in apt (Ubuntu Precise): | |
| status: | Fix Committed → Fix Released |
| Martin Pitt (pitti) wrote : Update Released | #21 |
The verification of the Stable Release Update for apt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
| Launchpad Janitor (janitor) wrote : | #22 |
This bug was fixed in the package apt - 1.0.1ubuntu2.14
---------------
apt (1.0.1ubuntu2.14) trusty; urgency=medium
* When using the https transport mechanism, $no_proxy is ignored if apt is
getting it's proxy information from $https_proxy (as opposed to
Acquire:
information is Acquire:
then $no_proxy is honored. This patch makes the behavior similar for
both methods of setting the proxy. (LP: #1575877)
-- Patrick Cable <email address hidden> Tue, 17 May 2016 13:45:06 -0700
| Changed in apt (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
Hello Patrick, or anyone else affected,
Accepted apt into wily-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in apt (Ubuntu Wily): | |
| status: | Triaged → Fix Committed |
| tags: | removed: verification-done |
| tags: | added: verification-needed |
| Patrick Cable (5-pc) wrote : | #24 |
Just tested in Wily -- replicated failure condition, added -proposed repo, updated apt and retested and it's all good. Thanks!
| tags: |
added: verification-done removed: verification-needed |
| Simon Déziel (sdeziel) wrote : | #25 |
@Patrick, thanks for working on this. When you have done the verification, you can update the tags list that's below the initial issue description at the top. More details on that: https:/
| Launchpad Janitor (janitor) wrote : | #26 |
This bug was fixed in the package apt - 1.0.10.2ubuntu3
---------------
apt (1.0.10.2ubuntu3) wily; urgency=medium
* When using the https transport mechanism, $no_proxy is ignored if apt is
getting it's proxy information from $https_proxy (as opposed to
Acquire:
information is Acquire:
then $no_proxy is honored. This patch makes the behavior similar for
both methods of setting the proxy. (LP: #1575877)
-- Patrick Cable <email address hidden> Wed, 18 May 2016 08:09:20 -0700
| Changed in apt (Ubuntu Wily): | |
| status: | Fix Committed → Fix Released |


The attachment "fix-https- noproxy. patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]