Stefan Wiehler [Thu, 2 Jun 2022 09:45:14 +0000 (11:45 +0200)]
kernel-yocto.bbclass: Reset to exiting on non-zero return code at end of task
Several tasks deactivate exiting on non-zero return codes via set +e because
they run subcommands that have legitimate non-zero return codes. However when
appending to those tasks, this behavior is not expected and can lead to builds
silently proceeding in case of an error. Therefore reset the default behavior
at the end of the respective tasks via set -e.
Signed-off-by: Stefan Wiehler <stefan.wiehler@nokia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
These explicit tracepoints aren't really used and show sign of aging.
It's work to keep these up to date, and before I attempted to keep them
up to date, they weren't up to date, which indicates that they're not
really used. These days there are better ways of introspecting anyway.
Which causes the following build failure
lttng-modules-2.13.3/src/probes/lttng-probe-random.c:18:10: fatal error: trace/events/random.h: No such file or directory
| 18 | #include <trace/events/random.h>
| | ^~~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mingli Yu [Thu, 2 Jun 2022 05:46:40 +0000 (13:46 +0800)]
perl: Fix build with gcc-12
Fix the build failure when debug build is enabled.
Add DEBUG_BUILD = "1" in conf/local.conf.
$ bitbake perl
| In function 'dynprep',
inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
| pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
| 1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Permission model of overlayfs uses permissions/ownership from the upper
layer after mounting. Fix up UID/GID of the upper layer, when lower
layer already uses something custom.
Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
files: rootfs-postcommands: move helper commands to script
OverlayFS systemd helper unit might require more pre-processing
commands. It gets more complicated to embed them in a unit file, because
systemd shell subset is limited and might require additional escaping.
Move the command to a separate script, thus simplifying systemd unit.
Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Wed, 1 Jun 2022 18:17:42 +0000 (19:17 +0100)]
populate_sdk_ext: Fix race condition on bb_unihashes.dat
There is a race were the bb_unihashes.dat file may end up zero sized due to
concurrent builds. Use recently added API within bitbake to copy the file
safely. Also use the opportunity to remove hardcoded filepaths internal to
bitbake from OE-Core.
Bump the minimum bitbake version to match the API being used.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jeremy Puhlman [Wed, 1 Jun 2022 23:02:15 +0000 (19:02 -0400)]
gcc: depend on zstd-native
Sharing sstate cache binaries between two systems, one with libzstd installed
and the other without, leads to various gcc components being linked against
the system libzstd and failing to run on the system with out it installed.
Make zstd-native from our system available.
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Thu, 2 Jun 2022 07:57:55 +0000 (08:57 +0100)]
openssl: Backport fix for ptest cert expiry
ptests in in openssl have started failing as one of the test certificates has
expired. Backport a fix for this from upstream, replacing the test
certificate to allow the ptests to pass again.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wangmy [Mon, 30 May 2022 06:40:47 +0000 (14:40 +0800)]
logrotate: upgrade 3.19.0 -> 3.20.1
Changelog:
=========
drop world-readable permission on state file even when ACLs are enabled (#446)
fix potential DoS from unprivileged users via the state file (CVE-2022-1348)
fix a misleading debug message with copytruncate and rotate 0 (#443)
add support for unsigned time_t (#438)
do not lock state file /dev/null (#433)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wangmy [Mon, 30 May 2022 06:38:40 +0000 (14:38 +0800)]
cups: upgrade 2.4.1 -> 2.4.2
Changelog:
==========
- Fixed certificate strings comparison for Local authorization (CVE-2022-26691)
- The cupsFileOpen function no longer opens files for append in read-write
mode (Issue #291)
- The cupsd daemon removed processing temporary queue (Issue #364)
- Fixed delay in IPP backend if GNUTLS is used and endpoint doesn't confirm
closing the connection (Issue #365)
- Fixed conditional jump based on uninitialized value in cups/ppd.c (Issue #329)
- Fixed CSS related issues in CUPS Web UI (Issue #344)
- Fixed copyright in CUPS Web UI trailer template (Issue #346)
- mDNS hostname in device uri is not resolved when installaling a permanent
- IPP Everywhere queue (Issues #340, #343)
- The lpstat command now reports when the scheduler is not running
(Issue #352)
- Updated the man pages concerning the -h option (Issue #357)
- Re-added LibreSSL/OpenSSL support (Issue #362)
- Updated the Solaris smf service file (Issue #368)
- Fixed a regression in lpoptions option support (Issue #370)
- The scheduler now regenerates the PPD cache information after changing the
"cupsd.conf" file (Issue #371)
- Updated the scheduler to set "auth-info-required" to "username,password" if a
backend reports it needs authentication info but doesn't set a method for
authentication (Issue #373)
- Updated the configure script to look for the OpenSSL library the old way if
pkg-config is not available (Issue #375)
- Fixed the prototype for the httpWriteResponse function (Issue #380)
- Brought back minimal AIX support (Issue #389)
cupsGetResponse did not always set the last error.
- Fixed a number of old references to the Apple CUPS web page.
- Restored the default/generic printer icon file for the web interface.
- Removed old stylesheet classes that are no longer used by the web
interface.
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa [Sun, 29 May 2022 02:34:05 +0000 (04:34 +0200)]
patch.py: make sure that patches/series file exists before quilt pop
* Since quilt upgrade to 0.67 some recipes sometimes fail in do_patch with
errors like:
ERROR: Applying patch 'GPLv2.patch' on target directory '/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/keymaps/1.0-r31'
CmdError('quilt --quiltrc /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/keymaps/1.0-r31/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout:
stderr: File series fully applied, ends at patch GPLv2.patch
')
* It affects only recipes with S = "${WORKDIR}", which wipe only
${S}/patches, because in other cases whole ${S} is wiped when
do_unpack is re-executed.
this is now causing issues to quilt-0.67 because it checks that
${S}/patches/series exists during 'quilt pop -a -f' which we call
from QuiltTree.Clean to undo patches possibly already applied
in ${S} in previous do_patch execution.
* There are couple recipes affected by this e.g. keymaps (.patch already
removed in oe-core), makedevs (.patch removal sent to ML yesterday
https://lists.openembedded.org/g/openembedded-core/message/166172),
devmem2
(https://lists.openembedded.org/g/openembedded-devel/message/97270), but
there are other recipes with S = "${WORKDIR}" where you can trigger this
e.g. by having a .patch file in DISTRO layer .bbappend (e.g. tzdata with
webOS
https://github.com/webosose/meta-webosose/blob/06e5298d9f5c47679b679081d9930f8d1c776142/meta-webos/recipes-extended/tzdata/tzdata.bbappend#L10)
The shortest sequence to reproduce this is just
bitbake keymaps -c patch
bitbake keymaps -c unpack -f
bitbake keymaps -c patch
with
https://git.openembedded.org/openembedded-core/commit/?id=17d981005a0c0c97702ad88602b7181b69bcc9eb
reverted.
And the change in quilt behavior is causing QuiltTree.Clean (quilt pop -a -f) in:
https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/patch.py?id=17d981005a0c0c97702ad88602b7181b69bcc9eb#n601
to silently fail with "No series file found" before undoing the
patches in ${S} and then quilt push failing, because all the
patches are _still_ applied in ${S}.
Removing ".pc" doesn't help, because we really
need quilt's help to undo the patches (in this case to delete COPYING
file from WORKDIR before applying the .patch which tries to add it
again), because do_unpack cannot just wipe S and start over (because S
== WORKDIR) - nor selectively removing the files listed in SRC_URI,
because COPYING file isn't listed there.
Using skip_series_check in 'quilt pop' (partially reverting the change
from upstream) does fix this as well and it's simple one line patch
(just adding skip_series_check=1 in pop.in), but might be difficult
to upstream, because it's this strange OE specific behavior that we
remove 'patches' directory and then still need quilt pop to work.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Robert Yang [Fri, 27 May 2022 07:07:11 +0000 (00:07 -0700)]
systemd: Set RebootWatchdogSec to 60s as watchdog
The systemd-shutdown sets watchdog timeout to 10m (600 seconds) which is too
large, and caused errors when reboot on boars such as rpi4:
systemd-shutdown[1]: Failed to set timeout to 10min: Invalid argument
The watchog's default value is 60s, so set RebootWatchdogSec to 60s to fix the
errors. And <machin.conf> can set WATCHDOG_TIMEOUT when needed, for example,
the max timeout of rpi4 is 15 seconds.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 29 May 2022 10:51:59 +0000 (11:51 +0100)]
cve-check: Allow warnings to be disabled
When running CVE checks in CI we're usually not interested in warnings on the
console for any CVEs present. Add a configuration option CVE_CHECK_SHOW_WARNINGS
to allow this to be disabled (it is left enabled by default).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Dmitry Baryshkov [Fri, 27 May 2022 17:22:55 +0000 (20:22 +0300)]
go.bbclass: fix path to linker in native Go builds
Building native Go tools results in the tool pointing to the wrong
location of dynamic linker (see below). The linker is looked up in the
temporary dir, which can be removed if rm_work is inherited. This
results in being unable to execute the program with the 'No such file or
directory' error. Override linker specificiation for native recipes (and
let Go build environment to pick up a correct one on it's own).
The error is observed in case the distro doesn't use uninative.bbclass.
If uninative.bbclass is used, the binary will be patched automatically
to use the uninative loader instead of the system one.
Without this patch:
$ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man
linux-vdso.so.1 (0x00007ffe945ec000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3a7490e000)
/home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/x86_64-linux/go-md2man-native/1.0.10+gitAUTOINC+f79a8a8ca6-r0/recipe-sysroot-native/usr/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f3a74d13000)
$ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help
-bash: tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man: No such file or directory
With the patch
$ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man
linux-vdso.so.1 (0x00007ffd19dbf000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d44181000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2d44586000)
$ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help
Usage of tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man:
-in string
Path to file to be processed (default: stdin)
-out string
Path to output processed file (default: stdout)
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 27 May 2022 16:05:44 +0000 (17:05 +0100)]
python3: Ensure stale empty python module directories don't break the build
There are two issues inside importlib. Firstly, the modules are accessed in
on disk order. This means behaviour seen on one system might not reproduce
on another and is a real headache.
Secondly, empty directories left behind by previous modules might be looked
at. This has caused a long string of different issues for us.
As a result, patch this to a behaviour which works for us. Upstream discussion
can follow later, this is breaking builds for too many people to leave unpatched.
[YOCTO #14816]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 27 May 2022 10:43:36 +0000 (11:43 +0100)]
python3: Remove problematic paths from sysroot files
In the native sysroot we should never have paths to the python3-native
build directory. These may or may not exist at the time some dependency
is building and nothing should rely upon them.
I suspect nothing is relying on this at the moment but clean up
just to be sure.
The various config copies are adjusted to be modified consistently as some
copies were and some were not. The Makefile has the "bad" ${B} paths
replaced with a dummy placeholder too.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Tue, 24 May 2022 12:03:07 +0000 (13:03 +0100)]
lzo: Add further info to a patch and mark as Inactive-Upstream
Add some further info to the patch based on upstream changes. Given the last release
in 2017 and glaring issues on at least armv5, it does raise the question on whether
we should drop this. There are probably better compression tools now.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tobias Schmidl [Wed, 25 May 2022 12:25:26 +0000 (14:25 +0200)]
wic/plugins/images/direct: Allow changes in fstab on rootfs
Allow wic to also manipulate the rootfs entry in fstab, which it
currently refuses to write. Reasons one might want to do that include
using systemd-growfs via --fsoptions on /
With this change / is now handled exactly the same as other
mountpoints, the former exception seemingly was not even documented.
Richard Purdie [Wed, 25 May 2022 16:49:12 +0000 (17:49 +0100)]
cve-extra-exclusions: Add kernel CVEs
For OE-Core our policy is to stay as close to the kernel stable releases
as we can. This should ensure the bulk of the major kernel CVEs are fixed
and we don't dive into each individual issue as the stable maintainers are
much more able to do that.
Rather than just ignore all kernel CVEs which is what we have been doing,
list the ones we ignore on this basis here, allowing new issues to be
visible. If anyone wishes to clean up CPE entries with NIST for these, we'd
welcome than and then entries can likely be removed from here.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Chen Qi [Wed, 25 May 2022 05:55:56 +0000 (22:55 -0700)]
libsdl2: add back xvm and xinerama options
When building libsdl2-native, and I met a do_configure error as below.
| CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
| Please set them or make sure they are set and tested correctly in the CMake files:
| XINERAMA_LIB
This error appears on hosts with libxinerama-dev installed.
leimaohui [Wed, 25 May 2022 03:48:09 +0000 (11:48 +0800)]
gnutls: Added fips option.
- Added a patch to avoid excute fipshmac command. Because *.hmac
file should be created on target instead of on build environment.
- Added pkg_postinst_ontarget to make sure necessary files are
created on target.
Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Naveen Saini [Wed, 25 May 2022 02:43:29 +0000 (10:43 +0800)]
pciutils: avoid lspci conflict with busybox
if virtualization is enabled as DISTRO_FEATURES, then meta-virtualization layer
enables CONFIG_LSPCI=y for busybox, which in result have conflicts with pciutils
update-alternatives: Error: not linking ..core-image-base/1.0-r0/rootfs/usr/bin/lspci
to /bin/busybox.nosuid since
..core-image-base/1.0-r0/rootfs/usr/bin/lspci exists and is not a link
So marking it as ALTERNATIVE with ALTERNATIVE_PRIORITY set to 100
Ernst Sjöstrand [Tue, 24 May 2022 11:50:21 +0000 (13:50 +0200)]
cve-check: Only include installed packages for rootfs manifest
Before this the rootfs manifest and the summary were identical.
We should separate the summary and rootfs manifest more clearly,
now the summary is for all CVEs and the rootfs manifest is only for
things in that image. This is even more useful if you build multiple
images.
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wangmy [Tue, 24 May 2022 08:33:44 +0000 (16:33 +0800)]
init-system-helpers: upgrade 1.62 -> 1.63
Changelog:
==========
* Remove constraints unnecessary since buster
* init-system-helpers: Drop versioned constraint on perl-base in Depends.
* init: Drop versioned constraint on init-system-helpers in Depends.
* t/helpers.pm: use installed version of deb-systemd-helper if
TEST_INSTALLED is set
* add DPKG_ROOT support (Closes: #983421)
* Add additional error checking on write operations.
The 'close()' call can fail on both read and write - while the read is
usually relatively benign, for the write counter part can include "fun"
errors. Most of these would most likely be persistent issues, but it makes
sense to detect errors as early possible.
* service: use 'grep -F' instead of 'egrep'
'egrep' and 'fgrep' have been deprecated in GNU grep since 2007, and in
current post 3.7 Git they have been made to emit obsolescence warnings.
The occurrence in 'service' uses a non-regex argument, so switch to 'grep
-F' instead of '-E'.
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wangmy [Tue, 24 May 2022 08:33:42 +0000 (16:33 +0800)]
bind: upgrade 9.18.2 -> 9.18.3
Changelog:
==========
[security]
Fix a crash in DNS-over-HTTPS (DoH) code caused by
premature TLS stream socket object deletion.
(CVE-2022-1183) [GL #3216]
[bug]
RPZ NSIP and NSDNAME rule processing didn't handle stub
and static-stub zones at or above the query name. This
has now been addressed. [GL #3232]
Fixed a deadlock that could occur if an rndc
connection arrived during the shutdown of network
interfaces. [GL #3272]
Refactor the fctx_done() function to set fctx to
NULL after detaching, so that reference counting
errors will be easier to avoid. [GL #2969]
udp_recv() in dispatch could trigger an INSIST when the
callback's result indicated success but the response
was canceled in the meantime. [GL #3300]
Work around a jemalloc quirk which could trigger an
out-of-memory condition in named over time. [GL #3287]
If there was a pending negative cache DS entry,
validations depending upon it could fail. [GL #3279]
dig returned a 0 exit status on UDP connection failure.
[GL #3235]
Fix an assertion failure when using dig with +nssearch
and +tcp options by starting the next query in the
send_done() callback (like in the UDP mode) instead
of doing that recursively in start_tcp(). Also
ensure that queries interrupted while connecting
are detached properly. [GL #3144]
Don't remove CDS/CDNSKEY DELETE records on zone sign
when using 'auto-dnssec maintain;'. [GL #2931]
[contrib]
Avoid name space collision in dlz modules by prefixing
functions with 'dlz_'. [GL !5778]
dlz: Add FALLTHROUGH and UNREACHABLE macros. [GL #3306]
[func]
Add new named command-line option -C to print built-in
defaults. [GL #1326]
Introduce the concept of broken catalog zones described
in the DNS catalog zones draft version 5 document.
[GL #3224]
Add DNS Extended Errors when stale answers are returned
from cache. [GL #2267]
Implement support for catalog zones change of ownership
(coo) mechanism described in the DNS catalog zones draft
version 5 document. [GL #3223]
Implement support for catalog zones options new syntax
based on catalog zones custom properties with "ext"
suffix described in the DNS catalog zones draft version
5 document. [GL #3222]
Implement reference counting for TLS contexts and
allow reloading of TLS certificates on reconfiguration
without destroying the underlying TCP listener sockets
for TLS-based DNS transports. [GL #3122]
Add support for remote TLS certificates
verification, both to BIND and dig, making it possible
to implement Strict and Mutual TLS authentication,
as described in RFC 9103, Section 9.3. [GL #3163]
[cleanup]
Remove use of exclusive mode in ns_interfacemgr in
favor of rwlocked access to localhost and localnets
members of dns_aclenv_t structure. [GL #3229]
Remove the task exclusive mode use in ns_clientmgr.
[GL #3230]
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
After commit meta-oe/1582f81805ee3114bc1a44bd5cf52d21f96702ca
fwupd gives an error when trying to build with musl because
efivar is not compatible. This fixes the issue.
Raphael Teller [Mon, 23 May 2022 08:10:44 +0000 (10:10 +0200)]
kernel.bbclass: Do not overwrite recipe's custom postinst
Allow recipe to set a custom postinst for kernel image.
Use prependVar in order to allow custom postinst to be
ran after default postinst, potentially modifying the
installed file/symlink.
Jiaqing Zhao [Mon, 23 May 2022 02:20:14 +0000 (10:20 +0800)]
systemd: Correct path returned in sd_path_lookup()
In oe-core, sysusers.d/sysctl.d/binfmt.d/modules-load.d are still kept
under /usr/lib instead of /lib changed in systemd v246. This patch
corrects the SD_PATH_{SYSUSERS,SYSCTL,BINFMT,MODULES_LOAD} returned
in sd_path_lookup() back to the /usr/lib ones.
Also updates the patch description and upstream status.
Jiaqing Zhao [Mon, 23 May 2022 02:20:12 +0000 (10:20 +0800)]
systemd: Remove __compare_fn_t type in musl-specific patch
Since systemd v250, commit d8f16737005e ("sort-util: avoid using
glibc's internal __compar_d_fn_t type"), __compare_fn_t type is no
longer used. This patch removes that type in the musl-specific patch.
Richard Purdie [Mon, 23 May 2022 12:42:28 +0000 (13:42 +0100)]
scripts/patchreview: Make json output human parsable
Sort dict keys in the json output and use tab spacing. This means
when commited into git, the diffs are human readable but it is more
compact filesize than space indentation.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The previous changes cause sstatetests.SStateTests.test_sstate_32_64_same_hash
to fail since RUST_XXX_SYS changes depending on the native architecture. This
is correct but these are accounted for in the layout of paths in TMPDIR so
they should be excluded from the task signatures for the correct behaviour.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 21 May 2022 13:02:47 +0000 (14:02 +0100)]
rust-common: Drop LLVM_TARGET and simplify
This all seems over complicated for something which is basically always
one of two values. This might even help cross-canadian work on something
which isn't x86-64.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Sundeep KOKKONDA [Fri, 13 May 2022 05:59:23 +0000 (22:59 -0700)]
rust-common: Fix for target definitions returning 'NoneType' for arm
[YOCTO #14742]
The build shows below error while building for arm machines.
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Detailed error info :
Steps to reproduce:
1. Set MACHINE ?= "qemuarm" in local.conf & add 'TOOLCHAIN_HOST_TASK:append = " packagegroup-rust-cross-canadian-${MACHINE}"'
2. bitbake core-image-minimal -cpopulate_sdk
Complete Error:
ERROR: rust-cross-canadian-arm-1.59.0-r0 do_rust_gen_targets: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_rust_gen_targets(d)
0003:
File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian-common.inc', lineno: 31, function: do_rust_gen_targets
0027:
0028:LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}"
0029:python do_rust_gen_targets () {
0030: wd = d.getVar('WORKDIR') + '/targets/'
*** 0031: rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
0032: rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
0033: rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
0034:}
0035:
File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-common.inc', lineno: 330, function: rust_gen_target
0326: # build tspec
0327: tspec = {}
0328: tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi)
0329: tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
*** 0330: tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
0331: tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
0332: tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)
0333: tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
0334: tspec['arch'] = arch_to_rust_target_arch(rust_arch)
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Below are the local variables from rust_gen_target function for arm and
aarch64 targets. Refer below, the tspec varibles for 'arm' generated with NoneType.
(a) Locals at rust_gen_target for arm::
tspec['data-layout'] = None, Type of tspec['data-layout'] = <class 'NoneType'>
tspec['data-layout'] = None, Type of tspec['data-layout'] = <class 'NoneType'>
DEBUG: Python function do_rust_gen_targets finished
(b) Locals at rust_gen_target for aarch64::
tspec['data-layout'] = aarch64-unknown-linux-gnu, Type of tspec['data-layout'] = <class 'str'>
tspec['max-atomic-width'] = 128, Type of tspec['max-atomic-width'] = <class 'int'>
Reason for changing arm-eabi to arm: The earlier changes introduced this bug, so reverting the change 'arm-eabi' to 'arm' fixed the issue.
Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Sundeep KOKKONDA [Sat, 21 May 2022 09:05:54 +0000 (10:05 +0100)]
rust-common: Ensure sstate signatures have correct dependencues for do_rust_gen_targets
The do_rust_gen_targets task was not rerunning when the configuration variables it
uses were changed. Add the missing variable dependencies to fix this.
[RP: Split to separate patch and add commit message] Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 21 May 2022 09:00:50 +0000 (10:00 +0100)]
rust-common: Fix sstate signatures between arm hf and non-hf
Building with MACHINE=qemuarm and MACHINE=qemux86-64 causes rust-native
to rebuild. The reason is all the ingredients into the RUST_*_SYS
variables are being tracked but that doesn't really make sense in this
case:
# In some cases uname and the toolchain differ on their idea of the arch name
-TUNE_FEATURES{callconvention-hard} = Set
+TUNE_FEATURES{callconvention-hard} = Unset
Switch to using the final variable value for sstate signature purposes
which avoids this issue.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alex Kiernan [Sat, 21 May 2022 08:25:20 +0000 (09:25 +0100)]
eudev: Use PACKAGE_BEFORE_PN/${PN}, clean up spaces
Use PACKAGE_BEFORE_PN for packages which need to capture files early,
switch to idiomatic ${PN} for additional packages. Swap spaces for tabs
in shell functions.
Signed-off-by: Alex Kiernan <alexk@zuma.ai> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alex Kiernan [Sat, 21 May 2022 08:25:19 +0000 (09:25 +0100)]
eudev: Cleanup redundant configuration
hid2hci moved to bluez4 in 2011. The FILES changes for ${PN} and
${PN}-dev only added existing defaults into the set.
Signed-off-by: Alex Kiernan <alexk@zuma.ai> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alex Kiernan [Sat, 21 May 2022 08:25:18 +0000 (09:25 +0100)]
eudev: Convert dependencies to PACKAGECONFIG
GObject support was dropped in 252150e181c5 ("src/gudev: remove Gobject
libudev support."), drop all g-i-r support which appears to be dead
upstream.
Fill out PACKAGECONFIG options.
Signed-off-by: Alex Kiernan <alexk@zuma.ai> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Changqing Li [Fri, 20 May 2022 11:05:09 +0000 (19:05 +0800)]
eudev: create static-nodes in init script
dev in modules.devname should be populated in /dev on boot. remove
create static mode from udevd will make these devices cannot be
populated. Since commit [1], when use sysVinit, devices like
/dev/net/tun will not be created.
more info:
udevd in systemd also remove create static mode in udevd, but using
service kmod-static-nodes.service and systemd-tmpfiles-setup-dev.service
in systemd to create these node, so systemd works well.
For sysV, parse kmod static-nodes and generate the device nodes in init
Markus Volk [Thu, 19 May 2022 15:05:23 +0000 (17:05 +0200)]
mesa.inc: package 00-radv-defaults.conf
this fixes:
ERROR: mesa-2_22.0.2-r0 do_package: QA Issue: mesa: Files/directories were installed but not shipped in any package:
/usr/share/drirc.d/00-radv-defaults.conf
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
mesa: 1 installed and not shipped files. [installed-vs-shipped]
Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Bruce Ashfield [Fri, 20 May 2022 00:46:09 +0000 (20:46 -0400)]
lttng-modules: fix build against 5.18-rc7+
lttng-modules fails to build against 5.18-rc7, the details of the fix
are as follows:
The commit [fix: sched/tracing: Don't re-read p->state when emitting
sched_switch event (v5.18)] was correct, but the kernel changed their
mind with the following commit:
sched/tracing: Append prev_state to tp args instead
Commit fa2c3254d7cf (sched/tracing: Don't re-read p->state when emitting
sched_switch event, 2022-01-20) added a new prev_state argument to the
sched_switch tracepoint, before the prev task_struct pointer.
This reordering of arguments broke BPF programs that use the raw
tracepoint (e.g. tp_btf programs). The type of the second argument has
changed and existing programs that assume a task_struct* argument
(e.g. for bpf_task_storage access) will now fail to verify.
If we instead append the new argument to the end, all existing programs
would continue to work and can conditionally extract the prev_state
argument on supported kernel versions.
Fixes: fa2c3254d7cf (sched/tracing: Don't re-read p->state when emitting sched_switch event, 2022-01-20) Signed-off-by: Delyan Kratunov <delyank@fb.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Link: https://lkml.kernel.org/r/c8a6930dfdd58a4a5755fc01732675472979732b.camel@fb.com
By reordering the parameters (again) we can get back up and building.
Upstream-Status: Backport
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>