Peter Marko [Thu, 11 Aug 2022 12:35:13 +0000 (14:35 +0200)]
create-spdx: handle links to inaccessible locations
When a link is pointing to location inaccessible to build user (e.g. "/root/something"),
filepath.is_file() throws "PermissionError: [Errno 13] Permission denied".
Fix this by first checking if it is a link.
Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Khem Raj [Thu, 11 Aug 2022 05:54:30 +0000 (22:54 -0700)]
zip: Make configure checks to be more robust
Newer compilers are strict and have turned some warnings into hard
errors which results in subtle configure check failures. Therefore fix
these tests and also enable largefile support via cflags when its
desired
Khem Raj [Thu, 11 Aug 2022 05:54:29 +0000 (22:54 -0700)]
zip: Enable largefile support based on distro feature
The configure test tries to run a binary during build to determine
largefile support, which wont work in cross-compile mode, therefore
specify it when largefile DISTRO_FEATURE is on.
Changqing Li [Tue, 9 Aug 2022 11:47:22 +0000 (19:47 +0800)]
apt: fix nativesdk-apt build failure during the second time build
Run following commands:
bitbake nativesdk-apt
bitbake nativesdk-apt -c install -f
The second command's do_install will fail with following error:
| /build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot-native/usr/bin/x86_64-wrlinuxsdk-linux/x86_64-wrlinuxsdk-linux-g++ -D_WITH_GETLINE=1 -Dapt_pkg_EXPORTS -I/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/include -I/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/include/apt-pkg --sysroot=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot -O2 -pipe -fmacro-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0=/usr/src/debug/nativesdk-apt/2.4.5-r0 -fdebug-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0=/usr/src/debug/nativesdk-apt/2.4.5-r0 -fdebug-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot= -fdebug-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot-native= -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef -Wdouble-promotion -Wsuggest-override -Werror=suggest-override -Werror=return-type -std=gnu++17 -MD -MT apt-pkg/CMakeFiles/apt-pkg.dir/tagfile-keys.cc.o -MF apt-pkg/CMakeFiles/apt-pkg.dir/tagfile-keys.cc.o.d -o apt-pkg/CMakeFiles/apt-pkg.dir/tagfile-keys.cc.o -c /build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/apt-pkg/tagfile-keys.cc
| /build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/apt-pkg/tagfile-keys.cc:1:10: fatal error: /include/apt-pkg/tagfile-keys.h: No such file or directory
| 1 | #include "/include/apt-pkg/tagfile-keys.h"
0/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/apt-pkg/tagfile-keys.cc
During the first command, do_install task changed tagfile-keys.cc, this
will make tagfile-keys.cc is newer than the built tagfile-keys.cc.o. So the second
do_install will rebuild tagfile-keys.cc.o. But the header path is
replaced wrongly, so fix the header path
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Kevin Hao [Tue, 9 Aug 2022 10:28:19 +0000 (18:28 +0800)]
uboot-config.bbclass: Don't bail out early in multi configs
Previously we had the support to build multiple u-boot configs for a
machine, but after the change in the commit 801a27d73b10
("uboot-config.bbclass: Raise error for bad key"), this anonymous
function would bail out after handling the first config in UBOOT_CONFIG.
This is definitely not what we want. Fix it by making sure all the
configs are handled.
Fixed: 801a27d73b10 ("uboot-config.bbclass: Raise error for bad key") Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Khem Raj [Tue, 9 Aug 2022 05:41:19 +0000 (22:41 -0700)]
perl-cross: Correct function signatures in configure_func.sh
There are latent issues in function detection which were succeeding due
to compiler being lenient, but this is fast changing e.g. clang-15 has
turned the -Wimplicit-function-declaration into error which ends up
failing these tests and rightly so. Therefore try to improve the tests
to have proper prototypes known during compilation
classes: rootfs-postcommands: autologin root on serial-getty
when empty-root-password AND serial-autologin-root are part of the
IMAGE_FEATURES, save some of the developers time by not having to type
the (then still sole) 'root' username on the serial console after each
and every reboot
this is done by inserting '--autologin root' into the command line of
the responsible 'getty' service
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jose Quaresma [Fri, 22 Jul 2022 12:31:24 +0000 (13:31 +0100)]
archiver.bbclass: some recipes that uses the kernelsrc bbclass uses the shared source
This fix a race that happens when building some of the followning recipes
with kernel at same time.
The kernelsrc uses the kernel shared source dir as their source
S = "${STAGING_KERNEL_DIR}" and this will cause a race in the
do_unpack_and_patch task, when bitbake runs the
bb.build.exec_func('do_unpack', d) because do_unpack will
clean the source dir on startup.
| ok: note that S != "${STAGING_KERNEL_DIR} for this ones
openembedded-core/meta/recipes-kernel/perf/perf.bb:inherit kernelsrc
meta-openembedded/meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:inherit kernelsrc autotools-brokensep
Richard Purdie [Wed, 10 Aug 2022 17:55:54 +0000 (18:55 +0100)]
classes: Add SPDX license identifiers
As stated in our top level license files, the license is MIT unless
otherwise stated. Add SPDX identifers accordingly. Replace older
license statementa with the standardised syntax. Also drop "All
Rights Reserved" expression as it isn't used now, doesn't mean anything
and is confusing.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Wed, 10 Aug 2022 17:32:28 +0000 (18:32 +0100)]
scripts: Add copyright statements to files without one
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present and add license
identifiers as MIT if there isn't one.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 12 Aug 2022 07:11:00 +0000 (08:11 +0100)]
testexport: Fix to work as an image class
The class is mainly an image based class but one recipe does need to look
at values shared with the class and isn't an image. Move this to a conf
file instead, avoiding the need to pollute all recipes globally.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Thu, 11 Aug 2022 13:27:36 +0000 (14:27 +0100)]
perf: Fix reproducibility issues with 5.19 onwards
In 5.19 onwards the build process changed and encoded full build paths
into the output. Adapt the code to look more like our setuptools class
calls. This seems to work ok with older kernels too.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The systemd-udev-settle service is listed as obsolete and does in
some cases result in a significant boot time. Replace that with a
specific wait for the random source hardware device to be loaded.
Before this change:
Startup finished in 4.025s (kernel) + 2min 13.236s (userspace) = 2min 17.262s
multi-user.target reached after 2min 8.153s in userspace
After this change:
Startup finished in 3.956s (kernel) + 13.294s (userspace) = 17.250s
multi-user.target reached after 9.522s in userspace
Martin Jansa [Mon, 8 Aug 2022 16:06:12 +0000 (18:06 +0200)]
syslinux: Fix build with glibc-2.36
* add only necessary definitions from linux/fs.h, because including
whole file causes conflicts with sys/mount.h since glibc-2.36:
http://errors.yoctoproject.org/Errors/Details/664535/
Richard Purdie [Tue, 9 Aug 2022 14:55:55 +0000 (15:55 +0100)]
rust-cross-canadian: Use shell from SDK, not the host
rust sets LD_LIBRARY_PATH which causes a lot of problems with host
binaries conflicting with SDK libraries. By using sh/bash from the
SDK we avoid those issues.
[YOCTO #14878]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We therefore can't just copy one over the other or it leads to syntax/quoting
errors. We end up running make prepare anyway in all our tests so drop
this copy for fix 5.19 kernels.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Bruce Ashfield [Tue, 9 Aug 2022 03:38:00 +0000 (23:38 -0400)]
linux-yocto/5.15: update to v5.15.59
Updating to the latest korg -stable release that comprises
the following commits:
d676d6149a2f Linux 5.15.59 f0e42e43795d x86/bugs: Do not enable IBPB at firmware entry when IBPB is not available d10e819d13f7 locking/rwsem: Allow slowpath writer to ignore handoff bit if not set by first waiter 66d31cef4806 docs/kernel-parameters: Update descriptions for "mitigations=" param with retbleed 7bada8b0bdf1 EDAC/ghes: Set the DIMM label unconditionally 30dc2effc74a ARM: 9216/1: Fix MAX_DMA_ADDRESS overflow 86e83233dd01 page_alloc: fix invalid watermark check on a negative value 51a772c34ea4 mm/hmm: fault non-owner device private entries 350fcb5e7bbb ARM: crypto: comment out gcc warning that breaks clang builds e796e1fe20ec sctp: leave the err path free in sctp_stream_init to sctp_stream_free f7c2a9c5435a sfc: disable softirqs for ptp TX fe0e602f0502 perf symbol: Correct address for bss symbols 871168abe6d8 virtio-net: fix the race between refill work and close 91c11008aab0 netfilter: nf_queue: do not allow packet truncation below transport header offset be5cd347ba22 octeontx2-pf: cn10k: Fix egress ratelimit configuration 3688939cd3e8 sctp: fix sleep in atomic context bug in timer handlers 186fcdb68f42 i40e: Fix interface init with MSI interrupts (no MSI-X) 4685f16b3a5d ipv4: Fix data-races around sysctl_fib_notify_on_flag_change. eaccca7a0bb8 tcp: Fix data-races around sysctl_tcp_reflect_tos. 4cc070e0ef2d tcp: Fix a data-race around sysctl_tcp_comp_sack_nr. 34c9977b4dca tcp: Fix a data-race around sysctl_tcp_comp_sack_slack_ns. 6842c94de9d5 tcp: Fix a data-race around sysctl_tcp_comp_sack_delay_ns. 618116a273b7 net: Fix data-races around sysctl_[rw]mem(_offset)?. a610feb170bf tcp: Fix data-races around sk_pacing_rate. b01b4f5b45ff net: mld: fix reference count leak in mld_{query | report}_work() 5831ccf37a31 net: macsec: fix potential resource leak in macsec_add_rxsa() and macsec_add_txsa() 2959a86a472f macsec: always read MACSEC_SA_ATTR_PN as a u64 a706a40d42f4 macsec: limit replay window size with XPN 6ad56d5c4f98 macsec: fix error message in macsec_add_rxsa and _txsa 8991687d3bcf macsec: fix NULL deref in macsec_add_rxsa 830582c16be1 Documentation: fix sctp_wmem in ip-sysctl.rst dac5644a823e tcp: Fix a data-race around sysctl_tcp_invalid_ratelimit. 6f446677ebb3 tcp: Fix a data-race around sysctl_tcp_autocorking. bd07f2e70a4b tcp: Fix a data-race around sysctl_tcp_min_rtt_wlen. 922ca9fd221b tcp: Fix a data-race around sysctl_tcp_min_tso_segs. 777d18e65d09 net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() 40f4739bbd36 net: pcs: xpcs: propagate xpcs_read error to xpcs_get_state_c37_sgmii c721324afc58 igmp: Fix data-races around sysctl_igmp_qrv. ad6d6ae4a34c net/tls: Remove the context from the list in tls_device_down 189e370b8250 ipv6/addrconf: fix a null-ptr-deref bug for ip6_ptr 4845d3ef6445 net: ping6: Fix memleak in ipv6_renew_options(). 6a4a1c70e446 scsi: mpt3sas: Stop fw fault watchdog work item during system shutdown 3d3e41069b65 scsi: core: Fix warning in scsi_alloc_sgtables() ff2932ac8ee1 tcp: Fix a data-race around sysctl_tcp_challenge_ack_limit. a88de75673e4 tcp: Fix a data-race around sysctl_tcp_limit_output_bytes. 664a3311e671 tcp: Fix data-races around sysctl_tcp_moderate_rcvbuf. 59e2332846d8 octeontx2-pf: Fix UDP/TCP src and dst port tc filters 927c5cf0ba3e Revert "tcp: change pingpong threshold to 3" bdaf56e0df15 scsi: ufs: host: Hold reference returned by of_parse_phandle() 7f0a36506809 ice: do not setup vlan for loopback VSI cef4c1d0fb48 ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) 62e721dee8cc tcp: Fix data-races around sysctl_tcp_no_ssthresh_metrics_save. aa2ca5b5629d tcp: Fix a data-race around sysctl_tcp_nometrics_save. 6e167ed68999 tcp: Fix a data-race around sysctl_tcp_frto. 0d8fa3c2a442 tcp: Fix a data-race around sysctl_tcp_adv_win_scale. 74753ec663d7 tcp: Fix a data-race around sysctl_tcp_app_win. 807b028115eb tcp: Fix data-races around sysctl_tcp_dsack. c9c01dd38975 watch_queue: Fix missing locking in add_watch_to_object() 093610f216d0 watch_queue: Fix missing rcu annotation 11c1cc3f6e42 drm/simpledrm: Fix return type of simpledrm_simple_display_pipe_mode_valid() 121c8993d4f3 nouveau/svm: Fix to migrate all requested pages 8bd9747d3066 s390/archrandom: prevent CPACF trng invocations in interrupt context 71f71150115a asm-generic: remove a broken and needless ifdef conditional dc124c849c72 hugetlb: fix memoryleak in hugetlb_mcopy_atomic_pte 2722fb0f7028 mm: fix page leak with multiple threads mapping the same page 70d0ce332d26 secretmem: fix unhandled fault in truncate 3ef8040afce7 fs: sendfile handles O_NONBLOCK of out_fd 518df26b5238 ntfs: fix use-after-free in ntfs_ucsncmp() 46f6301fb4f1 Revert "ocfs2: mount shared volume without ha stack" f32d5615a78a Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Mon, 8 Aug 2022 14:32:29 +0000 (15:32 +0100)]
rust-common: Remove conflict with utils create_wrapper
utils already has a create_wrapper function which I tried to use from cargo
and got unexpected results. Rename the rust function to avoid this conflict
of named.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>