diff options
author | Antonin Godard <antonin.godard@bootlin.com> | 2024-12-24 16:35:55 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-01-09 06:25:36 -0800 |
commit | da6fec8a1da6b22e1cd28ba638ff4b9e4777630e (patch) | |
tree | 4f5ff05b1407f5859e13bba9656d508fc12101fd /documentation | |
parent | eda687eb0d44bd147b4463a44d8f35a3942fe63b (diff) | |
download | poky-da6fec8a1da6b22e1cd28ba638ff4b9e4777630e.tar.gz |
SSTATE_MIRRORS/SOURCE_MIRROR_URL: add instructions for mirror authentication
[ YOCTO #15218 ]
There are different ways of configuring the build host when
authentication to a mirror (SSTATE_MIRRORS or SOURCE_MIRROR_URL) is
required.
Document these methods, and begin with the preferred approach which is
to edit ~/.netrc appropriately. When that is not possible, specifying
the credentials from the URL is also possible, so document it as well.
Reported-by: peter.zsifkovits@at.bosch.com
Tested-by: Antonin Godard <antonin.godard@bootlin.com> # Debian 12 container
(From yocto-docs rev: 728d6fc872c4646004919f3487a5ee0bae2d16e9)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 4c303cce0627e0f2ce52e72597541e220585aaed)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/ref-manual/variables.rst | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 2e57abe16c..869100ce34 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -7905,6 +7905,31 @@ system and gives an overview of their function and contents. | |||
7905 | 7905 | ||
7906 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. | 7906 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
7907 | 7907 | ||
7908 | .. note:: | ||
7909 | |||
7910 | If the mirror is protected behind a username and password, the | ||
7911 | :term:`build host` needs to be configured so the :term:`build system | ||
7912 | <OpenEmbedded Build System>` is able to fetch from the mirror. | ||
7913 | |||
7914 | The recommended way to do that is by setting the following parameters | ||
7915 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
7916 | directory):: | ||
7917 | |||
7918 | machine example.com | ||
7919 | login <user> | ||
7920 | password <password> | ||
7921 | |||
7922 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
7923 | other users from reading the file:: | ||
7924 | |||
7925 | chmod 600 "$HOME/.netrc" | ||
7926 | |||
7927 | Another method to configure the username and password is from the URL | ||
7928 | in :term:`SOURCE_MIRROR_URL` directly, with the ``user`` and ``pswd`` | ||
7929 | parameters:: | ||
7930 | |||
7931 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror;user=<user>;pswd=<password>" | ||
7932 | |||
7908 | :term:`SPDX_ARCHIVE_PACKAGED` | 7933 | :term:`SPDX_ARCHIVE_PACKAGED` |
7909 | This option allows to add to :term:`SPDX` output compressed archives | 7934 | This option allows to add to :term:`SPDX` output compressed archives |
7910 | of the files in the generated target packages. | 7935 | of the files in the generated target packages. |
@@ -8312,6 +8337,34 @@ system and gives an overview of their function and contents. | |||
8312 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ | 8337 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
8313 | file://.* file:///some-local-dir/sstate/PATH" | 8338 | file://.* file:///some-local-dir/sstate/PATH" |
8314 | 8339 | ||
8340 | .. note:: | ||
8341 | |||
8342 | If the mirror is protected behind a username and password, the | ||
8343 | :term:`build host` needs to be configured so the :term:`build system | ||
8344 | <OpenEmbedded Build System>` is able to download the sstate cache using | ||
8345 | authentication. | ||
8346 | |||
8347 | The recommended way to do that is by setting the following parameters | ||
8348 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
8349 | directory):: | ||
8350 | |||
8351 | machine someserver.tld | ||
8352 | login <user> | ||
8353 | password <password> | ||
8354 | |||
8355 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
8356 | other users from reading the file:: | ||
8357 | |||
8358 | chmod 600 "$HOME/.netrc" | ||
8359 | |||
8360 | Another method to configure the username and password is from the | ||
8361 | URL in :term:`SSTATE_MIRRORS` directly, with the ``user`` and ``pswd`` | ||
8362 | parameters:: | ||
8363 | |||
8364 | SSTATE_MIRRORS ?= "\ | ||
8365 | file://.* https://someserver.tld/share/sstate/PATH;user=<user>;pswd=<password>;downloadfilename=PATH \ | ||
8366 | " | ||
8367 | |||
8315 | The Yocto Project actually shares the cache data objects built by its | 8368 | The Yocto Project actually shares the cache data objects built by its |
8316 | autobuilder:: | 8369 | autobuilder:: |
8317 | 8370 | ||