Commit Graph

332 Commits

Author SHA1 Message Date
Peter Kjellerstedt
decda506b3 insane.bbclass: Make changes to QA_EMPTY_DIRS trigger package_qa to rerun
If "empty-dirs" is in ERROR_QA, then changes to QA_EMPTY_DIRS should
trigger the package_qa tasks to be rerun.

(From OE-Core rev: 9f21f9b613c5aaf1883b3ad6eb6463014c2764cd)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03 17:52:24 +01:00
Peter Kjellerstedt
8c9503880e insane.bbclass: Make do_qa_patch() depend on if patch-fuzz is in ERROR_QA
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.

(From OE-Core rev: 19a88df166862eb04fe6bee487796ef460d08771)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03 17:52:24 +01:00
Saul Wold
d9e500f83d meta/scripts: Improve internal variable naming
Update internal variable names to improve the terms used.

(From OE-Core rev: f408068e5d7998ae165f3002e51bc54b380b8099)

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-10 08:00:28 +00:00
Khem Raj
bf6ce6ecc8 insane: Accomodate llvm-objdump
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

(From OE-Core rev: 45390aee03ad0adfcabf6d96109e73136436acad)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00
Richard Purdie
321cf8962e license/insane: Show warning for obsolete license usage
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.

(From OE-Core rev: 9379f80f484f94686a4d494e9e237fadfb72a938)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02 18:43:25 +00:00
Mark Hatle
e9cc9772f2 insane.bbclass: Update insane.bbclass to work on FIPS enabled hosts
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.

(From OE-Core rev: 7f7eb82ce47ede6ec6f50cbcb56cbfbe10e8d20c)

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>
2022-03-01 23:44:59 +00:00
Alexander Kanavin
4668db8175 insane: use HOST_ variables, not TARGET_ to determine the cross system
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.

(From OE-Core rev: cd25e5544ca3f48cc4c32001e917aa3dc20dd79a)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25 15:30:04 +00:00
Richard Purdie
71ef319193 meta/scripts: Automated conversion of OE renamed variables
(From OE-Core rev: aa52af4518604b5bf13f3c5e885113bf868d6c81)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:27 +00:00
Richard Purdie
a5280f7e30 features_check/insane: Use hasOverrides datastore method
(From OE-Core rev: 401c56258753a96c0a4e3e91a11518f182d410ff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-17 17:51:03 +00:00
Alexander Kanavin
18f165c9e8 insane.bbclass: use multiprocessing for collecting 'objdump -p' output
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.

(From OE-Core rev: fac984b99fdb46949879516cb87153860f402c75)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-08 14:20:18 +00:00
Konrad Weihmann
53a41cb39c insane: move src-uri-bad checks to unpack stage
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.

(From OE-Core rev: 8fe68a0516df25a9f336c9f5156a6895d65c0820)

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-17 09:56:14 +00:00
Konrad Weihmann
35ca84e101 insane: add Inactive-Upstream to Upstream-Status
as defined by latest addition to the commit message guideline

(From OE-Core rev: 05c39d9ee820c5807353d1f147fb36596466d03b)

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-17 09:56:14 +00:00
Alexander Kanavin
b825ea5ced insane.bbclass: add a check that Upstream-Status patch tag is present and correctly formed
(From OE-Core rev: d679c35e087499075a5b8c2222d8e7007fc3e75d)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-01 16:23:45 +00:00
Ross Burton
39906f5d4d insane: remove unrecognised option check for Meson
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.

(From OE-Core rev: 472acf29abd4cdc9d8ef10a1940a541275d508cf)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-13 16:11:27 +00:00
Peter Kjellerstedt
3e9c480121 insane.bbclass: Add a check for directories that are expected to be empty
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.

(From OE-Core rev: a454fda9c3d6b11cfdc54a49a7bb3f8a76a5ed58)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-03 11:12:26 +00:00
Mike Crowe
cdeb02654f insane,license,license_image: Allow treating license problems as errors
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.

(From OE-Core rev: bb164adca94b5a43751aabe6b6d702a3d60dfdc7)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-17 11:56:33 +01:00
Mike Crowe
51b1611e20 lib/oe/qa,insane: Move extra error handling functions to library
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

(From OE-Core rev: f0ad152ef4cc15c042bc9eeefb6af096d054b220)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-17 11:56:32 +01:00
Richard Purdie
188a6e5895 base/insane: Import oe.qa by default
(From OE-Core rev: 3b4ce5f69cd962cd219aa3c0e7a2de9096e2ecb8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14 22:32:50 +01:00
Mingli Yu
46757ac1e8 insane.bbclass: add FILERDEPENDS related check back
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.

(From OE-Core rev: 6e5650be0ce5575da1ce5b6ea8b24a82ec7b1210)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-16 09:50:34 +01:00
Ross Burton
b3dcbdc4d6 ptest: allow the ptest-packagelists.inc warning to be disabled
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.

(From OE-Core rev: abe45c8c0a6da56a278796654d0520250dfd2a97)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-02 12:12:08 +01:00
Richard Purdie
dd6b55d70c package/scripts: Fix FILES_INFO handling
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.

(From OE-Core rev: a1190903e0a61a12c9854c96af918ae8d12c6327)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-17 09:53:04 +01:00
Quentin Schulz
3ae80177fb insane.bbclass: fix new override syntax migration
A few variables and messages were not migrated over to the new override
syntax (_ to :).

Let's fix that.

(From OE-Core rev: c595d6040d2e0ef94d7da043b41226e90dddf318)

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>
2021-08-13 14:44:06 +01:00
Chen Qi
3c492c59c0 insane.bbclass: fix the file-rdeps QA message for the new override syntax
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.

(From OE-Core rev: d65541c13b1346468dce749523b1dc04cfb7f70e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-04 20:45:41 +01:00
Richard Purdie
65133015b1 meta: Manual override fixes
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.

(From OE-Core rev: 4e9a06b64b43131b731fb59a0305f78a98e27fbd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
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-08-02 15:44:10 +01:00
Ross Burton
9230ef121d insane: clean up some more warning messages
(From OE-Core rev: 2abe18682192e7b38b9af5a5043906f2f069648f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:26 +01:00
Ross Burton
81adf49416 insane: don't check for a warning string that is never output
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-03-10 10:30:39 +00:00
Tomasz Dziendzielski
24e95b9a0b insane: native-last: Only print classes inherited after native/nativesdk
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-28 23:12:05 +00:00
Tomasz Dziendzielski
eb604952d5 insane: Add missing INSANE_SKIP mechanism for native-last QA check
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-28 23:12:05 +00:00
Tomasz Dziendzielski
0f0c0df633 insane: Add test for native/nativesdk inherit order
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>
2021-01-27 10:17:45 +00:00
Trevor Woerner
f0d083a984 insane.bbclass: allow fifos
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-12-30 14:01:06 +00:00
Andrey Zhizhikin
8978115d3b insane: add GitLab /archive/ tests
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-11-02 11:35:10 +00:00
Andrey Zhizhikin
e08adbd180 insane: check for missing update-alternatives inherit
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-17 09:47:45 +01:00
Ross Burton
2762e2e84b insane: only load real files as ELF
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-05 22:19:19 +01:00
Ross Burton
0033cc5c10 insane: improve gnu-hash-style warning
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-02 16:00:46 +01:00
Sumit Garg
c1b2e1b424 insane: fix gnu-hash-style check
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-09-02 16:00:46 +01:00
Ross Burton
f17b1054cb insane: improve arch test messages
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-18 11:06:32 +01:00
Ross Burton
9188716103 insane: consolidate skipping of temporary do_package files
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-07-12 12:21:47 +01:00
Jacob Kroon
9549a9ea3f insane: Check for feature check variables not being used
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-06-12 08:25:05 +01:00
Quentin Schulz
fa7b29e22b base/insane: Check pkgs lics are subset of recipe lics only once
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-21 10:52:07 +01:00
Richard Purdie
643c26562f insane: Promote warnings into errors
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-05-07 12:16:00 +01:00
Domarys Correa
5c90ec2d80 insane.bbclass: Add test for shebang line length
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-04-24 14:10:08 +01:00
Khem Raj
f9e0c99568 insane.bbclass: Correct typo inhert->inherit
(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-18 23:53:54 +00:00
Mark Hatle
38a754214a package.bbclass: Support stripping and debug copy of static libraries
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-02-08 13:20:02 +00:00
Andreas Müller
73cd296ac0 insane.bbclass: Spawn warning for missing mime-xdg in inherit
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-19 13:24:38 +00:00
Andreas Müller
38afa8f82a insane.bbclass: introduce a warning for mime missing in inherit
* 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-19 13:24:38 +00:00
Khem Raj
45e8f1351a mips: Enable gnu-hash-style on glibc
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>
2020-01-19 13:24:38 +00:00
Ross Burton
adcc017443 insane: don't use cachedpath
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-12-28 23:25:41 +00:00
Ross Burton
8a3a1e4a35 insane: fix GitHub /archive/ test
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-29 17:43:40 +00:00
Ross Burton
3aed62d687 insane: improve textrel warning message
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-11-14 13:20:59 +00:00