summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-08-13 12:02:59 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-13 13:18:59 +0100
commita89b418d3f01a59faf79573d60e191d049ec36b3 (patch)
treeb16b11b817ca4db425988263a0f185afb5b29f02
parente26f25305931f74dd830a714b6740cb5348ae39e (diff)
downloadpoky-a89b418d3f01a59faf79573d60e191d049ec36b3.tar.gz
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 <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/ref-manual/ref-classes.xml198
-rw-r--r--documentation/ref-manual/ref-variables.xml2
2 files changed, 193 insertions, 7 deletions
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 @@
454</section> 454</section>
455 455
456<section id='ref-classes-insane'> 456<section id='ref-classes-insane'>
457<title>Generated Output Quality Assurance Checks - <filename>insane.bbclass</filename></title> 457<title><filename>insane.bbclass</filename></title>
458 458
459 <para> 459 <para>
460 This class adds a step to the package generation process that sanity checks the 460 This class adds a step to the package generation process so that
461 packages generated by the OpenEmbedded build system. 461 output quality assurance checks are generated by the OpenEmbedded
462 build system.
462 A range of checks are performed that check the build's output 463 A range of checks are performed that check the build's output
463 for common problems that show up during runtime. 464 for common problems that show up during runtime.
464 Distribution policy usually dictates whether to include this class. 465 Distribution policy usually dictates whether to include this class.
@@ -588,9 +589,194 @@
588 <filename>libtool</filename> adds the correct sysroot prefix when using the 589 <filename>libtool</filename> adds the correct sysroot prefix when using the
589 files automatically itself.</para></listitem> 590 files automatically itself.</para></listitem>
590 <listitem><para><emphasis><filename>desktop:</filename></emphasis> 591 <listitem><para><emphasis><filename>desktop:</filename></emphasis>
591 Runs the <filename>desktop-file-validate</filename> program against any 592 Runs the <filename>desktop-file-validate</filename> program
592 <filename>.desktop</filename> files to validate their contents against 593 against any <filename>.desktop</filename> files to validate
593 the specification for <filename>.desktop</filename> files.</para></listitem> 594 their contents against the specification for
595 <filename>.desktop</filename> files.</para></listitem>
596 <listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
597 Checks that produced binaries have not already been
598 stripped prior to the build system extracting debug symbols.
599 It is common for upstream software projects to default to
600 stripping debug symbols for output binaries.
601 In order for debugging to work on the target using
602 <filename>-dbg</filename> packages, this stripping must be
603 disabled.
604 </para></listitem>
605 <listitem><para><emphasis><filename>split-strip:</filename></emphasis>
606 Reports that splitting or stripping debug symbols from binaries
607 has failed.
608 </para></listitem>
609 <listitem><para><emphasis><filename>arch:</filename></emphasis>
610 Checks to ensure the architecture, bit size, and endianness
611 of all output binaries matches that of the target.
612 This test can detect when the wrong compiler or compiler options
613 have been used.
614 </para></listitem>
615 <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
616 Reports when files have been installed within
617 <filename>do_install</filename> but have not been included in
618 any package by way of the
619 <link linkend='var-FILES'><filename>FILES</filename></link>
620 variable.
621 Files that do not appear in any package cannot be present in
622 an image later on in the build process.
623 Ideally, all installed files should be packaged or not
624 installed at all.
625 These files can be deleted at the end of
626 <filename>do_install</filename> if that is easier.
627 </para></listitem>
628 <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
629 Checks for invalid version comparison statements in runtime
630 dependency relationships between packages (i.e. in
631 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
632 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
633 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
634 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
635 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
636 and
637 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
638 variable values).
639 Any invalid comparisons might trigger failures or undesirable
640 behavior when passed to the package manager.
641 </para></listitem>
642 <listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
643 Checks for
644 <link linkend='var-FILES'><filename>FILES</filename></link>
645 variable values that contain "//", which is invalid.
646 </para></listitem>
647 <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
648 Report when packages are excluded from being created due to
649 being marked with a license that is in
650 <filename>INCOMPATIBLE_LICENSE</filename>.
651 </para></listitem>
652 <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
653 Checks the <filename>do_compile</filename> log for indications
654 that paths to locations on the build host were used.
655 Using such paths might result in host contamination of the
656 build output.
657 </para></listitem>
658 <listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
659 Checks the <filename>do_install</filename> log for indications
660 that paths to locations on the build host were used.
661 Using such paths might result in host contamination of the
662 build output.
663 </para></listitem>
664 <listitem><para><emphasis><filename>libdir:</filename></emphasis>
665 Checks for libraries being installed into incorrect
666 (possibly hardcoded) installation paths.
667 For example, this test will catch recipes that install
668 <filename>/lib/bar.so</filename> when
669 <filename>${base_libdir}</filename> is "lib32".
670 Another example is when recipes install
671 <filename>/usr/lib64/foo.so</filename> when
672 <filename>${libdir}</filename> is "/usr/lib".
673 </para></listitem>
674 <listitem><para><emphasis><filename>packages-list:</filename></emphasis>
675 Checks for the same package being listed multiple times through
676 the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
677 variable value.
678 Installing the package in this manner can cause errors during
679 packaging.
680 </para></listitem>
681 <listitem><para><emphasis><filename>perm-config:</filename></emphasis>
682 Reports lines in <filename>fs-perms.txt</filename> that have
683 an invalid format.
684 </para></listitem>
685 <listitem><para><emphasis><filename>perm-line:</filename></emphasis>
686 Reports lines in <filename>fs-perms.txt</filename> that have
687 an invalid format.
688 </para></listitem>
689 <listitem><para><emphasis><filename>perm-link:</filename></emphasis>
690 Reports lines in <filename>fs-perms.txt</filename> that
691 specify 'link' where the specified target already exists.
692 </para></listitem>
693 <listitem><para><emphasis><filename>pkgname:</filename></emphasis>
694 Checks that all packages in
695 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
696 have names that do not contain invalid characters (i.e.
697 characters other than 0-9, a-z, ., +, and -).
698 </para></listitem>
699 <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
700 Checks that a recipe does not have a name
701 (<link linkend='var-PN'><filename>PN</filename></link>) value
702 that appears in
703 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
704 If a recipe is named such that its <filename>PN</filename>
705 value matches something already in
706 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
707 happens to be the same as
708 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
709 or
710 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
711 it can have unexpected consequences.
712 For example, assignments such as
713 <filename>FILES_${PN} = "xyz"</filename> effectively turn into
714 <filename>FILES = "xyz"</filename>.
715 </para></listitem>
716 <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
717 Reports when a binary installed in
718 <filename>${base_libdir}</filename>,
719 <filename>${base_bindir}</filename>, or
720 <filename>${base_sbindir}</filename>, depends on another
721 binary installed under <filename>${exec_prefix}</filename>.
722 This dependency is a concern if you want the system to remain
723 basically operable if <filename>/usr</filename> is mounted
724 separately and is not mounted.
725 <note>
726 Defaults for binaries installed in
727 <filename>${base_libdir}</filename>,
728 <filename>${base_bindir}</filename>, and
729 <filename>${base_sbindir}</filename> are
730 <filename>/lib</filename>, <filename>/bin</filename>, and
731 <filename>/sbin</filename>, respectively.
732 The default for a binary installed
733 under <filename>${exec_prefix}</filename> is
734 <filename>/usr</filename>.
735 </note>
736 </para></listitem>
737 <listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
738 Reports when a script file installed in
739 <filename>${base_libdir}</filename>,
740 <filename>${base_bindir}</filename>, or
741 <filename>${base_sbindir}</filename>, depends on files
742 installed under <filename>${exec_prefix}</filename>.
743 This dependency is a concern if you want the system to remain
744 basically operable if <filename>/usr</filename> is mounted
745 separately and is not mounted.
746 <note>
747 Defaults for binaries installed in
748 <filename>${base_libdir}</filename>,
749 <filename>${base_bindir}</filename>, and
750 <filename>${base_sbindir}</filename> are
751 <filename>/lib</filename>, <filename>/bin</filename>, and
752 <filename>/sbin</filename>, respectively.
753 The default for a binary installed
754 under <filename>${exec_prefix}</filename> is
755 <filename>/usr</filename>.
756 </note>
757 </para></listitem>
758 <listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
759 Reports when variables fundamental to packaging (i.e.
760 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
761 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
762 <link linkend='var-D'><filename>D</filename></link>,
763 <link linkend='var-PN'><filename>PN</filename></link>, and
764 <filename>PKGD</filename>) are undefined during
765 <filename>do_package</filename>.
766 </para></listitem>
767 <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
768 Checks to see if the <filename>PKGV</filename> variable
769 is undefined during <filename>do_package</filename>.
770 </para></listitem>
771 <listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
772 Checks for paths to locations on the build host inside the
773 output files.
774 Currently, this test triggers too many false positives and
775 thus is not normally enabled.
776 </para></listitem>
777 <listitem><para><emphasis><filename>perms:</filename></emphasis>
778 Currently, this check is unused but reserved.
779 </para></listitem>
594 </itemizedlist> 780 </itemizedlist>
595 </para> 781 </para>
596 <note> 782 <note>
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"
2116 </literallayout> 2116 </literallayout>
2117 </para> 2117 </para>
2118 <para> 2118 <para>
2119 See the "<link linkend='ref-classes-insane'>Generated Output Quality Assurance Checks - <filename>insane.bbclass</filename></link>" 2119 See the "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
2120 section for a list of the valid QA checks you can 2120 section for a list of the valid QA checks you can
2121 specify using this variable. 2121 specify using this variable.
2122 </para> 2122 </para>