106 lines
7.3 KiB
HTML
106 lines
7.3 KiB
HTML
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
<title>7.17. Generated output quality assurance checks - insane.bbclass</title>
|
||
<link rel="stylesheet" type="text/css" href="../book.css">
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||
<link rel="home" href="index.html" title="The Yocto Project Reference Manual">
|
||
<link rel="up" href="ref-classes.html" title="Chapter 7. Classes">
|
||
<link rel="prev" href="ref-classes-sanity.html" title="7.16. Host System sanity checks - sanity.bbclass">
|
||
<link rel="next" href="ref-classes-siteinfo.html" title="7.18. Autotools configuration data cache - siteinfo.bbclass">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="7.17. Generated output quality assurance checks - insane.bbclass">
|
||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||
<a name="ref-classes-insane"></a>7.17. Generated output quality assurance checks - <code class="filename">insane.bbclass</code>
|
||
</h2></div></div></div>
|
||
<p>
|
||
This class adds a step to the package generation process that sanity checks the
|
||
packages generated by the OpenEmbedded build system.
|
||
A range of checks are performed that check the build's output
|
||
for common problems that show up during runtime.
|
||
Distribution policy usually dictates whether to include this class.
|
||
</p>
|
||
<p>
|
||
You can configure the sanity checks so that specific test failures either raise a warning or
|
||
an error message.
|
||
Typically, failures for new tests generate a warning.
|
||
Subsequent failures for the same test would then generate an error message
|
||
once the metadata is in a known and good condition.
|
||
You use the <code class="filename">WARN_QA</code> variable to specify tests for which you
|
||
want to generate a warning message on failure.
|
||
You use the <code class="filename">ERROR_QA</code> variable to specify tests for which you
|
||
want to generate an error message on failure.
|
||
</p>
|
||
<p>
|
||
The following list shows the tests you can list with the <code class="filename">WARN_QA</code>
|
||
and <code class="filename">ERROR_QA</code> variables:
|
||
</p>
|
||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">ldflags:</code></em></span>
|
||
Ensures that the binaries were linked with the
|
||
<code class="filename">LDFLAGS</code> options provided by the build system.
|
||
If this test fails, check that the <code class="filename">LDFLAGS</code> variable
|
||
is being passed to the linker command.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">useless-rpaths:</code></em></span>
|
||
Checks for dynamic library load paths (rpaths) in the binaries that
|
||
by default on a standard system are searched by the linker (e.g.
|
||
<code class="filename">/lib</code> and <code class="filename">/usr/lib</code>).
|
||
While these paths will not cause any breakage, they do waste space and
|
||
are unnecessary.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">rpaths:</code></em></span>
|
||
Checks for rpaths in the binaries that contain build system paths such
|
||
as <code class="filename">TMPDIR</code>.
|
||
If this test fails, bad <code class="filename">-rpath</code> options are being
|
||
passed to the linker commands and your binaries have potential security
|
||
issues.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">dev-so:</code></em></span>
|
||
Checks that the <code class="filename">.so</code> symbolic links are in the
|
||
<code class="filename">-dev</code> package and not in any of the other packages.
|
||
In general, these symlinks are only useful for development purposes.
|
||
Thus, the <code class="filename">-dev</code> package is the correct location for
|
||
them.
|
||
Some very rare cases do exist for dynamically loaded modules where
|
||
these symlinks are needed instead in the main package.
|
||
</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">debug-files:</code></em></span>
|
||
Checks for <code class="filename">.debug</code> directories in anything but the
|
||
<code class="filename">-dbg</code> package.
|
||
The debug files should all be in the <code class="filename">-dbg</code> package.
|
||
Thus, anything packaged elsewhere is incorrect packaging.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">arch:</code></em></span>
|
||
Checks the Executable and Linkable Format (ELF) type, bit size and endianness
|
||
of any binaries to ensure it matches the target architecture.
|
||
This test fails if any binaries don't match the type since there would be an
|
||
incompatibility.
|
||
Sometimes software, like bootloaders, might need to bypass this check.
|
||
</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">debug-deps:</code></em></span>
|
||
Checks that <code class="filename">-dbg</code> packages only depend on other
|
||
<code class="filename">-dbg</code> packages and not on any other types of packages,
|
||
which would cause a packaging bug.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">dev-deps:</code></em></span>
|
||
Checks that <code class="filename">-dev</code> packages only depend on other
|
||
<code class="filename">-dev</code> packages and not on any other types of packages,
|
||
which would be a packaging bug.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">pkgconfig:</code></em></span>
|
||
Checks <code class="filename">.pc</code> files for any
|
||
<code class="filename">TMPDIR/WORKDIR</code> paths.
|
||
Any <code class="filename">.pc</code> file containing these paths is incorrect
|
||
since <code class="filename">pkg-config</code> itself adds the correct sysroot prefix
|
||
when the files are accessed.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">la:</code></em></span>
|
||
Checks <code class="filename">.la</code> files for any <code class="filename">TMPDIR</code>
|
||
paths.
|
||
Any <code class="filename">.la</code> file continaing these paths is incorrect since
|
||
<code class="filename">libtool</code> adds the correct sysroot prefix when using the
|
||
files automatically itself.</p></li>
|
||
<li class="listitem"><p><span class="emphasis"><em><code class="filename">desktop:</code></em></span>
|
||
Runs the <code class="filename">desktop-file-validate</code> program against any
|
||
<code class="filename">.desktop</code> files to validate their contents against
|
||
the specification for <code class="filename">.desktop</code> files.</p></li>
|
||
</ul></div>
|
||
<p>
|
||
</p>
|
||
</div></body>
|
||
</html>
|