]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
22 months agoqemu: Add packageconfig knob to enable pipewire support
Khem Raj [Wed, 13 Dec 2023 20:40:55 +0000 (12:40 -0800)] 
qemu: Add packageconfig knob to enable pipewire support

This gets into a quessing mode if not specified and it it probelamactic
for native version since it maybe built on a machine having pipewire
  installed and used on another where pipewire is not installed (
  minimal CI builder ) it ends up with

runqemu - ERROR - Failed to run qemu: /mnt/b/yoe/master/build/tmp/work/x86_64-linux/qemu-helper-native/1.0/recipe-sysroot-native/usr/bin/qemu-system-x86_64: error while loading shared libraries: libpipewire-0.3.so.0: cannot open shared object file: No such file or directory

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>
22 months agoqemu: Fix build with latest musl
Khem Raj [Wed, 13 Dec 2023 20:40:54 +0000 (12:40 -0800)] 
qemu: Fix build with latest musl

musl dropped basename() from string.h, adjust for that

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>
22 months agosystemd: Fix build with latest musl
Khem Raj [Wed, 13 Dec 2023 20:40:53 +0000 (12:40 -0800)] 
systemd: Fix build with latest musl

musl has removed basename from string.h [1] which leads to build
failures now as declaration is gone and it should be coming from
libgen.h

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7

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>
22 months agoimages: add core-image-initramfs-boot
Ross Burton [Wed, 13 Dec 2023 18:22:37 +0000 (18:22 +0000)] 
images: add core-image-initramfs-boot

Add a minimal initramfs image recipe that just contains enough initramfs
to find the real root filesystem and pivot to it.

BSPs can use MACHINE_EXTRA_RRECOMMENDS to pull in any kernel module
packages that are required to bring up the hardware so that the rootfs
can be found.

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>
22 months agoperl: 5.38.0 -> 5.38.2
Lee Chee Yang [Wed, 13 Dec 2023 01:10:54 +0000 (09:10 +0800)] 
perl: 5.38.0 -> 5.38.2

update include fix for CVE-2023-47100.

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoperlcross: update to 1.5.2
Lee Chee Yang [Wed, 13 Dec 2023 01:10:53 +0000 (09:10 +0800)] 
perlcross: update to 1.5.2

remove upstreamed 0001-cnf-configure_pfmt.sh-add-32-bit-integer-format-defi.patch

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agogdb: Update to gdb 14.1 release
Khem Raj [Fri, 8 Dec 2023 03:04:10 +0000 (19:04 -0800)] 
gdb: Update to gdb 14.1 release

* Drop add-missing-ldflags.patch, its already applied to gdb 14
* Add dependency on mpfr for cross/cross-canadian/target recipe
* Remove gcc-only complier restriction, clang can compile it just fine
* Notable changes are here [1] [2]

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=refs/heads/gdb-14-branch
[2] https://www.sourceware.org/gdb/download/ANNOUNCEMENT

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>
22 months agooeqa/selftest/overlayfs: Fix whitespace
Richard Purdie [Wed, 20 Dec 2023 12:01:32 +0000 (12:01 +0000)] 
oeqa/selftest/overlayfs: Fix whitespace

My previous fix missed out whitespace with the append, fix that.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
    #

22 months agotestimage: Drop target_dumper and most of monitor_dumper
Richard Purdie [Tue, 19 Dec 2023 16:04:24 +0000 (16:04 +0000)] 
testimage: Drop target_dumper and most of monitor_dumper

The target_dumper code is basically broken. It has been reading binary files
over the text base serial communication and runs at every command failure which
makes no sense. Each run might overwrite files from the previous run and the
output appears corrupted due to confusion from the binary data.

For now, remove the commands and the target dumper code as the command
and execution point are problematic. Also remove the same pieces of the monitor
code but leave the command list since in theory this can be moved to a more
useful place in the code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa/selftest/overlayfs: Don't overwrite DISTRO_FEATURES
Richard Purdie [Tue, 19 Dec 2023 10:44:55 +0000 (10:44 +0000)] 
oeqa/selftest/overlayfs: Don't overwrite DISTRO_FEATURES

Whilst debugging an autobuilder failure, I wondered why it was rebuilding qemu-system-native
instead of reusing from sstate. The reason was it was overwriting DISTRO_FEATURES,
in this case removing opengl which caused much to rebuild.

The test doesn't need that so don't do it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoqemurunner: Improve handling of serial port output blocking
Richard Purdie [Mon, 18 Dec 2023 15:14:08 +0000 (15:14 +0000)] 
qemurunner: Improve handling of serial port output blocking

Similar to stdout in the previous commit, we need to ensure serial output
if written is read and put somewhere, else qemu might block on writes to
the serial port leading to hangs in the kernel. Use our existing logging
thread to log data when run_serial is not in use.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoqemurunner: Improve stdout logging handling
Richard Purdie [Mon, 18 Dec 2023 12:18:45 +0000 (12:18 +0000)] 
qemurunner: Improve stdout logging handling

We need to ensure we read from and log the output from qemu stdout
as otherwise the buffers can fill and block, leading qemu to hang.
Use our existing logging thread to do this.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agotestimage: Exclude wtmp from target-dumper commands
Richard Purdie [Tue, 19 Dec 2023 14:29:32 +0000 (14:29 +0000)] 
testimage: Exclude wtmp from target-dumper commands

wtmp is filled with binary data which the run_serial command can't cope with.
Catting this results in confusion of the serial interface and potentially large
backlogs of data in the buffers which can hang qemu.

Exclude the problematic files from the command.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agosystemtap: fix libdebuginfod auto detection logic
Victor Kamensky [Mon, 18 Dec 2023 06:07:57 +0000 (22:07 -0800)] 
systemtap: fix libdebuginfod auto detection logic

Addresses an issue when systemtap is built in situation where debuginfod
is not part of DISTRO_FEATURES and latest SystemTap has problem of
auto detecting libdebuginfod library as it was reported by Martin
Jansa in [1].

[1] https://lists.openembedded.org/g/openembedded-core/message/192109?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Csystemtap%2C20%2C2%2C0%2C102987514

Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agosystemtap: explicit handling debuginfod library dependency
Victor Kamensky [Mon, 18 Dec 2023 06:07:56 +0000 (22:07 -0800)] 
systemtap: explicit handling debuginfod library dependency

After systemtap commit 2e67b053e3796ee7cf29a39f9698729b52078406
"configury: rework debuginfod searches" automatic detection of
libdebuginfod is broken. Let's handle it explicitly with debuginfod
package feature. It is good to have such feature anyway.

Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agorpcbind: Specify state directory under /run
Joshua Watt [Fri, 15 Dec 2023 20:34:04 +0000 (13:34 -0700)] 
rpcbind: Specify state directory under /run

The state directory must be correctly specified as under /run because
RequiresMountsFor doesn't follow symbolic links which means the unit may
run before /run is mounted if the default of /var/run/rpcbind is kept

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agobitbake.conf: Add runtimedir
Joshua Watt [Mon, 18 Dec 2023 15:38:02 +0000 (08:38 -0700)] 
bitbake.conf: Add runtimedir

Adds the path to the runtime state directory (/run). In particular,
systemd units need to have the correct path to the runtime directory
because RequiresMountsFor doesn't follow symbolic links. This means that
if a unit calls out a directory in /var/run (a symbolic link to /run),
it may actually start before /run is mounted. The fix is to have the
unit specify a directory in /run instead.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agotcl: skip async and event tests in run-ptest
Ross Burton [Mon, 18 Dec 2023 17:08:01 +0000 (17:08 +0000)] 
tcl: skip async and event tests in run-ptest

These test suites are full of timing-sensitive test cases, so skip
them too.

[ YOCTO #15321 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoenchant2: upgrade 2.6.2 -> 2.6.4
Anuj Mittal [Mon, 18 Dec 2023 14:47:24 +0000 (22:47 +0800)] 
enchant2: upgrade 2.6.2 -> 2.6.4

pkgdatadir is a versioned directory by default now so we don't need to
pass it to EXTRA_OEMAKE.

https://github.com/AbiWord/enchant/commit/6e4a8df5cbf80fd449f1857ac1065d3235f1139f

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agolibusb1: fix upstream version check
Anuj Mittal [Mon, 18 Dec 2023 14:47:23 +0000 (22:47 +0800)] 
libusb1: fix upstream version check

Fix regex to not match release candidates.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agostress-ng: upgrade 0.17.01 -> 0.17.03
Anuj Mittal [Mon, 18 Dec 2023 14:47:22 +0000 (22:47 +0800)] 
stress-ng: upgrade 0.17.01 -> 0.17.03

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agopuzzles: upgrade to latest revision
Anuj Mittal [Mon, 18 Dec 2023 14:47:21 +0000 (22:47 +0800)] 
puzzles: upgrade to latest revision

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoglib-networking: upgrade 2.76.1 -> 2.78.0
Anuj Mittal [Mon, 18 Dec 2023 14:47:20 +0000 (22:47 +0800)] 
glib-networking: upgrade 2.76.1 -> 2.78.0

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoglib-2.0: upgrade 2.78.1 -> 2.78.3
Anuj Mittal [Mon, 18 Dec 2023 14:47:19 +0000 (22:47 +0800)] 
glib-2.0: upgrade 2.78.1 -> 2.78.3

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agobluez5: upgrade 5.70 -> 5.71
Anuj Mittal [Mon, 18 Dec 2023 14:47:18 +0000 (22:47 +0800)] 
bluez5: upgrade 5.70 -> 5.71

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agobase-passwd: upgrade 3.6.2 -> 3.6.3
Anuj Mittal [Mon, 18 Dec 2023 14:47:17 +0000 (22:47 +0800)] 
base-passwd: upgrade 3.6.2 -> 3.6.3

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agosqlite3: upgrade 3.44.0 -> 3.44.2
Anuj Mittal [Mon, 18 Dec 2023 14:47:16 +0000 (22:47 +0800)] 
sqlite3: upgrade 3.44.0 -> 3.44.2

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agolinux-yocto: update CVE exclusions
Ross Burton [Mon, 18 Dec 2023 14:18:25 +0000 (14:18 +0000)] 
linux-yocto: update CVE exclusions

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agobuild-appliance-image: Update to master head revision
Richard Purdie [Mon, 18 Dec 2023 09:42:59 +0000 (09:42 +0000)] 
build-appliance-image: Update to master head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agocreate-spdx-2.2: combine spdx can try to write before dir creation
Jeremy A. Puhlman [Fri, 15 Dec 2023 17:10:46 +0000 (09:10 -0800)] 
create-spdx-2.2: combine spdx can try to write before dir creation

On occasion a file is attmpeded to be opened prior to the
creation of the spdx_workdir. Create the directory before
the open, just in case.

File: '/build/layers/poky/meta/classes/create-spdx-2.2.bbclass', lineno: 1081, function: combine_spdx
     1077:        )
     1078:
     1079:    image_spdx_path = spdx_workdir / (rootfs_name + ".spdx.json")
     1080:
 *** 1081:    with image_spdx_path.open("wb") as f:
     1082:        doc.to_json(f, sort_keys=True, indent=get_json_indent(d))

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa: add "maturin develop" SDK test case
Tim Orling [Sun, 17 Dec 2023 05:41:33 +0000 (21:41 -0800)] 
oeqa: add "maturin develop" SDK test case

'maturin develop' first checks that a virtual environment
has been created, which is a good test for our python3 SDK
environment ;)

Source for guessing-game lifted from https://www.maturin.rs/tutorial

The test case is expected to fetch any necessary crates, build a
development version of the crate and package it as a wheel

Needs at a minimum the following in e.g. local.conf:
TOOLCHAIN_HOST_TASK:append = " nativesdk-python3-maturin"
SDK_INCLUDE_TOOLCHAIN = '1'
SDK_TOOLCHAIN_LANGS += 'rust'

The output of 'maturin develop' should be something like:
...
🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.8
🐍 Not using a specific python interpreter
📡 Using build options features from pyproject.toml
   ...
   Compiling guessing-game v0.1.0 (/path/to/guessing-game)
    Finished dev [unoptimized + debuginfo] target(s) in 7.14s
📦 Built wheel for abi3 Python ≥ 3.8 to /path/to/tmpdir/guessing_game-0.1.0-cp38-abi3-linux_x86_64.whl
🛠 Installed guessing-game-0.1.0

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa: add simple 'maturin' SDK (testsdk) test case
Tim Orling [Sun, 17 Dec 2023 05:41:32 +0000 (21:41 -0800)] 
oeqa: add simple 'maturin' SDK (testsdk) test case

We expect 'maturin' will be used in SDKs, so it makes sense to also
test it in the testsdk environment.

To run this test case, you can add the following to local.conf:
TOOLCHAIN_HOST_TASK:append = " nativesdk-python3-maturin"

And then build and test the SDK:
bitbake -c populate_sdk core-image-full-cmdline
bitbake -c testsdk core-image-full-cmdline

You can substitute a different image recipe for "core-image-full-cmdline"

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooe-selfest: add maturn runtime (testimage) test
Tim Orling [Sun, 17 Dec 2023 05:41:31 +0000 (21:41 -0800)] 
oe-selfest: add maturn runtime (testimage) test

Basic smoke test for maturin to test the 'maturin list-python' case.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agorecipetool: add python_maturin support
Tim Orling [Sun, 17 Dec 2023 05:41:30 +0000 (21:41 -0800)] 
recipetool: add python_maturin support

Add the new python_maturin PEP-517 backend

Add selftest for 'pydantic-core' pypi package.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoclasses-recipe: add python_maturin.bbclass
Tim Orling [Sun, 17 Dec 2023 05:41:29 +0000 (21:41 -0800)] 
classes-recipe: add python_maturin.bbclass

maturin is a replacement for setuptools_rust and another "backend" for
building python wheels.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agopython3-maturin: bzip2-sys reproduciblility
Tim Orling [Sun, 17 Dec 2023 05:41:28 +0000 (21:41 -0800)] 
python3-maturin: bzip2-sys reproduciblility

The /usr/bin/.debug/maturin binary ends up with the path
to the bzip-sys (bzip2-1.0.8) source in the python3-maturin-dbg package

Fix this by mapping the debug path for CARGO_HOME
to TARGET_DBGSRC_DIR/cargo_home via CFLAGS. This is
required because the bzip-sys crate is compiled using
the cc crate and we override default CFLAGS.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agopython3-maturin: add v1.4.0
Tim Orling [Sun, 17 Dec 2023 05:41:27 +0000 (21:41 -0800)] 
python3-maturin: add v1.4.0

Build and publish crates with pyo3, rust-cpython, cffi and uniffi bindings
as well as rust binaries as python packages.

This project is meant as a zero configuration replacement for setuptools-rust
and milksnake. It supports building wheels for python 3.7+ on windows, linux,
mac and freebsd, can upload them to pypi and has basic pypy and graalpy support.

https://github.com/pyo3/maturin

* Referesh -crates.inc for 1.4.0

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa/selftest/sstatetests: re-work CDN tests, add local cache tests
Alexander Kanavin [Thu, 14 Dec 2023 13:45:20 +0000 (14:45 +0100)] 
oeqa/selftest/sstatetests: re-work CDN tests, add local cache tests

With the rework of printdiff, it is not longer useful for checking
absence of sstate objects in a remote http cache, as it would only
report the top level missing signatures, and leave the recursive
investigation to diffsigs (which relies on ability to list cache
files - not available over http).

The CDN check can be performed by simply running 'bitbake -DD -n'
which is very verbose, but neverthless reports the amount
of missing sstate objects and what they are in a way that can
be programmatically extracted and checked (as suggested by RP).

This also adds local sstate tests, as they can be useful to
determine whether the missing cdn objects were never created or
erroneously cleaned up, or if they were created but didn't propagate
to cdn.

[YOCTO #15303]

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agobuild-appliance-image: Update to master head revision
Richard Purdie [Sat, 16 Dec 2023 13:12:49 +0000 (13:12 +0000)] 
build-appliance-image: Update to master head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa/sstatetests: Disable gcc source printdiff test for now
Richard Purdie [Sat, 16 Dec 2023 13:11:57 +0000 (13:11 +0000)] 
oeqa/sstatetests: Disable gcc source printdiff test for now

There are some issues with the printdiff code this has identified, disable the
test for now until we have patches to resolve them.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agodevtool: modify: Handle recipes with a menuconfig task correctly
Peter Kjellerstedt [Fri, 15 Dec 2023 12:12:06 +0000 (13:12 +0100)] 
devtool: modify: Handle recipes with a menuconfig task correctly

This avoids the following error when running `devtool modify` on a
recipe that has a menuconfig task, but does not have
KCONFIG_CONFIG_ENABLE_MENUCONFIG set.

  .../temp/run.do_configure.4163366: line 152:
  ${@ oe.types.boolean('${KCONFIG_CONFIG_ENABLE_MENUCONFIG}') }: bad substitution
  WARNING: .../temp/run.do_configure.4163366:152 exit 1 from
  '[ ${@ oe.types.boolean('${KCONFIG_CONFIG_ENABLE_MENUCONFIG}') } = True ]'

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoutil-linux: Delete md-raid tests
Khem Raj [Thu, 14 Dec 2023 19:34:36 +0000 (11:34 -0800)] 
util-linux: Delete md-raid tests

These tests are marked as known failures upstream as well [1]
if we delete them then we can drop dependency on mdadm for ptests which
can further reduce the dependency chain for ptest enabled minimal images

[1] https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agostrace: Disable bluetooth support by default
Yoann Congal [Wed, 13 Dec 2023 08:56:58 +0000 (09:56 +0100)] 
strace: Disable bluetooth support by default

The bluetooth support adds a bluez5 dependency (and,recursively, a lot
of other stuff). Disable it by default to avoid having to build all of
this when it is not needed.

This decrease the number of tasks run for a core-image-minimal build by
~1000 (-21%).

To re-enable bluetooth support in strace, add "bluez" to strace
PACKAGECONFIG. For example, in local.conf:
  PACKAGECONFIG:append:pn-strace = " bluez"

Fixes [YOCTO #15323]

[RP: Tweaked to put a message about the change in the recipe]
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Suggested-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agosstate: Fix dir ownership issues in SSTATE_DIR
Richard Purdie [Sun, 10 Dec 2023 09:33:17 +0000 (09:33 +0000)] 
sstate: Fix dir ownership issues in SSTATE_DIR

We currently use mkdir -p to create missing parent directories within SSTATE_DIR.
Reading the man page for mkdir mentions that parent directories are created with
the current umask, *not* the mode passed upon the commandline.

We could fix this by setting and resetting the umask but since we already have
decent python code able to do this, move to using that injecting a python function
into the chain of functions already present.

This should help fix the occasional sstate directory creation with the wrong
permissions.

[YOCTO #14385]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agorunqemu: add qmp socket support
Ross Burton [Wed, 13 Dec 2023 20:30:14 +0000 (20:30 +0000)] 
runqemu: add qmp socket support

Add support for qmp sockets and defaults to unix:qmp.sock if unspecified

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooe-selftest: add tests for C and C++ build tools
Adrian Freihofer [Thu, 7 Dec 2023 20:52:51 +0000 (21:52 +0100)] 
oe-selftest: add tests for C and C++ build tools

Add new file for C and C++ build tools. The initial implemmentation
contains a class for CMake and one for Meson. At least these first
tests for the qemu-usermode share most of the code. That's why there
is only one c_ccp.py file and not for example a cmake.py and a
meson.py file.

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>
22 months agooeqa/core/decorator: add skip if not qemu-usermode
Adrian Freihofer [Thu, 7 Dec 2023 20:52:50 +0000 (21:52 +0100)] 
oeqa/core/decorator: add skip if not qemu-usermode

Add a decorator to skip tests which require the qemu-usermode machine
feature.

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>
22 months agooe-selftest: add a cpp-example recipe
Adrian Freihofer [Thu, 7 Dec 2023 20:52:49 +0000 (21:52 +0100)] 
oe-selftest: add a cpp-example recipe

This simple C++ project supports compilation with CMake and Meson.
(Autotool support could be added later on.)
It's supposed to be used with oe-selftest.

An artificial project has several advantages over compiling a normal
CMake or Meson based project for testing purposes:
- It is much faster because it can be kept minimalistic
- It can cover multiple odd corner cases
- No one will change it in an unpredictable way
- It can support multiple build tools with only one C++ codebase

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>
22 months agocmake-qemu.bbclass: make it more usable
Adrian Freihofer [Thu, 7 Dec 2023 20:52:48 +0000 (21:52 +0100)] 
cmake-qemu.bbclass: make it more usable

Make the cmake-qemu.bbclass more usable:
- Drop the CMAKE_EXEWRAPPER_ENABLED variable (which does not make much
  sense without the second commit of the original patch series).
- Inherit qemu to make the cmake-qemu a drop in replacement for cmake.

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>
22 months agorust: Upgrade 1.71.0 -> 1.71.1
Alex Kiernan [Fri, 8 Dec 2023 14:03:45 +0000 (14:03 +0000)] 
rust: Upgrade 1.71.0 -> 1.71.1

https://blog.rust-lang.org/2023/08/03/Rust-1.71.1.html

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agorust: Upgrade 1.70.0 -> 1.71.0
Alex Kiernan [Fri, 8 Dec 2023 14:03:44 +0000 (14:03 +0000)] 
rust: Upgrade 1.70.0 -> 1.71.0

Switch libstd-rs to use the dummy `sysroot` crate which represents the
standard library crates. Target getrandom-open64.patch at 0.2.8 (merged
for 0.2.9). Drop bootstrap_fail.patch (backport merged).

https://blog.rust-lang.org/2023/07/13/Rust-1.71.0.html

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agorust: Disable rust oe-selftest
Yash Shinde [Fri, 8 Dec 2023 14:03:43 +0000 (14:03 +0000)] 
rust: Disable rust oe-selftest

After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives
build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite
until the issue is fixed

error: the option `Z` is only accepted on the nightly compiler
thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9

Following issues are created in Yocto bugzilla and rust upstream to track this issue-

https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275
https://github.com/rust-lang/rust/issues/115642
https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108
https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa/selftest/recipetool: fix metadata corruption on meta layer
Julien Stephan [Mon, 11 Dec 2023 17:01:38 +0000 (18:01 +0100)] 
oeqa/selftest/recipetool: fix metadata corruption on meta layer

[YOCTO #15314]

test_recipetool_appendsrcfile_update_recipe_basic is using base-files as
test recipe but modifies it directly which can corrupt metadata for other
tests relying on this recipe.

So use mtd-utils-selftest as test recipe from meta-selftest to avoid
this kind of issues

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agooeqa/selftest/recipetool: remove left over from development
Julien Stephan [Mon, 11 Dec 2023 15:48:49 +0000 (16:48 +0100)] 
oeqa/selftest/recipetool: remove left over from development

Remove leftover code needed for development that was unintentionally
committed

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agoarchiver.bbclass: Improve work-shared checking
Robert Yang [Mon, 11 Dec 2023 15:13:17 +0000 (07:13 -0800)] 
archiver.bbclass: Improve work-shared checking

There are other recipes except the listed ones which use work-shared, improve
the checking to make other recipes such as llvm-project-source work with
do_ar_patched.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agonfs-utils: Upgrade 2.6.3 -> 2.6.4
Robert Yang [Mon, 11 Dec 2023 14:49:50 +0000 (06:49 -0800)] 
nfs-utils: Upgrade 2.6.3 -> 2.6.4

* Remove backported patch 0001-configure.ac-libevent-and-libsqlite3-checked-when-nf.patch.
* Add 0001-reexport.h-Include-unistd.h-to-compile-with-musl.patch to fix build with musl

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agogo: set vendor in CVE_PRODUCT
Ross Burton [Mon, 11 Dec 2023 13:49:46 +0000 (13:49 +0000)] 
go: set vendor in CVE_PRODUCT

It's not uncommon for specific third party modules to use "go" as the
product[1]. However, the canonical CPE for the official Go
language/runtime is always golang:go[2], so use that explicitly.

[1] e.g. https://nvd.nist.gov/vuln/detail/CVE-2023-49292
[2] e.g. https://nvd.nist.gov/vuln/detail/CVE-2023-39320

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agooeqa/selftest/recipetool: add back checksum checks on pypi tests
Julien Stephan [Mon, 11 Dec 2023 13:40:42 +0000 (14:40 +0100)] 
oeqa/selftest/recipetool: add back checksum checks on pypi tests

recipetool pypi plugin was originally clobbering SRC_URI checksums.

Now it doesn't do this anymore:
78ef0313ee6 - recipetool: pypi: do not clobber SRC_URI checksums
so add back the checksum checks on pypi tests.

Also this commit restrict the checksums:
45d2f8d4bc2 - recipetool: create: Only include the expected SRC_URI checksums
so add only the needed ones.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agoopkg: Use own version of portable basename function
Khem Raj [Mon, 11 Dec 2023 03:51:16 +0000 (19:51 -0800)] 
opkg: Use own version of portable basename function

Fixes build with upcoming musl release.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agocve-update-nvd2-native: increase the delay between subsequent request failures
Dhairya Nagodra [Mon, 11 Dec 2023 10:05:00 +0000 (02:05 -0800)] 
cve-update-nvd2-native: increase the delay between subsequent request failures

Sometimes NVD servers are unstable and return too many errors.
There is an option to have higher fetch attempts to increase the chances
of successfully fetching the CVE data.

Additionally, it also makes sense to progressively increase the delay
after a failed request to an already unstable or busy server.
The increase in delay is reset after every successful request and
the maximum delay is limited to 30 seconds.

Also, the logs are improved to give more clarity.

Signed-off-by: Dhairya Nagodra <dnagodra@cisco.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agocve-update-nvd2-native: faster requests with API keys
Dhairya Nagodra [Mon, 11 Dec 2023 10:04:59 +0000 (02:04 -0800)] 
cve-update-nvd2-native: faster requests with API keys

As per NVD, the public rate limit is 5 requests in 30s (6s delay).
Using an API key increases the limit to 50 requests in 30s (0.6s delay).
However, NVD still recommends sleeping for several seconds so that the
other legitimate requests are serviced without denial or interruption.
Keeping the default sleep at 6 seconds and 2 seconds with an API key.

For failures, the wait time is unchanged (6 seconds).

Reference: https://nvd.nist.gov/developers/start-here#RateLimits

Signed-off-by: Dhairya Nagodra <dnagodra@cisco.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agoattr: Fix build with latest musl
Khem Raj [Sun, 10 Dec 2023 20:25:49 +0000 (12:25 -0800)] 
attr: Fix build with latest musl

Include libgen.h to get basename() signature

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agosysvinit: Include libgen.h for basename API
Khem Raj [Sun, 10 Dec 2023 20:25:48 +0000 (12:25 -0800)] 
sysvinit: Include libgen.h for basename API

This fixes build with latest musl which drops basename declaration API from string.h

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agoutil-linux: Fix build with latest musl
Khem Raj [Sun, 10 Dec 2023 20:25:47 +0000 (12:25 -0800)] 
util-linux: Fix build with latest musl

Musl has removed basename declaration in string.h which exposes this
error.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agoelfutils: Use own basename API implementation
Khem Raj [Sun, 10 Dec 2023 20:25:46 +0000 (12:25 -0800)] 
elfutils: Use own basename API implementation

This helps in building it for musl libc after this change [1]

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agokmod: Fix build with latest musl
Khem Raj [Sun, 10 Dec 2023 20:25:45 +0000 (12:25 -0800)] 
kmod: Fix build with latest musl

implement glibc compatible basename() funciton for portability

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agoqemurunner: remove unused import
Ross Burton [Thu, 7 Dec 2023 14:36:04 +0000 (14:36 +0000)] 
qemurunner: remove unused import

Removes unused logging import

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agotcl: skip timing-dependent tests in run-ptest
Ross Burton [Thu, 7 Dec 2023 22:31:10 +0000 (22:31 +0000)] 
tcl: skip timing-dependent tests in run-ptest

There are several tests in the test suite which are very dependent on
timing and fail on a loaded host system, so skip them.

[ YOCTO #14825 #14882 #15081 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agobase: Unpack .7z files with p7zip
Daniel Ammann [Fri, 8 Dec 2023 10:25:24 +0000 (11:25 +0100)] 
base: Unpack .7z files with p7zip

Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agopython3-setuptools-rust: BBCLASSEXTEND + nativesdk
Tim Orling [Thu, 7 Dec 2023 23:13:18 +0000 (15:13 -0800)] 
python3-setuptools-rust: BBCLASSEXTEND + nativesdk

We would like to build python3-maturin for nativesdk use
and nativesdk-python3-setuptools-rust is a dependency.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agomusl: add typedefs for Elf64_Relr and Elf32_Relr
Zang Ruochen [Fri, 8 Dec 2023 07:42:44 +0000 (23:42 -0800)] 
musl: add typedefs for Elf64_Relr and Elf32_Relr

The absence of this typedef causes elfutils to report the following error:
/usr/include/gelf.h:86:9: error: unknown type name 'Elf64_Relr'

https://git.musl-libc.org/cgit/musl/commit/?id=6be76895f6863100a311d474a42abdbb6466189d

Signed-off-by: Zang Ruochen <zangruochen@loongson.cn>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
22 months agouseradd: Fix useradd do_populate_sysroot dependency bug
Richard Purdie [Sat, 9 Dec 2023 15:28:11 +0000 (15:28 +0000)] 
useradd: Fix useradd do_populate_sysroot dependency bug

If a task is adde which has a dependency on the do_populate_sysroot task of
the recipe, it will cause it to be installed into the sysroot (similar to
do_addto_recipe_sysroot). This fails since the postinst script is an overlapping
file:

Exception: FileExistsError: [Errno 17] File exists:
'tmp/sysroots-components/all/useraddbadtask/usr/bin/postinst-useradd-useraddbadtask'
  ->
'tmp/work/all-poky-linux/useraddbadtask/1.0/recipe-sysroot/usr/bin/postinst-useradd-useraddbadtask'

The copy written out at do_prepare_recipe_sysroot time is just for debug so
rename it, meaning there are no longer overlapping files and the installation
can be successful, removing the error.

[YCOTO #14961]

With the bug fixed, enable the test.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa/selftest/bbtests: Add test for unexpanded variables in the dirname
Pavel Zhukov [Fri, 8 Dec 2023 13:22:25 +0000 (14:22 +0100)] 
oeqa/selftest/bbtests: Add test for unexpanded variables in the dirname

Regression test for [Yocto #15255]

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agocargo: Add CARGO_LOCK_PATH for path to Cargo.lock
Alex Kiernan [Fri, 8 Dec 2023 12:00:28 +0000 (12:00 +0000)] 
cargo: Add CARGO_LOCK_PATH for path to Cargo.lock

When building a workspace enabled project, the Cargo.lock is found at
the root of the project, not alongside the Cargo.toml. Expose
CARGO_LOCK_PATH so it can be explicitly configured.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agorust: cargo: Convert single-valued variables to weak defaults
Alex Kiernan [Fri, 8 Dec 2023 12:00:27 +0000 (12:00 +0000)] 
rust: cargo: Convert single-valued variables to weak defaults

All of these variables are single-valued, so we can use weak-defaults
for them and only see the final assignment after parsing.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agocargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common
Alex Kiernan [Fri, 8 Dec 2023 12:00:26 +0000 (12:00 +0000)] 
cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common

cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on
CARGO_SRC_DIR), but their definition was in cargo.bbclass.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agobluez5: fix CVE-2023-45866
Archana Polampalli [Fri, 8 Dec 2023 11:44:15 +0000 (11:44 +0000)] 
bluez5: fix CVE-2023-45866

Bluetooth HID Hosts in BlueZ may permit an unauthenticated Peripheral role
HID Device to initiate and establish an encrypted connection, and accept HID
keyboard reports,potentially permitting injection of HID messages when no user
interaction has occurred in the Central role to authorize such access. An example
affected package is bluez 5.64-0ubuntu1 in Ubuntu 22.04LTS. NOTE: in some cases,
a CVE-2020-0556 mitigation would have already addressed this Bluetooth HID Hosts issue.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-45866

Upstream patches:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoinsane: ensure more paths have the workdir removed
Ross Burton [Fri, 8 Dec 2023 10:56:55 +0000 (10:56 +0000)] 
insane: ensure more paths have the workdir removed

When showing paths to the user we don't want to include the whole build
directory.  Passing the package name to package_qa_clean_path strips
this completely.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoimages: remove redundant IMAGE_BASENAME assignments
Ross Burton [Fri, 8 Dec 2023 10:56:03 +0000 (10:56 +0000)] 
images: remove redundant IMAGE_BASENAME assignments

core-image-tiny-initramfs and core-image-testcontroller-initramfs just
repeat PN, which is the default value.

core-image-minimal-initramfs adds MLPREFIX, but that's also covered by
PN:

$ bitbake-getvar -r lib32-core-image-minimal-initramfs IMAGE_BASENAME
IMAGE_BASENAME="lib32-core-image-minimal-initramfs"

As these assignments are all redundant, remove them.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agorecipetool: pypi: do not clobber SRC_URI checksums
Tim Orling [Sat, 9 Dec 2023 01:40:04 +0000 (17:40 -0800)] 
recipetool: pypi: do not clobber SRC_URI checksums

The pypi change:
"85a2a6f68af recipetool: create_buildsys_python: add pypi support"
deleted all the SRC_URI variables, including the SRC_URI checksums.
These are not generated by the pypi.bbclass (how could they be trusted?)

Without the checksum(s), we are vulnerable to a man-in-the-middle attack
and zero checks on the validity of the downloaded tarball from pypi.org.

Fix by only setting S and SRC_URI to None.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agosstatesig/find_siginfo: special-case gcc-source when looking in sstate caches
Alexander Kanavin [Fri, 8 Dec 2023 10:15:19 +0000 (11:15 +0100)] 
sstatesig/find_siginfo: special-case gcc-source when looking in sstate caches

This is already done for local stamps just above, and will allow enabling
the full selftest that compares gcc-source signatures via printdiff
(that is, both local stamp and sstate variants).

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoselftest/sstatetests: do not delete custom $TMPDIRs under build-st when testing printdiff
Alexander Kanavin [Fri, 8 Dec 2023 10:15:18 +0000 (11:15 +0100)] 
selftest/sstatetests: do not delete custom $TMPDIRs under build-st when testing printdiff

If the tests fail, these contain useful artefacts, and so should
be kept. If the test succeeds the whole build-st/ is deleted.

Also, give them unique names, as otherwise the tests would
step on each other.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agoselftest/sstatetest: print output from bitbake with actual newlines, not \n
Alexander Kanavin [Fri, 8 Dec 2023 10:15:17 +0000 (11:15 +0100)] 
selftest/sstatetest: print output from bitbake with actual newlines, not \n

Assert*() functions from python unittest would join the multiline output with \n, making it
almost unreadable.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agopseudo: Update to pull in syncfs probe fix
Richard Purdie [Fri, 8 Dec 2023 17:30:53 +0000 (17:30 +0000)] 
pseudo: Update to pull in syncfs probe fix

Pulls in the changes:

Eilís 'pidge' Ní Fhlannagáin (1):
      subports: Add _GNU_SOURCE for syncfs probe

Richard Purdie (1):
      SECURITY.md: Add file

Wu Zhenyu (1):
      pseudo.1: Fix a typo

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agousergrouptests.py: Add test for switching between static-ids
Eilís 'pidge' Ní Fhlannagáin [Thu, 7 Dec 2023 12:45:33 +0000 (12:45 +0000)] 
usergrouptests.py: Add test for switching between static-ids

This test is related to https://bugzilla.yoctoproject.org/show_bug.cgi?id=12107

At the moment it doesn't seem to be able to actually replicate this
issue in the bug, which tells me it's likely fixed.

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agouseradd: Add testcase for bugzilla issue (currently disabled)
Eilís 'pidge' Ní Fhlannagáin [Thu, 7 Dec 2023 12:45:32 +0000 (12:45 +0000)] 
useradd: Add testcase for bugzilla issue (currently disabled)

Add a disabled a test for 14961 - addtask between do_populate_sysroot and do_package breaks useradd class.
A fix is still needed for this.

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agouseradd: Fix issues with useradd dependencies
Eilís 'pidge' Ní Fhlannagáin [Thu, 7 Dec 2023 12:45:32 +0000 (12:45 +0000)] 
useradd: Fix issues with useradd dependencies

If recipe A requires the useradd actions of recipe B we need to
ensure that recipe B is part of the recipe A dependancy chain. In
order to do that, we introduce USERADD_DEPENDS. This makes sure
that the do_populate_sysroot_setscene of recipe B exists for
recipe A in case of a missing TMPDIR. This requires changes made in
runqueue.py by RP.

This commit along with the runqueue fixes effects:
Bug 13419 - recipes that add users to groups cannot rely on other recipes creating those groups (when population from sstate happens)
Bug 13904 - do_prepare_recipe_sysroot: postinst-useradd-* does not run in order of dependency and sometimes fails
Bug 13279 - Make sure users/groups exist for package_write_* tasks
Bug 15084 - For some reason using of same user in two recipes does not work properly

I've included the start of self-testing for useradd by adding tests for
13419 (which ends up testing 13904, 13279, 15084 by virtue of them all
      having the same root cause)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa/runtime/systemd: Ensure test runs only on systemd images
Richard Purdie [Thu, 7 Dec 2023 13:15:01 +0000 (13:15 +0000)] 
oeqa/runtime/systemd: Ensure test runs only on systemd images

When enabled in DISTRO_FEATURES the test may run on a system without systemd.
Fix this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agosstate: Remove unneeded code from setscene_depvalid() related to useradd
Richard Purdie [Wed, 29 Nov 2023 09:33:08 +0000 (09:33 +0000)] 
sstate: Remove unneeded code from setscene_depvalid() related to useradd

With recent changes to runqueue in bitbake, this horrible hack is no longer needed
and we can drop it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agosanity.conf: Require bitbake 2.6.1 for recent runqueue change
Richard Purdie [Wed, 6 Dec 2023 23:35:51 +0000 (23:35 +0000)] 
sanity.conf: Require bitbake 2.6.1 for recent runqueue change

Require the presence of a recent change in bitbake 2.6.1 for runqueue
setscene dependency handling improvements.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agooeqa/selftest/recipetool: stop looking for md5sum
Alexandre Belloni [Fri, 8 Dec 2023 08:26:25 +0000 (09:26 +0100)] 
oeqa/selftest/recipetool: stop looking for md5sum

The md5sum is no longer generated by recipetool, stop expecting it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agocargo: Rename MANIFEST_PATH -> CARGO_MANIFEST_PATH
Alex Kiernan [Thu, 7 Dec 2023 13:39:11 +0000 (13:39 +0000)] 
cargo: Rename MANIFEST_PATH -> CARGO_MANIFEST_PATH

This variable is a piece of recipe configurable interface, scope it with
the class name to make that clear.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 months agodevtool: modify: Make --no-extract work again
Peter Kjellerstedt [Wed, 6 Dec 2023 20:55:31 +0000 (21:55 +0100)] 
devtool: modify: Make --no-extract work again

This avoids the following error when using --no-extract, introduced in
commit 900129cbdf (devtool: add support for git submodules):

  Traceback (most recent call last):
    File ".../scripts/devtool", line 349, in <module>
      ret = main()
    File ".../scripts/devtool", line 336, in main
      ret = args.func(args, config, basepath, workspace)
    File ".../scripts/lib/devtool/standard.py", line 995, in modify
      for commit in commits[name]:
  KeyError: '.'

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>
22 months agodevtool: upgrade: Update all existing checksums for the SRC_URI
Peter Kjellerstedt [Wed, 6 Dec 2023 20:55:30 +0000 (21:55 +0100)] 
devtool: upgrade: Update all existing checksums for the SRC_URI

In addition to updating the sha256sum and removing the md5sum, update
all other existing checksums. If the only existing checksum is md5sum,
then replace it with the default expected checksums (currently only
sha256sum).

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>
22 months agorecipetool: create: Only include the expected SRC_URI checksums
Peter Kjellerstedt [Thu, 7 Dec 2023 17:48:39 +0000 (18:48 +0100)] 
recipetool: create: Only include the expected SRC_URI checksums

Rather than including all SRC_URI checksums, include the ones that are
expected. These are the same as are output if no checksums are included
when building the recipe.

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>
22 months agorecipetool: create: Improve identification of licenses
Peter Kjellerstedt [Wed, 6 Dec 2023 20:55:28 +0000 (21:55 +0100)] 
recipetool: create: Improve identification of licenses

Rather than having a static list of crunched MD5 checksums for some of
the most common licenses, calculate it for all common licenses. This
should improve the identification of license text variantions.

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>
22 months agolib/oe/recipeutils: Avoid wrapping any SRC_URI[sha*sum] variables
Peter Kjellerstedt [Wed, 6 Dec 2023 20:55:27 +0000 (21:55 +0100)] 
lib/oe/recipeutils: Avoid wrapping any SRC_URI[sha*sum] variables

Before, a variable such as SRC_URI[sha512sum] would end up as:

SRC_URI[sha512sum] = "45ff3abce4dab24a8090409e6d7bb26afa7fa7812a51e067 \
28c2aa47d5b4de610d97ba4609cf13d9173087bd909fdf377235eee988a6fdcf52abb7 \
0341c40b5b"

when updated by patch_recipe_lines().

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>
22 months agooeqa/selftest/recipetool: Make test_recipetool_load_plugin more resilient
Peter Kjellerstedt [Wed, 6 Dec 2023 20:55:26 +0000 (21:55 +0100)] 
oeqa/selftest/recipetool: Make test_recipetool_load_plugin more resilient

* Avoid trying to write to read-only directories and file systems.
* Support symbolic links in BBPATH.

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>
22 months agooeqa/selftest/devtool: Make test_devtool_load_plugin more resilient
Peter Kjellerstedt [Wed, 6 Dec 2023 20:55:25 +0000 (21:55 +0100)] 
oeqa/selftest/devtool: Make test_devtool_load_plugin more resilient

* Avoid trying to write to read-only directories and file systems.
* Support symbolic links in BBPATH.

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>
22 months agooeqa/selftest/devtool: Avoid global Git hooks when amending a patch
Peter Kjellerstedt [Wed, 6 Dec 2023 20:55:24 +0000 (21:55 +0100)] 
oeqa/selftest/devtool: Avoid global Git hooks when amending a patch

To avoid potential problems due to global Git hooks, add --no-verify to
a `git commit --amend` command.

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>