From a89b418d3f01a59faf79573d60e191d049ec36b3 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 13 Aug 2013 12:02:59 +0300 Subject: ref-manual: Added more QA checks to the insane.bbclass. Fixes [YOCTO #4788] Added a bunch of new checks to the list of checks in this class. I also recast the section head to just have the class file as the section heading. This resulted in a link that needed changed. (From yocto-docs rev: 4a4df80c0b6012ad09ea526d2893e729aa06965b) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/ref-manual/ref-classes.xml | 198 ++++++++++++++++++++++++++++- documentation/ref-manual/ref-variables.xml | 2 +- 2 files changed, 193 insertions(+), 7 deletions(-) (limited to 'documentation/ref-manual') diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml index d230ddd935..93c5d78bc2 100644 --- a/documentation/ref-manual/ref-classes.xml +++ b/documentation/ref-manual/ref-classes.xml @@ -454,11 +454,12 @@
-Generated Output Quality Assurance Checks - <filename>insane.bbclass</filename> +<filename>insane.bbclass</filename> - This class adds a step to the package generation process that sanity checks the - packages generated by the OpenEmbedded build system. + This class adds a step to the package generation process so that + output quality assurance checks are 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. @@ -588,9 +589,194 @@ libtool adds the correct sysroot prefix when using the files automatically itself. desktop: - Runs the desktop-file-validate program against any - .desktop files to validate their contents against - the specification for .desktop files. + Runs the desktop-file-validate program + against any .desktop files to validate + their contents against the specification for + .desktop files. + already-stripped: + Checks that produced binaries have not already been + stripped prior to the build system extracting debug symbols. + It is common for upstream software projects to default to + stripping debug symbols for output binaries. + In order for debugging to work on the target using + -dbg packages, this stripping must be + disabled. + + split-strip: + Reports that splitting or stripping debug symbols from binaries + has failed. + + arch: + Checks to ensure the architecture, bit size, and endianness + of all output binaries matches that of the target. + This test can detect when the wrong compiler or compiler options + have been used. + + installed-vs-shipped: + Reports when files have been installed within + do_install but have not been included in + any package by way of the + FILES + variable. + Files that do not appear in any package cannot be present in + an image later on in the build process. + Ideally, all installed files should be packaged or not + installed at all. + These files can be deleted at the end of + do_install if that is easier. + + dep-cmp: + Checks for invalid version comparison statements in runtime + dependency relationships between packages (i.e. in + RDEPENDS, + RRECOMMENDS, + RSUGGESTS, + RPROVIDES, + RREPLACES, + and + RCONFLICTS + variable values). + Any invalid comparisons might trigger failures or undesirable + behavior when passed to the package manager. + + files-invalid: + Checks for + FILES + variable values that contain "//", which is invalid. + + incompatible-license: + Report when packages are excluded from being created due to + being marked with a license that is in + INCOMPATIBLE_LICENSE. + + compile-host-path: + Checks the do_compile log for indications + that paths to locations on the build host were used. + Using such paths might result in host contamination of the + build output. + + install-host-path: + Checks the do_install log for indications + that paths to locations on the build host were used. + Using such paths might result in host contamination of the + build output. + + libdir: + Checks for libraries being installed into incorrect + (possibly hardcoded) installation paths. + For example, this test will catch recipes that install + /lib/bar.so when + ${base_libdir} is "lib32". + Another example is when recipes install + /usr/lib64/foo.so when + ${libdir} is "/usr/lib". + + packages-list: + Checks for the same package being listed multiple times through + the PACKAGES + variable value. + Installing the package in this manner can cause errors during + packaging. + + perm-config: + Reports lines in fs-perms.txt that have + an invalid format. + + perm-line: + Reports lines in fs-perms.txt that have + an invalid format. + + perm-link: + Reports lines in fs-perms.txt that + specify 'link' where the specified target already exists. + + pkgname: + Checks that all packages in + PACKAGES + have names that do not contain invalid characters (i.e. + characters other than 0-9, a-z, ., +, and -). + + pn-overrides: + Checks that a recipe does not have a name + (PN) value + that appears in + OVERRIDES. + If a recipe is named such that its PN + value matches something already in + OVERRIDES (e.g. PN + happens to be the same as + MACHINE + or + DISTRO), + it can have unexpected consequences. + For example, assignments such as + FILES_${PN} = "xyz" effectively turn into + FILES = "xyz". + + unsafe-references-in-binaries: + Reports when a binary installed in + ${base_libdir}, + ${base_bindir}, or + ${base_sbindir}, depends on another + binary installed under ${exec_prefix}. + This dependency is a concern if you want the system to remain + basically operable if /usr is mounted + separately and is not mounted. + + Defaults for binaries installed in + ${base_libdir}, + ${base_bindir}, and + ${base_sbindir} are + /lib, /bin, and + /sbin, respectively. + The default for a binary installed + under ${exec_prefix} is + /usr. + + + unsafe-references-in-scripts: + Reports when a script file installed in + ${base_libdir}, + ${base_bindir}, or + ${base_sbindir}, depends on files + installed under ${exec_prefix}. + This dependency is a concern if you want the system to remain + basically operable if /usr is mounted + separately and is not mounted. + + Defaults for binaries installed in + ${base_libdir}, + ${base_bindir}, and + ${base_sbindir} are + /lib, /bin, and + /sbin, respectively. + The default for a binary installed + under ${exec_prefix} is + /usr. + + + var-undefined: + Reports when variables fundamental to packaging (i.e. + WORKDIR, + DEPLOY_DIR, + D, + PN, and + PKGD) are undefined during + do_package. + + pkgv-undefined: + Checks to see if the PKGV variable + is undefined during do_package. + + buildpaths: + Checks for paths to locations on the build host inside the + output files. + Currently, this test triggers too many false positives and + thus is not normally enabled. + + perms: + Currently, this check is unused but reserved. + diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index 2ae476239a..7b88ffe5ca 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -2116,7 +2116,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" - See the "Generated Output Quality Assurance Checks - insane.bbclass" + See the "insane.bbclass" section for a list of the valid QA checks you can specify using this variable. -- cgit v1.2.3-54-g00ecf