diff options
author | Antonin Godard <antonin.godard@bootlin.com> | 2024-12-24 16:35:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-09 13:58:17 +0000 |
commit | b301c74baf33caee0ee8560fb019034ea6c9856f (patch) | |
tree | c5834acff279fa7492932b6d04d9559a09b27de3 /documentation/ref-manual | |
parent | 3ca10443605e155c6577319bd1695e2459338d5e (diff) | |
download | poky-b301c74baf33caee0ee8560fb019034ea6c9856f.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: 4c303cce0627e0f2ce52e72597541e220585aaed)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual')
-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 ca1701e7c6..a45c77209d 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -8080,6 +8080,31 @@ system and gives an overview of their function and contents. | |||
8080 | 8080 | ||
8081 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. | 8081 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
8082 | 8082 | ||
8083 | .. note:: | ||
8084 | |||
8085 | If the mirror is protected behind a username and password, the | ||
8086 | :term:`build host` needs to be configured so the :term:`build system | ||
8087 | <OpenEmbedded Build System>` is able to fetch from the mirror. | ||
8088 | |||
8089 | The recommended way to do that is by setting the following parameters | ||
8090 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
8091 | directory):: | ||
8092 | |||
8093 | machine example.com | ||
8094 | login <user> | ||
8095 | password <password> | ||
8096 | |||
8097 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
8098 | other users from reading the file:: | ||
8099 | |||
8100 | chmod 600 "$HOME/.netrc" | ||
8101 | |||
8102 | Another method to configure the username and password is from the URL | ||
8103 | in :term:`SOURCE_MIRROR_URL` directly, with the ``user`` and ``pswd`` | ||
8104 | parameters:: | ||
8105 | |||
8106 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror;user=<user>;pswd=<password>" | ||
8107 | |||
8083 | :term:`SPDX_ARCHIVE_PACKAGED` | 8108 | :term:`SPDX_ARCHIVE_PACKAGED` |
8084 | This option allows to add to :term:`SPDX` output compressed archives | 8109 | This option allows to add to :term:`SPDX` output compressed archives |
8085 | of the files in the generated target packages. | 8110 | of the files in the generated target packages. |
@@ -8487,6 +8512,34 @@ system and gives an overview of their function and contents. | |||
8487 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ | 8512 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
8488 | file://.* file:///some-local-dir/sstate/PATH" | 8513 | file://.* file:///some-local-dir/sstate/PATH" |
8489 | 8514 | ||
8515 | .. note:: | ||
8516 | |||
8517 | If the mirror is protected behind a username and password, the | ||
8518 | :term:`build host` needs to be configured so the :term:`build system | ||
8519 | <OpenEmbedded Build System>` is able to download the sstate cache using | ||
8520 | authentication. | ||
8521 | |||
8522 | The recommended way to do that is by setting the following parameters | ||
8523 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
8524 | directory):: | ||
8525 | |||
8526 | machine someserver.tld | ||
8527 | login <user> | ||
8528 | password <password> | ||
8529 | |||
8530 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
8531 | other users from reading the file:: | ||
8532 | |||
8533 | chmod 600 "$HOME/.netrc" | ||
8534 | |||
8535 | Another method to configure the username and password is from the | ||
8536 | URL in :term:`SSTATE_MIRRORS` directly, with the ``user`` and ``pswd`` | ||
8537 | parameters:: | ||
8538 | |||
8539 | SSTATE_MIRRORS ?= "\ | ||
8540 | file://.* https://someserver.tld/share/sstate/PATH;user=<user>;pswd=<password>;downloadfilename=PATH \ | ||
8541 | " | ||
8542 | |||
8490 | The Yocto Project actually shares the cache data objects built by its | 8543 | The Yocto Project actually shares the cache data objects built by its |
8491 | autobuilder:: | 8544 | autobuilder:: |
8492 | 8545 | ||