summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/ref-manual/classes.rst317
-rw-r--r--documentation/ref-manual/qa-checks.rst911
2 files changed, 476 insertions, 752 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index c0d7373c79..ee583fe9ba 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -1345,321 +1345,8 @@ are meant to detect real or potential problems in the packaged
1345output. So exercise caution when disabling these checks. 1345output. So exercise caution when disabling these checks.
1346 1346
1347The tests you can list with the :term:`WARN_QA` and 1347The tests you can list with the :term:`WARN_QA` and
1348:term:`ERROR_QA` variables are: 1348:term:`ERROR_QA` variables are documented in the :doc:`/ref-manual/qa-checks`
1349 1349document of the Yocto Project Reference Manual.
1350- ``already-stripped:`` Checks that produced binaries have not
1351 already been stripped prior to the build system extracting debug
1352 symbols. It is common for upstream software projects to default to
1353 stripping debug symbols for output binaries. In order for debugging
1354 to work on the target using ``-dbg`` packages, this stripping must be
1355 disabled.
1356
1357- ``arch:`` Checks the Executable and Linkable Format (ELF) type, bit
1358 size, and endianness of any binaries to ensure they match the target
1359 architecture. This test fails if any binaries do not match the type
1360 since there would be an incompatibility. The test could indicate that
1361 the wrong compiler or compiler options have been used. Sometimes
1362 software, like bootloaders, might need to bypass this check.
1363
1364- ``buildpaths:`` Checks for paths to locations on the build host
1365 inside the output files. Not only can these leak information about
1366 the build environment, they also hinder binary reproducibility.
1367
1368- ``build-deps:`` Determines if a build-time dependency that is
1369 specified through :term:`DEPENDS`, explicit
1370 :term:`RDEPENDS`, or task-level dependencies exists
1371 to match any runtime dependency. This determination is particularly
1372 useful to discover where runtime dependencies are detected and added
1373 during packaging. If no explicit dependency has been specified within
1374 the metadata, at the packaging stage it is too late to ensure that
1375 the dependency is built, and thus you can end up with an error when
1376 the package is installed into the image during the
1377 :ref:`ref-tasks-rootfs` task because the auto-detected
1378 dependency was not satisfied. An example of this would be where the
1379 :ref:`ref-classes-update-rc.d` class automatically
1380 adds a dependency on the ``initscripts-functions`` package to
1381 packages that install an initscript that refers to
1382 ``/etc/init.d/functions``. The recipe should really have an explicit
1383 :term:`RDEPENDS` for the package in question on ``initscripts-functions``
1384 so that the OpenEmbedded build system is able to ensure that the
1385 ``initscripts`` recipe is actually built and thus the
1386 ``initscripts-functions`` package is made available.
1387
1388- ``configure-gettext:`` Checks that if a recipe is building something
1389 that uses automake and the automake files contain an ``AM_GNU_GETTEXT``
1390 directive, that the recipe also inherits the :ref:`ref-classes-gettext`
1391 class to ensure that gettext is available during the build.
1392
1393- ``debug-deps:`` Checks that all packages except ``-dbg`` packages
1394 do not depend on ``-dbg`` packages, which would cause a packaging
1395 bug.
1396
1397- ``debug-files:`` Checks for ``.debug`` directories in anything but
1398 the ``-dbg`` package. The debug files should all be in the ``-dbg``
1399 package. Thus, anything packaged elsewhere is incorrect packaging.
1400
1401- ``dep-cmp:`` Checks for invalid version comparison statements in
1402 runtime dependency relationships between packages (i.e. in
1403 :term:`RDEPENDS`,
1404 :term:`RRECOMMENDS`,
1405 :term:`RSUGGESTS`,
1406 :term:`RPROVIDES`,
1407 :term:`RREPLACES`, and
1408 :term:`RCONFLICTS` variable values). Any invalid
1409 comparisons might trigger failures or undesirable behavior when
1410 passed to the package manager.
1411
1412- ``desktop:`` Runs the ``desktop-file-validate`` program against any
1413 ``.desktop`` files to validate their contents against the
1414 specification for ``.desktop`` files.
1415
1416- ``dev-deps:`` Checks that all packages except ``-dev`` or
1417 ``-staticdev`` packages do not depend on ``-dev`` packages, which
1418 would be a packaging bug.
1419
1420- ``dev-so:`` Checks that the ``.so`` symbolic links are in the
1421 ``-dev`` package and not in any of the other packages. In general,
1422 these symlinks are only useful for development purposes. Thus, the
1423 ``-dev`` package is the correct location for them. In very rare
1424 cases, such as dynamically loaded modules, these symlinks
1425 are needed instead in the main package.
1426
1427- ``empty-dirs:`` Checks that packages are not installing files to
1428 directories that are normally expected to be empty (such as ``/tmp``)
1429 The list of directories that are checked is specified by the
1430 :term:`QA_EMPTY_DIRS` variable.
1431
1432- ``file-rdeps:`` Checks that file-level dependencies identified by
1433 the OpenEmbedded build system at packaging time are satisfied. For
1434 example, a shell script might start with the line ``#!/bin/bash``.
1435 This line would translate to a file dependency on ``/bin/bash``. Of
1436 the three package managers that the OpenEmbedded build system
1437 supports, only RPM directly handles file-level dependencies,
1438 resolving them automatically to packages providing the files.
1439 However, the lack of that functionality in the other two package
1440 managers does not mean the dependencies do not still need resolving.
1441 This QA check attempts to ensure that explicitly declared
1442 :term:`RDEPENDS` exist to handle any file-level
1443 dependency detected in packaged files.
1444
1445- ``files-invalid:`` Checks for :term:`FILES` variable
1446 values that contain "//", which is invalid.
1447
1448- ``host-user-contaminated:`` Checks that no package produced by the
1449 recipe contains any files outside of ``/home`` with a user or group
1450 ID that matches the user running BitBake. A match usually indicates
1451 that the files are being installed with an incorrect UID/GID, since
1452 target IDs are independent from host IDs. For additional information,
1453 see the section describing the
1454 :ref:`ref-tasks-install` task.
1455
1456- ``incompatible-license:`` Report when packages are excluded from
1457 being created due to being marked with a license that is in
1458 :term:`INCOMPATIBLE_LICENSE`.
1459
1460- ``installed-vs-shipped:`` Reports when files have been installed
1461 within :ref:`ref-tasks-install` but have not been included in any package by
1462 way of the :term:`FILES` variable. Files that do not
1463 appear in any package cannot be present in an image later on in the
1464 build process. Ideally, all installed files should be packaged or not
1465 installed at all. These files can be deleted at the end of
1466 :ref:`ref-tasks-install` if the files are not needed in any package.
1467
1468- ``invalid-chars:`` Checks that the recipe metadata variables
1469 :term:`DESCRIPTION`,
1470 :term:`SUMMARY`, :term:`LICENSE`, and
1471 :term:`SECTION` do not contain non-UTF-8 characters.
1472 Some package managers do not support such characters.
1473
1474- ``invalid-packageconfig:`` Checks that no undefined features are
1475 being added to :term:`PACKAGECONFIG`. For
1476 example, any name "foo" for which the following form does not exist::
1477
1478 PACKAGECONFIG[foo] = "..."
1479
1480- ``la:`` Checks ``.la`` files for any :term:`TMPDIR` paths. Any ``.la``
1481 file containing these paths is incorrect since ``libtool`` adds the
1482 correct sysroot prefix when using the files automatically itself.
1483
1484- ``ldflags:`` Ensures that the binaries were linked with the
1485 :term:`LDFLAGS` options provided by the build system.
1486 If this test fails, check that the :term:`LDFLAGS` variable is being
1487 passed to the linker command.
1488
1489- ``libdir:`` Checks for libraries being installed into incorrect
1490 (possibly hardcoded) installation paths. For example, this test will
1491 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
1492 "lib32". Another example is when recipes install
1493 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib".
1494
1495- ``libexec:`` Checks if a package contains files in
1496 ``/usr/libexec``. This check is not performed if the ``libexecdir``
1497 variable has been set explicitly to ``/usr/libexec``.
1498
1499- ``mime:`` Check that if a package contains mime type files (``.xml``
1500 files in ``${datadir}/mime/packages``) that the recipe also inherits
1501 the :ref:`ref-classes-mime` class in order to ensure that these get
1502 properly installed.
1503
1504- ``mime-xdg:`` Checks that if a package contains a .desktop file with a
1505 'MimeType' key present, that the recipe inherits the
1506 :ref:`ref-classes-mime-xdg` class that is required in order for that
1507 to be activated.
1508
1509- ``missing-update-alternatives:`` Check that if a recipe sets the
1510 :term:`ALTERNATIVE` variable that the recipe also inherits
1511 :ref:`ref-classes-update-alternatives` such that the alternative will
1512 be correctly set up.
1513
1514- ``packages-list:`` Checks for the same package being listed
1515 multiple times through the :term:`PACKAGES` variable
1516 value. Installing the package in this manner can cause errors during
1517 packaging.
1518
1519- ``patch-fuzz:`` Checks for fuzz in patch files that may allow
1520 them to apply incorrectly if the underlying code changes.
1521
1522- ``patch-status:`` Checks that the ``Upstream-Status`` is specified and valid
1523 in the headers of patches for recipes.
1524
1525- ``pep517-backend:`` checks that a recipe inheriting
1526 :ref:`ref-classes-setuptools3` has a PEP517-compliant backend.
1527
1528- ``perllocalpod:`` Checks for ``perllocal.pod`` being erroneously
1529 installed and packaged by a recipe.
1530
1531- ``perm-config:`` Reports lines in ``fs-perms.txt`` that have an
1532 invalid format.
1533
1534- ``perm-line:`` Reports lines in ``fs-perms.txt`` that have an
1535 invalid format.
1536
1537- ``perm-link:`` Reports lines in ``fs-perms.txt`` that specify
1538 'link' where the specified target already exists.
1539
1540- ``perms:`` Currently, this check is unused but reserved.
1541
1542- ``pkgconfig:`` Checks ``.pc`` files for any
1543 :term:`TMPDIR`/:term:`WORKDIR` paths.
1544 Any ``.pc`` file containing these paths is incorrect since
1545 ``pkg-config`` itself adds the correct sysroot prefix when the files
1546 are accessed.
1547
1548- ``pkgname:`` Checks that all packages in
1549 :term:`PACKAGES` have names that do not contain
1550 invalid characters (i.e. characters other than 0-9, a-z, ., +, and
1551 -).
1552
1553- ``pkgv-undefined:`` Checks to see if the :term:`PKGV` variable is
1554 undefined during :ref:`ref-tasks-package`.
1555
1556- ``pkgvarcheck:`` Checks through the variables
1557 :term:`RDEPENDS`,
1558 :term:`RRECOMMENDS`,
1559 :term:`RSUGGESTS`,
1560 :term:`RCONFLICTS`,
1561 :term:`RPROVIDES`,
1562 :term:`RREPLACES`, :term:`FILES`,
1563 :term:`ALLOW_EMPTY`, ``pkg_preinst``,
1564 ``pkg_postinst``, ``pkg_prerm`` and ``pkg_postrm``, and reports if
1565 there are variable sets that are not package-specific. Using these
1566 variables without a package suffix is bad practice, and might
1567 unnecessarily complicate dependencies of other packages within the
1568 same recipe or have other unintended consequences.
1569
1570- ``pn-overrides:`` Checks that a recipe does not have a name
1571 (:term:`PN`) value that appears in
1572 :term:`OVERRIDES`. If a recipe is named such that
1573 its :term:`PN` value matches something already in :term:`OVERRIDES` (e.g.
1574 :term:`PN` happens to be the same as :term:`MACHINE` or
1575 :term:`DISTRO`), it can have unexpected consequences.
1576 For example, assignments such as ``FILES:${PN} = "xyz"`` effectively
1577 turn into ``FILES = "xyz"``.
1578
1579- ``recipe-naming:`` Checks that the recipe name and recipe class match, so
1580 that ``*-native`` recipes inherit :ref:`ref-classes-native` and
1581 ``nativesdk-*`` recipes inherit :ref:`ref-classes-nativesdk`.
1582
1583- ``rpaths:`` Checks for rpaths in the binaries that contain build
1584 system paths such as :term:`TMPDIR`. If this test fails, bad ``-rpath``
1585 options are being passed to the linker commands and your binaries
1586 have potential security issues.
1587
1588- ``shebang-size:`` Check that the shebang line (``#!`` in the first line)
1589 in a packaged script is not longer than 128 characters, which can cause
1590 an error at runtime depending on the operating system.
1591
1592- ``staticdev:`` Checks for static library files (``*.a``) in
1593 non-``staticdev`` packages.
1594
1595- ``src-uri-bad:`` Checks that the :term:`SRC_URI` value set by a recipe
1596 does not contain a reference to ``${PN}`` (instead of the correct
1597 ``${BPN}``) nor refers to unstable Github archive tarballs.
1598
1599- ``symlink-to-sysroot:`` Checks for symlinks in packages that point
1600 into :term:`TMPDIR` on the host. Such symlinks will
1601 work on the host, but are clearly invalid when running on the target.
1602
1603- ``textrel:`` Checks for ELF binaries that contain relocations in
1604 their ``.text`` sections, which can result in a performance impact at
1605 runtime. See the explanation for the ``ELF binary`` message in
1606 ":doc:`/ref-manual/qa-checks`" for more information regarding runtime performance
1607 issues.
1608
1609- ``unhandled-features-check:`` check that if one of the variables that
1610 the :ref:`ref-classes-features_check` class supports (e.g.
1611 :term:`REQUIRED_DISTRO_FEATURES`) is set by a recipe, then the recipe
1612 also inherits :ref:`ref-classes-features_check` in order for the
1613 requirement to actually work.
1614
1615- ``unimplemented-ptest:`` Checks that ptests are implemented for upstream
1616 tests.
1617
1618- ``unlisted-pkg-lics:`` Checks that all declared licenses applying
1619 for a package are also declared on the recipe level (i.e. any license
1620 in ``LICENSE:*`` should appear in :term:`LICENSE`).
1621
1622- ``useless-rpaths:`` Checks for dynamic library load paths (rpaths)
1623 in the binaries that by default on a standard system are searched by
1624 the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will
1625 not cause any breakage, they do waste space and are unnecessary.
1626
1627- ``usrmerge:`` If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this
1628 check will ensure that no package installs files to root (``/bin``,
1629 ``/sbin``, ``/lib``, ``/lib64``) directories.
1630
1631- ``var-undefined:`` Reports when variables fundamental to packaging
1632 (i.e. :term:`WORKDIR`,
1633 :term:`DEPLOY_DIR`, :term:`D`,
1634 :term:`PN`, and :term:`PKGD`) are undefined
1635 during :ref:`ref-tasks-package`.
1636
1637- ``version-going-backwards:`` If the :ref:`ref-classes-buildhistory`
1638 class is enabled, reports when a package being written out has a lower
1639 version than the previously written package under the same name. If
1640 you are placing output packages into a feed and upgrading packages on
1641 a target system using that feed, the version of a package going
1642 backwards can result in the target system not correctly upgrading to
1643 the "new" version of the package.
1644
1645 .. note::
1646
1647 This is only relevant when you are using runtime package management
1648 on your target system.
1649
1650- ``virtual-slash:`` Checks to see if ``virtual/`` is being used in
1651 :term:`RDEPENDS` or :term:`RPROVIDES`, which is not good practice ---
1652 ``virtual/`` is a convention intended for use in the build context
1653 (i.e. :term:`PROVIDES` and :term:`DEPENDS`) rather than the runtime
1654 context.
1655
1656- ``xorg-driver-abi:`` Checks that all packages containing Xorg
1657 drivers have ABI dependencies. The ``xserver-xorg`` recipe provides
1658 driver ABI names. All drivers should depend on the ABI versions that
1659 they have been built against. Driver recipes that include
1660 ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will
1661 automatically get these versions. Consequently, you should only need
1662 to explicitly add dependencies to binary driver recipes.
1663 1350
1664.. _ref-classes-kernel: 1351.. _ref-classes-kernel:
1665 1352
diff --git a/documentation/ref-manual/qa-checks.rst b/documentation/ref-manual/qa-checks.rst
index 27d46de3fd..91a0f6149b 100644
--- a/documentation/ref-manual/qa-checks.rst
+++ b/documentation/ref-manual/qa-checks.rst
@@ -43,126 +43,30 @@ error form along with an explanation.
43Errors and Warnings 43Errors and Warnings
44=================== 44===================
45 45
46.. _qa-check-libexec: 46.. _qa-check-already-stripped:
47
48- ``<packagename>: <path> is using libexec please relocate to <libexecdir> [libexec]``
49
50 The specified package contains files in ``/usr/libexec`` when the
51 distro configuration uses a different path for ``<libexecdir>`` By
52 default, ``<libexecdir>`` is ``$prefix/libexec``. However, this
53 default can be changed (e.g. ``${libdir}``).
54
55  
56.. _qa-check-rpaths:
57
58- ``package <packagename> contains bad RPATH <rpath> in file <file> [rpaths]``
59
60 The specified binary produced by the recipe contains dynamic library
61 load paths (rpaths) that contain build system paths such as
62 :term:`TMPDIR`, which are incorrect for the target and
63 could potentially be a security issue. Check for bad ``-rpath``
64 options being passed to the linker in your
65 :ref:`ref-tasks-compile` log. Depending on the build
66 system used by the software being built, there might be a configure
67 option to disable rpath usage completely within the build of the
68 software.
69
70  
71.. _qa-check-useless-rpaths:
72
73- ``<packagename>: <file> contains probably-redundant RPATH <rpath> [useless-rpaths]``
74
75 The specified binary produced by the recipe contains dynamic library
76 load paths (rpaths) that on a standard system are searched by default
77 by the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths
78 will not cause any breakage, they do waste space and are unnecessary.
79 Depending on the build system used by the software being built, there
80 might be a configure option to disable rpath usage completely within
81 the build of the software.
82
83  
84.. _qa-check-file-rdeps:
85
86- ``<packagename> requires <files>, but no providers in its RDEPENDS [file-rdeps]``
87
88 A file-level dependency has been identified from the specified
89 package on the specified files, but there is no explicit
90 corresponding entry in :term:`RDEPENDS`. If
91 particular files are required at runtime then :term:`RDEPENDS` should be
92 declared in the recipe to ensure the packages providing them are
93 built.
94
95  
96.. _qa-check-build-deps:
97
98- ``<packagename1> rdepends on <packagename2>, but it isn't a build dependency? [build-deps]``
99
100 There is a runtime dependency between the two specified packages, but
101 there is nothing explicit within the recipe to enable the
102 OpenEmbedded build system to ensure that dependency is satisfied.
103 This condition is usually triggered by an
104 :term:`RDEPENDS` value being added at the packaging
105 stage rather than up front, which is usually automatic based on the
106 contents of the package. In most cases, you should change the recipe
107 to add an explicit :term:`RDEPENDS` for the dependency.
108
109  
110.. _qa-check-dev-so:
111
112- ``non -dev/-dbg/nativesdk- package contains symlink .so: <packagename> path '<path>' [dev-so]``
113
114 Symlink ``.so`` files are for development only, and should therefore
115 go into the ``-dev`` package. This situation might occur if you add
116 ``*.so*`` rather than ``*.so.*`` to a non-dev package. Change
117 :term:`FILES` (and possibly
118 :term:`PACKAGES`) such that the specified ``.so``
119 file goes into an appropriate ``-dev`` package.
120
121  
122.. _qa-check-staticdev:
123
124- ``non -staticdev package contains static .a library: <packagename> path '<path>' [staticdev]``
125
126 Static ``.a`` library files should go into a ``-staticdev`` package.
127 Change :term:`FILES` (and possibly
128 :term:`PACKAGES`) such that the specified ``.a`` file
129 goes into an appropriate ``-staticdev`` package.
130
131  
132.. _qa-check-libdir:
133
134- ``<packagename>: found library in wrong location [libdir]``
135
136 The specified file may have been installed into an incorrect
137 (possibly hardcoded) installation path. For example, this test will
138 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
139 "lib32". Another example is when recipes install
140 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". False
141 positives occasionally exist. For these cases add "libdir" to
142 :term:`INSANE_SKIP` for the package.
143
144  
145.. _qa-check-debug-files:
146 47
147- ``non debug package contains .debug directory: <packagename> path <path> [debug-files]`` 48- ``File '<file>' from <recipename> was already stripped, this will prevent future debugging! [already-stripped]``
148 49
149 The specified package contains a ``.debug`` directory, which should 50 Produced binaries have already been stripped prior to the build
150 not appear in anything but the ``-dbg`` package. This situation might 51 system extracting debug symbols. It is common for upstream software
151 occur if you add a path which contains a ``.debug`` directory and do 52 projects to default to stripping debug symbols for output binaries.
152 not explicitly add the ``.debug`` directory to the ``-dbg`` package. 53 In order for debugging to work on the target using ``-dbg`` packages,
153 If this is the case, add the ``.debug`` directory explicitly to 54 this stripping must be disabled.
154 ``FILES:${PN}-dbg``. See :term:`FILES` for additional
155 information on :term:`FILES`.
156 55
157.. _qa-check-empty-dirs: 56 Depending on the build system used by the software being built,
57 disabling this stripping could be as easy as specifying an additional
58 configure option. If not, disabling stripping might involve patching
59 the build scripts. In the latter case, look for references to "strip"
60 or "STRIP", or the "-s" or "-S" command-line options being specified
61 on the linker command line (possibly through the compiler command
62 line if preceded with "-Wl,").
158 63
159- ``<packagename> installs files in <path>, but it is expected to be empty [empty-dirs]`` 64 .. note::
160 65
161 The specified package is installing files into a directory that is 66 Disabling stripping here does not mean that the final packaged
162 normally expected to be empty (such as ``/tmp``). These files may 67 binaries will be unstripped. Once the OpenEmbedded build system
163 be more appropriately installed to a different location, or 68 splits out debug symbols to the ``-dbg`` package, it will then
164 perhaps alternatively not installed at all, usually by updating the 69 strip the symbols from the binaries.
165 :ref:`ref-tasks-install` task/function.
166 70
167.. _qa-check-arch: 71.. _qa-check-arch:
168 72
@@ -182,8 +86,6 @@ Errors and Warnings
182 option is to check the :ref:`ref-tasks-compile` log 86 option is to check the :ref:`ref-tasks-compile` log
183 and verify that the compiler options being used are correct. 87 and verify that the compiler options being used are correct.
184 88
185  
186
187- ``Bit size did not match (<file_bits>, expected <machine_bits>) in <file> [arch]`` 89- ``Bit size did not match (<file_bits>, expected <machine_bits>) in <file> [arch]``
188 90
189 By default, the OpenEmbedded build system checks the Executable and 91 By default, the OpenEmbedded build system checks the Executable and
@@ -200,8 +102,6 @@ Errors and Warnings
200 option is to check the :ref:`ref-tasks-compile` log 102 option is to check the :ref:`ref-tasks-compile` log
201 and verify that the compiler options being used are correct. 103 and verify that the compiler options being used are correct.
202 104
203  
204
205- ``Endianness did not match (<file_endianness>, expected <machine_endianness>) in <file> [arch]`` 105- ``Endianness did not match (<file_endianness>, expected <machine_endianness>) in <file> [arch]``
206 106
207 By default, the OpenEmbedded build system checks the Executable and 107 By default, the OpenEmbedded build system checks the Executable and
@@ -218,96 +118,55 @@ Errors and Warnings
218 option is to check the :ref:`ref-tasks-compile` log 118 option is to check the :ref:`ref-tasks-compile` log
219 and verify that the compiler options being used are correct. 119 and verify that the compiler options being used are correct.
220 120
221   121.. _qa-check-build-deps:
222.. _qa-check-textrel:
223
224- ``ELF binary '<file>' has relocations in .text [textrel]``
225
226 The specified ELF binary contains relocations in its ``.text``
227 sections. This situation can result in a performance impact at
228 runtime.
229
230 Typically, the way to solve this performance issue is to add "-fPIC"
231 or "-fpic" to the compiler command-line options. For example, given
232 software that reads :term:`CFLAGS` when you build it,
233 you could add the following to your recipe::
234
235 CFLAGS:append = " -fPIC "
236
237 For more information on text relocations at runtime, see
238 https://www.akkadia.org/drepper/textrelocs.html.
239
240  
241.. _qa-check-ldflags:
242
243- ``File '<file>' in package '<package>' doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]``
244
245 This indicates that binaries produced when building the recipe have
246 not been linked with the :term:`LDFLAGS` options
247 provided by the build system. Check to be sure that the :term:`LDFLAGS`
248 variable is being passed to the linker command. A common workaround
249 for this situation is to pass in :term:`LDFLAGS` using
250 :term:`TARGET_CC_ARCH` within the recipe as
251 follows::
252
253 TARGET_CC_ARCH += "${LDFLAGS}"
254
255  
256.. _qa-check-xorg-driver-abi:
257
258- ``Package <packagename> contains Xorg driver (<driver>) but no xorg-abi- dependencies [xorg-driver-abi]``
259
260 The specified package contains an Xorg driver, but does not have a
261 corresponding ABI package dependency. The xserver-xorg recipe
262 provides driver ABI names. All drivers should depend on the ABI
263 versions that they have been built against. Driver recipes that
264 include ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will
265 automatically get these versions. Consequently, you should only need
266 to explicitly add dependencies to binary driver recipes.
267
268  
269.. _qa-check-infodir:
270 122
271- ``The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]`` 123- ``<packagename1> rdepends on <packagename2>, but it isn't a build dependency? [build-deps]``
272 124
273 The ``/usr/share/info/dir`` should not be packaged. Add the following 125 There is a runtime dependency between the two specified packages, but
274 line to your :ref:`ref-tasks-install` task or to your 126 there is nothing explicit within the recipe to enable the
275 ``do_install:append`` within the recipe as follows:: 127 OpenEmbedded build system to ensure that dependency is satisfied.
128 This condition is usually triggered by an
129 :term:`RDEPENDS` value being added at the packaging
130 stage rather than up front, which is usually automatic based on the
131 contents of the package. In most cases, you should change the recipe
132 to add an explicit :term:`RDEPENDS` for the dependency.
276 133
277 rm ${D}${infodir}/dir 134.. _qa-check-buildpaths:
278  
279 135
280.. _qa-check-symlink-to-sysroot: 136- ``File <filename> in package <packagename> contains reference to TMPDIR [buildpaths]``
281 137
282- ``Symlink <path> in <packagename> points to TMPDIR [symlink-to-sysroot]`` 138 This check ensures that build system paths (including :term:`TMPDIR`) do not
139 appear in output files, which not only leaks build system configuration into
140 the target, but also hinders binary reproducibility as the output will change
141 if the build system configuration changes.
283 142
284 The specified symlink points into :term:`TMPDIR` on the 143 Typically these paths will enter the output through some mechanism in the
285 host. Such symlinks will work on the host. However, they are clearly 144 configuration or compilation of the software being built by the recipe. To
286 invalid when running on the target. You should either correct the 145 resolve this issue you will need to determine how the detected path is
287 symlink to use a relative path or remove the symlink. 146 entering the output. Sometimes it may require adjusting scripts or code to
147 use a relative path rather than an absolute one, or to pick up the path from
148 runtime configuration or environment variables.
288 149
289   150.. _qa-check-configure-gettext:
290.. _qa-check-la:
291 151
292- ``<file> failed sanity test (workdir) in path <path> [la]`` 152- ``AM_GNU_GETTEXT used but no inherit gettext [configure-gettext]``
293 153
294 The specified ``.la`` file contains :term:`TMPDIR` 154 If a recipe is building something that uses automake and the automake
295 paths. Any ``.la`` file containing these paths is incorrect since 155 files contain an ``AM_GNU_GETTEXT`` directive then this check will fail
296 ``libtool`` adds the correct sysroot prefix when using the files 156 if there is no ``inherit gettext`` statement in the recipe to ensure
297 automatically itself. 157 that gettext is available during the build. Add ``inherit gettext`` to
158 remove the warning.
298 159
299   160.. _qa-check-configure-unsafe:
300.. _qa-check-pkgconfig:
301 161
302- ``<file> failed sanity test (tmpdir) in path <path> [pkgconfig]`` 162- ``This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. [configure-unsafe]``
303 163
304 The specified ``.pc`` file contains 164 The log for the :ref:`ref-tasks-configure` task
305 :term:`TMPDIR`\ ``/``\ :term:`WORKDIR` 165 indicates that paths on the host were searched for files, which is
306 paths. Any ``.pc`` file containing these paths is incorrect since 166 not appropriate when cross-compiling. Look for "is unsafe for
307 ``pkg-config`` itself adds the correct sysroot prefix when the files 167 cross-compilation" or "CROSS COMPILE Badness" in the specified log
308 are accessed. 168 file.
309 169
310  
311.. _qa-check-debug-deps: 170.. _qa-check-debug-deps:
312 171
313- ``<packagename> rdepends on <debug_packagename> [debug-deps]`` 172- ``<packagename> rdepends on <debug_packagename> [debug-deps]``
@@ -330,30 +189,18 @@ Errors and Warnings
330 (e.g. a non-symlink ``.so`` file) or it might have been added 189 (e.g. a non-symlink ``.so`` file) or it might have been added
331 manually (e.g. by adding to :term:`RDEPENDS`). 190 manually (e.g. by adding to :term:`RDEPENDS`).
332 191
333   192.. _qa-check-debug-files:
334.. _qa-check-dev-deps:
335
336- ``<packagename> rdepends on <dev_packagename> [dev-deps]``
337
338 There is a dependency between the specified non-dev package (a package
339 whose name does not end in ``-dev``) and a package that is a ``dev``
340 package. The ``dev`` packages contain development headers and are
341 usually brought in using several different methods:
342
343 - Using the ``dev-pkgs``
344 :term:`IMAGE_FEATURES` value.
345
346 - Using :term:`IMAGE_INSTALL`.
347 193
348 - As a dependency of another ``dev`` package that was brought in 194- ``non debug package contains .debug directory: <packagename> path <path> [debug-files]``
349 using one of the above methods.
350 195
351 The dependency might have been automatically added (because the 196 The specified package contains a ``.debug`` directory, which should
352 ``dev`` package erroneously contains files that it should not have 197 not appear in anything but the ``-dbg`` package. This situation might
353 (e.g. a non-symlink ``.so`` file) or it might have been added 198 occur if you add a path which contains a ``.debug`` directory and do
354 manually (e.g. by adding to :term:`RDEPENDS`). 199 not explicitly add the ``.debug`` directory to the ``-dbg`` package.
200 If this is the case, add the ``.debug`` directory explicitly to
201 ``FILES:${PN}-dbg``. See :term:`FILES` for additional
202 information on :term:`FILES`.
355 203
356  
357.. _qa-check-dep-cmp: 204.. _qa-check-dep-cmp:
358 205
359- ``<var>:<packagename> is invalid: <comparison> (<value>) only comparisons <, =, >, <=, and >= are allowed [dep-cmp]`` 206- ``<var>:<packagename> is invalid: <comparison> (<value>) only comparisons <, =, >, <=, and >= are allowed [dep-cmp]``
@@ -368,159 +215,98 @@ Errors and Warnings
368 comparison operators. Change the versioned dependency values you are 215 comparison operators. Change the versioned dependency values you are
369 adding to match those listed in the message. 216 adding to match those listed in the message.
370 217
371   218.. _qa-check-dev-deps:
372.. _qa-check-compile-host-path:
373
374- ``<recipename>: The compile log indicates that host include and/or library paths were used. Please check the log '<logfile>' for more information. [compile-host-path]``
375
376 The log for the :ref:`ref-tasks-compile` task
377 indicates that paths on the host were searched for files, which is
378 not appropriate when cross-compiling. Look for "is unsafe for
379 cross-compilation" or "CROSS COMPILE Badness" in the specified log
380 file.
381
382  
383.. _qa-check-install-host-path:
384
385- ``<recipename>: The install log indicates that host include and/or library paths were used. Please check the log '<logfile>' for more information. [install-host-path]``
386
387 The log for the :ref:`ref-tasks-install` task
388 indicates that paths on the host were searched for files, which is
389 not appropriate when cross-compiling. Look for "is unsafe for
390 cross-compilation" or "CROSS COMPILE Badness" in the specified log
391 file.
392
393  
394.. _qa-check-configure-unsafe:
395
396- ``This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. [configure-unsafe]``
397
398 The log for the :ref:`ref-tasks-configure` task
399 indicates that paths on the host were searched for files, which is
400 not appropriate when cross-compiling. Look for "is unsafe for
401 cross-compilation" or "CROSS COMPILE Badness" in the specified log
402 file.
403 219
404   220- ``<packagename> rdepends on <dev_packagename> [dev-deps]``
405.. _qa-check-pkgname:
406 221
407- ``<packagename> doesn't match the [a-z0-9.+-]+ regex [pkgname]`` 222 There is a dependency between the specified non-dev package (a package
223 whose name does not end in ``-dev``) and a package that is a ``dev``
224 package. The ``dev`` packages contain development headers and are
225 usually brought in using several different methods:
408 226
409 The convention within the OpenEmbedded build system (sometimes 227 - Using the ``dev-pkgs``
410 enforced by the package manager itself) is to require that package 228 :term:`IMAGE_FEATURES` value.
411 names are all lower case and to allow a restricted set of characters.
412 If your recipe name does not match this, or you add packages to
413 :term:`PACKAGES` that do not conform to the
414 convention, then you will receive this error. Rename your recipe. Or,
415 if you have added a non-conforming package name to :term:`PACKAGES`,
416 change the package name appropriately.
417 229
418   230 - Using :term:`IMAGE_INSTALL`.
419.. _qa-check-unknown-configure-option:
420 231
421- ``<recipe>: configure was passed unrecognized options: <options> [unknown-configure-option]`` 232 - As a dependency of another ``dev`` package that was brought in
233 using one of the above methods.
422 234
423 The configure script is reporting that the specified options are 235 The dependency might have been automatically added (because the
424 unrecognized. This situation could be because the options were 236 ``dev`` package erroneously contains files that it should not have
425 previously valid but have been removed from the configure script. Or, 237 (e.g. a non-symlink ``.so`` file) or it might have been added
426 there was a mistake when the options were added and there is another 238 manually (e.g. by adding to :term:`RDEPENDS`).
427 option that should be used instead. If you are unsure, consult the
428 upstream build documentation, the ``./configure --help`` output, and
429 the upstream change log or release notes. Once you have worked out
430 what the appropriate change is, you can update
431 :term:`EXTRA_OECONF`,
432 :term:`PACKAGECONFIG_CONFARGS`, or the
433 individual :term:`PACKAGECONFIG` option values
434 accordingly.
435 239
436   240.. _qa-check-desktop:
437.. _qa-check-pn-overrides:
438 241
439- ``Recipe <recipefile> has PN of "<recipename>" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]`` 242- ``"Desktop file issue: ... [desktop]``
440 243
441 The specified recipe has a name (:term:`PN`) value that 244 Runs the ``desktop-file-validate`` program against any
442 appears in :term:`OVERRIDES`. If a recipe is named 245 ``.desktop`` files to validate their contents against the
443 such that its :term:`PN` value matches something already in :term:`OVERRIDES` 246 specification for ``.desktop`` files.
444 (e.g. :term:`PN` happens to be the same as :term:`MACHINE`
445 or :term:`DISTRO`), it can have unexpected
446 consequences. For example, assignments such as
447 ``FILES:${PN} = "xyz"`` effectively turn into ``FILES = "xyz"``.
448 Rename your recipe (or if :term:`PN` is being set explicitly, change the
449 :term:`PN` value) so that the conflict does not occur. See
450 :term:`FILES` for additional information.
451 247
452   248.. _qa-check-dev-so:
453.. _qa-check-pkgvarcheck:
454 249
455- ``<recipefile>: Variable <variable> is set as not being package specific, please fix this. [pkgvarcheck]`` 250- ``non -dev/-dbg/nativesdk- package contains symlink .so: <packagename> path '<path>' [dev-so]``
456 251
457 Certain variables (:term:`RDEPENDS`, 252 Symlink ``.so`` files are for development only, and should therefore
458 :term:`RRECOMMENDS`, 253 go into the ``-dev`` package. This situation might occur if you add
459 :term:`RSUGGESTS`, 254 ``*.so*`` rather than ``*.so.*`` to a non-dev package. Change
460 :term:`RCONFLICTS`, 255 :term:`FILES` (and possibly
461 :term:`RPROVIDES`, 256 :term:`PACKAGES`) such that the specified ``.so``
462 :term:`RREPLACES`, :term:`FILES`, 257 file goes into an appropriate ``-dev`` package.
463 ``pkg_preinst``, ``pkg_postinst``, ``pkg_prerm``, ``pkg_postrm``, and
464 :term:`ALLOW_EMPTY`) should always be set specific
465 to a package (i.e. they should be set with a package name override
466 such as ``RDEPENDS:${PN} = "value"`` rather than
467 ``RDEPENDS = "value"``). If you receive this error, correct any
468 assignments to these variables within your recipe.
469 258
259.. _qa-check-empty-dirs:
470 260
471- ``recipe uses DEPENDS:${PN}, should use DEPENDS [pkgvarcheck]`` 261- ``<packagename> installs files in <path>, but it is expected to be empty [empty-dirs]``
472 262
473 This check looks for instances of setting ``DEPENDS:${PN}`` 263 The specified package is installing files into a directory that is
474 which is erroneous (:term:`DEPENDS` is a recipe-wide variable and thus 264 normally expected to be empty (such as ``/tmp``). These files may
475 it is not correct to specify it for a particular package, nor will such 265 be more appropriately installed to a different location, or
476 an assignment actually work.) Set :term:`DEPENDS` instead. 266 perhaps alternatively not installed at all, usually by updating the
267 :ref:`ref-tasks-install` task/function.
477 268
269.. _qa-check-file-rdeps:
478 270
479.. _qa-check-already-stripped: 271- ``<packagename> requires <files>, but no providers in its RDEPENDS [file-rdeps]``
480 272
481- ``File '<file>' from <recipename> was already stripped, this will prevent future debugging! [already-stripped]`` 273 A file-level dependency has been identified from the specified
274 package on the specified files, but there is no explicit
275 corresponding entry in :term:`RDEPENDS`. If
276 particular files are required at runtime then :term:`RDEPENDS` should be
277 declared in the recipe to ensure the packages providing them are
278 built.
482 279
483 Produced binaries have already been stripped prior to the build 280.. _qa-check-files-invalid:
484 system extracting debug symbols. It is common for upstream software
485 projects to default to stripping debug symbols for output binaries.
486 In order for debugging to work on the target using ``-dbg`` packages,
487 this stripping must be disabled.
488 281
489 Depending on the build system used by the software being built, 282- ``FILES variable for package <packagename> contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]``
490 disabling this stripping could be as easy as specifying an additional
491 configure option. If not, disabling stripping might involve patching
492 the build scripts. In the latter case, look for references to "strip"
493 or "STRIP", or the "-s" or "-S" command-line options being specified
494 on the linker command line (possibly through the compiler command
495 line if preceded with "-Wl,").
496 283
497 .. note:: 284 The string "//" is invalid in a Unix path. Correct all occurrences
285 where this string appears in a :term:`FILES` variable so
286 that there is only a single "/".
498 287
499 Disabling stripping here does not mean that the final packaged 288.. _qa-check-host-user-contaminated:
500 binaries will be unstripped. Once the OpenEmbedded build system
501 splits out debug symbols to the ``-dbg`` package, it will then
502 strip the symbols from the binaries.
503 289
504   290- ``<package name>: <path> is owned by gid/uid <gid/uid>, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]``
505.. _qa-check-packages-list:
506 291
507- ``<packagename> is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]`` 292 Checks that no package produced by the
293 recipe contains any files outside of ``/home`` with a user or group
294 ID that matches the user running BitBake. A match usually indicates
295 that the files are being installed with an incorrect UID/GID, since
296 target IDs are independent from host IDs. For additional information,
297 see the section describing the
298 :ref:`ref-tasks-install` task.
508 299
509 Package names must appear only once in the 300.. _qa-check-infodir:
510 :term:`PACKAGES` variable. You might receive this
511 error if you are attempting to add a package to :term:`PACKAGES` that is
512 already in the variable's value.
513 301
514   302- ``The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]``
515.. _qa-check-files-invalid:
516 303
517- ``FILES variable for package <packagename> contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]`` 304 The ``/usr/share/info/dir`` should not be packaged. Add the following
305 line to your :ref:`ref-tasks-install` task or to your
306 ``do_install:append`` within the recipe as follows::
518 307
519 The string "//" is invalid in a Unix path. Correct all occurrences 308 rm ${D}${infodir}/dir
520 where this string appears in a :term:`FILES` variable so
521 that there is only a single "/".
522 309
523  
524.. _qa-check-installed-vs-shipped: 310.. _qa-check-installed-vs-shipped:
525 311
526- ``<recipename>: Files/directories were installed but not shipped in any package [installed-vs-shipped]`` 312- ``<recipename>: Files/directories were installed but not shipped in any package [installed-vs-shipped]``
@@ -539,8 +325,6 @@ Errors and Warnings
539 - Delete the files at the end of the :ref:`ref-tasks-install` task if the 325 - Delete the files at the end of the :ref:`ref-tasks-install` task if the
540 files are not needed in any package. 326 files are not needed in any package.
541 327
542  
543
544- ``<oldpackage>-<oldpkgversion> was registered as shlib provider for <library>, changing it to <newpackage>-<newpkgversion> because it was built later`` 328- ``<oldpackage>-<oldpkgversion> was registered as shlib provider for <library>, changing it to <newpackage>-<newpkgversion> because it was built later``
545 329
546 This message means that both ``<oldpackage>`` and ``<newpackage>`` 330 This message means that both ``<oldpackage>`` and ``<newpackage>``
@@ -552,27 +336,73 @@ Errors and Warnings
552 :term:`PRIVATE_LIBS` in the recipe that provides 336 :term:`PRIVATE_LIBS` in the recipe that provides
553 the private version of the library. 337 the private version of the library.
554 338
339.. _qa-check-incompatible-license:
555 340
556.. _qa-check-unlisted-pkg-lics: 341- ``Excluding <package> from packaging as it has incompatible license(s): <license> [incompatible-license]``
557 342
558- ``LICENSE:<packagename> includes licenses (<licenses>) that are not listed in LICENSE [unlisted-pkg-lics]`` 343 Report when packages are excluded from being created due to being marked with
344 a license that is in :term:`INCOMPATIBLE_LICENSE`.
559 345
560 The :term:`LICENSE` of the recipe should be a superset 346.. _qa-check-invalid-chars:
561 of all the licenses of all packages produced by this recipe. In other
562 words, any license in ``LICENSE:*`` should also appear in
563 :term:`LICENSE`.
564 347
348- ``<variable> has non <envoding> characters [invalid-chars]``
565 349
566.. _qa-check-configure-gettext: 350 Checks that the recipe metadata variables :term:`DESCRIPTION`,
351 :term:`SUMMARY`, :term:`LICENSE`, and :term:`SECTION` do not contain
352 non-UTF-8 characters. Some package managers do not support such characters.
567 353
568- ``AM_GNU_GETTEXT used but no inherit gettext [configure-gettext]`` 354.. _qa-check-invalid-packageconfig:
569 355
570 If a recipe is building something that uses automake and the automake 356- ``<package>: invalid PACKAGECONFIG(s): <configs> [invalid-packageconfig]``
571 files contain an ``AM_GNU_GETTEXT`` directive then this check will fail 357
572 if there is no ``inherit gettext`` statement in the recipe to ensure 358 Checks that no undefined features are being added to :term:`PACKAGECONFIG`.
573 that gettext is available during the build. Add ``inherit gettext`` to 359 For example, any name "foo" for which the following form does not exist::
574 remove the warning. 360
361 PACKAGECONFIG[foo] = "..."
362
363.. _qa-check-la:
364
365- ``<file> failed sanity test (workdir) in path <path> [la]``
366
367 The specified ``.la`` file contains :term:`TMPDIR`
368 paths. Any ``.la`` file containing these paths is incorrect since
369 ``libtool`` adds the correct sysroot prefix when using the files
370 automatically itself.
371
372.. _qa-check-ldflags:
373
374- ``File '<file>' in package '<package>' doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]``
375
376 This indicates that binaries produced when building the recipe have
377 not been linked with the :term:`LDFLAGS` options
378 provided by the build system. Check to be sure that the :term:`LDFLAGS`
379 variable is being passed to the linker command. A common workaround
380 for this situation is to pass in :term:`LDFLAGS` using
381 :term:`TARGET_CC_ARCH` within the recipe as
382 follows::
383
384 TARGET_CC_ARCH += "${LDFLAGS}"
385
386.. _qa-check-libdir:
387
388- ``<packagename>: found library in wrong location [libdir]``
389
390 The specified file may have been installed into an incorrect
391 (possibly hardcoded) installation path. For example, this test will
392 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
393 "lib32". Another example is when recipes install
394 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". False
395 positives occasionally exist. For these cases add "libdir" to
396 :term:`INSANE_SKIP` for the package.
575 397
398.. _qa-check-libexec:
399
400- ``<packagename>: <path> is using libexec please relocate to <libexecdir> [libexec]``
401
402 The specified package contains files in ``/usr/libexec`` when the
403 distro configuration uses a different path for ``<libexecdir>`` By
404 default, ``<libexecdir>`` is ``$prefix/libexec``. However, this
405 default can be changed (e.g. ``${libdir}``).
576 406
577.. _qa-check-mime: 407.. _qa-check-mime:
578 408
@@ -584,7 +414,6 @@ Errors and Warnings
584 properly installed. Either add ``inherit mime`` to the recipe or remove the 414 properly installed. Either add ``inherit mime`` to the recipe or remove the
585 files at the :ref:`ref-tasks-install` step if they are not needed. 415 files at the :ref:`ref-tasks-install` step if they are not needed.
586 416
587
588.. _qa-check-mime-xdg: 417.. _qa-check-mime-xdg:
589 418
590- ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: <packagename> path '<file>' [mime-xdg]`` 419- ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: <packagename> path '<file>' [mime-xdg]``
@@ -595,40 +424,6 @@ Errors and Warnings
595 ``inherit mime`` to the recipe or remove the files at the 424 ``inherit mime`` to the recipe or remove the files at the
596 :ref:`ref-tasks-install` step if they are not needed. 425 :ref:`ref-tasks-install` step if they are not needed.
597 426
598
599.. _qa-check-src-uri-bad:
600
601- ``<recipename>: SRC_URI uses unstable GitHub archives [src-uri-bad]``
602
603 GitHub provides "archive" tarballs, however these can be re-generated
604 on the fly and thus the file's signature will not necessarily match that
605 in the :term:`SRC_URI` checksums in future leading to build failures. It is
606 recommended that you use an official release tarball or switch to
607 pulling the corresponding revision in the actual git repository instead.
608
609
610- ``SRC_URI uses PN not BPN [src-uri-bad]``
611
612 If some part of :term:`SRC_URI` needs to reference the recipe name, it should do
613 so using ${:term:`BPN`} rather than ${:term:`PN`} as the latter will change
614 for different variants of the same recipe e.g. when :term:`BBCLASSEXTEND`
615 or multilib are being used. This check will fail if a reference to ``${PN}``
616 is found within the :term:`SRC_URI` value --- change it to ``${BPN}`` instead.
617
618
619.. _qa-check-unhandled-features-check:
620
621- ``<recipename>: recipe doesn't inherit features_check [unhandled-features-check]``
622
623 This check ensures that if one of the variables that the
624 :ref:`ref-classes-features_check` class supports (e.g.
625 :term:`REQUIRED_DISTRO_FEATURES`) is used, then the recipe
626 inherits :ref:`ref-classes-features_check` in order for
627 the requirement to actually work. If you are seeing this message, either
628 add ``inherit features_check`` to your recipe or remove the reference to
629 the variable if it is not needed.
630
631
632.. _qa-check-missing-update-alternatives: 427.. _qa-check-missing-update-alternatives:
633 428
634- ``<recipename>: recipe defines ALTERNATIVE:<packagename> but doesn't inherit update-alternatives. This might fail during do_rootfs later! [missing-update-alternatives]`` 429- ``<recipename>: recipe defines ALTERNATIVE:<packagename> but doesn't inherit update-alternatives. This might fail during do_rootfs later! [missing-update-alternatives]``
@@ -639,41 +434,14 @@ Errors and Warnings
639 add ``inherit update-alternatives`` to your recipe or remove the reference to the variable 434 add ``inherit update-alternatives`` to your recipe or remove the reference to the variable
640 if it is not needed. 435 if it is not needed.
641 436
437.. _qa-check-packages-list:
642 438
643.. _qa-check-shebang-size: 439- ``<packagename> is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]``
644
645- ``<packagename>: <file> maximum shebang size exceeded, the maximum size is 128. [shebang-size]``
646
647 This check ensures that the shebang line (``#!`` in the first line) for a script
648 is not longer than 128 characters, which can cause an error at runtime depending
649 on the operating system. If you are seeing this message then the specified script
650 may need to be patched to have a shorter in order to avoid runtime problems.
651
652
653.. _qa-check-perllocalpod:
654
655- ``<packagename> contains perllocal.pod (<files>), should not be installed [perllocalpod]``
656
657 ``perllocal.pod`` is an index file of locally installed modules and so shouldn't be
658 installed by any distribution packages. The :ref:`ref-classes-cpan` class
659 already sets ``NO_PERLLOCAL`` to stop this file being generated by most Perl recipes,
660 but if a recipe is using ``MakeMaker`` directly then they might not be doing this
661 correctly. This check ensures that perllocal.pod is not in any package in order to
662 avoid multiple packages shipping this file and thus their packages conflicting
663 if installed together.
664
665
666.. _qa-check-usrmerge:
667
668- ``<packagename> package is not obeying usrmerge distro feature. /<path> should be relocated to /usr. [usrmerge]``
669
670 If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this check will ensure that no package
671 installs files to root (``/bin``, ``/sbin``, ``/lib``, ``/lib64``) directories. If you are seeing this
672 message, it indicates that the :ref:`ref-tasks-install` step (or perhaps the build process that
673 :ref:`ref-tasks-install` is calling into, e.g. ``make install`` is using hardcoded paths instead
674 of the variables set up for this (``bindir``, ``sbindir``, etc.), and should be
675 changed so that it does.
676 440
441 Package names must appear only once in the
442 :term:`PACKAGES` variable. You might receive this
443 error if you are attempting to add a package to :term:`PACKAGES` that is
444 already in the variable's value.
677 445
678.. _qa-check-patch-fuzz: 446.. _qa-check-patch-fuzz:
679 447
@@ -749,7 +517,6 @@ Errors and Warnings
749 the patch updates that modify the context. Devtool may also refresh 517 the patch updates that modify the context. Devtool may also refresh
750 other things in the patches, those can be discarded. 518 other things in the patches, those can be discarded.
751 519
752
753.. _qa-check-patch-status: 520.. _qa-check-patch-status:
754 521
755- ``Missing Upstream-Status in patch <patchfile> Please add according to <url> [patch-status]`` 522- ``Missing Upstream-Status in patch <patchfile> Please add according to <url> [patch-status]``
@@ -768,22 +535,208 @@ Errors and Warnings
768 it must be a specific format. See the "Missing Upstream-Status" entry above 535 it must be a specific format. See the "Missing Upstream-Status" entry above
769 for more information. 536 for more information.
770 537
538.. _qa-check-pep517-backend:
771 539
772.. _qa-check-buildpaths: 540- ``inherits setuptools3 but has pyproject.toml with <build backend>, use the correct class [pep517-backend]``
773 541
774- ``File <filename> in package <packagename> contains reference to TMPDIR [buildpaths]`` 542 Checks that a recipe inheriting :ref:`ref-classes-setuptools3` has a
543 PEP517-compliant backend.
775 544
776 This check ensures that build system paths (including :term:`TMPDIR`) do not 545.. _qa-check-perllocalpod:
777 appear in output files, which not only leaks build system configuration into
778 the target, but also hinders binary reproducibility as the output will change
779 if the build system configuration changes.
780 546
781 Typically these paths will enter the output through some mechanism in the 547- ``<packagename> contains perllocal.pod (<files>), should not be installed [perllocalpod]``
782 configuration or compilation of the software being built by the recipe. To 548
783 resolve this issue you will need to determine how the detected path is 549 ``perllocal.pod`` is an index file of locally installed modules and so shouldn't be
784 entering the output. Sometimes it may require adjusting scripts or code to 550 installed by any distribution packages. The :ref:`ref-classes-cpan` class
785 use a relative path rather than an absolute one, or to pick up the path from 551 already sets ``NO_PERLLOCAL`` to stop this file being generated by most Perl recipes,
786 runtime configuration or environment variables. 552 but if a recipe is using ``MakeMaker`` directly then they might not be doing this
553 correctly. This check ensures that perllocal.pod is not in any package in order to
554 avoid multiple packages shipping this file and thus their packages conflicting
555 if installed together.
556
557.. _qa-check-perm-config:
558
559- ``Fixup Perms: invalid config line <line> [perm-config]``
560
561 Reports lines in ``fs-perms.txt`` that have an invalid format.
562
563.. _qa-check-perm-line:
564
565- ``Fixup perms: <config> invalid line: <line> [perm-line]``
566
567 Reports lines in ``fs-perms.txt`` that have an invalid format.
568
569.. _qa-check-perm-link:
570
571- ``Fixup Perms: Unable to correct directory link, target already exists: <directory> -> <target> [perm-link]``
572
573 Reports lines in ``fs-perms.txt`` that specify 'link' where the specified
574 target already exists.
575
576.. _qa-check-perms:
577
578- ``perms``: Currently, this check is unused but reserved.
579
580.. _qa-check-pkgconfig:
581
582- ``<file> failed sanity test (tmpdir) in path <path> [pkgconfig]``
583
584 The specified ``.pc`` file contains
585 :term:`TMPDIR`\ ``/``\ :term:`WORKDIR`
586 paths. Any ``.pc`` file containing these paths is incorrect since
587 ``pkg-config`` itself adds the correct sysroot prefix when the files
588 are accessed.
589
590.. _qa-check-pkgname:
591
592- ``<packagename> doesn't match the [a-z0-9.+-]+ regex [pkgname]``
593
594 The convention within the OpenEmbedded build system (sometimes
595 enforced by the package manager itself) is to require that package
596 names are all lower case and to allow a restricted set of characters.
597 If your recipe name does not match this, or you add packages to
598 :term:`PACKAGES` that do not conform to the
599 convention, then you will receive this error. Rename your recipe. Or,
600 if you have added a non-conforming package name to :term:`PACKAGES`,
601 change the package name appropriately.
602
603.. _qa-check-pkgvarcheck:
604
605- ``<recipefile>: Variable <variable> is set as not being package specific, please fix this. [pkgvarcheck]``
606
607 Certain variables (:term:`RDEPENDS`,
608 :term:`RRECOMMENDS`,
609 :term:`RSUGGESTS`,
610 :term:`RCONFLICTS`,
611 :term:`RPROVIDES`,
612 :term:`RREPLACES`, :term:`FILES`,
613 ``pkg_preinst``, ``pkg_postinst``, ``pkg_prerm``, ``pkg_postrm``, and
614 :term:`ALLOW_EMPTY`) should always be set specific
615 to a package (i.e. they should be set with a package name override
616 such as ``RDEPENDS:${PN} = "value"`` rather than
617 ``RDEPENDS = "value"``). If you receive this error, correct any
618 assignments to these variables within your recipe.
619
620
621- ``recipe uses DEPENDS:${PN}, should use DEPENDS [pkgvarcheck]``
622
623 This check looks for instances of setting ``DEPENDS:${PN}``
624 which is erroneous (:term:`DEPENDS` is a recipe-wide variable and thus
625 it is not correct to specify it for a particular package, nor will such
626 an assignment actually work.) Set :term:`DEPENDS` instead.
627
628.. _qa-check-pn-overrides:
629
630- ``Recipe <recipefile> has PN of "<recipename>" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]``
631
632 The specified recipe has a name (:term:`PN`) value that
633 appears in :term:`OVERRIDES`. If a recipe is named
634 such that its :term:`PN` value matches something already in :term:`OVERRIDES`
635 (e.g. :term:`PN` happens to be the same as :term:`MACHINE`
636 or :term:`DISTRO`), it can have unexpected
637 consequences. For example, assignments such as
638 ``FILES:${PN} = "xyz"`` effectively turn into ``FILES = "xyz"``.
639 Rename your recipe (or if :term:`PN` is being set explicitly, change the
640 :term:`PN` value) so that the conflict does not occur. See
641 :term:`FILES` for additional information.
642
643.. _qa-check-shebang-size:
644
645- ``<packagename>: <file> maximum shebang size exceeded, the maximum size is 128. [shebang-size]``
646
647 This check ensures that the shebang line (``#!`` in the first line) for a script
648 is not longer than 128 characters, which can cause an error at runtime depending
649 on the operating system. If you are seeing this message then the specified script
650 may need to be patched to have a shorter in order to avoid runtime problems.
651
652.. _qa-check-src-uri-bad:
653
654- ``<recipename>: SRC_URI uses unstable GitHub archives [src-uri-bad]``
655
656 GitHub provides "archive" tarballs, however these can be re-generated
657 on the fly and thus the file's signature will not necessarily match that
658 in the :term:`SRC_URI` checksums in future leading to build failures. It is
659 recommended that you use an official release tarball or switch to
660 pulling the corresponding revision in the actual git repository instead.
661
662
663- ``SRC_URI uses PN not BPN [src-uri-bad]``
664
665 If some part of :term:`SRC_URI` needs to reference the recipe name, it should do
666 so using ${:term:`BPN`} rather than ${:term:`PN`} as the latter will change
667 for different variants of the same recipe e.g. when :term:`BBCLASSEXTEND`
668 or multilib are being used. This check will fail if a reference to ``${PN}``
669 is found within the :term:`SRC_URI` value --- change it to ``${BPN}`` instead.
670
671.. _qa-check-staticdev:
672
673- ``non -staticdev package contains static .a library: <packagename> path '<path>' [staticdev]``
674
675 Static ``.a`` library files should go into a ``-staticdev`` package.
676 Change :term:`FILES` (and possibly
677 :term:`PACKAGES`) such that the specified ``.a`` file
678 goes into an appropriate ``-staticdev`` package.
679
680.. _qa-check-symlink-to-sysroot:
681
682- ``Symlink <path> in <packagename> points to TMPDIR [symlink-to-sysroot]``
683
684 The specified symlink points into :term:`TMPDIR` on the
685 host. Such symlinks will work on the host. However, they are clearly
686 invalid when running on the target. You should either correct the
687 symlink to use a relative path or remove the symlink.
688
689.. _qa-check-recipe-naming:
690
691- ``Recipe <recipe> appears native/nativesdk but is not, should inherit native/nativesdk``
692
693 Checks that the recipe name and recipe class match, so that ``*-native``
694 recipes inherit :ref:`ref-classes-native` and ``nativesdk-*`` recipes
695 inherit :ref:`ref-classes-nativesdk`.
696
697.. _qa-check-rpaths:
698
699- ``package <packagename> contains bad RPATH <rpath> in file <file> [rpaths]``
700
701 The specified binary produced by the recipe contains dynamic library
702 load paths (rpaths) that contain build system paths such as
703 :term:`TMPDIR`, which are incorrect for the target and
704 could potentially be a security issue. Check for bad ``-rpath``
705 options being passed to the linker in your
706 :ref:`ref-tasks-compile` log. Depending on the build
707 system used by the software being built, there might be a configure
708 option to disable rpath usage completely within the build of the
709 software.
710
711.. _qa-check-textrel:
712
713- ``ELF binary '<file>' has relocations in .text [textrel]``
714
715 The specified ELF binary contains relocations in its ``.text``
716 sections. This situation can result in a performance impact at
717 runtime.
718
719 Typically, the way to solve this performance issue is to add "-fPIC"
720 or "-fpic" to the compiler command-line options. For example, given
721 software that reads :term:`CFLAGS` when you build it,
722 you could add the following to your recipe::
723
724 CFLAGS:append = " -fPIC "
725
726 For more information on text relocations at runtime, see
727 https://www.akkadia.org/drepper/textrelocs.html.
728
729.. _qa-check-unhandled-features-check:
730
731- ``<recipename>: recipe doesn't inherit features_check [unhandled-features-check]``
732
733 This check ensures that if one of the variables that the
734 :ref:`ref-classes-features_check` class supports (e.g.
735 :term:`REQUIRED_DISTRO_FEATURES`) is used, then the recipe
736 inherits :ref:`ref-classes-features_check` in order for
737 the requirement to actually work. If you are seeing this message, either
738 add ``inherit features_check`` to your recipe or remove the reference to
739 the variable if it is not needed.
787 740
788.. _qa-check-unimplemented-ptest: 741.. _qa-check-unimplemented-ptest:
789 742
@@ -795,6 +748,79 @@ Errors and Warnings
795 section in the Yocto Project Development Tasks Manual. See also the 748 section in the Yocto Project Development Tasks Manual. See also the
796 ":ref:`ref-classes-ptest`" section. 749 ":ref:`ref-classes-ptest`" section.
797 750
751.. _qa-check-unknown-configure-option:
752
753- ``<recipe>: configure was passed unrecognized options: <options> [unknown-configure-option]``
754
755 The configure script is reporting that the specified options are
756 unrecognized. This situation could be because the options were
757 previously valid but have been removed from the configure script. Or,
758 there was a mistake when the options were added and there is another
759 option that should be used instead. If you are unsure, consult the
760 upstream build documentation, the ``./configure --help`` output, and
761 the upstream change log or release notes. Once you have worked out
762 what the appropriate change is, you can update
763 :term:`EXTRA_OECONF`,
764 :term:`PACKAGECONFIG_CONFARGS`, or the
765 individual :term:`PACKAGECONFIG` option values
766 accordingly.
767
768.. _qa-check-unlisted-pkg-lics:
769
770- ``LICENSE:<packagename> includes licenses (<licenses>) that are not listed in LICENSE [unlisted-pkg-lics]``
771
772 The :term:`LICENSE` of the recipe should be a superset
773 of all the licenses of all packages produced by this recipe. In other
774 words, any license in ``LICENSE:*`` should also appear in
775 :term:`LICENSE`.
776
777.. _qa-check-useless-rpaths:
778
779- ``<packagename>: <file> contains probably-redundant RPATH <rpath> [useless-rpaths]``
780
781 The specified binary produced by the recipe contains dynamic library
782 load paths (rpaths) that on a standard system are searched by default
783 by the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths
784 will not cause any breakage, they do waste space and are unnecessary.
785 Depending on the build system used by the software being built, there
786 might be a configure option to disable rpath usage completely within
787 the build of the software.
788
789.. _qa-check-usrmerge:
790
791- ``<packagename> package is not obeying usrmerge distro feature. /<path> should be relocated to /usr. [usrmerge]``
792
793 If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this check will ensure that no package
794 installs files to root (``/bin``, ``/sbin``, ``/lib``, ``/lib64``) directories. If you are seeing this
795 message, it indicates that the :ref:`ref-tasks-install` step (or perhaps the build process that
796 :ref:`ref-tasks-install` is calling into, e.g. ``make install`` is using hardcoded paths instead
797 of the variables set up for this (``bindir``, ``sbindir``, etc.), and should be
798 changed so that it does.
799
800.. _qa-check-var-undefined:
801
802- ``WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package [var-undefined]``
803
804 Reports when variables fundamental to packaging (i.e. :term:`WORKDIR`,
805 :term:`DEPLOY_DIR`, :term:`D`, :term:`PN`, and :term:`PKGD`) are undefined
806 during :ref:`ref-tasks-package`.
807
808.. _qa-check-version-going-backwards:
809
810- ``Package version for package <package> went backwards which would break package feeds (from <version2> to <version1>) [version-going-backwards]``
811
812 If the :ref:`ref-classes-buildhistory` class is enabled, reports when a
813 package being written out has a lower version than the previously written
814 package under the same name. If you are placing output packages into a feed
815 and upgrading packages on a target system using that feed, the version of a
816 package going backwards can result in the target system not correctly
817 upgrading to the "new" version of the package.
818
819 .. note::
820
821 This is only relevant when you are using runtime package management
822 on your target system.
823
798.. _qa-check-virtual-slash: 824.. _qa-check-virtual-slash:
799 825
800- ``<variable> is set to <value> but the substring 'virtual/' holds no meaning in this context. It only works for build time dependencies, not runtime ones. It is suggested to use 'VIRTUAL-RUNTIME_' variables instead.`` 826- ``<variable> is set to <value> but the substring 'virtual/' holds no meaning in this context. It only works for build time dependencies, not runtime ones. It is suggested to use 'VIRTUAL-RUNTIME_' variables instead.``
@@ -804,6 +830,17 @@ Errors and Warnings
804 context (i.e. :term:`RPROVIDES` and :term:`RDEPENDS`). Use 830 context (i.e. :term:`RPROVIDES` and :term:`RDEPENDS`). Use
805 :term:`VIRTUAL-RUNTIME` variables instead for the latter. 831 :term:`VIRTUAL-RUNTIME` variables instead for the latter.
806 832
833.. _qa-check-xorg-driver-abi:
834
835- ``Package <packagename> contains Xorg driver (<driver>) but no xorg-abi- dependencies [xorg-driver-abi]``
836
837 The specified package contains an Xorg driver, but does not have a
838 corresponding ABI package dependency. The xserver-xorg recipe
839 provides driver ABI names. All drivers should depend on the ABI
840 versions that they have been built against. Driver recipes that
841 include ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will
842 automatically get these versions. Consequently, you should only need
843 to explicitly add dependencies to binary driver recipes.
807 844
808Configuring and Disabling QA Checks 845Configuring and Disabling QA Checks
809=================================== 846===================================