summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/classes.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/ref-manual/classes.rst')
-rw-r--r--documentation/ref-manual/classes.rst89
1 files changed, 49 insertions, 40 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 9520d0bf7c..1d76b36d45 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -159,27 +159,38 @@ software that includes bash-completion data.
159``bin_package`` 159``bin_package``
160=============== 160===============
161 161
162The :ref:`ref-classes-bin-package` class is a helper class for recipes that extract the 162The :ref:`ref-classes-bin-package` class is a helper class for recipes, that
163contents of a binary package (e.g. an RPM) and install those contents 163disables the :ref:`ref-tasks-configure` and :ref:`ref-tasks-compile` tasks and
164rather than building the binary from source. The binary package is 164copies the content of the :term:`S` directory into the :term:`D` directory. This
165extracted and new packages in the configured output package format are 165is useful for installing binary packages (e.g. RPM packages) by passing the
166created. Extraction and installation of proprietary binaries is a good 166package in the :term:`SRC_URI` variable and inheriting this class.
167example use for this class.
168 167
169.. note:: 168For RPMs and other packages that do not contain a subdirectory, you should set
169the :term:`SRC_URI` option ``subdir`` to :term:`BP` so that the contents are
170extracted to the directory expected by the default value of :term:`S`. For
171example::
172
173 SRC_URI = "https://example.com/downloads/somepackage.rpm;subdir=${BP}"
174
175This class can also be used for tarballs. For example::
176
177 SRC_URI = "file://somepackage.tar.xz;subdir=${BP}"
178
179The :ref:`ref-classes-bin-package` class will copy the extracted content of the
180tarball from :term:`S` to :term:`D`.
170 181
171 For RPMs and other packages that do not contain a subdirectory, you 182This class assumes that the content of the package as installed in :term:`S`
172 should specify an appropriate fetcher parameter to point to the 183mirrors the expected layout once installed on the target, which is generally the
173 subdirectory. For example, if BitBake is using the Git fetcher (``git://``), 184case for binary packages. For example, an RPM package for a library would
174 the "subpath" parameter limits the checkout to a specific subpath 185usually contain the ``usr/lib`` directory, and should be extracted to
175 of the tree. Here is an example where ``${BP}`` is used so that the files 186``${S}/usr/lib/<library>.so.<version>`` to be installed in :term:`D` correctly.
176 are extracted into the subdirectory expected by the default value of
177 :term:`S`::
178 187
179 SRC_URI = "git://example.com/downloads/somepackage.rpm;branch=main;subpath=${BP}" 188.. note::
180 189
181 See the ":ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`" section in the BitBake User Manual for 190 The extraction of the package passed in :term:`SRC_URI` is not handled by the
182 more information on supported BitBake Fetchers. 191 :ref:`ref-classes-bin-package` class, but rather by the appropriate
192 :ref:`fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
193 depending on the file extension.
183 194
184.. _ref-classes-binconfig: 195.. _ref-classes-binconfig:
185 196
@@ -552,7 +563,7 @@ You can also look for vulnerabilities in specific packages by passing
552``-c cve_check`` to BitBake. 563``-c cve_check`` to BitBake.
553 564
554After building the software with Bitbake, CVE check output reports are available in ``tmp/deploy/cve`` 565After building the software with Bitbake, CVE check output reports are available in ``tmp/deploy/cve``
555and image specific summaries in ``tmp/deploy/images/*.cve`` or ``tmp/deploy/images/*.json`` files. 566and image specific summaries in ``tmp/deploy/images/*.json`` files.
556 567
557When building, the CVE checker will emit build time warnings for any detected 568When building, the CVE checker will emit build time warnings for any detected
558issues which are in the state ``Unpatched``, meaning that CVE issue seems to affect the software component 569issues which are in the state ``Unpatched``, meaning that CVE issue seems to affect the software component
@@ -1461,12 +1472,8 @@ The tests you can list with the :term:`WARN_QA` and
1461- ``patch-fuzz:`` Checks for fuzz in patch files that may allow 1472- ``patch-fuzz:`` Checks for fuzz in patch files that may allow
1462 them to apply incorrectly if the underlying code changes. 1473 them to apply incorrectly if the underlying code changes.
1463 1474
1464- ``patch-status-core:`` Checks that the Upstream-Status is specified 1475- ``patch-status:`` Checks that the ``Upstream-Status`` is specified and valid
1465 and valid in the headers of patches for recipes in the OE-Core layer. 1476 in the headers of patches for recipes.
1466
1467- ``patch-status-noncore:`` Checks that the Upstream-Status is specified
1468 and valid in the headers of patches for recipes in layers other than
1469 OE-Core.
1470 1477
1471- ``perllocalpod:`` Checks for ``perllocal.pod`` being erroneously 1478- ``perllocalpod:`` Checks for ``perllocal.pod`` being erroneously
1472 installed and packaged by a recipe. 1479 installed and packaged by a recipe.
@@ -1986,7 +1993,8 @@ a couple different ways:
1986 Not using this naming convention can lead to subtle problems 1993 Not using this naming convention can lead to subtle problems
1987 caused by existing code that depends on that naming convention. 1994 caused by existing code that depends on that naming convention.
1988 1995
1989- Create or modify a target recipe that contains the following:: 1996- Or, create a :ref:`ref-classes-native` variant of any target recipe (e.g.
1997 ``myrecipe.bb``) by adding the following to the recipe::
1990 1998
1991 BBCLASSEXTEND = "native" 1999 BBCLASSEXTEND = "native"
1992 2000
@@ -2017,24 +2025,25 @@ couple different ways:
2017 inherit statement in the recipe after all other inherit statements so 2025 inherit statement in the recipe after all other inherit statements so
2018 that the :ref:`ref-classes-nativesdk` class is inherited last. 2026 that the :ref:`ref-classes-nativesdk` class is inherited last.
2019 2027
2020- Create a :ref:`ref-classes-nativesdk` variant of any recipe by adding the following:: 2028 .. note::
2021 2029
2022 BBCLASSEXTEND = "nativesdk" 2030 When creating a recipe, you must follow this naming convention::
2023 2031
2024 Inside the 2032 nativesdk-myrecipe.bb
2025 recipe, use ``:class-nativesdk`` and ``:class-target`` overrides to
2026 specify any functionality specific to the respective SDK machine or
2027 target case.
2028 2033
2029.. note::
2030 2034
2031 When creating a recipe, you must follow this naming convention:: 2035 Not doing so can lead to subtle problems because there is code that
2036 depends on the naming convention.
2032 2037
2033 nativesdk-myrecipe.bb 2038- Or, create a :ref:`ref-classes-nativesdk` variant of any target recipe (e.g.
2039 ``myrecipe.bb``) by adding the following to the recipe::
2034 2040
2041 BBCLASSEXTEND = "nativesdk"
2035 2042
2036 Not doing so can lead to subtle problems because there is code that 2043 Inside the
2037 depends on the naming convention. 2044 recipe, use ``:class-nativesdk`` and ``:class-target`` overrides to
2045 specify any functionality specific to the respective SDK machine or
2046 target case.
2038 2047
2039Although applied differently, the :ref:`ref-classes-nativesdk` class is used with both 2048Although applied differently, the :ref:`ref-classes-nativesdk` class is used with both
2040methods. The advantage of the second method is that you do not need to 2049methods. The advantage of the second method is that you do not need to
@@ -2608,7 +2617,7 @@ runtime tests for recipes that build software that provides these tests.
2608This class is intended to be inherited by individual recipes. However, 2617This class is intended to be inherited by individual recipes. However,
2609the class' functionality is largely disabled unless "ptest" appears in 2618the class' functionality is largely disabled unless "ptest" appears in
2610:term:`DISTRO_FEATURES`. See the 2619:term:`DISTRO_FEATURES`. See the
2611":ref:`dev-manual/packages:testing packages with ptest`" 2620":ref:`test-manual/ptest:testing packages with ptest`"
2612section in the Yocto Project Development Tasks Manual for more information 2621section in the Yocto Project Development Tasks Manual for more information
2613on ptest. 2622on ptest.
2614 2623
@@ -2632,7 +2641,7 @@ Enables package tests (ptests) specifically for GNOME packages, which
2632have tests intended to be executed with ``gnome-desktop-testing``. 2641have tests intended to be executed with ``gnome-desktop-testing``.
2633 2642
2634For information on setting up and running ptests, see the 2643For information on setting up and running ptests, see the
2635":ref:`dev-manual/packages:testing packages with ptest`" 2644":ref:`test-manual/ptest:testing packages with ptest`"
2636section in the Yocto Project Development Tasks Manual. 2645section in the Yocto Project Development Tasks Manual.
2637 2646
2638.. _ref-classes-python3-dir: 2647.. _ref-classes-python3-dir:
@@ -3205,8 +3214,8 @@ after it is built, you can set :term:`TESTIMAGE_AUTO`::
3205 TESTIMAGE_AUTO = "1" 3214 TESTIMAGE_AUTO = "1"
3206 3215
3207For information on how to enable, run, and create new tests, see the 3216For information on how to enable, run, and create new tests, see the
3208":ref:`dev-manual/runtime-testing:performing automated runtime testing`" 3217":ref:`test-manual/runtime-testing:performing automated runtime testing`"
3209section in the Yocto Project Development Tasks Manual. 3218section in the Yocto Project Test Environment Manual.
3210 3219
3211.. _ref-classes-testsdk: 3220.. _ref-classes-testsdk:
3212 3221