Age | Commit message (Collapse) | Author |
|
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Make the code more generic to allow for the potential incomming class
layout changes.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
As stated in our top level license files, the license is MIT unless
otherwise stated. Add SPDX identifers accordingly. Replace older
license statementa with the standardised syntax. Also drop "All
Rights Reserved" expression as it isn't used now, doesn't mean anything
and is confusing.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add a comment so that users grepping for "github" or "gitlab" will find
this code (since the regex wont).
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Once, we didn't have reproducible debug info and weren't sure how we'd get it.
This is long since fixed so we can drop this exclusion as obsolete.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
'staging' is a term lost in time. This code now operates on the sysroots,
adjust the naming and messages to be more correct/appropriate.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This was never enabled originally as there were a ton of warnings and
we weren't able to fix them. Now we have reproducibile builds, this can
be enabled by default as there shouldn't be such paths any longer.
This is known to work well for OE-Core, other layers may have variable
quaility but enabling it will start to hint to other layers and maintainers
that these issues need fixing.
It also will give developers early warning of reproducibility issues, rather
than us catching them on the YP autobuilder.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
As reported in the bug report [1], there was no check for shebang
sizes on native scripts and now this is fixed.
The path scope of the qa_staging was increased from just checking
libdir to all the relevant SYSROOT_DIRS.
It is possible to skip this check through INSANE_SKIP.
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=11053
Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The current home path that is compared against is incorrect as it is missing the
package name, this patch adds it.
[YOCTO #14553]
Signed-off-by: Ahmed Hossam <Ahmed.Hossam@opensynergy.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
|
|
* fixes:
DEBUG: Executing python function do_qa_patch
/OE/build/oe-core/openembedded-core/meta/classes/insane.bbclass:1189: ResourceWarning: unclosed file <_io.TextIOWrapper name='/OE/build/oe-core/openembedded-core/meta/recipes-bsp/keymaps/files/GPLv2.patch' mode='r' encoding='utf-8'>
content = open(fullpath, encoding='utf-8', errors='ignore').read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
DEBUG: Python function do_qa_patch finished
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If "empty-dirs" is in ERROR_QA, then changes to QA_EMPTY_DIRS should
trigger the package_qa tasks to be rerun.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Adding "patch-fuzz" to ERROR_QA should trigger the patch tasks to
rerun to make sure any already existing fuzz is caught. This is
achieved by using bb.utils.filter() to see if "patch-fuzz" is in
ERROR_QA/WARN_QA as it adds whether the filtered strings are set or
not to the task hash.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Update internal variable names to improve the terms used.
Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
llvm-objdump emite MIPS_XHASH where as GNU objdump emits DT_MIPS_XHASH,
checking for shorted sequence makes this check work in both cases
mips-yoe-linux-objdump -p libx264.so.163 | grep XHASH
DT_MIPS_XHASH 0x00000168
mips-yoe-linux-llvm-objdump -p libx264.so.163 | grep XHASH
MIPS_XHASH 0x00000168
both are same things
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We want to use SPDX identifiers in LICENSE variables. There is now a
conversion script to make most of the translations. Add a list of
strings which have been replaced so we can show warnings to users
if they're still used anywhere.
Add checks to the package as insane check. This is currently a warning
by default but can be turned off or made an error as per the other standard
checks.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
hashlib.md5() is not permitted on a FIPS enabled host system. This is due
to md5 not being an approved hash algorithm.
Instead use:
hashlib.new('MD5', usedforsecurity=False)
This is allowed, as it's clear the hash is used for a non-security purpose.
Using an md5 to identify when a license has changed is permitted, as we're
not using it for file integrity.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Almost everywhere those are the same, except when making a cross toolchain
where HOST_ is where it's going to run, and TARGET_ is what it's going to
produce.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This was prompted by ltp's unreasonably long package_qa times; it has
a massive amount of executables and insane runs objdump for all of
them, serially.
This reduces the time from 4 minutes to 1m20s on my machine.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
previously used package_qa_check_src_uri was triggered during
package_qa stage, which implies having packages.
This isn't the case for native-only recipes or recipe that inherit
nopackages.
Still the checks performed (src-uri-bad) apply to those as well.
Therefore move the check from package_qa stage to unpack stage.
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
as defined by latest addition to the commit message guideline
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
correctly formed
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Meson 0.60 onwards no longer simply warns when an unrecognised option is
passed, it errors out instead. This means we can remove the logic in
insane.bbclass to check for the warnings.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The empty-dirs QA check verifies that all directories specified in
QA_EMPTY_DIRS are empty. It is possible to specify why a directory is
expected to be empty by defining QA_EMPTY_DIRS_RECOMMENDATION:<path>,
which will then be included in the error message if the directory is
not empty. If it is not specified for a directory, then "but it is
expected to be empty" will be used.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Use the same WARN_WA and ERROR_QA variables as insane.bbclass to allow
individual recipes, the distro or other configuration to determine
whether the various detected license errors should be treated as a
warning (as now) or as an error.
oe.qa.handle_error isn't immediately fatal, so oe.qa.exit_if_errors must
be called at the end of do_populate_lic to fail the task.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Extract package_qa_write_error, package_qa_handle_error and
package_qa_add_message functions from insane.bbclass to lib/oe/qa.py and
drop the package_qa_ prefixes.
Update various bbclasses to use the new functions. No import is required
since base.bbclass puts oe.qa in OE_IMPORTS.
Stop requiring callers to manually track whether a fatal error has been
encountered via a "sane" flag. Instead replace the QA_SANE variable with
QA_ERRORS_FOUND and call oe.qa.exit_if_errors or
oe.qa.exit_with_message_if_errors at the end of each task.
Inspired by discussion resulting from
https://lists.openembedded.org/g/openembedded-core/message/156793 and
https://lists.openembedded.org/g/openembedded-core/message/156900
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of FILERDEPENDS_*, the FILERDEPENDS should be FILERDEPENDS:*
such as FILERDEPENDS:/usr/bin/python3.9:lib32-python3-core as an example,
so switch to new override syntax to make sure the related check in effect.
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
ptest.bbclass has a sanity check that all recipes in oe-core which
inherit ptest are also listed in the ptest-packagelists.inc file, and
the build fails if this is not the case.
Whilst this is a laudable goal, it is over-zealous as if the recipe has
a bbappend in another layer which inherits ptest, the build will fail.
By changing the combination of anonymous Python and bb.error() to a
recipe-scope QA test, this can be handled with the other sanity checks
and bbappends can skip the test if desired.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There is a long standing bug where FILES_INFO isn't written into pkgdata
with a package suffix. This means if the files are read into the datastore
as intended, the last one "wins".
Fix this to work as intended. Most of the call sites using the data need
to be updated to handle this and the overrides change correctly.
Also fix some other problematic references noticed along the way.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
A few variables and messages were not migrated over to the new override
syntax (_ to :).
Let's fix that.
Signed-off-by: Quentin Schulz <foss@0leil.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of replacing '_<pkg>', we should be replacing ':<pkg>'.
Otherwise, when we meet a 'file-rdeps' QA error, the error message would be
like below.
QA Issue: /usr/lib64/libatopology.so.2.0.0:libatopology contained in package libatopology ...
The ':libatopology' should not be in the error message.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The automated conversion of OE-Core to use the new override sytax isn't
perfect. This patches some mis-converted lines and some lines which were missed
by the automation.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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 "_".
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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].
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Ensure that the native-last QA check can be controlled by the INSANE_SKIP
variable (realted to [YOCTO #5729]).
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Classes native/nativesdk should be inherited last to prevent unexpected
behaviour.
[YOCTO #5729]
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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>
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of showing a filename under packages-split, show the package
name and filename inside the package.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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]
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The messages from the ELF 'arch' test are not obvious, clarify the
messages and prune output paths.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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 ]
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|