Commit Graph

73 Commits

Author SHA1 Message Date
Peter Kjellerstedt
ef66352fcc packages.bbclass: Correct the check for conflicts with renamed packages
The original solution replaced all overrides with the package name that
was being checked. This can have unforseen consequences where some
variable involved in defining the value for the PKG:<package> variable
may rely on some override which is not set as expected. It also meant
that any PKG variable set using an override would not be caught, e.g.,
PKG:${PN}:${MACHINE} = "${PN}-dev" (made up example that would always
fail with the old code).

(From OE-Core rev: de62d538dbfe6caf123ff366643f893077175583)

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>
2023-10-06 11:51:11 +01:00
Jan Garcia
c94c1ba7c7 insane.bbclass: Count raw bytes in shebang-size
Operating systems limit the shebang to a maximum number of bytes.
This patch makes the shebang-size check count raw bytes instead of UTF-8 characters.

(From OE-Core rev: d4ac66c5cdaf971fb717cc5c5bf9aa51a787d412)

Signed-off-by: Jan Garcia <j@n-garcia.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Richard Purdie
a599437629 sstate: Stop allowing overlapping symlinks from sstate
When originally implemented, overlapping symlinks in DEPLOY_DIR were common. That
is no longer the case and these overlapping links are causing bugs in other areas
(e.g. bug 14123).

Therefore start showing errors for overlapping symlinks in shared areas. Whilst here,
fix a broken file reference in the grep command to match current file layouts and
update the message shown to users to match current times. Most of the message content
is obsolete now due to other advances and changes in the way the staging code
now works.

(From OE-Core rev: 15f98f72e1730fed5164fcd539737a7a7b96a1a2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Richard Purdie
7ebbd68f0f license/license_image: Fix license file layout to avoid overlapping files
Currently DEPLOY_DIR/licenses is added to SSTATE_ALLOW_OVERLAP_FILES. This
leads to bugs since when one MACHINE_ARCH recipes is cleaned, it removes the
files for another which then results in later build failures as license files
disappear.

The solution is to include SSTAGE_PKGARCH in the path names to the license files.
That does mean a search has to be used to find the correct license files for a
given PN but that can be done via SSTATE_ARCHS.

The implication for other tools is the layout has changed so tools will need to
adapt to the new paths. The benefit is no more strange build failures such as from
patterns like:

MACHINE=qemux86-64 bitbake core-image-minimal
MACHINE=genericx86-64 bitbake core-image-minimal
MACHINE=qemux86-64 bitbake linux-yocto -c clean
MACHINE=genericx86-64 bitbake core-image-minimal -C rootfs

[YOCTO #14123]

For anyone finding this commit, I'd question how much people should be relying on
this code for tooling and suggest the SPDX manifests should be the preferred data
format going forward anyway.

(From OE-Core rev: 1a4ab9fc26659507e678e87312b514e8ea515673)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 23:51:11 +01:00
Richard Purdie
84e17003c6 multilib: fix SSTATE_ARCHS for multilib usage
When building multilibs, we need to inject the multilib sstate pkgarch
into SSTATE_ARCHS so the list forms a complete search path. Add a tweak
to do this.

PACKAGE_ARCH defaults to TUNE_PKGARCH so this is equivalent and just
guards against recipes changing the value which may have other unwanted
side effects.

(From OE-Core rev: 37126ffc7ccbd3df57ebbd8e581d158f03bb3b4c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 23:51:11 +01:00
Richard Purdie
36397b6a17 sstate: Fix nativesdk entry in SSTATE_ARCHS
PACKAGE_ARCH gets refined by each target so this value isn't valid in all contexts.
Tweak to use underlying variables to build it so that it remains valid in wider
contexts and works with new usage in sdpx and license classes.

(From OE-Core rev: ca90379147cb75755d205670781d8922161e9317)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 23:51:11 +01:00
Adrian Freihofer
b31f99a6cb lib/oe/package: Refactor to make strip_execs callable without d
This allows to call strip_execs function from devtool without going
via tinfoil and a bitbake server process.

(From OE-Core rev: 3bde26d64a0c8c3ef8ffbcb398f2a268759321af)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-12 12:44:47 +01:00
Michael Opdenacker
14a6dc7c05 base: add newline before LICENSE_FLAGS_DETAILS
To improve readability and avoid putting one
inside LICENSE_FLAGS_DETAILS.

(From OE-Core rev: 5e027da9265e58df016fc3ebe45e4400f0e5c7a7)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-11 16:04:35 +01:00
Chen Qi
ef50da8f5b uninative.bbclass: sync to use UNINATIVE_STAGING_DIR
All other places in this bbclass are using ${UNINATIVE_STAGING_DIR}-uninative,
we should sync to use that too, although UNINATIVE_STAGING_DIR's default
value is STAGING_DIR.

(From OE-Core rev: a51fbe7975b15b1cb250974ced711cbd863dd88d)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-30 09:56:13 +01:00
Peter Kjellerstedt
d0ddefc7b7 insane.bbclass: Remove an unused variable
The use of coremeta_path was removed with commit 61a881fdbe (insane:
Improve patch-status layer filtering) when the patch-status QA test was
generalized.

(From OE-Core rev: 71a2c7b2608640dfa45d065692541d537149052e)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24 16:50:24 +01:00
Richard Purdie
65318019cd recipes/classes/scripts: Drop SRCPV usage in OE-Core
Now that SRCPV isn't needed we can simplify things in a few places...

(From OE-Core rev: 843f82a246a535c353e08072f252d1dc78217872)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24 16:50:24 +01:00
Richard Purdie
62afa02d01 base/package: Move source revision information from PV to PKGV
Source control information being present in PV used to be a hard requirement
for bitbake to operate correctly. Now that hashes are a required part of task
stamps, this requirement no longer exists.

This means we can defer the hash pieces to PKGV and simplify PV.

Use new bitbake fetcher API to inject the source revisions directly into the hash
allowing removal of some horrible code from base.bbclass and avoiding any hardcoding
about how SRCREV may or may not be used.

Use that API to object the string to append to PKGV and append that directly.

The user visible effect of this change is that PV will no longer have revision
information in it and this will now be appended to PV through PKGV when the
packages are written. Since PV is used in STAMP and WORKDIR, users will see
small directory naming and stamp naming changes.

This will mean that sstate reuse through hash equivalence where the source
revision changes but the output does not will become possible as the sstate
naming will become less specific and no longer contain the revision.

The SRCPV variable will no longer be needed in PV and is effectively now just
a null operation. Usage can be removed over time.

(From OE-Core rev: a8e7b0f932b9ea69b3a218fca18041676c65aba0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24 16:50:24 +01:00
Emil Ekmečić
d151ba95f6 Add GCP fetcher to list of supported protocols
If accepted, this patch should merge with the corresponding BitBake
patch titled "fetch2: add Google Cloud Platform (GCP) fetcher".

(From OE-Core rev: 1e2e596bcdff031d7d7dc1d6f6adbb03d9ec2995)

Signed-off-by: Emil Ekmečić <eekmecic@snap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-14 12:51:21 +01:00
Alexander Kanavin
f6bd6b72f8 insane.bbclass: add a RECIPE_MAINTAINER check (oe-core recipes only)
Absent maintainer entries are as well a frequent source of friction, as they are checked
only in selftest, and so aren't revealed until autobuilder runs.

The selftest is retained as it also checks for obsolete entries in maintainers.inc
(not possible to do in insane class).

(From OE-Core rev: 675dff0e37666c1cffa10a83f6f1f67d5fadd204)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30 09:16:52 +01:00
Alexander Kanavin
ba961128e2 insane.bbclass: add a SUMMARY/HOMEPAGE check (oe-core recipes only)
This was done in a selftest, but that is too late and creates
friction in integration as errors are not seen until autobuilder fails.

Bonus fix: SUMMARY check wasn't even working, as in the absence
of one set in the recipe there is a default value set from bitbake.conf.

I left DESCRIPTION check out for now, as many recipes don't actually
have it, and it's set from SUMMARY (plus a dot) if absent.

(From OE-Core rev: 4144c2f43da39336b03cfd612cbe1694cbf8c7bd)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30 09:16:52 +01:00
Alexander Kanavin
e8c8337989 insane.bbclass: add do_recipe_qa task
There is a need to run QA checks that can operate entirely from
recipe metadata and do not need any of the build artefacts or
source code. After some deliberation it was concluded that such
checks are best collected in their own task that runs as early as possible,
and so this commit adds the task.

Like package_qa, the task is sstate enabled, but doesn't (yet)
register the qa results into sstate.

(From OE-Core rev: e0c71367ab59021fc430ef215bbfc3b525036ba4)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30 09:16:52 +01:00
Alexander Kanavin
327f06e2d7 insane.bbclass: enable 32 bit time API check (as a warning) on affected architectures
(From OE-Core rev: ae9936ab37d34196891570b2f91a299808c95d25)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-27 15:26:31 +01:00
Ross Burton
f8bf2c5517 base: improve LICENSE_FLAGS_DETAILS output
Don't prefix the output of LICENSE_FLAGS_DETAILS with "For further
details, see" so that recipes can put arbitrary text in their license
details instead of being limited to a specific sentence structure.

(From OE-Core rev: d606ad5c237d0e28f09f0aa783e83846cbca8d21)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Richard Purdie
6b26715fd7 insane: Improve patch-status layer filtering
Now that we have layer overrides, we can easily enable patch-status in
ERROR_QA without the hardcoded code making it easier for other layers
to opt into the checks.

(From OE-Core rev: 61a881fdbe8b5a21c6276b8a5d06cc30486b1eb3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-20 23:24:26 +01:00
Ross Burton
fa6135ab32 base: add ability to provide further details when using LICENSE_FLAGS
Recipes with proprietary licenses often need to use LICENSE_FLAGS so
that the user can opt-in with consent. However, if you don't consent
then the error simply tells you the license identifier but not further
context.

Add a new variable LICENSE_FLAGS_DETAILS, which will be looked in for a
flag with the name of the licence.  If found then the contents are
printed as a source of further details.

For example, a recipe with an EULA may set:

  LICENSE_FLAGS = "FooBar-EULA"
  LICENSE_FLAGS_DETAILS[FooBar-EULA] = "https://example.com/eula"

If Foobar-EULA isn't in LICENSE_FLAGS_ACCEPTED then the error message is
more useful:

  Has a restricted license 'FooBar-EULA' which is not listed in your
  LICENSE_FLAGS_ACCEPTED. For further details, see
  https://example.com/eula.

(From OE-Core rev: cb5cdcaf3310e889e80861ccfaf46c1bce624ac1)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-31 16:53:04 +01:00
Chen Qi
cdd38494f0 staging.bbclass: do not add extend_recipe_sysroot to prefuncs of prepare_recipe_sysroot
When running prepare_recipe_sysroot task, the extend_recipe_sysroot
is run twice.

What prepare_recipe_sysroot does is executing extend_recipe_sysroot,
there's no need to add extend_recipe_sysroot to its prefuncs.

(From OE-Core rev: bf7584a2ac16ee46ff5b41536b06bb46d0cbada7)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-25 10:29:09 +01:00
Alexander Kanavin
35e3f3b8d4 insane.bbclass: simplify exceptions for 32 bit time API check
Existing implementation required to list both specific problematic apis, and files that
use them: neither is necessary as both are seen in package_qa error messages, and
can cause excessive amount of exception lines, if there are too many files, or
they are installed in arch-specific locations. Also, the value of INSANE_SKIP
should be the test that needs to be skipped, and in this case it wasn't.

Also, all problematic recipes are now correctly listed.

(From OE-Core rev: e6ebd0c556dfc576a59f5755d97089a2a241f698)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05 11:07:26 +01:00
Peter Kjellerstedt
9ed46595f8 license.bbclass: Include LICENSE in the output when it fails to parse
(From OE-Core rev: 1a5197760da3890cc80ac7da8d589766612d9051)

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>
2023-05-05 11:07:26 +01:00
Richard Purdie
9a20fbe23f binutils: Drop crosssdk suffix from virtual provides to improve dependency handling
There is little point in having "crosssdk" suffex added to the virtual provider within
binutils since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it
allowing some of the special case overriding to be removed.

(From OE-Core rev: 6856fc5c848cc2564bebe03a007ef109f46d0adb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-02 10:24:50 +01:00
Mark Hatle
38e3769a72 sanity.bbclass: Update minimum gcc version to 8.0
With a gcc older then 8.0, mesa-native will fail to build with the error:
  sorry, unimplemented: non-trivial designated initializers not supported

According to https://docs.mesa3d.org/install.html?highlight=gcc+version#compile
the required minimum compiler version is now GCC 8.0.

(From OE-Core rev: aa466053bf8a4b7998a462f0b49372d3a68a28e3)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-04 21:55:21 +01:00
Fawzi KHABER
b8486ffe80 package.bbclass: check packages name conflict in do_package
It is possible to rename packages with the macro PKG:${PN} and result in
a package name conflict if the target name exists already.

Add a fatal check to prevent this issue to go unnoticed.

Fix [Yocto #12060]

Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr>
(From OE-Core rev: f6cb63d3a871c4eef52d981131a56bf41aa1dcdf)

Signed-off-by: Fawzi KHABER <fawzi.khaber@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 12:32:30 +01:00
Richard Purdie
c8dd8c99ef abi_version/sstate: Handle pkgconfig output changes and bump output versions
A recent package.py change has highlighted some corruption issues with -dev
pkgconfig package dependencies. Bump the output versions to trigger a rebuild
and ensure everything is consistent.

Take the opportunity to also drop all HASHEQUIV_HASH_VERSION entries since the
main version is changing.

(From OE-Core rev: f45ddfbf007de858327eef0ffefd5840ef4c69b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-26 18:50:17 +01:00
Richard Purdie
a5352932d9 staging/multilib: Fix manifest corruption
The previous fix wasn't enough to address all the possible ways the
manifests might be ordered. Rework the previous fix so it is tied
to the multilib cross-canadian code which is causing the problem.

RECIPE_SYSROOT_MANIFEST_SUBDIR is not documented as I'd hope nobody
ever needs to use this outside the core multilib code.

(From OE-Core rev: beab42e00713880cd95a04729c892f8662fbcbed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-09 21:06:37 +00:00
Ulrich Ölmann
a81854fe3e base: fix typos
(From OE-Core rev: 0f8baa36fa99c66dbf305da355b665cb053c3ef4)

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-07 12:57:04 +00:00
Richard Purdie
4ca99662e6 staging: Separate out different multiconfig manifests
"""
require conf/multilib.conf
MACHINE = "qemuarm64"
MULTILIBS = "multilib:lib32"
DEFAULTTUNE:virtclass-multilib-lib32 = "armv7athf-neon"

bitbake gcc-cross-canadian-arm
"""

and then inspecting the lib32* manifest files under recipe-sysroot-native shows
them referencing lib32-recipe-sysroot instead of recipe-sysroot as used by
gcc-cross-canadian recipes.

To fix this separate out the manifest by multilib. It is caching mechanism to
optimise disk usage so this doesn't break anything, just separated out some files.

(From OE-Core rev: 891d3faa3ed3d1cc231da58e5fa1325f05d5ade5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-07 10:45:25 +00:00
Richard Purdie
1ae0e69aed sstate: Add check_for_interrupts() call functionality added in bitbake
Add in the new 'check' calls which mean that the code can exit from longer
running code loops if requested by the user. This covers sstate checks and
sstate manifest cleanup code which currently couldn't be interrupted by the
user from the UI.

Increase the minimum bitbake version which brings in this API.

(From OE-Core rev: cb6c50689175668b66ffbe09ff8f250ba9a9034b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-23 12:12:18 +00:00
Martin Jansa
149ea9db96 insane.bbclass: move Upstream-Status logic to oe.qa
* to be used by standalone script scripts/contrib/patchreview.py
  as well

(From OE-Core rev: c326efeec8f576200728a44c694becdeab4fe2db)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-19 07:47:53 +00:00
Martin Jansa
c980c93c5d insane.bbclass: use 4 spaces for indentation
* this block was using just 3

(From OE-Core rev: 4578f2237cb694473eb54ff85af342ee94c9f19d)

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>
2023-02-19 07:47:53 +00:00
Alexander Kanavin
d369a45ae7 meta/conf: move default configuration templates into meta/conf/templates/default
This sets the ground for standardizing (and enforcing) the location of
configuration templates: let's start with the default one.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-16 17:11:11 +00:00
Peter Kjellerstedt
8a1e91934e devshell: Do not add scripts/git-intercept to PATH
The use of scripts/git-intercept was introduced in commit 3266c327df
(install/devshell: Introduce git intercept script due to fakeroot
issues) and later reverted in commit af27c81eaf (scripts: Make git
intercept global).

(From OE-Core rev: f6c260c8e2a33e282a35afc99de4ef8cc1791b08)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-10 09:25:44 +00:00
Tobias Hagelborn
4b85b09213 sstate.bbclass: Fetch non-existing local .sig files if needed
For the case of a global shared state cache and a local sstate cache
with a mix of signed and un-signed entries, there is a case where
a .sig is missing locally, but may exist in the global sstate cache.

For this case, do not just fail sstate fetch, but rather backfill
the .sig file from the global sstate cache.

If this case is detected, re-run the fetch operation to get the
global .sig file (if it exists).

(From OE-Core rev: d5ea1a5396bf9fd4303cae46bc0e042be8de8d67)

Signed-off-by: Tobias Hagelborn <tobias.hagelborn@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-02 10:27:30 +00:00
Yoann Congal
ff47bf6ed9 sanity: Fix small typos
* reproducibile -> reproducible
* distrubution -> distribution
* Joined lines gone awry
* and and -> and

(From OE-Core rev: 60196e7512e97c2509256403dad5c8a23dce32fc)

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>
2023-01-26 21:06:57 +00:00
Michael Opdenacker
4022115a71 meta/classes-global: remove package_tar.bbclass
Remove package_tar.bbclass, which is no longer in use in oe-core
and meta-oe, and which the document reports as broken and unsupported.

(From OE-Core rev: 90ce19122802a16e6067f3a2ce3447acf1070fe5)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-25 14:32:03 +00:00
Richard Purdie
3c3fd6a65e insane: Improve patch warning/error handling
Currently, whilst patch errors or warnings are shown, the errors don't stop builds.
The configuration isn't very configurable from WARN_QA and ERROR_QA either.

This patch:
 * Uses the standard mechanisms to handle the patch fuzz warnings/errors
 * Makes Upstream-Status checking configurable from WARN/ERROR_QA
 * Allows that checking to be used with non-core layers
 * Makes patch-fuzz an error by default

(From OE-Core rev: 76a685bfcf927593eac67157762a53259089ea8a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-21 07:46:38 +00:00
Richard Purdie
8e7e050bce uninative: Ensure uninative is enabled in all cases for BuildStarted event
Recent changes in bitbake mean the datastore is not always reset between
ConfigParsed and BuildStarted. This means in a fresh buiild, with memory
resident bitbake active, uninative may end up disabled.

Update the code so the enable code is always run at BuildStarted if
needed.

(From OE-Core rev: db743cc78fe5172bb4a4dac9c1dad4f5aa9e1491)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-11 10:58:36 +00:00
Richard Purdie
47ddb0f26d package: Drop support for PACKAGEBUILDPKGD function customisation
We don't really need the customisation capability of PACKAGEBUILDPKGD
since we also have PACKAGE_PREPROCESS_FUNCS which is generally used
by recipes. Drop PACKAGEBUILDPKGD to have some simpler/clearer code.
This allows some function wrappers to be removed too.

(From OE-Core rev: 6a4f24724cea3ddf55cacccb80fa54aa898dfa86)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
99de12f152 package: Move mapping_rename_hook to packagedata function library
This function is used by the packaging tasks/classes and makes much
more sense in the packagedata function library.

(From OE-Core rev: 7a512a8803101310772d83836e6b78ebaf8121de)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
ab8c9d503e package: Drop unused function and obsolete comment
The function appears unused and the comment obsolete, drop them.

(From OE-Core rev: f3745718f8ec3bbed9816bf3d891e9885f8518b5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
e4f17fd72d package: Move package functions to function library
Move the bulk of the remaining package "processing" functions over
to the package function library for parsing efficiency.

(From OE-Core rev: f8785117074908330faca0b99afa7f60ed6ad952)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
b3573d38ef package: Move emit_pkgdata to packagedata.py
Move one of the PACKAGEFUNCS from the package bbclass to packagedata
library code for parsing efficiency.

(From OE-Core rev: ceba33bf2897f7dd5b1ffe6b742c47bf616243c8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
a099ed2125 package: Move pkgdata handling functions to oe.packagedata
To avoid reparsing the bbclass code all the time, move the functions
to the packagedata python function library code which is more efficient.

(From OE-Core rev: f520a3039540b1183b1b2bdaaf8b9195995c0187)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
93be2cdf49 package: Move get_conffiles/files_from_filevars functions to lib
To avoid reparsing the bbclass code all the time, move the functions
to the python function library code which is more efficient.

(From OE-Core rev: 424e65627c018b3119050f515b0c7cfb43be5573)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
ed07d52b47 package: Move fixup_perms function to bb function library
To avoid reparsing the bbclass code all the time, move the function
to the python function library code which is more efficient.

(From OE-Core rev: 7c8c4cfd9355a9cee1144e0444e1b54402f1951c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Changqing Li
06763de40a base.bbclass: Fix way to check ccache path
The previous code had 2 issues:
1. make hosttools/ccache always link to host's ccache (/usr/bin/ccache)
even we have one buildtools
2. make hosttools/gcc etc, link to host's gcc event we have one
buildtools when keyword ccache in buildtools's path, eg:
/mnt/ccache/bin/buildtools

This patch is for fix above issues.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-23 12:05:52 +00:00
Marek Vasut
728b86575f package_rpm: Fix Linux 6.1.0 perf 1.0 version mistranslation
With Linux 6.1.0 and perf 1.0-r9, a build which includes perf-dev fails due
to perf-dev depending on perf 6.6.1.0-r9 . This is because translate_vers()
operates on perf-dev and mangles its version. The following scenario occurs:

  ver=6.1.0-r9
  pv=1.0
  pkgv=6.1.0
  reppv=6.1.0

With Linux 6.1.0, a corner case is hit where pv is a substring of ver, which
yields this corrupted version 6.6.1.0-r9 . Example in python3:

  >>> "6.1.0-r9".replace("1.0", "6.1.0")
  '6.6.1.0-r9'
  >>> "6.0.13-r9".replace("1.0", "6.0.13")
  '6.0.13-r9'

The fix is to only replace pv with reppv in case pv is at the beginning
of ver , instead of replacing all occurences.

(From OE-Core rev: bf2096a43d56c2d633a4b6e3db9e4390da4be6e2)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-17 23:49:56 +00:00