1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 13:49:49 +00:00

ref-manual: Edits to the question on how source code is fetched.

Updated the question that asks "How doe the OpenEmbedded build
system obtain source code and will it work behind my firewall
or proxy server?".  Some of the variables did not have links
or proper font type.

(From yocto-docs rev: be1f665b480a47483595381c9a837892100007e8)

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
2013-02-04 12:56:16 -06:00
committed by Richard Purdie
parent 7183fe85ec
commit 40fde06345
+49 -32
View File
@@ -485,30 +485,38 @@
<qandaentry> <qandaentry>
<question> <question>
<para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'> <para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
How does the OpenEmbedded build system obtain source code and will it work behind my How does the OpenEmbedded build system obtain source code and
firewall or proxy server? will it work behind my firewall or proxy server?
</para> </para>
</question> </question>
<answer> <answer>
<para> <para>
The way the build system obtains source code is highly configurable. The way the build system obtains source code is highly
You can setup the build system to get source code in most environments if configurable.
HTTP transport is available. You can setup the build system to get source code in most
environments if HTTP transport is available.
</para> </para>
<para> <para>
When the build system searches for source code, it first tries the local download directory. When the build system searches for source code, it first
If that location fails, Poky tries PREMIRRORS, the upstream source, tries the local download directory.
and then MIRRORS in that order. If that location fails, Poky tries
<link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
the upstream source, and then
<link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
in that order.
</para> </para>
<para> <para>
By default, the OpenEmbedded build system uses the Yocto Project source PREMIRRORS Assuming your distribution is "poky", the OpenEmbedded build
for SCM-based sources, system uses the Yocto Project source
upstreams for normal tarballs, and then falls back to a number of other mirrors <filename>PREMIRRORS</filename> by default for SCM-based
including the Yocto Project source mirror if those fail. 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>
<para> <para>
As an example, you could add a specific server for Poky to attempt before any As an example, you could add a specific server for the
others by adding something like the following to the <filename>local.conf</filename> build system to attempt before any others by adding something
like the following to the <filename>local.conf</filename>
configuration file: configuration file:
<literallayout class='monospaced'> <literallayout class='monospaced'>
PREMIRRORS_prepend = "\ PREMIRRORS_prepend = "\
@@ -519,26 +527,29 @@
</literallayout> </literallayout>
</para> </para>
<para> <para>
These changes cause Poky to intercept Git, FTP, HTTP, and HTTPS These changes cause the build system to intercept Git, FTP,
requests and direct them to the <filename>http://</filename> sources mirror. HTTP, and HTTPS requests and direct them to the
You can use <filename>file://</filename> URLs to point to local directories <filename>http://</filename> sources mirror.
or network shares as well. You can use <filename>file://</filename> URLs to point to
local directories or network shares as well.
</para> </para>
<para> <para>
Aside from the previous technique, these options also exist: Aside from the previous technique, these options also exist:
<literallayout class='monospaced'> <literallayout class='monospaced'>
BB_NO_NETWORK = "1" BB_NO_NETWORK = "1"
</literallayout> </literallayout>
This statement tells BitBake to throw an error instead of trying to access the This statement tells BitBake to issue an error instead of
Internet. trying to access the Internet.
This technique is useful if you want to ensure code builds only from local sources. This technique is useful if you want to ensure code builds
only from local sources.
</para> </para>
<para> <para>
Here is another technique: Here is another technique:
<literallayout class='monospaced'> <literallayout class='monospaced'>
BB_FETCH_PREMIRRORONLY = "1" BB_FETCH_PREMIRRORONLY = "1"
</literallayout> </literallayout>
This statement limits Poky to pulling source from the PREMIRRORS only. This statement limits Poky to pulling source from the
<filename>PREMIRRORS</filename> only.
Again, this technique is useful for reproducing builds. Again, this technique is useful for reproducing builds.
</para> </para>
<para> <para>
@@ -548,12 +559,15 @@
</literallayout> </literallayout>
This statement tells Poky to generate mirror tarballs. This statement tells Poky to generate mirror tarballs.
This technique is useful if you want to create a mirror server. This technique is useful if you want to create a mirror server.
If not, however, the technique can simply waste time during the build. If not, however, the technique can simply waste time during
the build.
</para> </para>
<para> <para>
Finally, consider an example where you are behind an HTTP-only firewall. Finally, consider an example where you are behind an
You could make the following changes to the <filename>local.conf</filename> HTTP-only firewall.
configuration file as long as the PREMIRROR server is up to date: You could make the following changes to the
<filename>local.conf</filename> configuration file as long as
the <filename>PREMIRRORS</filename> server is up to date:
<literallayout class='monospaced'> <literallayout class='monospaced'>
PREMIRRORS_prepend = "\ PREMIRRORS_prepend = "\
ftp://.*/.* http://www.yoctoproject.org/sources/ \n \ ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
@@ -561,14 +575,17 @@
https://.*/.* http://www.yoctoproject.org/sources/ \n" https://.*/.* http://www.yoctoproject.org/sources/ \n"
BB_FETCH_PREMIRRORONLY = "1" BB_FETCH_PREMIRRORONLY = "1"
</literallayout> </literallayout>
These changes would cause Poky to successfully fetch source over HTTP and These changes would cause the build system to successfully
any network accesses to anything other than the PREMIRROR would fail. fetch source over HTTP and any network accesses to anything
other than the <filename>PREMIRRORS</filename> would fail.
</para> </para>
<para> <para>
The build system also honors the standard shell environment variables The build system also honors the standard shell environment
<filename>http_proxy</filename>, <filename>ftp_proxy</filename>, variables <filename>http_proxy</filename>,
<filename>https_proxy</filename>, and <filename>all_proxy</filename> <filename>ftp_proxy</filename>,
to redirect requests through proxy servers. <filename>https_proxy</filename>, and
<filename>all_proxy</filename> to redirect requests through
proxy servers.
</para> </para>
</answer> </answer>
</qandaentry> </qandaentry>