(no cover subject)
v2 cover (no cover subject)
Updates of staging and packaging variables' descriptions following design and implementation changes of the last few years.
---
Changes in v2:
- Reworded following review comments
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Adam Blank (6):
ref-manual/variables.rst: update STAGING_DIR's description ref-manual/variables.rst: update COMPONENTS_DIR's description ref-manual/variables.rst: update PKGDATA_DIR's description ref-manual/variables.rst: update RECIPE_SYSROOT* descriptions ref-manual/variables.rst: update STAGING_DIR* descriptions ref-manual/variables.rst: correct a reference to STAGING_DIR*
documentation/ref-manual/variables.rst | 78 ++++++++++++++++------------------ 1 file changed, 37 insertions(+), 41 deletions(-)
---
base-commit: dc1574b9f71532c469f355af2ff5ff5664083e48
change-id: 20260408-staging_and_packaging_vars-eb7f6d92a6cc
Best regards,
Signature · 1 line
Adam Blank <[email protected]>
PATCH v2 1/6 ref-manual/variables.rst: update STAGING_DIR's description
STAGING_DIR is not in direct relation to recipe-sysroot* directries. Also it does not participate in packaging, but rather in staging and sharing files among recipes.
--- documentation/ref-manual/variables.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
documentation/ref-manual/variables.rst +1 -2
@@ -10160,8 +10160,7 @@ system and gives an overview of their function and contents. directory for the build host. :term:`STAGING_DIR` - Helps construct the ``recipe-sysroot*`` directories, which are used - during packaging. + Used for constructing directory trees used during staging. For information on how staging for recipe-specific sysroots occurs, see the :ref:`ref-tasks-populate_sysroot`
Signature · 1 line
2.43.0
PATCH v2 2/6 ref-manual/variables.rst: update COMPONENTS_DIR's description
In reply to Adam BlankMake it more evident, that it is first populated by files from some recipes, and later used as source of those files for the others (staging and sharing files).
--- documentation/ref-manual/variables.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
documentation/ref-manual/variables.rst +1 -1
@@ -1712,7 +1712,7 @@ system and gives an overview of their function and contents. (set via :term:`RRECOMMENDS`) are always ignored. :term:`COMPONENTS_DIR` - Stores sysroot components for each recipe. The OpenEmbedded build + Stores sysroot components provided by each recipe. The OpenEmbedded build system uses :term:`COMPONENTS_DIR` when constructing recipe-specific sysroots for other recipes.
Signature · 1 line
2.43.0
PATCH v2 3/6 ref-manual/variables.rst: update PKGDATA_DIR's description
In reply to Adam BlankDon't refer to it as temporary. Update the default value.
--- documentation/ref-manual/variables.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
documentation/ref-manual/variables.rst +3 -5
@@ -7493,19 +7493,17 @@ system and gives an overview of their function and contents. Points to a shared, global-state directory that holds data generated during the packaging process. During the packaging process, the :ref:`ref-tasks-packagedata` task packages data - for each recipe and installs it into this temporary, shared area. + for each recipe and installs it into this shared area. This directory defaults to the following, which you should not change:: - ${STAGING_DIR_HOST}/pkgdata + ${TMPDIR}/pkgdata/${MACHINE} For examples of how this data is used, see the ":ref:`overview-manual/concepts:automatically added runtime dependencies`" section in the Yocto Project Overview and Concepts Manual and the ":ref:`dev-manual/debugging:viewing package information with ``oe-pkgdata-util```" - section in the Yocto Project Development Tasks Manual. For more - information on the shared, global-state directory, see - :term:`STAGING_DIR_HOST`. + section in the Yocto Project Development Tasks Manual. :term:`PKGDEST` Points to the parent directory for files to be packaged after they
Signature · 1 line
2.43.0
PATCH v2 4/6 ref-manual/variables.rst: update RECIPE_SYSROOT* descriptions
In reply to Adam BlankSlightly reword to emphasise the order of steps during staging. Further clarify those variables' relation to STAGING_DIR* variables.
--- documentation/ref-manual/variables.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
documentation/ref-manual/variables.rst +7 -7
@@ -8345,13 +8345,13 @@ system and gives an overview of their function and contents. section. :term:`RECIPE_SYSROOT` - This variable points to the directory that holds all files populated from + This variable points to the directory populated with all files provided by recipes specified in :term:`DEPENDS`. As the name indicates, - think of this variable as a custom root (``/``) for the recipe that will be + think of this variable as a custom root (``/``) for the recipe, that will be used by the compiler in order to find headers and other files needed to complete its job. - This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET` + This variable is used to define :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET` according to the type of the recipe and the build target. To better understand this variable, consider the following examples:
@@ -8365,11 +8365,11 @@ system and gives an overview of their function and contents. Do not modify it. :term:`RECIPE_SYSROOT_NATIVE` - This is similar to :term:`RECIPE_SYSROOT` but the populated files are from - ``-native`` recipes. This allows a recipe built for the target machine to - use ``native`` tools. + This is similar to :term:`RECIPE_SYSROOT` but files in it are provided by + native recipes. This allows a recipe built for the target machine to + use native tools. - This variable is related to :term:`STAGING_DIR_NATIVE`. + This variable is used to define :term:`STAGING_DIR_NATIVE`. The default value is ``"${WORKDIR}/recipe-sysroot-native"``. Do not modify it.
Signature · 1 line
2.43.0
PATCH v2 5/6 ref-manual/variables.rst: update STAGING_DIR* descriptions
In reply to Adam BlankSlightly reword to emphasize the sysroots' roles during the build. Drop double back-quote from the uses of '-native' to make it a bit easier on the eyes.
--- documentation/ref-manual/variables.rst | 49 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 25 deletions(-)
documentation/ref-manual/variables.rst +24 -25
@@ -10178,31 +10178,31 @@ system and gives an overview of their function and contents. those files into the sysroot. :term:`STAGING_DIR_HOST` - Specifies the path to the sysroot directory for the system on which - the component is built to run (the system that hosts the component). - For most recipes, this sysroot is the one in which that recipe's - :ref:`ref-tasks-populate_sysroot` task copies - files. Exceptions include ``-native`` recipes, where the - :ref:`ref-tasks-populate_sysroot` task instead uses - :term:`STAGING_DIR_NATIVE`. Depending on - the type of recipe and the build target, :term:`STAGING_DIR_HOST` can - have the following values: + Specifies the path to the recipe's input sysroot directory, populated with files + for the system on which the component is built to run + (the system that hosts the component). + For most recipes, this sysroot is populated by their + :ref:`ref-tasks-populate_sysroot` task (when sharing files + between recipes). Exceptions include native recipes, for which the files from + :ref:`ref-tasks-populate_sysroot` task are instead copied to + :term:`STAGING_DIR_NATIVE`. Depending on the type of recipe and the build target, + :term:`STAGING_DIR_HOST` can have the following values: - For recipes building for the target machine, the value is - "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". + ``"${RECIPE_SYSROOT}"``, check :term:`RECIPE_SYSROOT`. - - For native recipes building for the build host, the value is empty - given the assumption that when building for the build host, the - build host's own directories should be used. + - For native recipes (building for the :term:`build host`), the value is empty + given the assumption that when building for the :term:`build host`, the + :term:`build host`'s own directories should be used. .. note:: - ``-native`` recipes are not installed into host paths like such - as ``/usr``. Rather, these recipes are installed into - :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, + Native recipe files are not installed into host paths such + as ``/usr``. Rather, such files are installed into + :term:`STAGING_DIR_NATIVE`. When compiling native recipes, standard build environment variables such as :term:`CPPFLAGS` and - :term:`CFLAGS` are set up so that both host paths + :term:`CFLAGS` are set up so that both :term:`build host`'s paths and :term:`STAGING_DIR_NATIVE` are searched for libraries and headers using, for example, GCC's ``-isystem`` option.
@@ -10210,16 +10210,15 @@ system and gives an overview of their function and contents. should be viewed as input variables by tasks such as :ref:`ref-tasks-configure`, :ref:`ref-tasks-compile`, and - :ref:`ref-tasks-install`. Having the real system - root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense - for ``-native`` recipes, as they make use of host headers and - libraries. - - Check :term:`RECIPE_SYSROOT` and :term:`RECIPE_SYSROOT_NATIVE`. + :ref:`ref-tasks-install`. Having the real system root + (the :term:`build host`'s root) play the role of :term:`STAGING_DIR_HOST` + makes conceptual sense for native recipes, as they make use + of the :term:`build host`'s headers and libraries. :term:`STAGING_DIR_NATIVE` - Specifies the path to the sysroot directory used when building - components that run on the build host itself. + Specifies the path to the recipe's input sysroot directory, populated with + files provided by native recipes (recipes building components that + run on the :term:`build host` itself). The default value is ``"${RECIPE_SYSROOT_NATIVE}"``, check :term:`RECIPE_SYSROOT_NATIVE`.
Signature · 1 line
2.43.0
PATCH v2 6/6 ref-manual/variables.rst: correct a reference to STAGING_DIR*
In reply to Adam BlankThe reference to STAGING_DIR* variables in the description of DEPENDS was misleading, as it pointed at STAGING_DIR which is unrelated in this context.
--- documentation/ref-manual/variables.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
documentation/ref-manual/variables.rst +1 -1
@@ -2225,7 +2225,7 @@ system and gives an overview of their function and contents. The practical effect of the previous assignment is that all files installed by bar will be available in the appropriate staging sysroot, - given by the :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time + given by the :term:`STAGING_DIR* <STAGING_DIR_HOST>` variables, by the time the :ref:`ref-tasks-configure` task for ``foo`` runs. This mechanism is implemented by having :ref:`ref-tasks-configure` depend on the :ref:`ref-tasks-populate_sysroot` task of each recipe listed in
Signature · 1 line
2.43.0
Antonin Godard
AppliedApplied, thanks!
[1/6] ref-manual/variables.rst: update STAGING_DIR's description
commit: 0ff189fcb82f5e845951c939197835d0a1daf87b
[2/6] ref-manual/variables.rst: update COMPONENTS_DIR's description
commit: cad256411e2bc380e27e2fc4ea3140476596c823
[3/6] ref-manual/variables.rst: update PKGDATA_DIR's description
commit: a1432f24c94a26b372164704cf18b3c6a73b34f5
[4/6] ref-manual/variables.rst: update RECIPE_SYSROOT* descriptions
commit: eeb22235d5310ed440692914851df0b7aac056a4
[5/6] ref-manual/variables.rst: update STAGING_DIR* descriptions
commit: 15bbfeee88eee706e06b63116c9bf0cbfb2fd91c
[6/6] ref-manual/variables.rst: correct a reference to STAGING_DIR*
commit: 2da8e6334e3d3362c9177f78a1216156417903fc