Commit Graph

7713 Commits

Author SHA1 Message Date
Michael Opdenacker
65e3e1917e create-spdx.bbclass: remove unused SPDX_INCLUDE_PACKAGED
[YOCTO #14948]

(From OE-Core rev: 89f1abd5e00807cf179ddf658f74d48119523b0c)

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>
2022-10-29 16:28:36 +01:00
Peter Kjellerstedt
b3ffb247c7 externalsrc.bbclass: Remove a trailing slash from ${B}
The trailing slash in ${B} caused -fdebug-prefix-map=${B}=... to not
match as intended, resulting in ${TMPDIR} ending up in files in
${PN}-dbg when externalsrc was in use, which in turn triggered buildpath
QA warnings.

(From OE-Core rev: 9b5031ed5a0d102905fa75acc418246c23df6eef)

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>
2022-10-26 12:28:39 +01:00
Martin Jansa
9ba58ee035 externalsrc.bbclass: fix git repo detection
* fix issue introduced in:
  https://git.openembedded.org/openembedded-core/commit/?id=95fbac8dcad6c93f4c9737e9fe13e92ab6befa09

* it added check for s_dir + git-dir (typically '.git') isn't
  the same as ${TOPDIR} + git-dir, but due to copy-paste issue
  it was just comparing it with s_dir + git-dir again, resulting
  in most external repos (where git-dir is '.git') to be processed
  as regular directory (not taking advantage of git write-tree).

* normally this wouldn't be an issue, but for big repo with a lot of
  files this added a lot of checksums in:
  d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}')

  and I mean *a lot, e.g. in chromium build it was 380227 paths
  which still wouldn't that bad, but the checksum processing in
  siggen.py isn't trivial and just looping through all these
  checksums takes very long time (over 1000sec on fast NVME drive
  with warm cache) and then
  https://git.openembedded.org/bitbake/commit/?id=b4975d2ecf615ac4c240808fbc5a3f879a93846b
  made the processing a bit more complicated and the loop in
  get_taskhash() function took 6448sec and to make things worse
  there was no output from bitbake during that time, so even with -DDD
  it looks like this:

  DEBUG: virtual/libgles2 resolved to: mesa (langdale/oe-core/meta/recipes-graphics/mesa/mesa_22.2.0.bb)
  Bitbake still alive (no events for 600s). Active tasks:
  Bitbake still alive (no events for 1200s). Active tasks:
  Bitbake still alive (no events for 1800s). Active tasks:
  Bitbake still alive (no events for 2400s). Active tasks:
  Bitbake still alive (no events for 3000s). Active tasks:
  Bitbake still alive (no events for 3600s). Active tasks:
  Bitbake still alive (no events for 4200s). Active tasks:
  Bitbake still alive (no events for 4800s). Active tasks:
  Bitbake still alive (no events for 5400s). Active tasks:
  Bitbake still alive (no events for 6000s). Active tasks:
  DEBUG: Starting bitbake-worker

  without -DDD it will get stuck for almost 2 hours in:
  "Initialising tasks..."
  before it finally writes sstate summary like:
  "Sstate summary: Wanted 3102 Local 0 Mirrors 0 Missed 3102 Current 1483 (0% match, 32% complete)"

* fix the copy&paste typo to use git work-tree in most cases, but
  be aware that this issue still exists for huge local source
  trees not in git

[YOCTO #14942]

(From OE-Core rev: 9102e5a94b8146cb1da27afbe41d3db999a914ff)

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>
2022-10-26 12:28:39 +01:00
Keiya Nobuta
e33892b7ad create-spdx: Remove ";name=..." for downloadLocation
(From OE-Core rev: bbecab53d1b27f3bb8c5882cb0ec39b04ef300a3)

Signed-off-by: Keiya Nobuta <nobuta.keiya@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-26 12:28:39 +01:00
Adrian Freihofer
988a27974f own-mirrors: add crate
Support downloading crate files from a mirror at SOURCE_MIRROR_URL.

(From OE-Core rev: aebf4f183267a1e2f073078ade0ddc916ceed53f)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-25 13:42:03 +01:00
Ross Burton
378f67bd82 externalsrc: move back to classes
The externalsrc class was moved to classes-recipe as part of oe-core
f5c1280, but it can be used in both recipe and global contexts so move
it back to classes/.

(From OE-Core rev: 7a2edcd4b7cb5a2d829289a11eff62663268fbf3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-25 13:42:02 +01:00
Ulrich Ölmann
c1c356a9fc icecc.bbclass: fix filename of recipe in comment
The character '%' is not a valid part of a recipe filename and has been used
here only to suggest a wildcard regarding the recipe's version, see reply [1] in
a companioned thread. Correct that by using the current recipe version instead.

[1] https://lists.yoctoproject.org/g/docs/message/3165

(From OE-Core rev: cf8835b53cb5ce3ff13f97fcf2d22b97a9f1ede4)

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-17 07:47:07 +01:00
Vyacheslav Yurkov
e38ef4dcf1 classes: Update overlayfs classes to use new bitbake functionality
OverlayFS classes belong to a recipe scope

(From OE-Core rev: 7afa7739e82220729566ccabe2675a8991f9485a)

Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-09 12:24:43 +01:00
Ulrich Ölmann
3d3f0cd09d icecc.bbclass: delete 'rm' command
The removed command was explicitly marked as transitional in commit [1] roughly
three years ago, so finally clean up.

[1] 40d74cb1d0dd ("icecc: Export ICECC_CC and friends via wrapper-script")

(From OE-Core rev: 4459e970c7c1c43f4061b1cb6229d7a3643e1bbc)

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-07 21:28:41 +01:00
Ulrich Ölmann
35b3d0037f icecc.bbclass: fix typos
(From OE-Core rev: 7fd33565df5dfaa962bcafd842162a2f504c59e7)

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-07 21:28:41 +01:00
Ross Burton
3cca59a9bc cve-check: close cursors as soon as possible
We can have multiple processes reading the database at the same time, and
cursors only release their locks when they're garbage collected.

This might be the cause of random sqlite errors on the autobuilder, so
explicitly close the cursors when we're done with them.

(From OE-Core rev: 5d2e90e4a58217a943ec21140bc2ecdd4357a98a)

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>
2022-09-02 15:58:25 +01:00
Joshua Watt
a19e278f2e classes: cve-check: Get shared database lock
The CVE check database needs to have a shared lock acquired on it before
it is accessed. This to prevent cve-update-db-native from deleting the
database file out from underneath it.

[YOCTO #14899]

(From OE-Core rev: 20a9911b73df62a0d0d1884e57085f13ac5016dd)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-31 10:40:07 +01:00
Richard Purdie
5127df17c0 distrooverrides: Move back to classes whilst it's usage is clarified
(From OE-Core rev: eb56f89a9b2163bdb8c91dbdc33696fea052d032)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-18 10:38:48 +01:00
Peter Marko
a9e80e935c create-spdx: handle links to inaccessible locations
When a link is pointing to location inaccessible to build user (e.g. "/root/something"),
filepath.is_file() throws "PermissionError: [Errno 13] Permission denied".
Fix this by first checking if it is a link.

(From OE-Core rev: e105befbe4ee0d85e94c2048a744f0373e2dbcdf)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-14 08:13:32 +01:00
Jose Quaresma
39197039e9 archiver.bbclass: some recipes that uses the kernelsrc bbclass uses the shared source
This fix a race that happens when building some of the followning recipes
with kernel at same time.

The kernelsrc uses the kernel shared source dir as their source
S = "${STAGING_KERNEL_DIR}" and this will cause a race in the
do_unpack_and_patch task, when bitbake runs the
bb.build.exec_func('do_unpack', d) because do_unpack will
clean the source dir on startup.

| ok: note that S != "${STAGING_KERNEL_DIR} for this ones
openembedded-core/meta/recipes-kernel/perf/perf.bb:inherit kernelsrc
meta-openembedded/meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:inherit kernelsrc autotools-brokensep

| broken
meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb:inherit kernelsrc kernel-arch bash-completion
meta-openembedded/meta-oe/recipes-kernel/spidev-test/spidev-test.bb:inherit bash-completion kernelsrc kernel-arch
meta-openembedded/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb:inherit kernelsrc
meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb:inherit bash-completion kernelsrc kernel-arch

The issue can be replicated with:

INHERIT += "archiver"
ARCHIVER_MODE[src] = "original"
ARCHIVER_MODE[diff] = "1"

And:

R=<recipe> bitbake -c cleansstate virtual/kernel $R && bitbake $R

(From OE-Core rev: 5487dee2e1237fb57c5e59b2bbbfbcdfc8c97ab6)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:46:49 +01:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.

(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00
Richard Purdie
10317912ee insane: Update to allow for class layout changes
Make the code more generic to allow for the potential incomming class
layout changes.

(From OE-Core rev: 7c6c717a54423480c0ac9ed13861e3c1cc47e2b2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00
Richard Purdie
ff525695f2 classes: Add SPDX license identifiers
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.

(From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:58:01 +01:00
Richard Purdie
971d5f7b81 classes: Add copyright statements to files without one
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present.

(From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:58:01 +01:00
Richard Purdie
f14e3f3a31 testexport: Use IMAGE_CLASSES for testimage
(From OE-Core rev: 506346e1c98619eb04a196d80f032d71677dd2a2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:46:26 +01:00
Richard Purdie
e8de01e798 testexport: Fix to work as an image class
The class is mainly an image based class but one recipe does need to look
at values shared with the class and isn't an image. Move this to a conf
file instead, avoiding the need to pollute all recipes globally.

(From OE-Core rev: ed4238487c81b3580e83c257b50745a832a6e717)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:46:26 +01:00
Richard Purdie
83e7f668ae rust: Remove unneeded RUST_TARGETGENS settings
These match the default from the class so drop them. We then always
generate all targets so remove the configuration from the class.

(From OE-Core rev: e4d56256936c55bab2bf2934ccbde9157ef7dc57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:46:26 +01:00
Richard Purdie
883aea9b6e buildhistory: Only use image-artifact-names as an image class
The class only makes sense in the conext of images, not globally so
include as such.

(From OE-Core rev: 4fdda4d6bd434c240ec1dfdbfc6eb7e25e2db1f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:46:26 +01:00
Richard Purdie
3c1ed4a7da rust-common: Remove conflict with utils create_wrapper
utils already has a create_wrapper function which I tried to use from cargo
and got unexpected results. Rename the rust function to avoid this conflict
of named.

(From OE-Core rev: ef347bd395955ce68893fee7995a4f3abbe6ff93)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-09 16:37:24 +01:00
Richard Purdie
38934deeea rust: Drop cross/crosssdk
Now that target config json is provided by rust-target-config.bbclass,
the need for the cross and crosssdk recipes is removed. Drop them and
simplify dependencies accordingly.

(From OE-Core rev: 4b54f5f52b33db4d2fe95c5faef033b6c6b37b7d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
1b7b5c3759 rust-common: Set rustlibdir to match target expectation
(From OE-Core rev: 06af65757b7694df983b3f99cec75e4e9bec0725)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
cdd65a42a8 rust-common: Simplify libc handling
The current libc handling code is simply wrong in many cases. Simplify it
to a check of the triplet for musl handling which is much simpler and less
error prone when handling things like nativesdk targets.

(From OE-Core rev: f35d5af06db10fa20e55f4c738e665b35f5c394b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
0b374dc724 rust-target-config: Make target workaround generic
Ensure the 'target' data is set for both HOST and TARGET queries
as appropriate to work correctly in cross configurations.

(From OE-Core rev: ec15882fbf396de8d3a5921a3028850ba3fccc48)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
d172b76c26 rust-common: Update to match cross targets
Tweak the armv7 workaround to work for cross environments and as a host
triplet and not just as a target.

(From OE-Core rev: dc134c031171a55a35964ba801219552a516a0ca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
1ab2fd2d03 cargo_common: Handle build SYS as well as HOST/TARGET
Improve the common class to handle BUILD_SYS as well as host and target,
removing the need to a workaround in the rust recipe.

(From OE-Core rev: 0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
1c8444bd38 rust-common/rust: Improve bootstrap BUILD_SYS handling
Move the "unknown" vendor workaround used during bootstrap to a
central location so it is applied consistently to all RUST_BUILD_SYS
values rather than some subset.

(From OE-Core rev: d02c28b2219d736c9598a13fead7a03eaa3256a6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
b1d8d2a3bf rust: Generate per recipe target configuration files
Instead of generating target configuration files centrally and often getting
it wrong, or having trouble finding the right set, generate them dynamically
from the bbclass into WORKDIR per recipe.

(From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
9a093d0348 rust-target-config: Show clear error when target isn't defined
(From OE-Core rev: b30ee171de9cd736d16d783410cf748e35309257)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
5c45b73c8f rust: Switch to use RUST_XXX_SYS consistently
The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use
RUST_XXX_SYS consistently and add the variables to the global exclsion
on signatures as they're reflected in the directory triplets and trying
to filter them out the hashes separately is too painful.

(From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
b2ffb96705 rust-common: Rework wrappers to handle musl
For musl we need to be able to add a library to the end of the linker commandline.
Rework the wrapper code to be able to do this through a new variable.

(From OE-Core rev: dfff5a176765c0e8b212bf31081f80e79025fd1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
ae3950ec5a rust-common: Drop export directive from wrappers
These variables don't need to be exported into the environment, which reduces
the scope of rebuilds when variable values change.

(From OE-Core rev: 1a992268e556a79daa6802367f48796000a1f436)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
d183c36c81 rust-common: Add CXXFLAGS
Similarly to CC and CCLD, handle CXX flags too.

(From OE-Core rev: e2fc083529d526cb565a2de1917022d10c7d08b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
52ef977c95 rust-target-config: Add mips n32 target information
Add MIPS n32 target information. This appears to be correct but
building libstd-rs for the target doesn't work.

(From OE-Core rev: 255be90dc8e3625060c9b8ccc2ec3a71f24470d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
f2bd326370 populate_sdk_base: Disable rust SDK for MIPS n32
The n32 MIPS rust SDK doesn't quite build (libstd-rs fails with an llvm
register issue). Disable it for now, someone with interest in having it working
can fix if/as/when.

(From OE-Core rev: aad10f24eea5a6b54de17138ab5c0f4ed1355a8f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
7f902fb29f nativesdk: Clear TUNE_FEATURES
Similarly to what native.bbclass does, clear TUNE_FEATURES since these
aren't appropriate to the nativesdk build. This saves us having to change
down signature issues due to data in this variable.

(From OE-Core rev: 2e5079e434504a3a22b609f7ddbb7f4c533c4cdb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Chen Qi
fc59c28724 image_types_wic.bbclass: fix cross binutils dependency
Enable multilib and wic at the same time and we'll meet the
following error.

  ERROR: Nothing PROVIDES 'virtual/i686-wrsmllib32-linux-binutils'

Adjust the dependency to take multilib into consideration.

(From OE-Core rev: 958ee0eede859bdba659e3343856b1c226207854)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-04 21:53:50 +01:00
Jose Quaresma
096f688ec0 create-spdx: ignore packing control files from ipk and deb
Otherwise spdx can have references for data that is not packed
in the package delivered because this contol data is temporarly
and only exist while the package is been write.

During do_package_write_ipk task in do_package_ipk the control
files is cleaned up at the end. This can create a race condiction
when the do_create_spdx task runs the add_package_files function
and these files is been deleted at same time in the
task do_package_write_ipk.

ERROR: alsa-topology-conf-1.2.5.1-r0 do_create_spdx: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_create_spdx(d)
     0003:
File: '/srv/oe/build/conf/../../layers/openembedded-core/meta/classes/create-spdx.bbclass', lineno: 567, function: do_create_spdx
     0563:            package_doc.add_relationship(package_doc, "DESCRIBES", spdx_package)
     0564:
     0565:            package_archive = deploy_dir_spdx / "packages" / (package_doc.name + ".tar.zst")
     0566:            with optional_tarfile(package_archive, archive_packaged) as archive:
 *** 0567:                package_files = add_package_files(
     0568:                    d,
     0569:                    package_doc,
     0570:                    spdx_package,
     0571:                    pkgdest / package,
File: '/srv/oe/build/conf/../../layers/openembedded-core/meta/classes/create-spdx.bbclass', lineno: 234, function: add_package_files
     0230:                            info.mtime = source_date_epoch
     0231:
     0232:                        archive.addfile(info, f)
     0233:
 *** 0234:                sha1 = bb.utils.sha1_file(filepath)
     0235:                sha1s.append(sha1)
     0236:                spdx_file.checksums.append(oe.spdx.SPDXChecksum(
     0237:                        algorithm="SHA1",
     0238:                        checksumValue=sha1,
File: '/srv/oe/bitbake/lib/bb/utils.py', lineno: 559, function: sha1_file
     0555:    """
     0556:    Return the hex string representation of the SHA1 checksum of the filename
     0557:    """
     0558:    import hashlib
 *** 0559:    return _hasher(hashlib.sha1(), filename)
     0560:
     0561:def sha384_file(filename):
     0562:    """
     0563:    Return the hex string representation of the SHA384 checksum of the filename
File: '/srv/oe/bitbake/lib/bb/utils.py', lineno: 528, function: _hasher
     0524:
     0525:def _hasher(method, filename):
     0526:    import mmap
     0527:
 *** 0528:    with open(filename, "rb") as f:
     0529:        try:
     0530:            with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as mm:
     0531:                for chunk in iter(lambda: mm.read(8192), b''):
     0532:                    method.update(chunk)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/srv/oe/build/tmp-lmp/work/all-lmp-linux/alsa-topology-conf/1.2.5.1-r0/packages-split/alsa-topology-conf/CONTROL/control'

ERROR: Logfile of failure stored in: /srv/oe/build/tmp-lmp/work/all-lmp-linux/alsa-topology-conf/1.2.5.1-r0/temp/log.do_create_spdx.998864
INFO: recipe alsa-topology-conf-1.2.5.1-r0: task do_create_spdx: Failed

(From OE-Core rev: 0bfe403f46fd568910a727982c3ff528e3d5c8bc)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-04 16:27:25 +01:00
Joshua Watt
9f99474fa3 classes/sanity: Add comment about github & gitlab archives
Add a comment so that users grepping for "github" or "gitlab" will find
this code (since the regex wont).

(From OE-Core rev: 07c9c6144748d1fbbbdf9c2cb156bea5bed273d4)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-04 16:24:53 +01:00
Tom Hochstein
71d0913599 uboot-config.bbclass: Raise error for bad key
If an invalid key is used, the class ignores the error, with an
indeterminate result. In my case, the problem surfaced in do_deploy:

```
| cp: cannot stat '/.../build/tmp/work/imx6qdlsabresd-fsl-linux-gnueabi/u-boot-imx-mfgtool/2022.04-r0/deploy-u-boot-imx-mfgtool/u-boot.imx': No such file or
| directory
```

The root cause of this was that the uboot config key did not match
a valid option. With the fix, the error is caught by the class:

```
ERROR: Nothing PROVIDES 'u-boot-imx-mfgtool'
u-boot-imx-mfgtool was skipped: The selected UBOOT_CONFIG key ['mfgtool'] has no match in dict_keys(['sd-fslc', 'sd-imx', 'sd-optee-imx', 'sata-imx', 'mfgtool-imx']).
```

(From OE-Core rev: 801a27d73b10017cac3c0caa05d0a2af3502a7ba)

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-02 11:30:00 +01:00
Ross Burton
af65f0cd84 wic: depend on cross-binutils
Wic can build an unified kernel image, but this needs the cross-objcopy
from binutils.

(From OE-Core rev: 7c7a488116f49083ca42d3628ebc0870585110c3)

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>
2022-08-02 11:29:59 +01:00
Mihai Lindner
403dfe91ea create-spdx: Fix supplier field
The correct field name is "supplier" according to SPDX schema.
The "supplier" field translates to "PackageSupplier", but that's for
tag-value format.

(From OE-Core rev: ca8db0e0a2860ac1e3f537471fa71b43c3be0a58)

Signed-off-by: Mihai Lindner <mihai.lindner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-28 14:43:21 +01:00
Alexander Kanavin
29c52d7b26 toolchain-scripts.bbclass: adjust toolchain_create_tree_env_script to better replicate (e)SDK
Specifically:
1. Place the environment setup file into $B and not into $TMPDIR,
so that the recipe using the class can itself better decide what to do with the file.

2. Use global, unified sysroots (provided through build-sysroots recipe)
and not recipe-specific ones, as this allows flexible on-the-fly management of what
libraries are available to build applications, without having to modify any
recipes, similar to eSDK 'extensible' part.

This also requires adjustment of the sstate sametune_samegsigs test, as meta-ide-support
becomes dependent on $MACHINE (unified sysroots have it in their paths)
and needs to be excluded from the test.

3. Add a few missing settings that have been added to SDK environment files.

4. Add a snippet to the environment setup file that also runs the relocation scripts.
In regular SDKs this is executed by the SDK installer, in direct SDK we can do it when
setting up the environment.

(From OE-Core rev: db5dfd78ae441201778b1175f4fb9a3eba994899)

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>
2022-07-28 11:50:17 +01:00
Jose Quaresma
9c45fd0b89 archiver.bbclass: remove unsed do_deploy_archives[dirs]
Remove as commit b3afe7d redifines it.

https://git.openembedded.org/openembedded-core/commit/?id=b3afe7d9bd25a943e947de3ec064ea245173c5a8

(From OE-Core rev: cf5e155a9c76a6e4ed7145118e7367ab6f2f53f2)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-28 11:50:17 +01:00
Richard Purdie
a115aa91ae populate_sdk_base: Fix mingw override name
Correct the override name used for rust toolchain removal from the mingw sdk.

(From OE-Core rev: 8aeb0dfe6508daea51db4f0992eed194e925fdd7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-28 11:38:24 +01:00
Richard Purdie
2e25ddcaea populate_sdk: Add SDK toolchain language selection support
Add a new variable SDK_TOOLCHAIN_LANGS to allow different language support
to be selected within SDKs. Initially supported options are rust and go.

(From OE-Core rev: 0026b5687147410e4c7140ca5133089ebb51d9d4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-28 11:07:33 +01:00