summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* insane: Fix buildpaths test to work with special devicesRichard Purdie2022-08-181-2/+4
| | | | | | | | | | | | | | If enabled, the buildpaths test hangs in psplash as it tries to open a fifo and read from it, hanging indefinitely. Tweak the test to ignore fifo/socket/device files. (From OE-Core rev: 0106c6a629d0a9f07d76ffaad2dc92e48021e1b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2567edb7e0a8c5ca9a88d6940491bf33bfe0eff9) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: host-user-contaminated: Correct per package home pathAhmed Hossam2022-07-081-1/+1
| | | | | | | | | | | | | | | The current home path that is compared against is incorrect as it is missing the package name, this patch adds it. [YOCTO #14553] (From OE-Core rev: b75caf4a985e3c20996531785125eaffdc832104) Signed-off-by: Ahmed Hossam <Ahmed.Hossam@opensynergy.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit ae8f22d9e2694eea5ede3b31c6f3bca404ea4a5a) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: clean up some more warning messagesRoss Burton2021-04-301-6/+6
| | | | | | | | | | (From OE-Core rev: 4acbb63105b241f537414d0ab6d09b269cf8202b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2abe18682192e7b38b9af5a5043906f2f069648f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: don't check for a warning string that is never outputRoss Burton2021-03-181-21/+1
| | | | | | | | | | | | | | | | | | insane has checks that the compiler isn't printing "CROSS COMPILE Badness" during configure/compile/install, but this message hasn't been output by GCC since 2010 (23f522e7). The current warning is "include location [...] is unsafe for cross- compilation" and as that is a proper GCC warning, we can make it fatal in follow-up patches. (From OE-Core rev: 32c49bc10013ece820c9168b690d14a5a9fd1f13) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a67e9ebfd5b8002fd4a7d8d27ff0d997817f76e1) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add GitLab /archive/ testsAndrey Zhizhikin2020-11-121-2/+2
| | | | | | | | | | | | | | | | | | | Archives produced by GitLab should be avoided in the same way as those produced by GitHub. Extend SRC_URI check to include GitLab and inform user that recipe should be converted to use git protocol. Link: https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg73109.html Link: https://lists.openembedded.org/g/openembedded-core/message/144035 Cc: Martin Jansa <martin.jansa@gmail.com> (From OE-Core rev: 72f2c45880afbba1745e5e0cbd841d7fd666f374) Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d76b33c6a8489378a1f5500554367127199ae19d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: check for missing update-alternatives inheritAndrey Zhizhikin2020-10-061-0/+9
| | | | | | | | | | | | | | | Add a package QA check to test if the recipe sets ALTERNATIVE variable for any of its packages, and does not inherit update-alternatives class. This causes the do_rootfs to fail since a proper alternative cannot be created. (From OE-Core rev: 0845f6b09716d927c586be5be878d08fa53b31d1) Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 24b5ccc76d5660fac38ac5346666380a0ecce359) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Check for feature check variables not being usedJacob Kroon2020-10-061-1/+11
| | | | | | | | | | | | | Add a package QA check for wether any of the variables used by features_check.bbclass is set while not inheriting the class itself. (From OE-Core rev: 02fa8637195447f38b4ce96086197490ce814987) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c06489d102682504afe33f9fee3facd9628b3f57) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: only load real files as ELFRoss Burton2020-09-171-6/+7
| | | | | | | | | | | | | | | | | The file path checks are passed an ELF object if the file is an ELF. It doesn't make a lot of sense to load symlinks to ELFs as if they're in the same package then the real file will be checked too. This should speed up do_package_qa slightly as libraries won't be scanned repeatedly. (From OE-Core rev: 0b6f03752e6581a15e5fb900a8de7aef78709ef6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c63af30d3b6350361daff94a59d4f14d7c5395e1) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve gnu-hash-style warningRoss Burton2020-09-101-1/+2
| | | | | | | | | | | | | Instead of showing a filename under packages-split, show the package name and filename inside the package. (From OE-Core rev: 60b474320e2dd36bff9f0ef5f1dc491cbe734919) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4f78fc65bb0c9bff05651d9e543bab3d75998f79) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: fix gnu-hash-style checkSumit Garg2020-09-101-1/+1
| | | | | | | | | | | | | | Fix gnu-hash-style check that always returned True after commit [1] leading to false positive presence of "GNU_HASH" in objdump output. Fixes: 9ff90bf04a4c ("mips: Enable gnu-hash-style on glibc") [1] (From OE-Core rev: af265eca8c95ba92718b37e62b5b4eeb2f17668c) Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 996010f1b9ca98592e2c87e1adcb0c79b86517b7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: consolidate skipping of temporary do_package filesRoss Burton2020-07-221-5/+8
| | | | | | | | | | | | | | | | | | During the course of do_package_rpm and friends the tools create a top-level CONTROL or DEBIAN directory in the package directory. do_package_qa needs to be aware of these files and ignore them, this was previously done in just one check but instead should be done once when building the file list so all the checks don't see the temporary files. [ YOCTO #13804 ] (From OE-Core rev: 0dbdcd305a969b67415ed74c3286af02612bd64c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4b2f45c47a5c8c800626f12c14f216a5ab923512) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/insane: Check pkgs lics are subset of recipe lics only onceQuentin Schulz2020-05-281-1/+20
| | | | | | | | | | | | | | | | | | | | | | | Move logic checking that all packages licenses are only a subset of recipe licenses from base.bbclass to the insane.bbclass so that it's evaluated only once, during do_package_qa. As explained in the linked bugzilla entry, if a package license is not part of the recipe license, the warning message gets shown an unreasonable amount of time because it's evaluated every time a recipe is parsed. [YOCTO #10130] This also makes it possible to silence this error with INSANE_SKIP. (From OE-Core rev: ae404ef230882e442e9390b314e1ce023fdbbd1b) Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 852408ed4be1f64c57e196688728b7ed223d3493) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add test for shebang line lengthDomarys Correa2020-05-071-1/+24
| | | | | | | | | | | | | | | | Shebang lines longer than 128 characters can give an error depending on the operating system. This implements a test that signals an error when locating a faulty shebang. YOCTO: #11053 (From OE-Core rev: 9ed54437b00aed1d41993f7658820d8adfb09282) Signed-off-by: Domarys Correa <domarys.correa@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Correct typo inhert->inheritKhem Raj2020-02-181-1/+1
| | | | | | | (From OE-Core rev: 8fdceff7a9581173726c2a2636a5815accca73e2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Support stripping and debug copy of static librariesMark Hatle2020-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, we won't copy and strip static libraries. However, this functionality can be useful in some cases where people are doing development on the target, and don't generally want the larger debug capable static libraries. To enable the new functionality set: PACKAGE_DEBUG_STATIC_SPLIT = '1' Add a new function splitstaticdebuginfo. Thus function will copy the unmodified static library into the specific debug directory location. By keeping an unmodified version, it is possible for a user trying to debug something to use -L /usr/lib/.debug-static and their existing build commands to switch from stripped to full debug versions. The PACKAGE_DEBUG_SPLIT_STYLE will select between two different approaches, /usr/lib/debug-static or <path>/.debug-static. Additionally you can now choose to strip static libraries to conserve space. If either 'PACKAGE_DEBUG_STATIC_SPLIT' or 'PACKAGE_STRIP_STATIC' is set to 1, the static library will be stripped. (This is not on by default, as it could make diagnosing static library usage difficult in some cases.) Add to insane.bbclass a skip to the staticdev warning for the specific -dbg package versions. (From OE-Core rev: 17fa66c8199d73f0b59b2b3e609075933bf1e74b) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Spawn warning for missing mime-xdg in inheritAndreas Müller2020-01-191-1/+30
| | | | | | | | | | If a package signals that it can open mime-types but does not inharit mime-xdg, a warning is created. (From OE-Core rev: 75b4a377d6e74456bbb4b9966725de7385c74b61) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: introduce a warning for mime missing in inheritAndreas Müller2020-01-191-0/+12
| | | | | | | | | | | | * looking through layers it looks that usage of mime.bbclass is somewhat orphaned * now that update-mime-database is called once only at image creation time, costs of mime.bbclass are limited (From OE-Core rev: 856ed1dc3b6e4a082546a487818eb4c6cde1c573) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mips: Enable gnu-hash-style on glibcKhem Raj2020-01-191-3/+2
| | | | | | | | | | | | | | | latest glibc 2.31 [1] and binutils [2] has finally added the needed support for gnu hash-style, which brings mips into same fold as other architectures Fix check for MIPS specific section for gnu hash information [1] https://sourceware.org/ml/libc-alpha/2019-06/msg00456.html [2] https://sourceware.org/ml/binutils/2019-07/msg00098.html (From OE-Core rev: 9ff90bf04a4c422feaea25180155e4954648f68c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: don't use cachedpathRoss Burton2019-12-281-3/+2
| | | | | | | | | | | Unless cachedpath is used correctly then it's just a glorified clone of os.walk, but without any of the recent optimisations in os.walk. In this codepath there is no point to using cachedpath. (From OE-Core rev: 460222c54e4c65352c0687f2b6c70527cc9a2b4b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: fix GitHub /archive/ testRoss Burton2019-11-291-3/+3
| | | | | | | | | | | | | | | | | This test was failing to split the URL list to individual URLs, so if SRC_URI is something like this then the test incorrectly triggers: SRC_URI = "git://github.com/foo http://example.com/archive/foo" Fix this by splitting the SRC_URI list and iterating through the URIs one at time. [ YOCTO #13660 ] (From OE-Core rev: ddd2c5624404848ee668dabec0f61599ab5003e4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve textrel warning messageRoss Burton2019-11-141-1/+3
| | | | | | | | | | Clean the displayed path so it clearly shows the package name and path in that package. (From OE-Core rev: 46bf5f0db164e88c2effdbf5437f4d0836e4aadd) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add check for perllocal.podRoss Burton2019-10-081-1/+18
| | | | | | | | | | | | | | | | | | | perlocal.pod is an index file of locally installed modules and so shouldn't be installed by any distribution packages. cpan.bbclass already sets NO_PERLOCAL to stop this file being generated by most Perl recipes, but if a recipe is using MakeMaker directly (such as rrdtool) then they might not be doing this correctly. To avoid multiple packages shipping this file and then failing to install together, add a QA test to check if this file exists and by default emit an error if it does. [ YOCTO #13491 ] (From OE-Core rev: 5d16d265cc61c4e279fe3bf66016a00d9daa4068) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: in file-rdeps do not look into RDEPENDS recursivelyAlexander Kanavin2019-08-141-18/+0
| | | | | | | | | | | | | | | | Recursive RDEPENDS resolution requires that all of the dependent recipes' packaging has completed. There is no mechanism to ensure that and therefore races were observed. This change effectively requires recipes to list their runtime file dependencies explicitly rather than have them pulled indirectly. This may require a bit of fixing in layers, but should result in a better definition of runtime file dependencies. (From OE-Core rev: 08e2b5a31b23b98459479caf6ec5f5c6fc19d57a) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: check if the recipe incorrectly uses DEPENDS_${PN}Ross Burton2019-08-031-0/+5
| | | | | | | | | | Some people mistakenly use DEPENDS_${PN} and wonder why the dependencies don't work. Check for this and tell the user to use DEPENDS. (From OE-Core rev: cfaa104955c4ad0aafbe5d59ef85e4a8e3526c69) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: use clean_path for the host contamination warningsRoss Burton2019-07-051-3/+2
| | | | | | | | | We've a nice function to clean up absolute build paths for display, so use it. (From OE-Core rev: c2f2ea87592d14e7020eff19c11aae2fb644358a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove empty test that does nothingRoss Burton2019-06-191-7/+0
| | | | | | | (From OE-Core rev: 5da7ad1a483d0840a9a2e3b95fa62a1901be73f2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve buildpath warning messagesRoss Burton2019-06-191-1/+2
| | | | | | | | | | | | | | | | Instead of reporting large chunks of the work directory and not the package name: "File /work/corei7-64-poky-linux/libidn2/2.2.0-r0/packages-split/libidn2-dev/usr/lib/pkgconfig/libidn2.pc in package contained reference to tmpdir" We can clean up the paths and be more useful: "File /usr/lib/pkgconfig/libidn2.pc in package libidn2-dev contains reference to TMPDIR" (From OE-Core rev: 156329247b40e9ee97e6249468ac3b9af4dffb68) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add sanity checks to SRC_URIRoss Burton2019-05-211-1/+12
| | | | | | | | | | | | The SRC_URI almost definitely shouldn't be using ${PN}, and GitHub */archive/* tarballs are dynamically generated so the checksums will change over time. Detect both of these, and emit a QA warning if found. (From OE-Core rev: 21f84fcdd659544437fe393285c407e1e9432043) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Trigger unrecognzed configure option for mesonAndreas Müller2019-04-111-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Tested with 'unknown-configure-option' in ERROR_QA: For meson (glib-2.0-native): 1. add 'EXTRA_OEMESON_append = "-Dschnitzel=true -Dwurst=true"' | ERROR: glib-2.0-native-1_2.58.3-r0 do_configure: QA Issue: glib-2.0-native: configure was passed unrecognised options: schnitzel wurst [unknown-configure-option] 2. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" schnitzel"' | ERROR: glib-2.0-native-1_2.58.3-r0 do_configure: QA Issue: glib-2.0-native: configure was passed unrecognised options: wurst [unknown-configure-option] 3. change to 'UNKNOWN_CONFIGURE_WHITELIST_append=" schnitzel wurst"' => builds without issues For autotools (readline-native): 1. add 'EXTRA_OECONF = "--with-schnitzel --with-wurst"' | ERROR: readline-native-8.0-r0 do_configure: QA Issue: readline-native: configure was passed unrecognised options: --with-wurst --with-schnitzel [unknown-configure-option] 2. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" --with-schnitzel"' | ERROR: readline-native-8.0-r0 do_configure: QA Issue: readline-native: configure was passed unrecognised options: --with-wurst [unknown-configure-option] 3. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" --with-schnitzel --with-wurst"' => builds without issues (From OE-Core rev: 30c001cdbc6207001b18e093ad9691e606428f0f) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: fix gettext dependency warningRoss Burton2019-04-101-1/+1
| | | | | | | | | This message was using %s markers but nothing was being passed in. (From OE-Core rev: d204398d40cbbea5a6b58a36fc289d569f2eb304) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch/insane: Rework patch fuzz handlingAndreas Müller2019-04-091-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there are three issues which can be enhanced: 1. Fuzz warnings cannot be configured as errors for hardening. It happened often to me that these warnings were overseen and detected after commits were already out. 2. The output is too verbose - particularly when more than one file is affected. Meanwhile all users should know why patch fuzz check is performed. So move links with background information to insane.bbclass. 3. Reduce copy & paste effort slightly by printing PN (nit: <recipe> was not a correct suggestion e.g for native extended recipe - see example below) To achieve patch.py drops patch-fuzz info encapsulated by a header- and footer- string into log.do_patch. With this insane.bbclass can drop warnings/errors depending on 'patch-fuzz' in ERROR_QA or WARN_QA. Default remains unchanged: Spit out warnings only. A message for two fuzzed patches and 'pact-fuzz' in ERROR_QA now looks like: | ERROR: autoconf-native-2.69-r11 do_patch: Fuzz detected: | | Applying patch autoreconf-exclude.patch | patching file bin/autoreconf.in | Hunk #1 succeeded at 73 with fuzz 1 (offset -3 lines). | Hunk #2 succeeded at 143 (offset 6 lines). | Hunk #3 succeeded at 167 (offset 6 lines). | Hunk #4 succeeded at 177 (offset 6 lines). | Hunk #5 succeeded at 281 (offset 15 lines). | Hunk #6 succeeded at 399 (offset 15 lines). | Hunk #7 succeeded at 571 (offset 20 lines). | Hunk #8 succeeded at 612 (offset 20 lines). | Hunk #9 succeeded at 636 (offset 20 lines). | Hunk #10 succeeded at 656 (offset 20 lines). | Hunk #11 succeeded at 683 (offset 20 lines). | | Applying patch autoreconf-gnuconfigize.patch | patching file bin/autoreconf.in | Hunk #1 succeeded at 55 with fuzz 1 (offset -3 lines). | Hunk #3 succeeded at 663 (offset 18 lines). | | The context lines in the patches can be updated with devtool: | | devtool modify autoconf-native | devtool finish --force-patch-refresh autoconf-native <layer_path> | | Don't forget to review changes done by devtool! | | ERROR: autoconf-native-2.69-r11 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz] (From OE-Core rev: c762c0be43a3854a43cb4b9db559b03126d50706) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve license checksumming logicRoss Burton2019-03-241-49/+32
| | | | | | | | | | | | | | | Instead of opening files as bytes and battling decoding to UTF-8 which can throw exceptions, open directly as strings and replace invalid codepoints. This handles licenses in encodings which are not UTF-8 but are based on ASCII much better. Also instead of extracting the license lines, writing them to a file, and then hashing the file, hash the lines directly. (From OE-Core rev: 63ef9d342277c4ba541b78cbb45ef181f071f495) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add configure-unsafe and configure-gettextRobert Yang2019-03-071-7/+21
| | | | | | | | | | So that the errors can be controlled by ERROR_QA or WARN_QA, and make them work with INSANE_SKIP. (From OE-Core rev: 4b86ebb6a87f75421a1d12d9d5dde303938c2e9f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Make INSANE_SKIP work for qa pkgconfig and laRobert Yang2019-03-071-5/+15
| | | | | | | | | | | The INSANE_SKIP = "pkgconfig" or "la" didn't work, this patch fixes the problem. [YOCTO #13087] (From OE-Core rev: 756d6419f10d388c5daa63b7607e580d8b5079f1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add package specific skips to sstate hashMichael Ho2018-12-141-0/+7
| | | | | | | | | | | | | | | | | The bbclass currently adds INSANE_SKIP to the sstate hash dependencies however the package specific skips such as INSANE_SKIP_${PN} are not added automatically because of how the class references them. This causes the problem that modifying INSANE_SKIP_${PN} does not invalidate the sstate cache and can mask build breaking warnings. Add an anonymous python snippet to explicitly include these additional relevant skips to the sstate hash. Singed-off-by: Michael Ho <Michael.Ho@bmw.de> (From OE-Core rev: 8690332183f10a5e5689da7ec030567dfd1ac091) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: BPF objects may mismatch in endianness and bitness tooKhem Raj2018-12-131-2/+2
| | | | | | | | | | | | | This ensures that bitness and endianness is ignored for BPF objects Fixes QA issues like Bit size did not match (32 to 64) kernel-selftest on /work/qemumips-yoe-linux/kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/bpf/test_btf_nokv.o (From OE-Core rev: 26722e59ca5df14bd90fc09306d97ff0fd078f32) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Correctly markup regex stringsRichard Purdie2018-12-081-8/+8
| | | | | | | | | There are various escape characters in these stings which python warns about so use the correct regex markup for them. (From OE-Core rev: 252b69c9f2abe3258366c540f56b156ed63e5437) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Clarify GNU_HASH warningRoss Burton2018-12-051-1/+1
| | | | | | | | | | | We have a fatal error if ELF objects don't have GNU_HASH segments but it doesn't explain what the problem is. At least give a hint to users by suggesting that LDFLAGS wasn't passed to the compiler. (From OE-Core rev: 5d4da6713b40e10e853eb746f700096307ffe158) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Recognise BPF as a valid EM_MACHINE typeKhem Raj2018-09-131-2/+4
| | | | | | | | | | | | | | | | BPF Linux ELF objects are generated with kernel-selftests with >= 4.18 kernel and when clang is enabled which packages BPF objects into packages, therefore recongnise this as a valid ELF target Add a selftest for BPF Do not flag BPF objects in target, since they pretty much will be ok for most of kernels architectures we care do support BPF (From OE-Core rev: 3667a8ec016bae3f8026ef7b4c895546804f6368) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe: split out machine to ELF data dictionaryRoss Burton2018-07-261-136/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: optimise buildpath searchRoss Burton2018-07-181-2/+2
| | | | | | | | | | | Instead of decoding every file we open as UTF-8 (with many errors as machine code isn't UTF-8), convert the build path to the UTF-8 byte representation and search for that instead. (From OE-Core rev: ffb52d383bfe413cf31fef13663fe9937a146c76) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Don't let warnings make previous errors non-fatalOlof Johansson2018-06-281-6/+6
| | | | | | | | | | | | | | | | | | | | | package_qa_handle_error() returns True on non-fatal issues and False on fatal issues. But the current usage has been to do sane = package_qa_handle_error(...) which would always reset sanity status to be that of the last issue identified. This change the assignments to use the &= operator instead: sane &= package_qa_handle_error(...) As far as I can tell, this is not a real problem in practice, because warnings of different levels (WARN_QA, ERROR_QA) does not seem to have been mixed in a way that triggered this issue. (From OE-Core rev: 21d015f6c9927598d64c48c925638619b25cf232) Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Make missing license file fatalOlof Johansson2018-06-281-1/+1
| | | | | | | | | | | | If a license file referenced from LIC_FILES_CHKSUM doesn't exist, insane.bbclass would output an error message, but would continue the build. This change makes this error fatal (as I suspect has been the intention). (From OE-Core rev: da29440633706fb7a346391d97894d6f2cbb0d01) Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Adds powerpc to elf headers machine dictionaryAlejandro Enedino Hernandez Samaniego2018-06-151-0/+1
| | | | | | | | | | | This patch adds makes it possible to build elf for powerpc by adding this combination to the elf headers machine dictionary, this can be useful when trying to build baremetal applications where the TARGET_OS=elf (From OE-Core rev: 6f7ef4f6049fa8f2a8e17abfcf53ccbc22394088) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Fix typos in 32bit risc-v machine typeKhem Raj2018-03-151-3/+3
| | | | | | | | (From OE-Core rev: 33d79f19dd3a2b5777e07fbf75ec4635d08e60e8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add support for RISC-V baremetalKhem Raj2018-03-151-0/+2
| | | | | | | | (From OE-Core rev: 9b30e805e769b6c8c12a9aba072f7df066b19179) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add support for ARM64 ILP32Daniel Díaz2018-01-031-1/+4
| | | | | | | | | | | Add aarch64 32-bits (ILP32) ELF header into dictionary and check binaries for 32-bitness. (From OE-Core rev: 4b4a1295b8476d2820935eb5661b2d24a49b29b2) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add microblaze-*-elf to machine dictionaryNathan Rossi2017-11-211-0/+3
| | | | | | | | | | | Add the definitions for microblaze-*-elf targets to the machine dictionary. (From OE-Core rev: a0104e47217e3a46d319a76929aec5b45c3ea6f9) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add entries for riscv 32bit/64bitKhem Raj2017-11-051-0/+4
| | | | | | | | (From OE-Core rev: 0e0d0adac1d9303340d7e992cdb02ed7a8127350) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: consider INSANE_SKIP without package-specifier tooRoss Burton2017-09-131-1/+2
| | | | | | | (From OE-Core rev: 604939186cc08ab0429ebe00f3e32661847f0cf0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>