Commit Graph

69923 Commits

Author SHA1 Message Date
Richard Purdie
bf4b5bd0bd zvariant: Exclude from world for now to avoid reproducibility issues
Ultimately we'll remove this and use for better rust reproducibility
testing too.

(From OE-Core rev: 6c6536a41bfb8651fe94d90898207c5b53673e44)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Frederic Martinsons
476890160a cargo-update-recipe-crates: force name overrides
A project can have multiple Cargo.lock (provides
multiple binaries for example) and each one can
depends on differenct version of the same crates.
Even within the same Cargo.lock file, it is possible
to have different version of same crates.

To avoid conflicts, override the name with the version
for all crates checksum

Moreover, when searching for Cargo.lock, we should ignore
specific dir like .git (no use to walk down there) and .pc
(because it can have a Cargo.lock if this file was patched)

(From OE-Core rev: 1795e98a04ad09b011afcc7cc3bf6dc49475b19a)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Frederic Martinsons
ad460bb6aa meta-selftest: provide a recipe for zvariant
This recipe is for showing a "real world" example of
a crate that depends on some git repositories.

Usually, this kind of crate is built within a global
workspace (here it is the zbus project) and so
doesn't need a Cargo.lock on its own.

For the sake of the demonstration, I had to tweak things
a little to be able to compile zvariant in standalone
(no relative path in dependency, no symlink to LICENSE
provide a Cargo.lock)

The use case where the crate had some git repository
in dependency is very common for "private" crate that
are not aimed to be published on crates.io.
When the project grow bigger, it is common to have
a bin and multiple lib developped in parallel, and these
libs are surely on a git repostitory.

A test case have been also added to check for:
  - the previous patch about git subpath parameter and devtool
  - the correctness of overriding dependencies (first patch of the
series)

(From OE-Core rev: 409e045f96f69877de6f36ed14c5c19a9cb74eaf)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Frederic Martinsons
11180fd528 patch: support of git patches when the source uri contained subpath parameter
This is for a specific case where:
  - A recipe use a subpath on a git repo (e.g. git://repo.git/projects;subpath=subproject)
  - The recipe contains a patch to apply
  - a devtool modify is used on this recipe

With these conditions, the patch cannot be applied at all.
GitApplyTree class is used for handling patch under devtool, but
when subpath is present in SRC_URI, the resulting git tree
is dirty (every files and directories which was not in subpath are suppressed)
and so "git am" refuse to apply patches.

That would not be an issue since the GitApplyTree have a fallback
to PatchTree in case of error, but during this error management,
there is a "git reset --hard HEAD" call which suppress the subpath
operation and finally prevents the patch to be applied even with PatchTree.

When devtool is not involved, only PatchTree class is used and the
above problem is irrelevant.

To support git patching during devtool, the presence of subpath and
the dirtyness of the repo are checked. If both conditions are
met, we directly call PatchTree like it was already done
in case of error during git apply.

(From OE-Core rev: d86cac2759cf7e91f4ff240833385e28e729ab79)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Frederic Martinsons
da1bcf0808 devtool: add support for multiple git url inside a cargo based recipe
Without that, the possible git urls that are in SRC_URI of a recipe
are removed from SRC_URI during devtool process and so the
cargo_common_do_patch_paths in cargo_common.bbclass cannot
patch these packages to fetch them locally.

I use a generic type name because I foresee this change will
be useful for recipe that used a package manager (cargo but also
npm) see https://bugzilla.yoctoproject.org/show_bug.cgi?id=11015

(From OE-Core rev: 474658a3681c343385c359a21c3693401217298d)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Frederic Martinsons
ddf65370a9 cargo_common.bbclass: add support of user in url for patch
To handle url like git://git@repo/project

(From OE-Core rev: ad99ede096aff03c974b8725d90d3c9d1056bae0)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Alex Kiernan
0d099fa404 cargo_common.bbclass: Support local github repos
Since disable network was added cargo configurations which reference git
repos fail as they attempt to fetch across the network as part of
do_compile, even if EXTRA_OECARGO_PATHS to add them as part of `paths`
is used, as this is documented as only working for packages which exist
in crates.io.

Add parsing of the SRC_URIs for git repos and include `[patch]` sections
to redirect to the checked out source repos which the bitbake fetcher
has already populated.

There are still cases which don't work - if you have multiple copies of
the same repo with different revisions, there's currently no way to
represent that and anything using a repo which has a virtual manifest
will fail to build (see https://github.com/rust-lang/cargo/issues/4934).

(From OE-Core rev: 684a8af41c5bb70db68e75f72bdc4c9b09630810)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Marta Rybczynska
15dc92a4b1 cve-update-nvd2-native: new CVE database fetcher
Add new fetcher for the NVD database using the 2.0 API [1].
The implementation changes as little as possible, keeping the current
database format (but using a different database file for the transition
period), with a notable exception of not using the META table.

Minor changes that could be visible:
- the database starts in 1999 instead of 2002
- the complete fetch is longer (30 minutes typically)

[1] https://nvd.nist.gov/developers/vulnerabilities

(From OE-Core rev: fb62c4c3dbca4e58f7ce6cf29d4b630a06411a97)

Signed-off-by: Marta Rybczynska <marta.rybczynska@syslinbit.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Enrico Jörns
d59756912c oeqa: whitespace and indentation cleanups
(From OE-Core rev: 4922221d1259e2f78233f17bb901cdac5b9aa520)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
4651c42cab oeqa/utils/qemurunner: fix undefined TimeoutExpired
(From OE-Core rev: 19ae3f4440b09d4cfe4bc589d859d476168541bd)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
6ef891415f oeqa/utils/qemurunner: limit precision of timing debugging output
* There is no need to be that precise. It just irritates in the logs.
* There is also no point in printing plain time.time() value a single
  time while only using formatted printout everywhere else, thus remove
  it.
* Use %d for printing integer times

(From OE-Core rev: f0988cb8cf8d03708490cca4eba345492ef78d52)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
ff7b3d6810 oeqa/utils/qemurunner: replace hard-coded user 'root' in debug output
Since login user is configurable with boot_patterns['send_login_user'],
unconditionally using 'root' in the debug message can be confusing.

Also fix the debug message to say 'Logged in' instead of 'Logged'.

(From OE-Core rev: 900e3d42b918b5a33d8d952b3a8078fbe72ba98f)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
a5f848f0e0 oeqa/utils/commands: remove unused imports
(From OE-Core rev: 0c00b5cdd57c3d9c47d4780d6627c74221911b72)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
c27a505f58 oeqa/utils/commands: fix usage of undefined EPIPE
(From OE-Core rev: 1cb17e37e275794e26debed2d171c2394d8bb945)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
fbd4843544 oeqa/targetcontrol: remove unused imports
(From OE-Core rev: 46b42edbf814d15be3a18283018ede2d4f817bc6)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
6ae5bd896a oeqa/targetcontrol: do not set dump_host_cmds redundantly
This is already set above, thus simply use the set value from there.

(From OE-Core rev: 2f6571ffb23b1a0b5bd6a1212fc108e536f04539)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
ed363d0ec9 oeqa/targetcontrol: fix misspelled RuntimeError
(From OE-Core rev: 92ffc35052768c753a89b4839c70db87072437a2)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Enrico Jörns
4d2c6baba5 oeqa/selftest/cases/runqemu: update imports
'tempfile' and 'oeqa.utils.command.runCmd' are unused while 'os' is
actually used.

(From OE-Core rev: 50f766233e83528eebeca92877277374c7193530)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Richard Purdie
f67258fcbf oeqa/loader: Ensure module names don't contain uppercase characters
Python modules aren't supposed to have uppercase characters in their names
according to python conventions. We have regexs in the code which work
on that assumption too. Rather than showing errors under some filtering
situations, make it clear and error if a problematic name is seen.

(From OE-Core rev: 7964a6ee54e881a6128707a7f2a42eec2ed63881)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Tobias Hagelborn
5a34ddf76d lib/oe/gpg_sign.py: Avoid race when creating .sig files in detach_sign
Move the signature file into place only after it is successfully signed.
This to avoid race and corrupted .sig files in cases multiple onging
builds write to a shared sstate-cache dir.

(From OE-Core rev: b4ec08ea9efebac262d43f47d95a356fe2829de9)

Signed-off-by: Tobias Hagelborn <tobiasha@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Ross Burton
899ec32f42 webkitgtk: clean up Python variables
The cmake bbclass already sets the path to the correct Python for us,
and there appears to be no more scripts in the build which use 'python'
explicitly.

(From OE-Core rev: abbac1588163b63746928403d524a09532875d5a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Ross Burton
65ee49e1e7 libgit2: clean up CMake variables
LIB_INSTALL_DIR was removed in libgit2 1.0 when they moved to using
GNUInstallDirs.

BUILD_CLAR is now BUILD_TESTS as of libgit2 1.4.

(From OE-Core rev: 9d321a4abf2ee35647293f5ec7e4c354974b45c6)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Ross Burton
ef12246e32 llvm: remove redundant CMake variables
This recipe uses the cmake class, so there's no need to set the Ninja
backend, or tell it where Python is, or that we're cross-compiling.

(From OE-Core rev: 2560665cc1e30a6ca969118ade8612393e1eef74)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-31 23:30:36 +01:00
Ross Burton
0907793d5e tzdata: upgrade to 2023c
Drop a backport patch as it is now integrated.

(From OE-Core rev: 80d26d1da47dcd9213a7083d9493a7bce0897a57)

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-03-30 23:26:04 +01:00
Sudip Mukherjee
1e752c3a31 cracklib: upgrade to v2.9.10
Remove a patch which has been applied upstream and rebase
another patch on top of v2.9.10

(From OE-Core rev: d9e8baaca5a6dfd1517f9f328d6644c72404f19e)

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 23:26:04 +01:00
Ovidiu Panait
46fda7a1a8 gobject-introspection: inherit python3targetconfig
When building gobject-introspection for aarch64, the generated giscanner
python module has the wrong "x86_64" suffix:
./usr/lib/gobject-introspection/giscanner/_giscanner.cpython-311-x86_64-linux-gnu.so

The EXT_SUFFIX used by meson to generate the python module is taken
from the native python3 sysconfig instead of the target sysconfig.

Replace the python3native inherit with python3targetconfig to fix this.

(From OE-Core rev: 0a6c46743fa6bf3e5418247d4841ae5ffb530262)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 23:26:04 +01:00
Khem Raj
17c6c0d650 Revert "runqemu: Add workaround for APIC hang on pre 4.15 kernels on qemux86"
This reverts commit 82e67b82ea8e12aa0b7b9db1d84fec0436dec71b.

It was commited as part of https://bugzilla.yoctoproject.org/show_bug.cgi?id=12301
for kernels < 4.15, as of now oldest builder kernel we have is 4.15 on
ubuntu 18.04 so we should not require this workaround. Moreover, this
fixes an smp problem with qemux86 where no matter what -smp <x> option
is used, qemu always starts with single core.

(From OE-Core rev: fa8a7c0608fc800c48d0ff1cd832ad63c51eeab1)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 23:26:04 +01:00
Romuald Jeanne
6815f71692 oeqa/selftest/imagefeatures: set a test for mutliubi in test_image_fstypes
Allow 'multiubi' fstype image.
Set 'MULTIUBI_BUILD' with two entries to allow configuration for two
different '.ubifs'.
Configure 'MKUBIFS_ARGS_*' and 'UBINIZE_ARGS_*' for both configurations.

(From OE-Core rev: 96d4486df6d870ef19e2055b026729e66bc118f3)

Signed-off-by: Romuald Jeanne <romuald.jeanne@st.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 23:26:04 +01:00
Martin Jansa
953007b68b selftest: eSDK rename to esdk
* I was hit by oe-selftest -r eSDK.oeSDKExtSelfTest.test_install_libraries_headers
  running all tests except only this selected one:

  poky $ oe-selftest -v -r eSDK.oeSDKExtSelfTest.test_install_libraries_headers -K -B /OE/build/poky/build-eSDK
  2023-03-13 14:00:52,955 - oe-selftest - DEBUG - Selected tests with -r: ['eSDK.oeSDKExtSelfTest.test_install_libraries_headers']
  2023-03-13 14:00:55,531 - oe-selftest - INFO - Changing cwd to /OE/build/poky/build
  ..
  2023-03-13 14:00:58,128 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name)

  this is caused by _built_modules_dict(modules) function
  which filters out eSDK.oeSDKExtSelfTest.test_install_libraries_headers
  based on the regexp and then it runs all loaded tests, because
  modules are empty

  the initial regexp and comment from 2017:
     https://git.openembedded.org/openembedded-core/commit/?id=80db3d999ae26d298d9d5418a32b11a4f27af9d5

     # Assumption: package and module names do not contain upper case
     # characters, whereas class names do
     m = re.match(r'^([^A-Z]+)(?:\.([A-Z][^.]*)(?:\.([^.]+))?)?$', module)

  might still be valid, but it was loosened in 2018 to accept upper case in module:

     https://git.openembedded.org/openembedded-core/commit/?id=1ecf48fd286a77078451b67879a44f9c9dc7a894
     Some test cases (eSDK.oeSDK*, runtime_test/*) does not match with current regex, fix it accept all.

  Then skipping the not matching modules was added later in 2018:

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

  and regexp was updated again in 2020 not to accept upper case in modules:

     https://git.openembedded.org/openembedded-core/commit/?id=ad81ea90a815389e45ff302a85151724c71f71c3
     oeqa/core/loader: refine regex to find module
     test case in format <module name>.<class name>.<test case name>
     this is clear when test cases is only 3 item deep.

     but confused when it is 4 item deep, eg,
     oelib.types.TestList.test_list_nosep

  I'm afraid that changing this regexp again to accept eSDK will break
  someone's favorite test case, renaming eSDK looks much safer option

  There is only 1 such case in poky:
  $ oe-selftest --list-modules | grep INFO.- | sed 's/^.*INFO - //g' | grep -v '^[a-z_\.]*$'
  Listing all available test modules:
  eSDK

  Most modules are just a-z (52x), then oelib.<foo> (6x) and 7 modules with underscore '_'.

(From OE-Core rev: 173ef4397b5be19f72385b1a0d892a1fa8979d53)

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-03-30 23:26:04 +01:00
Martin Jansa
df3ce81ed3 selftest: systemd_boot.py: respect IMAGE_LINK_NAME
* use IMAGE_LINK_NAME instead of hardcoding
  core-image-minimal-genericx86-64.wic assumption

[YOCTO #12937]

(From meta-yocto rev: d0557c03c5fdeb294f8461ca90f875f0387bff8a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 12:32:30 +01:00
Fawzi KHABER
3ae3669468 oeqa/selftest/cases/package.py: adding unittest for package rename conflicts
This Unittest tries to rename a package, using an already used name and
fails on do_package.

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

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
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
Geoffrey GIRY
81740facf4 cve-check: Fix false negative version issue
NVD DB store version and update in the same value, separated by '_'.
The proposed patch check if the version from NVD DB contains a "_",
ie 9.2.0_p1 is convert to 9.2.0p1 before version comparison.

[YOCTO #14127]

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

Signed-off-by: Geoffrey GIRY <geoffrey.giry@smile.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 12:30:38 +01:00
Robert Yang
e8693364c5 bitbake: bitbake: bitbake-user-manual: Update EXCLUDE_FROM_WORLD
(Bitbake rev: ccb2878516d6ac2ee348ad67d0db6dda40e12018)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:51:54 +01:00
Robert Yang
178c6e0de8 bitbake: cache: Make EXCLUDE_FROM_WORLD boolean
Fixed:
Set EXCLUDE_FROM_WORLD = "0" in recipe_A:
$ bitbake world -g

Check pn-buildlist, the recipe_A won't be built, this patch fixes the problem:
EXCLUDE_FROM_WORLD = "1": Not build in world
EXCLUDE_FROM_WORLD = "0": Add back to world build

(Bitbake rev: 3f4ede2d67a2d75d3faf8887f90371bd7554d492)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:51:54 +01:00
Richard Purdie
c28a9a5799 bitbake: fetch2/local: Mention the value of localpath in failure message
We have an obtuse rare and intermittent bitbake fetch failure. Understanding
the value of ud.localpath at the time of failure would be helpful to debug it
further. Tweak the debugging to provide this in the output.

(Bitbake rev: 935ab36f64d25c09f83209cd369714c2bc89aa7f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:51:54 +01:00
Robert Yang
ac3eb2418a bitbake: fetch/git: Fix local clone url to make it work with repo
The "git clone /path/to/git/objects_symlink" couldn't work after the following
change:

6f054f9fb3

But repo command manages the git repo as symlinks, so check whether the objects
is an symlink to fix the problem:

* Nothing is changed if git/objects is not a symlink
* Use "git clone file://" when git/objects is a symlink

(Bitbake rev: a0d8108eba8d542707740d00c66c1c5f5b963f18)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:51:54 +01:00
Frederic Martinsons
4d9886e143 bitbake: crate.py: make checksum verification mandatory
(Bitbake rev: 9c07e377a21fe1d9660d084da93873acd289b581)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:51:54 +01:00
Frederic Martinsons
2b12c58724 bitbake: fetch2: Add checksum capability for crate fetcher
This change brings checksum verification of each crate
in a recipe, e.g

| SRC_URI += " \
|     crate://crates.io/aho-corasick/0.7.20 \
|     crate://crates.io/atomic-waker/1.1.0 \
|     crate://crates.io/cc/1.0.79 \
| "
|
| SRC_URI[aho-corasick.sha256sum] = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
| SRC_URI[atomic-waker.sha256sum] = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599"
| SRC_URI[cc.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"

That will require to move the checksum initialization
after the possible call to urldata_init method in order
for the crate fetcher to parse the url.

Another way of doing could have been implementing a decodeurl
method that would have been specific for each fetcher class.

(Bitbake rev: 4920686c13dd66f9bfa4f7dd38d6e955f153eeec)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:51:54 +01:00
Randy MacLeod
d1f3941417 vim: upgrade 9.0.1403 -> 9.0.1429
Fixes: CVE-2023-1127, CVE-2023-1170, CVE-2023-1175,
       CVE-2023-1264, CVE-2023-1355

(From OE-Core rev: 2415072c3800feb164dd4d1fa0b56bd141a5cbd8)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:49:01 +01:00
Arturo Buzarra
10b42adf56 run-postinsts: Set dependency for ldconfig to avoid boot issues
If a package with a postsints script requires ldconfig, the package class adds
a ldconfig postinst fragment to initialize it before. Systemd has its own
ldconfig.service to initialize it and sometimes if both services are running
at the same time in the first boot, the first one will work, but the second
one will fail with the following error:

    ldconfig[141]: /sbin/ldconfig: Renaming of /etc/ld.so.cache~ to /etc/ld.so.cache failed: No such file or directory

This commit adds a ordering dependency between them to make sure that only one
service is running at the same time.

(From OE-Core rev: 4e9d812e127dc6743f52f4881e509e8e2e833afe)

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:49:01 +01:00
Frederic Martinsons
2d3dc116fd python3-cryptography: add crates checksums
(From OE-Core rev: 37e5ec204396f59ab5e796ea4a815eaecd12f9b1)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:49:01 +01:00
Frederic Martinsons
0dcb5ab346 python3-bcrypt: add crates checksums
(From OE-Core rev: 086bdc7c4eab5f026c0c5adf446cb6d1657f086b)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:49:01 +01:00
Frederic Martinsons
eef7fbea2c cargo-update-recipe-crates: generate checksum for each crates
This is related to checksum verification introduction from
https://patchwork.yoctoproject.org/project/bitbake/patch/20230315131513.50635-1-frederic.martinsons@gmail.com/

I also choose to raise an exception if:
 - no crates can be found
 - no Cargo.lock file exist

Otherwise the generated inc file will silently be emptied.

(From OE-Core rev: c75b924a3de02625aa90ad4db4403f00d1ffeba2)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 10:49:01 +01:00
Jose Quaresma
2ba13d9447 oeqa/selftest/reproducible: Split different packages from missing packages output
When we provide sstate_targets recipes they are reported as missing
which is not quite correct because they are proveided to cut build/debugging time.

(From OE-Core rev: fd70a564d6946fa460638dd04ce2daecf4566cf3)

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>
2023-03-28 22:28:45 +01:00
Jose Quaresma
f5f465ff57 oeqa/selftest: OESelftestTestContext: convert relative to full path when newbuilddir is provided
Relative paths in BBLAYERS only works when the new build dir are on the same
ascending directory node:
 .
 ├── build
 ├── build-st

It works because they share the same ascending relative directory node.

So use the full path when the argument newbuilddir is provided
to make the oe-selftest work everywere regardless of the location chosen.

(From OE-Core rev: 2e022c1977bc1006c00a87e08a2dca5b69db4801)

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>
2023-03-28 22:28:45 +01:00
Jose Quaresma
4147b7e76d oeqs/selftest: OESelftestTestContext: replace the os.environ after subprocess.check_output
No function change but is needed to simplify the next patch.

(From OE-Core rev: 193d8f0d6383f54c61f90d58eeb8f41580c2360a)

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>
2023-03-28 22:28:45 +01:00
Ross Burton
22286ed02d libunwind: fix compile failures on 32-bit arm with Clang 16
(From OE-Core rev: 47a43ea98dc6cae67730866c47090900572ea6b0)

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-03-28 22:28:45 +01:00
Ross Burton
985f1b883f go: fix CVE-2023-2453
Backport a security fix, can be removed once we have 1.20.2 onwards.

(From OE-Core rev: 06df8350c3bc6f56013a0bff20b64cfdbb81cfca)

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-03-28 22:28:45 +01:00
Jose Quaresma
13d4b2a455 buildstats-summary: add an option to disable bold
(From OE-Core rev: b9a0ceebe9aa1e79d97508e7ab2fc39ca7c6637f)

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>
2023-03-28 22:28:45 +01:00