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 08:41:04 -0800 |
commit | 1418534d2215890723c281f852b6a6fd08acdbcf (patch) | |
tree | 0b50a45d251edeade6cc4a547532b2811cd62dad | |
parent | 4d01328526a900ee9f8989ecc0df43626a8807f9 (diff) | |
download | poky-1418534d2215890723c281f852b6a6fd08acdbcf.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: e0f88c9595a084244691c6c6aee8d95ce29602fc)
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 e63a749950..7f0d09903b 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -7527,6 +7527,31 @@ system and gives an overview of their function and contents. | |||
7527 | 7527 | ||
7528 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. | 7528 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
7529 | 7529 | ||
7530 | .. note:: | ||
7531 | |||
7532 | If the mirror is protected behind a username and password, the | ||
7533 | :term:`build host` needs to be configured so the :term:`build system | ||
7534 | <OpenEmbedded Build System>` is able to fetch from the mirror. | ||
7535 | |||
7536 | The recommended way to do that is by setting the following parameters | ||
7537 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
7538 | directory):: | ||
7539 | |||
7540 | machine example.com | ||
7541 | login <user> | ||
7542 | password <password> | ||
7543 | |||
7544 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
7545 | other users from reading the file:: | ||
7546 | |||
7547 | chmod 600 "$HOME/.netrc" | ||
7548 | |||
7549 | Another method to configure the username and password is from the URL | ||
7550 | in :term:`SOURCE_MIRROR_URL` directly, with the ``user`` and ``pswd`` | ||
7551 | parameters:: | ||
7552 | |||
7553 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror;user=<user>;pswd=<password>" | ||
7554 | |||
7530 | :term:`SPDX_ARCHIVE_PACKAGED` | 7555 | :term:`SPDX_ARCHIVE_PACKAGED` |
7531 | This option allows to add to :term:`SPDX` output compressed archives | 7556 | This option allows to add to :term:`SPDX` output compressed archives |
7532 | of the files in the generated target packages. | 7557 | of the files in the generated target packages. |
@@ -7905,6 +7930,34 @@ system and gives an overview of their function and contents. | |||
7905 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ | 7930 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
7906 | file://.* file:///some-local-dir/sstate/PATH" | 7931 | file://.* file:///some-local-dir/sstate/PATH" |
7907 | 7932 | ||
7933 | .. note:: | ||
7934 | |||
7935 | If the mirror is protected behind a username and password, the | ||
7936 | :term:`build host` needs to be configured so the :term:`build system | ||
7937 | <OpenEmbedded Build System>` is able to download the sstate cache using | ||
7938 | authentication. | ||
7939 | |||
7940 | The recommended way to do that is by setting the following parameters | ||
7941 | in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home | ||
7942 | directory):: | ||
7943 | |||
7944 | machine someserver.tld | ||
7945 | login <user> | ||
7946 | password <password> | ||
7947 | |||
7948 | This file requires permissions set to ``400`` or ``600`` to prevent | ||
7949 | other users from reading the file:: | ||
7950 | |||
7951 | chmod 600 "$HOME/.netrc" | ||
7952 | |||
7953 | Another method to configure the username and password is from the | ||
7954 | URL in :term:`SSTATE_MIRRORS` directly, with the ``user`` and ``pswd`` | ||
7955 | parameters:: | ||
7956 | |||
7957 | SSTATE_MIRRORS ?= "\ | ||
7958 | file://.* https://someserver.tld/share/sstate/PATH;user=<user>;pswd=<password>;downloadfilename=PATH \ | ||
7959 | " | ||
7960 | |||
7908 | The Yocto Project actually shares the cache data objects built by its | 7961 | The Yocto Project actually shares the cache data objects built by its |
7909 | autobuilder:: | 7962 | autobuilder:: |
7910 | 7963 | ||