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:02:49 -0800 |
| commit | 843c4a8de76bac455afba2080ee6b02359359162 (patch) | |
| tree | 5ab5083fbd0cddc10aa046d789d02bf48f696215 | |
| parent | 6bea4b93af5c8e484e928831a49af5090572390b (diff) | |
| download | poky-843c4a8de76bac455afba2080ee6b02359359162.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: fbe43aaa28bd0e0ec3884595e07d5d4c59116fb5)
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>
| -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 cf9b960b18..68520475a5 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
| @@ -8027,6 +8027,31 @@ system and gives an overview of their function and contents. | |||
| 8027 | 8027 | ||
| 8028 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. | 8028 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
| 8029 | 8029 | ||
| 8030 | .. note:: | ||
| 8031 | |||
| 8032 | If the mirror is protected behind a username and password, the | ||
| 8033 | :term:`build host` needs to be configured so the :term:`build system | ||
| 8034 | <OpenEmbedded Build System>` is able to fetch from the mirror. | ||
| 8035 | |||
| 8036 | The recommended way to do that is by setting the following parameters | ||
| 8037 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
| 8038 | directory):: | ||
| 8039 | |||
| 8040 | machine example.com | ||
| 8041 | login <user> | ||
| 8042 | password <password> | ||
| 8043 | |||
| 8044 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
| 8045 | other users from reading the file:: | ||
| 8046 | |||
| 8047 | chmod 600 "$HOME/.netrc" | ||
| 8048 | |||
| 8049 | Another method to configure the username and password is from the URL | ||
| 8050 | in :term:`SOURCE_MIRROR_URL` directly, with the ``user`` and ``pswd`` | ||
| 8051 | parameters:: | ||
| 8052 | |||
| 8053 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror;user=<user>;pswd=<password>" | ||
| 8054 | |||
| 8030 | :term:`SPDX_ARCHIVE_PACKAGED` | 8055 | :term:`SPDX_ARCHIVE_PACKAGED` |
| 8031 | This option allows to add to :term:`SPDX` output compressed archives | 8056 | This option allows to add to :term:`SPDX` output compressed archives |
| 8032 | of the files in the generated target packages. | 8057 | of the files in the generated target packages. |
| @@ -8434,6 +8459,34 @@ system and gives an overview of their function and contents. | |||
| 8434 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ | 8459 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
| 8435 | file://.* file:///some-local-dir/sstate/PATH" | 8460 | file://.* file:///some-local-dir/sstate/PATH" |
| 8436 | 8461 | ||
| 8462 | .. note:: | ||
| 8463 | |||
| 8464 | If the mirror is protected behind a username and password, the | ||
| 8465 | :term:`build host` needs to be configured so the :term:`build system | ||
| 8466 | <OpenEmbedded Build System>` is able to download the sstate cache using | ||
| 8467 | authentication. | ||
| 8468 | |||
| 8469 | The recommended way to do that is by setting the following parameters | ||
| 8470 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
| 8471 | directory):: | ||
| 8472 | |||
| 8473 | machine someserver.tld | ||
| 8474 | login <user> | ||
| 8475 | password <password> | ||
| 8476 | |||
| 8477 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
| 8478 | other users from reading the file:: | ||
| 8479 | |||
| 8480 | chmod 600 "$HOME/.netrc" | ||
| 8481 | |||
| 8482 | Another method to configure the username and password is from the | ||
| 8483 | URL in :term:`SSTATE_MIRRORS` directly, with the ``user`` and ``pswd`` | ||
| 8484 | parameters:: | ||
| 8485 | |||
| 8486 | SSTATE_MIRRORS ?= "\ | ||
| 8487 | file://.* https://someserver.tld/share/sstate/PATH;user=<user>;pswd=<password>;downloadfilename=PATH \ | ||
| 8488 | " | ||
| 8489 | |||
| 8437 | The Yocto Project actually shares the cache data objects built by its | 8490 | The Yocto Project actually shares the cache data objects built by its |
| 8438 | autobuilder:: | 8491 | autobuilder:: |
| 8439 | 8492 | ||
