Commit Graph

73285 Commits

Author SHA1 Message Date
Adrian Freihofer
c2813a4c69 devtool: refactor deploy-target
Make the deploy function independent from d. This allows to call the
function also from Python code not running in bitbake.
This is needed to for the devtool ide plugin which will call the
do_install task and the code from devtool deploy-target independently
from a bitbake server. This allows a much quicker workflow.

(From OE-Core rev: c8697d1132cbd4b2a2502b4c48e7d91fc18de786)

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>
2024-02-02 10:38:28 +00:00
Adrian Freihofer
50618e59dd devtool: refactor deploy to use exec_fakeroot_no_d
This is a step towards a deploy function which can be called without
passing the d variable.

(From OE-Core rev: 3e8c41ec373a1766f68932d3b979d00e4e3bb3a9)

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>
2024-02-02 10:38:28 +00:00
Adrian Freihofer
c17ce99a2f devtool: refactor exec_fakeroot
Provide a function exec_fakeroot_no_d which does the same like
exec_fakeroot does, but is usable independenlty from bitbake. This
allows to use the fanction from scripts where the d variable is not
available.

(From OE-Core rev: 6f5980d96844559639fc3660bb975b0bdd1aa523)

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>
2024-02-02 10:38:28 +00:00
Adrian Freihofer
c9c0974209 devtool: support plugins with plugins
Pass the plugins search path to plugins via context. This allows plugins
to search for their own plugins at the same paths.

(From OE-Core rev: e9c3c996f2e9a52462c4426f394798a211e53ae1)

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>
2024-02-02 10:38:28 +00:00
Adrian Freihofer
afe4c413f7 cmake.bbclass: use --install
Since version 3.15 CMake provides a command-line signature to install an
already-generated project binary tree. This may be used after building a
project to run installation without using the generated build system or
the native build tool.

This is a small improvement, for regular bitbake calls. CMake does not
check the dependencies again which is expected to be faster.

The main motivation for this change is using CMake from an SDK context.
With this change it is possible to initiate the compile step from an
IDE and later on initiating the install step via bitbake which runs the
install step on pseudo.

This is also what the meson.bbclass already does with the --no-rebuild
option.

(From OE-Core rev: 72388593d62d45d54790710b9665eb8f13897c8c)

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>
2024-02-02 10:38:28 +00:00
Simone Weiß
d50c4a1e36 gnutls: Upgrade 3.8.2 -> 3.8.3
Upgrade version to adress recent CVE findings.

Changelog
=========
** libgnutls: Fix more timing side-channel inside RSA-PSK key exchange
   [GNUTLS-SA-2024-01-14, CVSS: medium] [CVE-2024-0553]

** libgnutls: Fix assertion failure when verifying a certificate chain with a
   cycle of cross signatures
   [GNUTLS-SA-2024-01-09, CVSS: medium] [CVE-2024-0567]

** libgnutls: Fix regression in handling Ed25519 keys stored in PKCS#11 token
   certtool was unable to handle Ed25519 keys generated on PKCS#11
   with pkcs11-tool (OpenSC). This is a regression introduced in 3.8.2.

(From OE-Core rev: 705d2972b38efc9f331e3635c07ca92f8812b365)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-30 15:15:54 +00:00
Khem Raj
db87a18a92 xwayland: Upgrade 23.2.3 -> 23.2.4
Cumulative Fixes for CVE-2023-6816, CVE-2024-0229, CVE-2024-21885, CVE-2024-21886,
CVE-2024-0408, CVE-2024-0409

(From OE-Core rev: 6a2e44340c8ae2a60e33696ad944e327a24479d5)

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>
2024-01-30 15:15:54 +00:00
Konrad Weihmann
dddc7cf041 python3-yamllint: add missing dependency
yamllint requires pathspec module to be available

(From OE-Core rev: 59a89493f4b1f450139956f872d606829499b79d)

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-30 15:15:54 +00:00
Martin Jansa
f80f232fbd qemu: fix target build with ccache enabled
* with ccache inheritted, the BUILD_CC is 'ccache gcc', but because of missing
  quote it ends passing just ccache to host-cc which gets stripped and then
  it calls compiler[0] on empty compiler variable and breaks meson as shown in:
  http://errors.yoctoproject.org/Errors/Details/751436/

python version: Python 3.12.1
Traceback (most recent call last):
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/mesonmain.py", line 194, in run
    return options.run_func(options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 358, in run
    app.generate()
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 181, in generate
    return self._generate(env, capture, vslite_ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 203, in _generate
    intr = interpreter.Interpreter(b, user_defined_options=user_defined_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 331, in __init__
    self.parse_project()
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 132, in parse_project
    self.evaluate_codeblock(self.ast, end=1)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 198, in evaluate_codeblock
    raise e
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 190, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 204, in evaluate_statement
    return self.function_call(cur)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 530, in function_call
    res = func(node, func_args, kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 260, in wrapper
    return f(*nargs, **wrapped_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 579, in wrapper
    return f(*wrapped_args, **wrapped_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1309, in func_project
    self.add_languages(proj_langs, False, MachineChoice.BUILD)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1476, in add_languages
    success = self.add_languages_for(args, required, for_machine)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1519, in add_languages_for
    comp = compilers.detect_compiler_for(self.environment, lang, for_machine, skip_sanity_check)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 115, in detect_compiler_for
    comp = compiler_from_language(env, lang, for_machine)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 112, in compiler_from_language
    return lang_map[lang](env, for_machine) if lang in lang_map else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 614, in detect_c_compiler
    return _detect_c_or_cpp_compiler(env, 'c', for_machine)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 286, in _detect_c_or_cpp_compiler
    compiler_name = os.path.basename(compiler[0])
                                     ~~~~~~~~^^^
IndexError: list index out of range

...

Project name: qemu
Project version: 8.2.0
C compiler for the host machine: ccache x86_64-oe-linux-clang -target x86_64-oe-linux -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian --dyld-prefix=/usr -Qunused-arguments --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot -m64 -mcx16 (clang 17.0.6 "clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)")
C linker for the host machine: x86_64-oe-linux-clang -target x86_64-oe-linux -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian --dyld-prefix=/usr -Qunused-arguments --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot -m64 -mcx16 ld.lld 17.0.6

../qemu-8.2.0/meson.build:1:0: ERROR: Unhandled python exception

    This is a Meson bug and should be reported!

ERROR: meson setup failed

(From OE-Core rev: 7e55102cff9ddecb4f0acbb3bcafa703dd9808fd)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-30 15:15:54 +00:00
Richard Purdie
5573fb12eb oeqa/qemurunner: Handle rare shutdown race
The pid file can disappear when qemu is shutting down leading to a
file not found race before it is read.

Tweak the code to handle this and fix a rare but annoying race error
case.

[YOCTO #15036]

(From OE-Core rev: 8c07aac9d55f92fe5fbe3cab9f006efecf266328)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-30 15:15:54 +00:00
Khem Raj
0f61386628 qemu: Replace the basename patch with backport
Backport the patch that got applied to fix this issue upstream

(From OE-Core rev: 952c94988cf1cf093668e9ac7020485c51cf3a58)

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>
2024-01-27 11:06:34 +00:00
Fabio Estevam
2ced056c51 piglit: Update to latest revision
Update to the latest piglit revision.

(From OE-Core rev: 83e1fd36408d6789899e98b4d6e47eb69914a1bf)

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 11:06:34 +00:00
Khem Raj
cda5907daf python3: Initialize struct termios before calling tcgetattr()
Fixes ptest failures on python 3.12

    Failed ptests:
    {'python3': ['test_tcgetattr',
                 'test_cfmakeraw',
                 'test_setcbreak',
                 'test_setraw',
                 'python3']}

(From OE-Core rev: 515e7cf61c4ce5f6d572562ec851f01dade5cca0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:03 +00:00
Denys Dmytriyenko
c4a9b044d8 lttng-modules: upgrade 2.13.10 -> 2.13.11
Changelog:
https://lwn.net/Articles/957396/

Drop 2 backported patches and 1 implemented differently upstream.

(From OE-Core rev: 90eef01e2d7fbde43e8325f075383d0931924cc8)

Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:03 +00:00
Khem Raj
bcbb155635 elfutils: Fix build with gcc trunk
Fixes a build issue seen with latest gcc trunk.

Fixes
| ../../elfutils-0.189/tests/elfstrmerge.c: In function 'main':
| ../../elfutils-0.189/tests/elfstrmerge.c:450:32: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
|   450 |   newscnbufs = calloc (sizeof (void *), newshnums);
|       |                                ^~~~
| ../../elfutils-0.189/tests/elfstrmerge.c:450:32: note: earlier argument should specify number of elements, later size of each element
| cc1: all warnings being treated as errors

(From OE-Core rev: 3817ac3130e8858b3445872ff74b39c21969822a)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Chi Xu
4cb6ff8a57 xz: Add ptest support
There are two types of cases: executables and POSIX shell scripts.
All test cases PASS.
Add xz-ptest to PTESTS_FAST because test duration less than 30s
on qemux86-64.

root@qemux86-64:~# ptest-runner xz
START: ptest-runner
2024-01-26T03:32
BEGIN: /usr/lib/xz/ptest
=== test_bcj_exact_size.c ===
PASS: test_exact_size
PASS: test_empty_block

(From OE-Core rev: 2704983f972e4fe1d4e0bee8491a07eb4f629346)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Markus Volk
82eb0c47e4 gtk4: update 4.12.4 -> 4.12.5
Overview of Changes in 4.12.5, 17-01-2024
=========================================

* GtkColumnView:
 - Fix a crash on dispose

* GtkEmojiChooser:
 - Update to CLDR v44
 - Add more translations

* GtkFileDialog:
 - Return an error if no file is selected
 - Make closing the portal file chooser work

* GtkDropDown:
 - Fix display of the initial checkmark

* GtkShortcutsWindow:
 - Reduce the minimum width

* GDK:
 - Make the png loader safer against overflow

* Windows:
 - Use new clipboard api

* Wayland:
 - Fix cursor handling with graphics tablets

* macOS:
 - Silence secure-restore message
 - Fix build on macOS < 10.13

* Translation updates
 Basque
 British English
 Catalan
 Chinese (China)
 Czech
 Georgian
 German
 Hebrew
 Indonesian
 Lithuanian
 Persian
 Polish
 Romanian
 Russian
 Slovenian
 Swedish
 Turkish
 Ukrainian
 Vietnamese

(From OE-Core rev: 2dd196a048de8f45095ffa8ada2a2f3b15bcc866)

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
05d0b9eafb rpm: update 4.18.1 -> 4.19.1
Upstream has replaced autoconf with cmake, which necessitates a rewrite of the
recipe and available options, and a rebase to cmake of
0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch

Correct a mistake in 0001-Do-not-read-config-files-from-HOME.patch :
the patch was removing the NULL marker at the end of function arguments,
and 0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
was restoring it (in addition to the actual change the patch was making).
Now both patches preserve the NULL terminator.

(From OE-Core rev: 38549d462b399e3a63335f60a44c8bbced98639a)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
482ed7cd80 oeqa/runtime/rpm: fail tests if test rpm file cannot be found
Discovery of the test file was happening in a class initializer.
That block of code cannot fail (it's not a test), and so it
falls through to completion even if the needed file could not be found.

Then the tests themselves fail later due to class variables not
being set, but all information as to why is already lost at that point.

This converts the discovery to a helper function called from
the tests, so that the function can fail the tests precisely when the
problems occur.

(From OE-Core rev: 5d7a6ede105ea1efc9c324c7029f9d08dadf7255)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
683c839c45 classes/package_rpm: set bogus locations for passwd/group files
Since f3eaeeb734
rpm does its own parsing of /etc/passwd and /etc/group instead of relying on getpwnam() and friends.

This has an unfortunate effect of leaking build host uid/gid values for users and groups
into the cpio header inside rpm file (where previously those were always zero).

Installation of rpm packages relies on rpm header to set files ownership, and that
is a different structure that is build from .spec information, so we can avoid host
contamination by setting the paths to something bogus.

(From OE-Core rev: ac8ea64bb39a5e56599e078c7e6cd056a2aa4144)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
2b20d612b4 classes/package_rpm: use weak user/group dependencies
rpm 4.19 automatically generates provides and depends for user and
groups:
https://github.com/rpm-software-management/rpm/blob/rpm-4.19.x/docs/manual/users_and_groups.md#dependencies

This mechanism relies on sysusers.d for the 'provides'
part, and thus is systemd-only at best. So we need to disable it for now,
otherwise image generation fails with unresolved dependencies.

(From OE-Core rev: 10064e364f015ad3c0c8d63511cd9a7da5e22c69)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
347abb8c06 classes/package_rpm: write file permissions and ownership explicitly into .spec
Per 77d3529c31
rpm 4.19.1+ will not consider actual filesystem permissions and ownership, and will quietly default
to root if not expictly set otherwise in .spec file.

There's also additional diagnostics (printing what is in passwd/group)
when user/group name lookup against the sysroot fails.
That is never supposed to happen, and yet there was one report that it did:
https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8493/steps/23/logs/stdio

Investigating that issue led to the first three commits in this patchset:

sysroot user management postinsts: run with /bin/sh -e to report errors when they happen
classes/multilib: expand PACKAGE_WRITE_DEPS in addition to DEPENDS
classes/staging: capture output of sysroot postinsts into logs

(From OE-Core rev: a9db9a56617459e8f6f6dd466f2e18a7eed5c1e3)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
d00682ab5c classes/staging: capture output of sysroot postinsts into logs
This particularly helps with user management postinsts as otherwise
there's no trace left of what was run, in which order, and what was the output.

Here's an example from the logs:

NOTE: Running postinst /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/bin/postinst-lib64-base-passwd, output:
b'/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot-native/usr/sbin/useradd\nRunning useradd commands...\nNOTE: lib64-ptest-runner: Performing useradd with [--root /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot --system --no-create-home --home / --user-group ptest]\n'
NOTE: Running postinst /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/bin/postinst-useradd-lib64-ptest-runner, output:
b'/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot-native/usr/sbin/useradd\nRunning useradd commands...\nNOTE: lib64-ptest-runner: Performing useradd with [--root /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot --system --no-create-home --home / --user-group ptest]\nNOTE: lib64-ptest-runner: user ptest already exists, not re-creating it\n'

(From OE-Core rev: a4dc96293268804b214a02e08d266205fad428b0)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
55bfa99451 classes/multilib: expand PACKAGE_WRITE_DEPS in addition to DEPENDS
Otherwise, PACKAGE_WRITE_DEPS would contain non-multilib variants
of dependencies even when building multilib items, resulting in
sysroots being populated with entirely wrong versions of them.

This hasn't been noticed until now through sheer (bad) luck, I think,
except in the cpio recipe, but the previous commit shows that the issues
did occur, quietly. Every other recipe in oe-core and meta-oe does not
prepend the multilib prefix.

(From OE-Core rev: 234965cb88ccfa9c3a357928f7155b119044e8fc)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Alexander Kanavin
ed08180608 sysroot user management postinsts: run with /bin/sh -e to report errors when they happen
This exposes the following failure in a multilib setup, when everything
up to do_package_write_rpm is in sstate, but do_package_write_rpm is not
(there's a similar fail for lib64-man-db, and the failures themselves will be fixed separately
in the next commit):

Exception: subprocess.CalledProcessError: Command '/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot/usr/bin/postinst-base-passwd' returned non-zero exit status 1.

Subprocess output:
install: cannot stat '/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/share/base-passwd/passwd.master': No such file or directory

(From OE-Core rev: 5ffa333db28bc5d8e440c983fdf95589d332461d)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Ola x Nilsson
fd0980f74f python3-numpy: Use Large File Support version of fallocate
This was supposed to always be the case from upstream but was exposed
by the 64-bit-time QA checker when file function scanning was enabled.

(From OE-Core rev: 3d556e59f658ac29615fb7a14b6ea48533122ff6)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
William Hauser
348d9aba33 native.bbclass: base_libdir unique from libdir
Use STAGING_BASE_LIBDIR_NATIVE for the value of base_libdir instead of
STAGING_LIBDIR_NATIVE. This will avoid conflicts between the two
directories.

(From OE-Core rev: 2d7e3d49378257bc02513275b988c8b194e9fd5a)

Signed-off-by: William Hauser <william.hauser@meraki.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:41:25 +00:00
Ross Burton
f81d74f970 sanity: require bitbake 2.7.2 for the inherit_defer statement
(From OE-Core rev: 3f6840823656c5d36c1d7a467509ca13a79453a8)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:25:39 +00:00
Ross Burton
ff0bc2a284 bitbake: bitbake: Version bump for inherit_defer addition
We've added a new statement, inherit_defer, so bump the version so this
can be checked.

(Bitbake rev: 191e6eb2bceb467c97e315301f1f64722cf0e976)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:25:39 +00:00
Chen Qi
7c47ed557b rootfs-postcommands.bbclass: ignore comment mismatch in systemd_user_check
The check was forcing every field to be identical, this is too
strict. For example, if the comment differs, there's really no
impact. For example, root user's comment is 'root' in passwd,
and it's 'Super User' in sysusers.d/basic.conf. Such difference is
not worth a warning. In fact, previous codes use 'lower()' to
avoid warning between 'nobody' and 'Nobody', and what's more, another
patch puts its own basic.conf.in in systemd's SRC_URI, but it changes
'Super User' to 'root'. Such changes are all unnecessary. We should
just ignore comment mismatch.

(From OE-Core rev: 2a700c3102b2233e71a157f0f88ed88496fa9fbf)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Chen Qi
dfcbfc49ca systemd-boot: upgrade to 255.1
0030-meson-Pass-all-static-pie-args-to-linker.patch is dropped as
it's a backported patch and is now in the new 255.1 version.

(From OE-Core rev: 6fdf03bd950e55ef7881041606f6e76141033716)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Chen Qi
74f0fd144f systemd: upgrade to 255.1
1. Patch changes:

0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
is removed because it has no real effect now. The /lib is now
/usr/lib because 'usrmerge' is a required distro feature for systemd.

0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
refreshed for the new version to avoid patch-fuzz issue.

2. root user's home directory now defaults to "/root":

The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
value, so if users set ROOT_HOME to "/home/root", the behavior is the
same as before. However, this is only for backward compatibility. With
this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
This is because systemd's source codes are hardcoding "/root", and other
values are not officially supported. See the list below.
$ grep -rl '"/root"' src/ | grep -v 'src/test'
src/core/namespace.c
src/basic/user-util.c
src/nss-systemd/nss-systemd.c
src/nspawn/nspawn.c
src/firstboot/firstboot.c
src/shared/userdb.c
src/shared/user-record.c
$ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ tmpfiles.d/ units/ xorg/ tools/
sysusers.d/basic.conf.in
tmpfiles.d/provision.conf
units/emergency.service.in
units/rescue.service.in
tools/list-discoverable-partitions.py
Previously, the recipe was just substituting sysusers.d/basic.conf.in,
which is not enough to be treated as 'fully support'. I deliberately put
a warning message in do_install to warn users about non "/root" ROOT_HOME
value. Don't remove it until all above places are handled.

3. cgroupv2 is now the default.
cgroupv2 is the default for systemd for many years and it's the default
for distros such as ubuntu and fedora. Let's also use it as the default.

(From OE-Core rev: ebafe463799b39025a0b24a0a14a2f02b6de9bac)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Chen Qi
1e77bf05a1 systemd: refresh musl patches for v255.1
The current patches are refreshed. A new patch is added:
0022-avoid-missing-LOCK_EX-declaration.patch

(From OE-Core rev: b86b1f1265b87f73ea132a9c0d3b1978972ad41b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Chen Qi
5ae14523a7 oeqa/selftest: add test case to cover 'devtool modify -n' for a git recipe
Add a test case to ensure the following error does not happen again for
'devtool modify -n'.

Traceback (most recent call last):
  File "/buildarea2/chenqi/poky/scripts/devtool", line 349, in <module>
    ret = main()
  File "/buildarea2/chenqi/poky/scripts/devtool", line 336, in main
    ret = args.func(args, config, basepath, workspace)
  File "/buildarea2/chenqi/poky/scripts/lib/devtool/standard.py", line 924, in modify
    if not initial_revs["."]:
KeyError: '.'

(From OE-Core rev: 2c2ba5f9497462a190b849a69d8440149f80582a)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Khem Raj
f697dc7baf rust: Re-write RPATHs in the copies llvm-config
Ensure that it can still access the native-sysroot for dependencies,
use ORIGIN to indicate this relative its install location, this also
helps in this not getting into the output of llvm-config which could
otherwise provide incorrect library paths

target rust recipe builds ( cross compile ) calls llvm-config from
target sysroot which works ok as long as C++ runtime it needs is
available on build host e.g. libstdc++ etc. which is commonly the
case, however when using clang and llvm runtime this falters since
it should be using libc++ from native sysroot and if this does not
exist on build machine this fails to find libc++ shared object and
llvm-config fails to run. This ensures that llvm-config version in
use is correctly relocated and can use shared libraries from native
sysroot correctly. Adding ORIGIN to sysroot will look for the .so in
same dir as the binary and there is the libc++.so.1 copied in place

Fixes rust build with clang compiler.

| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/rust/1.74.1/recipe-sysroot/usr/lib/llvm-rust/bin/llvm-config: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or director
y
| thread 'main' panicked at llvm.rs:551:19:
| command did not execute successfully: "/mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/rust/1.74.1/recipe-sysroot/usr/lib/llvm-rust/bin/llvm-config" "--version"
| expected success, got: exit status: 127

(From OE-Core rev: 178ad50bf36f244f96159bb2f94e0d8849487931)

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>
2024-01-26 16:06:29 +00:00
Fabio Estevam
5e9e7dab89 pulseaudio: Update to 17.0
Update to pulseaudio 17.0 version.

Since pulseaudio commit e96d278bfc51 ("daemon/meson.build: Install
dbus policy in /usr, not /etc"), pulseaudio-system.conf needs to be passed
in FILES, otherwise the following QA error is seen:

ERROR: pulseaudio-17.0-r0 do_package: QA Issue: pulseaudio: Files/directories were installed but not shipped in any package:
  /usr/share/dbus-1
  /usr/share/dbus-1/system.d
  /usr/share/dbus-1/system.d/pulseaudio-system.conf

(From OE-Core rev: 123c75bd87330a81ba5b929c35ae34710ddcc449)

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
William Lyu
ba3a8dd470 perl: Fix perl-module-* being ignored via COMPLEMENTARY_GLOB
When perl-modules is added via COMPLEMENTARY_GLOB, all perl-module-*
packages recommended by perl-modules are ignored due to the defined
behavior of COMPLEMENTARY_GLOB.

This patch changes the relationship between perl-modules and all of its
perl-module-* from RRECOMMENDS to RDEPENDS. This makes sense as
perl-modules should represent the collection of all optional
perl-module-* packages. After this patch, perl-modules itself is being
RRECOMMENDED instead of the individual perl-module-* packages
perl-modules represents.

(From OE-Core rev: 738fa7ee2dadf7b4b96fc1e86dbde106d3b86ec3)

Signed-off-by: William Lyu <William.Lyu@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Jonathan GUILLOT
b219e0c9ff udev-extraconf: fix unmount directories containing octal-escaped chars
USB devices are auto-mounted in a directory named like theirs labels.
Special characters like whitespace are octal-escaped in /proc/mounts
output. Using directly this output file as an argument for umount failed
and the mount directory can't be removed as still busy.
Using printf allows these special characters to be unescaped.

(From OE-Core rev: 37f17625d931a06888388682dc2b1f5a2d298125)

Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Simone Weiß
d46ca2a776 gcc: Update status of CVE-2023-4039
This is fixed via a patch added in gcc-13.2.inc already, but still
reported e.g. for libgcc as it is not defining an own source but use the
shared gcc-source.

(From OE-Core rev: 301d45eacfd4ae6bddfb13207e2af9e8b4662bc8)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Ryan Eatmon
aead8a77d3 python3-yamllint: Add recipe
Add recipe for yamllint.  There is an upcoming change in u-boot where
the binman tool is now configured to call yamllint to verify the configs
during compile time.

There was a previous patch a year ago from Trevor Woerner that never
made it into oe-core.  This patch is a reworking of his patch but
pointing to a newer version.

(From OE-Core rev: 128cfc5222752a6337a9cbb9bc9023c13ee19f2f)

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Kai Kang
86af1a7d40 p11-kit: fix parallel build failures
It fails occasionally with missing generated header files:

| ../git/common/asn1.c:42:10: fatal error: openssl.asn.h: No such file or directory
|    42 | #include "openssl.asn.h"
|       |          ^~~~~~~~~~~~~~~
| compilation terminated.

According to meson manual page:

https://mesonbuild.com/Wrap-best-practices-and-tips.html#declare-generated-headers-explicitly

'asn_h_dep' should be a dependency of static_library target 'libp11_asn1'
to make sure that required header files generated before compile
common/asn1.c.

(From OE-Core rev: 523ae4ba677ee9d9925182689b2d70af6d3df7a8)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Kai Kang
dba0b90446 nativesdk-cairo: fix build error
It fails to build nativesdk-cairo:

| ../cairo-1.18.0/meson.build:381:13: ERROR: Can not run test
    applications in this cross environment.

Set meson property ipc_rmid_deferred_release in cross-file to fix the
issue which is as same as for target cairo

(From OE-Core rev: e7388c4b351baa56be596af405730c8626b572da)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Richard Purdie
f456f7b896 qemu: Fix segfaults in webkitgtk:do_compile on debian11
Add a work around for segfaults we're seeing with qemu 8.2.0 when
compiling webkitgtk on debian 11 autobuilder workers.

The issue has been reported upstream to work out an official fix.

[YOCTO #15367]

(From OE-Core rev: 28ab691587e689872b2e2ddd210507cc2ae86f9b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:25:31 +00:00
Yash Shinde
bb630c3e29 rust: Enable rust oe-selftest.
* Enable rust oe-selftest.

* Include the dependent patches for rust oe-selftest in
  meta/recipes-devtools/rust/rust-source.inc

* Disable rust oe-selftest for mips32 target (Rust upstream has classified it into tier 3 target,
  for which the Rust project does not build or test automatically) as it is unstable with rust tests.
  https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3

* The testing is done on arm32, arm64, mips64, x86 and  x86_64 targets on Ubuntu 22.04.

(From OE-Core rev: 8f3a2841540fc4779bbd7e11d910edcdc8b47683)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
a6982bb6a4 rust: Remove the test cases whose parent dir is also present in the exclude list
To avoid overlap and redundancy of rust tests, remove the test cases whose
parent dir is already excluded.

Tests which are failing from below dirs are removed as these dirs are
already present in exclude list
            tests/run-make
            tests/rustdoc
            tests/mir-opt
            tests/ui-fulldeps

(From OE-Core rev: 58a7f3efa9e31e2c7b90e6490f3e51f388e6a7ce)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
30872876dc rust: Add new tests in the exclude list for rust oe-selftest
Add newly failing tests cases in the exclude list for
rust oe-selftest.

(From OE-Core rev: 50119ddaaa810ad71063691fb1cc30cf8c8456c8)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
ac7375e02f rust: Fix assertion failure error on oe-selftest
Fixes: thread 'main' panicked at 'assertion failed: `(left == right)`
       left: `x86_64-unknown-linux-gnu`,
       right: `x86_64-poky-linux-gnu`: Cannot obtain compiler for non-native build triple at stage 0', compile.rs:1474:13

Add correct target value for cross-compiled targets on stage1 during rust oe-selfest.

(From OE-Core rev: b8c1091276b6b9b1ae162dd19b2652f493a686d8)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
208b3bee78 rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest.
Fixes: error: the option `Z` is only accepted on the nightly compiler

When rust.channel is set to either beta or stable, we can't use
nightly features on bootstrap without RUSTC_BOOTSTRAP.
Set RUSTC_BOOTSTRAP=1 to use nightly features on stable or beta.

(From OE-Core rev: 01a411223fb85fedf85472402f63f6cb2f32ed6b)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
0a066f7526 rust: detect user-specified custom targets in compiletest
Fixes: thread 'main' panicked at 'failed to gather the target spec
       for '<arch>-unknown-linux-gnu', synthetic_targets.rs:66:9

Detect and fetch custom target configurations when rustc is
bootstrapped in rust oe-selftest.

(From OE-Core rev: fdd9385d9845d628e10179598fc42d29519c5dfd)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
357651377f rust: Fetch cargo from rust-snapshot dir.
Fixes: Exception: no cargo executable found at
       `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`

Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir.

Patch sent to upstream- https://github.com/rust-lang/rust/pull/120125

(From OE-Core rev: 1a048b5ab7f891911beaa14eb9269033c84088dc)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00