Bug 10952

Summary: no_proxy handling has changed
Product: [Build System, Metadata & Runtime] BitBake Reporter: Denys Dmytriyenko <denis>
Component: bitbakeAssignee: Joshua Lock <joshuagloe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: patrick.ohly, poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 2.3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Denys Dmytriyenko 2017-01-23 03:31:00 UTC
According to the following Wiki page, no_proxy variable takes list of domains in the form of ".example.com" - i.e. with a leading dot:

https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy

It actually used to work fine like that for quite some time (past few years) - we've been using SSTATE_MIRRORS inside a local network behind a proxy, that had its domain listed in no_proxy variable with a leading dot.

Something has changed recently and the only change I can think of is that build machines were upgraded from Ubuntu 16.04 to 16.04.1 - SSTATE_MIRRORS stopped working. Debugging showed that it would fail to resolve the URL, even though running manual wget command with the same URL would work.

Then I stumbled upon the original World Wide Web Consortium page about proxy variables and noticed that no_proxy actually takes a list of domains WITHOUT leading dots:

https://www.w3.org/Daemon/User/Proxies/ProxyClients.html

Sure enough, making the change to no_proxy variable to list "example.com" w/o a dot fixed SSTATE_MIRRORS!

I'm guessing some Python library in Ubuntu 16.04.1 got updated and it's now more strict to how it parses no_proxy variable, but I haven't looked that far yet, sorry.
Comment 1 Joshua Lock 2017-02-07 13:14:28 UTC
Thanks for the report Denys. Sounds like we should just update the wiki page to use the correct syntax as defined by the W3C?

If you don't have a wiki account I can take care of that for you?
Comment 2 Denys Dmytriyenko 2017-02-17 00:44:28 UTC
Joshua, I'd like someone to first verify and confirm my finding before actually changing the documentation. Thanks.
Comment 3 Joshua Lock 2017-02-17 14:34:59 UTC
Denys, it took me a while to set up an environment to test but I can confirm that with a no_proxy variable with domains of the form ".example.com" bitbake fails to fetch from my shared state mirror on my corporate network, with a no_proxy variable with domains of the form "example.com" objects are fetched and used from the shared state mirror.

Testing was performed with a Fedora 25 build machine
Comment 4 Denys Dmytriyenko 2017-03-01 03:35:58 UTC
Thanks for the confirmation! Should documentation now be updated accordingly?
Comment 5 Joshua Lock 2017-03-01 11:04:03 UTC
(In reply to comment #4)
> Thanks for the confirmation! Should documentation now be updated accordingly?

I inferred that you were going to edit the wiki, could you?
Comment 6 Joshua Lock 2017-03-02 16:50:30 UTC
Wiki page updated.
Comment 7 Denys Dmytriyenko 2017-03-02 17:20:18 UTC
Thanks!

I wonder if more explicit statement about not using leading dot is needed on the page itself, similar to what is said in change log...
Comment 8 Patrick Ohly 2017-07-17 17:15:55 UTC
Leading dot will be supported again in some versions of Python - see https://bugs.python.org/issue29142