summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/ref-classes.rst
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-14 22:48:44 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 10:09:35 +0100
commit292598164a304a3da3288e6fb8963f13045d1e7f (patch)
treeefedbbdc16cb2e0978a4d40e6a6294e32b0e496f /documentation/ref-manual/ref-classes.rst
parentd313d972bf592de77f2af13cb3fc4226247cb1a1 (diff)
downloadpoky-292598164a304a3da3288e6fb8963f13045d1e7f.tar.gz
sphinx: ref-manual links fixes and many other cleanups to import
(From yocto-docs rev: d079e418d5a81610e1f06a7a6ca45dd040c1402e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual/ref-classes.rst')
-rw-r--r--documentation/ref-manual/ref-classes.rst436
1 files changed, 258 insertions, 178 deletions
diff --git a/documentation/ref-manual/ref-classes.rst b/documentation/ref-manual/ref-classes.rst
index ace69e15a7..60ce8efd21 100644
--- a/documentation/ref-manual/ref-classes.rst
+++ b/documentation/ref-manual/ref-classes.rst
@@ -47,7 +47,7 @@ splitting out of debug symbols during packaging).
47 even if the recipes do not produce architecture-specific output. 47 even if the recipes do not produce architecture-specific output.
48 48
49 Configuring such recipes for all architectures causes the 49 Configuring such recipes for all architectures causes the
50 ```do_package_write_*`` <#ref-tasks-package_write_deb>`__ tasks to 50 ```do_package_write_*`` tasks to
51 have different signatures for the machines with different tunings. 51 have different signatures for the machines with different tunings.
52 Additionally, unnecessary rebuilds occur every time an image for a 52 Additionally, unnecessary rebuilds occur every time an image for a
53 different ``MACHINE`` is built even when the recipe never changes. 53 different ``MACHINE`` is built even when the recipe never changes.
@@ -67,9 +67,8 @@ inherit the ``allarch`` class.
67The ``archiver`` class supports releasing source code and other 67The ``archiver`` class supports releasing source code and other
68materials with the binaries. 68materials with the binaries.
69 69
70For more details on the source archiver, see the "`Maintaining Open 70For more details on the source archiver, see the
71Source License Compliance During Your Product's 71":ref:`dev-manual/dev-manual-common-tasks:maintaining open source license compliance during your product's lifecycle`"
72Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__"
73section in the Yocto Project Development Tasks Manual. You can also see 72section in the Yocto Project Development Tasks Manual. You can also see
74the :term:`ARCHIVER_MODE` variable for information 73the :term:`ARCHIVER_MODE` variable for information
75about the variable flags (varflags) that help control archive creation. 74about the variable flags (varflags) that help control archive creation.
@@ -86,8 +85,8 @@ standardization. This class defines a set of tasks (e.g. ``configure``,
86``compile`` and so forth) that work for all Autotooled packages. It 85``compile`` and so forth) that work for all Autotooled packages. It
87should usually be enough to define a few standard variables and then 86should usually be enough to define a few standard variables and then
88simply ``inherit autotools``. These classes can also work with software 87simply ``inherit autotools``. These classes can also work with software
89that emulates Autotools. For more information, see the "`Autotooled 88that emulates Autotools. For more information, see the
90Package <&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package>`__" section 89":ref:`new-recipe-autotooled-package`" section
91in the Yocto Project Development Tasks Manual. 90in the Yocto Project Development Tasks Manual.
92 91
93By default, the ``autotools*`` classes use out-of-tree builds (i.e. 92By default, the ``autotools*`` classes use out-of-tree builds (i.e.
@@ -177,7 +176,7 @@ example use for this class.
177 :: 176 ::
178 177
179 SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}" 178 SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}"
180 179
181 180
182 See the " 181 See the "
183 Fetchers 182 Fetchers
@@ -229,8 +228,10 @@ value as a variable flag (varflag) and provide a reason, which is
229reported, if the package is requested to be built as the value. For 228reported, if the package is requested to be built as the value. For
230example, if you want to blacklist a recipe called "exoticware", you add 229example, if you want to blacklist a recipe called "exoticware", you add
231the following to your ``local.conf`` or distribution configuration: 230the following to your ``local.conf`` or distribution configuration:
232INHERIT += "blacklist" PNBLACKLIST[exoticware] = "Not supported by our 231::
233organization." 232
233 INHERIT += "blacklist"
234 PNBLACKLIST[exoticware] = "Not supported by our organization."
234 235
235.. _ref-classes-buildhistory: 236.. _ref-classes-buildhistory:
236 237
@@ -240,8 +241,8 @@ organization."
240The ``buildhistory`` class records a history of build output metadata, 241The ``buildhistory`` class records a history of build output metadata,
241which can be used to detect possible regressions as well as used for 242which can be used to detect possible regressions as well as used for
242analysis of the build output. For more information on using Build 243analysis of the build output. For more information on using Build
243History, see the "`Maintaining Build Output 244History, see the
244Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__" 245":ref:`dev-manual/dev-manual-common-tasks:maintaining build output quality`"
245section in the Yocto Project Development Tasks Manual. 246section in the Yocto Project Development Tasks Manual.
246 247
247.. _ref-classes-buildstats: 248.. _ref-classes-buildstats:
@@ -411,8 +412,7 @@ cross-compilation tools.
411 412
412The ``cross-canadian`` class provides support for the recipes that build 413The ``cross-canadian`` class provides support for the recipes that build
413the Canadian Cross-compilation tools for SDKs. See the 414the Canadian Cross-compilation tools for SDKs. See the
414"`Cross-Development Toolchain 415":ref:`overview-manual/overview-manual-concepts:cross-development toolchain generation`"
415Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
416section in the Yocto Project Overview and Concepts Manual for more 416section in the Yocto Project Overview and Concepts Manual for more
417discussion on these cross-compilation tools. 417discussion on these cross-compilation tools.
418 418
@@ -423,8 +423,7 @@ discussion on these cross-compilation tools.
423 423
424The ``crosssdk`` class provides support for the recipes that build the 424The ``crosssdk`` class provides support for the recipes that build the
425cross-compilation tools used for building SDKs. See the 425cross-compilation tools used for building SDKs. See the
426"`Cross-Development Toolchain 426":ref:`overview-manual/overview-manual-concepts:cross-development toolchain generation`"
427Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
428section in the Yocto Project Overview and Concepts Manual for more 427section in the Yocto Project Overview and Concepts Manual for more
429discussion on these cross-compilation tools. 428discussion on these cross-compilation tools.
430 429
@@ -465,8 +464,7 @@ staging the files from ``DEPLOYDIR`` to ``DEPLOY_DIR_IMAGE``.
465==================== 464====================
466 465
467The ``devshell`` class adds the ``do_devshell`` task. Distribution 466The ``devshell`` class adds the ``do_devshell`` task. Distribution
468policy dictates whether to include this class. See the "`Using a 467policy dictates whether to include this class. See the ":ref:`platdev-appdev-devshell`"
469Development Shell <&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell>`__"
470section in the Yocto Project Development Tasks Manual for more 468section in the Yocto Project Development Tasks Manual for more
471information about using ``devshell``. 469information about using ``devshell``.
472 470
@@ -478,16 +476,26 @@ information about using ``devshell``.
478The ``devupstream`` class uses 476The ``devupstream`` class uses
479:term:`BBCLASSEXTEND` to add a variant of the 477:term:`BBCLASSEXTEND` to add a variant of the
480recipe that fetches from an alternative URI (e.g. Git) instead of a 478recipe that fetches from an alternative URI (e.g. Git) instead of a
481tarball. Following is an example: BBCLASSEXTEND = "devupstream:target" 479tarball. Following is an example:
482SRC_URI_class-devupstream = "git://git.example.com/example" 480::
483SRCREV_class-devupstream = "abcd1234" Adding the above statements to 481
484your recipe creates a variant that has 482 BBCLASSEXTEND = "devupstream:target"
483 SRC_URI_class-devupstream = "git://git.example.com/example"
484 SRCREV_class-devupstream = "abcd1234"
485
486Adding the above statements to your recipe creates a variant that has
485:term:`DEFAULT_PREFERENCE` set to "-1". 487:term:`DEFAULT_PREFERENCE` set to "-1".
486Consequently, you need to select the variant of the recipe to use it. 488Consequently, you need to select the variant of the recipe to use it.
487Any development-specific adjustments can be done by using the 489Any development-specific adjustments can be done by using the
488``class-devupstream`` override. Here is an example: 490``class-devupstream`` override. Here is an example:
489DEPENDS_append_class-devupstream = " gperf-native" 491::
490do_configure_prepend_class-devupstream() { touch ${S}/README } The class 492
493 DEPENDS_append_class-devupstream = " gperf-native"
494 do_configure_prepend_class-devupstream() {
495 touch ${S}/README
496 }
497
498The class
491currently only supports creating a development variant of the target 499currently only supports creating a development variant of the target
492recipe, not ``native`` or ``nativesdk`` variants. 500recipe, not ``native`` or ``nativesdk`` variants.
493 501
@@ -587,15 +595,19 @@ that use the :term:`B` variable to point to the directory in
587which the OpenEmbedded build system places the generated objects built 595which the OpenEmbedded build system places the generated objects built
588from the recipes. By default, the ``B`` directory is set to the 596from the recipes. By default, the ``B`` directory is set to the
589following, which is separate from the source directory (``S``): 597following, which is separate from the source directory (``S``):
590${WORKDIR}/${BPN}/{PV}/ See these variables for more information: 598::
599
600 ${WORKDIR}/${BPN}/{PV}/
601
602See these variables for more information:
591:term:`WORKDIR`, :term:`BPN`, and 603:term:`WORKDIR`, :term:`BPN`, and
592:term:`PV`, 604:term:`PV`,
593 605
594For more information on the ``externalsrc`` class, see the comments in 606For more information on the ``externalsrc`` class, see the comments in
595``meta/classes/externalsrc.bbclass`` in the :term:`Source Directory`. 607``meta/classes/externalsrc.bbclass`` in the :term:`Source Directory`.
596For information on how to use the 608For information on how to use the
597``externalsrc`` class, see the "`Building Software from an External 609``externalsrc`` class, see the
598Source <&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source>`__" 610":ref:`dev-manual/dev-manual-common-tasks:building software from an external source`"
599section in the Yocto Project Development Tasks Manual. 611section in the Yocto Project Development Tasks Manual.
600 612
601.. _ref-classes-extrausers: 613.. _ref-classes-extrausers:
@@ -619,15 +631,36 @@ be performed using the
619 useradd 631 useradd
620 class to add user and group configuration to a specific recipe. 632 class to add user and group configuration to a specific recipe.
621 633
622Here is an example that uses this class in an image recipe: inherit 634Here is an example that uses this class in an image recipe:
623extrausers EXTRA_USERS_PARAMS = "\\ useradd -p '' tester; \\ groupadd 635::
624developers; \\ userdel nobody; \\ groupdel -g video; \\ groupmod -g 1020 636
625developers; \\ usermod -s /bin/sh tester; \\ " Here is an example that 637 inherit extrausers
626adds two users named "tester-jim" and "tester-sue" and assigns 638 EXTRA_USERS_PARAMS = "\
627passwords: inherit extrausers EXTRA_USERS_PARAMS = "\\ useradd -P 639 useradd -p '' tester; \
628tester01 tester-jim; \\ useradd -P tester01 tester-sue; \\ " Finally, 640 groupadd developers; \
629here is an example that sets the root password to "1876*18": inherit 641 userdel nobody; \
630extrausers EXTRA_USERS_PARAMS = "\\ usermod -P 1876*18 root; \\ " 642 groupdel -g video; \
643 groupmod -g 1020 developers; \
644 usermod -s /bin/sh tester; \
645 "
646
647Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
648passwords:
649::
650
651 inherit extrausers
652 EXTRA_USERS_PARAMS = "\
653 useradd -P tester01 tester-jim; \
654 useradd -P tester01 tester-sue; \
655 "
656
657Finally, here is an example that sets the root password to "1876*18":
658::
659
660 inherit extrausers
661 EXTRA_USERS_PARAMS = "\
662 usermod -P 1876*18 root; \
663 "
631 664
632.. _ref-classes-fontcache: 665.. _ref-classes-fontcache:
633 666
@@ -837,8 +870,7 @@ provided by the recipe ``icecc-create-env-native.bb``.
837.. note:: 870.. note::
838 871
839 This script is a modified version and not the one that comes with 872 This script is a modified version and not the one that comes with
840 icecc 873 icecc.
841 .
842 874
843If you do not want the Icecream distributed compile support to apply to 875If you do not want the Icecream distributed compile support to apply to
844specific recipes or classes, you can effectively "blacklist" them by 876specific recipes or classes, you can effectively "blacklist" them by
@@ -863,10 +895,18 @@ At the distribution level, you can inherit the ``icecc`` class to be
863sure that all builders start with the same sstate signatures. After 895sure that all builders start with the same sstate signatures. After
864inheriting the class, you can then disable the feature by setting the 896inheriting the class, you can then disable the feature by setting the
865:term:`ICECC_DISABLED` variable to "1" as follows: 897:term:`ICECC_DISABLED` variable to "1" as follows:
866INHERIT_DISTRO_append = " icecc" ICECC_DISABLED ??= "1" This practice 898::
899
900 INHERIT_DISTRO_append = " icecc"
901 ICECC_DISABLED ??= "1"
902
903This practice
867makes sure everyone is using the same signatures but also requires 904makes sure everyone is using the same signatures but also requires
868individuals that do want to use Icecream to enable the feature 905individuals that do want to use Icecream to enable the feature
869individually as follows in your ``local.conf`` file: ICECC_DISABLED = "" 906individually as follows in your ``local.conf`` file:
907::
908
909 ICECC_DISABLED = ""
870 910
871.. _ref-classes-image: 911.. _ref-classes-image:
872 912
@@ -884,11 +924,11 @@ then one or more image files are created.
884- The ``IMAGE_INSTALL`` variable controls the list of packages to 924- The ``IMAGE_INSTALL`` variable controls the list of packages to
885 install into the image. 925 install into the image.
886 926
887For information on customizing images, see the "`Customizing 927For information on customizing images, see the
888Images <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage>`__" section 928":ref:`usingpoky-extend-customimage`" section
889in the Yocto Project Development Tasks Manual. For information on how 929in the Yocto Project Development Tasks Manual. For information on how
890images are created, see the 930images are created, see the
891"`Images <&YOCTO_DOCS_OM_URL;#images-dev-environment>`__" section in the 931":ref:`images-dev-environment`" section in the
892Yocto Project Overview and Concpets Manual. 932Yocto Project Overview and Concpets Manual.
893 933
894.. _ref-classes-image-buildinfo: 934.. _ref-classes-image-buildinfo:
@@ -912,19 +952,19 @@ types.
912 952
913By default, the :ref:`image <ref-classes-image>` class automatically 953By default, the :ref:`image <ref-classes-image>` class automatically
914enables the ``image_types`` class. The ``image`` class uses the 954enables the ``image_types`` class. The ``image`` class uses the
915``IMGCLASSES`` variable as follows: IMGCLASSES = 955``IMGCLASSES`` variable as follows:
916"rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" IMGCLASSES += 956::
917"${@['populate_sdk_base', 'populate_sdk_ext']['linux' in 957
918d.getVar("SDK_OS")]}" IMGCLASSES += 958 IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}"
919"${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 959 IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}"
920'image-live', '', d)}" IMGCLASSES += 960 IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}"
921"${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', 961 IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}"
922'', d)}" IMGCLASSES += "image_types_wic" IMGCLASSES += 962 IMGCLASSES += "image_types_wic"
923"rootfs-postcommands" IMGCLASSES += "image-postinst-intercepts" inherit 963 IMGCLASSES += "rootfs-postcommands"
924${IMGCLASSES} 964 IMGCLASSES += "image-postinst-intercepts"
925 965 inherit ${IMGCLASSES}
926The ``image_types`` class also handles conversion and compression of 966
927images. 967The ``image_types`` class also handles conversion and compression of images.
928 968
929.. note:: 969.. note::
930 970
@@ -957,7 +997,9 @@ the size of libraries contained in the image.
957 997
958By default, the class is enabled in the ``local.conf.template`` using 998By default, the class is enabled in the ``local.conf.template`` using
959the :term:`USER_CLASSES` variable as follows: 999the :term:`USER_CLASSES` variable as follows:
960USER_CLASSES ?= "buildstats image-mklibs image-prelink" 1000::
1001
1002 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
961 1003
962.. _ref-classes-image-prelink: 1004.. _ref-classes-image-prelink:
963 1005
@@ -971,7 +1013,9 @@ time.
971 1013
972By default, the class is enabled in the ``local.conf.template`` using 1014By default, the class is enabled in the ``local.conf.template`` using
973the :term:`USER_CLASSES` variable as follows: 1015the :term:`USER_CLASSES` variable as follows:
974USER_CLASSES ?= "buildstats image-mklibs image-prelink" 1016::
1017
1018 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
975 1019
976.. _ref-classes-insane: 1020.. _ref-classes-insane:
977 1021
@@ -1000,32 +1044,36 @@ should use :term:`INSANE_SKIP`. For example, to skip
1000the check for symbolic link ``.so`` files in the main package of a 1044the check for symbolic link ``.so`` files in the main package of a
1001recipe, add the following to the recipe. You need to realize that the 1045recipe, add the following to the recipe. You need to realize that the
1002package name override, in this example ``${PN}``, must be used: 1046package name override, in this example ``${PN}``, must be used:
1003INSANE_SKIP_${PN} += "dev-so" Please keep in mind that the QA checks 1047::
1048
1049 INSANE_SKIP_${PN} += "dev-so"
1050
1051Please keep in mind that the QA checks
1004exist in order to detect real or potential problems in the packaged 1052exist in order to detect real or potential problems in the packaged
1005output. So exercise caution when disabling these checks. 1053output. So exercise caution when disabling these checks.
1006 1054
1007The following list shows the tests you can list with the ``WARN_QA`` and 1055The following list shows the tests you can list with the ``WARN_QA`` and
1008``ERROR_QA`` variables: 1056``ERROR_QA`` variables:
1009 1057
1010- *``already-stripped:``* Checks that produced binaries have not 1058- ``already-stripped:`` Checks that produced binaries have not
1011 already been stripped prior to the build system extracting debug 1059 already been stripped prior to the build system extracting debug
1012 symbols. It is common for upstream software projects to default to 1060 symbols. It is common for upstream software projects to default to
1013 stripping debug symbols for output binaries. In order for debugging 1061 stripping debug symbols for output binaries. In order for debugging
1014 to work on the target using ``-dbg`` packages, this stripping must be 1062 to work on the target using ``-dbg`` packages, this stripping must be
1015 disabled. 1063 disabled.
1016 1064
1017- *``arch:``* Checks the Executable and Linkable Format (ELF) type, bit 1065- ``arch:`` Checks the Executable and Linkable Format (ELF) type, bit
1018 size, and endianness of any binaries to ensure they match the target 1066 size, and endianness of any binaries to ensure they match the target
1019 architecture. This test fails if any binaries do not match the type 1067 architecture. This test fails if any binaries do not match the type
1020 since there would be an incompatibility. The test could indicate that 1068 since there would be an incompatibility. The test could indicate that
1021 the wrong compiler or compiler options have been used. Sometimes 1069 the wrong compiler or compiler options have been used. Sometimes
1022 software, like bootloaders, might need to bypass this check. 1070 software, like bootloaders, might need to bypass this check.
1023 1071
1024- *``buildpaths:``* Checks for paths to locations on the build host 1072- ``buildpaths:`` Checks for paths to locations on the build host
1025 inside the output files. Currently, this test triggers too many false 1073 inside the output files. Currently, this test triggers too many false
1026 positives and thus is not normally enabled. 1074 positives and thus is not normally enabled.
1027 1075
1028- *``build-deps:``* Determines if a build-time dependency that is 1076- ``build-deps:`` Determines if a build-time dependency that is
1029 specified through :term:`DEPENDS`, explicit 1077 specified through :term:`DEPENDS`, explicit
1030 :term:`RDEPENDS`, or task-level dependencies exists 1078 :term:`RDEPENDS`, or task-level dependencies exists
1031 to match any runtime dependency. This determination is particularly 1079 to match any runtime dependency. This determination is particularly
@@ -1045,20 +1093,20 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1045 ``initscripts`` recipe is actually built and thus the 1093 ``initscripts`` recipe is actually built and thus the
1046 ``initscripts-functions`` package is made available. 1094 ``initscripts-functions`` package is made available.
1047 1095
1048- *``compile-host-path:``* Checks the 1096- ``compile-host-path:`` Checks the
1049 :ref:`ref-tasks-compile` log for indications that 1097 :ref:`ref-tasks-compile` log for indications that
1050 paths to locations on the build host were used. Using such paths 1098 paths to locations on the build host were used. Using such paths
1051 might result in host contamination of the build output. 1099 might result in host contamination of the build output.
1052 1100
1053- *``debug-deps:``* Checks that all packages except ``-dbg`` packages 1101- ``debug-deps:`` Checks that all packages except ``-dbg`` packages
1054 do not depend on ``-dbg`` packages, which would cause a packaging 1102 do not depend on ``-dbg`` packages, which would cause a packaging
1055 bug. 1103 bug.
1056 1104
1057- *``debug-files:``* Checks for ``.debug`` directories in anything but 1105- ``debug-files:`` Checks for ``.debug`` directories in anything but
1058 the ``-dbg`` package. The debug files should all be in the ``-dbg`` 1106 the ``-dbg`` package. The debug files should all be in the ``-dbg``
1059 package. Thus, anything packaged elsewhere is incorrect packaging. 1107 package. Thus, anything packaged elsewhere is incorrect packaging.
1060 1108
1061- *``dep-cmp:``* Checks for invalid version comparison statements in 1109- ``dep-cmp:`` Checks for invalid version comparison statements in
1062 runtime dependency relationships between packages (i.e. in 1110 runtime dependency relationships between packages (i.e. in
1063 :term:`RDEPENDS`, 1111 :term:`RDEPENDS`,
1064 :term:`RRECOMMENDS`, 1112 :term:`RRECOMMENDS`,
@@ -1069,22 +1117,22 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1069 comparisons might trigger failures or undesirable behavior when 1117 comparisons might trigger failures or undesirable behavior when
1070 passed to the package manager. 1118 passed to the package manager.
1071 1119
1072- *``desktop:``* Runs the ``desktop-file-validate`` program against any 1120- ``desktop:`` Runs the ``desktop-file-validate`` program against any
1073 ``.desktop`` files to validate their contents against the 1121 ``.desktop`` files to validate their contents against the
1074 specification for ``.desktop`` files. 1122 specification for ``.desktop`` files.
1075 1123
1076- *``dev-deps:``* Checks that all packages except ``-dev`` or 1124- ``dev-deps:`` Checks that all packages except ``-dev`` or
1077 ``-staticdev`` packages do not depend on ``-dev`` packages, which 1125 ``-staticdev`` packages do not depend on ``-dev`` packages, which
1078 would be a packaging bug. 1126 would be a packaging bug.
1079 1127
1080- *``dev-so:``* Checks that the ``.so`` symbolic links are in the 1128- ``dev-so:`` Checks that the ``.so`` symbolic links are in the
1081 ``-dev`` package and not in any of the other packages. In general, 1129 ``-dev`` package and not in any of the other packages. In general,
1082 these symlinks are only useful for development purposes. Thus, the 1130 these symlinks are only useful for development purposes. Thus, the
1083 ``-dev`` package is the correct location for them. Some very rare 1131 ``-dev`` package is the correct location for them. Some very rare
1084 cases do exist for dynamically loaded modules where these symlinks 1132 cases do exist for dynamically loaded modules where these symlinks
1085 are needed instead in the main package. 1133 are needed instead in the main package.
1086 1134
1087- *``file-rdeps:``* Checks that file-level dependencies identified by 1135- ``file-rdeps:`` Checks that file-level dependencies identified by
1088 the OpenEmbedded build system at packaging time are satisfied. For 1136 the OpenEmbedded build system at packaging time are satisfied. For
1089 example, a shell script might start with the line ``#!/bin/bash``. 1137 example, a shell script might start with the line ``#!/bin/bash``.
1090 This line would translate to a file dependency on ``/bin/bash``. Of 1138 This line would translate to a file dependency on ``/bin/bash``. Of
@@ -1097,10 +1145,10 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1097 :term:`RDEPENDS` exist to handle any file-level 1145 :term:`RDEPENDS` exist to handle any file-level
1098 dependency detected in packaged files. 1146 dependency detected in packaged files.
1099 1147
1100- *``files-invalid:``* Checks for :term:`FILES` variable 1148- ``files-invalid:`` Checks for :term:`FILES` variable
1101 values that contain "//", which is invalid. 1149 values that contain "//", which is invalid.
1102 1150
1103- *``host-user-contaminated:``* Checks that no package produced by the 1151- ``host-user-contaminated:`` Checks that no package produced by the
1104 recipe contains any files outside of ``/home`` with a user or group 1152 recipe contains any files outside of ``/home`` with a user or group
1105 ID that matches the user running BitBake. A match usually indicates 1153 ID that matches the user running BitBake. A match usually indicates
1106 that the files are being installed with an incorrect UID/GID, since 1154 that the files are being installed with an incorrect UID/GID, since
@@ -1108,16 +1156,16 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1108 see the section describing the 1156 see the section describing the
1109 :ref:`ref-tasks-install` task. 1157 :ref:`ref-tasks-install` task.
1110 1158
1111- *``incompatible-license:``* Report when packages are excluded from 1159- ``incompatible-license:`` Report when packages are excluded from
1112 being created due to being marked with a license that is in 1160 being created due to being marked with a license that is in
1113 :term:`INCOMPATIBLE_LICENSE`. 1161 :term:`INCOMPATIBLE_LICENSE`.
1114 1162
1115- *``install-host-path:``* Checks the 1163- ``install-host-path:`` Checks the
1116 :ref:`ref-tasks-install` log for indications that 1164 :ref:`ref-tasks-install` log for indications that
1117 paths to locations on the build host were used. Using such paths 1165 paths to locations on the build host were used. Using such paths
1118 might result in host contamination of the build output. 1166 might result in host contamination of the build output.
1119 1167
1120- *``installed-vs-shipped:``* Reports when files have been installed 1168- ``installed-vs-shipped:`` Reports when files have been installed
1121 within ``do_install`` but have not been included in any package by 1169 within ``do_install`` but have not been included in any package by
1122 way of the :term:`FILES` variable. Files that do not 1170 way of the :term:`FILES` variable. Files that do not
1123 appear in any package cannot be present in an image later on in the 1171 appear in any package cannot be present in an image later on in the
@@ -1125,67 +1173,69 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1125 installed at all. These files can be deleted at the end of 1173 installed at all. These files can be deleted at the end of
1126 ``do_install`` if the files are not needed in any package. 1174 ``do_install`` if the files are not needed in any package.
1127 1175
1128- *``invalid-chars:``* Checks that the recipe metadata variables 1176- ``invalid-chars:`` Checks that the recipe metadata variables
1129 :term:`DESCRIPTION`, 1177 :term:`DESCRIPTION`,
1130 :term:`SUMMARY`, :term:`LICENSE`, and 1178 :term:`SUMMARY`, :term:`LICENSE`, and
1131 :term:`SECTION` do not contain non-UTF-8 characters. 1179 :term:`SECTION` do not contain non-UTF-8 characters.
1132 Some package managers do not support such characters. 1180 Some package managers do not support such characters.
1133 1181
1134- *``invalid-packageconfig:``* Checks that no undefined features are 1182- ``invalid-packageconfig:`` Checks that no undefined features are
1135 being added to :term:`PACKAGECONFIG`. For 1183 being added to :term:`PACKAGECONFIG`. For
1136 example, any name "foo" for which the following form does not exist: 1184 example, any name "foo" for which the following form does not exist:
1137 PACKAGECONFIG[foo] = "..." 1185 ::
1186
1187 PACKAGECONFIG[foo] = "..."
1138 1188
1139- *``la:``* Checks ``.la`` files for any ``TMPDIR`` paths. Any ``.la`` 1189- ``la:`` Checks ``.la`` files for any ``TMPDIR`` paths. Any ``.la``
1140 file containing these paths is incorrect since ``libtool`` adds the 1190 file containing these paths is incorrect since ``libtool`` adds the
1141 correct sysroot prefix when using the files automatically itself. 1191 correct sysroot prefix when using the files automatically itself.
1142 1192
1143- *``ldflags:``* Ensures that the binaries were linked with the 1193- ``ldflags:`` Ensures that the binaries were linked with the
1144 :term:`LDFLAGS` options provided by the build system. 1194 :term:`LDFLAGS` options provided by the build system.
1145 If this test fails, check that the ``LDFLAGS`` variable is being 1195 If this test fails, check that the ``LDFLAGS`` variable is being
1146 passed to the linker command. 1196 passed to the linker command.
1147 1197
1148- *``libdir:``* Checks for libraries being installed into incorrect 1198- ``libdir:`` Checks for libraries being installed into incorrect
1149 (possibly hardcoded) installation paths. For example, this test will 1199 (possibly hardcoded) installation paths. For example, this test will
1150 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is 1200 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
1151 "lib32". Another example is when recipes install 1201 "lib32". Another example is when recipes install
1152 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". 1202 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib".
1153 1203
1154- *``libexec:``* Checks if a package contains files in 1204- ``libexec:`` Checks if a package contains files in
1155 ``/usr/libexec``. This check is not performed if the ``libexecdir`` 1205 ``/usr/libexec``. This check is not performed if the ``libexecdir``
1156 variable has been set explicitly to ``/usr/libexec``. 1206 variable has been set explicitly to ``/usr/libexec``.
1157 1207
1158- *``packages-list:``* Checks for the same package being listed 1208- ``packages-list:`` Checks for the same package being listed
1159 multiple times through the :term:`PACKAGES` variable 1209 multiple times through the :term:`PACKAGES` variable
1160 value. Installing the package in this manner can cause errors during 1210 value. Installing the package in this manner can cause errors during
1161 packaging. 1211 packaging.
1162 1212
1163- *``perm-config:``* Reports lines in ``fs-perms.txt`` that have an 1213- ``perm-config:`` Reports lines in ``fs-perms.txt`` that have an
1164 invalid format. 1214 invalid format.
1165 1215
1166- *``perm-line:``* Reports lines in ``fs-perms.txt`` that have an 1216- ``perm-line:`` Reports lines in ``fs-perms.txt`` that have an
1167 invalid format. 1217 invalid format.
1168 1218
1169- *``perm-link:``* Reports lines in ``fs-perms.txt`` that specify 1219- ``perm-link:`` Reports lines in ``fs-perms.txt`` that specify
1170 'link' where the specified target already exists. 1220 'link' where the specified target already exists.
1171 1221
1172- *``perms:``* Currently, this check is unused but reserved. 1222- ``perms:`` Currently, this check is unused but reserved.
1173 1223
1174- *``pkgconfig:``* Checks ``.pc`` files for any 1224- ``pkgconfig:`` Checks ``.pc`` files for any
1175 :term:`TMPDIR`/:term:`WORKDIR` paths. 1225 :term:`TMPDIR`/:term:`WORKDIR` paths.
1176 Any ``.pc`` file containing these paths is incorrect since 1226 Any ``.pc`` file containing these paths is incorrect since
1177 ``pkg-config`` itself adds the correct sysroot prefix when the files 1227 ``pkg-config`` itself adds the correct sysroot prefix when the files
1178 are accessed. 1228 are accessed.
1179 1229
1180- *``pkgname:``* Checks that all packages in 1230- ``pkgname:`` Checks that all packages in
1181 :term:`PACKAGES` have names that do not contain 1231 :term:`PACKAGES` have names that do not contain
1182 invalid characters (i.e. characters other than 0-9, a-z, ., +, and 1232 invalid characters (i.e. characters other than 0-9, a-z, ., +, and
1183 -). 1233 -).
1184 1234
1185- *``pkgv-undefined:``* Checks to see if the ``PKGV`` variable is 1235- ``pkgv-undefined:`` Checks to see if the ``PKGV`` variable is
1186 undefined during :ref:`ref-tasks-package`. 1236 undefined during :ref:`ref-tasks-package`.
1187 1237
1188- *``pkgvarcheck:``* Checks through the variables 1238- ``pkgvarcheck:`` Checks through the variables
1189 :term:`RDEPENDS`, 1239 :term:`RDEPENDS`,
1190 :term:`RRECOMMENDS`, 1240 :term:`RRECOMMENDS`,
1191 :term:`RSUGGESTS`, 1241 :term:`RSUGGESTS`,
@@ -1199,7 +1249,7 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1199 unnecessarily complicate dependencies of other packages within the 1249 unnecessarily complicate dependencies of other packages within the
1200 same recipe or have other unintended consequences. 1250 same recipe or have other unintended consequences.
1201 1251
1202- *``pn-overrides:``* Checks that a recipe does not have a name 1252- ``pn-overrides:`` Checks that a recipe does not have a name
1203 (:term:`PN`) value that appears in 1253 (:term:`PN`) value that appears in
1204 :term:`OVERRIDES`. If a recipe is named such that 1254 :term:`OVERRIDES`. If a recipe is named such that
1205 its ``PN`` value matches something already in ``OVERRIDES`` (e.g. 1255 its ``PN`` value matches something already in ``OVERRIDES`` (e.g.
@@ -1208,43 +1258,43 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1208 For example, assignments such as ``FILES_${PN} = "xyz"`` effectively 1258 For example, assignments such as ``FILES_${PN} = "xyz"`` effectively
1209 turn into ``FILES = "xyz"``. 1259 turn into ``FILES = "xyz"``.
1210 1260
1211- *``rpaths:``* Checks for rpaths in the binaries that contain build 1261- ``rpaths:`` Checks for rpaths in the binaries that contain build
1212 system paths such as ``TMPDIR``. If this test fails, bad ``-rpath`` 1262 system paths such as ``TMPDIR``. If this test fails, bad ``-rpath``
1213 options are being passed to the linker commands and your binaries 1263 options are being passed to the linker commands and your binaries
1214 have potential security issues. 1264 have potential security issues.
1215 1265
1216- *``split-strip:``* Reports that splitting or stripping debug symbols 1266- ``split-strip:`` Reports that splitting or stripping debug symbols
1217 from binaries has failed. 1267 from binaries has failed.
1218 1268
1219- *``staticdev:``* Checks for static library files (``*.a``) in 1269- ``staticdev:`` Checks for static library files (``*.a``) in
1220 non-``staticdev`` packages. 1270 non-``staticdev`` packages.
1221 1271
1222- *``symlink-to-sysroot:``* Checks for symlinks in packages that point 1272- ``symlink-to-sysroot:`` Checks for symlinks in packages that point
1223 into :term:`TMPDIR` on the host. Such symlinks will 1273 into :term:`TMPDIR` on the host. Such symlinks will
1224 work on the host, but are clearly invalid when running on the target. 1274 work on the host, but are clearly invalid when running on the target.
1225 1275
1226- *``textrel:``* Checks for ELF binaries that contain relocations in 1276- ``textrel:`` Checks for ELF binaries that contain relocations in
1227 their ``.text`` sections, which can result in a performance impact at 1277 their ``.text`` sections, which can result in a performance impact at
1228 runtime. See the explanation for the 1278 runtime. See the explanation for the
1229 ```ELF binary`` <#qa-issue-textrel>`__ message for more information 1279 ```ELF binary`` <#qa-issue-textrel>`__ message for more information
1230 regarding runtime performance issues. 1280 regarding runtime performance issues.
1231 1281
1232- *``unlisted-pkg-lics:``* Checks that all declared licenses applying 1282- ``unlisted-pkg-lics:`` Checks that all declared licenses applying
1233 for a package are also declared on the recipe level (i.e. any license 1283 for a package are also declared on the recipe level (i.e. any license
1234 in ``LICENSE_*`` should appear in :term:`LICENSE`). 1284 in ``LICENSE_*`` should appear in :term:`LICENSE`).
1235 1285
1236- *``useless-rpaths:``* Checks for dynamic library load paths (rpaths) 1286- ``useless-rpaths:`` Checks for dynamic library load paths (rpaths)
1237 in the binaries that by default on a standard system are searched by 1287 in the binaries that by default on a standard system are searched by
1238 the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will 1288 the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will
1239 not cause any breakage, they do waste space and are unnecessary. 1289 not cause any breakage, they do waste space and are unnecessary.
1240 1290
1241- *``var-undefined:``* Reports when variables fundamental to packaging 1291- ``var-undefined:`` Reports when variables fundamental to packaging
1242 (i.e. :term:`WORKDIR`, 1292 (i.e. :term:`WORKDIR`,
1243 :term:`DEPLOY_DIR`, :term:`D`, 1293 :term:`DEPLOY_DIR`, :term:`D`,
1244 :term:`PN`, and :term:`PKGD`) are undefined 1294 :term:`PN`, and :term:`PKGD`) are undefined
1245 during :ref:`ref-tasks-package`. 1295 during :ref:`ref-tasks-package`.
1246 1296
1247- *``version-going-backwards:``* If Build History is enabled, reports 1297- ``version-going-backwards:`` If Build History is enabled, reports
1248 when a package being written out has a lower version than the 1298 when a package being written out has a lower version than the
1249 previously written package under the same name. If you are placing 1299 previously written package under the same name. If you are placing
1250 output packages into a feed and upgrading packages on a target system 1300 output packages into a feed and upgrading packages on a target system
@@ -1257,7 +1307,7 @@ The following list shows the tests you can list with the ``WARN_QA`` and
1257 If you are not using runtime package management on your target 1307 If you are not using runtime package management on your target
1258 system, then you do not need to worry about this situation. 1308 system, then you do not need to worry about this situation.
1259 1309
1260- *``xorg-driver-abi:``* Checks that all packages containing Xorg 1310- ``xorg-driver-abi:`` Checks that all packages containing Xorg
1261 drivers have ABI dependencies. The ``xserver-xorg`` recipe provides 1311 drivers have ABI dependencies. The ``xserver-xorg`` recipe provides
1262 driver ABI names. All drivers should depend on the ABI versions that 1312 driver ABI names. All drivers should depend on the ABI versions that
1263 they have been built against. Driver recipes that include 1313 they have been built against. Driver recipes that include
@@ -1293,9 +1343,8 @@ packages such as ``kernel-vmlinux``.
1293 1343
1294The ``kernel`` class contains logic that allows you to embed an initial 1344The ``kernel`` class contains logic that allows you to embed an initial
1295RAM filesystem (initramfs) image when you build the kernel image. For 1345RAM filesystem (initramfs) image when you build the kernel image. For
1296information on how to build an initramfs, see the "`Building an Initial 1346information on how to build an initramfs, see the
1297RAM Filesystem (initramfs) 1347":ref:`building-an-initramfs-image`" section in
1298Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__" section in
1299the Yocto Project Development Tasks Manual. 1348the Yocto Project Development Tasks Manual.
1300 1349
1301Various other classes are used by the ``kernel`` and ``module`` classes 1350Various other classes are used by the ``kernel`` and ``module`` classes
@@ -1545,8 +1594,7 @@ and implements the :ref:`ref-tasks-compile` and
1545everything needed to build and package a kernel module. 1594everything needed to build and package a kernel module.
1546 1595
1547For general information on out-of-tree Linux kernel modules, see the 1596For general information on out-of-tree Linux kernel modules, see the
1548"`Incorporating Out-of-Tree 1597":ref:`kernel-dev/kernel-dev-common:incorporating out-of-tree modules`"
1549Modules <&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules>`__"
1550section in the Yocto Project Linux Kernel Development Manual. 1598section in the Yocto Project Linux Kernel Development Manual.
1551 1599
1552.. _ref-classes-module-base: 1600.. _ref-classes-module-base:
@@ -1569,9 +1617,8 @@ The ``multilib*`` classes provide support for building libraries with
1569different target optimizations or target architectures and installing 1617different target optimizations or target architectures and installing
1570them side-by-side in the same image. 1618them side-by-side in the same image.
1571 1619
1572For more information on using the Multilib feature, see the "`Combining 1620For more information on using the Multilib feature, see the
1573Multiple Versions of Library Files into One 1621":ref:`combining-multiple-versions-library-files-into-one-image`"
1574Image <&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image>`__"
1575section in the Yocto Project Development Tasks Manual. 1622section in the Yocto Project Development Tasks Manual.
1576 1623
1577.. _ref-classes-native: 1624.. _ref-classes-native:
@@ -1597,14 +1644,18 @@ a couple different ways:
1597 naming convention: 1644 naming convention:
1598 :: 1645 ::
1599 1646
1600 myrecipe-native.bb 1647 myrecipe-native.bb
1601 1648
1602 1649
1603 Not using this naming convention can lead to subtle problems 1650 Not using this naming convention can lead to subtle problems
1604 caused by existing code that depends on that naming convention. 1651 caused by existing code that depends on that naming convention.
1605 1652
1606- Create or modify a target recipe that contains the following: 1653- Create or modify a target recipe that contains the following:
1607 :term:`BBCLASSEXTEND` = "native" Inside the 1654 ::
1655
1656 BBCLASSEXTEND = "native"
1657
1658 Inside the
1608 recipe, use ``_class-native`` and ``_class-target`` overrides to 1659 recipe, use ``_class-native`` and ``_class-target`` overrides to
1609 specify any functionality specific to the respective native or target 1660 specify any functionality specific to the respective native or target
1610 case. 1661 case.
@@ -1632,7 +1683,11 @@ couple different ways:
1632 that the ``nativesdk`` class is inherited last. 1683 that the ``nativesdk`` class is inherited last.
1633 1684
1634- Create a ``nativesdk`` variant of any recipe by adding the following: 1685- Create a ``nativesdk`` variant of any recipe by adding the following:
1635 :term:`BBCLASSEXTEND` = "nativesdk" Inside the 1686 ::
1687
1688 BBCLASSEXTEND = "nativesdk"
1689
1690 Inside the
1636 recipe, use ``_class-nativesdk`` and ``_class-target`` overrides to 1691 recipe, use ``_class-nativesdk`` and ``_class-target`` overrides to
1637 specify any functionality specific to the respective SDK machine or 1692 specify any functionality specific to the respective SDK machine or
1638 target case. 1693 target case.
@@ -1643,7 +1698,7 @@ couple different ways:
1643 :: 1698 ::
1644 1699
1645 nativesdk-myrecipe.bb 1700 nativesdk-myrecipe.bb
1646 1701
1647 1702
1648 Not doing so can lead to subtle problems because code exists that 1703 Not doing so can lead to subtle problems because code exists that
1649 depends on the naming convention. 1704 depends on the naming convention.
@@ -1675,9 +1730,8 @@ package manager (NPM) <https://en.wikipedia.org/wiki/Npm_(software)>`__.
1675 npm:// 1730 npm://
1676 fetcher to have dependencies fetched and packaged automatically. 1731 fetcher to have dependencies fetched and packaged automatically.
1677 1732
1678For information on how to create NPM packages, see the "`Creating Node 1733For information on how to create NPM packages, see the
1679Package Manager (NPM) 1734":ref:`dev-manual/dev-manual-common-tasks:creating node package manager (npm) packages`"
1680Packages <&YOCTO_DOCS_DEV_URL;#creating-node-package-manager-npm-packages>`__"
1681section in the Yocto Project Development Tasks Manual. 1735section in the Yocto Project Development Tasks Manual.
1682 1736
1683.. _ref-classes-oelint: 1737.. _ref-classes-oelint:
@@ -1706,8 +1760,12 @@ before attempting to fetch it from the upstream specified in
1706 1760
1707To use this class, inherit it globally and specify 1761To use this class, inherit it globally and specify
1708:term:`SOURCE_MIRROR_URL`. Here is an example: 1762:term:`SOURCE_MIRROR_URL`. Here is an example:
1709INHERIT += "own-mirrors" SOURCE_MIRROR_URL = 1763::
1710"http://example.com/my-source-mirror" You can specify only a single URL 1764
1765 INHERIT += "own-mirrors"
1766 SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
1767
1768You can specify only a single URL
1711in ``SOURCE_MIRROR_URL``. 1769in ``SOURCE_MIRROR_URL``.
1712 1770
1713.. _ref-classes-package: 1771.. _ref-classes-package:
@@ -1742,9 +1800,8 @@ first class listed in this variable is used for image generation.
1742If you take the optional step to set up a repository (package feed) on 1800If you take the optional step to set up a repository (package feed) on
1743the development host that can be used by DNF, you can install packages 1801the development host that can be used by DNF, you can install packages
1744from the feed while you are running the image on the target (i.e. 1802from the feed while you are running the image on the target (i.e.
1745runtime installation of packages). For more information, see the "`Using 1803runtime installation of packages). For more information, see the
1746Runtime Package 1804":ref:`dev-manual/dev-manual-common-tasks:using runtime package management`"
1747Management <&YOCTO_DOCS_DEV_URL;#using-runtime-package-management>`__"
1748section in the Yocto Project Development Tasks Manual. 1805section in the Yocto Project Development Tasks Manual.
1749 1806
1750The package-specific class you choose can affect build-time performance 1807The package-specific class you choose can affect build-time performance
@@ -1774,9 +1831,9 @@ consider some further things about using RPM:
1774You can find additional information on the effects of the package class 1831You can find additional information on the effects of the package class
1775at these two Yocto Project mailing list links: 1832at these two Yocto Project mailing list links:
1776 1833
1777- `https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html <&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html>`__ 1834- https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html
1778 1835
1779- `https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html <&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html>`__ 1836- https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html
1780 1837
1781.. _ref-classes-package_deb: 1838.. _ref-classes-package_deb:
1782 1839
@@ -1870,9 +1927,8 @@ group recipes (e.g. ``PACKAGES``, ``PACKAGE_ARCH``, ``ALLOW_EMPTY``, and
1870so forth). It is highly recommended that all package group recipes 1927so forth). It is highly recommended that all package group recipes
1871inherit this class. 1928inherit this class.
1872 1929
1873For information on how to use this class, see the "`Customizing Images 1930For information on how to use this class, see the
1874Using Custom Package 1931":ref:`usingpoky-extend-customimage-customtasks`"
1875Groups <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks>`__"
1876section in the Yocto Project Development Tasks Manual. 1932section in the Yocto Project Development Tasks Manual.
1877 1933
1878Previously, this class was called the ``task`` class. 1934Previously, this class was called the ``task`` class.
@@ -1937,8 +1993,7 @@ files.
1937The ``populate_sdk`` class provides support for SDK-only recipes. For 1993The ``populate_sdk`` class provides support for SDK-only recipes. For
1938information on advantages gained when building a cross-development 1994information on advantages gained when building a cross-development
1939toolchain using the :ref:`ref-tasks-populate_sdk` 1995toolchain using the :ref:`ref-tasks-populate_sdk`
1940task, see the "`Building an SDK 1996task, see the ":ref:`sdk-manual/sdk-appendix-obtain:building an sdk installer`"
1941Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__"
1942section in the Yocto Project Application Development and the Extensible 1997section in the Yocto Project Application Development and the Extensible
1943Software Development Kit (eSDK) manual. 1998Software Development Kit (eSDK) manual.
1944 1999
@@ -1950,19 +2005,19 @@ Software Development Kit (eSDK) manual.
1950The ``populate_sdk_*`` classes support SDK creation and consist of the 2005The ``populate_sdk_*`` classes support SDK creation and consist of the
1951following classes: 2006following classes:
1952 2007
1953- *``populate_sdk_base``:* The base class supporting SDK creation under 2008- ``populate_sdk_base``: The base class supporting SDK creation under
1954 all package managers (i.e. DEB, RPM, and opkg). 2009 all package managers (i.e. DEB, RPM, and opkg).
1955 2010
1956- *``populate_sdk_deb``:* Supports creation of the SDK given the Debian 2011- ``populate_sdk_deb``: Supports creation of the SDK given the Debian
1957 package manager. 2012 package manager.
1958 2013
1959- *``populate_sdk_rpm``:* Supports creation of the SDK given the RPM 2014- ``populate_sdk_rpm``: Supports creation of the SDK given the RPM
1960 package manager. 2015 package manager.
1961 2016
1962- *``populate_sdk_ipk``:* Supports creation of the SDK given the opkg 2017- ``populate_sdk_ipk``: Supports creation of the SDK given the opkg
1963 (IPK format) package manager. 2018 (IPK format) package manager.
1964 2019
1965- *``populate_sdk_ext``:* Supports extensible SDK creation under all 2020- ``populate_sdk_ext``: Supports extensible SDK creation under all
1966 package managers. 2021 package managers.
1967 2022
1968The ``populate_sdk_base`` class inherits the appropriate 2023The ``populate_sdk_base`` class inherits the appropriate
@@ -1977,8 +2032,10 @@ contains the cross-compiler and associated tooling, and the target,
1977which contains a target root filesystem that is configured for the SDK 2032which contains a target root filesystem that is configured for the SDK
1978usage. These two images reside in :term:`SDK_OUTPUT`, 2033usage. These two images reside in :term:`SDK_OUTPUT`,
1979which consists of the following: 2034which consists of the following:
1980${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs 2035::
1981${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs 2036
2037 ${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs
2038 ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs
1982 2039
1983Finally, the base populate SDK class creates the toolchain environment 2040Finally, the base populate SDK class creates the toolchain environment
1984setup script, the tarball of the SDK, and the installer. 2041setup script, the tarball of the SDK, and the installer.
@@ -1989,13 +2046,12 @@ These classes are inherited by and used with the ``populate_sdk_base``
1989class. 2046class.
1990 2047
1991For more information on the cross-development toolchain generation, see 2048For more information on the cross-development toolchain generation, see
1992the "`Cross-Development Toolchain 2049the ":ref:`overview-manual/overview-manual-concepts:cross-development toolchain generation`"
1993Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
1994section in the Yocto Project Overview and Concepts Manual. For 2050section in the Yocto Project Overview and Concepts Manual. For
1995information on advantages gained when building a cross-development 2051information on advantages gained when building a cross-development
1996toolchain using the :ref:`ref-tasks-populate_sdk` 2052toolchain using the :ref:`ref-tasks-populate_sdk`
1997task, see the "`Building an SDK 2053task, see the
1998Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__" 2054":ref:`sdk-manual/sdk-appendix-obtain:building an sdk installer`"
1999section in the Yocto Project Application Development and the Extensible 2055section in the Yocto Project Application Development and the Extensible
2000Software Development Kit (eSDK) manual. 2056Software Development Kit (eSDK) manual.
2001 2057
@@ -2034,8 +2090,8 @@ The ``primport`` class provides functionality for importing
2034``prserv.bbclass`` 2090``prserv.bbclass``
2035================== 2091==================
2036 2092
2037The ``prserv`` class provides functionality for using a `PR 2093The ``prserv`` class provides functionality for using a :ref:`PR
2038service <&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service>`__ in order to 2094service <dev-manual/dev-manual-common-tasks:working with a pr service>` in order to
2039automatically manage the incrementing of the :term:`PR` 2095automatically manage the incrementing of the :term:`PR`
2040variable for each recipe. 2096variable for each recipe.
2041 2097
@@ -2054,11 +2110,10 @@ runtime tests for recipes that build software that provides these tests.
2054 2110
2055This class is intended to be inherited by individual recipes. However, 2111This class is intended to be inherited by individual recipes. However,
2056the class' functionality is largely disabled unless "ptest" appears in 2112the class' functionality is largely disabled unless "ptest" appears in
2057:term:`DISTRO_FEATURES`. See the "`Testing 2113:term:`DISTRO_FEATURES`. See the
2058Packages With 2114":ref:`dev-manual/dev-manual-common-tasks:testing packages with ptest`"
2059ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in 2115section in the Yocto Project Development Tasks Manual for more information
2060the Yocto Project Development Tasks Manual for more information on 2116on ptest.
2061ptest.
2062 2117
2063.. _ref-classes-ptest-gnome: 2118.. _ref-classes-ptest-gnome:
2064 2119
@@ -2068,10 +2123,9 @@ ptest.
2068Enables package tests (ptests) specifically for GNOME packages, which 2123Enables package tests (ptests) specifically for GNOME packages, which
2069have tests intended to be executed with ``gnome-desktop-testing``. 2124have tests intended to be executed with ``gnome-desktop-testing``.
2070 2125
2071For information on setting up and running ptests, see the "`Testing 2126For information on setting up and running ptests, see the
2072Packages With 2127":ref:`dev-manual/dev-manual-common-tasks:testing packages with ptest`"
2073ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in 2128section in the Yocto Project Development Tasks Manual.
2074the Yocto Project Development Tasks Manual.
2075 2129
2076.. _ref-classes-python-dir: 2130.. _ref-classes-python-dir:
2077 2131
@@ -2142,7 +2196,9 @@ absent from both the sysroot and target packages.
2142 2196
2143If a recipe needs the ``.la`` files to be installed, then the recipe can 2197If a recipe needs the ``.la`` files to be installed, then the recipe can
2144override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows: 2198override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows:
2145REMOVE_LIBTOOL_LA = "0" 2199::
2200
2201 REMOVE_LIBTOOL_LA = "0"
2146 2202
2147.. note:: 2203.. note::
2148 2204
@@ -2155,9 +2211,9 @@ REMOVE_LIBTOOL_LA = "0"
2155``report-error.bbclass`` 2211``report-error.bbclass``
2156======================== 2212========================
2157 2213
2158The ``report-error`` class supports enabling the `error reporting 2214The ``report-error`` class supports enabling the :ref:`error reporting
2159tool <&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool>`__, which 2215tool <dev-manual/dev-manual-common-tasks:using the error reporting tool>`",
2160allows you to submit build error information to a central database. 2216which allows you to submit build error information to a central database.
2161 2217
2162The class collects debug information for recipe, recipe version, task, 2218The class collects debug information for recipe, recipe version, task,
2163machine, distro, build system, target system, host distro, branch, 2219machine, distro, build system, target system, host distro, branch,
@@ -2182,14 +2238,20 @@ preserves these files for inspection and possible debugging purposes. If
2182you would rather have these files deleted to save disk space as the 2238you would rather have these files deleted to save disk space as the
2183build progresses, you can enable ``rm_work`` by adding the following to 2239build progresses, you can enable ``rm_work`` by adding the following to
2184your ``local.conf`` file, which is found in the :term:`Build Directory`. 2240your ``local.conf`` file, which is found in the :term:`Build Directory`.
2185INHERIT += "rm_work" If you are 2241::
2242
2243 INHERIT += "rm_work"
2244
2245If you are
2186modifying and building source code out of the work directory for a 2246modifying and building source code out of the work directory for a
2187recipe, enabling ``rm_work`` will potentially result in your changes to 2247recipe, enabling ``rm_work`` will potentially result in your changes to
2188the source being lost. To exclude some recipes from having their work 2248the source being lost. To exclude some recipes from having their work
2189directories deleted by ``rm_work``, you can add the names of the recipe 2249directories deleted by ``rm_work``, you can add the names of the recipe
2190or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which 2250or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which
2191can also be set in your ``local.conf`` file. Here is an example: 2251can also be set in your ``local.conf`` file. Here is an example:
2192RM_WORK_EXCLUDE += "busybox glibc" 2252::
2253
2254 RM_WORK_EXCLUDE += "busybox glibc"
2193 2255
2194.. _ref-classes-rootfs*: 2256.. _ref-classes-rootfs*:
2195 2257
@@ -2219,8 +2281,7 @@ The root filesystem is created from packages using one of the
2219:term:`PACKAGE_CLASSES` variable. 2281:term:`PACKAGE_CLASSES` variable.
2220 2282
2221For information on how root filesystem images are created, see the 2283For information on how root filesystem images are created, see the
2222"`Image 2284:ref:`image-generation-dev-environment`"
2223Generation <&YOCTO_DOCS_OM_URL;#image-generation-dev-environment>`__"
2224section in the Yocto Project Overview and Concepts Manual. 2285section in the Yocto Project Overview and Concepts Manual.
2225 2286
2226.. _ref-classes-sanity: 2287.. _ref-classes-sanity:
@@ -2339,9 +2400,9 @@ The ``sstate`` class provides support for Shared State (sstate). By
2339default, the class is enabled through the 2400default, the class is enabled through the
2340:term:`INHERIT_DISTRO` variable's default value. 2401:term:`INHERIT_DISTRO` variable's default value.
2341 2402
2342For more information on sstate, see the "`Shared State 2403For more information on sstate, see the
2343Cache <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__" section in the Yocto 2404":ref:`overview-manual/overview-manual-concepts:shared state cache`"
2344Project Overview and Concepts Manual. 2405section in the Yocto Project Overview and Concepts Manual.
2345 2406
2346.. _ref-classes-staging: 2407.. _ref-classes-staging:
2347 2408
@@ -2510,14 +2571,17 @@ You should set :term:`SYSTEMD_SERVICE` to the
2510name of the service file. You should also use a package name override to 2571name of the service file. You should also use a package name override to
2511indicate the package to which the value applies. If the value applies to 2572indicate the package to which the value applies. If the value applies to
2512the recipe's main package, use ``${``\ :term:`PN`\ ``}``. Here 2573the recipe's main package, use ``${``\ :term:`PN`\ ``}``. Here
2513is an example from the connman recipe: SYSTEMD_SERVICE_${PN} = 2574is an example from the connman recipe:
2514"connman.service" Services are set up to start on boot automatically 2575::
2576
2577 SYSTEMD_SERVICE_${PN} = "connman.service"
2578
2579Services are set up to start on boot automatically
2515unless you have set 2580unless you have set
2516:term:`SYSTEMD_AUTO_ENABLE` to "disable". 2581:term:`SYSTEMD_AUTO_ENABLE` to "disable".
2517 2582
2518For more information on ``systemd``, see the "`Selecting an 2583For more information on ``systemd``, see the
2519Initialization 2584":ref:`dev-manual/dev-manual-common-tasks:selecting an initialization manager`"
2520Manager <&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager>`__"
2521section in the Yocto Project Development Tasks Manual. 2585section in the Yocto Project Development Tasks Manual.
2522 2586
2523.. _ref-classes-systemd-boot: 2587.. _ref-classes-systemd-boot:
@@ -2593,13 +2657,17 @@ The tests are commands that run on the target system over ``ssh``. Each
2593test is written in Python and makes use of the ``unittest`` module. 2657test is written in Python and makes use of the ``unittest`` module.
2594 2658
2595The ``testimage.bbclass`` runs tests on an image when called using the 2659The ``testimage.bbclass`` runs tests on an image when called using the
2596following: $ bitbake -c testimage image The ``testimage-auto`` class 2660following:
2661::
2662
2663 $ bitbake -c testimage image
2664
2665The ``testimage-auto`` class
2597runs tests on an image after the image is constructed (i.e. 2666runs tests on an image after the image is constructed (i.e.
2598:term:`TESTIMAGE_AUTO` must be set to "1"). 2667:term:`TESTIMAGE_AUTO` must be set to "1").
2599 2668
2600For information on how to enable, run, and create new tests, see the 2669For information on how to enable, run, and create new tests, see the
2601"`Performing Automated Runtime 2670":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`"
2602Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
2603section in the Yocto Project Development Tasks Manual. 2671section in the Yocto Project Development Tasks Manual.
2604 2672
2605.. _ref-classes-testsdk: 2673.. _ref-classes-testsdk:
@@ -2609,7 +2677,10 @@ section in the Yocto Project Development Tasks Manual.
2609 2677
2610This class supports running automated tests against software development 2678This class supports running automated tests against software development
2611kits (SDKs). The ``testsdk`` class runs tests on an SDK when called 2679kits (SDKs). The ``testsdk`` class runs tests on an SDK when called
2612using the following: $ bitbake -c testsdk image 2680using the following:
2681::
2682
2683 $ bitbake -c testsdk image
2613 2684
2614.. note:: 2685.. note::
2615 2686
@@ -2682,7 +2753,9 @@ The ``typecheck`` class provides support for validating the values of
2682variables set at the configuration level against their defined types. 2753variables set at the configuration level against their defined types.
2683The OpenEmbedded build system allows you to define the type of a 2754The OpenEmbedded build system allows you to define the type of a
2684variable using the "type" varflag. Here is an example: 2755variable using the "type" varflag. Here is an example:
2685IMAGE_FEATURES[type] = "list" 2756::
2757
2758 IMAGE_FEATURES[type] = "list"
2686 2759
2687.. _ref-classes-uboot-config: 2760.. _ref-classes-uboot-config:
2688 2761
@@ -2690,11 +2763,18 @@ IMAGE_FEATURES[type] = "list"
2690======================== 2763========================
2691 2764
2692The ``uboot-config`` class provides support for U-Boot configuration for 2765The ``uboot-config`` class provides support for U-Boot configuration for
2693a machine. Specify the machine in your recipe as follows: UBOOT_CONFIG 2766a machine. Specify the machine in your recipe as follows:
2694??= <default> UBOOT_CONFIG[foo] = "config,images" You can also specify 2767::
2695the machine using this method: UBOOT_MACHINE = "config" See the 2768
2696:term:`UBOOT_CONFIG` and 2769 UBOOT_CONFIG ??= <default>
2697:term:`UBOOT_MACHINE` variables for additional 2770 UBOOT_CONFIG[foo] = "config,images"
2771
2772You can also specify the machine using this method:
2773::
2774
2775 UBOOT_MACHINE = "config"
2776
2777See the :term:`UBOOT_CONFIG` and :term:`UBOOT_MACHINE` variables for additional
2698information. 2778information.
2699 2779
2700.. _ref-classes-uninative: 2780.. _ref-classes-uninative: