documentation/poky-ref-manual/faq.xml: Added entry about proxy and firewall

This is an explanation on how to get by the proxy or around the
firewall when Poky is trying to find and download sources.

(From OE-Core rev: 426df8458bb37c81afc6fe03f0e1300985c8d059)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2011-03-18 08:12:42 -06:00 committed by Richard Purdie
parent a0f34301a9
commit cb5e5139d4
1 changed files with 96 additions and 0 deletions

View File

@ -413,6 +413,102 @@
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
How does Poky obtain source code and will it work behind my firewall or proxy server?
</para>
</question>
<answer>
<para>
The way Poky obtains source code is highly configurable.
You can setup Poky to get source code in most environmnents if
HTTP transport is available.
</para>
<para>
When Poky searches for source code it first tries the local download directory.
If that location fails, Poky tries PREMIRRORS, the upstream source,
and then MIRRORS in that order.
</para>
<para>
By default, Poky uses the Yocto Project source PREMIRRORS for SCM-based sources,
upstreams for normal tarballs and then falls back to a number of other mirrors
including the Yocto Project source mirror if those fail.
</para>
<para>
As an example, you could add a specific server for Poky to attempt before any
others by adding something like the following to the <filename>local.conf</filename>
configuration file:
<literallayout class='monospaced'>
PREMIRRORS_prepend = "\
git://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
ftp://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
http://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n"
</literallayout>
</para>
<para>
These changes cause Poky to intercept GIT, FTP, HTTP, and HTTPS
requests and direct them to the <filename>http://</filename> sources mirror.
You can use <filename>file://</filename> urls to point to local directories
or network shares as well.
</para>
<para>
Aside from the previous technique, these options also exist:
<literallayout class='monospaced'>
BB_NO_NETWORK = "1"
</literallayout>
</para>
<para>
This statement tells BitBake to throw an error instead of trying to access the
Internet.
This technique is useful if you want to ensure code builds only from local sources.
</para>
<para>
Here is another technique:
<literallayout class='monospaced'>
BB_FETCH_PREMIRRORONLY = "1"
</literallayout>
</para>
<para>
This statement limits Poky to pulling source from the PREMIRRORS only.
Again, this technique is useful for reproducing builds.
</para>
<para>
Here is another technique:
<literallayout class='monospaced'>
BB_GENERATE_MIRROR_TARBALLS = "1"
</literallayout>
</para>
<para>
This statement tells Poky to generate mirror tarballs.
This technique is useful if you want to create a mirror server.
If not, however, the technique can simply waste time during the build.
</para>
<para>
Finally, consider an example where you are behind an HTTP-only firewall.
You could make the following changes to the <filename>local.conf</filename>
configuration file as long as the premirror server is up to date:
<literallayout class='monospaced'>
PREMIRRORS_prepend = "\
ftp://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
http://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n"
BB_FETCH_PREMIRRORONLY = "1"
</literallayout>
</para>
<para>
These changes would cause Poky to successfully fetch source over HTTP and
any network accesses to anything other than the premirror would fail.
</para>
<para>
Poky also honors the standard environment variables
<filename>http_proxy</filename>, <filename>ftp_proxy</filename>,
<filename>https_proxy</filename>, and <filename>all_proxy</filename>
to redirect requests through proxy servers.
</para>
</answer>
</qandaentry>