summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonin Godard <antonin.godard@bootlin.com>2025-10-10 09:31:57 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-14 11:36:58 +0100
commit3aa2914a082562752859b48a24801233e2af9160 (patch)
tree6cb5fee61b39e37b92e88085de5c7dcb94e30c28
parentae8b6bae175705ec365069926202cbcf82f4a694 (diff)
downloadpoky-3aa2914a082562752859b48a24801233e2af9160.tar.gz
ref-manual/qa-checks.rst: fix references
The references in this document do not work because references need to be associated to a title. Change the bullet list into a section separated document. This way we can cross-reference QA checks in other parts of the documentation (it was previously failing when attempted). The diff is a bit hard to digest, but there are no changes to content except for: - A fixed typo (inhert -> inherit) - Indentation (From yocto-docs rev: 93c30b8a430a981e8b89061c968a006a3e086353) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/ref-manual/qa-checks.rst1104
1 files changed, 643 insertions, 461 deletions
diff --git a/documentation/ref-manual/qa-checks.rst b/documentation/ref-manual/qa-checks.rst
index 69ecad74b1..9dfbbff02d 100644
--- a/documentation/ref-manual/qa-checks.rst
+++ b/documentation/ref-manual/qa-checks.rst
@@ -45,31 +45,37 @@ Errors and Warnings
45 45
46.. _qa-check-already-stripped: 46.. _qa-check-already-stripped:
47 47
48- ``File '<file>' from <recipename> was already stripped, this will prevent future debugging! [already-stripped]`` 48``already-stripped``
49--------------------
49 50
50 Produced binaries have already been stripped prior to the build 51``File '<file>' from <recipename> was already stripped, this will prevent future debugging! [already-stripped]``
51 system extracting debug symbols. It is common for upstream software
52 projects to default to stripping debug symbols for output binaries.
53 In order for debugging to work on the target using ``-dbg`` packages,
54 this stripping must be disabled.
55 52
56 Depending on the build system used by the software being built, 53Produced binaries have already been stripped prior to the build
57 disabling this stripping could be as easy as specifying an additional 54system extracting debug symbols. It is common for upstream software
58 configure option. If not, disabling stripping might involve patching 55projects to default to stripping debug symbols for output binaries.
59 the build scripts. In the latter case, look for references to "strip" 56In order for debugging to work on the target using ``-dbg`` packages,
60 or "STRIP", or the "-s" or "-S" command-line options being specified 57this stripping must be disabled.
61 on the linker command line (possibly through the compiler command
62 line if preceded with "-Wl,").
63 58
64 .. note:: 59Depending on the build system used by the software being built,
60disabling this stripping could be as easy as specifying an additional
61configure option. If not, disabling stripping might involve patching
62the build scripts. In the latter case, look for references to "strip"
63or "STRIP", or the "-s" or "-S" command-line options being specified
64on the linker command line (possibly through the compiler command
65line if preceded with "-Wl,").
65 66
66 Disabling stripping here does not mean that the final packaged 67.. note::
67 binaries will be unstripped. Once the OpenEmbedded build system 68
68 splits out debug symbols to the ``-dbg`` package, it will then 69 Disabling stripping here does not mean that the final packaged
69 strip the symbols from the binaries. 70 binaries will be unstripped. Once the OpenEmbedded build system
71 splits out debug symbols to the ``-dbg`` package, it will then
72 strip the symbols from the binaries.
70 73
71.. _qa-check-arch: 74.. _qa-check-arch:
72 75
76``arch``
77--------
78
73- ``Architecture did not match (<file_arch>, expected <machine_arch>) in <file> [arch]`` 79- ``Architecture did not match (<file_arch>, expected <machine_arch>) in <file> [arch]``
74 80
75 By default, the OpenEmbedded build system checks the Executable and 81 By default, the OpenEmbedded build system checks the Executable and
@@ -120,488 +126,591 @@ Errors and Warnings
120 126
121.. _qa-check-build-deps: 127.. _qa-check-build-deps:
122 128
123- ``<packagename1> rdepends on <packagename2>, but it isn't a build dependency? [build-deps]`` 129``build-deps``
130--------------
124 131
125 There is a runtime dependency between the two specified packages, but 132``<packagename1> rdepends on <packagename2>, but it isn't a build dependency? [build-deps]``
126 there is nothing explicit within the recipe to enable the 133
127 OpenEmbedded build system to ensure that dependency is satisfied. 134There is a runtime dependency between the two specified packages, but
128 This condition is usually triggered by an 135there is nothing explicit within the recipe to enable the
129 :term:`RDEPENDS` value being added at the packaging 136OpenEmbedded build system to ensure that dependency is satisfied.
130 stage rather than up front, which is usually automatic based on the 137This condition is usually triggered by an
131 contents of the package. In most cases, you should change the recipe 138:term:`RDEPENDS` value being added at the packaging
132 to add an explicit :term:`RDEPENDS` for the dependency. 139stage rather than up front, which is usually automatic based on the
140contents of the package. In most cases, you should change the recipe
141to add an explicit :term:`RDEPENDS` for the dependency.
133 142
134.. _qa-check-buildpaths: 143.. _qa-check-buildpaths:
135 144
136- ``File <filename> in package <packagename> contains reference to TMPDIR [buildpaths]`` 145``buildpaths``
146--------------
147
148``File <filename> in package <packagename> contains reference to TMPDIR [buildpaths]``
137 149
138 This check ensures that build system paths (including :term:`TMPDIR`) do not 150This check ensures that build system paths (including :term:`TMPDIR`) do not
139 appear in output files, which not only leaks build system configuration into 151appear in output files, which not only leaks build system configuration into
140 the target, but also hinders binary reproducibility as the output will change 152the target, but also hinders binary reproducibility as the output will change
141 if the build system configuration changes. 153if the build system configuration changes.
142 154
143 Typically these paths will enter the output through some mechanism in the 155Typically these paths will enter the output through some mechanism in the
144 configuration or compilation of the software being built by the recipe. To 156configuration or compilation of the software being built by the recipe. To
145 resolve this issue you will need to determine how the detected path is 157resolve this issue you will need to determine how the detected path is
146 entering the output. Sometimes it may require adjusting scripts or code to 158entering 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 159use a relative path rather than an absolute one, or to pick up the path from
148 runtime configuration or environment variables. 160runtime configuration or environment variables.
149 161
150.. _qa-check-configure-gettext: 162.. _qa-check-configure-gettext:
151 163
152- ``AM_GNU_GETTEXT used but no inherit gettext [configure-gettext]`` 164``configure-gettext``
165---------------------
153 166
154 If a recipe is building something that uses automake and the automake 167``AM_GNU_GETTEXT used but no inherit gettext [configure-gettext]``
155 files contain an ``AM_GNU_GETTEXT`` directive then this check will fail 168
156 if there is no ``inherit gettext`` statement in the recipe to ensure 169If a recipe is building something that uses automake and the automake
157 that gettext is available during the build. Add ``inherit gettext`` to 170files contain an ``AM_GNU_GETTEXT`` directive then this check will fail
158 remove the warning. 171if there is no ``inherit gettext`` statement in the recipe to ensure
172that gettext is available during the build. Add ``inherit gettext`` to
173remove the warning.
159 174
160.. _qa-check-configure-unsafe: 175.. _qa-check-configure-unsafe:
161 176
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]`` 177``configure-unsafe``
178--------------------
179
180``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]``
163 181
164 The log for the :ref:`ref-tasks-configure` task 182The log for the :ref:`ref-tasks-configure` task
165 indicates that paths on the host were searched for files, which is 183indicates that paths on the host were searched for files, which is
166 not appropriate when cross-compiling. Look for "is unsafe for 184not appropriate when cross-compiling. Look for "is unsafe for
167 cross-compilation" or "CROSS COMPILE Badness" in the specified log 185cross-compilation" or "CROSS COMPILE Badness" in the specified log
168 file. 186file.
169 187
170.. _qa-check-debug-deps: 188.. _qa-check-debug-deps:
171 189
172- ``<packagename> rdepends on <debug_packagename> [debug-deps]`` 190``debug-deps``
191--------------
173 192
174 There is a dependency between the specified non-dbg package (i.e. a 193``<packagename> rdepends on <debug_packagename> [debug-deps]``
175 package whose name does not end in ``-dbg``) and a package that is a
176 ``dbg`` package. The ``dbg`` packages contain debug symbols and are
177 brought in using several different methods:
178 194
179 - Using the ``dbg-pkgs`` 195There is a dependency between the specified non-dbg package (i.e. a
180 :term:`IMAGE_FEATURES` value. 196package whose name does not end in ``-dbg``) and a package that is a
197``dbg`` package. The ``dbg`` packages contain debug symbols and are
198brought in using several different methods:
181 199
182 - Using :term:`IMAGE_INSTALL`. 200- Using the ``dbg-pkgs``
201 :term:`IMAGE_FEATURES` value.
183 202
184 - As a dependency of another ``dbg`` package that was brought in 203- Using :term:`IMAGE_INSTALL`.
185 using one of the above methods.
186 204
187 The dependency might have been automatically added because the 205- As a dependency of another ``dbg`` package that was brought in
188 ``dbg`` package erroneously contains files that it should not contain 206 using one of the above methods.
189 (e.g. a non-symlink ``.so`` file) or it might have been added 207
190 manually (e.g. by adding to :term:`RDEPENDS`). 208The dependency might have been automatically added because the
209``dbg`` package erroneously contains files that it should not contain
210(e.g. a non-symlink ``.so`` file) or it might have been added
211manually (e.g. by adding to :term:`RDEPENDS`).
191 212
192.. _qa-check-debug-files: 213.. _qa-check-debug-files:
193 214
194- ``non debug package contains .debug directory: <packagename> path <path> [debug-files]`` 215``debug-files``
216---------------
217
218``non debug package contains .debug directory: <packagename> path <path> [debug-files]``
195 219
196 The specified package contains a ``.debug`` directory, which should 220The specified package contains a ``.debug`` directory, which should
197 not appear in anything but the ``-dbg`` package. This situation might 221not appear in anything but the ``-dbg`` package. This situation might
198 occur if you add a path which contains a ``.debug`` directory and do 222occur if you add a path which contains a ``.debug`` directory and do
199 not explicitly add the ``.debug`` directory to the ``-dbg`` package. 223not explicitly add the ``.debug`` directory to the ``-dbg`` package.
200 If this is the case, add the ``.debug`` directory explicitly to 224If this is the case, add the ``.debug`` directory explicitly to
201 ``FILES:${PN}-dbg``. See :term:`FILES` for additional 225``FILES:${PN}-dbg``. See :term:`FILES` for additional
202 information on :term:`FILES`. 226information on :term:`FILES`.
203 227
204.. _qa-check-dep-cmp: 228.. _qa-check-dep-cmp:
205 229
206- ``<var>:<packagename> is invalid: <comparison> (<value>) only comparisons <, =, >, <=, and >= are allowed [dep-cmp]`` 230``dep-cmp``
231-----------
207 232
208 If you are adding a versioned dependency relationship to one of the 233``<var>:<packagename> is invalid: <comparison> (<value>) only comparisons <, =, >, <=, and >= are allowed [dep-cmp]``
209 dependency variables (:term:`RDEPENDS`, 234
210 :term:`RRECOMMENDS`, 235If you are adding a versioned dependency relationship to one of the
211 :term:`RSUGGESTS`, 236dependency variables (:term:`RDEPENDS`,
212 :term:`RPROVIDES`, 237:term:`RRECOMMENDS`,
213 :term:`RREPLACES`, or 238:term:`RSUGGESTS`,
214 :term:`RCONFLICTS`), you must only use the named 239:term:`RPROVIDES`,
215 comparison operators. Change the versioned dependency values you are 240:term:`RREPLACES`, or
216 adding to match those listed in the message. 241:term:`RCONFLICTS`), you must only use the named
242comparison operators. Change the versioned dependency values you are
243adding to match those listed in the message.
217 244
218.. _qa-check-dev-deps: 245.. _qa-check-dev-deps:
219 246
220- ``<packagename> rdepends on <dev_packagename> [dev-deps]`` 247``dev-deps``
248------------
249
250``<packagename> rdepends on <dev_packagename> [dev-deps]``
221 251
222 There is a dependency between the specified non-dev package (a package 252There 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`` 253whose name does not end in ``-dev``) and a package that is a ``dev``
224 package. The ``dev`` packages contain development headers and are 254package. The ``dev`` packages contain development headers and are
225 usually brought in using several different methods: 255usually brought in using several different methods:
226 256
227 - Using the ``dev-pkgs`` 257- Using the ``dev-pkgs``
228 :term:`IMAGE_FEATURES` value. 258 :term:`IMAGE_FEATURES` value.
229 259
230 - Using :term:`IMAGE_INSTALL`. 260- Using :term:`IMAGE_INSTALL`.
231 261
232 - As a dependency of another ``dev`` package that was brought in 262- As a dependency of another ``dev`` package that was brought in
233 using one of the above methods. 263 using one of the above methods.
234 264
235 The dependency might have been automatically added (because the 265The dependency might have been automatically added (because the
236 ``dev`` package erroneously contains files that it should not have 266``dev`` package erroneously contains files that it should not have
237 (e.g. a non-symlink ``.so`` file) or it might have been added 267(e.g. a non-symlink ``.so`` file) or it might have been added
238 manually (e.g. by adding to :term:`RDEPENDS`). 268manually (e.g. by adding to :term:`RDEPENDS`).
239 269
240.. _qa-check-desktop: 270.. _qa-check-desktop:
241 271
242- ``"Desktop file issue: ... [desktop]`` 272``desktop``
273-----------
243 274
244 Runs the ``desktop-file-validate`` program against any 275``"Desktop file issue: ... [desktop]``
245 ``.desktop`` files to validate their contents against the 276
246 specification for ``.desktop`` files. 277Runs the ``desktop-file-validate`` program against any
278``.desktop`` files to validate their contents against the
279specification for ``.desktop`` files.
247 280
248.. _qa-check-dev-so: 281.. _qa-check-dev-so:
249 282
250- ``non -dev/-dbg/nativesdk- package contains symlink .so: <packagename> path '<path>' [dev-so]`` 283``dev-so``
284----------
285
286``non -dev/-dbg/nativesdk- package contains symlink .so: <packagename> path '<path>' [dev-so]``
251 287
252 Symlink ``.so`` files are for development only, and should therefore 288Symlink ``.so`` files are for development only, and should therefore
253 go into the ``-dev`` package. This situation might occur if you add 289go into the ``-dev`` package. This situation might occur if you add
254 ``*.so*`` rather than ``*.so.*`` to a non-dev package. Change 290``*.so*`` rather than ``*.so.*`` to a non-dev package. Change
255 :term:`FILES` (and possibly 291:term:`FILES` (and possibly
256 :term:`PACKAGES`) such that the specified ``.so`` 292:term:`PACKAGES`) such that the specified ``.so``
257 file goes into an appropriate ``-dev`` package. 293file goes into an appropriate ``-dev`` package.
258 294
259.. _qa-check-empty-dirs: 295.. _qa-check-empty-dirs:
260 296
261- ``<packagename> installs files in <path>, but it is expected to be empty [empty-dirs]`` 297``empty-dirs``
298--------------
262 299
263 The specified package is installing files into a directory that is 300``<packagename> installs files in <path>, but it is expected to be empty [empty-dirs]``
264 normally expected to be empty (such as ``/tmp``). These files may 301
265 be more appropriately installed to a different location, or 302The specified package is installing files into a directory that is
266 perhaps alternatively not installed at all, usually by updating the 303normally expected to be empty (such as ``/tmp``). These files may
267 :ref:`ref-tasks-install` task/function. 304be more appropriately installed to a different location, or
305perhaps alternatively not installed at all, usually by updating the
306:ref:`ref-tasks-install` task/function.
268 307
269.. _qa-check-file-rdeps: 308.. _qa-check-file-rdeps:
270 309
271- ``<packagename> requires <files>, but no providers in its RDEPENDS [file-rdeps]`` 310``file-rdeps``
311--------------
312
313``<packagename> requires <files>, but no providers in its RDEPENDS [file-rdeps]``
272 314
273 A file-level dependency has been identified from the specified 315A file-level dependency has been identified from the specified
274 package on the specified files, but there is no explicit 316package on the specified files, but there is no explicit
275 corresponding entry in :term:`RDEPENDS`. If 317corresponding entry in :term:`RDEPENDS`. If
276 particular files are required at runtime then :term:`RDEPENDS` should be 318particular files are required at runtime then :term:`RDEPENDS` should be
277 declared in the recipe to ensure the packages providing them are 319declared in the recipe to ensure the packages providing them are
278 built. 320built.
279 321
280.. _qa-check-files-invalid: 322.. _qa-check-files-invalid:
281 323
282- ``FILES variable for package <packagename> contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]`` 324``files-invalid``
325-----------------
283 326
284 The string "//" is invalid in a Unix path. Correct all occurrences 327``FILES variable for package <packagename> contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]``
285 where this string appears in a :term:`FILES` variable so 328
286 that there is only a single "/". 329The string "//" is invalid in a Unix path. Correct all occurrences
330where this string appears in a :term:`FILES` variable so
331that there is only a single "/".
287 332
288.. _qa-check-host-user-contaminated: 333.. _qa-check-host-user-contaminated:
289 334
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]`` 335``host-user-contaminated``
336--------------------------
337
338``<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]``
291 339
292 Checks that no package produced by the 340Checks that no package produced by the
293 recipe contains any files outside of ``/home`` with a user or group 341recipe contains any files outside of ``/home`` with a user or group
294 ID that matches the user running BitBake. A match usually indicates 342ID that matches the user running BitBake. A match usually indicates
295 that the files are being installed with an incorrect UID/GID, since 343that the files are being installed with an incorrect UID/GID, since
296 target IDs are independent from host IDs. For additional information, 344target IDs are independent from host IDs. For additional information,
297 see the section describing the 345see the section describing the
298 :ref:`ref-tasks-install` task. 346:ref:`ref-tasks-install` task.
299 347
300.. _qa-check-infodir: 348.. _qa-check-infodir:
301 349
302- ``The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]`` 350``infodir``
351-----------
303 352
304 The ``/usr/share/info/dir`` should not be packaged. Add the following 353``The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]``
305 line to your :ref:`ref-tasks-install` task or to your
306 ``do_install:append`` within the recipe as follows::
307 354
308 rm ${D}${infodir}/dir 355The ``/usr/share/info/dir`` should not be packaged. Add the following
356line to your :ref:`ref-tasks-install` task or to your
357``do_install:append`` within the recipe as follows::
309 358
310.. _qa-check-installed-vs-shipped: 359 rm ${D}${infodir}/dir
311 360
312- ``<recipename>: Files/directories were installed but not shipped in any package [installed-vs-shipped]`` 361.. _qa-check-installed-vs-shipped:
313 362
314 Files have been installed within the 363``installed-vs-shipped``
315 :ref:`ref-tasks-install` task but have not been 364------------------------
316 included in any package by way of the :term:`FILES`
317 variable. Files that do not appear in any package cannot be present
318 in an image later on in the build process. You need to do one of the
319 following:
320 365
321 - Add the files to :term:`FILES` for the package you want them to appear 366``<recipename>: Files/directories were installed but not shipped in any package [installed-vs-shipped]``
322 in (e.g. ``FILES:${``\ :term:`PN`\ ``}`` for the main
323 package).
324 367
325 - Delete the files at the end of the :ref:`ref-tasks-install` task if the 368Files have been installed within the
326 files are not needed in any package. 369:ref:`ref-tasks-install` task but have not been
370included in any package by way of the :term:`FILES`
371variable. Files that do not appear in any package cannot be present
372in an image later on in the build process. You need to do one of the
373following:
327 374
328- ``<oldpackage>-<oldpkgversion> was registered as shlib provider for <library>, changing it to <newpackage>-<newpkgversion> because it was built later`` 375- Add the files to :term:`FILES` for the package you want them to appear
376 in (e.g. ``FILES:${``\ :term:`PN`\ ``}`` for the main
377 package).
329 378
330 This message means that both ``<oldpackage>`` and ``<newpackage>`` 379- Delete the files at the end of the :ref:`ref-tasks-install` task if the
331 provide the specified shared library. You can expect this message 380 files are not needed in any package.
332 when a recipe has been renamed. However, if that is not the case, the
333 message might indicate that a private version of a library is being
334 erroneously picked up as the provider for a common library. If that
335 is the case, you should add the library's ``.so`` filename to
336 :term:`PRIVATE_LIBS` in the recipe that provides
337 the private version of the library.
338 381
339.. _qa-check-incompatible-license: 382.. _qa-check-incompatible-license:
340 383
341- ``Excluding <package> from packaging as it has incompatible license(s): <license> [incompatible-license]`` 384``incompatible-license``
385------------------------
386
387``Excluding <package> from packaging as it has incompatible license(s): <license> [incompatible-license]``
342 388
343 Report when packages are excluded from being created due to being marked with 389Report when packages are excluded from being created due to being marked with
344 a license that is in :term:`INCOMPATIBLE_LICENSE`. 390a license that is in :term:`INCOMPATIBLE_LICENSE`.
345 391
346.. _qa-check-invalid-chars: 392.. _qa-check-invalid-chars:
347 393
348- ``<variable> has non <envoding> characters [invalid-chars]`` 394``invalid-chars``
395-----------------
349 396
350 Checks that the recipe metadata variables :term:`DESCRIPTION`, 397``<variable> has non <envoding> characters [invalid-chars]``
351 :term:`SUMMARY`, :term:`LICENSE`, and :term:`SECTION` do not contain 398
352 non-UTF-8 characters. Some package managers do not support such characters. 399Checks that the recipe metadata variables :term:`DESCRIPTION`,
400:term:`SUMMARY`, :term:`LICENSE`, and :term:`SECTION` do not contain
401non-UTF-8 characters. Some package managers do not support such characters.
353 402
354.. _qa-check-invalid-packageconfig: 403.. _qa-check-invalid-packageconfig:
355 404
356- ``<package>: invalid PACKAGECONFIG(s): <configs> [invalid-packageconfig]`` 405``invalid-packageconfig``
406-------------------------
407
408``<package>: invalid PACKAGECONFIG(s): <configs> [invalid-packageconfig]``
357 409
358 Checks that no undefined features are being added to :term:`PACKAGECONFIG`. 410Checks that no undefined features are being added to :term:`PACKAGECONFIG`.
359 For example, any name "foo" for which the following form does not exist:: 411For example, any name "foo" for which the following form does not exist::
360 412
361 PACKAGECONFIG[foo] = "..." 413 PACKAGECONFIG[foo] = "..."
362 414
363.. _qa-check-la: 415.. _qa-check-la:
364 416
365- ``<file> failed sanity test (workdir) in path <path> [la]`` 417``la``
418------
366 419
367 The specified ``.la`` file contains :term:`TMPDIR` 420``<file> failed sanity test (workdir) in path <path> [la]``
368 paths. Any ``.la`` file containing these paths is incorrect since 421
369 ``libtool`` adds the correct sysroot prefix when using the files 422The specified ``.la`` file contains :term:`TMPDIR`
370 automatically itself. 423paths. Any ``.la`` file containing these paths is incorrect since
424``libtool`` adds the correct sysroot prefix when using the files
425automatically itself.
371 426
372.. _qa-check-ldflags: 427.. _qa-check-ldflags:
373 428
374- ``File '<file>' in package '<package>' doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]`` 429``ldflags``
430-----------
431
432``File '<file>' in package '<package>' doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]``
375 433
376 This indicates that binaries produced when building the recipe have 434This indicates that binaries produced when building the recipe have
377 not been linked with the :term:`LDFLAGS` options 435not been linked with the :term:`LDFLAGS` options
378 provided by the build system. Check to be sure that the :term:`LDFLAGS` 436provided by the build system. Check to be sure that the :term:`LDFLAGS`
379 variable is being passed to the linker command. A common workaround 437variable is being passed to the linker command. A common workaround
380 for this situation is to pass in :term:`LDFLAGS` using 438for this situation is to pass in :term:`LDFLAGS` using
381 :term:`TARGET_CC_ARCH` within the recipe as 439:term:`TARGET_CC_ARCH` within the recipe as
382 follows:: 440follows::
383 441
384 TARGET_CC_ARCH += "${LDFLAGS}" 442 TARGET_CC_ARCH += "${LDFLAGS}"
385 443
386.. _qa-check-libdir: 444.. _qa-check-libdir:
387 445
388- ``<packagename>: found library in wrong location [libdir]`` 446``libdir``
447----------
389 448
390 The specified file may have been installed into an incorrect 449``<packagename>: found library in wrong location [libdir]``
391 (possibly hardcoded) installation path. For example, this test will 450
392 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is 451The specified file may have been installed into an incorrect
393 "lib32". Another example is when recipes install 452(possibly hardcoded) installation path. For example, this test will
394 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". False 453catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
395 positives occasionally exist. For these cases add "libdir" to 454"lib32". Another example is when recipes install
396 :term:`INSANE_SKIP` for the package. 455``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". False
456positives occasionally exist. For these cases add "libdir" to
457:term:`INSANE_SKIP` for the package.
397 458
398.. _qa-check-libexec: 459.. _qa-check-libexec:
399 460
400- ``<packagename>: <path> is using libexec please relocate to <libexecdir> [libexec]`` 461``libexec``
462-----------
463
464``<packagename>: <path> is using libexec please relocate to <libexecdir> [libexec]``
401 465
402 The specified package contains files in ``/usr/libexec`` when the 466The specified package contains files in ``/usr/libexec`` when the
403 distro configuration uses a different path for ``<libexecdir>`` By 467distro configuration uses a different path for ``<libexecdir>`` By
404 default, ``<libexecdir>`` is ``$prefix/libexec``. However, this 468default, ``<libexecdir>`` is ``$prefix/libexec``. However, this
405 default can be changed (e.g. ``${libdir}``). 469default can be changed (e.g. ``${libdir}``).
406 470
407.. _qa-check-mime: 471.. _qa-check-mime:
408 472
409- ``package contains mime types but does not inherit mime: <packagename> path '<file>' [mime]`` 473``mime``
474--------
410 475
411 The specified package contains mime type files (``.xml`` files in 476``package contains mime types but does not inherit mime: <packagename> path '<file>' [mime]``
412 ``${datadir}/mime/packages``) and yet does not inherit the 477
413 :ref:`ref-classes-mime` class which will ensure that these get 478The specified package contains mime type files (``.xml`` files in
414 properly installed. Either add ``inherit mime`` to the recipe or remove the 479``${datadir}/mime/packages``) and yet does not inherit the
415 files at the :ref:`ref-tasks-install` step if they are not needed. 480:ref:`ref-classes-mime` class which will ensure that these get
481properly installed. Either add ``inherit mime`` to the recipe or remove the
482files at the :ref:`ref-tasks-install` step if they are not needed.
416 483
417.. _qa-check-mime-xdg: 484.. _qa-check-mime-xdg:
418 485
419- ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: <packagename> path '<file>' [mime-xdg]`` 486``mime-xdg``
487------------
488
489``package contains desktop file with key 'MimeType' but does not inherit mime-xdg: <packagename> path '<file>' [mime-xdg]``
420 490
421 The specified package contains a .desktop file with a 'MimeType' key 491The specified package contains a .desktop file with a 'MimeType' key
422 present, but does not inherit the :ref:`ref-classes-mime-xdg` 492present, but does not inherit the :ref:`ref-classes-mime-xdg`
423 class that is required in order for that to be activated. Either add 493class that is required in order for that to be activated. Either add
424 ``inherit mime`` to the recipe or remove the files at the 494``inherit mime`` to the recipe or remove the files at the
425 :ref:`ref-tasks-install` step if they are not needed. 495:ref:`ref-tasks-install` step if they are not needed.
426 496
427.. _qa-check-missing-update-alternatives: 497.. _qa-check-missing-update-alternatives:
428 498
429- ``<recipename>: recipe defines ALTERNATIVE:<packagename> but doesn't inherit update-alternatives. This might fail during do_rootfs later! [missing-update-alternatives]`` 499``missing-update-alternatives``
500-------------------------------
430 501
431 This check ensures that if a recipe sets the :term:`ALTERNATIVE` variable that the 502``<recipename>: recipe defines ALTERNATIVE:<packagename> but doesn't inherit update-alternatives. This might fail during do_rootfs later! [missing-update-alternatives]``
432 recipe also inherits :ref:`ref-classes-update-alternatives` such 503
433 that the alternative will be correctly set up. If you are seeing this message, either 504This check ensures that if a recipe sets the :term:`ALTERNATIVE` variable that the
434 add ``inherit update-alternatives`` to your recipe or remove the reference to the variable 505recipe also inherits :ref:`ref-classes-update-alternatives` such
435 if it is not needed. 506that the alternative will be correctly set up. If you are seeing this message, either
507add ``inherit update-alternatives`` to your recipe or remove the reference to the variable
508if it is not needed.
436 509
437.. _qa-check-packages-list: 510.. _qa-check-packages-list:
438 511
439- ``<packagename> is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]`` 512``packages-list``
513-----------------
514
515``<packagename> is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]``
440 516
441 Package names must appear only once in the 517Package names must appear only once in the
442 :term:`PACKAGES` variable. You might receive this 518:term:`PACKAGES` variable. You might receive this
443 error if you are attempting to add a package to :term:`PACKAGES` that is 519error if you are attempting to add a package to :term:`PACKAGES` that is
444 already in the variable's value. 520already in the variable's value.
445 521
446.. _qa-check-patch-fuzz: 522.. _qa-check-patch-fuzz:
447 523
448- ``Fuzz detected: <patch output> [patch-fuzz]`` 524``patch-fuzz``
525--------------
449 526
450 This check looks for evidence of "fuzz" when applying patches within the :ref:`ref-tasks-patch` 527``Fuzz detected: <patch output> [patch-fuzz]``
451 task. Patch fuzz is a situation when the ``patch`` tool ignores some of the context
452 lines in order to apply the patch. Consider this example:
453 528
454 Patch to be applied:: 529This check looks for evidence of "fuzz" when applying patches within the :ref:`ref-tasks-patch`
530task. Patch fuzz is a situation when the ``patch`` tool ignores some of the context
531lines in order to apply the patch. Consider this example:
455 532
456 --- filename 533Patch to be applied::
457 +++ filename
458 context line 1
459 context line 2
460 context line 3
461 +newly added line
462 context line 4
463 context line 5
464 context line 6
465 534
466 Original source code:: 535 --- filename
536 +++ filename
537 context line 1
538 context line 2
539 context line 3
540 +newly added line
541 context line 4
542 context line 5
543 context line 6
467 544
468 different context line 1 545Original source code::
469 different context line 2
470 context line 3
471 context line 4
472 different context line 5
473 different context line 6
474 546
475 Outcome (after applying patch with fuzz):: 547 different context line 1
548 different context line 2
549 context line 3
550 context line 4
551 different context line 5
552 different context line 6
476 553
477 different context line 1 554Outcome (after applying patch with fuzz)::
478 different context line 2
479 context line 3
480 newly added line
481 context line 4
482 different context line 5
483 different context line 6
484 555
485 Chances are, the newly added line was actually added in a completely 556 different context line 1
486 wrong location, or it was already in the original source and was added 557 different context line 2
487 for the second time. This is especially possible if the context line 3 558 context line 3
488 and 4 are blank or have only generic things in them, such as ``#endif`` or ``}``. 559 newly added line
489 Depending on the patched code, it is entirely possible for an incorrectly 560 context line 4
490 patched file to still compile without errors. 561 different context line 5
562 different context line 6
491 563
492 *How to eliminate patch fuzz warnings* 564Chances are, the newly added line was actually added in a completely
565wrong location, or it was already in the original source and was added
566for the second time. This is especially possible if the context line 3
567and 4 are blank or have only generic things in them, such as ``#endif`` or ``}``.
568Depending on the patched code, it is entirely possible for an incorrectly
569patched file to still compile without errors.
493 570
494 Use the ``devtool`` command as explained by the warning. First, unpack the 571*How to eliminate patch fuzz warnings*
495 source into devtool workspace::
496 572
497 devtool modify <recipe> 573Use the ``devtool`` command as explained by the warning. First, unpack the
574source into devtool workspace::
498 575
499 This will apply all of the patches, and create new commits out of them in 576 devtool modify <recipe>
500 the workspace --- with the patch context updated.
501 577
502 Then, replace the patches in the recipe layer:: 578This will apply all of the patches, and create new commits out of them in
579the workspace --- with the patch context updated.
503 580
504 devtool finish --force-patch-refresh <recipe> <layer_path> 581Then, replace the patches in the recipe layer::
505 582
506 The patch updates then need be reviewed (preferably with a side-by-side diff 583 devtool finish --force-patch-refresh <recipe> <layer_path>
507 tool) to ensure they are indeed doing the right thing i.e.:
508 584
509 #. they are applied in the correct location within the file; 585The patch updates then need be reviewed (preferably with a side-by-side diff
510 #. they do not introduce duplicate lines, or otherwise do things that 586tool) to ensure they are indeed doing the right thing i.e.:
511 are no longer necessary.
512 587
513 To confirm these things, you can also review the patched source code in 588#. they are applied in the correct location within the file;
514 devtool's workspace, typically in ``<build_dir>/workspace/sources/<recipe>/`` 589#. they do not introduce duplicate lines, or otherwise do things that
590 are no longer necessary.
515 591
516 Once the review is done, you can create and publish a layer commit with 592To confirm these things, you can also review the patched source code in
517 the patch updates that modify the context. Devtool may also refresh 593devtool's workspace, typically in ``<build_dir>/workspace/sources/<recipe>/``
518 other things in the patches, those can be discarded. 594
595Once the review is done, you can create and publish a layer commit with
596the patch updates that modify the context. Devtool may also refresh
597other things in the patches, those can be discarded.
519 598
520.. _qa-check-patch-status: 599.. _qa-check-patch-status:
521 600
522- ``Missing Upstream-Status in patch <patchfile> Please add according to <url> [patch-status]`` 601``patch-status``
602----------------
603
604- ``Missing Upstream-Status in patch <patchfile> Please add according to <url> [patch-status]``
523 605
524 The ``Upstream-Status`` value is missing in the specified patch file's header. 606 The ``Upstream-Status`` value is missing in the specified patch file's header.
525 This value is intended to track whether or not the patch has been sent 607 This value is intended to track whether or not the patch has been sent
526 upstream, whether or not it has been merged, etc. 608 upstream, whether or not it has been merged, etc.
527 609
528 For more information, see the 610 For more information, see the
529 ":ref:`contributor-guide/recipe-style-guide:patch upstream status`" 611 ":ref:`contributor-guide/recipe-style-guide:patch upstream status`"
530 section in the Yocto Project and OpenEmbedded Contributor Guide. 612 section in the Yocto Project and OpenEmbedded Contributor Guide.
531 613
532- ``Malformed Upstream-Status in patch <patchfile> Please correct according to <url> [patch-status]`` 614- ``Malformed Upstream-Status in patch <patchfile> Please correct according to <url> [patch-status]``
533 615
534 The ``Upstream-Status`` value in the specified patch file's header is invalid - 616 The ``Upstream-Status`` value in the specified patch file's header is invalid -
535 it must be a specific format. See the "Missing Upstream-Status" entry above 617 it must be a specific format. See the "Missing Upstream-Status" entry above
536 for more information. 618 for more information.
537 619
538.. _qa-check-pep517-backend: 620.. _qa-check-pep517-backend:
539 621
540- ``inherits setuptools3 but has pyproject.toml with <build backend>, use the correct class [pep517-backend]`` 622``pep517-backend``
623------------------
541 624
542 Checks that a recipe inheriting :ref:`ref-classes-setuptools3` has a 625``inherits setuptools3 but has pyproject.toml with <build backend>, use the correct class [pep517-backend]``
543 PEP517-compliant backend. 626
627Checks that a recipe inheriting :ref:`ref-classes-setuptools3` has a
628PEP517-compliant backend.
544 629
545.. _qa-check-perllocalpod: 630.. _qa-check-perllocalpod:
546 631
547- ``<packagename> contains perllocal.pod (<files>), should not be installed [perllocalpod]`` 632``perllocalpod``
633----------------
634
635``<packagename> contains perllocal.pod (<files>), should not be installed [perllocalpod]``
548 636
549 ``perllocal.pod`` is an index file of locally installed modules and so shouldn't be 637``perllocal.pod`` is an index file of locally installed modules and so shouldn't be
550 installed by any distribution packages. The :ref:`ref-classes-cpan` class 638installed by any distribution packages. The :ref:`ref-classes-cpan` class
551 already sets ``NO_PERLLOCAL`` to stop this file being generated by most Perl recipes, 639already sets ``NO_PERLLOCAL`` to stop this file being generated by most Perl recipes,
552 but if a recipe is using ``MakeMaker`` directly then they might not be doing this 640but 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 641correctly. 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 642avoid multiple packages shipping this file and thus their packages conflicting
555 if installed together. 643if installed together.
556 644
557.. _qa-check-perm-config: 645.. _qa-check-perm-config:
558 646
559- ``Fixup Perms: invalid config line <line> [perm-config]`` 647``perm-config``
648---------------
649
650``Fixup Perms: invalid config line <line> [perm-config]``
560 651
561 Reports lines in ``fs-perms.txt`` that have an invalid format. 652Reports lines in ``fs-perms.txt`` that have an invalid format.
562 653
563.. _qa-check-perm-line: 654.. _qa-check-perm-line:
564 655
565- ``Fixup perms: <config> invalid line: <line> [perm-line]`` 656``perm-line``
657-------------
566 658
567 Reports lines in ``fs-perms.txt`` that have an invalid format. 659``Fixup perms: <config> invalid line: <line> [perm-line]``
660
661Reports lines in ``fs-perms.txt`` that have an invalid format.
568 662
569.. _qa-check-perm-link: 663.. _qa-check-perm-link:
570 664
571- ``Fixup Perms: Unable to correct directory link, target already exists: <directory> -> <target> [perm-link]`` 665``perm-link``
666-------------
667
668``Fixup Perms: Unable to correct directory link, target already exists: <directory> -> <target> [perm-link]``
572 669
573 Reports lines in ``fs-perms.txt`` that specify 'link' where the specified 670Reports lines in ``fs-perms.txt`` that specify 'link' where the specified
574 target already exists. 671target already exists.
575 672
576.. _qa-check-perms: 673.. _qa-check-perms:
577 674
578- ``perms``: Currently, this check is unused but reserved. 675``perms``
676---------
677
678Currently, this check is unused but reserved.
579 679
580.. _qa-check-pkgconfig: 680.. _qa-check-pkgconfig:
581 681
582- ``<file> failed sanity test (tmpdir) in path <path> [pkgconfig]`` 682``pkgconfig``
683-------------
684
685``<file> failed sanity test (tmpdir) in path <path> [pkgconfig]``
583 686
584 The specified ``.pc`` file contains 687The specified ``.pc`` file contains
585 :term:`TMPDIR`\ ``/``\ :term:`WORKDIR` 688:term:`TMPDIR`\ ``/``\ :term:`WORKDIR`
586 paths. Any ``.pc`` file containing these paths is incorrect since 689paths. Any ``.pc`` file containing these paths is incorrect since
587 ``pkg-config`` itself adds the correct sysroot prefix when the files 690``pkg-config`` itself adds the correct sysroot prefix when the files
588 are accessed. 691are accessed.
589 692
590.. _qa-check-pkgname: 693.. _qa-check-pkgname:
591 694
592- ``<packagename> doesn't match the [a-z0-9.+-]+ regex [pkgname]`` 695``pkgname``
696-----------
593 697
594 The convention within the OpenEmbedded build system (sometimes 698``<packagename> doesn't match the [a-z0-9.+-]+ regex [pkgname]``
595 enforced by the package manager itself) is to require that package 699
596 names are all lower case and to allow a restricted set of characters. 700The convention within the OpenEmbedded build system (sometimes
597 If your recipe name does not match this, or you add packages to 701enforced by the package manager itself) is to require that package
598 :term:`PACKAGES` that do not conform to the 702names are all lower case and to allow a restricted set of characters.
599 convention, then you will receive this error. Rename your recipe. Or, 703If your recipe name does not match this, or you add packages to
600 if you have added a non-conforming package name to :term:`PACKAGES`, 704:term:`PACKAGES` that do not conform to the
601 change the package name appropriately. 705convention, then you will receive this error. Rename your recipe. Or,
706if you have added a non-conforming package name to :term:`PACKAGES`,
707change the package name appropriately.
602 708
603.. _qa-check-pkgvarcheck: 709.. _qa-check-pkgvarcheck:
604 710
711``pkgvarcheck``
712---------------
713
605- ``<recipefile>: Variable <variable> is set as not being package specific, please fix this. [pkgvarcheck]`` 714- ``<recipefile>: Variable <variable> is set as not being package specific, please fix this. [pkgvarcheck]``
606 715
607 Certain variables (:term:`RDEPENDS`, 716 Certain variables (:term:`RDEPENDS`,
@@ -618,7 +727,7 @@ Errors and Warnings
618 assignments to these variables within your recipe. 727 assignments to these variables within your recipe.
619 728
620 729
621- ``recipe uses DEPENDS:${PN}, should use DEPENDS [pkgvarcheck]`` 730- ``recipe uses DEPENDS:${PN}, should use DEPENDS [pkgvarcheck]``
622 731
623 This check looks for instances of setting ``DEPENDS:${PN}`` 732 This check looks for instances of setting ``DEPENDS:${PN}``
624 which is erroneous (:term:`DEPENDS` is a recipe-wide variable and thus 733 which is erroneous (:term:`DEPENDS` is a recipe-wide variable and thus
@@ -627,194 +736,258 @@ Errors and Warnings
627 736
628.. _qa-check-pn-overrides: 737.. _qa-check-pn-overrides:
629 738
630- ``Recipe <recipefile> has PN of "<recipename>" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]`` 739``pn-overrides``
740----------------
631 741
632 The specified recipe has a name (:term:`PN`) value that 742``Recipe <recipefile> has PN of "<recipename>" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]``
633 appears in :term:`OVERRIDES`. If a recipe is named 743
634 such that its :term:`PN` value matches something already in :term:`OVERRIDES` 744The specified recipe has a name (:term:`PN`) value that
635 (e.g. :term:`PN` happens to be the same as :term:`MACHINE` 745appears in :term:`OVERRIDES`. If a recipe is named
636 or :term:`DISTRO`), it can have unexpected 746such that its :term:`PN` value matches something already in :term:`OVERRIDES`
637 consequences. For example, assignments such as 747(e.g. :term:`PN` happens to be the same as :term:`MACHINE`
638 ``FILES:${PN} = "xyz"`` effectively turn into ``FILES = "xyz"``. 748or :term:`DISTRO`), it can have unexpected
639 Rename your recipe (or if :term:`PN` is being set explicitly, change the 749consequences. For example, assignments such as
640 :term:`PN` value) so that the conflict does not occur. See 750``FILES:${PN} = "xyz"`` effectively turn into ``FILES = "xyz"``.
641 :term:`FILES` for additional information. 751Rename your recipe (or if :term:`PN` is being set explicitly, change the
752:term:`PN` value) so that the conflict does not occur. See
753:term:`FILES` for additional information.
642 754
643.. _qa-check-shebang-size: 755.. _qa-check-shebang-size:
644 756
645- ``<packagename>: <file> maximum shebang size exceeded, the maximum size is 128. [shebang-size]`` 757``shebang-size``
758----------------
759
760``<packagename>: <file> maximum shebang size exceeded, the maximum size is 128. [shebang-size]``
761
762This check ensures that the shebang line (``#!`` in the first line) for a script
763is not longer than 128 characters, which can cause an error at runtime depending
764on the operating system. If you are seeing this message then the specified script
765may need to be patched to have a shorter in order to avoid runtime problems.
766
767.. _qa-check-shlib-provider:
646 768
647 This check ensures that the shebang line (``#!`` in the first line) for a script 769Shlib provider
648 is not longer than 128 characters, which can cause an error at runtime depending 770--------------
649 on the operating system. If you are seeing this message then the specified script 771
650 may need to be patched to have a shorter in order to avoid runtime problems. 772``<oldpackage>-<oldpkgversion> was registered as shlib provider for <library>, changing it to <newpackage>-<newpkgversion> because it was built later``
773
774This message means that both ``<oldpackage>`` and ``<newpackage>``
775provide the specified shared library. You can expect this message
776when a recipe has been renamed. However, if that is not the case, the
777message might indicate that a private version of a library is being
778erroneously picked up as the provider for a common library. If that
779is the case, you should add the library's ``.so`` filename to
780:term:`PRIVATE_LIBS` in the recipe that provides
781the private version of the library.
651 782
652.. _qa-check-space-around-equal: 783.. _qa-check-space-around-equal:
653 784
654- ``<filename>:<line number> has a lack of whitespace around the assignment: '<assignment>'`` 785``space-around-equal``
786----------------------
655 787
656 This warning indicated that there is missing spaces around an assignment. 788``<filename>:<line number> has a lack of whitespace around the assignment: '<assignment>'``
657 789
658 For example, the following assignments would print a warning:: 790This warning indicated that there is missing spaces around an assignment.
659 791
660 FOO="bar" 792For example, the following assignments would print a warning::
661 FOO= "bar"
662 FOO ="bar"
663 793
664 These should be replaced by:: 794 FOO="bar"
795 FOO= "bar"
796 FOO ="bar"
665 797
666 FOO = "bar" 798These should be replaced by::
799
800 FOO = "bar"
667 801
668.. _qa-check-src-uri-bad: 802.. _qa-check-src-uri-bad:
669 803
670- ``<recipename>: SRC_URI uses unstable GitHub archives [src-uri-bad]`` 804``src-uri-bad``
805---------------
806
807- ``<recipename>: SRC_URI uses unstable GitHub archives [src-uri-bad]``
671 808
672 GitHub provides "archive" tarballs, however these can be re-generated 809 GitHub provides "archive" tarballs, however these can be re-generated
673 on the fly and thus the file's signature will not necessarily match that 810 on the fly and thus the file's signature will not necessarily match that
674 in the :term:`SRC_URI` checksums in future leading to build failures. It is 811 in the :term:`SRC_URI` checksums in future leading to build failures. It is
675 recommended that you use an official release tarball or switch to 812 recommended that you use an official release tarball or switch to
676 pulling the corresponding revision in the actual git repository instead. 813 pulling the corresponding revision in the actual git repository instead.
677 814
678 815
679- ``SRC_URI uses PN not BPN [src-uri-bad]`` 816- ``SRC_URI uses PN not BPN [src-uri-bad]``
680 817
681 If some part of :term:`SRC_URI` needs to reference the recipe name, it should do 818 If some part of :term:`SRC_URI` needs to reference the recipe name, it should do
682 so using ${:term:`BPN`} rather than ${:term:`PN`} as the latter will change 819 so using ${:term:`BPN`} rather than ${:term:`PN`} as the latter will change
683 for different variants of the same recipe e.g. when :term:`BBCLASSEXTEND` 820 for different variants of the same recipe e.g. when :term:`BBCLASSEXTEND`
684 or multilib are being used. This check will fail if a reference to ``${PN}`` 821 or multilib are being used. This check will fail if a reference to ``${PN}``
685 is found within the :term:`SRC_URI` value --- change it to ``${BPN}`` instead. 822 is found within the :term:`SRC_URI` value --- change it to ``${BPN}`` instead.
686 823
687.. _qa-check-staticdev: 824.. _qa-check-staticdev:
688 825
689- ``non -staticdev package contains static .a library: <packagename> path '<path>' [staticdev]`` 826``staticdev``
827-------------
690 828
691 Static ``.a`` library files should go into a ``-staticdev`` package. 829``non -staticdev package contains static .a library: <packagename> path '<path>' [staticdev]``
692 Change :term:`FILES` (and possibly 830
693 :term:`PACKAGES`) such that the specified ``.a`` file 831Static ``.a`` library files should go into a ``-staticdev`` package.
694 goes into an appropriate ``-staticdev`` package. 832Change :term:`FILES` (and possibly
833:term:`PACKAGES`) such that the specified ``.a`` file
834goes into an appropriate ``-staticdev`` package.
695 835
696.. _qa-check-symlink-to-sysroot: 836.. _qa-check-symlink-to-sysroot:
697 837
698- ``Symlink <path> in <packagename> points to TMPDIR [symlink-to-sysroot]`` 838``symlink-to-sysroot``
839----------------------
840
841``Symlink <path> in <packagename> points to TMPDIR [symlink-to-sysroot]``
699 842
700 The specified symlink points into :term:`TMPDIR` on the 843The specified symlink points into :term:`TMPDIR` on the
701 host. Such symlinks will work on the host. However, they are clearly 844host. Such symlinks will work on the host. However, they are clearly
702 invalid when running on the target. You should either correct the 845invalid when running on the target. You should either correct the
703 symlink to use a relative path or remove the symlink. 846symlink to use a relative path or remove the symlink.
704 847
705.. _qa-check-recipe-naming: 848.. _qa-check-recipe-naming:
706 849
707- ``Recipe <recipe> appears native/nativesdk but is not, should inherit native/nativesdk`` 850Recipe naming
851-------------
852
853``Recipe <recipe> appears native/nativesdk but is not, should inherit native/nativesdk``
708 854
709 Checks that the recipe name and recipe class match, so that ``*-native`` 855Checks that the recipe name and recipe class match, so that ``*-native``
710 recipes inherit :ref:`ref-classes-native` and ``nativesdk-*`` recipes 856recipes inherit :ref:`ref-classes-native` and ``nativesdk-*`` recipes
711 inherit :ref:`ref-classes-nativesdk`. 857inherit :ref:`ref-classes-nativesdk`.
712 858
713.. _qa-check-rpaths: 859.. _qa-check-rpaths:
714 860
715- ``package <packagename> contains bad RPATH <rpath> in file <file> [rpaths]`` 861``rpaths``
862----------
716 863
717 The specified binary produced by the recipe contains dynamic library 864``package <packagename> contains bad RPATH <rpath> in file <file> [rpaths]``
718 load paths (rpaths) that contain build system paths such as 865
719 :term:`TMPDIR`, which are incorrect for the target and 866The specified binary produced by the recipe contains dynamic library
720 could potentially be a security issue. Check for bad ``-rpath`` 867load paths (rpaths) that contain build system paths such as
721 options being passed to the linker in your 868:term:`TMPDIR`, which are incorrect for the target and
722 :ref:`ref-tasks-compile` log. Depending on the build 869could potentially be a security issue. Check for bad ``-rpath``
723 system used by the software being built, there might be a configure 870options being passed to the linker in your
724 option to disable rpath usage completely within the build of the 871:ref:`ref-tasks-compile` log. Depending on the build
725 software. 872system used by the software being built, there might be a configure
873option to disable rpath usage completely within the build of the
874software.
726 875
727.. _qa-check-textrel: 876.. _qa-check-textrel:
728 877
729- ``ELF binary '<file>' has relocations in .text [textrel]`` 878``textrel``
879-----------
880
881``ELF binary '<file>' has relocations in .text [textrel]``
730 882
731 The specified ELF binary contains relocations in its ``.text`` 883The specified ELF binary contains relocations in its ``.text``
732 sections. This situation can result in a performance impact at 884sections. This situation can result in a performance impact at
733 runtime. 885runtime.
734 886
735 Typically, the way to solve this performance issue is to add "-fPIC" 887Typically, the way to solve this performance issue is to add "-fPIC"
736 or "-fpic" to the compiler command-line options. For example, given 888or "-fpic" to the compiler command-line options. For example, given
737 software that reads :term:`CFLAGS` when you build it, 889software that reads :term:`CFLAGS` when you build it,
738 you could add the following to your recipe:: 890you could add the following to your recipe::
739 891
740 CFLAGS:append = " -fPIC " 892 CFLAGS:append = " -fPIC "
741 893
742 For more information on text relocations at runtime, see 894For more information on text relocations at runtime, see
743 https://www.akkadia.org/drepper/textrelocs.html. 895https://www.akkadia.org/drepper/textrelocs.html.
744 896
745.. _qa-check-unhandled-features-check: 897.. _qa-check-unhandled-features-check:
746 898
747- ``<recipename>: recipe doesn't inherit features_check [unhandled-features-check]`` 899``unhandled-features-check``
900----------------------------
748 901
749 This check ensures that if one of the variables that the 902``<recipename>: recipe doesn't inherit features_check [unhandled-features-check]``
750 :ref:`ref-classes-features_check` class supports (e.g. 903
751 :term:`REQUIRED_DISTRO_FEATURES`) is used, then the recipe 904This check ensures that if one of the variables that the
752 inherits :ref:`ref-classes-features_check` in order for 905:ref:`ref-classes-features_check` class supports (e.g.
753 the requirement to actually work. If you are seeing this message, either 906:term:`REQUIRED_DISTRO_FEATURES`) is used, then the recipe
754 add ``inherit features_check`` to your recipe or remove the reference to 907inherits :ref:`ref-classes-features_check` in order for
755 the variable if it is not needed. 908the requirement to actually work. If you are seeing this message, either
909add ``inherit features_check`` to your recipe or remove the reference to
910the variable if it is not needed.
756 911
757.. _qa-check-unimplemented-ptest: 912.. _qa-check-unimplemented-ptest:
758 913
759- ``<tool> tests detected [unimplemented-ptest]`` 914``unimplemented-ptest``
915-----------------------
916
917``<tool> tests detected [unimplemented-ptest]``
760 918
761 This check will detect if the source of the package contains some 919This check will detect if the source of the package contains some
762 upstream-provided tests and, if so, that ptests are implemented for this 920upstream-provided tests and, if so, that ptests are implemented for this
763 recipe. See the ":ref:`test-manual/ptest:testing packages with ptest`" 921recipe. See the ":ref:`test-manual/ptest:testing packages with ptest`"
764 section in the Yocto Project Development Tasks Manual. See also the 922section in the Yocto Project Development Tasks Manual. See also the
765 ":ref:`ref-classes-ptest`" section. 923":ref:`ref-classes-ptest`" section.
766 924
767.. _qa-check-unknown-configure-option: 925.. _qa-check-unknown-configure-option:
768 926
769- ``<recipe>: configure was passed unrecognized options: <options> [unknown-configure-option]`` 927``unknown-configure-option``
770 928----------------------------
771 The configure script is reporting that the specified options are 929
772 unrecognized. This situation could be because the options were 930``<recipe>: configure was passed unrecognized options: <options> [unknown-configure-option]``
773 previously valid but have been removed from the configure script. Or, 931
774 there was a mistake when the options were added and there is another 932The configure script is reporting that the specified options are
775 option that should be used instead. If you are unsure, consult the 933unrecognized. This situation could be because the options were
776 upstream build documentation, the ``./configure --help`` output, and 934previously valid but have been removed from the configure script. Or,
777 the upstream change log or release notes. Once you have worked out 935there was a mistake when the options were added and there is another
778 what the appropriate change is, you can update 936option that should be used instead. If you are unsure, consult the
779 :term:`EXTRA_OECONF`, 937upstream build documentation, the ``./configure --help`` output, and
780 :term:`PACKAGECONFIG_CONFARGS`, or the 938the upstream change log or release notes. Once you have worked out
781 individual :term:`PACKAGECONFIG` option values 939what the appropriate change is, you can update
782 accordingly. 940:term:`EXTRA_OECONF`,
941:term:`PACKAGECONFIG_CONFARGS`, or the
942individual :term:`PACKAGECONFIG` option values
943accordingly.
783 944
784.. _qa-check-unlisted-pkg-lics: 945.. _qa-check-unlisted-pkg-lics:
785 946
786- ``LICENSE:<packagename> includes licenses (<licenses>) that are not listed in LICENSE [unlisted-pkg-lics]`` 947``unlisted-pkg-lics``
948---------------------
787 949
788 The :term:`LICENSE` of the recipe should be a superset 950``LICENSE:<packagename> includes licenses (<licenses>) that are not listed in LICENSE [unlisted-pkg-lics]``
789 of all the licenses of all packages produced by this recipe. In other 951
790 words, any license in ``LICENSE:*`` should also appear in 952The :term:`LICENSE` of the recipe should be a superset
791 :term:`LICENSE`. 953of all the licenses of all packages produced by this recipe. In other
954words, any license in ``LICENSE:*`` should also appear in
955:term:`LICENSE`.
792 956
793.. _qa-check-useless-rpaths: 957.. _qa-check-useless-rpaths:
794 958
795- ``<packagename>: <file> contains probably-redundant RPATH <rpath> [useless-rpaths]`` 959``useless-rpaths``
960------------------
961
962``<packagename>: <file> contains probably-redundant RPATH <rpath> [useless-rpaths]``
796 963
797 The specified binary produced by the recipe contains dynamic library 964The specified binary produced by the recipe contains dynamic library
798 load paths (rpaths) that on a standard system are searched by default 965load paths (rpaths) that on a standard system are searched by default
799 by the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths 966by the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths
800 will not cause any breakage, they do waste space and are unnecessary. 967will not cause any breakage, they do waste space and are unnecessary.
801 Depending on the build system used by the software being built, there 968Depending on the build system used by the software being built, there
802 might be a configure option to disable rpath usage completely within 969might be a configure option to disable rpath usage completely within
803 the build of the software. 970the build of the software.
804 971
805.. _qa-check-usrmerge: 972.. _qa-check-usrmerge:
806 973
807- ``<packagename> package is not obeying usrmerge distro feature. /<path> should be relocated to /usr. [usrmerge]`` 974``usrmerge``
975------------
808 976
809 If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this check will ensure that no package 977``<packagename> package is not obeying usrmerge distro feature. /<path> should be relocated to /usr. [usrmerge]``
810 installs files to root (``/bin``, ``/sbin``, ``/lib``, ``/lib64``) directories. If you are seeing this 978
811 message, it indicates that the :ref:`ref-tasks-install` step (or perhaps the build process that 979If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this check will ensure that no package
812 :ref:`ref-tasks-install` is calling into, e.g. ``make install`` is using hardcoded paths instead 980installs files to root (``/bin``, ``/sbin``, ``/lib``, ``/lib64``) directories. If you are seeing this
813 of the variables set up for this (``bindir``, ``sbindir``, etc.), and should be 981message, it indicates that the :ref:`ref-tasks-install` step (or perhaps the build process that
814 changed so that it does. 982:ref:`ref-tasks-install` is calling into, e.g. ``make install`` is using hardcoded paths instead
983of the variables set up for this (``bindir``, ``sbindir``, etc.), and should be
984changed so that it does.
815 985
816.. _qa-check-var-undefined: 986.. _qa-check-var-undefined:
817 987
988``var-undefined``
989-----------------
990
818- ``WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package [var-undefined]`` 991- ``WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package [var-undefined]``
819 992
820 Reports when variables fundamental to packaging (i.e. :term:`WORKDIR`, 993 Reports when variables fundamental to packaging (i.e. :term:`WORKDIR`,
@@ -823,40 +996,49 @@ Errors and Warnings
823 996
824.. _qa-check-version-going-backwards: 997.. _qa-check-version-going-backwards:
825 998
826- ``Package version for package <package> went backwards which would break package feeds (from <version2> to <version1>) [version-going-backwards]`` 999``version-going-backwards``
1000---------------------------
827 1001
828 If the :ref:`ref-classes-buildhistory` class is enabled, reports when a 1002``Package version for package <package> went backwards which would break package feeds (from <version2> to <version1>) [version-going-backwards]``
829 package being written out has a lower version than the previously written
830 package under the same name. If you are placing output packages into a feed
831 and upgrading packages on a target system using that feed, the version of a
832 package going backwards can result in the target system not correctly
833 upgrading to the "new" version of the package.
834 1003
835 .. note:: 1004If the :ref:`ref-classes-buildhistory` class is enabled, reports when a
1005package being written out has a lower version than the previously written
1006package under the same name. If you are placing output packages into a feed
1007and upgrading packages on a target system using that feed, the version of a
1008package going backwards can result in the target system not correctly
1009upgrading to the "new" version of the package.
836 1010
837 This is only relevant when you are using runtime package management 1011.. note::
838 on your target system. 1012
1013 This is only relevant when you are using runtime package management
1014 on your target system.
839 1015
840.. _qa-check-virtual-slash: 1016.. _qa-check-virtual-slash:
841 1017
842- ``<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.`` 1018``virtual-slash``
1019-----------------
843 1020
844 ``virtual/`` is a convention intended for use in the build context 1021``<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. [virtual-slash]``
845 (i.e. :term:`PROVIDES` and :term:`DEPENDS`) rather than the runtime 1022
846 context (i.e. :term:`RPROVIDES` and :term:`RDEPENDS`). Use 1023``virtual/`` is a convention intended for use in the build context
847 :term:`VIRTUAL-RUNTIME` variables instead for the latter. 1024(i.e. :term:`PROVIDES` and :term:`DEPENDS`) rather than the runtime
1025context (i.e. :term:`RPROVIDES` and :term:`RDEPENDS`). Use
1026:term:`VIRTUAL-RUNTIME` variables instead for the latter.
848 1027
849.. _qa-check-xorg-driver-abi: 1028.. _qa-check-xorg-driver-abi:
850 1029
851- ``Package <packagename> contains Xorg driver (<driver>) but no xorg-abi- dependencies [xorg-driver-abi]`` 1030``xorg-driver-abi``
1031-------------------
1032
1033``Package <packagename> contains Xorg driver (<driver>) but no xorg-abi- dependencies [xorg-driver-abi]``
852 1034
853 The specified package contains an Xorg driver, but does not have a 1035The specified package contains an Xorg driver, but does not have a
854 corresponding ABI package dependency. The xserver-xorg recipe 1036corresponding ABI package dependency. The xserver-xorg recipe
855 provides driver ABI names. All drivers should depend on the ABI 1037provides driver ABI names. All drivers should depend on the ABI
856 versions that they have been built against. Driver recipes that 1038versions that they have been built against. Driver recipes that
857 include ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will 1039include ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will
858 automatically get these versions. Consequently, you should only need 1040automatically get these versions. Consequently, you should only need
859 to explicitly add dependencies to binary driver recipes. 1041to explicitly add dependencies to binary driver recipes.
860 1042
861Configuring and Disabling QA Checks 1043Configuring and Disabling QA Checks
862=================================== 1044===================================