summaryrefslogtreecommitdiffstats
path: root/meta/classes-global/insane.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* insane/do_qa_unpack: add checks that ensure S is set correctlyAlexander Kanavin2025-06-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | The checks are fatal, as this avoids rather more cryptic errors further down the build. Example: ERROR: gnu-config-native-20240823+git-r0 do_unpack: Recipes that set S = "${WORKDIR}/git" or S = "${UNPACKDIR}/git" should remove that assignment, as S set by bitbake.conf in oe-core now works. ERROR: perlcross-native-1.6.2-r0 do_unpack: S should be set relative to UNPACKDIR, e.g. replace WORKDIR with UNPACKDIR in "S = ${WORKDIR}/perl-cross-${PV}" Dropping the S = ${WORKDIR}/git assignment (addressing the first error) can be done with a single sed command when there is a lot of recipes: sed -i "/^S = \"\${WORKDIR}\/git\"/d" `find . -name *.bb -o -name *.inc -o -name *.bbclass` Replacing WORKDIR with UNPACKDIR can be done similarly, but should be done after the removals: sed -i "s/^S = \"\${WORKDIR}\//S = \"\${UNPACKDIR}\//g" `find . -name *.bb -o -name *.inc -o -name *.bbclass` (From OE-Core rev: 46480a5e66747a673041fe4452a0ab14a1736d5e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Fix debug-deps checkRyan Eatmon2025-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15901 The cheeck for debug-deps is looking for the mere existence of the substring "-dbg" inside of the name of an RDEPENDS package, but it should be an endswith check. This helps with some eroneous errors in kernel module names like: ERROR: linux-xxx do_package_qa: QA Issue: kernel-modules rdepends on kernel-module-g-dbgp-6.12.22-ti [debug-deps] and ERROR: QA Issue: kernel-module-mtk-vcodec-dec-6.16.0-rc1-next-20250610-dirty rdepends on kernel-module-mtk-vcodec-dbgfs-6.16.0-rc1-next-20250610-dirty [debug-deps] (From OE-Core rev: 1b85d84c736a0fa5cb27b8716ca37f181464c85a) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add test for recipe naming/class mismatchesRoss Burton2025-06-091-1/+8
| | | | | | | | | | | | | | | | | | It's not unheard of for new users to create a recipe called foo-native that has BBCLASSEXTEND="native" instead of "inherit native". This will result in a foo-native recipe that is actually a target recipe, and a foo-native-native recipe for native builds. Add a test in recipe_qa to verify that recipes called -native inherit native, and recipes called nativesdk- inherit nativesdk. As this behaviour is expected, add the new test to the set of tests required to pass for Yocto Project Compatible status. (From OE-Core rev: ec2c10a3e85d0772135289fe416d13fa3afca571) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add unimplemented-ptest detection for cargo-based testsInes KCHELFI2025-05-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | Extend unimplemented-ptest QA check to detect Rust tests. Note: To enable this QA check, add the following to your local.conf: WARN_QA += "unimplemented-ptest" Examples of Rust-based meta-oe packages triggering unimplemented-ptest: WARNING: cbindgen-0.28.0-r0 do_patch: QA Issue: cbindgen: cargo-based tests detected [unimplemented-ptest] WARNING: fdfindd-10.2-r0 do_patch: QA Issue: fdfindd: cargo-based tests detected [unimplemented-ptest] WARNING: deqp-runner-0.20.3-r0 do_patch: QA Issue: deqp-runner: cargo-based tests detected [unimplemented-ptest] WARNING: bindgen-cli-0.71.1-r0 do_patch: QA Issue: bindgen-cli: cargo-based tests detected [unimplemented-ptest] WARNING: python3-maturin-1.8.3-r0 do_patch: QA Issue: python3-maturin: cargo-based tests detected [unimplemented-ptest] WARNING: uutils-coreutils-0.0.30-r0 do_patch: QA Issue: uutils-coreutils: cargo-based tests detected [unimplemented-ptest] (From OE-Core rev: c3c10f00b1f4d4a092e5d3834ec0ba6abd6ac969) Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Report all invalid PACKAGECONFIGs for a recipe at oncePeter Kjellerstedt2025-04-081-4/+4
| | | | | | | | | | | Rather than reporting each invalid PACKAGECONFIG with a separate error message, report them all with one error message. (From OE-Core rev: bf9366583f53fe2498d7aa9192ebfe6562887cf3) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Move test for invalid PACKAGECONFIGs to do_recipe_qaPeter Kjellerstedt2025-04-081-10/+10
| | | | | | | | | | | This makes sure invalid PACKAGECONFIGs are reported also for recipes that have no do_configure task, e.g., packagegroups. (From OE-Core rev: d3325c384a7df54c564cae093659cf7b692629f2) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: do not leak host uid/gid into package_qa sstate signaturesAlexander Kanavin2025-02-281-0/+1
| | | | | | | | | | | | | This prevented package_qa sstate from being reusable unless host uid/gid values would match exactly (and they unfortunately do on the yocto autobuilder worker machines which all share a 'pokybuild' user). I noticed this when testing CDN sstate reuse, which otherwise works well. (From OE-Core rev: 6ea8b4b10b0549c858427a8411bf2a4cd5c0eb7b) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-global/insane: Handle case where RPROVIDER is also a providerJoshua Watt2024-12-121-8/+13
| | | | | | | | | | | | | | | | | | | The check to see if a provider of a given package is listed first checks for an exact match of the provider name. However, if this match existed, but didn't match in the task dependencies, it would not continue to look for other providers of package. This would manifest if one (non-virtual) recipe package RPROVIDES the name of a package produced by another recipe. Fix this, and also clean up the code to make it more readable by using a function to check if a runtime dependency is in the task dependencies. In addition, if no provider is found, list all the possible providers instead of the last one that was looked at. (From OE-Core rev: f13de6ab616eb1e38960a2296111febe2a9f4a28) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Split ERROR_QA into CHECKLAYER_REQUIRED_TESTSRichard Purdie2024-11-281-19/+18
| | | | | | | | | | | | | | | We'd like to start requiring some set of checks are enabled for Yocto Project Compatible Status and to pass yocto-check-layer. Start by splitting ERROR_QA into two sets, the ones we think can be required and the ones we know have challenges to implement (e.g. with prebuilt binaries). To change the required list, the YP TSC would need to approve. (From OE-Core rev: ce2e42ace2d15fb6745437cf0a7f07d28398ca12) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Ensure package_qa tasks run in builds when expectedRichard Purdie2024-10-241-0/+2
| | | | | | | | | | | | | Currently, if you "bitbake XXX" and XXX depends on something else, the do_package_qa teask for that something may not run. Users would generally expect it to have though. Add in the missing dependency to ensure that do_build does trigger the right package_qa tasks. (From OE-Core rev: e0beb64c6d3cf1d649f79a8704fb25cdf83b4a8b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: avoid race condition when DEBIAN/CONTROL entries are removedRoss Burton2024-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race condition when iterating directories which are being altered whilst iterating, which is something that can and does happen when do_package_qa runs at the same time as eg do_package_write_ipkg (the opkg metadata is written inside the build tree). The race is that naive code will list a directory contents and then stat() each name to determine if its a directory or file. The classic failure that we see is that CONTROL/ is found on a listdir but deleted by the time the stat happens, so is incorrectly listed as a file (because it is not a directory). Since Python 3.5, os.walk() uses scandir() instead of listdir() which mitigates this race by returning the file type alongside the name, so a stat is no longer needed to identify the type. However, cachedpath.walk() was copied from Python before this, so it uses listdir() and has this race condition. Since I changed insane to use cachedpath.walk()[1] I inadvertently reintroduced this race. I believe there's actually no need to use cachedpath.walk() and a logical fix is to simply use os.walk(): With os.walk() each directory is listed and categorised in a single os.scandir() as the underlying syscall, getdents64, returns the type. However, cachedpath.walk() uses os.listdir() which ignores the type field returned and has to do a stat() on every file to determine the type. Thus, we should switch users of cachedpath.walk() to os.walk(): there's no real gain in what is effectively just a prefetch for the stat cache, but depending on what the calling code does may result in more stat() calls than needed. In the future we may want to redesign cachedpath to reimplement walk so that it can also cache the DirEntry instances as returned by scandir() as that will avoid needing to call stat() at all in many cases. However I believe we should instead use a caching pathlib.Path instance instead. [1] cad3c8 insane: use oe.cachedpath.CachedPath instead of os.path (From OE-Core rev: 22e4486d65e4874bf48d89160d69118f318278e8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Don't used cachedpath for os.lstat()Richard Purdie2024-10-141-3/+2
| | | | | | | | | | | The functions behave slightly differently to the functions they're caching and the use in insane.bbclass isn't compatible. For now, to avoid build failures, switch back to the stat calls. We may be able to improve cachedpath or change the call sites. (From OE-Core rev: fa771ae887ab5152f043748cf3419735831bcf7b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: rewrite package_qa_check_archRoss Burton2024-10-111-16/+25
| | | | | | | | | | Reorder and comment the architecture checks to make it clearer what they are actually checking. (From OE-Core rev: 78db9e79e1a307ffb8436e26656bfb98efb513bc) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: use oe.cachedpath.CachedPath instead of os.pathRoss Burton2024-10-111-14/+28
| | | | | | | | | | | | | | | | | | | The insane QAPATHTESTs make many os.stat() calls, the majority of which are redundant with caching as the initial sweep does a stat() on every entry to determine if it is a file or a directory, and from then on each test that does further stat()s is redundant as the tree doesn't change. Switch os.stat() and friends (os.path.isfile(), etc) to use a common oe.cachedpath.CachedPath() instance that is shared between all of the functions, meaning only one stat is done. In my test case of ltp:do_package_qa, this reduces the time taken from 44s to 37s. (From OE-Core rev: cad3c889439fd6a007debd6f2f6578f4a1e16c9c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: optimise test in package_qa_check_shebang_sizeRoss Burton2024-10-111-2/+1
| | | | | | | | | | Check whether the elf is not None first, before doing os.stat() calls on disk. Also don't check anything that isn't a file, not just FIFOs. (From OE-Core rev: 38454a2675f38c7db55efcb67bbb8b9fef7e0bf1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: micro-optimise the sweep of pkgfilesRoss Burton2024-10-111-16/+11
| | | | | | | | | | | | | | Don't actively do more work: - Exit early if there are no packages being generated - Don't iterate repeatedly when removing CONTROL and DEBIAN - Extend a list with another list instead of appending item by item - Remove unused variables (From OE-Core rev: 79ffb8896d570dd935d3aea9d28ee20b52e1674a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: tidy up objdump preloading in package_qa_walk()Ross Burton2024-10-111-10/+11
| | | | | | | | | | | | | | Move the prepopulate function out of global scope, and access the dictionary once instead of repeatedly. This still results in each ELF being opened twice, but this avoids opening all of the files at once and the ELFFile.open() call is fairly fast. (From OE-Core rev: cda3647b32703f43c4fe2af3bab977e5698633f6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: check for RUNPATH as well as RPATHRoss Burton2024-10-111-4/+4
| | | | | | | | | | | | | | Since oe-core 66f8a7 merged in 2023[1], ld sets DT_RUNPATH instead of DT_RPATH when -rpath is specified, which we don't check for. Update the insane tests to look at both RPATH and RUNPATH. [1] oe-core 66f8a745668a067d8d763fa2af3e65f26c9c1ebe (From OE-Core rev: d6c5076d179a3d5ebb74b719ec4d523c197c1918) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: only parse ELFs if they're files, not symlinksRoss Burton2024-10-111-19/+2
| | | | | | | | | | | This reduces the number of files that need to be swept by not scanning eg the library symlinks, and means we can remove the explicit islink() checks in many of the tests. (From OE-Core rev: aa9ec4b5c719bf610ad953095d1111e4c257747e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Remove dependency on TCLIBC from QA testRichard Purdie2024-09-051-0/+1
| | | | | | | | | | The TCLIBC value is already encoded into build paths through the triplet so no need to encode it here where it can cause problems for allarch output that span multiple libcs. (From OE-Core rev: ea8c7a457a79589c35ca80b2f265799164855674) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Remove redundant returnsOla x Nilsson2024-09-011-3/+0
| | | | | | | | | | Some redundant return statements were left over from insane: Drop oe.qa.add_message usage (From OE-Core rev: 1e49635f802b04acad14115640ce9fcd63cc32a7) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Allow ERROR_QA to use 'contains' hash optimisations for do_package_qaRichard Purdie2024-08-291-34/+36
| | | | | | | | | | | | | | | | | | | We want ERROR_QA to operate using the "contains" optimizations which means accessing the variable only using the contains function. To do this, remove usage of ALL_QA, open coding the few references to check both WARN_QA and ERROR_QA. Move the function table generation to a separate function where we can exclude the ERROR_QA and WARN_QA variables since they are handled by the handle_error() function calls. Ensure all the chain of functions to the handle_error calls is correctly recognised in the variable dependencies. (From OE-Core rev: 384e9a6b2e7943b6a3ade1215ed79351c78a0b0d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Further simplify codeRichard Purdie2024-08-291-27/+14
| | | | | | | | | Now handle_error is used, we can further simplify the QA test execution as we don't need seperate function lists for warnings and errors. (From OE-Core rev: 6896c9fcfc57f007c0ce15f7804e79b6b88f5ded) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add missing vardepsexcludeRichard Purdie2024-08-291-0/+2
| | | | | | | | | | | | If we improve the function dependency visibility in insane.bbclass, it exposes some dependencies which were previously not seen causing variances in the do_package_qa task checksums. Update vardepsexclude in a couple of test cases to ensure the sstate hash selftests pass and the taskhashes don't vary when we don't expect them too. (From OE-Core rev: 9b6dae2771ed86bd2946548004f4da58e8c0b44c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Drop oe.qa.add_message usageRichard Purdie2024-08-291-138/+87
| | | | | | | | | | | | | | | Drop the oe.qa.add_message() usage in favour of oe.qa.handle_error() which has code allowing it to be optimised with contains usage. The patch also drops unused return values which we stopped using a while ago and drops the now unneeded function parameters, generally leading to cleaner code. The code should be functionally equivalent. (From OE-Core rev: 9b2eea9fd4eab4f5e12e955738db22091b91f698) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Optimise ERROR_QA/WARN_QA references in do_populate_sysrootRichard Purdie2024-08-291-3/+2
| | | | | | | | | | The new contains code can't inspect variable references in handle_error() calls. Expand what is effectively a hardcoded reference anyway so the code can optimise it. (From OE-Core rev: 51f767d92efb3daeb4aa3b91d72e6d2993cb0f46) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Rename license-incompatible to license-exceptionPeter Kjellerstedt2024-08-211-1/+1
| | | | | | | | | | | | | | | | There is currently both an incompatible-license and a license-incompatible QA message. This is very confusing. However, license-incompatible is only used to output a message when a package is included in an image despite it having a license that is normally incompatible (by using the INCOMPATIBLE_LICENSE_EXCEPTIONS variable). To better match how it is used and to distinguish it from incompatible-license, rename it to license-exception. (From OE-Core rev: d309eed66f5a4a4bce082536e51207fe65725fab) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove obsolete QA errorsMichal Sieron2024-07-301-4/+4
| | | | | | | | | | | | Those were removed quite some time ago: - perms: 5da7ad1a483d0840a9a2e3b95fa62a1901be73f2 - split-strip: bcc03ea19e103f6aa93bada2f49fcc5cc7bc0790 - (compile|install)-host-path: a67e9ebfd5b8002fd4a7d8d27ff0d997817f76e1 (From OE-Core rev: 068d3821430734132c3eb70fd95461e0917fd1e8) Signed-off-by: Michal Sieron <michalwsieron@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add pep517-backend to WARN_QARoss Burton2024-07-261-1/+1
| | | | | | | | | | Enable the new pep517-backend warning from setuptools3, initially as a warning so as not to break builds straight away. (From OE-Core rev: 27597d986ad7b3a6c2d36150a163951be7c640f1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: skip unimplemented-ptest checks if disabledYoann Congal2024-07-161-1/+1
| | | | | | | | | | | This avoids searching through ${S} multiple times if unimplemented-ptest QA check is disabled (the default case). (From OE-Core rev: 8ee42430a91d13de2b7a53c2ae04aa54bd76fad0) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "insane: skip unimplemented-ptest on S=WORKDIR recipes"Yoann Congal2024-07-161-2/+0
| | | | | | | | | | | | S=WORKDIR is not supported anymore, so the check is now redundant. This reverts commit 9a2d2f7c2b7236667a6d80355f73db4c27e6582e (in OE-Core). (From OE-Core rev: 71c4bba0235b4cd45dc88844263e7b3f8ad9f079) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Promote long standing warnings to errorsRichard Purdie2024-07-141-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these warnings have been around and enabled for a long time. In particular, buildpaths has been like this for two years. I'm aware some layers still have not been able to resolve all the warnings but I believe that regardless, it is still time to raise the bar. If the warnings don't get fixed, it is probably a sign that nobody cares about the recipe and it should be dropped. For anyone coming here to find out what changed and how to disable it, if you are going to remove from ERROR_QA and add back to WARN_QA (or just ignore the warnings), please do it with a layer specific override rather than making it global. We have fixed these issues in core and intend to keep them all fixed. If you globally disable the errors, it just means we get patches which end up regressing things. You can do things like: ERROR_QA:remove:layer-mylayername = "buildpaths" not that I'd recommend it. Also note that the next version of Yocto Project Compatible will only be available to layers which are not disabling some set of these errors. (From OE-Core rev: b79b191cc43a45dde2adb61ea349b426cb2461d1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add patch-status to default ERROR_QAMartin Jansa2024-06-121-2/+1
| | | | | | | | | | | | | | | | * it's enabled for patches in oe-core for very long time and I was using it for many other layers as well, so most layers should be in good shape * it's also possible to disable it for individual layer as shown by oe-core in: https://git.openembedded.org/openembedded-core/commit/meta/classes-global/insane.bbclass?h=scarthgap&id=61a881fdbe8b5a21c6276b8a5d06cc30486b1eb3 (From OE-Core rev: b7fb91c797ab37a029b8dd1eb7277a7468bc97ed) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: show cleaned build paths in more testsRoss Burton2024-06-071-5/+5
| | | | | | | | | | A few tests were still manually cleaning their build paths, change them to use package_qa_clean_path(). (From OE-Core rev: f6550c3ee1bc076015d85db36b3d281e6a7ace9d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: error out on UNPACKDIR = WORKDIRKonrad Weihmann2024-06-041-0/+3
| | | | | | | | | | as this will clear WORKDIR and create race conditions across various handling tasks (From OE-Core rev: 1cf99ce3f79b2c96bdef5aa9b69c2b3ead7e46f1) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools/libtool: Drop libtool sysroot patch as not neededRichard Purdie2024-06-041-1/+1
| | | | | | | | | | | | | libtool auto detects the sysroot from gcc's parameters or configuration so we don't need to pass in this configuration separately to libtool. Whilst the option names do conflict with gcc/binutils, that is an issue for those projects to resolve, not us. Upstream libtool did reject the patch. We can drop this patch and simplify our code. (From OE-Core rev: 7c8553f81bccc3e8c2bb1116ee1e89f5f8af4c9e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: remove leftover variables and commentEmil Kronborg2024-06-031-4/+0
| | | | | | | | | | | | | | | The code that used these variable and the comment was introduced in commit b44d32ef41ef ("insane.bbclass: Portions of code were not running, fix this and sync with OE.dev. Also add tests for bad sysroot rpaths in binaries"). Later, in commit 17dae13fabe2 ("insane.bbclass: Fix ELF bitsize comparison"), some of that code was removed again, but not the variables and the comment. (From OE-Core rev: 730d00b0d1d1d617b62900be12fa034bb41fc48b) Signed-off-by: Emil Kronborg <emil.kronborg@protonmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: fix HOST_ variable namesEmil Kronborg2024-06-031-6/+6
| | | | | | | | | | | | | Commit cd25e5544ca3 ("insane: use HOST_ variables, not TARGET_ to determine the cross system") updated the variables themselves, but not their names. To prevent confusion, match the Python variable name to the BitBake variable name. (From OE-Core rev: f5bebc96580ec74d10bc96b4265357ebc9bcd6ad) Signed-off-by: Emil Kronborg <emil.kronborg@protonmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: remove skipping of cross-compiled packagesEmil Kronborg2024-06-031-5/+0
| | | | | | | | | | | | | After commit cd25e5544ca3 ("insane: use HOST_ variables, not TARGET_ to determine the cross system"), this check is no longer necessary. The introduction of HOST_ variables ensures architecture compatibility is correctly checked. (From OE-Core rev: 6e1ddeb05dcd5ff77e0f5526a6e56a484daa4864) Signed-off-by: Emil Kronborg <emil.kronborg@protonmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/insane: Move S/B checks to more logical place in insane classRichard Purdie2024-05-231-0/+4
| | | | | | (From OE-Core rev: f8f3315d58f9ec7824961d1f6f96d39c449b9578) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add error for B = WORKDIRRichard Purdie2024-05-231-0/+3
| | | | | | | | | This was never a good idea and would have mostly happened from S = WORKDIR however explictly disallow it and error if anyone tries. (From OE-Core rev: e3c2c1fac904bb518d85e10a2ac0177c81cbf7e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Error for S == WORKDIRRichard Purdie2024-05-221-0/+5
| | | | | | | | | Where a recipe uses WORKDIR as S, exit with a fatal error since the code is no longer safe for this layout. (From OE-Core rev: 32cba1cc916ad530c5e6630a927e74ca6f06289b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Fix case where S doesn't existRichard Purdie2024-05-131-1/+1
| | | | | | | | | If S doesn't exist, do_qa_patch would fail. Fix the code to not fail in this situation. (From OE-Core rev: 4041d91b63ff2315657499e22c74ec90adbf9e19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: handle dangling symlinks in the libdir QA checkRoss Burton2024-05-021-2/+2
| | | | | | | | | | | | | | | The "libdir" QA check tries to open every file it finds as an ELF. If it finds a dangling symlink that looks like a library by the filename it will try to open it and fail with FileNotFoundError error. As this dangling symlink probably points to a real file, silently absorb the error. [ YOCTO #13949 ] (From OE-Core rev: f044290f98ea66f2cecfbffd7d392dbc3d986da9) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Allow the warning about virtual/ to be disabledPeter Kjellerstedt2024-02-201-6/+7
| | | | | | | | | | | Commit f673d3d239799fb1ab50f4aa5d44187666aa0cd7 introduced a warning for virtual/ being used in RPROVIDES and RDEPENDS. Make it possible to disable the warning by removing "virtual-slash from WARN_QA. (From OE-Core rev: 968ffdb9fee5017eecce36ce878ea604c869ce95) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Clarify runtime/ warningRichard Purdie2024-02-131-1/+1
| | | | | | | | | | We should be pointing people at VIRTUAL-RUNTIME, not virtual so tweak the warning. Try and make it clear the difference between the build dependencies and the runtime ones. (From OE-Core rev: 01d815aa2c0bea113fb79b51bf67c0ff90d57dd2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-global/insane: Add check for "virtual/" in RPROVIDES and RDEPENDSSimone Weiß2024-01-191-0/+6
| | | | | | | | | | | | | Fixes [YOCTO #14538] Recipes shouldn't use "virtual/" in RPROVIDES and RDEPENDS. This was addressed already in recipes in meta-oe and oe-core. Add a test for this in insane.bbclass to ensure no regressions occur. (From OE-Core rev: f673d3d239799fb1ab50f4aa5d44187666aa0cd7) Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Python code cleanup in check_32bit_symbolsOla x Nilsson2024-01-151-3/+3
| | | | | | | | (From OE-Core rev: 67b06035326048323f972107f66eb50cf74def0b) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Check for adjtime in check_32_bit_symbolsOla x Nilsson2024-01-151-0/+1
| | | | | | | | | | adjtime was overlooked in the original commit. (From OE-Core rev: 07faecd87e77716cfedffeadc52e0982edfd6c7e) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-global/insane: Look up all runtime providers for file-rdepsJoshua Watt2023-12-241-18/+12
| | | | | | | | | | | | Uses the new foreach_runtime_provider_pkgdata() API to look up all possible runtime providers of a given dependency when resolving file-rdeps. This allows the check to correctly handle RPROVIDES for non-virtual dependencies (From OE-Core rev: 018fa1b7cb5e6a362ebb45b93e52b0909a782ac9) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>