summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
AgeCommit message (Collapse)Author
2021-08-02Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18insane: clean up some more warning messagesRoss Burton
(From OE-Core rev: 2abe18682192e7b38b9af5a5043906f2f069648f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10insane: don't check for a warning string that is never outputRoss Burton
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: a67e9ebfd5b8002fd4a7d8d27ff0d997817f76e1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-28insane: native-last: Only print classes inherited after native/nativesdkTomasz Dziendzielski
For usability, only print the classes inherited after native/nativesdk which makes it easier for the user to see where the problem is. Realted to [YOCTO #5729]. (From OE-Core rev: 78f7cf59783faab6ef8d4f4fde774754db946519) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-28insane: Add missing INSANE_SKIP mechanism for native-last QA checkTomasz Dziendzielski
Ensure that the native-last QA check can be controlled by the INSANE_SKIP variable (realted to [YOCTO #5729]). (From OE-Core rev: 2d95aee64766341bf81f610386bac222e329f1bb) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-27insane: Add test for native/nativesdk inherit orderTomasz Dziendzielski
Classes native/nativesdk should be inherited last to prevent unexpected behaviour. [YOCTO #5729] (From OE-Core rev: 55a0197fe62577fd51d41d87822e6d64d85c7680) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30insane.bbclass: allow fifosTrevor Woerner
Allow recipes to create fifos. If insane.bbclass tries to read() a fifo, the process will hang waiting for something to read(). Therefore, skip any check that would try to read() the object, if the object is a fifo. (From OE-Core rev: a7b1d22e93c8846d84a9855876038c2b38958dec) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-02insane: add GitLab /archive/ testsAndrey Zhizhikin
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: d76b33c6a8489378a1f5500554367127199ae19d) Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-17insane: check for missing update-alternatives inheritAndrey Zhizhikin
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: 24b5ccc76d5660fac38ac5346666380a0ecce359) Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05insane: only load real files as ELFRoss Burton
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: c63af30d3b6350361daff94a59d4f14d7c5395e1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02insane: improve gnu-hash-style warningRoss Burton
Instead of showing a filename under packages-split, show the package name and filename inside the package. (From OE-Core rev: 4f78fc65bb0c9bff05651d9e543bab3d75998f79) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02insane: fix gnu-hash-style checkSumit Garg
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: 996010f1b9ca98592e2c87e1adcb0c79b86517b7) Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18insane: improve arch test messagesRoss Burton
The messages from the ELF 'arch' test are not obvious, clarify the messages and prune output paths. (From OE-Core rev: 8211b42f10b0f2a8e415fee680b37b5ce224a2d5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12insane: consolidate skipping of temporary do_package filesRoss Burton
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: 4b2f45c47a5c8c800626f12c14f216a5ab923512) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-12insane: Check for feature check variables not being usedJacob Kroon
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: c06489d102682504afe33f9fee3facd9628b3f57) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-21base/insane: Check pkgs lics are subset of recipe lics only onceQuentin Schulz
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: 852408ed4be1f64c57e196688728b7ed223d3493) Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-07insane: Promote warnings into errorsRichard Purdie
There are several warnings the build can emit which show real problems in the way recipes are being built. Some distros like poky and the Yocto Project autobuilder have been fixing the issues these show for some time. OE-Core has therefore been clean of these errors and warnings for some time. Promote warnings into errors to match the defaults in poky to encourage people to fix these real issue and reduce confusion when people switch distros or customise. (From OE-Core rev: a6a3a4a3739df3ab867fbe7e5a8cb5cac5ee124a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24insane.bbclass: Add test for shebang line lengthDomarys Correa
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: e694b09cacf8eb0b7e189f449816d3d6a337cb37) Signed-off-by: Domarys Correa <domarys.correa@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-18insane.bbclass: Correct typo inhert->inheritKhem Raj
(From OE-Core rev: 8fdceff7a9581173726c2a2636a5815accca73e2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08package.bbclass: Support stripping and debug copy of static librariesMark Hatle
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>
2020-01-19insane.bbclass: Spawn warning for missing mime-xdg in inheritAndreas Müller
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>
2020-01-19insane.bbclass: introduce a warning for mime missing in inheritAndreas Müller
* 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>
2020-01-19mips: Enable gnu-hash-style on glibcKhem Raj
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>
2019-12-28insane: don't use cachedpathRoss Burton
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>
2019-11-29insane: fix GitHub /archive/ testRoss Burton
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>
2019-11-14insane: improve textrel warning messageRoss Burton
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>
2019-10-08insane: add check for perllocal.podRoss Burton
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>
2019-08-14insane.bbclass: in file-rdeps do not look into RDEPENDS recursivelyAlexander Kanavin
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>
2019-08-03insane: check if the recipe incorrectly uses DEPENDS_${PN}Ross Burton
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>
2019-07-05insane: use clean_path for the host contamination warningsRoss Burton
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>
2019-06-19insane: remove empty test that does nothingRoss Burton
(From OE-Core rev: 5da7ad1a483d0840a9a2e3b95fa62a1901be73f2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19insane: improve buildpath warning messagesRoss Burton
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>
2019-05-21insane: add sanity checks to SRC_URIRoss Burton
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>
2019-04-11insane.bbclass: Trigger unrecognzed configure option for mesonAndreas Müller
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>
2019-04-10insane: fix gettext dependency warningRoss Burton
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>
2019-04-09patch/insane: Rework patch fuzz handlingAndreas Müller
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>
2019-03-24insane: improve license checksumming logicRoss Burton
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>
2019-03-07insane.bbclass: Add configure-unsafe and configure-gettextRobert Yang
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>
2019-03-07insane.bbclass: Make INSANE_SKIP work for qa pkgconfig and laRobert Yang
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>
2018-12-14insane.bbclass: add package specific skips to sstate hashMichael Ho
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>
2018-12-13insane.bbclass: BPF objects may mismatch in endianness and bitness tooKhem Raj
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>
2018-12-08classes: Correctly markup regex stringsRichard Purdie
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>
2018-12-05insane: Clarify GNU_HASH warningRoss Burton
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>
2018-09-13insane: Recognise BPF as a valid EM_MACHINE typeKhem Raj
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>
2018-07-26lib/oe: split out machine to ELF data dictionaryRoss Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18insane: optimise buildpath searchRoss Burton
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>
2018-06-28insane.bbclass: Don't let warnings make previous errors non-fatalOlof Johansson
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>
2018-06-28insane.bbclass: Make missing license file fatalOlof Johansson
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>
2018-06-15insane.bbclass: Adds powerpc to elf headers machine dictionaryAlejandro Enedino Hernandez Samaniego
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>
2018-03-15insane.bbclass: Fix typos in 32bit risc-v machine typeKhem Raj
(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>