]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/log
thirdparty/openembedded/openembedded-core.git
17 months agodevtool: ide-sdk source mapping for vscode
Enguerrand de Ribaucourt [Sun, 25 Feb 2024 20:47:01 +0000 (21:47 +0100)] 
devtool: ide-sdk source mapping for vscode

When launching the debug configuration, the source files from the debug
rootfs were openened in the editor instead of the local workspace files.
We add an exception to properly map them to the file being developed and
compiled by the IDE integration. This also more closely matches what the
user would expect compared to native development.

This is also true for the devtool fallback mode.

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: ide-sdk launch.json per recipe only
Adrian Freihofer [Sun, 25 Feb 2024 20:47:00 +0000 (21:47 +0100)] 
devtool: ide-sdk launch.json per recipe only

If multiple recipes are processed at once, the launch.json and the
tasks.json of the second recipe contains also the configurations for the
binaries of the first recipe.

Example:
  devtool ide-sdk powertop cmake-example oe-selftest-image
generated a launch and a tasks configuration for the cmake-example
recipe which also offers debugging the powertop binary.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agowic: 'empty' plugin: fix typo in comment
Enrico Jörns [Sun, 25 Feb 2024 22:44:28 +0000 (23:44 +0100)] 
wic: 'empty' plugin: fix typo in comment

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoopenssl: Match target name for loongarch64
Xiaotian Wu [Mon, 26 Feb 2024 08:13:37 +0000 (16:13 +0800)] 
openssl: Match target name for loongarch64

This is updated in openssl [1] since opensssl 3.2.0-alpha1 onwards

[1] https://github.com/openssl/openssl/commit/b625e21e67666213ffd3ba6b1f2cd8a847ba6b66

Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooeqa/utils/postactions: testimage: add host disk usage stat as post action
Alexis Lothoré [Mon, 26 Feb 2024 09:19:22 +0000 (10:19 +0100)] 
oeqa/utils/postactions: testimage: add host disk usage stat as post action

Since the target under test can be a virtualized guest, when some tests
fail because of disk usage (see [1]), also fetch disk usage statistics from
host to allow checking whether a host disk space saturation could affect
running tests.

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15220

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooeqa/utils/postactions: add target disk usage stat as post action
Alexis Lothoré [Mon, 26 Feb 2024 09:19:21 +0000 (10:19 +0100)] 
oeqa/utils/postactions: add target disk usage stat as post action

In order to debug issues related to disk space (see [1]),  add a failed
tests post action to retrieve disk usage on the target. Rely on the test
context object to run the corresponding command onto the target

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15220

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooeqa/utils/postactions: isolate directory creation in dedicated action
Alexis Lothoré [Mon, 26 Feb 2024 09:19:20 +0000 (10:19 +0100)] 
oeqa/utils/postactions: isolate directory creation in dedicated action

In order to be able to create actions that could store new files during
failed test post actions, we need to split artifacts directory creation
from artifacts retrieval.

Create a new dedicated action to create artifacts main directory so we can
add actions creating files in this new directory, without worrying about
actions order if at least this action is set first.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agotestimage: create a list of failed test post actions
Alexis Lothoré [Mon, 26 Feb 2024 09:19:19 +0000 (10:19 +0100)] 
testimage: create a list of failed test post actions

testimage is able to detect whenever a test run leads to some tests
failing, and execute some actions in this case. The only action currently
defined in such case is to retrieve artifacts from the target under test,
as listed in TESTIMAGE_FAILED_QA_ARTIFACTS

In order to be able to add multiple actions, define a central function to
gather all "post actions" to run whenever a test has failed
(run_failed_tests_post_actions). This function contains a table listing all
functions to be called whenever a test fails. Any function in this table
will be provided with bitbake internal data dictionary ("d") and the
current runtime testing context ("tc"). Isolate all this feature in a
dedicated postactions.py file inherited by testimage.
This patch does not bring any functional change.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolib/oeqa: share get_json_result_dir helper
Alexis Lothoré [Mon, 26 Feb 2024 09:19:18 +0000 (10:19 +0100)] 
lib/oeqa: share get_json_result_dir helper

Multiple places in oeqa need to get the log output path, and redefine a
small helper to accomplish this

Define this helper in lib/oeqa/utils/__init__.py and import it wherever
needed to allow using it.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoloongarch64: change -march to loongarch64
Xiaotian Wu [Mon, 26 Feb 2024 08:43:35 +0000 (16:43 +0800)] 
loongarch64: change -march to loongarch64

Now both gcc and clang all support -march=loongarch64, so we can use it.

Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agocve-check: Log if CVE_STATUS set but not reported for component uninative-4.4
Simone Weiß [Sat, 24 Feb 2024 08:18:38 +0000 (08:18 +0000)] 
cve-check: Log if CVE_STATUS set but not reported for component

Log if the CVE_STATUS is set for a CVE, but the cve is not reported for a
component. This should hopefully help to clean up not needed CVE_STATUS
settings.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agometa: Update CVE_STATUS for incorrect cpes
Simone Weiß [Sun, 18 Feb 2024 22:32:32 +0000 (22:32 +0000)] 
meta: Update CVE_STATUS for incorrect cpes

Set CVE_STATUS as none of the issues apply against the versions
used in the recipes.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agometa: Remove some not needed CVE_STATUS
Simone Weiß [Fri, 23 Feb 2024 21:31:01 +0000 (21:31 +0000)] 
meta: Remove some not needed CVE_STATUS

CVE_STATUS was set for those components, but meanwhile databases are updated
with corrected information, so setting the CVE_STATUS is not needed anymore.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopatchtest: Skip test for CVE_CHECK_IGNORE for older branches
Simone Weiß [Fri, 23 Feb 2024 21:07:40 +0000 (21:07 +0000)] 
patchtest: Skip test for CVE_CHECK_IGNORE for older branches

Skip the test for checking if CVE_CHECK_IGNORE is not used.
It is deprecated now, but was not deprecated for kirkstone and dunfell.
Skip it therefore if a patch is intended for those branches.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopatchtest: provide further guidance for failed testcases
Simone Weiß [Fri, 23 Feb 2024 20:56:39 +0000 (20:56 +0000)] 
patchtest: provide further guidance for failed testcases

Cross-reference the wiki page on patchtest now that it is updated and contains
more information how to address failed testcases. Adding it in patchtest only
is enough as patchtest-send-result already points to the wikipage for failures.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agokernel.bbclass: Set pkg-config variables for building modules
Munehisa Kamata [Fri, 23 Feb 2024 08:05:13 +0000 (00:05 -0800)] 
kernel.bbclass: Set pkg-config variables for building modules

The pkg-config workaround has been applied for kernel image building, but
not for module building. So pkg-config variables are different between
do_compile and do_compile_kernelmodules tasks. It may unnecessary trigger
rebuilding of a few host tools at the later task.

Especially when CONFIG_DEBUG_INFO_BTF is enabled in the kernel, it may even
trigger rebuilding vmlinux at do_compile_kernelmodules due to the rebuilt
host tools such as certs/extract-cert or objtool (on x86). This eventually
creates an inconsistent set of kernel binaries.

Here is the repro steps:

 - Check out nanbield on x86
   - The unexpected rebuild happens on kirkstone or possibly earlier

 - Ensure that pahole is available (e.g. via meta-oe)

 - Set KERNEL_DEBUG to "True" to properly set up PAHOLE
   e.g.
   $ export KERNEL_DEBUG="True"
   $ export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} KERNEL_DEBUG"

 - Enable CONFIG_DEBUG_INFO_BTF=y
   e.g.
   $ bitbake -c menuconfig virtual/kernel
    -> Kernel hacking
      -> Compile-time checks and compiler options
        -> Generate BTF typeinfo

 - Build the kernel
   e.g.
   $ bitbake virtual/kernel

The BTF information in the resulting bzImage and kernel modules are
inconsistent, because the module's BTF information is generated using the
"second" vmlinux that doesn't have the identical BTF to the "first" vmlinux.
These modules can't be loaded at runtime due to the BTF mismatch.

This also leads to a build-id mismatch between the installed bzImage and
vmlinux since the bzImage is created from the first vmlinux, but the
installed vmlinux is the second one.

  $ eu-readelf -n tmp/work/qemux86_64-poky-linux/linux-yocto/6.5.13+git/image/boot/{bzImage*,vmlinux*} | grep "Build ID"
   Build ID: 4a0d62ee7fef0244950f0f604253729875bea493
   Build ID: fb99b3d91399dbe42bf67ddee59e0f5a0c7f74d9

To avoid the unexpected rebuilding that results in such inconsistency, set
the same pkg-config variables when building kernel and modules. For kernel
5.19 and above, simply set the HOSTPKG_CONFIG in the make command line.

Signed-off-by: Munehisa Kamata <kamatam@amazon.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agogo: update 1.20.13 -> 1.20.14
Jose Quaresma [Fri, 23 Feb 2024 11:39:43 +0000 (11:39 +0000)] 
go: update 1.20.13 -> 1.20.14

Upgrade to latest 1.20.x release [1]:

$ git log --oneline go1.20.13..go1.20.14
90a870f1dc (tag: go1.20.14, origin/release-branch.go1.20) [release-branch.go1.20] go1.20.14
a2f4a5a6e7 [release-branch.go1.20] Revert "crypto/internal/boring: upgrade module to fips-20220613" +1
746a072791 [release-branch.go1.20] crypto/x509: properly gate test on macos version
d7df7f4fa0 [release-branch.go1.20] runtime: properly model rwmutex in lock ranking

$ git log --oneline go1.20.13..go1.20.14

[1] https://github.com/golang/go/compare/go1.20.13...go1.20.14

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: ide-sdk python 3.12 escaping
Adrian Freihofer [Thu, 22 Feb 2024 18:14:14 +0000 (19:14 +0100)] 
devtool: ide-sdk python 3.12 escaping

scripts/lib/devtool/ide_sdk.py:709: SyntaxWarning: invalid escape sequence '\.'
  re_so = re.compile('.*\.so[.0-9]*$')

scripts/lib/devtool/ide_plugins/__init__.py:87: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "test -f \$TEMP_DIR/pid && exit 0; "

scripts/lib/devtool/ide_plugins/__init__.py:88: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "mkdir -p \$TEMP_DIR; "

scripts/lib/devtool/ide_plugins/__init__.py:89: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "%s --multi :%s > \$TEMP_DIR/log 2>&1 & " % (

scripts/lib/devtool/ide_plugins/__init__.py:91: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "echo \$! > \$TEMP_DIR/pid;"

scripts/lib/devtool/ide_plugins/__init__.py:94: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_stop += "test -f \$TEMP_DIR/pid && kill \$(cat \$TEMP_DIR/pid); "

scripts/lib/devtool/ide_plugins/__init__.py:95: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_stop += "rm -rf \$TEMP_DIR; "

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agobluez5: remove configuration files from install task
Emil Kronborg [Thu, 22 Feb 2024 19:44:59 +0000 (19:44 +0000)] 
bluez5: remove configuration files from install task

Since be0e796299b0 ("build: ship all config files with
--enable-datafiles") in bluez, installing input.conf and network.conf
has been redundant, as the bluez5 recipe already includes
--enable-datafiles.

Signed-off-by: Emil Kronborg <emil.kronborg@protonmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agobind: Upgrade 9.18.21 -> 9.18.24
Soumya Sambu [Fri, 23 Feb 2024 06:19:12 +0000 (06:19 +0000)] 
bind: Upgrade 9.18.21 -> 9.18.24

Changelog:
=========
9.18.24:
- Fix case insensitive setting for isc_ht hashtable.
[GL #4568]

9.18.23:
- Specific DNS answers could cause a denial-of-service
condition due to DNS validation taking a long time.
(CVE-2023-50387) [GL #4424]
- Change 6315 inadvertently introduced regressions that
could cause named to crash. [GL #4234]
- Under some circumstances, the DoT code in client
mode could process more than one message at a time when
that was not expected. That has been fixed. [GL #4487]

9.18.22:
- Limit isc_task_send() overhead for RBTDB tree pruning.
[GL #4383]
- Restore DNS64 state when handling a serve-stale timeout.
(CVE-2023-5679) [GL #4334]
- Specific queries could trigger an assertion check with
nxdomain-redirect enabled. (CVE-2023-5517) [GL #4281]
- Speed up parsing of DNS messages with many different
names. (CVE-2023-4408) [GL #4234]
- Address race conditions in dns_tsigkey_find().
[GL #4182]
- Conversion from NSEC3 signed to NSEC signed could
temporarily put the zone into a state where it was
treated as unsigned until the NSEC chain was built.
Additionally conversion from one set of NSEC3 parameters
to another could also temporarily put the zone into a
state where it was treated as unsigned until the new
NSEC3 chain was built. [GL #1794] [GL #4495]
- Memory leak in zone.c:sign_zone. When named signed a
zone it could leak dst_keys due to a misplaced
'continue'. [GL #4488]
- Log more details about the cause of "not exact" errors.
[GL #4500]
- The wrong time was being used to determine what RRSIGs
where to be generated when dnssec-policy was in use.
[GL #4494]
- The "trust-anchor-telemetry" statement is no longer
marked as experimental. This silences a relevant log
message that was emitted even when the feature was
explicitly disabled. [GL #4497]
- Fix statistics export to use full 64 bit signed numbers
instead of truncating values to unsigned 32 bits.
[GL #4467]
- NetBSD has added 'hmac' to libc which collides with our
use of 'hmac'. [GL #4478]

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agowic: allow imager-specific filename extensions
Trevor Woerner [Fri, 23 Feb 2024 00:55:27 +0000 (19:55 -0500)] 
wic: allow imager-specific filename extensions

Currently there is only one defined imager as part of oe-core's wic
implementation: 'direct'. However, having a highly plugin-based design,
wic allows users to define their own imagers (and sources).

Therefore don't hard-code the filename extension of the imager output to
be 'direct' (i.e. the default imager). Allow the extension to follow the
name of the imager being used.

A user can specify a custom imager via the WIC_CREATE_EXTRA_ARGS variable.
If the user does not specify an imager, then 'direct' is assumed.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoglibc-locale: add an explicit dedicated package for locale.alias file
Jonathan GUILLOT [Fri, 23 Feb 2024 09:51:45 +0000 (09:51 +0000)] 
glibc-locale: add an explicit dedicated package for locale.alias file

Until now, ${datadir}/locale/locale.alias file were automatically added
to a weird glibc-locale-locale.alias package by split_locales() during
do_package task.
Create an explicit package name in recipe for this file.

Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolib/oe/package: fix LOCALE_PATHS scan to create locale packages
Jonathan GUILLOT [Mon, 19 Feb 2024 16:19:28 +0000 (16:19 +0000)] 
lib/oe/package: fix LOCALE_PATHS scan to create locale packages

split_locales() must only check subdirectories in paths added to
LOCALE_PATHS to avoid creating weird packages based on filenames also
present in paths.

Without such a filter, cups recipe adding ${datadir}/cups/templates to
LOCALE_PATHS creates the following incorrect packages:
- cups-locale-add-class.tmpl
- cups-locale-add-printer.tmpl
- cups-locale-admin.tmpl

Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoselftest-users: Convoluted selftest for USERADD_DEPENDS
Eilís 'pidge' Ní Fhlannagáin [Fri, 23 Feb 2024 13:25:21 +0000 (13:25 +0000)] 
selftest-users: Convoluted selftest for USERADD_DEPENDS

This adds a test for 13904's fix by creating a convoluted set of recipes
with USERADD_DEPENDS in non-alpha order.

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agouseradd.bbclass: Fix order of postinst-useradd-*
Piotr Łobacz [Fri, 23 Feb 2024 13:25:20 +0000 (13:25 +0000)] 
useradd.bbclass: Fix order of postinst-useradd-*

postinst-useradd-* haven't been running in order of dependency.

This patch is reworked from Piotr Łobacz's patch and fixes:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=15084
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13904

basepasswd_sysroot_postinst in base-passwd can install postinst-useradd-*
scripts with any order. Sometimes this means, for example a useradd postinst
will attempt to run without the corresponding group postinst causing errors.
This patch ensures that we first run groupadd, then useradd and then
group membership.

[RP: Tweaked to avoid removing previous fixes and for whitespace/style issues
     Also ensure the scripts are changed to execute with -e to highlight errors]

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
Signed-off-by: Jan Górski <j.gorski@welotec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agorecipetool: Fix errors with meta-poky bbappend
Richard Purdie [Thu, 22 Feb 2024 17:20:59 +0000 (17:20 +0000)] 
recipetool: Fix errors with meta-poky bbappend

When a new base-files bbappend was added to meta-poky, it causes selftest
failures. Whilst this isn't ideal, workaround that issue for now since
the append is being added for security visibility and changing the tests
to support this more generically looks invasive.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agocreategroup*: Remove coreutils-native as a DEPENDS
Eilís 'pidge' Ní Fhlannagáin [Thu, 22 Feb 2024 14:53:56 +0000 (14:53 +0000)] 
creategroup*: Remove coreutils-native as a DEPENDS

There isn't any reason for coreutils-native as a DEPENDS, so
remove it to speed up tests.

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoRevert "meson: use absolute cross-compiler paths"
Enguerrand de Ribaucourt [Thu, 22 Feb 2024 10:29:56 +0000 (11:29 +0100)] 
Revert "meson: use absolute cross-compiler paths"

This reverts commit fc8e5d7c13f62e987b76971116cf290fd01a0c8f.

We need to use the absolute path to the compiler so that the VSCode
configuration generated by devtool ide-sdk could lint meson projects.

A feature was just added to vscode-cpptools to support conveying the
compilerPath in addition to the compile_commands.json. The next
commits adds the necessary configuration. We can revert this one and
keep the meson paths as they were.

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: ide: define compilerPath for meson projects
Enguerrand de Ribaucourt [Thu, 22 Feb 2024 10:29:55 +0000 (11:29 +0100)] 
devtool: ide: define compilerPath for meson projects

The compile_commands.json file output by meson uses the compiler as if
present in the $PATH. However, when using an IDE, the $PATH used by
bitbake is not there.

The vscode-cpptools now allows to define the compilerPath in addition
to replace the one from compile_commands.json.

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolinux-yocto: Remove unused patch
Khem Raj [Wed, 21 Feb 2024 18:16:59 +0000 (10:16 -0800)] 
linux-yocto: Remove unused patch

This patch remained after bumping from 6.1 to 6.6

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooeqa/selftest/rust: Simplify the rust testsuite output gathering/processing
Richard Purdie [Wed, 21 Feb 2024 13:14:58 +0000 (13:14 +0000)] 
oeqa/selftest/rust: Simplify the rust testsuite output gathering/processing

The rust testsuite was redirecting command output to a file, which made it
hard to debug failure cases since the logs were not available to print to
the console.

Rework the code so it uses the existing popen logging and hence allows us
to improve the error logging situation and make debugging failures easier.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agosystemd-systemctl: fix dead loop when multi services enable each other
Xiangyu Chen [Wed, 21 Feb 2024 07:29:42 +0000 (15:29 +0800)] 
systemd-systemctl: fix dead loop when multi services enable each other

libvirt has added a feature that all sockets for a service being enabled when a single
one of them is enabled since 9.9.x[1], it likes serviceA enable serviceB, serviceB enable
serviceA, that cause our systemctl script trap into a dead loop in postinstall stage,
the error message as below:

Traceback (most recent call last):
  File "/usr/lib/python3.8/pathlib.py", line 722, in __str__
    return self._str
AttributeError: _str

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
    SystemdUnit(self.root, also).enable(unit)
  File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
    SystemdUnit(self.root, also).enable(unit)
  File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
    SystemdUnit(self.root, also).enable(unit)
  [Previous line repeated 988 more times]
......
RecursionError: maximum recursion depth exceeded while calling a Python object

Here using an array to record the services which has been enabled to filter the duplicates.

Ref:
[1] https://github.com/libvirt/libvirt/commit/826931e95a38af8322f8ad069dc89117c6404a00

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoncurses: Always pass -D_GNU_SOURCE
Khem Raj [Wed, 21 Feb 2024 01:58:19 +0000 (17:58 -0800)] 
ncurses: Always pass -D_GNU_SOURCE

So far it was assumed that it was detected ok for target recipe but
actually it ends up with warnings and build moves on, however with
gcc-14 these warnings are treated as errors and we see the problem even
with target recipes.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoqemuboot: predictable network interface names
Joe Slater [Wed, 21 Feb 2024 00:04:17 +0000 (16:04 -0800)] 
qemuboot: predictable network interface names

Allow interface renaming if 'pni-names' is a distro
feature.

We do not add QB_NO_PNI to QB_CMDLINE_IP_SLIRP because
renaming was never suppressed for slirp.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodbus: disable assertions and enable only modular tests
Alexander Kanavin [Tue, 20 Feb 2024 19:55:04 +0000 (20:55 +0100)] 
dbus: disable assertions and enable only modular tests

There was a report that enabling assertions and all tests results in
notices in log.do_configure:

NOTE: building with unit tests increases the size of the installed library and renders it insecure.
NOTE: building with assertions increases library size and decreases performance.

This was overlooked when dbus and dbus-tests recipes were merged;
enabling all tests and assertions still requires a special, separate
build of dbus. If those tests are useful this could be revisited.
Until then, we should use productions settings for the main recipe.

Buildhistory-diff:
packages/core2-64-poky-linux/dbus/dbus-dbg: PKGSIZE changed from 9958176 to 8627824 (-13%)
packages/core2-64-poky-linux/dbus/dbus-lib: PKGSIZE changed from 544347 to 346339 (-36%)
packages/core2-64-poky-linux/dbus/dbus-ptest: PKGSIZE changed from 3524983 to 3116951 (-12%)
packages/core2-64-poky-linux/dbus/dbus-ptest: FILELIST: removed "/usr/share/installed-tests/dbus/test-dbus-launch-eval.sh_with_config.test /usr/share/installed-tests/dbus/test-counter_with_config.test /usr/libexec/installed-tests/dbus/test-dbus-launch-eval.sh /usr/libexec/installed-tests/dbus/test-dbus-launch-x11.sh /usr/share/installed-tests/dbus/test-counter.test /usr/libexec/installed-tests/dbus/test-counter /usr/share/installed-tests/dbus/test-dbus-launch-x11.sh.test /usr/share/installed-tests/dbus/test-dbus-launch-x11.sh_with_config.test /usr/share/installed-tests/dbus/test-dbus-launch-eval.sh.test"
packages/core2-64-poky-linux/dbus/dbus: PKGSIZE changed from 510939 to 350331 (-31%)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolinux-yocto/6.6: update CVE exclusions
Bruce Ashfield [Wed, 21 Feb 2024 02:18:37 +0000 (21:18 -0500)] 
linux-yocto/6.6: update CVE exclusions

Data pulled from: https://github.com/nluedtke/linux_kernel_cves

    1/1 [
        Author: Nicholas Luedtke
        Email: nicholas.luedtke@uwalumni.com
        Subject: Update 9Feb24
        Date: Fri, 9 Feb 2024 18:02:45 -0500

    ]

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolinux-yocto/6.6: update to v6.6.17
Bruce Ashfield [Wed, 21 Feb 2024 02:18:36 +0000 (21:18 -0500)] 
linux-yocto/6.6: update to v6.6.17

Updating linux-yocto/6.6 to the latest korg -stable release that comprises
the following commits:

    b2c9bf06474e Linux 6.6.17
    b734f7a47aeb netfilter: nft_set_rbtree: skip end interval element from gc
    d850a1f8dbbe net: stmmac: xgmac: fix a typo of register name in DPP safety handling
    2fbdc116640f ALSA: usb-audio: Sort quirk table entries
    460951a8e502 net: stmmac: xgmac: use #define for string constants
    22ccf61c336e io_uring/net: limit inline multishot retries
    7cbd3aa59db5 io_uring/poll: add requeue return code from poll multishot handling
    eac52bfe2333 io_uring/net: un-indent mshot retry path in io_recv_finish()
    0848bf7e539a io_uring/poll: move poll execution helpers higher up
    0ceb7a9230d6 io_uring/net: fix sr->len for IORING_OP_RECV with MSG_WAITALL and buffers
    7a62d444a252 media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)
    d41ba25cb8b6 Revert "ASoC: amd: Add new dmi entries for acp5x platform"
    ac589a37bc0c Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
    38d4dfeb0a8d Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
    4abccba26f63 hrtimer: Report offline hrtimer enqueue
    f0b1398669a3 usb: dwc3: pci: add support for the Intel Arrow Lake-H
    f5e7ffa9269a xhci: handle isoc Babble and Buffer Overrun events properly
    b5595a07ce1b xhci: process isoc TD properly when there was a transaction error mid TD.
    a78f36f39a76 usb: host: xhci-plat: Add support for XHCI_SG_TRB_CACHE_SIZE_QUIRK
    b3e8e687d2db usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK
    2aed1b6c33af x86/lib: Revert to _ASM_EXTABLE_UA() for {get,put}_user() fixups
    7add0db9543e Revert "usb: typec: tcpm: fix cc role at port reset"
    2d744a0cf852 USB: serial: cp210x: add ID for IMST iM871A-USB
    4d53c5124b82 USB: serial: option: add Fibocom FM101-GL variant
    1f2c1cf43e88 USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e
    dbeb9bf62c95 ALSA: usb-audio: add quirk for RODE NT-USB+
    49ab71ba24b3 ALSA: usb-audio: Add a quirk for Yamaha YIT-W12TX transmitter
    790053c73394 ALSA: usb-audio: Add delay quirk for MOTU M Series 2nd revision
    27b216130e64 blk-iocost: Fix an UBSAN shift-out-of-bounds warning
    89b00dc3d6bb riscv: declare overflow_stack as exported from traps.c
    bc401f796061 riscv: Fix arch_hugetlb_migration_supported() for NAPOT
    da9c33a70f09 libceph: just wait for more data to be available on the socket
    90731f99f8c1 libceph: rename read_sparse_msg_*() to read_partial_sparse_msg_*()
    f4b69db0efca riscv: Flush the tlb when a page directory is freed
    aceb4ab9689b scsi: core: Move scsi_host_busy() out of host lock if it is for per-command
    d0d1f9a9b937 riscv: Fix hugetlb_mask_last_page() when NAPOT is enabled
    21dba4e4f071 riscv: Fix set_huge_pte_at() for NAPOT mapping
    d37708448b13 riscv: mm: execute local TLB flush after populating vmemmap
    c4a05cf0ed78 mm: Introduce flush_cache_vmap_early()
    9bf829def8cf riscv: Improve flush_tlb_kernel_range()
    53a38f8f75ec riscv: Make __flush_tlb_range() loop over pte instead of flushing the whole tlb
    72afe05d6265 riscv: Improve tlb_flush()
    fb7bcd1722bc fs/ntfs3: Fix an NULL dereference bug
    bab2fb9d6b67 netfilter: nft_set_pipapo: remove scratch_aligned pointer
    9af9079ca1fd netfilter: nft_set_pipapo: add helper to release pcpu scratch area
    e96795240aec netfilter: nft_set_pipapo: store index in scratch maps
    28c5407cd2e4 netfilter: nft_ct: reject direction for ct id
    cd9bd10c59e3 drm/amd/display: Implement bounds check for stream encoder creation in DCN301
    3f3c237a7065 drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_pipe()'
    2e150ccea131 drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlight_level()'
    a600c1ebc464 netfilter: nft_compat: restrict match/target protocol to u16
    b3f2e143eb30 netfilter: nft_compat: reject unused compat flag
    6a64b8293506 netfilter: nft_compat: narrow down revision to unsigned 8-bits
    84bfcb7774b6 selftests: cmsg_ipv6: repeat the exact packet
    7e5ef4967076 ppp_async: limit MRU to 64K
    b74aa9ce13d0 af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.
    888e3524be87 tipc: Check the bearer type before calling tipc_udp_nl_bearer_add()
    94cac7da5889 selftests: net: let big_tcp test cope with slow env
    024b25117511 rxrpc: Fix counting of new acks and nacks
    2868b8e45a89 rxrpc: Fix response to PING RESPONSE ACKs to a dead call
    200cb50b9e15 rxrpc: Fix delayed ACKs to not set the reference serial number
    2c9dc472e66f rxrpc: Fix generation of serial numbers to skip zero
    41d5340cb01e drm/i915/gvt: Fix uninitialized variable in handle_mmio()
    4a5e31bdd3c1 inet: read sk->sk_family once in inet_recv_error()
    2109eb2d6aaa hwmon: (coretemp) Fix bogus core_id to attr name mapping
    853a6503c586 hwmon: (coretemp) Fix out-of-bounds memory access
    c9b0d253f1ab hwmon: (aspeed-pwm-tacho) mutex for tach reading
    76ce07eb215d octeontx2-pf: Fix a memleak otx2_sq_init
    f9d5410d8f1b atm: idt77252: fix a memleak in open_card_ubr0
    510c869ffa40 tunnels: fix out of bounds access when building IPv6 PMTU error
    10db3a7e54e2 tsnep: Fix mapping for zero copy XDP_TX action
    9ecd0d78ead2 selftests: net: avoid just another constant wait
    4bd05772c7dc selftests: net: fix tcp listener handling in pmtu.sh
    1000bd0afca1 selftests/net: change shebang to bash to support "source"
    9cf2d6d71bee selftests/net: convert pmtu.sh to run it in unique namespace
    7be281a41111 selftests/net: convert unicast_extensions.sh to run it in unique namespace
    104ab0e82134 selftests: net: cut more slack for gro fwd tests.
    004fe5b7f592 net: atlantic: Fix DMA mapping for PTP hwts ring
    6eecddd9c3c8 netdevsim: avoid potential loop in nsim_dev_trap_report_work()
    4571767d66d6 wifi: brcmfmac: Adjust n_channels usage for __counted_by
    3da5fdb61ae9 wifi: iwlwifi: exit eSR only after the FW does
    733031cd485c wifi: mac80211: fix waiting for beacons logic
    fc3432ae8232 wifi: mac80211: fix RCU use in TDLS fast-xmit
    7e0ff50131e9 net: stmmac: xgmac: fix handling of DPP safety error for DMA channels
    0e7ca435c574 x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR
    c756fd5d460b x86/efistub: Give up if memory attribute protocol returns an error
    79592a6e7bdc drm/msm/dpu: check for valid hw_pp in dpu_encoder_helper_phys_cleanup
    1449c75720e8 drm/msm/dp: return correct Colorimetry for DP_TEST_DYNAMIC_RANGE_CEA case
    1506145c2cd5 drm/msms/dp: fixed link clock divider bits be over written in BPC unknown case
    05955a703b75 xfs: respect the stable writes flag on the RT device
    d7d5ed65364c xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags
    3581868f51a2 xfs: dquot recovery does not validate the recovered dquot
    d744e578802a xfs: clean up dqblk extraction
    b28b234276a8 xfs: inode recovery does not validate the recovered inode
    5411625f8dde xfs: fix again select in kconfig XFS_ONLINE_SCRUB_STATS
    0838177b012b xfs: fix internal error from AGFL exhaustion
    c86562e6918a xfs: up(ic_sema) if flushing data device fails
    767a94d81616 xfs: only remap the written blocks in xfs_reflink_end_cow_extent
    005be6684225 xfs: abort intent items when recovery intents fail
    23f3d79fc983 xfs: factor out xfs_defer_pending_abort
    d7d84772c3f0 xfs: allow read IO and FICLONE to run concurrently
    d4eba134c509 xfs: handle nimaps=0 from xfs_bmapi_write in xfs_alloc_file_space
    47b07e51d0c2 xfs: introduce protection for drop nlink
    0fbbfe5fbfbe xfs: make sure maxlen is still congruent with prod when rounding down
    e3aca4536b6b xfs: fix units conversion error in xfs_bmap_del_extent_delay
    fe327b8234d4 xfs: rt stubs should return negative errnos when rt disabled
    6a6bb41b31df xfs: prevent rt growfs when quota is enabled
    e820b13ba866 xfs: hoist freeing of rt data fork extent mappings
    195f22386e19 xfs: bump max fsgeom struct version
    c778631b4abc MAINTAINERS: add Catherine as xfs maintainer for 6.6.y
    73596f5ab35f rust: upgrade to Rust 1.73.0
    aacae44644fb rust: print: use explicit link in documentation
    e8e7a528220a rust: task: remove redundant explicit link
    9b33bb254d1b rust: upgrade to Rust 1.72.1
    31a254f6920a rust: arc: add explicit `drop()` around `Box::from_raw()`
    cff97d683a08 cifs: failure to add channel on iface should bump up weight
    fb708025b1f1 cifs: avoid redundant calls to disable multichannel
    14ef61594a5a phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP
    9851389b1c39 dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV
    f7799ecf30be perf evlist: Fix evlist__new_default() for > 1 core PMU
    6f67140cf7e1 phy: renesas: rcar-gen3-usb2: Fix returning wrong error code
    5cd8a51517ce dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA
    df6a1dc71c1d dmaengine: fsl-qdma: Fix a memory leak related to the status queue DMA
    43ad9840c123 dmaengine: ti: k3-udma: Report short packet errors
    f24ba6f9f741 dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools
    ea42d6cffb0d ext4: regenerate buddy after block freeing failed if under fc replay

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agotestimage: log exception when failing to retrieve artifacts
Alexis Lothoré [Tue, 20 Feb 2024 13:33:12 +0000 (14:33 +0100)] 
testimage: log exception when failing to retrieve artifacts

Despite managing to retrieve the failed ptests artifacts, testimage seems
to dump some retrieval errors like the following one:

WARNING: core-image-ptest-valgrind-1.0-r0 do_testimage: Can not retrieve
/usr/lib/valgrind/ptest from test target

Log the corresponding exception to help analyzing such issue

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolttng-ust: Upgrade 2.13.6 -> 2.13.7
Richard Purdie [Tue, 20 Feb 2024 12:22:01 +0000 (12:22 +0000)] 
lttng-ust: Upgrade 2.13.6 -> 2.13.7

Update one of the patches to account for upstream changes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agonumactl: Upgrade 2.0.17 -> 2.0.18
Richard Purdie [Tue, 20 Feb 2024 12:13:35 +0000 (12:13 +0000)] 
numactl: Upgrade 2.0.17 -> 2.0.18

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooverlayfs: add missing vardeps
Christoph Vogtländer [Tue, 20 Feb 2024 11:28:26 +0000 (12:28 +0100)] 
overlayfs: add missing vardeps

Fixes [YOCTO #15120]

Consider OVERLAYFS_WRITABLE_PATHS as dependecy of do_create_overlayfs_units() in
order to rebuild the recipe when changing the used mount point.

Tested in a local recipe by changing the used mount point and verified that the
recipe was re-build: passed

Signed-off-by: Christoph Vogtländer <christoph.vogtlaender@loewensteinmedical.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agomeson: use absolute cross-compiler paths
Enguerrand de Ribaucourt [Mon, 19 Feb 2024 16:55:24 +0000 (17:55 +0100)] 
meson: use absolute cross-compiler paths

Among the files generated by meson is compile_commands.json. It is not
used by bitbake during the build. However, if the devtool workspace is
opened inside an IDE, that IDE can use compile_commands.json to
configure linting and code completion. This is notably relied on by the
new devtool ide-sdk command.

The problem is that the IDE using compile_commands.json does not know
the $PATH set-up by bitbake, so it won't find the compiler. This results
in linting errors, like missing headers. We can fix this by expliciting
the absolute compiler paths in meson.cross.

The compile_commands.json specification expressly states:
"All paths specified in the command or file fields must be either
absolute or relative to this directory."
Link: https://clang.llvm.org/docs/JSONCompilationDatabase.html
An alternative way to implement this is to directly change CXX inside
bitbake.conf to make all recipes use absolute compiler paths.Since this
would affect all recipes, so I would like to have the maintainers'
opinion on this. It could make sense to use absolute compiler paths for
all toolchain binaries, we already do so for the sysroot
TOOLCHAIN_OPTIONS.

Discussions have been opened with meson/ninja maintainers to implement
this at their level:
 - https://github.com/ninja-build/ninja/issues/2383
 - https://github.com/mesonbuild/meson/issues/12834
These tools have even less information on the environment so it makes
sense for Yocto to provide the absolute paths.

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: ide: vscode: Configure read-only files
Enguerrand de Ribaucourt [Mon, 19 Feb 2024 16:55:23 +0000 (17:55 +0100)] 
devtool: ide: vscode: Configure read-only files

When debugging or browsing files, the user may fall into external
sources from other packages in the sysroot or dbg-rootfs. Modifying them
will only lead to confusion since they will be overwritten by Yocto. The
user should open them in a separate devtool modify session if they want
to make changes. Meanwhile, we should prevent write access to them.

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: ide_sdk: Use bitbake's python3 for generated scripts
Enguerrand de Ribaucourt [Mon, 19 Feb 2024 16:55:21 +0000 (17:55 +0100)] 
devtool: ide_sdk: Use bitbake's python3 for generated scripts

The generated scripts use the sys.path configuration found inside
bitbake. It can be a different python version than the one used on the
host through the IDE.

For instance, when running the generated script
deploy_target_cmake-example-core2-64 from an eSDK generated on another
machine, I got the following exception:
    AssertionError: SRE module mismatch

We need to match the sys.executable to the sys.path.

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agobash: rebase the patch to fix ptest failure
Xiangyu Chen [Tue, 20 Feb 2024 03:46:48 +0000 (11:46 +0800)] 
bash: rebase the patch to fix ptest failure

This fix commit oe-core: 1b69769b -- bash: changes to SIGINT handler while waiting for a child

Due to the patch adjust and drop some codes to be applicable the tree,
the line number has been changed, that cause test case "run-type" fail.

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolibsdl2: upgrade 2.28.5 -> 2.30.0
Yi Zhao [Tue, 20 Feb 2024 04:40:45 +0000 (12:40 +0800)] 
libsdl2: upgrade 2.28.5 -> 2.30.0

License-Update: Copyright year updated to 2024.

ChangeLog (https://github.com/libsdl-org/SDL/releases/tag/release-2.30.0):
* Added support for 2 bits-per-pixel indexed surface formats
* Added the function SDL_GameControllerGetSteamHandle() to get the Steam
  API handle for a controller, if available
* Added the event SDL_CONTROLLERSTEAMHANDLEUPDATED which is sent when
  the Steam API handle for a controller changes. This could also change
  the name, VID, and PID of the controller.
* Added the environment variable SDL_LOGGING to control default log
  output

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoinsane.bbclass: Allow the warning about virtual/ to be disabled
Peter Kjellerstedt [Mon, 22 Jan 2024 05:52:32 +0000 (06:52 +0100)] 
insane.bbclass: Allow the warning about virtual/ to be disabled

Commit f673d3d239799fb1ab50f4aa5d44187666aa0cd7 introduced a warning for
virtual/ being used in RPROVIDES and RDEPENDS. Make it possible to
disable the warning by removing "virtual-slash from WARN_QA.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agorecipetool; add support for python_mesonpy class
Tim Orling [Mon, 19 Feb 2024 17:30:24 +0000 (09:30 -0800)] 
recipetool; add support for python_mesonpy class

* Add support to detect the "mesonpy" build-backend for recipetool create.
* Add oe-selftest case for creating a recipe for "siphash24" from pypi.
  https://pypi.org/project/siphash24/

This is by far the simplest recipe using the mesonpy build backend.

Upstream does not provide LICENSE file(s) and we do not detect the
LICENSE so don't check for that result in the test. Likewise, upstream
does not define HOMEPAGE, so skip that result.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopython_mesonpy.bbclass: move from meta-python
Tim Orling [Mon, 19 Feb 2024 17:30:22 +0000 (09:30 -0800)] 
python_mesonpy.bbclass: move from meta-python

Move the PEP-517 back-end bbclass from meta-python to support:

[build-system]
build-backend = "mesonpy"

This is the declared backend in python3-numpy since:
https://github.com/numpy/numpy/commit/942fb8caf33a65e449fbf198ecf1cd39be953248

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopython3-meson-python: move from meta-python
Tim Orling [Mon, 19 Feb 2024 17:30:21 +0000 (09:30 -0800)] 
python3-meson-python: move from meta-python

meson-python is a Python build backend built on top of the Meson
build-system. It enables you to use Meson for your Python packages.

https://meson-python.readthedocs.io/en/latest/

It is used as the PEP-517 build-backend for python3-numpy and python3-scipy.

For other projects using the backend, see:
https://meson-python.readthedocs.io/en/latest/projects-using-meson-python.html

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopython3-pyproject-metadata: HOMEPAGE; DESCRIPTION
Tim Orling [Mon, 19 Feb 2024 23:49:03 +0000 (15:49 -0800)] 
python3-pyproject-metadata: HOMEPAGE; DESCRIPTION

Add HOMEPAGE and DESCRIPTION that were missing in
the original recipe in meta-python

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopython3-pyproject-metadata: move from meta-python
Tim Orling [Mon, 19 Feb 2024 21:26:45 +0000 (13:26 -0800)] 
python3-pyproject-metadata: move from meta-python

This is a dependency for python3-meson-python.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopython: Drop ${PYTHON_PN}
Richard Purdie [Mon, 19 Feb 2024 16:07:55 +0000 (16:07 +0000)] 
python: Drop ${PYTHON_PN}

python 2 is gone and we don't need the abstraction now, drop the remaining usage
of this variable.

The definition in python3-dir.bbclass is left for now for other layers.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolib/oe/patch: Use git notes to store the filenames for the patches
Peter Kjellerstedt [Mon, 19 Feb 2024 01:28:32 +0000 (02:28 +0100)] 
lib/oe/patch: Use git notes to store the filenames for the patches

The old way of keeping track of the filenames for the patches that
correspond to the commits was to add a special comment line to the end
of the commit message, e.g., "%% original patch: <filename>", using a
temporary git hook. This method had some drawbacks, e.g.:

* It caused problems if one wanted to push the commits upstream as the
  comment line had to be manually removed.
* The comment line would end up in patches if someone used git
  format-path rather than devtool finish to generate the patches.
* The comment line could interfere with global Git hooks used to
  validate the format of the Git commit message.
* When regenerating patches with `devtool finish --force-patch-refresh`,
  the process typically resulted in adding empty lines to the end of the
  commit messages in the updated patches.

A better way of keeping track of the patch filenames is to use Git
notes. This way the commit messages remain unaffected, but the
information is still shown when, e.g., doing `git log`. A special Git
notes space, refs/notes/devtool, is used to not intefere with the
default Git notes. It is configured to be shown in, e.g., `git log` and
to survive rewrites (i.e., `git commit --amend` and `git rebase`).

Since there is no longer any need for a temporary Git hook, the code
that manipulated the .git/hooks directory has also been removed. To
avoid potential problems due to global Git hooks, --no-verify was added
to the `git commit` command.

To not cause troubles for those who have done `devtool modify` for a
recipe with the old solution and then do `devtool finish` with the new
solution, the code will fall back to look for the old strings in the
commit message if no Git note can be found.

While not technically motivated like above, the way to keep track of
ignored commits is also changed to use Git notes to avoid having
different methods to store similar information.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopatch.bbclass: Make use of oe.patch.GitApplyTree.commitIgnored()
Peter Kjellerstedt [Mon, 19 Feb 2024 01:28:31 +0000 (02:28 +0100)] 
patch.bbclass: Make use of oe.patch.GitApplyTree.commitIgnored()

This makes use of the oe.patch.GitApplyTree.commitIgnored() function to
create commits that shall be ignored by `devtool finish`.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: Make use of oe.patch.GitApplyTree.commitIgnored()
Peter Kjellerstedt [Mon, 19 Feb 2024 01:28:30 +0000 (02:28 +0100)] 
devtool: Make use of oe.patch.GitApplyTree.commitIgnored()

This makes use of the oe.patch.GitApplyTree.commitIgnored() function to
create commits that shall be ignored by `devtool finish`.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolib/oe/patch: Add GitApplyTree.commitIgnored()
Peter Kjellerstedt [Mon, 19 Feb 2024 01:28:29 +0000 (02:28 +0100)] 
lib/oe/patch: Add GitApplyTree.commitIgnored()

This function can be used to create a commit that devtool will ignore
when creating/updating the patches.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolib/oe/patch: Make extractPatches() not extract ignored commits
Peter Kjellerstedt [Mon, 19 Feb 2024 01:28:28 +0000 (02:28 +0100)] 
lib/oe/patch: Make extractPatches() not extract ignored commits

If a commit is marked with "%% ignore" it means it is used by devtool to
keep track of changes to the source code that are not the result of
running do_patch(). These changes need to actually be ignored when
extracting the patches as they typically make no sense as actual patches
in a recipe.

This also adds a new test for oe-selftest that verifies that there are
no patches generated from ignored commits.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoswig: upgrade 4.1.1 -> 4.2.0
Anuj Mittal [Fri, 16 Feb 2024 11:40:32 +0000 (19:40 +0800)] 
swig: upgrade 4.1.1 -> 4.2.0

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooverlayfs-etc: add option to skip creation of mount dirs
baruch@tkos.co.il [Mon, 12 Feb 2024 18:30:06 +0000 (20:30 +0200)] 
overlayfs-etc: add option to skip creation of mount dirs

The 'preinit' script can't create mount directories when rootfs is
read-only. Add an option to skip this step. The user must make sure that
all required directories are already in the rootfs directory layout.

Cc: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agoell: update 0.61 -> 0.62
Markus Volk [Mon, 19 Feb 2024 06:32:11 +0000 (07:32 +0100)] 
ell: update 0.61 -> 0.62

ver 0.62:
Add support for cleanup functions and macros.
Add support for setting DHCP max attempts.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoinitramfs-framework: overlayroot: align bootparams with module name
Johannes Schneider [Tue, 13 Feb 2024 12:24:25 +0000 (13:24 +0100)] 
initramfs-framework: overlayroot: align bootparams with module name

Renaming the 'rootrw' kernel commandline parameter to
'overlayrootrwdev' to both align better with this modules name, and
point out the usage of the variable.

This patch also includes an if block to migrate the old 'rootrw'
block, should it be already used by someone.

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agoinitramfs-framework: overlayroot: fix kernel commandline clash
Johannes Schneider [Tue, 13 Feb 2024 12:24:24 +0000 (13:24 +0100)] 
initramfs-framework: overlayroot: fix kernel commandline clash

The initramfs-framwork takes kernel commandline options and converts
them for internal use to variables following the 'bootparam_name'
pattern. The overlayroot module uses 'bootparam_rootfstype' and
'bootparam_rootfsflags' which both collide with linux kernel
parameters 'rootfstype' and 'rootfsflags'.  This collision is solved
by putting the variables in the namespace of the initramfs-framework
module.

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agosanity.conf: Require bitbake 2.7.3
Richard Purdie [Mon, 19 Feb 2024 11:57:47 +0000 (11:57 +0000)] 
sanity.conf: Require bitbake 2.7.3

Due to hashserv API changes in siggen, we need bitbake 2.7.3.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agosstatesig: Implement new siggen API
Joshua Watt [Sun, 18 Feb 2024 20:08:30 +0000 (13:08 -0700)] 
sstatesig: Implement new siggen API

Implements the new API required for querying unihashes in parallel

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agobitbake-layers: Add test case layers setup for custom references
Jermain Horsman [Thu, 8 Feb 2024 13:50:30 +0000 (14:50 +0100)] 
bitbake-layers: Add test case layers setup for custom references

This includes a simple test which creates a layer setup using
custom references, and subsequently modifies the resulting layers
setup using a different custom reference.

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agobitbake-layers: Add ability to update the reference of repositories
Jermain Horsman [Thu, 8 Feb 2024 13:50:28 +0000 (14:50 +0100)] 
bitbake-layers: Add ability to update the reference of repositories

This creates a new layers setup with, or, modifies an existing layers
setup using, one or more repositories where the references are provided
by the user.

This is a very minimal implementation, no validation of any reference
is done and it is left to the user to provide a valid value.

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agooe-setup-build: add a tool for discovering config templates and setting up builds
Alexander Kanavin [Fri, 16 Feb 2024 11:52:22 +0000 (12:52 +0100)] 
oe-setup-build: add a tool for discovering config templates and setting up builds

This is another piece of the puzzle in setting up builds from nothing
without having to write custom scripts or use external tools.

After layers have been fetched and placed into their respective locations by
oe-setup-layers, one would surely want to proceed to the actual build, and here's how:

1. Without arguments the tool reads available layers
from .oe-layers.json file (written out by oe-setup-layers or a fallback under scripts/),
prints what templates it has found, and asks the user to select one, as seen below.
This will land the user in a shell ready to run bitbake:

=============================================
alex@Zen2:/srv/work/alex$ ./setup-build
Available build configurations:

1. alex-configuration-gadget
This configuration will set up a build for the purposes of supporting gadget.

2. alex-configuration-gizmo
This configuration allows building a gizmo.

3. poky-default
This is the default build configuration for the Poky reference distribution.

Re-run with 'list -v' to see additional information.
Please choose a configuration by its number: 1
Running: TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/configuration-gadget . /srv/work/alex/poky/oe-init-build-env /srv/work/alex/build-alex-configuration-gadget && /bin/bash
You had no conf/local.conf file. This configuration file has therefore been
created for you from /srv/work/alex/meta-alex/conf/templates/configuration-gadget/local.conf.sample
You may wish to edit it to, for example, select a different MACHINE (target
hardware).

You had no conf/bblayers.conf file. This configuration file has therefore been
created for you from /srv/work/alex/meta-alex/conf/templates/configuration-gadget/bblayers.conf.sample
To add additional metadata layers into your configuration please add entries
to conf/bblayers.conf.

The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
    https://docs.yoctoproject.org

For more information about OpenEmbedded see the website:
    https://www.openembedded.org/

This configuration will set up a build for the purposes of supporting gadget.
Please refer to meta-alex/README for additional details and available bitbake targets.
==============================================

2. It is also possible to list available configurations without selecting one using
'setup-build list' or to select and setup one non-interactively with 'setup-build setup'.

3. The full set of command line options is:

$ ./setup-build --help
usage: setup-build [-h] [--layerlist LAYERLIST] {list,setup} ...

A script that discovers available build configurations and sets up a build environment based on one of them. Run without arguments to choose one interactively.

positional arguments:
  {list,setup}
    list                List available configurations
    setup               Set up a build environment and open a shell session with it, ready to run builds.

optional arguments:
  -h, --help            show this help message and exit
  --layerlist LAYERLIST
                        Where to look for available layers (as written out by setup-layers script) (default is /srv/work/alex/.oe-layers.json).

$ ./setup-build list --help
usage: setup-build list [-h] [-v]

optional arguments:
  -h, --help  show this help message and exit
  -v          Print detailed information and usage notes for each available build configuration.

$ ./setup-build setup --help
usage: setup-build setup [-h] [-c configuration_name] [-b build_path] [--no-shell]

optional arguments:
  -h, --help            show this help message and exit
  -c configuration_name
                        Use a build configuration configuration_name to set up a build environment (run this script with 'list' to see what is available)
  -b build_path         Set up a build directory in build_path (run this script with 'list -v' to see where it would be by default)
  --no-shell            Create a build directory but do not start a shell session with the build environment from it.

4. There's an an added hint in oe-setup-layers about how to proceed (as it is really not user-friendly
to fetch the layer repos successfully and then exit without a word), and a symlink to the script
from the top level layer checkout directory.

5. The selftest to check layer setup has been adjusted to run a basic check for template
discovery and build setup. The revision of poky to be cloned has been bumped to 4.1,
as that's the first version with a default template in a standard location.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoscripts/oe-setup-builddir: add support for configuration summaries
Alexander Kanavin [Fri, 16 Feb 2024 11:52:20 +0000 (12:52 +0100)] 
scripts/oe-setup-builddir: add support for configuration summaries

They are handled exactly same as conf-notes.txt.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agometa/lib/bblayers/buildconf.py: add support for configuration summaries
Alexander Kanavin [Fri, 16 Feb 2024 11:52:19 +0000 (12:52 +0100)] 
meta/lib/bblayers/buildconf.py: add support for configuration summaries

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agometa/conf/templates/default/conf-summary.txt: add a template summary
Alexander Kanavin [Fri, 16 Feb 2024 11:52:18 +0000 (12:52 +0100)] 
meta/conf/templates/default/conf-summary.txt: add a template summary

Existing conf-notes.txt is not adequate in situations where the user
needs to select a config template from several, or get an overview of them and
is interested only in a brief explanation of what the template is for,
but not extended multi-paragraph instructions for how to use it.

Such summaries can be provided via conf-summary.txt and
this patch adds such a summary for the oe-core default template.

Updates to the tools and a tool for selecting templates which
will make specific use of the summary will follow.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopatchtest: add stronger indication for failed tests
Simone Weiß [Fri, 16 Feb 2024 21:10:21 +0000 (21:10 +0000)] 
patchtest: add stronger indication for failed tests

Do not only log that there has been an issue but add WARNING before for local
runs. Hopefully this helps to avoid that people reading the log to quickly miss
issues.

Fixes [YOCTO #15389]

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agopatchtest: Add selftest for test cve_check_ignore
Simone Weiß [Sat, 10 Feb 2024 13:52:59 +0000 (13:52 +0000)] 
patchtest: Add selftest for test cve_check_ignore

Add a selftest for the recently introduced check for CVE_CHECK_IGNORE.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoscripts/oe-setup-layers: write a list of layer paths into the checkout's top dir
Alexander Kanavin [Fri, 16 Feb 2024 11:52:21 +0000 (12:52 +0100)] 
scripts/oe-setup-layers: write a list of layer paths into the checkout's top dir

This is beneficial for setting up builds, as this list can be used
to determine reliably where the actual layers are, and discover
available configurations from them.

Also adjust the selftest to check the presence of that file rather
than any specific layer in a hardcoded location.

Sample output (paths are written relative to the file for relocatability
and ease of reading):

{
    "layers": [
        "meta-openembedded/meta-filesystems",
        "meta-openembedded/meta-gnome",
        "meta-openembedded/meta-initramfs",
        "meta-openembedded/meta-multimedia",
        "meta-openembedded/meta-networking",
        "meta-openembedded/meta-oe",
        "meta-openembedded/meta-perl",
        "meta-openembedded/meta-python",
        "meta-openembedded/meta-webserver",
        "meta-openembedded/meta-xfce",
        "poky/bitbake/lib/layerindexlib/tests/testdata/layer1",
        "poky/bitbake/lib/layerindexlib/tests/testdata/layer2",
        "poky/bitbake/lib/layerindexlib/tests/testdata/layer3",
        "poky/bitbake/lib/layerindexlib/tests/testdata/layer4",
        "poky/meta-poky",
        "poky/meta-selftest",
        "poky/meta-skeleton",
        "poky/meta-yocto-bsp",
        "poky/meta"
    ],
    "version": "1.0"
}

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agouseradd.bbclass: Fix missing space when appending vardeps.
Siong W.LIM [Sun, 18 Feb 2024 19:11:31 +0000 (03:11 +0800)] 
useradd.bbclass: Fix missing space when appending vardeps.

Signed-off-by: Siong <wslim87@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoqemu: Set CVE_STATUS for wrong CVEs
Simone Weiß [Sun, 18 Feb 2024 18:42:59 +0000 (18:42 +0000)] 
qemu: Set CVE_STATUS for wrong CVEs

All are already fixed in 8.2.1, NVD was informed that cpes are wrong.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agowayland-protocols: update 1.32 -> 1.33
Markus Volk [Sun, 18 Feb 2024 18:16:44 +0000 (19:16 +0100)] 
wayland-protocols: update 1.32 -> 1.33

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolibuv: Upgrade 1.47.0 -> 1.48.0
Simone Weiß [Sun, 18 Feb 2024 17:47:26 +0000 (17:47 +0000)] 
libuv: Upgrade 1.47.0 -> 1.48.0

Upgrade libuv to pull in the fix for CVE-2024-24806

Changes:
* misc: remove deprecated stalebot file (Jameson Nash)
* build: disable windows asan buildbot (Ben Noordhuis)
* test: don't run tcp_writealot under msan (Ben Noordhuis)
* build,win: remove extraneous -lshell32 (Ben Noordhuis)
* unix: ignore ifaddrs with NULL ifa_addr (Stephen Gallagher)
* unix,win: utility for setting priority for thread (Hao Hu)
* pipe: add back error handling to connect / bind (Jameson Nash)
* test: check if ipv6 link-local traffic is routable (Ben Noordhuis)
* win: remove check for UV_PIPE_NO_TRUNCATE (Jameson Nash)
* linux: disable io_uring on hppa below kernel 6.1.51 (matoro)
* unix,win: fix read past end of pipe name buffer (Ben Noordhuis)
* unix: unbreak macOS < 10.14 (Sergey Fedorov)
* aix: disable ipv6 link local (Abdirahim Musse)
* doc: move cjihrig to emeriti (cjihrig)
* unix: correct pwritev conditional (Bo Anderson)
* test_fs.c: Fix issue on 32-bit systems using btrfs (Stephen Gallagher)
* misc: ignore libuv-release-tool files (Jameson Nash)
* win: honor NoDefaultCurrentDirectoryInExePath env var (Ardi Nugraha)
* idna: fix compilation warning (Saúl Ibarra Corretgé)
* linux: remove HAVE_IFADDRS_H macro (Ben Noordhuis)
* test: skip tcp-write-in-a-row on IBM i (Abdirahim Musse)
* build,win: work around missing uuid.dll on MinGW (Anton Bachin)
* win: stop using deprecated names (Matheus Izvekov)
* unix,win: fix busy loop with zero timeout timers (Matheus Izvekov)
* aix,ibmi: use uv_interface_addresses instead of getifaddrs (Abdirahim
  Musse)
* linux: fix bind/connect for abstract sockets (Santiago Gimeno)
* win: replace c99 comments with c89 comments (Trevor Flynn)
* build: add .cache clangd folder to .gitignore (Juan José Arboleda)
* unix: support full TCP keep-alive on Solaris (Andy Pan)
* freebsd: fix F_KINFO file path handling (David Carlier)
* linux: retry fs op if unsupported by io_uring (Santiago Gimeno)
* freebsd: fix build on non-intel archs (David Carlier)
* unix: optimize uv__tcp_keepalive cpp directives (Andy Pan)
* linux: disable io_uring on ppc64 and ppc64le (Brad King)
* doc: add very basic Security Policy document (Santiago Gimeno)
* build: re-enable msvc-asan job on CI (Jameson Nash)
* win/spawn: optionally run executable paths with no file extension
  (Brad King)
* win: fix ESRCH implementation (Jameson Nash)
* unix,win: reset the timer queue on stop (Santiago Gimeno)
* fix: always zero-terminate idna output (Ben Noordhuis)
* fix: reject zero-length idna inputs (Ben Noordhuis)
* test: empty strings are not valid IDNA (Santiago Gimeno)
* Merge pull request from GHSA-f74f-cvh7-c6q6 (Ben Noordhuis)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooe-init-build-env: generate .vscode from template
Adrian Freihofer [Thu, 15 Feb 2024 22:53:33 +0000 (23:53 +0100)] 
oe-init-build-env: generate .vscode from template

Provide a reasonable default configuration for VSCode and the
yocto.bitbake extension.
The generated default configuration is generic and minimal. It's mostly
supposed to prevent VSCode from OOM exceptions if the build directory is
in the scope of the indexer plugins of VSCode.
But it also configures the yocto-bitbake plugin to just work without
manual user interaction.

The configuration is only generated if VSCode is installed. Currently,
VSCode is one of many popular editors for Yocto/OE. Removing the check
would mean that the configuration would be generated by e.g. oe-selftest
or for users not using VSCode. If it should prove useful, the check can
be removed later.

Customization for other layers is possible. A layer might provide it's
own oe-setup-build-env script which calls the oe-setup-vscode script
from poky with different folders. But it's also possible to override the
oe-setup-vscode script by another layer with a custom implementation.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agovscode: drop .vscode folder
Adrian Freihofer [Thu, 15 Feb 2024 22:53:32 +0000 (23:53 +0100)] 
vscode: drop .vscode folder

There is a new official bitbake plugin:
https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake

This plugin automatically updates the .vscode/settings.json file.
Having the settings.json file in git and a plugin which modifies this
file is not ideal. It can lead to anoying situations especially when
working with git. For example a git stash reverts the settings which are
automatically applied by the plugin. While git stashed the settings.json
file the plugin immediately changes the file again and tries to run
bitbake based on the newly generated settings. When git does a stash pop
the restored settings.json file conflicts with the new settigns.json
file which has been generated while the git stash took place.

Therefore this patch removes the .vscode folder from git.

Removing the settings.json leads to other issues as already described
in the commit message of 5ff688fe29. But we still need another solution
where the settings.json file is not in Git.

Discussion is here:
https://github.com/yoctoproject/vscode-bitbake/issues/95

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: _extract_source: Correct the removal of an old backup directory
Peter Kjellerstedt [Fri, 16 Feb 2024 18:59:51 +0000 (19:59 +0100)] 
devtool: _extract_source: Correct the removal of an old backup directory

Also correct the comment describing what is happening.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agognupg: disable tests to avoid running target binaries at build time
Chen Qi [Sun, 18 Feb 2024 02:57:08 +0000 (10:57 +0800)] 
gnupg: disable tests to avoid running target binaries at build time

By default, the tests are built and run at do_compile and we can see
errors like below in log.do_compile:

  gnupg-2.4.4/tests/cms/inittests: line 99: ../../sm/gpgsm: cannot execute binary file: Exec format error

Note that the do_compile process still succeeds. However, we'd better avoid
executing these target binaries at build time.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agovim: upgrade from 9.0.2130 -> 9.1.0114
Tim Orling [Sun, 18 Feb 2024 16:57:38 +0000 (08:57 -0800)] 
vim: upgrade from 9.0.2130 -> 9.1.0114

https://www.vim.org/vim-9.1-released.php

Vim 9.1 is available

The Vim project is happy to announce that Vim 9.1 has finally been released.
This release is dedicated to Bram Moolenaar, Vim's lead developer for more
than 30 years, who passed away half a year ago. The Vim project wouldn't
exist without his work!

Vim 9.1 is mainly a bug fix release, it contains hundreds of bug fixes, a
few new features and there are many minor improvements.

Changes:
https://github.com/vim/vim/compare/v9.0.2130...v9.1.0114

CVE: CVE-2024-22667
(includes commit https://github.com/vim/vim/commit/b39b240c386a5a29241415541f1c99e2e6b8ce47)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolibgit2: update 1.7.1 -> 1.7.2
Simone Weiß [Sun, 18 Feb 2024 15:42:40 +0000 (15:42 +0000)] 
libgit2: update 1.7.1 -> 1.7.2

Update libgit2 to pull in securtiy fixes.

Changelog summary:
- A bug in git_revparse_single is fixed that could cause a Denial of
  Service attack. This fixes CVE-2024-24575

 - A bug in git_index_add is fixed that could lead to arbitrary code execution.
   This fixes CVE-2024-24577

 - A bug in the smart transport negotiation could have caused an out-of-bounds
   read.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agogrub2: ignore CVE-2024-1048, Redhat only issue
Simone Weiß [Sun, 18 Feb 2024 12:20:36 +0000 (12:20 +0000)] 
grub2: ignore CVE-2024-1048, Redhat only issue

Redhat/Fedora specific as it affects the grub2-set-bootflag extension
added by Redhat to grub.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agooeqa/selftest/rust: Exclude failing riscv tests
Richard Purdie [Sun, 18 Feb 2024 13:59:12 +0000 (13:59 +0000)] 
oeqa/selftest/rust: Exclude failing riscv tests

The rust tests nearly pass for qemurisv64, add the remaining ones to the
exclusion list so it matches everythig else in exlcuding all the know
to break cases.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agotestsdk: Avoid PATH contamination
Richard Purdie [Sat, 17 Feb 2024 17:07:26 +0000 (17:07 +0000)] 
testsdk: Avoid PATH contamination

The autobuilder has been seeing increasing numbers of testsdk failures
where xz was 'missing':

ERROR: core-image-sato-1.0-r0 do_testsdk: Couldn't install the SDK:
Error: xz is required for installation of this SDK, please install it first

This is probably due to xz and it's libraries not being in the sysroots
in a way which works without races.

Since the SDK should be using the host, fix this. The eSDK already does
this to solve a similar problem so copy the code from there.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: standard: Add some missing whitespace
Peter Kjellerstedt [Fri, 16 Feb 2024 18:59:50 +0000 (19:59 +0100)] 
devtool: standard: Add some missing whitespace

Makes it a little bit easier when reading the code.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agodevtool: ide-sdk make deploy-target quicker
Adrian Freihofer [Mon, 22 Jan 2024 13:58:26 +0000 (14:58 +0100)] 
devtool: ide-sdk make deploy-target quicker

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agooe-selftest devtool: ide-sdk tests
Adrian Freihofer [Mon, 22 Jan 2024 13:58:22 +0000 (14:58 +0100)] 
oe-selftest devtool: ide-sdk tests

Add some oe-selftests for the new devtool ide-sdk plugin. Most of the
workflows are covered.

Many thanks to Enguerrand de Ribaucourt for testing and bug fixing.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agodevtool: new ide-sdk plugin
Adrian Freihofer [Mon, 22 Jan 2024 13:58:21 +0000 (14:58 +0100)] 
devtool: new ide-sdk plugin

The new devtool ide plugin provides the eSDK and configures an IDE to
work with the eSDK. In doing so, bitbake should be used to generate the
IDE configuration and update the SDK, but it should no longer play a
role when working on the source code. The work on the source code should
take place exclusively with the IDE, which, for example, calls cmake
directly to compile the code and execute the unit tests from the IDE.

The plugin works for recipes inheriting the cmake or the meson bbclass.
Support for more programming languages and build tools may be added in
the future.

There are various IDEs that can be used for the development of embedded
Linux applications. Therefore, devtool ide-sdk, like devtool itself,
supports plugins to support IDEs.
VSCode is the default IDE for this first implementation. Additionally,
some generic helper scripts can be generated with --ide none instead of
a specific IDE configuration. This can be used for any IDE that
supports calling some scripts.

There are two different modes supported:

- devtool modify mode (default):
  devtool ide-sdk configures the IDE to manage the build-tool used by the
  recipe (e.g. cmake or meson). The workflow looks like:
    $ devtool modify a-recipe
    $ devtool ide-sdk a-recipe a-image
    $ code "$BUILDDIR/workspace/sources/a-recipe"
    Work in VSCode, after installing the proposed plugins

  Deploying the artifacts to the target device and running a remote
  debugging session is supported as well.
  This first implementation still calls bitbake and devtool to copy the
  binary artifacts to the target device. In contrast to compiling,
  installation and copying must be performed with the file rights of the
  target device. The pseudo tool must be used for this. Therefore
  bitbake -c install a-recipe && devtool deploy-target a-recipe
  are called by the IDE for the deployment. This might be improved later
  on.

  Executing the unit tests out of the IDE is supported via Qemu user if
  the build tool supports that. CMake (if cmake-qemu.bbclass is
  inherited) and Meson support Qemu usermode.

- Shared sysroots mode: bootstraps the eSDK with shared sysroots for
  all the recipes passed to devtool ide-sdk. This is basically a wrapper
  for bitbake meta-ide-support && bitbake build-sysroots. The workflow
  looks like:
    $ devtool ide-sdk --share-sysroots a-recipe another-recipe
    vscode where/the/sources/are
  If the IDE and the build tool support it, the IDE gets configured to
  offer the cross tool-chain provided by the eSDK. In case of VSCode and
  cmake a cmake-kit is generated. This offers to use the cross
  tool-chain from the UI of the IDE.

Many thanks to Enguerrand de Ribaucourt for testing and bug fixing.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
17 months agosstate.bbclass: Only sign packages at the time of their creation
Tobias Hagelborn [Mon, 5 Feb 2024 14:03:34 +0000 (15:03 +0100)] 
sstate.bbclass: Only sign packages at the time of their creation

The purpose of the change is to never sign a package not created by
the build itself.

sstate_create_package is refactored into Python and re-designed
to handle signing inside the function. Thus, the signing should never apply
to existing sstate packages. The function is therefore renamed into
sstate_create_and_sign_package.
The creation of the archive remains in a separate shellscript function.

Co-authored-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Tobias Hagelborn <tobias.hagelborn@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agogstreamer1.0: upgrade 1.22.9 -> 1.22.10
Anuj Mittal [Fri, 16 Feb 2024 11:43:52 +0000 (19:43 +0800)] 
gstreamer1.0: upgrade 1.22.9 -> 1.22.10

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolibcap-ng: fix build with swig 4.2.0
Anuj Mittal [Fri, 16 Feb 2024 11:40:34 +0000 (19:40 +0800)] 
libcap-ng: fix build with swig 4.2.0

Backport an upstream patch to remove Python exception handler which is
deprecated and also removed from swig.

https://github.com/swig/swig/commit/736c052d7de3685be9d5c4aecee6b36273e8c319

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agostress-ng: upgrade 0.17.04 -> 0.17.05
Anuj Mittal [Fri, 16 Feb 2024 11:40:31 +0000 (19:40 +0800)] 
stress-ng: upgrade 0.17.04 -> 0.17.05

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoorc: upgrade 0.4.36 -> 0.4.37
Anuj Mittal [Fri, 16 Feb 2024 11:40:30 +0000 (19:40 +0800)] 
orc: upgrade 0.4.36 -> 0.4.37

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agosqlite3: upgrade 3.44.2 -> 3.45.1
Anuj Mittal [Fri, 16 Feb 2024 11:40:29 +0000 (19:40 +0800)] 
sqlite3: upgrade 3.44.2 -> 3.45.1

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolibproxy: upgrade 0.5.3 -> 0.5.4
Anuj Mittal [Fri, 16 Feb 2024 11:40:28 +0000 (19:40 +0800)] 
libproxy: upgrade 0.5.3 -> 0.5.4

This includes a fix to include complete library version. Release notes:

https://github.com/libproxy/libproxy/releases/tag/0.5.4

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agoenchant2: upgrade 2.6.5 -> 2.6.7
Anuj Mittal [Fri, 16 Feb 2024 11:40:26 +0000 (19:40 +0800)] 
enchant2: upgrade 2.6.5 -> 2.6.7

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 months agolibffi: upgrade to 3.4.5
Ross Burton [Fri, 16 Feb 2024 10:46:49 +0000 (10:46 +0000)] 
libffi: upgrade to 3.4.5

Drop the clang/VFP patch, merged in 00116b6.

Drop the FILES for ${libdir}/libffi-${PV}, this file isn't installed.

License-Update: Copyright year updated to 2024.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>