Commit Graph

19 Commits

Author SHA1 Message Date
Richard Purdie
6a2ad60ecc bitbake.conf/pseudo: Switch from exclusion list to inclusion list
Currently, pseudo tracks all files referenced within its presence unless
they're listed in an exclusion list. The exclusion list has grown to be
fairly unwieldy.

This patch swaps PSEUDO_IGNORE_PATHS for PSEUDO_INCLUDE_PATHS which in
theory should be easier and more explicit to maintain.

This change does drop many directories from pseudo coverage including
/home and /tmp. There may be adapatations needed for recipes/classes
using pseudo in specific ways.

(From OE-Core rev: 2502da81709f25de499277b28d33c915638c45f6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-12 22:01:56 +01:00
Chen Qi
ced2a38e19 image/populate_sdk.bbclass: drop qemuwrapper-cross from DEPENDS
For packages that need qemuwrapper-cross, they should have it
in PAKAGE_WRITE_DEPS.

Now that we've used 'qemuwrapper-cross' to replace 'qemu-native'
for recipes that need qemu-native for their postinsts, and we've
now mapped PACKAGE_WRITE_DEPS for nativesdk recipes, these
qemuwrapper-cross dependencies can be dropped from image.bbclass
and populate_sdk.bbclass.

(From OE-Core rev: fbac8d025585fe704f79ccdf00f376f677e3a89d)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-24 11:27:06 +01:00
Peter Marko
39cbbd1a87 classes: switch p7zip to 7zip
meta-oe has switched from p7zip to 7zip.
p7zip recipe does not exist anymore and p7zip is provided and rprovided
by 7zip recipe.
Use real provider instead of replaced one.

(From OE-Core rev: 5aa516bfa295d5be919459dfe45f452cdec45e81)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-10 13:03:57 +00:00
Philip Lorenz
a464534c72 image/populate_sdk: Support usrmerge in toolchain SDK builds
SDKs which aren't built from an image recipe should also come with
drop-in symlinks for `/bin`, `/lib` and `/sbin`. Support this by moving
the common functionality into `populate_sdk_base` and enabling the
symlink creation when the `usrmerge` DISTRO_FEATURE is on.

(From OE-Core rev: 8e1e86cc9d5d4e866ff0ab62c8954db0e65c19e6)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-03 11:05:03 +00:00
Ming Liu
d296b21d56 meta: support tar.zst SDK_ARCHIVE_TYPE
zst is much faster than the default xz, test result on my Precision
5680 machine:

Installing a tar.xz SDK takes 37 seconds while tar.zst only takes 17
seconds.

Let's introduce support for tar.zst.

Also add a sanity check for supported archive types.

(From OE-Core rev: 1d22562a89e91f19b818b8f9bc214be941303980)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 11:58:22 +00:00
Martin Jansa
93f194acc1 populate_sdk_base: inherit nopackages
Since this bbclass sets PACKAGES = "", inherit the nopackages
class to skip the various packaging functions which wouldn't
do anything anyway.

This fixes errors from buildhistory changes where packages-split would be empty.

e.g. meta-toolchain build now fails with:
| DEBUG: Executing shell function buildhistory_list_pkg_files
| find: ".../meta-toolchain/1.0/packages-split/*": No such file or directory
| WARNING: exit code 1 from a shell command.
| DEBUG: Python function buildhistory_emit_pkghistory finished

(From OE-Core rev: 29ac598c4f754ce5cee59d3360612f661ad02191)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-20 11:55:36 +01:00
Richard Purdie
0655e196d5 populate_sdk_base: Ensure nativesdk targets have do_package_qa run
We've realised that "bitbake XXXx -c populate_sdk" doesn't actually trigger
the package_qa tests to run. This means test coverage on the autobuilder was
poor. Fix this and run the tests for SDKs.

(From OE-Core rev: f35d9b7cc3998c88743397c5dc7e60dac8e4bbea)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-04 10:10:08 +01:00
Richard Purdie
7c1de3118f create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix tarball SPDX manifests
Currently, "tarball" sdk based recipes don't generate SPDX manifests as they
don't include the rootfs generation classes. Split the SPDX 3.0 image class into
two so the SDK components can be included where needed.

To do this, introduce an SDK_CLASSES variable similar to IMAGE_CLASSES which
the SDK code can use.

Migrate testsdk usage to this.

Also move the image/sdk spdx classes to classes-recipe rather than the general classes
directory since they'd never be included on a global level.

For buildtools-tarball, it has its own testsdk functions so disable the class there as
a deferred inherit would overwrite it.

(From OE-Core rev: 662396533177b72cc1d83e95841b27f7e42dcb20)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-26 12:28:42 +01:00
Mark Hatle
edc44fcf13 create-spdx-*: Support multilibs via SPDX_MULTILIB_SSTATE_ARCHS
When a create-spdx-* classes is processing documents, it needs to
find the document in a path that is related to the SSTATE_ARCH
when a packge is generated.  The SSTATE_ARCH can be affected by
multilib configurations, resulting is something like armv8a-mlib.

When the image (or SDK) is being generated and the components are
collected, the system has no knowledge of the multilib arch and
will fail to find it, such as:

  ERROR: meta-toolchain-1.0-r0 do_populate_sdk: No SPDX file found
   for package libilp32-libgcc-dbg,
   False sstate:libilp32-libgcc:armv8a-ilp32-mllibilp32-elf:14.1.0:r0:armv8a-ilp32:12:
   sstate:libilp32-libgcc::14.1.0:r0::12:

Adding in the new SPDX_MULTILIB_SSTATE_ARCHS will provide a full
set of SSTATE_ARCHS including ones that contain the multilib
extension which will allow create-spdx-* to correctly find the
document it is looking for.  This would also be valuable to any
other function doing a similar search through SSTATE_ARCH that may
have been extended with multilib configurations.

(From OE-Core rev: f1499c36c1054fc90f7b7268cc95285f2eca72f7)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-26 12:28:42 +01:00
Benjamin Szőke
aca14abc35 populate_sdk_base: add 7zip archive type for SDK
Added 7zip support and options and extension/type parameter
for it to able to make any custom archive type for SDK archive.

(From OE-Core rev: 02bbc736cf4f097a78afed4c7614000bd058ef3f)

Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-18 08:44:41 +01:00
Richard Purdie
c917323a39 classes/recipes: Switch to use inherit_defer
Now that bitbake supports the use of inherit_defer, switch all conditional
(variable based) inherits to use this instead. This leads to more a more
deterministic user experience since there is no longer an immediate expansion
and later changes to the variables in question (e.g. a bbappend) are
accounted for.

This patch tries to ensure the behaviour before/after remains as unchanged
as it reasonably can, e.g. by always inherting populate_sdk_base. native
and nativesdk continue to need to be inherited last, hence being used
with inherit_defer in a handful of very specific cases.

(From OE-Core rev: 451363438d38bd4552d5bcec4a92332f5819a5d4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-18 10:15:58 +00:00
Robert Berger
23549b87c5 uninative-tarball.xz - reproducibility fix
added --clamp-mtime --mtime to the tar command

see:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15148

(From OE-Core rev: 2ef7c63871ab4fb62a9cea45a23a78bf9d541e4a)

Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-24 10:39:06 +00:00
Richard Purdie
6fd8af0d30 classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variables
Originally these were shell functions but they have long since been processed by
bb.build.exec_func(). Since we no longer need shell syntax, we can drop the ';'
delimiters and just use a space separated string.

This cleans up the variable and quietly removes any stray ';' that do happen to
still make it in.

(From OE-Core rev: c3365dfd9ddd7fbe70b62e0f11166e57a8ca6f73)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-09 22:14:41 +01:00
Martin Jansa
35e5d29a7d populate_sdk_base.bbclass: respect MLPREFIX for ptest-pkgs's ptest-runner
* since "populate_sdk_base: ensure ptest-pkgs pulls in ptest-runner" change:
  https://git.openembedded.org/openembedded-core/commit/?id=ecff0642be5781f7f6cca617158b04ac9a0e85f0
  in multilib build when building lib32-foo-image it can pick wrong
  ptest-runner package if it was built in the same TMPDIR before the
  image, do_rootfs then fails to find it, if the package manager config
  doesn't have 64-bit feed enabled:

  opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ptest-runner'

(From OE-Core rev: 4d24749e7e94881bb952f5c927f0012eb70d4390)

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-05-11 17:08:29 +01:00
Joshua Watt
2a04347b7a classes/populate_sdk_base: Append cleandirs
Append to cleandirs in do_populate_sdk so that other classes
(specifically, create-spdx-2.2) can add additional directories

(From OE-Core rev: 5e6f74b1910a6ddd359b037b975ba29406e1651b)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-15 10:21:34 +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
Christoph Lauer
4f82bee54a populate_sdk_base: add zip options
Add SDK_ZIP_OPTIONS to remove symbolic link creation in zip archive or add options, e.g. for encryption of the zip archive.

(From OE-Core rev: 04b62f9459b401c276255f166d0738b6f902a576)

Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-07 14:32:42 +00:00
Ross Burton
c1304a0231 populate_sdk_base: ensure ptest-pkgs pulls in ptest-runner
Since "package_manager: Change complementary package handling to not
include soft dependencies"[1], complementary packages don't pull in
recommendations, just depends.  However, ptest.bbclass has a recommends
on ptest-runner, so if ptest packages are in an image via the ptest-pkgs
IMAGE_FEATURE, ptest-runner doesn't get installed.

[ YOCTO #14928 ]

[1] oe-core b44b0b9294675f89aa51ff84f532664f4c479677

(From OE-Core rev: ecff0642be5781f7f6cca617158b04ac9a0e85f0)

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
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