Re: [OE-core] [PATCH] llvm: remove libLTO.so.*

2023-08-21 Thread Alexander Kanavin
But shouldn’t this be backwards? If building llvm results in installing the
item, then it’s other recipes that need to ensure they don’t clash with it.
Patching out llvm after the fact in do_install seems incorrect.

Alex

On Mon 21. Aug 2023 at 4.37, Kai Kang  wrote:

> From: Kai Kang 
>
> Remove libLTO.so.* from llvm which should be provided by clang and
> packaged to llvm-linker-tools. It could avoids the error:
>
> ERROR: clang-16.0.6-r0 do_create_spdx: The recipe clang is trying to
>install files into a shared area when those files already exist.
>Those files and their manifest location are:
>   /path_to/tmp/deploy/spdx/core2-64/packages/liblto16.spdx.json
> (matched in manifest-core2-64-llvm.create_spdx)
> Please verify which recipe should provide the above files.
>
> Signed-off-by: Kai Kang 
> ---
>  meta/recipes-devtools/llvm/llvm_git.bb | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb
> b/meta/recipes-devtools/llvm/llvm_git.bb
> index f3d6f24bd2..ce9ebfa997 100644
> --- a/meta/recipes-devtools/llvm/llvm_git.bb
> +++ b/meta/recipes-devtools/llvm/llvm_git.bb
> @@ -106,7 +106,7 @@ do_compile() {
>
>  do_install() {
>  if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false',
> d)}; then
> -   DESTDIR=${D} ninja -v install
> +DESTDIR=${D} ninja -v install
>
>  # llvm harcodes usr/lib as install path, so this corrects it to
> actual libdir
>  mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
> @@ -117,6 +117,10 @@ do_install() {
>
>  # reproducibility
>  sed -i -e 's,${WORKDIR},,g'
> ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
> +
> +# remove libLTO.so.* which should be provided by clang and
> packaged to
> +# llvm-linker-tools
> +rm -f ${D}/${libdir}/libLTO.so.*
>  fi
>  }
>
> @@ -134,7 +138,7 @@ llvm_sysroot_preprocess() {
> ln -sf llvm-config
> ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
>  }
>
> -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm
> ${PN}-liboptremarks ${PN}-liblto"
> +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm
> ${PN}-liboptremarks"
>
>  RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello
> ${PN}-liboptremarks"
>
> @@ -146,10 +150,6 @@ FILES:${PN}-libllvm = "\
>  ${libdir}/libLLVM-${MAJOR_VERSION}.so \
>  "
>
> -FILES:${PN}-liblto += "\
> -${libdir}/libLTO.so.* \
> -"
> -
>  FILES:${PN}-liboptremarks += "\
>  ${libdir}/libRemarks.so.* \
>  "
> --
> 2.34.1
>
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186422): 
https://lists.openembedded.org/g/openembedded-core/message/186422
Mute This Topic: https://lists.openembedded.org/mt/100866486/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/3] core-image-minimal: increase extra space to pass df.py oeqa runtime test

2023-08-21 Thread Mikko Rapeli
testimage.bbclass requires that ssh communication with target works
and then it runs oeqa runtime tests with that. Tests like df.py
check that there is more than 5Mb free space on the rootfs on target. Sadly
latest core-image-minimal only has 1.5 Mb free space if
ssh-server-dropbear is added to it. Thus by default, core-image-minimal
is now failing oeqa rutime df.py test.

Fix this by increasing core-image-minimal rootfs size by 5Mb if
testimage.bbclass is used which implies adding either
ssh-server-dropbear or ssh-server-openssh to the target rootfs.

Signed-off-by: Mikko Rapeli 
---
 meta/recipes-core/images/core-image-minimal.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/images/core-image-minimal.bb 
b/meta/recipes-core/images/core-image-minimal.bb
index 84343adcd8..c04612bc15 100644
--- a/meta/recipes-core/images/core-image-minimal.bb
+++ b/meta/recipes-core/images/core-image-minimal.bb
@@ -10,3 +10,6 @@ inherit core-image
 
 IMAGE_ROOTFS_SIZE ?= "8192"
 IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("DISTRO_FEATURES", 
"systemd", " + 4096", "", d)}"
+
+# a bit more space needed for sshd to actually run the tests
+IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("IMAGE_CLASSES", 
"testimage", " + 5120", "", d)}"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186423): 
https://lists.openembedded.org/g/openembedded-core/message/186423
Mute This Topic: https://lists.openembedded.org/mt/100869823/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/3] testimage.bbclass: detect slirp from TEST_RUNQEMUPARAMS

2023-08-21 Thread Mikko Rapeli
Also set target and server IP addresses correctly to 127.0.0.1
so that TEST_TARGET_IP and TEST_SERVER_IP don't
need to be set manually with slirp.

Users run qemu images with slirp networking like this:

$ bitbake core-image-minimal
$ ../poky/scripts/runqemu slirp

slirp networking means that only one TCP port is forwarded from host
system to the qemu machine so that ssh into the machine works. ping
and other low level networking from host to target machine do not work,
but networking from target via host does work. This is much more easy to
setup than the bridge networking used by default, which I've never
managed to get running on various host machines.

To use slirp networking wita qemu and core-image-minimal to run 
testimage.bbclass tests, add
these to local.conf:

IMAGE_CLASSES += "testimage"
IMAGE_FEATURES += "ssh-server-dropbear"
TEST_RUNQEMUPARAMS += "slirp"

Then image can be compiled and tested with:

$ bitbake core-image-minimal
$ bitbake -c testimage core-image-minimal

Note that only few of the current oeqa runtime tests work against
core-image-minimal, but test results look like:

RESULTS:
RESULTS - date.DateTest.test_date: PASSED (3.64s)
RESULTS - df.DfTest.test_df: PASSED (0.55s)
RESULTS - oe_syslog.SyslogTest.test_syslog_running: PASSED (0.56s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_logger: PASSED (1.88s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_restart: PASSED (0.93s)
RESULTS - pam.PamBasicTest.test_pam: PASSED (2.20s)
RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (4.98s)
RESULTS - ping.PingTest.test_ping: PASSED (0.05s)
RESULTS - ssh.SSHTest.test_ssh: PASSED (1.28s)
RESULTS - systemd.SystemdBasicTests.test_systemd_basic: PASSED (0.56s)
RESULTS - systemd.SystemdBasicTests.test_systemd_failed: PASSED (1.10s)
RESULTS - systemd.SystemdBasicTests.test_systemd_list: PASSED (0.92s)
RESULTS - systemd.SystemdJournalTests.test_systemd_boot_time: PASSED (0.56s)
RESULTS - systemd.SystemdJournalTests.test_systemd_journal: PASSED (0.54s)
RESULTS - apt.AptRepoTest.test_apt_install_from_repo: SKIPPED (0.00s)
RESULTS - buildcpio.BuildCpioTest.test_cpio: SKIPPED (0.00s)
RESULTS - buildgalculator.GalculatorTest.test_galculator: SKIPPED (0.00s)
RESULTS - buildlzip.BuildLzipTest.test_lzip: SKIPPED (0.00s)
RESULTS - connman.ConnmanTest.test_connmand_help: SKIPPED (0.00s)
RESULTS - connman.ConnmanTest.test_connmand_running: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_help: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_history: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_info: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_search: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_version: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_exclude: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_dependency: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_disk: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_http: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot_usrmerge: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_makecache: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_reinstall: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_repoinfo: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gcc_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gpp2_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gpp_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_make: SKIPPED (0.00s)
RESULTS - gi.GObjectIntrospectionTest.test_python: SKIPPED (0.00s)
RESULTS - go.GoHelloworldTest.test_gohelloworld: SKIPPED (0.00s)
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module: SKIPPED (0.00s)
RESULTS - ldd.LddTest.test_ldd: SKIPPED (0.00s)
RESULTS - logrotate.LogrotateTest.test_logrotate_newlog: SKIPPED (0.00s)
RESULTS - logrotate.LogrotateTest.test_logrotate_wtmp: SKIPPED (0.00s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_startup_config: SKIPPED (0.00s)
RESULTS - opkg.OpkgRepoTest.test_opkg_install_from_repo: SKIPPED (0.00s)
RESULTS - perl.PerlTest.test_perl_works: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED (0.00s)
RESULTS - python.PythonTest.test_python3: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_help: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_query: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_query_nonroot: SKIPPED (0.00s)
RESULTS - 
rpm.RpmInstallRemoveTest.test_check_rpm_install_removal_log_file_size: SKIPPED 
(0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_install: SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_remove: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_cargo_compile: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_rust_compile: SKIPPED (0.00s)
RESULTS - scp.S

[OE-core] [PATCH v2 1/2] oeqa: wic: Add test for --no-table option

2023-08-21 Thread Markus Niebel
Add basic test for the --no-table wic part option.

Signed-off-by: Markus Niebel 
---
v2: add this test case

 meta/lib/oeqa/selftest/cases/wic.py | 17 +
 1 file changed, 17 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index a3c6deb5aa..aa61349ed1 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -731,6 +731,23 @@ part /etc --source rootfs --fstype=ext4 
--change-directory=etc
 size = os.path.getsize(wicout[0])
 self.assertTrue(size > extraspace)
 
+def test_no_table(self):
+"""Test --no-table wks option."""
+wks_file = 'temp.wks'
+
+# Absolute argument.
+with open(wks_file, 'w') as wks:
+wks.write("part testspace --no-table --fixed-size 16k --offset 
4080k")
+runCmd("wic create %s --image-name core-image-minimal -o %s" % 
(wks_file, self.resultdir))
+
+wicout = glob(os.path.join(self.resultdir, "*.*"))
+
+self.assertEqual(1, len(wicout))
+size = os.path.getsize(wicout[0])
+self.assertEqual(size, 4 * 1024 * 1024)
+
+os.remove(wks_file)
+
 class Wic2(WicTestCase):
 
 def test_bmap_short(self):
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186425): 
https://lists.openembedded.org/g/openembedded-core/message/186425
Mute This Topic: https://lists.openembedded.org/mt/100869947/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 2/2] wic: fix wrong attempt to create file system in unpartitioned regions

2023-08-21 Thread Markus Niebel
The kickstart parser defaults fstype to "vfat". This leads to an attempt
to create an empty file system even for regions configured with "--no-table"
if used without fstype when no --sourceparams given.

The fix tests for fstype "none" or no_table in Partition prepare method.
This will omit the file system creation an the potential error for small
region with --no-table option.

Signed-off-by: Markus Niebel 
---

v2: fix typo in description

 scripts/lib/wic/partition.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index bda4aef1b4..f11c393df5 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -134,7 +134,7 @@ class Partition():
 self.update_fstab_in_rootfs = True
 
 if not self.source:
-if self.fstype == "none":
+if self.fstype == "none" or self.no_table:
 return
 if not self.size and not self.fixed_size:
 raise WicError("The %s partition has a size of zero. Please "
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186426): 
https://lists.openembedded.org/g/openembedded-core/message/186426
Mute This Topic: https://lists.openembedded.org/mt/100869960/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 3/3] selftest runtime_test.py: add testimage.bbclass slirp test

2023-08-21 Thread Mikko Rapeli
Builds core-image-minimal with testimage.bbclass and an ssh server
and then runs tests with slirp networking. Default test suite must
pass.

With full caches on x86_64 with x86_64 target the test passes in 416 seconds:

2023-08-21 09:01:12,295 - oe-selftest - INFO - Ran 1 test in 464.955s
2023-08-21 09:01:12,295 - oe-selftest - INFO - OK
2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS:
2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS - 
runtime_test.TestImage.test_testimage_slirp: PASSED (416.62s)
2023-08-21 09:01:19,711 - oe-selftest - INFO - SUMMARY:
2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 
464.956s
2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest - OK - All required 
tests passed (successes=1, skipped=0, failures=0, errors=0)

Signed-off-by: Mikko Rapeli 
---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py 
b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 463679dd32..d8dca7f671 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -129,6 +129,21 @@ class TestImage(OESelftestTestCase):
 bitbake('core-image-full-cmdline socat')
 bitbake('-c testimage core-image-full-cmdline')
 
+def test_testimage_slirp(self):
+"""
+Summary: Check basic testimage functionality with qemu and slirp 
networking.
+"""
+
+features = '''
+IMAGE_CLASSES += "testimage"
+IMAGE_FEATURES += "ssh-server-dropbear"
+TEST_RUNQEMUPARAMS += "slirp"
+'''
+self.write_config(features)
+
+bitbake('core-image-minimal')
+bitbake('-c testimage core-image-minimal')
+
 def test_testimage_dnf(self):
 """
 Summary: Check package feeds functionality for dnf
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186427): 
https://lists.openembedded.org/g/openembedded-core/message/186427
Mute This Topic: https://lists.openembedded.org/mt/100869975/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] wic: fix wrong attempt to create file system in upartitioned regions

2023-08-21 Thread Markus Niebel

Hello Alexander,

Am Freitag, dem 18.08.2023 um 11:52 + schrieb Alexander Kanavin:
> 
> Does this mean there is a missing test for wic? Can you add one?
> 

sorry for being not an expert. I hope the basic test I will send with
v2 of the patch is usable as a starting point.

> Alex
> 

Markus

> On Fri, 18 Aug 2023 at 13:44, Markus Niebel
>  wrote:
> > The kickstart parser defaults fstype to "vfat". This leads to an
> > attempt
> > to create an empty file system even for regions configured with "
> > --no-table"
> > if used without fstype when no --sourceparams given.
> > 
> > The fix tests for fstype "none" or no_table in Partition prepare
> > method.
> > This will omit the file system creation an the potential error for
> > small
> > region with --no-table option.
> > 
> > Signed-off-by: Markus Niebel 
> > ---
> >  scripts/lib/wic/partition.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/lib/wic/partition.py
> > b/scripts/lib/wic/partition.py
> > index bda4aef1b4..f11c393df5 100644
> > --- a/scripts/lib/wic/partition.py
> > +++ b/scripts/lib/wic/partition.py
> > @@ -134,7 +134,7 @@ class Partition():
> >  self.update_fstab_in_rootfs = True
> > 
> >  if not self.source:
> > -if self.fstype == "none":
> > +if self.fstype == "none" or self.no_table:
> >  return
> >  if not self.size and not self.fixed_size:
> >  raise WicError("The %s partition has a size of
> > zero. Please "
> > --
> > 2.25.1
> > 
-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186428): 
https://lists.openembedded.org/g/openembedded-core/message/186428
Mute This Topic: https://lists.openembedded.org/mt/100818637/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] wic: fix wrong attempt to create file system in upartitioned regions

2023-08-21 Thread Alexander Kanavin
On Mon, 21 Aug 2023 at 12:26, Markus Niebel
 wrote:
> > Does this mean there is a missing test for wic? Can you add one?
> >
>
> sorry for being not an expert. I hope the basic test I will send with
> v2 of the patch is usable as a starting point.

As long as the test fails without the fix, and passes with the fix, it
should be fine, thanks. Can you check the former (i.e. that it does
fail)?

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186429): 
https://lists.openembedded.org/g/openembedded-core/message/186429
Mute This Topic: https://lists.openembedded.org/mt/100818637/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [[meta-oe][dunfell][PATCH]] rapidjson: Avoid usage of nobranch=1

2023-08-21 Thread Sourav Kumar Pramanik
From: Sourav Pramanik 

The usage of nobranch=1 in SRC_URI allows using unprotected branches.

This change updates the real branch name in place of nobranch=1.

Signed-off-by: Sourav Kumar Pramanik 
---
 meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb 
b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
index 04ac93e92..bc90bffe5 100644
--- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
+++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125"
 
-SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1;protocol=https"
+SRC_URI = "git://github.com/miloyip/rapidjson.git;branch=master;protocol=https"
 
 SRCREV = "0ccdbf364c577803e2a751f5aededce935314313"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186430): 
https://lists.openembedded.org/g/openembedded-core/message/186430
Mute This Topic: https://lists.openembedded.org/mt/100870588/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta-oe][dunfell][PATCH] rapidjson: Avoid usage of nobranch=1

2023-08-21 Thread Sourav Kumar Pramanik
From: Sourav Pramanik 

The usage of nobranch=1 in SRC_URI allows using unprotected branches.

This change updates the real branch name in place of nobranch=1.

Signed-off-by: Sourav Kumar Pramanik 
---
 meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb 
b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
index 04ac93e92..bc90bffe5 100644
--- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
+++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125"
 
-SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1;protocol=https"
+SRC_URI = "git://github.com/miloyip/rapidjson.git;branch=master;protocol=https"
 
 SRCREV = "0ccdbf364c577803e2a751f5aededce935314313"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186431): 
https://lists.openembedded.org/g/openembedded-core/message/186431
Mute This Topic: https://lists.openembedded.org/mt/100870655/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [meta-oe][dunfell][PATCH] rapidjson: Avoid usage of nobranch=1

2023-08-21 Thread Alexander Kanavin
Thanks, the correct mailing list is openembedded-devel, not oe-core.

Alex

On Mon, 21 Aug 2023 at 13:18, Sourav Kumar Pramanik
 wrote:
>
> From: Sourav Pramanik 
>
> The usage of nobranch=1 in SRC_URI allows using unprotected branches.
>
> This change updates the real branch name in place of nobranch=1.
>
> Signed-off-by: Sourav Kumar Pramanik 
> ---
>  meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb 
> b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> index 04ac93e92..bc90bffe5 100644
> --- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> @@ -4,7 +4,7 @@ SECTION = "libs"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125"
>
> -SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1;protocol=https"
> +SRC_URI = 
> "git://github.com/miloyip/rapidjson.git;branch=master;protocol=https"
>
>  SRCREV = "0ccdbf364c577803e2a751f5aededce935314313"
>
> --
> 2.25.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186432): 
https://lists.openembedded.org/g/openembedded-core/message/186432
Mute This Topic: https://lists.openembedded.org/mt/100870655/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] cve_check: Fix cpe_id generation

2023-08-21 Thread Jasper Orschulko via lists.openembedded.org
Use "*" (wildcard) instead of "a" (application)in cpe_id generation,
as the product is not necessarily of type application, e.g.
linux_kernel, which is of type "o" (operating system).

Signed-off-by: Jasper Orschulko 
---
 meta/lib/oe/cve_check.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py
index 5bf3caac47..3979d521d1 100644
--- a/meta/lib/oe/cve_check.py
+++ b/meta/lib/oe/cve_check.py
@@ -156,7 +156,7 @@ def get_cpe_ids(cve_product, version):
 else:
 vendor = "*"
 
-cpe_id = 'cpe:2.3:a:{}:{}:{}:*:*:*:*:*:*:*'.format(vendor, product, 
version)
+cpe_id = 'cpe:2.3:*:{}:{}:{}:*:*:*:*:*:*:*'.format(vendor, product, 
version)
 cpe_ids.append(cpe_id)
 
 return cpe_ids
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186433): 
https://lists.openembedded.org/g/openembedded-core/message/186433
Mute This Topic: https://lists.openembedded.org/mt/100871306/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] cve_check: Fix cpe_id generation

2023-08-21 Thread Luca Ceresoli via lists.openembedded.org
Hello Jasper,

On Mon, 21 Aug 2023 14:02:30 +0200
"Jasper Orschulko via lists.openembedded.org"
 wrote:
 

As you can see your sender address has been mangled, and as a result
the patch is rejected by the the openembedded git server. This is not
your fault, but we need you to modify your git configuration to prevent
this from happening in the future. Have a look at the wiki for more
info and how to solve that:

https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Fixing_your_From_identity

I'm taking your patch for testing on the autobuilders fixing it
manually so you don't need to resend your patch this time.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186434): 
https://lists.openembedded.org/g/openembedded-core/message/186434
Mute This Topic: https://lists.openembedded.org/mt/100871306/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/2] linux/cve-exclusions: update CVE_STATUS exclusions

2023-08-21 Thread Ross Burton
From: Ross Burton 

Signed-off-by: Ross Burton 
---
 .../linux/cve-exclusion_6.1.inc   | 42 +--
 .../linux/cve-exclusion_6.4.inc   | 42 +--
 2 files changed, 78 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-kernel/linux/cve-exclusion_6.1.inc 
b/meta/recipes-kernel/linux/cve-exclusion_6.1.inc
index 2441788008a..499785f6d2d 100644
--- a/meta/recipes-kernel/linux/cve-exclusion_6.1.inc
+++ b/meta/recipes-kernel/linux/cve-exclusion_6.1.inc
@@ -1,5 +1,5 @@
 # Auto-generated CVE metadata, DO NOT EDIT BY HAND.
-# Generated at 2023-08-09 15:51:19.757857 for version 6.1.43
+# Generated at 2023-08-21 12:41:13.991251 for version 6.1.43
 
 CVE_STATUS[CVE-2003-1604] = "fixed-version: Fixed after version 2.6.12rc2"
 
@@ -4451,6 +4451,8 @@ CVE_STATUS[CVE-2022-40768] = "fixed-version: Fixed after 
version 6.1rc1"
 
 CVE_STATUS[CVE-2022-4095] = "fixed-version: Fixed after version 6.0rc4"
 
+# CVE-2022-40982 has no known resolution
+
 CVE_STATUS[CVE-2022-41218] = "cpe-stable-backport: Backported in 6.1.4"
 
 CVE_STATUS[CVE-2022-41222] = "fixed-version: Fixed after version 5.14rc1"
@@ -4635,7 +4637,7 @@ CVE_STATUS[CVE-2023-1192] = "cpe-stable-backport: 
Backported in 6.1.33"
 
 CVE_STATUS[CVE-2023-1195] = "fixed-version: Fixed after version 6.1rc3"
 
-# CVE-2023-1206 has no known resolution
+CVE_STATUS[CVE-2023-1206] = "cpe-stable-backport: Backported in 6.1.43"
 
 CVE_STATUS[CVE-2023-1249] = "fixed-version: Fixed after version 5.18rc1"
 
@@ -4691,7 +4693,11 @@ CVE_STATUS[CVE-2023-2008] = "fixed-version: Fixed after 
version 5.19rc4"
 
 CVE_STATUS[CVE-2023-2019] = "fixed-version: Fixed after version 6.0rc1"
 
-# CVE-2023-20593 has no known resolution
+# CVE-2023-20569 has no known resolution
+
+# CVE-2023-20588 has no known resolution
+
+CVE_STATUS[CVE-2023-20593] = "cpe-stable-backport: Backported in 6.1.41"
 
 CVE_STATUS[CVE-2023-20928] = "fixed-version: Fixed after version 6.0rc1"
 
@@ -4709,6 +4715,10 @@ CVE_STATUS[CVE-2023-2124] = "cpe-stable-backport: 
Backported in 6.1.33"
 
 CVE_STATUS[CVE-2023-21255] = "cpe-stable-backport: Backported in 6.1.31"
 
+# CVE-2023-21264 needs backporting (fixed from 6.4rc5)
+
+# CVE-2023-21400 has no known resolution
+
 CVE_STATUS[CVE-2023-2156] = "cpe-stable-backport: Backported in 6.1.26"
 
 CVE_STATUS[CVE-2023-2162] = "cpe-stable-backport: Backported in 6.1.11"
@@ -4777,6 +4787,8 @@ CVE_STATUS[CVE-2023-2598] = "fixed-version: only affects 
6.3rc1 onwards"
 
 # CVE-2023-26242 has no known resolution
 
+# CVE-2023-2640 has no known resolution
+
 CVE_STATUS[CVE-2023-26544] = "cpe-stable-backport: Backported in 6.1.3"
 
 CVE_STATUS[CVE-2023-26545] = "cpe-stable-backport: Backported in 6.1.13"
@@ -4867,6 +4879,8 @@ CVE_STATUS[CVE-2023-32258] = "cpe-stable-backport: 
Backported in 6.1.29"
 
 CVE_STATUS[CVE-2023-32269] = "cpe-stable-backport: Backported in 6.1.11"
 
+# CVE-2023-32629 has no known resolution
+
 CVE_STATUS[CVE-2023-3268] = "cpe-stable-backport: Backported in 6.1.28"
 
 CVE_STATUS[CVE-2023-3269] = "cpe-stable-backport: Backported in 6.1.37"
@@ -4905,6 +4919,8 @@ CVE_STATUS[CVE-2023-34255] = "cpe-stable-backport: 
Backported in 6.1.33"
 
 CVE_STATUS[CVE-2023-34256] = "cpe-stable-backport: Backported in 6.1.29"
 
+# CVE-2023-34319 has no known resolution
+
 CVE_STATUS[CVE-2023-3439] = "fixed-version: Fixed after version 5.18rc5"
 
 CVE_STATUS[CVE-2023-35001] = "cpe-stable-backport: Backported in 6.1.39"
@@ -4965,3 +4981,23 @@ CVE_STATUS[CVE-2023-38432] = "cpe-stable-backport: 
Backported in 6.1.36"
 
 CVE_STATUS[CVE-2023-3863] = "cpe-stable-backport: Backported in 6.1.39"
 
+CVE_STATUS[CVE-2023-4004] = "cpe-stable-backport: Backported in 6.1.42"
+
+# CVE-2023-4010 has no known resolution
+
+# CVE-2023-4128 needs backporting (fixed from 6.5rc5)
+
+CVE_STATUS[CVE-2023-4132] = "cpe-stable-backport: Backported in 6.1.39"
+
+# CVE-2023-4133 needs backporting (fixed from 6.3)
+
+# CVE-2023-4134 needs backporting (fixed from 6.5rc1)
+
+CVE_STATUS[CVE-2023-4147] = "cpe-stable-backport: Backported in 6.1.43"
+
+# CVE-2023-4155 has no known resolution
+
+# CVE-2023-4194 needs backporting (fixed from 6.5rc5)
+
+# CVE-2023-4273 needs backporting (fixed from 6.5rc5)
+
diff --git a/meta/recipes-kernel/linux/cve-exclusion_6.4.inc 
b/meta/recipes-kernel/linux/cve-exclusion_6.4.inc
index 98e9ee25a5b..b9210724bf0 100644
--- a/meta/recipes-kernel/linux/cve-exclusion_6.4.inc
+++ b/meta/recipes-kernel/linux/cve-exclusion_6.4.inc
@@ -1,5 +1,5 @@
 # Auto-generated CVE metadata, DO NOT EDIT BY HAND.
-# Generated at 2023-08-09 15:51:30.073765 for version 6.4.9
+# Generated at 2023-08-21 12:41:33.545124 for version 6.4.9
 
 CVE_STATUS[CVE-2003-1604] = "fixed-version: Fixed after version 2.6.12rc2"
 
@@ -4451,6 +4451,8 @@ CVE_STATUS[CVE-2022-40768] = "fixed-version: Fixed after 
version 6.1rc1"
 
 CVE_STATUS[CVE-2022-4095] = "fixed-version: Fixed after version 6.0rc4"
 
+# CVE-2022-40982 has no known resolution
+
 CVE_STATUS[CVE-2022-41218] 

[OE-core] [PATCH 1/2] linux/generate-cve-exclusions.py: fix comparison

2023-08-21 Thread Ross Burton
From: Ross Burton 

The backport detection logic didn't handle issues which were backported
to the current version.

Signed-off-by: Ross Burton 
---
 meta/recipes-kernel/linux/generate-cve-exclusions.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/generate-cve-exclusions.py 
b/meta/recipes-kernel/linux/generate-cve-exclusions.py
index 4d96f19fe7a..34f9ee731dc 100755
--- a/meta/recipes-kernel/linux/generate-cve-exclusions.py
+++ b/meta/recipes-kernel/linux/generate-cve-exclusions.py
@@ -70,7 +70,7 @@ def main(argp=None):
 backport_data = stream_data[cve]
 if base_version in backport_data:
 backport_ver = 
Version(backport_data[base_version]["fixed_version"])
-if backport_ver < version:
+if backport_ver <= version:
 print(
 f'CVE_STATUS[{cve}] = "cpe-stable-backport: 
Backported in {backport_ver}"'
 )
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186435): 
https://lists.openembedded.org/g/openembedded-core/message/186435
Mute This Topic: https://lists.openembedded.org/mt/100871421/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [mickledore][PATCH] ccache.bbclass: Add allowed list for native recipes

2023-08-21 Thread Angelo Ribeiro via lists.openembedded.org
From: Angelo Ribeiro 

Native recipes are not able to use ccache currently, due to a circular
dependency between ccache-native and cmake-native.
This affects also other native recipes, but not all, imposing a
limitation in build time optimizations.

The introduction of CCACHE_NATIVE_RECIPES_ALLOWED allows the user to specify
which native recipes should use ccache, keeping it disable by default for all
native recipes.

Signed-off-by: Angelo Ribeiro 
---
 meta/classes/ccache.bbclass  | 11 ---
 meta/conf/documentation.conf |  1 +
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 34becb69d1..262db6672c 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -28,6 +28,11 @@
 # be shared between different builds.
 CCACHE_TOP_DIR ?= "${TMPDIR}/ccache"

+# ccache-native and cmake-native have a circular dependency
+# that affects other native recipes, but not all.
+# Allows to use ccache in specified native recipes.
+CCACHE_NATIVE_RECIPES_ALLOWED ?= ""
+
 # ccahe removes CCACHE_BASEDIR from file path, so that hashes will be the same
 # in different builds.
 export CCACHE_BASEDIR ?= "${TMPDIR}"
@@ -54,9 +59,9 @@ python() {
 Enable ccache for the recipe
 """
 pn = d.getVar('PN')
-# quilt-native doesn't need ccache since no c files
-if not (bb.data.inherits_class("native", d) or
-bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
+if (pn in d.getVar('CCACHE_NATIVE_RECIPES_ALLOWED') or
+not (bb.data.inherits_class("native", d) or
+bb.utils.to_boolean(d.getVar('CCACHE_DISABLE':
 d.appendVar('DEPENDS', ' ccache-native')
 d.setVar('CCACHE', 'ccache ')
 }
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index a27d7a53c3..7279e89e63 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -106,6 +106,7 @@ BUSYBOX_SPLIT_SUID[doc] = "For the BusyBox recipe, 
specifies whether to split th
 #C

 CACHE[doc]  = "The directory holding the cache of the metadata."
+CCACHE_NATIVE_RECIPES_ALLOWED[doc] = "A list of native recipes to use Ccache, 
this variable is useful to bypass a circular dependency between ccache-native 
and cmake-native that inhibits to use Ccache in other native recipes."
 CFLAGS[doc] = "Flags passed to the C compiler for the target system. This 
variable evaluates to the same as TARGET_CFLAGS."
 CLASSOVERRIDE[doc] = "An internal variable specifying the special class 
override that should currently apply (e.g. "class-target", "class-native", and 
so forth)."
 CLEANBROKEN[doc] = "Specifies if 'make clean' does not work for a recipe (and 
therefore the build system should not try to use it during do_configure)"
--
2.34.1

The information in this communication may contain confidential or legally 
privileged information. It is intended solely for the use of the individual or 
entity it addresses and others authorized to receive it. If you are not an 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution or action in reliance on the contents of this information is 
strictly prohibited and may be unlawful. If you have received this 
communication by error, please notify us immediately by responding to this 
e-mail and then delete it from your system. Critical TechWorks is not liable 
for the proper and complete transmission of the information in this 
communication nor for any delay in its receipt

This e-mail is environmentally friendly, just like Critical TechWorks, which 
lives in a paper-free atmosphere. Therefore, please consider the environment 
before printing it!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186437): 
https://lists.openembedded.org/g/openembedded-core/message/186437
Mute This Topic: https://lists.openembedded.org/mt/100871843/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone][PATCH] ccache.bbclass: Add allowed list for native recipes

2023-08-21 Thread Angelo Ribeiro via lists.openembedded.org
From: Angelo Ribeiro 

Native recipes are not able to use ccache currently, due to a circular
dependency between ccache-native and cmake-native.
This affects also other native recipes, but not all, imposing a
limitation in build time optimizations.

The introduction of CCACHE_NATIVE_RECIPES_ALLOWED allows the user to specify
which native recipes should use ccache, keeping it disable by default for all
native recipes.

Signed-off-by: Angelo Ribeiro 
---
 meta/classes/ccache.bbclass  | 11 ---
 meta/conf/documentation.conf |  1 +
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 4532894c57..15eab11a0f 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -22,6 +22,11 @@
 # be shared between different builds.
 CCACHE_TOP_DIR ?= "${TMPDIR}/ccache"

+# ccache-native and cmake-native have a circular dependency
+# that affects other native recipes, but not all.
+# Allows to use ccache in specified native recipes.
+CCACHE_NATIVE_RECIPES_ALLOWED ?= ""
+
 # ccahe removes CCACHE_BASEDIR from file path, so that hashes will be the same
 # in different builds.
 export CCACHE_BASEDIR ?= "${TMPDIR}"
@@ -48,9 +53,9 @@ python() {
 Enable ccache for the recipe
 """
 pn = d.getVar('PN')
-# quilt-native doesn't need ccache since no c files
-if not (bb.data.inherits_class("native", d) or
-bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
+if (pn in d.getVar('CCACHE_NATIVE_RECIPES_ALLOWED') or
+not (bb.data.inherits_class("native", d) or
+bb.utils.to_boolean(d.getVar('CCACHE_DISABLE':
 d.appendVar('DEPENDS', ' ccache-native')
 d.setVar('CCACHE', 'ccache ')
 }
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index ab2addb321..362635fc9e 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -106,6 +106,7 @@ BUSYBOX_SPLIT_SUID[doc] = "For the BusyBox recipe, 
specifies whether to split th
 #C

 CACHE[doc]  = "The directory holding the cache of the metadata."
+CCACHE_NATIVE_RECIPES_ALLOWED[doc] = "A list of native recipes to use Ccache, 
this variable is useful to bypass a circular dependency between ccache-native 
and cmake-native that inhibits to use Ccache in other native recipes."
 CFLAGS[doc] = "Flags passed to the C compiler for the target system. This 
variable evaluates to the same as TARGET_CFLAGS."
 CLASSOVERRIDE[doc] = "An internal variable specifying the special class 
override that should currently apply (e.g. "class-target", "class-native", and 
so forth)."
 CLEANBROKEN[doc] = "Specifies if 'make clean' does not work for a recipe (and 
therefore the build system should not try to use it during do_configure)"
--
2.34.1

The information in this communication may contain confidential or legally 
privileged information. It is intended solely for the use of the individual or 
entity it addresses and others authorized to receive it. If you are not an 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution or action in reliance on the contents of this information is 
strictly prohibited and may be unlawful. If you have received this 
communication by error, please notify us immediately by responding to this 
e-mail and then delete it from your system. Critical TechWorks is not liable 
for the proper and complete transmission of the information in this 
communication nor for any delay in its receipt

This e-mail is environmentally friendly, just like Critical TechWorks, which 
lives in a paper-free atmosphere. Therefore, please consider the environment 
before printing it!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186438): 
https://lists.openembedded.org/g/openembedded-core/message/186438
Mute This Topic: https://lists.openembedded.org/mt/100871881/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] cve_check: Fix cpe_id generation

2023-08-21 Thread Jasper Orschulko via lists.openembedded.org

Hi Luca,

thanks for the heads-up. That's curious, I assumed this would not be a 
problem as my signing email address is the same as the from address?


(mbox) Adding cc: Jasper Orschulko  from line 
'From: Jasper Orschulko '
(body) Adding cc: Jasper Orschulko  from line 
'Signed-off-by: Jasper Orschulko '


Oh well, I added an explicit sendemail.from configuration to my 
gitconfig. I will send backport patches once this is merged in master, 
so we'll see if that had the desired effect.


Jasper

On 2023-08-21 14:10, Luca Ceresoli wrote:

Hello Jasper,

On Mon, 21 Aug 2023 14:02:30 +0200
"Jasper Orschulko via lists.openembedded.org"
 wrote:
 

As you can see your sender address has been mangled, and as a result
the patch is rejected by the the openembedded git server. This is not
your fault, but we need you to modify your git configuration to prevent
this from happening in the future. Have a look at the wiki for more
info and how to solve that:

https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Fixing_your_From_identity

I'm taking your patch for testing on the autobuilders fixing it
manually so you don't need to resend your patch this time.

Luca

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186439): 
https://lists.openembedded.org/g/openembedded-core/message/186439
Mute This Topic: https://lists.openembedded.org/mt/100871306/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta-oe][PATCH v2] vim: update obsolete comment

2023-08-21 Thread Etienne Cordonnier via lists.openembedded.org
From: Etienne Cordonnier 

vim 8.3 has been out for a long time, so this comment is obsolete.
However we still need UPSTREAM_VERSION_UNKNOWN, since we ignore
the last digit of the upstream version number.

Test result:
$ devtool check-upgrade-status vim
  ...
  INFO: vim   9.0.1592UNKNOWN Tom Rini 
 c0370529c027abc5b1698d53fcfb8c02a0c515da

Signed-off-by: Etienne Cordonnier 
---
 meta/recipes-support/vim/vim.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 33ae0d8079..83ab9ea5de 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -22,11 +22,10 @@ SRC_URI = 
"git://github.com/vim/vim.git;branch=master;protocol=https \
 PV .= ".1592"
 SRCREV = "29b4c513b11deb37f0e0538df53d195f602fa42c"
 
-# Remove when 8.3 is out
-UPSTREAM_VERSION_UNKNOWN = "1"
-
 # Do not consider .z in x.y.z, as that is updated with every commit
 UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+)\.0"
+# Ignore that the upstream version .z in x.y.z is always newer
+UPSTREAM_VERSION_UNKNOWN = "1"
 
 S = "${WORKDIR}/git"
 
-- 
2.36.1.vfs.0.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186440): 
https://lists.openembedded.org/g/openembedded-core/message/186440
Mute This Topic: https://lists.openembedded.org/mt/100872682/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/2] procps: backport fix for CVE-2023-4016

2023-08-21 Thread Ross Burton
From: Ross Burton 

Signed-off-by: Ross Burton 
---
 .../procps/procps/CVE-2023-4016.patch | 73 +++
 meta/recipes-extended/procps/procps_4.0.3.bb  |  1 +
 2 files changed, 74 insertions(+)
 create mode 100644 meta/recipes-extended/procps/procps/CVE-2023-4016.patch

diff --git a/meta/recipes-extended/procps/procps/CVE-2023-4016.patch 
b/meta/recipes-extended/procps/procps/CVE-2023-4016.patch
new file mode 100644
index 000..202fea91f1d
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/CVE-2023-4016.patch
@@ -0,0 +1,73 @@
+From 2c933ecba3bb1d3041a5a7a53a7b4078a6003413 Mon Sep 17 00:00:00 2001
+From: Craig Small 
+Date: Thu, 10 Aug 2023 21:18:38 +1000
+Subject: [PATCH] ps: Fix possible buffer overflow in -C option
+
+ps allocates memory using malloc(length of arg * len of struct).
+In certain strange circumstances, the arg length could be very large
+and the multiplecation will overflow, allocating a small amount of
+memory.
+
+Subsequent strncpy() will then write into unallocated memory.
+The fix is to use calloc. It's slower but this is a one-time
+allocation. Other malloc(x * y) calls have also been replaced
+by calloc(x, y)
+
+References:
+ https://www.freelists.org/post/procps/ps-buffer-overflow-CVE-20234016
+ https://nvd.nist.gov/vuln/detail/CVE-2023-4016
+ https://gitlab.com/procps-ng/procps/-/issues/297
+ https://bugs.debian.org/1042887
+
+Signed-off-by: Craig Small 
+
+CVE: CVE-2023-4016
+Upstream-Status: Backport 
[https://gitlab.com/procps-ng/procps/-/commit/2c933ecba3bb1d3041a5a7a53a7b4078a6003413]
+Signed-off-by: Ross Burton 
+---
+ NEWS| 1 +
+ src/ps/parser.c | 8 
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/ps/parser.c b/src/ps/parser.c
+index 248aa741..15873dfa 100644
+--- a/src/ps/parser.c
 b/src/ps/parser.c
+@@ -189,7 +189,6 @@ static const char *parse_list(const char *arg, const char 
*(*parse_fn)(char *, s
+   const char *err;   /* error code that could or did happen */
+   /*** prepare to operate ***/
+   node = xmalloc(sizeof(selection_node));
+-  node->u = xmalloc(strlen(arg)*sizeof(sel_union)); /* waste is insignificant 
*/
+   node->n = 0;
+   buf = strdup(arg);
+   /*** sanity check and count items ***/
+@@ -210,6 +209,7 @@ static const char *parse_list(const char *arg, const char 
*(*parse_fn)(char *, s
+   } while (*++walk);
+   if(need_item) goto parse_error;
+   node->n = items;
++  node->u = xcalloc(items, sizeof(sel_union));
+   /*** actually parse the list ***/
+   walk = buf;
+   while(items--){
+@@ -1050,15 +1050,15 @@ static const char *parse_trailing_pids(void){
+   thisarg = ps_argc - 1;   /* we must be at the end now */
+ 
+   pidnode = xmalloc(sizeof(selection_node));
+-  pidnode->u = xmalloc(i*sizeof(sel_union)); /* waste is insignificant */
++  pidnode->u = xcalloc(i, sizeof(sel_union)); /* waste is insignificant */
+   pidnode->n = 0;
+ 
+   grpnode = xmalloc(sizeof(selection_node));
+-  grpnode->u = xmalloc(i*sizeof(sel_union)); /* waste is insignificant */
++  grpnode->u = xcalloc(i,sizeof(sel_union)); /* waste is insignificant */
+   grpnode->n = 0;
+ 
+   sidnode = xmalloc(sizeof(selection_node));
+-  sidnode->u = xmalloc(i*sizeof(sel_union)); /* waste is insignificant */
++  sidnode->u = xcalloc(i, sizeof(sel_union)); /* waste is insignificant */
+   sidnode->n = 0;
+ 
+   while(i--){
+-- 
+GitLab
+
diff --git a/meta/recipes-extended/procps/procps_4.0.3.bb 
b/meta/recipes-extended/procps/procps_4.0.3.bb
index 71efb80207d..9ef679c6bd8 100644
--- a/meta/recipes-extended/procps/procps_4.0.3.bb
+++ b/meta/recipes-extended/procps/procps_4.0.3.bb
@@ -16,6 +16,7 @@ SRC_URI = 
"git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master \
file://sysctl.conf \
file://0001-src-w.c-use-utmp.h-only.patch \
file://0001-po-fr.po-address-failures-with-gettext-0.22.patch \
+   file://CVE-2023-4016.patch \
"
 SRCREV = "806eb270f217ff7e1e745c7bda2b002b5be74be4"
 
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186442): 
https://lists.openembedded.org/g/openembedded-core/message/186442
Mute This Topic: https://lists.openembedded.org/mt/100872707/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/2] python3: ignore disputed CVE-2023-36632

2023-08-21 Thread Ross Burton
From: Ross Burton 

For some reason in the migration of CVE_CHECK_IGNORE to CVE_STATUS[1], this
CVE was commented out.

[1] oe-core 1634ed40

Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/python/python3_3.11.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3_3.11.4.bb 
b/meta/recipes-devtools/python/python3_3.11.4.bb
index b3534ad678e..8fd1382caa4 100644
--- a/meta/recipes-devtools/python/python3_3.11.4.bb
+++ b/meta/recipes-devtools/python/python3_3.11.4.bb
@@ -53,7 +53,7 @@ CVE_STATUS[CVE-2020-15523] = "not-applicable-platform: Issue 
only applies on Win
 CVE_STATUS[CVE-2022-26488] = "not-applicable-platform: Issue only applies on 
Windows"
 # The module will be removed in the future and flaws documented.
 CVE_STATUS[CVE-2015-20107] = "upstream-wontfix: The mailcap module is insecure 
by design, so this can't be fixed in a meaningful way"
-# CVE_STATUS[CVE-2023-36632] = "disputed: Not an issue, in fact expected 
behaviour"
+CVE_STATUS[CVE-2023-36632] = "disputed: Not an issue, in fact expected 
behaviour"
 
 PYTHON_MAJMIN = "3.11"
 
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186441): 
https://lists.openembedded.org/g/openembedded-core/message/186441
Mute This Topic: https://lists.openembedded.org/mt/100872706/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] OE-core CVE metrics for master on Sun 20 Aug 2023 01:00:01 AM HST

2023-08-21 Thread Ross Burton
On 20 Aug 2023, at 18:30, Khem Raj via lists.openembedded.org 
 wrote:
> 
>> CVE-2023-0687 (CVSS3: 9.8 CRITICAL): glibc 
>> https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-0687 *
> 
> We are at 2.38 release on master and this release contains
> https://sourceware.org/git/?p=glibc.git;a=commit;h=801af9fafd4689337ebf27260aa115335a0cb2bc
> which fixes this problem. So I wonder why it appears in the scan here ?

Because the CVE explicitly says that 2.38 is broken.  I’ve mailed NIST to tell 
them that it’s fixed in 2.38 onwards.

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186443): 
https://lists.openembedded.org/g/openembedded-core/message/186443
Mute This Topic: https://lists.openembedded.org/mt/100852965/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCH 1/1] gstreamer1.0: upgrade 1.20.6 -> 1.20.7

2023-08-21 Thread Polampalli, Archana via lists.openembedded.org
This release only contains bugfixes.

Highlighted bugfixes in 1.20.7:

Security fixes for flacparse, dvdspu, and subparse, and the RealMedia demuxer
h265parse: Fix framerate handling
filesink: Fix buffered mode writing of buffer lists and buffers with multiple 
memories
asfmux, rtpbin_buffer_list test: fix possible unaligned write/read on 32-bit ARM
ptp clock: Work around bug in ptpd in default configuration
qtdemux: fix reverse playback regression with edit lists
rtspsrc: various control path handling server compatibility improvements
avviddec: fix potential deadlock on seeking with FFmpeg 6.x
cerbero: Fix pango crash on 32bit Windows; move libass into non-GPL codecs
Miscellaneous bug fixes, memory leak fixes, and other stability and reliability 
improvements

https://nvd.nist.gov/vuln/detail/CVE-2023-37327
https://nvd.nist.gov/vuln/detail/CVE-2023-37328
https://nvd.nist.gov/vuln/detail/CVE-2023-37329

https://gstreamer.freedesktop.org/releases/1.20/#1.20.7

Signed-off-by: Archana Polampalli 
---
 .../{gst-devtools_1.20.6.bb => gst-devtools_1.20.7.bb}  | 2 +-
 ...streamer1.0-libav_1.20.6.bb => gstreamer1.0-libav_1.20.7.bb} | 2 +-
 .../{gstreamer1.0-omx_1.20.6.bb => gstreamer1.0-omx_1.20.7.bb}  | 2 +-
 ...plugins-bad_1.20.6.bb => gstreamer1.0-plugins-bad_1.20.7.bb} | 2 +-
 ...ugins-base_1.20.6.bb => gstreamer1.0-plugins-base_1.20.7.bb} | 2 +-
 ...ugins-good_1.20.6.bb => gstreamer1.0-plugins-good_1.20.7.bb} | 2 +-
 ...ugins-ugly_1.20.6.bb => gstreamer1.0-plugins-ugly_1.20.7.bb} | 2 +-
 ...reamer1.0-python_1.20.6.bb => gstreamer1.0-python_1.20.7.bb} | 2 +-
 ...rtsp-server_1.20.6.bb => gstreamer1.0-rtsp-server_1.20.7.bb} | 2 +-
 ...streamer1.0-vaapi_1.20.6.bb => gstreamer1.0-vaapi_1.20.7.bb} | 2 +-
 .../{gstreamer1.0_1.20.6.bb => gstreamer1.0_1.20.7.bb}  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
 rename meta/recipes-multimedia/gstreamer/{gst-devtools_1.20.6.bb => 
gst-devtools_1.20.7.bb} (95%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-libav_1.20.6.bb => 
gstreamer1.0-libav_1.20.7.bb} (91%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-omx_1.20.6.bb => 
gstreamer1.0-omx_1.20.7.bb} (95%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-bad_1.20.6.bb 
=> gstreamer1.0-plugins-bad_1.20.7.bb} (98%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-base_1.20.6.bb 
=> gstreamer1.0-plugins-base_1.20.7.bb} (97%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-good_1.20.6.bb 
=> gstreamer1.0-plugins-good_1.20.7.bb} (97%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-ugly_1.20.6.bb 
=> gstreamer1.0-plugins-ugly_1.20.7.bb} (94%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-python_1.20.6.bb => 
gstreamer1.0-python_1.20.7.bb} (91%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-rtsp-server_1.20.6.bb 
=> gstreamer1.0-rtsp-server_1.20.7.bb} (90%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-vaapi_1.20.6.bb => 
gstreamer1.0-vaapi_1.20.7.bb} (95%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.20.6.bb => 
gstreamer1.0_1.20.7.bb} (97%)

diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools_1.20.6.bb 
b/meta/recipes-multimedia/gstreamer/gst-devtools_1.20.7.bb
similarity index 95%
rename from meta/recipes-multimedia/gstreamer/gst-devtools_1.20.6.bb
rename to meta/recipes-multimedia/gstreamer/gst-devtools_1.20.7.bb
index 2eee50e6d8..2409ea25e1 100644
--- a/meta/recipes-multimedia/gstreamer/gst-devtools_1.20.6.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-devtools_1.20.7.bb
@@ -12,7 +12,7 @@ SRC_URI = 
"https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV}
file://0001-connect-has-a-different-signature-on-musl.patch \
"
 
-SRC_URI[sha256sum] = 
"2c64037c823fb88751a47dacf3d4752a52b7951190d6e05fc44855e912e81d71"
+SRC_URI[sha256sum] = 
"2df2ddfee05f6ce978207de9086ca22f00fc36e04f74a11869074da178585e35"
 
 DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 
gstreamer1.0-plugins-base"
 RRECOMMENDS:${PN} = "git"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.6.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.7.bb
similarity index 91%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.6.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.7.bb
index c54913e8a1..f3f53893b6 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.6.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.7.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
 "
 
 SRC_URI = 
"https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz";
-SRC_URI[sha256sum] = 
"7d619a030542a4a5a11e0302742a3d9b05f8e5cfc453025683a0379bc50aa013"
+SRC_URI[sha256sum] = 
"65e776e366f7f3549a9a829418817f464dcc5dc9845220c64a886683d8841b56"
 
 S = "${WORKDIR}/gst-libav-${PV}"
 
diff --git a/meta/recipes

[OE-core] [PATCH] binutils: Add missing DEPENDS on pod2man

2023-08-21 Thread Richard Purdie
Otherwise this can be used from the host leading to output determinism issues
where the output may have zero length files for man pages without it.

Limit it to target only since we don't need this for native/cross.

Signed-off-by: Richard Purdie 
---
 meta/recipes-devtools/binutils/binutils_2.41.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/binutils/binutils_2.41.bb 
b/meta/recipes-devtools/binutils/binutils_2.41.bb
index 4ce1b4bec2f..2cce40f1ef9 100644
--- a/meta/recipes-devtools/binutils/binutils_2.41.bb
+++ b/meta/recipes-devtools/binutils/binutils_2.41.bb
@@ -1,7 +1,8 @@
 require binutils.inc
 require binutils-${PV}.inc
 
-DEPENDS += "zlib"
+# perl-native for pod2man for man page generation
+DEPENDS += "zlib perl-native"
 
 EXTRA_OECONF += "--with-sysroot=/ \
 --enable-install-libbfd \
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186445): 
https://lists.openembedded.org/g/openembedded-core/message/186445
Mute This Topic: https://lists.openembedded.org/mt/100873992/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v5 0/2] Upgrade less and add ptest

2023-08-21 Thread Julien Stephan
Hi all,

Release tarballs now include lesstest so upgrade less to latest version and add 
ptest support for it.

My branch is available on poky-contrib repository [1]

v1 can be found here: 
https://lists.openembedded.org/g/openembedded-core/message/183894 
v2 can be found here: 
https://lists.openembedded.org/g/openembedded-core/message/183919 
v3 can be found here: 
https://lists.openembedded.org/g/openembedded-core/message/183931 
v4 can be found here: 
https://lists.openembedded.org/g/openembedded-core/message/183943 

Changes in v5:
- do not switch anymore to github URI
- upgrade less to v643
- remove patches that were merged upstream

Changes in v4:
- add verbose output on failure

Changes in v3:
- add locale-base-en-us in RDEPENDS:${PN}-ptest to fix the failing test

Changes in v2:
- split commit in two: one for switching to github and one to add the ptest 
support

[YOCTO #15073]

Best
Julien

[1]: 
https://git.yoctoproject.org/poky-contrib/log/?h=jstephan/add-ptest-for-less



Julien Stephan (2):
  less: upgrade 633 -> 643
  less: add ptest support

 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-extended/less/files/run-ptest|  3 +++
 .../less/{less_633.bb => less_643.bb} | 24 +--
 3 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/less/files/run-ptest
 rename meta/recipes-extended/less/{less_633.bb => less_643.bb} (66%)

-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186446): 
https://lists.openembedded.org/g/openembedded-core/message/186446
Mute This Topic: https://lists.openembedded.org/mt/100874028/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v5 1/2] less: upgrade 633 -> 643

2023-08-21 Thread Julien Stephan
Signed-off-by: Julien Stephan 
---
 meta/recipes-extended/less/{less_633.bb => less_643.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-extended/less/{less_633.bb => less_643.bb} (93%)

diff --git a/meta/recipes-extended/less/less_633.bb 
b/meta/recipes-extended/less/less_643.bb
similarity index 93%
rename from meta/recipes-extended/less/less_633.bb
rename to meta/recipes-extended/less/less_643.bb
index 2defb5ccb7a..008bbd5581a 100644
--- a/meta/recipes-extended/less/less_633.bb
+++ b/meta/recipes-extended/less/less_643.bb
@@ -27,7 +27,7 @@ DEPENDS = "ncurses"
 
 SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz";
 
-SRC_URI[sha256sum] = 
"2f201d64b828b88af36dfe6cfdba3e0819ece2e446ebe6224813209aaefed04f"
+SRC_URI[sha256sum] = 
"2911b5432c836fa084c8a2e68f6cd6312372c026a58faaa98862731c8b6052e8"
 
 UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html";
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186448): 
https://lists.openembedded.org/g/openembedded-core/message/186448
Mute This Topic: https://lists.openembedded.org/mt/100874031/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v5 2/2] less: add ptest support

2023-08-21 Thread Julien Stephan
add ptest support for less

root@qemux86-64:~# ptest-runner less
START: ptest-runner
2023-08-21T14:22
BEGIN: /usr/lib/less/ptest
TEST chinese1.lt
PASS: chinese1 (30 steps)
TEST colorbars.lt
PASS: colorbars (222 steps)
TEST github216.lt
PASS: github216 (143 steps)
TEST github265.lt
PASS: github265 (17 steps)
TEST github329.lt
PASS: github329 (28 steps)
TEST hdr-unicode.lt
PASS: hdr-unicode (164 steps)
TEST hdr-unicode1.lt
PASS: hdr-unicode (107 steps)
TEST proc-special.lt
PASS: proc-special (107 steps)
TEST seq200.lt
PASS: seq200 (18 steps)
TEST subsearch.lt
PASS: subsearch (59 steps)
TEST table-50x200.lt
PASS: table-50x200 (467 steps)
TEST utf8-2.txt.lt
PASS: utf8-2.txt (309 steps)
TEST version.c.lt
PASS: version.c (38 steps)
RAN  13 tests with 0 errors
DURATION: 184
END: /usr/lib/less/ptest
2023-08-21T14:25
STOP: ptest-runner
TOTAL: 1 FAIL: 0

[YOCTO #15073]

Signed-off-by: Julien Stephan 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-extended/less/files/run-ptest|  3 +++
 meta/recipes-extended/less/less_643.bb| 22 ++-
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/less/files/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index bbbef5b0431..9160103cb0a 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -96,6 +96,7 @@ PTESTS_SLOW = "\
 glib-2.0 \
 gnutls \
 gstreamer1.0 \
+less \
 libevent \
 libgcrypt \
 libmodule-build-perl \
diff --git a/meta/recipes-extended/less/files/run-ptest 
b/meta/recipes-extended/less/files/run-ptest
new file mode 100644
index 000..42a2869c844
--- /dev/null
+++ b/meta/recipes-extended/less/files/run-ptest
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+./runtest -l /usr/bin/less -t lesstest -O d lt/*
diff --git a/meta/recipes-extended/less/less_643.bb 
b/meta/recipes-extended/less/less_643.bb
index 008bbd5581a..67834bdd588 100644
--- a/meta/recipes-extended/less/less_643.bb
+++ b/meta/recipes-extended/less/less_643.bb
@@ -25,17 +25,37 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
 "
 DEPENDS = "ncurses"
 
-SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz";
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
+   file://run-ptest \
+   "
 
 SRC_URI[sha256sum] = 
"2911b5432c836fa084c8a2e68f6cd6312372c026a58faaa98862731c8b6052e8"
 
 UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html";
 
+inherit autotools ptest update-alternatives
+
+EXTRA_OEMAKE += " LESSTEST=1"
+
 inherit autotools update-alternatives
 
+do_compile_ptest () {
+cd ${S}/lesstest
+oe_runmake
+}
+
 do_install () {
 oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
 }
 
+do_install_ptest () {
+cp ${S}/lesstest/lesstest ${D}${PTEST_PATH}
+cp ${S}/lesstest/runtest ${D}${PTEST_PATH}
+cp ${S}/lesstest/lt_screen ${D}${PTEST_PATH}
+cp -r ${S}/lesstest/lt ${D}${PTEST_PATH}
+}
+
+RDEPENDS:${PN}-ptest:append = " perl-module-getopt-std perl-module-cwd 
locale-base-en-us"
+
 ALTERNATIVE:${PN} = "less"
 ALTERNATIVE_PRIORITY = "100"
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186447): 
https://lists.openembedded.org/g/openembedded-core/message/186447
Mute This Topic: https://lists.openembedded.org/mt/100874029/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] build-sysroots: Ensure dependency chains are minimal

2023-08-21 Thread Richard Purdie
We need to ensure this recipe doesn't have dependencies on others. The SPDX
classes/tasks introduce dependenies quilt-native and patch-native which can
introduce races on files in the sysroots. Avoid the races by removing the
tasks we don't need.

[YOCTO #15186]

Signed-off-by: Richard Purdie 
---
 meta/recipes-core/meta/build-sysroots.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-core/meta/build-sysroots.bb 
b/meta/recipes-core/meta/build-sysroots.bb
index 72da88921af..1a3b692a1b1 100644
--- a/meta/recipes-core/meta/build-sysroots.bb
+++ b/meta/recipes-core/meta/build-sysroots.bb
@@ -17,6 +17,10 @@ deltask configure
 deltask compile
 deltask install
 deltask populate_sysroot
+deltask create_spdx
+deltask collect_spdx_deps
+deltask create_runtime_spdx
+deltask recipe_qa
 
 python do_build_native_sysroot () {
 targetsysroot = d.getVar("STANDALONE_SYSROOT")
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186449): 
https://lists.openembedded.org/g/openembedded-core/message/186449
Mute This Topic: https://lists.openembedded.org/mt/100874725/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 00/10] linux-yocto: consolidated pull request

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Richard,

While we track down the remaining 6.4 boot issues, here is the
set of -stable and specific fixes that I've queued in my kernel
testing tree.

It is possible that some of the 6.4-stable's have fixes for our
boot issues, but I didn't see anything obvious.

In particular we have the -rt warning fix from PaulG and also
a fixup on our isocpus patch.

Cheers,

Bruce

The following changes since commit 37ebe9907ac5639bc200ae50d0d79b14a790ab55:

  oeqa/runtime/rust: correct rust test (2023-08-21 16:15:35 +0100)

are available in the Git repository at:

  https://git.yoctoproject.org/poky-contrib zedd/kernel
  https://git.yoctoproject.org/poky-contrib/log/?h=zedd/kernel

Bruce Ashfield (10):
  linux-yocto/6.1: update to v6.1.44
  linux-yocto/6.4: update to v6.4.10
  linux-yocto/6.1: update to v6.1.45
  kern-tools: include utility to post process config diffs
  linux-yocto/6.1: fix uninitialized read in nohz_full/isolcpus setup
  linux-yocto/6.4: fix uninitialized read in nohz_full/isolcpus setup
  linux-yocto/6.4: update to v6.4.11
  linux-yocto/6.1: update to v6.1.46
  linux-yocto/6.1: fix IRQ-80 warnings
  linux-yocto/6.4: fix IRQ-80 warnings

 .../kern-tools/kern-tools-native_git.bb   |  2 +-
 .../linux/linux-yocto-rt_6.1.bb   |  6 ++--
 .../linux/linux-yocto-rt_6.4.bb   |  6 ++--
 .../linux/linux-yocto-tiny_6.1.bb |  6 ++--
 .../linux/linux-yocto-tiny_6.4.bb |  6 ++--
 meta/recipes-kernel/linux/linux-yocto_6.1.bb  | 28 +--
 meta/recipes-kernel/linux/linux-yocto_6.4.bb  | 28 +--
 7 files changed, 41 insertions(+), 41 deletions(-)

-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186450): 
https://lists.openembedded.org/g/openembedded-core/message/186450
Mute This Topic: https://lists.openembedded.org/mt/100875501/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 01/10] linux-yocto/6.1: update to v6.1.44

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Updating  to the latest korg -stable release that comprises
the following commits:

0a4a7855302d Linux 6.1.44
dd5f2ef16e3c x86: fix backwards merge of GDS/SRSO bit
fa5b932b77c8 xen/netback: Fix buffer overrun triggered by unusual packet
4f25355540ad x86/srso: Tie SBPB bit setting to microcode patch detection
77cf32d0dbfb x86/srso: Add a forgotten NOENDBR annotation
c7f2cd045542 x86/srso: Fix return thunks in generated code
c9ae63d773ca x86/srso: Add IBPB on VMEXIT
79c8091888ef x86/srso: Add IBPB
98f62883e751 x86/srso: Add SRSO_NO support
9139f4b6dd4f x86/srso: Add IBPB_BRTYPE support
ac41e90d8daa x86/srso: Add a Speculative RAS Overflow mitigation
dec3b91f2c4b x86/cpu, kvm: Add support for CPUID_8021_EAX
dfede4cb8ef7 x86/bugs: Increase the x86 bugs vector size to two u32s
dacb0bac2edb Documentation/x86: Fix backwards on/off logic about YMM support
051f5dcf144a x86/mm: Initialize text poking earlier
e0fd83a193c5 mm: Move mm_cachep initialization to mm_init()
9ae15aaff39c x86/mm: Use mm_alloc() in poking_init()
d972c8c08f96 x86/mm: fix poking_init() for Xen PV guests
7f3982de36c6 x86/xen: Fix secondary processors' FPU initialization
baa7b7501e41 x86/mem_encrypt: Unbreak the AMD_MEM_ENCRYPT=n build
b6fd07c41b4c KVM: Add GDS_NO support to KVM
c04579e95492 x86/speculation: Add Kconfig option for GDS
92fc27c79bc7 x86/speculation: Add force option to GDS mitigation
c66ebe070d96 x86/speculation: Add Gather Data Sampling mitigation
f25ad76d9217 x86/fpu: Move FPU initialization into arch_cpu_finalize_init()
e26932942b2c x86/fpu: Mark init functions __init
9e8d9d399094 x86/fpu: Remove cpuinfo argument from init functions
c956807d8462 x86/init: Initialize signal frame size late
b0837880fa65 init, x86: Move mem_encrypt_init() into 
arch_cpu_finalize_init()
8183a89caf67 init: Invoke arch_cpu_finalize_init() earlier
a3342c60dcc5 init: Remove check_bugs() leftovers
8beabde0ed8d um/cpu: Switch to arch_cpu_finalize_init()
ce97072e10cc sparc/cpu: Switch to arch_cpu_finalize_init()
84f585542ec6 sh/cpu: Switch to arch_cpu_finalize_init()
6a90583dbd9b mips/cpu: Switch to arch_cpu_finalize_init()
489ae02c8993 m68k/cpu: Switch to arch_cpu_finalize_init()
08e86d42e2c9 loongarch/cpu: Switch to arch_cpu_finalize_init()
403e4cc67e4c ia64/cpu: Switch to arch_cpu_finalize_init()
e2e06240ae47 ARM: cpu: Switch to arch_cpu_finalize_init()
7918a3555a25 x86/cpu: Switch to arch_cpu_finalize_init()
d5501f2ff80d init: Provide arch_cpu_finalize_init()

Signed-off-by: Bruce Ashfield 
---
 .../linux/linux-yocto-rt_6.1.bb   |  6 ++--
 .../linux/linux-yocto-tiny_6.1.bb |  6 ++--
 meta/recipes-kernel/linux/linux-yocto_6.1.bb  | 28 +--
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
index 0645458d11..5323ae02ca 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
@@ -14,13 +14,13 @@ python () {
 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "ca3ebd29a77417d2c6cabc451496f2283d69e46d"
-SRCREV_meta ?= "9f8ee63473567964331b9465fa1aba301a9a725b"
+SRCREV_machine ?= "cd11a96d480a4748f96cb93d323c3eb8bbd8935d"
+SRCREV_meta ?= "fd76f76e2b84ddc47ade29ca3118ff14c2b9b67e"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https
 \

git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.1;destsuffix=${KMETA};protocol=https"
 
-LINUX_VERSION ?= "6.1.43"
+LINUX_VERSION ?= "6.1.44"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
index dfc1e5e5d6..3d392cb9cf 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
@@ -8,7 +8,7 @@ require recipes-kernel/linux/linux-yocto.inc
 # CVE exclusions
 include recipes-kernel/linux/cve-exclusion_6.1.inc
 
-LINUX_VERSION ?= "6.1.43"
+LINUX_VERSION ?= "6.1.44"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -17,8 +17,8 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "19cd9d8c4bafb673a03b2d7c22407d7c8d192a96"
-SRCREV_meta ?= "9f8ee63473567964331b9465fa1aba301a9a725b"
+SRCREV_machine ?= "a0e01625bc57f4e70ce779097fd99321377e48cc"
+SRCREV_meta ?= "fd76f76e2b84ddc47ade29ca3118ff14c2b9b67e"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.1

[OE-core] [PATCH 02/10] linux-yocto/6.4: update to v6.4.10

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Updating  to the latest korg -stable release that comprises
the following commits:

b269b0268d41 Linux 6.4.10
c9c0b889e2d3 x86/CPU/AMD: Do not leak quotient data after a division by 0
493c80a4f20b drm/i915/gt: Enable the CCS_FLUSH bit in the pipe control and 
in the CS
43f5167d2cdc drm/i915/gt: Support aux invalidation on all engines
e66e37671c18 drm/i915/gt: Poll aux invalidation register bit on invalidation
10be2cb87f0a drm/i915/gt: Rename flags with bit_group_X according to the 
datasheet
73400908a97b drm/i915/gt: Add workaround 14016712196
17b66e10b134 drm/i915/gt: Ensure memory quiesced before invalidation
c0660d36ecd8 drm/i915: Add the gen12_needs_ccs_aux_inv helper
7f87080d2e97 ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node
544fdf64d698 selftests/rseq: Play nice with binaries statically linked 
against glibc 2.35+
33f735ef8dfe drm/amdgpu: Use apt name for FW reserved region
61977b1526ba drm/imx/ipuv3: Fix front porch adjustment upon hactive aligning
bbfa34c97d8b powerpc/mm/altmap: Fix altmap boundary check
49e57caf967a mtd: rawnand: fsl_upm: Fix an off-by one test in fun_exec_op()
65df5d2ecc2c mtd: spi-nor: avoid holes in struct spi_mem_op
45d69917a4af clk: mediatek: mt8183: Add back SSPM related clocks
182ac84852a8 mtd: rawnand: rockchip: Align hwecc vs. raw page helper layouts
550322382c5c mtd: rawnand: rockchip: fix oobfree offset and description
b3e2e796be07 mtd: rawnand: omap_elm: Fix incorrect type in assignment
a126124c86c5 io_uring: annotate offset timeout races
af0f716ad3b0 f2fs: fix to do sanity check on direct node in truncate_dnode()
f775ceb0cb53 btrfs: remove BUG_ON()'s in add_new_free_space()
27f92aad4f17 ext2: Drop fragment support
d160941e1537 mm/gup: do not return 0 from pin_user_pages_fast() for bad args
4abda85197ba fs: Protect reconfiguration of sb read-write from racing writes
0dd3e0c31bf3 net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
6da717fc5d90 debugobjects: Recheck debug_objects_enabled before reporting
10426afe65c8 Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
e28f376dd8df fs/sysv: Null check to prevent null-ptr-deref bug
e0a30f9d1a5e kasan,kmsan: remove __GFP_KSWAPD_RECLAIM usage from kasan/kmsan
664dbb356f67 fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_load_attr_list()
33391c7e1a2a mm: kmem: fix a NULL pointer dereference in 
obj_stock_flush_required()
11e760b5e7f2 file: reinstate f_pos locking optimization for regular files
158b3678c86b clk: imx93: Propagate correct error in imx93_clocks_probe()
ee9968d72af8 sunvnet: fix sparc64 build error after gso code split
5415dde3e76a Revert "page cache: fix page_cache_next/prev_miss off by one"
6df7dd9270c5 drm/i915/gt: Cleanup aux invalidation registers
ed7ac41cfcef drm/i915: Fix premature release of request's reusable memory
49b3b979e79f drm/ttm: check null pointer before accessing when swapping
e3c24712441e open: make RESOLVE_CACHED correctly test for O_TMPFILE
64b7ae70678b arm64/ptrace: Don't enable SVE when setting streaming SVE
0d22576f1903 arm64/ptrace: Flush FP state when setting ZT0
cfb2b39db538 arm64/fpsimd: Sync FPSIMD state with SVE for SME only systems
789c015d9a18 arm64/fpsimd: Clear SME state in the target task when setting 
the VL
0693012274fd arm64/fpsimd: Sync and zero pad FPSIMD state for streaming SVE
434ebb3960b7 parisc/mm: preallocate fixmap page tables at init
410b0d2d54e6 powerpc/ftrace: Create a dummy stackframe to fix stack unwind
f2556c93c388 smb: client: fix dfs link mount against w2k8
063c9ce8e74e bpf: Disable preemption in bpf_event_output
7bb7b479d111 rbd: prevent busy loop when requesting exclusive lock
73626b70b361 x86/hyperv: Disable IBT when hypercall page lacks ENDBR 
instruction
01c3a34f5ed7 wifi: mt76: mt7615: do not advertise 5 GHz on first phy of 
MT7615D (DBDC)
ea6cce8d6899 net: tap_open(): set sk_uid from current_fsuid()
36161e7d40e7 net: tun_chr_open(): set sk_uid from current_fsuid()
040d7f19f206 arm64: dts: stratix10: fix incorrect I2C property for SCL 
signal
a0ac32cf61e5 bpf: Disable preemption in bpf_perf_event_output
d92b04b2eae0 riscv: Export va_kernel_pa_offset in vmcoreinfo
501a38b801f4 mtd: rawnand: meson: fix OOB available bytes for ECC
6c26c42e076e mtd: spinand: winbond: Fix ecc_get_status
fa4cfb7d204c mtd: spinand: toshiba: Fix ecc_get_status
e705b1680001 exfat: release s_lock before calling dir_emit()
e1a73ba43cf8 exfat: check if filename entries exceeds max filename length
0c5c3e8a2550 exfat: use kvmalloc_array/kvfree instead of kmalloc_array/kfree
3d4d2e55b31c firmware: arm_scmi: Drop OF node reference in the transport 
channel setup
0b39dfaf255b ceph: defer stopping mdsc delayed_work
c29cc7eef96b USB: zaurus: Add ID for A-300/B-500/C-700

[OE-core] [PATCH 03/10] linux-yocto/6.1: update to v6.1.45

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Updating  to the latest korg -stable release that comprises
the following commits:

1321ab403b38 Linux 6.1.45
f2615bb47be4 x86/CPU/AMD: Do not leak quotient data after a division by 0
673cdde74fd1 Revert "drm/i915: Disable DC states for all commits"
af7215182417 drm/amdgpu: Use apt name for FW reserved region
3d0a34c42f0d drm/amdgpu: Remove unnecessary domain argument
526defeec474 drm/amdgpu: add vram reservation based on 
vram_usagebyfirmware_v2_2
99255a2b6849 arm64/ptrace: Don't enable SVE when setting streaming SVE
c2fdf827f8fc exfat: check if filename entries exceeds max filename length
e2fb24ce37ca f2fs: don't reset unchangable mount option in f2fs_remount()
6ba0594a81f9 f2fs: fix to set flush_merge opt and show noflush_merge
e355972affb6 selftests/rseq: Play nice with binaries statically linked 
against glibc 2.35+
56562676102e drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en 
is 0
63eeb50fa110 drm/amd/display: Ensure that planes are in the same order
740d4cae248a drm/imx/ipuv3: Fix front porch adjustment upon hactive aligning
a492b8281c36 powerpc/mm/altmap: Fix altmap boundary check
f4b700c71802 mtd: rawnand: fsl_upm: Fix an off-by one test in fun_exec_op()
b71c00256da4 mtd: rawnand: rockchip: Align hwecc vs. raw page helper layouts
5a8a35b71bd3 mtd: rawnand: rockchip: fix oobfree offset and description
6c591fce484e mtd: rawnand: omap_elm: Fix incorrect type in assignment
88b1958fb57d io_uring: annotate offset timeout races
a78a8bcdc26d f2fs: fix to do sanity check on direct node in truncate_dnode()
23e72231f828 btrfs: remove BUG_ON()'s in add_new_free_space()
56c0d76a9722 ext2: Drop fragment support
295ef44a2aba fs: Protect reconfiguration of sb read-write from racing writes
1bebbd9b8037 net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
203d58930d4a debugobjects: Recheck debug_objects_enabled before reporting
29fac1849933 Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
1416eebaad80 fs/sysv: Null check to prevent null-ptr-deref bug
ccc6de4d4f34 fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_load_attr_list()
33d9490b27e5 mm: kmem: fix a NULL pointer dereference in 
obj_stock_flush_required()
4968484ac8ef file: reinstate f_pos locking optimization for regular files
7a1178a3671b bpf, cpumap: Make sure kthread is running before map update 
returns
8a211e9118d5 clk: imx93: Propagate correct error in imx93_clocks_probe()
37f6073f7db3 drm/i915/gt: Cleanup aux invalidation registers
4db8b39418a6 drm/i915: Fix premature release of request's reusable memory
1fdd16d89c01 drm/ttm: check null pointer before accessing when swapping
4f03b0471ee0 open: make RESOLVE_CACHED correctly test for O_TMPFILE
61f96da37dd4 arm64/fpsimd: Sync FPSIMD state with SVE for SME only systems
654c1dd350c7 arm64/fpsimd: Clear SME state in the target task when setting 
the VL
bae353469a28 arm64/fpsimd: Sync and zero pad FPSIMD state for streaming SVE
b8ea2a46913b powerpc/ftrace: Create a dummy stackframe to fix stack unwind
36dd8ca330b7 bpf: Disable preemption in bpf_event_output
ec062367fa0c rbd: prevent busy loop when requesting exclusive lock
98cccbd0a19a x86/hyperv: Disable IBT when hypercall page lacks ENDBR 
instruction
0526119bf59e wifi: mt76: mt7615: do not advertise 5 GHz on first phy of 
MT7615D (DBDC)
767800fc402d net: tap_open(): set sk_uid from current_fsuid()
b6846d7c408b net: tun_chr_open(): set sk_uid from current_fsuid()
367fdf369dc7 arm64: dts: stratix10: fix incorrect I2C property for SCL 
signal
3654ed5daf49 bpf: Disable preemption in bpf_perf_event_output
680f4d8aec1b mtd: rawnand: meson: fix OOB available bytes for ECC
67327cadba59 mtd: spinand: toshiba: Fix ecc_get_status
724ce05212d0 exfat: release s_lock before calling dir_emit()
1427a7e96fb9 exfat: use kvmalloc_array/kvfree instead of kmalloc_array/kfree
bc41119995e4 firmware: arm_scmi: Drop OF node reference in the transport 
channel setup
a062da58ed97 ceph: defer stopping mdsc delayed_work
ad82aac732c2 USB: zaurus: Add ID for A-300/B-500/C-700
be52667ba243 libceph: fix potential hang in ceph_osdc_notify()
f62faadc791e scsi: storvsc: Limit max_sectors for virtual Fibre Channel 
devices
645603ab5fa8 scsi: zfcp: Defer fc_rport blocking until after ADISC response
f0618c305b41 rust: allocator: Prevent mis-aligned allocation
cd4bdf8f98ef tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
e53917e7efea tcp_metrics: annotate data-races around tm->tcpm_net
6dea95d8caff tcp_metrics: annotate data-races around tm->tcpm_vals[]
fee608e80271 tcp_metrics: annotate data-races around tm->tcpm_lock
4a77a0f7526c tcp_metrics: annotate data-races around tm->tcpm_stamp
71f891a25405 tcp_metrics: fix addr_same() helper
afac854f8221 prestera: fix fallback t

[OE-core] [PATCH 04/10] kern-tools: include utility to post process config diffs

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Trevor Woerner contributed a simple utility that cleans up a .config
diff to produce a fragment.

kconfig-diff2frag.py: introduce a utility to post process a config diff

Add a python tool to generate a config fragment from a unified diff of two
kernel configurations. The diff is read from stdin and the fragment is 
printed
to stdout.

Usage:
$ diff -u config1 config2 | kconfig-diff2frag.py

Signed-off-by: Bruce Ashfield 
---
 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb 
b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 388d8feebc..cea12240f0 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "\
 
 DEPENDS = "git-native"
 
-SRCREV = "2d01f24bc78256c709728eb3f204491bce13e0e5"
+SRCREV = "6645d3897cc2eeb1237ee0e2ff5342bd73ee0875"
 PV = "0.3+git${SRCPV}"
 
 inherit native
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186454): 
https://lists.openembedded.org/g/openembedded-core/message/186454
Mute This Topic: https://lists.openembedded.org/mt/100875508/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 05/10] linux-yocto/6.1: fix uninitialized read in nohz_full/isolcpus setup

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto/6.1:

4675ec8d0b9a kernel/sched: Fix uninitialized read in nohz_full/isolcpus 
setup

The carry forward of commit from the v5.15 linux-yocto kernel:

https://git.yoctoproject.org/linux-yocto/commit/?id=97c96388922

...in which case the sanity checks are properly *after* the allocation
and processing of the bootargs into the cpumask.

However, it seems patch (or wiggle?) apparently decided to put the
sanity checks *before* the population of the cpumask during the
carry-forward and generation of the new v6.1 kernel.  Meaning they are
validating uninitialized memory and hence nohz_full= and isolcpus= are
subject to random failures even for valid input ranges.

Signed-off-by: Adrian Cinal 
Acked-by: Paul Gortmaker 
Signed-off-by: Bruce Ashfield 
---
 .../linux/linux-yocto-rt_6.1.bb   |  4 ++--
 .../linux/linux-yocto-tiny_6.1.bb |  4 ++--
 meta/recipes-kernel/linux/linux-yocto_6.1.bb  | 24 +--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
index 8e59cf937e..7b410df847 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
@@ -14,8 +14,8 @@ python () {
 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "0aa0b7396b5cbfccd69d23b07e095e4c4fa20589"
-SRCREV_meta ?= "8da434f09dc2892d8ec26325f0856aabccc17bed"
+SRCREV_machine ?= "57eb889d204238845f238b44db6affe64480b958"
+SRCREV_meta ?= "2e1a81f17434de2a9bd27676efdde7861946582e"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https
 \

git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.1;destsuffix=${KMETA};protocol=https"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
index c0c93fd3da..a37da27401 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
@@ -17,8 +17,8 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_meta ?= "8da434f09dc2892d8ec26325f0856aabccc17bed"
+SRCREV_machine ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_meta ?= "2e1a81f17434de2a9bd27676efdde7861946582e"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto_6.1.bb
index ce782677c5..a54e98ee92 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.1.bb
@@ -18,18 +18,18 @@ KBRANCH:qemux86-64 ?= "v6.1/standard/base"
 KBRANCH:qemuloongarch64  ?= "v6.1/standard/base"
 KBRANCH:qemumips64 ?= "v6.1/standard/mti-malta64"
 
-SRCREV_machine:qemuarm ?= "f009f4217b1b00e7de4fde7454a86ff5cc83ceef"
-SRCREV_machine:qemuarm64 ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_machine:qemuloongarch64 ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_machine:qemumips ?= "3db59f99ef5fddd5dc436d0e58bb9572051e08ed"
-SRCREV_machine:qemuppc ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_machine:qemuriscv64 ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_machine:qemuriscv32 ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_machine:qemux86 ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_machine:qemux86-64 ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_machine:qemumips64 ?= "173a48cfd962bf386bc591f1bb654d88d70cde6c"
-SRCREV_machine ?= "fb0e7ef6dd4b51325abcaab53645962994018135"
-SRCREV_meta ?= "8da434f09dc2892d8ec26325f0856aabccc17bed"
+SRCREV_machine:qemuarm ?= "df11584ee46919ffa45c33ba496754db47c59b66"
+SRCREV_machine:qemuarm64 ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_machine:qemuloongarch64 ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_machine:qemumips ?= "5d4417bb0ff0d6c89e41a694e20135e1dce778f3"
+SRCREV_machine:qemuppc ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_machine:qemuriscv64 ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_machine:qemuriscv32 ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_machine:qemux86 ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_machine:qemux86-64 ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_machine:qemumips64 ?= "c2a60bb7b1739180481e1d7a7e87bb573aa01ae7"
+SRCREV_machine ?= "786775632028f7909d9f905c4530d7eaae0b2ab0"
+SRCREV_meta ?= "2e1a81f17434de2a9bd27676efdde7861946582e"
 
 # set your preferred provider of linux-yocto to 'linux-yocto-upstream', and 
you'll
 # get the /base branch, which is pure upstream -stable, and the same
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186455): 
ht

[OE-core] [PATCH 06/10] linux-yocto/6.4: fix uninitialized read in nohz_full/isolcpus setup

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto/6.4:

4675ec8d0b9a kernel/sched: Fix uninitialized read in nohz_full/isolcpus 
setup

The carry forward of commit from the v5.15 linux-yocto kernel:

https://git.yoctoproject.org/linux-yocto/commit/?id=97c96388922

...in which case the sanity checks are properly *after* the allocation
and processing of the bootargs into the cpumask.

However, it seems patch (or wiggle?) apparently decided to put the
sanity checks *before* the population of the cpumask during the
carry-forward and generation of the new v6.1 kernel.  Meaning they are
validating uninitialized memory and hence nohz_full= and isolcpus= are
subject to random failures even for valid input ranges.

Signed-off-by: Adrian Cinal 
Acked-by: Paul Gortmaker 
Signed-off-by: Bruce Ashfield 
---
 .../linux/linux-yocto-rt_6.4.bb   |  4 ++--
 .../linux/linux-yocto-tiny_6.4.bb |  4 ++--
 meta/recipes-kernel/linux/linux-yocto_6.4.bb  | 24 +--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
index 892794a142..999d54a46a 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
@@ -14,8 +14,8 @@ python () {
 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "c5e2054d6dd1e4d87bc05758b03c8414b6229bdc"
-SRCREV_meta ?= "b7b65d4e9a3f7910d9590c325798a6d012087555"
+SRCREV_machine ?= "a6b1e0d6cfc7843898d7624427f50e5391edac51"
+SRCREV_meta ?= "be4b1defa25b1560b7d92e1ade1b7c52a226fc38"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https
 \

git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.4;destsuffix=${KMETA};protocol=https"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
index 546aeea7bd..063c39bb9d 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
@@ -17,8 +17,8 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_meta ?= "b7b65d4e9a3f7910d9590c325798a6d012087555"
+SRCREV_machine ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_meta ?= "be4b1defa25b1560b7d92e1ade1b7c52a226fc38"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto_6.4.bb
index 3be24d60e6..d255504bd2 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.4.bb
@@ -18,18 +18,18 @@ KBRANCH:qemux86-64 ?= "v6.4/standard/base"
 KBRANCH:qemuloongarch64  ?= "v6.4/standard/base"
 KBRANCH:qemumips64 ?= "v6.4/standard/mti-malta64"
 
-SRCREV_machine:qemuarm ?= "98ab6b8c56f20616739f11d78f9ce5e0f142e897"
-SRCREV_machine:qemuarm64 ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_machine:qemuloongarch64 ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_machine:qemumips ?= "ea17dea03919f5923b5948473fda920b9a6c2823"
-SRCREV_machine:qemuppc ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_machine:qemuriscv64 ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_machine:qemuriscv32 ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_machine:qemux86 ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_machine:qemux86-64 ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_machine:qemumips64 ?= "d8138296adb9b11a94fcc42d345e49bbb1dd5ede"
-SRCREV_machine ?= "d58a0ccc079a8173c41eca28d801f07eb806d3e5"
-SRCREV_meta ?= "b7b65d4e9a3f7910d9590c325798a6d012087555"
+SRCREV_machine:qemuarm ?= "53136802928146b86b68bdf796f825d142e3a014"
+SRCREV_machine:qemuarm64 ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_machine:qemuloongarch64 ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_machine:qemumips ?= "bec202d0a29e4acf9d4e673f1c358e60879c95dc"
+SRCREV_machine:qemuppc ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_machine:qemuriscv64 ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_machine:qemuriscv32 ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_machine:qemux86 ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_machine:qemux86-64 ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_machine:qemumips64 ?= "e9dcec67cb7b9703d6eac9a705e94e5f5aab4f0c"
+SRCREV_machine ?= "a0b10018f36e04152354dc83c41134406e137571"
+SRCREV_meta ?= "be4b1defa25b1560b7d92e1ade1b7c52a226fc38"
 
 # set your preferred provider of linux-yocto to 'linux-yocto-upstream', and 
you'll
 # get the /base branch, which is pure upstream -stable, and the same
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186456): 
ht

[OE-core] [PATCH 07/10] linux-yocto/6.4: update to v6.4.11

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Updating  to the latest korg -stable release that comprises
the following commits:

eb3cdb587879 Linux 6.4.11
0fc364d079fd alpha: remove __init annotation from exported page_is_ram()
7438f63562fa ACPI: scan: Create platform device for CS35L56
fee4731266af platform/x86: serial-multi-instantiate: Auto detect IRQ 
resource for CSC3551
cada3f116e8d platform: mellanox: Fix order in exit flow
26cca33e5d2b platform: mellanox: mlx-platform: Modify graceful shutdown 
callback and power down mask
90516af4b63c platform: mellanox: mlx-platform: Fix signals polarity and 
latch mask
9005ce6ecd31 platform: mellanox: Change register offset addresses
53f2cbc03aa5 platform/x86: lenovo-ymc: Only bind on machines with a 
convertible DMI chassis-type
791a666573d1 platform/x86: msi-ec: Fix the build
52620dae7c33 scsi: qedf: Fix firmware halt over suspend and resume
78dca9ac06fc scsi: qedi: Fix firmware halt over suspend and resume
d4326d5256cc scsi: fnic: Replace return codes in fnic_clean_pending_aborts()
43c0e16d0c5e scsi: core: Fix possible memory leak if device_add() fails
ed0acb1ee2e9 scsi: snic: Fix possible memory leak if device_add() fails
0e85ca3f9272 scsi: 53c700: Check that command slot is not NULL
9a731466afc5 scsi: ufs: renesas: Fix private allocation
763c06565055 scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
20831760ea77 scsi: core: Fix legacy /proc parsing buffer overflow
e044b1b286ec btrfs: set cache_block_group_error if we find an error
84256e00eeca btrfs: reject invalid reloc tree root keys with stack dump
a96b6519ac71 btrfs: exit gracefully if reloc roots don't match
663c9949ba5c btrfs: properly clear end of the unreserved range in 
cow_file_range
15da6eaecc2f btrfs: don't wait for writeback on clean pages in 
extent_write_cache_pages
f1f2e3a418ff btrfs: don't stop integrity writeback too early
793525c287c9 btrfs: wait for actual caching progress during allocation
373b7dbe1c3d gpio: sim: mark the GPIO chip as a one that can sleep
c2e0d39e76be gpio: ws16c48: Fix off-by-one error in WS16C48 resource region 
extent
753bcd16bdf4 ibmvnic: Ensure login failure recovery is safe from other 
resets
7024d79d01bb ibmvnic: Do partial reset on login failure
3e4ae6669a0a ibmvnic: Handle DMA unmapping of login buffs in release 
functions
7abe2a2033af ibmvnic: Unmap DMA login rsp buffer on send login fail
2a394e5511fb ibmvnic: Enforce stronger sanity checks on login response
62ef77587905 net/mlx5: Reload auxiliary devices in pci error handlers
6a604ea891ba net/mlx5: Skip clock update work when device is in error state
498e7e243458 net/mlx5: LAG, Check correct bucket when modifying LAG
dc91dae14f6f net/mlx5e: Unoffload post act rule when handling FIB events
4321bbc16fee net/mlx5: Allow 0 for total host VFs
c256f96535bd net/mlx5: DR, Fix wrong allocation of modify hdr pattern
bc1918bac0f3 net/mlx5e: TC, Fix internal port memory leak
16b7775ae438 net/mlx5e: Take RTNL lock when needed before calling 
xdp_set_features()
8c23a2878c82 dmaengine: owl-dma: Modify mismatched function name
0d2bbddb0578 dmaengine: idxd: Clear PRS disable flag when disabling IDXD 
device
957c8fbde39a dmaengine: mcf-edma: Fix a potential un-allocated memory access
07f970ebe6dd net: hns3: fix strscpy causing content truncation issue
d25665f52855 nexthop: Fix infinite nexthop bucket dump when using maximum 
nexthop ID
0fb288559cd0 nexthop: Make nexthop bucket dump more efficient
b6732dd0228c nexthop: Fix infinite nexthop dump when using maximum nexthop 
ID
e691f864c043 net: enetc: reimplement RFS/RSS memory clearing as PCI quirk
ef2d6bf96956 net: hns3: fix deadlock issue when externel_lb and reset are 
executed together
008b9c6167bd net: hns3: add wait until mac link down
6a5e230a8a17 net: hns3: refactor hclge_mac_link_status_wait for interface 
reuse
7ae8fa6b7097 net: dsa: ocelot: call dsa_tag_8021q_unregister() under 
rtnl_lock() on driver remove
15d362ca86c7 net: phy: at803x: remove set/get wol callbacks for AR8032
8373dca3c1f8 net: marvell: prestera: fix handling IPv4 routes with nhid
3fde6360e63c net: tls: avoid discarding data on record close
f5ebe0d12d59 RDMA/bnxt_re: Fix error handling in probe failure path
c95863f6d970 RDMA/bnxt_re: Properly order ib_device_unalloc() to avoid UAF
1035af5a3bc5 RDMA/umem: Set iova in ODP flow
e64babe4b8e1 wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
8ae32cdfa568 wifi: brcm80211: handle params_v1 allocation failure
f16e9bfb574b drm/rockchip: Don't spam logs in atomic check
bd7b1430a21b drm/nouveau: remove unused tu102_gr_load() function
7eacde7fb948 drm/bridge: it6505: Check power state with it6505->powered in 
IRQ handler
059412083cf7 drm/amd/display: Don't show stack trace for missing eDP
d32a5e9b825d IB/hf

[OE-core] [PATCH 08/10] linux-yocto/6.1: update to v6.1.46

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Updating  to the latest korg -stable release that comprises
the following commits:

6c44e13dc284 Linux 6.1.46
5525c289dbcf drm/amd/pm/smu7: move variables to where they are used
4346a66ad198 sch_netem: fix issues in netem_change() vs get_dist_table()
3ae919c317dd alpha: remove __init annotation from exported page_is_ram()
cbce265f959f ACPI: scan: Create platform device for CS35L56
afc4ddd9507f platform/x86: serial-multi-instantiate: Auto detect IRQ 
resource for CSC3551
38b0020f68b7 scsi: qedf: Fix firmware halt over suspend and resume
a9518f4a4978 scsi: qedi: Fix firmware halt over suspend and resume
fb004497b3ea scsi: fnic: Replace return codes in fnic_clean_pending_aborts()
b191ff1f075c scsi: core: Fix possible memory leak if device_add() fails
7723a5d5d187 scsi: snic: Fix possible memory leak if device_add() fails
9fdb273ede6f scsi: 53c700: Check that command slot is not NULL
8282d0b35880 scsi: ufs: renesas: Fix private allocation
ed70fa5629a8 scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
0e1605ec5bea scsi: core: Fix legacy /proc parsing buffer overflow
f3f0f95a0233 netfilter: nf_tables: report use refcount overflow
c21fddce7e45 nvme-rdma: fix potential unbalanced freeze & unfreeze
cddbaa8dee7e nvme-tcp: fix potential unbalanced freeze & unfreeze
bf67802453d3 btrfs: set cache_block_group_error if we find an error
3ae93b316ca4 btrfs: reject invalid reloc tree root keys with stack dump
9d04716e3665 btrfs: exit gracefully if reloc roots don't match
7112abc9e8f2 btrfs: properly clear end of the unreserved range in 
cow_file_range
504d81c512f6 btrfs: don't stop integrity writeback too early
4e18c827d61b btrfs: wait for actual caching progress during allocation
b8cd871d0a18 gpio: sim: mark the GPIO chip as a one that can sleep
227bd2c1eab1 gpio: ws16c48: Fix off-by-one error in WS16C48 resource region 
extent
5e17b8ee64c1 ibmvnic: Ensure login failure recovery is safe from other 
resets
206ccf4f0977 ibmvnic: Do partial reset on login failure
31ccd1ba20d8 ibmvnic: Handle DMA unmapping of login buffs in release 
functions
24556c1cc9db ibmvnic: Unmap DMA login rsp buffer on send login fail
2c5dd8805e6c ibmvnic: Enforce stronger sanity checks on login response
ad0f73cbace4 net/mlx5: Reload auxiliary devices in pci error handlers
88ec484ef8e2 net/mlx5: Skip clock update work when device is in error state
4276f3e7ae4a net/mlx5: LAG, Check correct bucket when modifying LAG
a824d012ad8f net/mlx5: Allow 0 for total host VFs
ab06983c5bbd dmaengine: owl-dma: Modify mismatched function name
dff220037148 dmaengine: mcf-edma: Fix a potential un-allocated memory access
c4f7de3e8ce1 net: hns3: fix strscpy causing content truncation issue
87d7e140081f nexthop: Fix infinite nexthop bucket dump when using maximum 
nexthop ID
8d6df2c523e2 nexthop: Make nexthop bucket dump more efficient
0b10d8d1cf85 nexthop: Fix infinite nexthop dump when using maximum nexthop 
ID
743f7c1762e0 net: hns3: fix deadlock issue when externel_lb and reset are 
executed together
59bad9190ac7 net: hns3: add wait until mac link down
667ce6a0ff80 net: hns3: refactor hclge_mac_link_status_wait for interface 
reuse
758dbcfb257e net: dsa: ocelot: call dsa_tag_8021q_unregister() under 
rtnl_lock() on driver remove
001b7d6706e2 net: phy: at803x: remove set/get wol callbacks for AR8032
a3e5f3b7f25d net: marvell: prestera: fix handling IPv4 routes with nhid
059ec8287fd3 net: tls: avoid discarding data on record close
05e6b93da45d RDMA/umem: Set iova in ODP flow
521860ddf314 wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
94916b314861 drm/rockchip: Don't spam logs in atomic check
ac6640f4193d IB/hfi1: Fix possible panic during hotplug remove
c2efcaf304fb iavf: fix potential races for FDIR filters
bcbc48b12092 drivers: vxlan: vnifilter: free percpu vni stats on error path
eeb0e4c1dbdf drivers: net: prevent tun_build_skb() to exceed the packet 
size limit
a6ddc1c77487 dccp: fix data-race around dp->dccps_mss_cache
00f033d451c4 bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid 
from slaves
15b453cf7348 xsk: fix refcount underflow in error path
da5f42a6e748 tunnels: fix kasan splat when generating ipv4 pmtu error
f20a941bc2c5 tcp: add missing family to tcp_set_ca_state() tracepoint
ddebdaec1af2 net/smc: Use correct buffer sizes when switching between TCP 
and SMC
584a783270c1 net/packet: annotate data-races around tp->status
b249c510b43e mptcp: fix the incorrect judgment for msk->cb_flags
fc0b41ac1106 macsec: use DEV_STATS_INC()
ebceef298c56 mISDN: Update parameter type of dsp_cmx_send()
6b2824b198a6 bpf, sockmap: Fix bug that strp_done cannot be called
ed90fe7435c5 bpf, sockmap: Fix map type error in sock_map_del_link
20acffcdc2b7 net: core

[OE-core] [PATCH 09/10] linux-yocto/6.1: fix IRQ-80 warnings

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto/6.1:

44fd0c7a5a79 tick/rcu: fix false positive "softirq work is pending" 
messages on RT

Paul Gortmaker has found and fixed the root cause of why we are
getting "softirq work is pending" messages on boot with -rt ..
although the issue is not rt-specific.

The fix has been submitted to lkml, but we are integrating it
to avoid the delay of -stable picking it up and then linux-yocto
doing the same.

Signed-off-by: Bruce Ashfield 
---
 .../linux/linux-yocto-rt_6.1.bb   |  2 +-
 .../linux/linux-yocto-tiny_6.1.bb |  2 +-
 meta/recipes-kernel/linux/linux-yocto_6.1.bb  | 22 +--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
index 0c211dbb72..d13722b32f 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_6.1.bb
@@ -14,7 +14,7 @@ python () {
 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "3d4b5681aeedac4a5129dd50e12afbda86cad699"
+SRCREV_machine ?= "9d355978d3a95f5c190a21d95ebb2a5d0e638537"
 SRCREV_meta ?= "295d37e268bc02070da670e46456227bee38795b"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https
 \
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
index 5b58466774..a77bd9d183 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_6.1.bb
@@ -17,7 +17,7 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "c9eb757606ff01586272deee463b8d27fcb3"
+SRCREV_machine ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
 SRCREV_meta ?= "295d37e268bc02070da670e46456227bee38795b"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.1.bb 
b/meta/recipes-kernel/linux/linux-yocto_6.1.bb
index e3ddd02880..deed2115c4 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.1.bb
@@ -18,17 +18,17 @@ KBRANCH:qemux86-64 ?= "v6.1/standard/base"
 KBRANCH:qemuloongarch64  ?= "v6.1/standard/base"
 KBRANCH:qemumips64 ?= "v6.1/standard/mti-malta64"
 
-SRCREV_machine:qemuarm ?= "bafadaeb59cfe58562e6c6f5b98d9aa2ebb41cae"
-SRCREV_machine:qemuarm64 ?= "c9eb757606ff01586272deee463b8d27fcb3"
-SRCREV_machine:qemuloongarch64 ?= "c9eb757606ff01586272deee463b8d27fcb3"
-SRCREV_machine:qemumips ?= "858e92d1f51930ba57f4cd9013c094da15d4ac65"
-SRCREV_machine:qemuppc ?= "c9eb757606ff01586272deee463b8d27fcb3"
-SRCREV_machine:qemuriscv64 ?= "c9eb757606ff01586272deee463b8d27fcb3"
-SRCREV_machine:qemuriscv32 ?= "c9eb757606ff01586272deee463b8d27fcb3"
-SRCREV_machine:qemux86 ?= "c9eb757606ff01586272deee463b8d27fcb3"
-SRCREV_machine:qemux86-64 ?= "c9eb757606ff01586272deee463b8d27fcb3"
-SRCREV_machine:qemumips64 ?= "41bf8e89bdd29252ee75fe6c8ad0ac65bf2b7bca"
-SRCREV_machine ?= "c9eb757606ff01586272deee463b8d27fcb3"
+SRCREV_machine:qemuarm ?= "4e49d63e747e81aebad5ce6091ba6de09f09d46f"
+SRCREV_machine:qemuarm64 ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
+SRCREV_machine:qemuloongarch64 ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
+SRCREV_machine:qemumips ?= "e527feb9cd8acbcbcd7115f51cf71166fdbce11a"
+SRCREV_machine:qemuppc ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
+SRCREV_machine:qemuriscv64 ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
+SRCREV_machine:qemuriscv32 ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
+SRCREV_machine:qemux86 ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
+SRCREV_machine:qemux86-64 ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
+SRCREV_machine:qemumips64 ?= "296b096f4c747e4c4b31b1708fc8a0acb1dac04e"
+SRCREV_machine ?= "44fd0c7a5a7955282a1ab24bf3dcdee068839ad2"
 SRCREV_meta ?= "295d37e268bc02070da670e46456227bee38795b"
 
 # set your preferred provider of linux-yocto to 'linux-yocto-upstream', and 
you'll
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186459): 
https://lists.openembedded.org/g/openembedded-core/message/186459
Mute This Topic: https://lists.openembedded.org/mt/100875513/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 10/10] linux-yocto/6.4: fix IRQ-80 warnings

2023-08-21 Thread Bruce Ashfield
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto/6.4:

9753b4497951 tick/rcu: fix false positive "softirq work is pending" 
messages on RT

Paul Gortmaker has found and fixed the root cause of why we are
getting "softirq work is pending" messages on boot with -rt ..
although the issue is not rt-specific.

The fix has been submitted to lkml, but we are integrating it
to avoid the delay of -stable picking it up and then linux-yocto
doing the same.

Signed-off-by: Bruce Ashfield 
---
 .../linux/linux-yocto-rt_6.4.bb   |  2 +-
 .../linux/linux-yocto-tiny_6.4.bb |  2 +-
 meta/recipes-kernel/linux/linux-yocto_6.4.bb  | 22 +--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
index 95891cdf60..5f633405ea 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
@@ -14,7 +14,7 @@ python () {
 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "efba76521c3c18fc10ab88e3b94293f19be9fdc8"
+SRCREV_machine ?= "7b9505550d7a84a1f30b9af8b90aafc8dde37023"
 SRCREV_meta ?= "d9483a24c9ee33b6e566baa5233cbd9feaeb5212"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https
 \
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
index 5de53abcd2..982352b010 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
@@ -17,7 +17,7 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
+SRCREV_machine ?= "9753b4497951a5bd1a921e784532257d26a8b008"
 SRCREV_meta ?= "d9483a24c9ee33b6e566baa5233cbd9feaeb5212"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto_6.4.bb
index 45d19edb79..ce406db90e 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.4.bb
@@ -18,17 +18,17 @@ KBRANCH:qemux86-64 ?= "v6.4/standard/base"
 KBRANCH:qemuloongarch64  ?= "v6.4/standard/base"
 KBRANCH:qemumips64 ?= "v6.4/standard/mti-malta64"
 
-SRCREV_machine:qemuarm ?= "1918d171c09ab3aeedcf7c9f0a98d7c3c10a8524"
-SRCREV_machine:qemuarm64 ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
-SRCREV_machine:qemuloongarch64 ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
-SRCREV_machine:qemumips ?= "f3ec8aee3f7ce0adc65668dd18347f144c12709c"
-SRCREV_machine:qemuppc ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
-SRCREV_machine:qemuriscv64 ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
-SRCREV_machine:qemuriscv32 ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
-SRCREV_machine:qemux86 ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
-SRCREV_machine:qemux86-64 ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
-SRCREV_machine:qemumips64 ?= "bc7632d06c742e712514981591ce647b5d6cbd15"
-SRCREV_machine ?= "e28e14070ba4eba3b6832a8329d4120ed5de8efa"
+SRCREV_machine:qemuarm ?= "d4dbcad8e827ce8e71a29b69acc19f4d3f689119"
+SRCREV_machine:qemuarm64 ?= "9753b4497951a5bd1a921e784532257d26a8b008"
+SRCREV_machine:qemuloongarch64 ?= "9753b4497951a5bd1a921e784532257d26a8b008"
+SRCREV_machine:qemumips ?= "3bab6247ffb07f9de6bdb388854461d0ab7bc7dd"
+SRCREV_machine:qemuppc ?= "9753b4497951a5bd1a921e784532257d26a8b008"
+SRCREV_machine:qemuriscv64 ?= "9753b4497951a5bd1a921e784532257d26a8b008"
+SRCREV_machine:qemuriscv32 ?= "9753b4497951a5bd1a921e784532257d26a8b008"
+SRCREV_machine:qemux86 ?= "9753b4497951a5bd1a921e784532257d26a8b008"
+SRCREV_machine:qemux86-64 ?= "9753b4497951a5bd1a921e784532257d26a8b008"
+SRCREV_machine:qemumips64 ?= "de0569e0860973391d16074bbe9366afb15594bf"
+SRCREV_machine ?= "9753b4497951a5bd1a921e784532257d26a8b008"
 SRCREV_meta ?= "d9483a24c9ee33b6e566baa5233cbd9feaeb5212"
 
 # set your preferred provider of linux-yocto to 'linux-yocto-upstream', and 
you'll
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186460): 
https://lists.openembedded.org/g/openembedded-core/message/186460
Mute This Topic: https://lists.openembedded.org/mt/100875514/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 00/10] linux-yocto: consolidated pull request

2023-08-21 Thread Richard Purdie
On Mon, 2023-08-21 at 11:44 -0400, bruce.ashfi...@gmail.com wrote:
> From: Bruce Ashfield 
> 
> Richard,
> 
> While we track down the remaining 6.4 boot issues, here is the
> set of -stable and specific fixes that I've queued in my kernel
> testing tree.
> 
> It is possible that some of the 6.4-stable's have fixes for our
> boot issues, but I didn't see anything obvious.
> 
> In particular we have the -rt warning fix from PaulG and also
> a fixup on our isocpus patch.

Thanks! This means we should revert:

https://git.yoctoproject.org/poky/commit/?id=d57e6de496621cb721ef0eb23efa1bdb1363d8cb

?

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186461): 
https://lists.openembedded.org/g/openembedded-core/message/186461
Mute This Topic: https://lists.openembedded.org/mt/100875501/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 00/10] linux-yocto: consolidated pull request

2023-08-21 Thread Bruce Ashfield
On Mon, Aug 21, 2023 at 11:47 AM Richard Purdie
 wrote:
>
> On Mon, 2023-08-21 at 11:44 -0400, bruce.ashfi...@gmail.com wrote:
> > From: Bruce Ashfield 
> >
> > Richard,
> >
> > While we track down the remaining 6.4 boot issues, here is the
> > set of -stable and specific fixes that I've queued in my kernel
> > testing tree.
> >
> > It is possible that some of the 6.4-stable's have fixes for our
> > boot issues, but I didn't see anything obvious.
> >
> > In particular we have the -rt warning fix from PaulG and also
> > a fixup on our isocpus patch.
>
> Thanks! This means we should revert:
>
> https://git.yoctoproject.org/poky/commit/?id=d57e6de496621cb721ef0eb23efa1bdb1363d8cb
>

In theory ... yes!

Bruce

> ?
>
> Cheers,
>
> Richard



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186462): 
https://lists.openembedded.org/g/openembedded-core/message/186462
Mute This Topic: https://lists.openembedded.org/mt/100875501/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 00/14] devtool ide plugin

2023-08-21 Thread Adrian Freihofer
According to 
https://www.yoctoproject.org/community/yocto-project-engineering-request-for-quotation/
one of the proposed areas for development of the Yocto project is "VSCode IDE 
Integration - New developer tooling".
One aspect of this larger topic is helping application developers configure the 
IDE to work on a recipe's source code using Yocto's eSDK. This patchset 
provides a new devtool plugin (devtool ide) that does this fully automatically 
for recipes inheriting the cmake or the meson bbclass. Support for more 
programming languages and build tools may be added in the future.

Let's start with a brief introduction of how it looks like from a user's 
perspective.

Reference setup
---

$ . oe-init-build-env

Add the following layers to bblayers.conf file:
- meta
- meta-poky
- meta-yocto-bsp
- meta-selftest
  
Add the following to the local.conf

IMAGE_CLASSES += "image-combined-dbg"
IMAGE_GEN_DEBUGFS = "1"
IMAGE_FEATURES += "ssh-server-dropbear"
IMAGE_INSTALL:append = "\
cmake-example-ptest \
meson-example-ptest \
gdbserver \
"

Working on a recipe
---

Note for those who "hate cmake with passion": Replace cmake by meson in the 
following commands.

1. Add the recipe which should be modified to the workspace

   $ devtool modify cmake-example

2. Build the eSDK. This provides all the host tools as well as an image which 
can be used on the target device.
   Since everything is built with one bitbake command also all the debug 
symbols are expected to be consistent.

   $ devtool ide cmake-example core-image-minimal

3. Install the image on the target device or simply use Qemu

   $ runqemu

4. Start VSCode

   $ code "$BUILDDIR/workspace/sources/cmake-example"

5. Work in VSCode, after installing the proposed plugins

   Ctrl + Shift + p, cmake Select Configure Preset
   Ctrl + Shift + p, cmake Build

6. Execute the unit tests on the host works with Qemu even for cross compiled 
test executables.

   Ctrl + Shift + p, cmake Test

7. Remote debugging with GDB

   Ctrl + Shift + p, Run Task --> install && deploy-target cmake-example
   F5 (Debug configuration might be selected before)

8. Work on the recipes and call bitbake again to get the SDK updated.
   Building the application by calling cmake (from the IDE) or by calling 
bitbake or by calling devtool build is expected to produce the exact same 
results. To make that possible, the devtool ide plugin is designed to configure 
the IDE to call cmake with the exact same configuration as used by bitbake when 
building the recipe. Unlike the eSDK, the goal here is clearly that there is no 
longer a separation between the SDK and the application development process. 
Regardless of which tool is called, the same source files are edited and the 
same o-files are generated and re-used.

Working with a SDK without a recipe
---

If devtool ide is called for a recipe named none or meta-ide-support the eSDK 
with its generic environment file gets generated.
In case of using VSCode and cmake in addition to the well known environment 
file a cmake-kit
https://vector-of-bool.github.io/docs/vscode-cmake-tools/kits.html is added to 
the User-Local Kits.
This allows to work with cmake calling the cross-toolchain out of VSCode or a 
shell with the environment file sourced.

Design
--

The goal of this implementation is to create a configuration for VSCode (or 
other IDEs) that allows to work on the code of a recipe completely independent 
from bitbake. bitbake is only called if the configuration or the whole SDK has 
to be regenerated. But bitbake should not need to be called while working in 
the IDE. This has two major advantages over calling devtool build from the IDE:
- The IDE provides plugins for integration with cmake, for example. These 
features are usable, which would not be the case if bitbake or devtool are 
called from within the IDE.
- It is much faster.

Supporting other IDEs
-

Focus is currently VSCode. But a paramter "--ide=none" is already supported.
With this paramter passed, no VSCode specific config files are generated.
Instead, simple scripts are generated, which should be suitable for integration 
with other IDEs.

Testing
---

Reasonable but not yet complete test coverage is provided by:

$ oe-selftest -r devtool.DevtoolIdeTests

What's next?


- There is still a lot of room for improvement. But nonetheless, it provides a 
first implementation that could be integrated into the core, I think. 
Unfortunately there was no feedback on my RFC at 
https://lists.openembedded.org/g/openembedded-core/message/183819 so far.
- Support for more build-tools and programming languages as well as more IDEs 
should be possible. To prove the extendability 2 of both are already supported.


Please note that the first 2 patches should probably not be merged. But 
something like that is reuired to work with VSCode without OOM exceptions.


Adrian Freih

[OE-core] [PATCH 01/14] gitignore: vscode bitbake plugin folder

2023-08-21 Thread Adrian Freihofer
The vscode bitbake plugin creates its own build folder to run bitbake
independently from other bitbake instances.

Signed-off-by: Adrian Freihofer 
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 8f48d452dab..ca11ee36de2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
 /*.patch
 /.repo/
 /build*/
+vscode-bitbake-build/
 pyshtables.py
 pstage/
 scripts/oe-git-proxy-socks
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186464): 
https://lists.openembedded.org/g/openembedded-core/message/186464
Mute This Topic: https://lists.openembedded.org/mt/100876147/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 02/14] build: vscode configuration

2023-08-21 Thread Adrian Freihofer
This is just my setup. It's not supposed to be merged into poky.
However, it could be useful to have something similar in poky because
if VSCode tries to index the build folder it runs until the OOM killer
stops it. Depending on the configuration of the OOM killer it's also
very likely that some other randomly selected tasks get killed.
---
 .vscode/extensions.json | 11 +++
 .vscode/launch.json | 27 +++
 .vscode/settings.json   | 30 ++
 oe-init-build-env   |  8 
 4 files changed, 76 insertions(+)
 create mode 100644 .vscode/extensions.json
 create mode 100644 .vscode/launch.json
 create mode 100644 .vscode/settings.json

diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 000..09983dbc0dc
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,11 @@
+{
+"recommendations": [
+"EditorConfig.EditorConfig",
+"EugenWiens.bitbake",
+"maattdd.gitless",
+"ms-python.isort",
+"ms-python.python",
+"ms-python.vscode-pylance",
+"timonwong.shellcheck",
+]
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 000..145d2ab3e8c
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,27 @@
+{
+// Use IntelliSense to learn about possible attributes.
+// Hover to view descriptions of existing attributes.
+// For more information, visit: 
https://go.microsoft.com/fwlink/?linkid=830387
+"version": "0.2.0",
+"configurations": [
+{
+"name": "Python: bitbake -T-1 --server-only",
+"type": "python",
+"request": "launch",
+"program": "${workspaceFolder}/bitbake/bin/bitbake",
+"args": ["-T-1", "--server-only", "-DDD"],
+"cwd": "${workspaceFolder}/build",
+"envFile": "${workspaceFolder}/oe-init-build-env",
+"console": "integratedTerminal",
+"justMyCode": true
+},
+{
+"name": "Python: Current File",
+"type": "python",
+"request": "launch",
+"program": "${file}",
+"console": "integratedTerminal",
+"justMyCode": true
+}
+]
+}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 000..4b61b35e1aa
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,30 @@
+{
+// Configure glob patterns of file paths to exclude from file watching. 
Patterns must match on absolute paths (i.e. prefix with ** or the full path to 
match properly). Changing this setting requires a restart. When you experience 
Code consuming lots of CPU time on startup, you can exclude large folders to 
reduce the initial load.
+"files.watcherExclude": {
+"**/.git/**": true,
+"**/build*/cache/**": true,
+"**/build*/tmp/**": true,
+"**/downloads/**": true,
+"**/sstate-cache/**": true,
+"**/vscode-bitbake-build/**": true,
+"**/workspace/sources/**": true
+},
+// Configure glob patterns for excluding files and folders. For example, 
the files explorer decides which files and folders to show or hide based on 
this setting.
+"files.exclude": {
+"**/.git/**": true,
+"**/build*/cache/**": true,
+"**/build*/tmp/**": true,
+"**/downloads/**": true,
+"**/sstate-cache/**": true,
+"**/vscode-bitbake-build/**": true,
+"**/workspace/sources/**": true
+},
+"python.analysis.exclude": [
+"**/.git/**",
+"**/build*/**",
+"**/downloads/**",
+"**/sstate-cache/**",
+"**/vscode-bitbake-build/**",
+"**/workspace/sources/**"
+]
+}
diff --git a/oe-init-build-env b/oe-init-build-env
index 38333ab8582..450ae71788c 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -51,3 +51,11 @@ unset OEROOT
 
 [ -z "$BUILDDIR" ] || cd "$BUILDDIR"
 
+
+# Generate a minimal env file which can be used e.g. to debug bitbake with a 
Python debugger
+cat << EOFbuildenv > $BUILDDIR/.buildenv
+BBPATH="$BBPATH"
+BUILDDIR="$BUILDDIR"
+PATH="$PATH"
+BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS"
+EOFbuildenv
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186465): 
https://lists.openembedded.org/g/openembedded-core/message/186465
Mute This Topic: https://lists.openembedded.org/mt/100876148/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 03/14] cmake.bbclass: refactor cmake args

2023-08-21 Thread Adrian Freihofer
Make the details of the cmake configure arguments available to
d.getVar(). This allows to share them with devtool via tinfoil.

Signed-off-by: Adrian Freihofer 
---
 meta/classes-recipe/cmake.bbclass | 43 +--
 1 file changed, 24 insertions(+), 19 deletions(-)

diff --git a/meta/classes-recipe/cmake.bbclass 
b/meta/classes-recipe/cmake.bbclass
index 0dda104a695..7c40df4cdbf 100644
--- a/meta/classes-recipe/cmake.bbclass
+++ b/meta/classes-recipe/cmake.bbclass
@@ -158,6 +158,29 @@ CONFIGURE_FILES = "CMakeLists.txt"
 
 do_configure[cleandirs] = "${@d.getVar('B') if d.getVar('S') != d.getVar('B') 
else ''}"
 
+OECMAKE_ARGS = "\
+-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
+-DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), 
d.getVar('prefix') + '/')} \
+-DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir'), 
d.getVar('prefix') + '/')} \
+-DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir'), 
d.getVar('prefix') + '/')} \
+-DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
+
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir'),
 d.  getVar('prefix') + '/')} \
+-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
+-DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), 
d.getVar('prefix') + '/')} \
+-DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir'), 
d.getVar('prefix') + '/')} \
+-DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir'), 
d.getVar('prefix') + '/')} \
+-DPYTHON_EXECUTABLE:PATH=${PYTHON} \
+-DPython_EXECUTABLE:PATH=${PYTHON} \
+-DPython3_EXECUTABLE:PATH=${PYTHON} \
+-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
+-DCMAKE_INSTALL_SO_NO_EXE=0 \
+-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain.cmake \
+-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
+-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \
+-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
+-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
+"
+
 cmake_do_configure() {
if [ "${OECMAKE_BUILDPATH}" ]; then
bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH.  The 
default behaviour is now out-of-tree builds with B=WORKDIR/build."
@@ -178,25 +201,7 @@ cmake_do_configure() {
  ${OECMAKE_GENERATOR_ARGS} \
  $oecmake_sitefile \
  ${OECMAKE_SOURCEPATH} \
- -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
- -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), 
d.getVar('prefix') + '/')} \
- -DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir'), 
d.getVar('prefix') + '/')} \
- 
-DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir'), 
d.getVar('prefix') + '/')} \
- -DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
- 
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir'),
 d.  getVar('prefix') + '/')} \
- -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
- -DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), 
d.getVar('prefix') + '/')} \
- 
-DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir'), 
d.getVar('prefix') + '/')} \
- 
-DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir'), 
d.getVar('prefix') + '/')} \
- -DPYTHON_EXECUTABLE:PATH=${PYTHON} \
- -DPython_EXECUTABLE:PATH=${PYTHON} \
- -DPython3_EXECUTABLE:PATH=${PYTHON} \
- -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
- -DCMAKE_INSTALL_SO_NO_EXE=0 \
- -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
- -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
- -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \
- -DFETCHCONTENT_FULLY_DISCONNECTED=ON \
+ ${OECMAKE_ARGS} \
  ${EXTRA_OECMAKE} \
  -Wno-dev
 }
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186466): 
https://lists.openembedded.org/g/openembedded-core/message/186466
Mute This Topic: https://lists.openembedded.org/mt/100876149/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 04/14] cmake.bbclass: cleanup spaces and tabs

2023-08-21 Thread Adrian Freihofer
Signed-off-by: Adrian Freihofer 
---
 meta/classes-recipe/cmake.bbclass | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes-recipe/cmake.bbclass 
b/meta/classes-recipe/cmake.bbclass
index 7c40df4cdbf..c63b0a80b18 100644
--- a/meta/classes-recipe/cmake.bbclass
+++ b/meta/classes-recipe/cmake.bbclass
@@ -90,12 +90,14 @@ def map_host_arch_to_uname_arch(host_arch):
 return "ppc64"
 return host_arch
 
+
 cmake_do_generate_toolchain_file() {
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
cmake_crosscompiling="set( CMAKE_CROSSCOMPILING FALSE )"
-   else
-   cmake_sysroot="set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )"
+   else
+   cmake_sysroot="set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )"
fi
+
cat > ${WORKDIR}/toolchain.cmake <
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186467): 
https://lists.openembedded.org/g/openembedded-core/message/186467
Mute This Topic: https://lists.openembedded.org/mt/100876150/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 05/14] cmake.bbclass: support qemu

2023-08-21 Thread Adrian Freihofer
Define the CMAKE_CROSSCOMPILING_EMULATOR variable similar to what the
meson bbclass does. This allows for example to execute cross compilied
unit tests on the build machine.

CMAKE_CROSSCOMPILING_EMULATOR is a semi colon separated list of
paramters which could directly handle the -L and the -E parameters.
Creating a wrapper script is not absolutely mandatory. But anyway lets
do it similar to what the meson.bbclass does and also disable pseudo.

Signed-off-by: Adrian Freihofer 
---
 meta/classes-recipe/cmake.bbclass | 21 +
 1 file changed, 21 insertions(+)

diff --git a/meta/classes-recipe/cmake.bbclass 
b/meta/classes-recipe/cmake.bbclass
index c63b0a80b18..944b0d8fefd 100644
--- a/meta/classes-recipe/cmake.bbclass
+++ b/meta/classes-recipe/cmake.bbclass
@@ -4,6 +4,13 @@
 # SPDX-License-Identifier: MIT
 #
 
+inherit qemu
+
+EXEWRAPPER_ENABLED:class-native = "False"
+EXEWRAPPER_ENABLED:class-nativesdk = "False"
+EXEWRAPPER_ENABLED ?= "${@bb.utils.contains('MACHINE_FEATURES', 
'qemu-usermode', 'True', 'False', d)}"
+DEPENDS:append = "${@' qemu-native' if d.getVar('EXEWRAPPER_ENABLED') == 
'True' else ''}"
+
 # Path to the CMake file to process.
 OECMAKE_SOURCEPATH ??= "${S}"
 
@@ -156,6 +163,20 @@ EOF
 
 addtask generate_toolchain_file after do_patch before do_configure
 
+cmake_do_generate_toolchain_file:append:class-target() {
+if [ "${EXEWRAPPER_ENABLED}" = "True" ]; then
+# Write out a qemu wrapper that will be used as exe_wrapper so that 
camake
+# can run target helper binaries through that. This also allows to 
execute ctest.
+qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_HOST}', 
['${STAGING_DIR_HOST}/${libdir}','${STAGING_DIR_HOST}/${base_libdir}'])}"
+echo "#!/bin/sh" > "${WORKDIR}/cmake-qemuwrapper"
+echo "$qemu_binary \"\$@\"" >> "${WORKDIR}/cmake-qemuwrapper"
+chmod +x "${WORKDIR}/cmake-qemuwrapper"
+echo "set( CMAKE_CROSSCOMPILING_EMULATOR 
${WORKDIR}/cmake-qemuwrapper)" \
+  >> ${WORKDIR}/toolchain.cmake
+fi
+}
+
+
 CONFIGURE_FILES = "CMakeLists.txt"
 
 do_configure[cleandirs] = "${@d.getVar('B') if d.getVar('S') != d.getVar('B') 
else ''}"
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186468): 
https://lists.openembedded.org/g/openembedded-core/message/186468
Mute This Topic: https://lists.openembedded.org/mt/100876151/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 07/14] tests: add a C++ example recipe

2023-08-21 Thread Adrian Freihofer
This simple C++ project supports compilation with cmake and with meson.
It's supposed to be used with oe-selftest for the devtool ide plugin.

Signed-off-by: Adrian Freihofer 
---
 meta-selftest/recipes-test/cpp/.gitignore |  1 +
 .../recipes-test/cpp/cmake-example.bb | 17 ++
 .../recipes-test/cpp/cmake-example/run-ptest  | 10 
 .../recipes-test/cpp/cpp-example.inc  | 24 
 .../recipes-test/cpp/files/CMakeLists.txt | 60 +++
 .../cpp/files/cpp-example-lib.cpp | 17 ++
 .../cpp/files/cpp-example-lib.hpp | 16 +
 .../recipes-test/cpp/files/cpp-example.cpp| 16 +
 .../recipes-test/cpp/files/meson.build| 34 +++
 .../cpp/files/test-cpp-example.cpp| 19 ++
 .../recipes-test/cpp/meson-example.bb | 17 ++
 .../recipes-test/cpp/meson-example/run-ptest  | 10 
 12 files changed, 241 insertions(+)
 create mode 100644 meta-selftest/recipes-test/cpp/.gitignore
 create mode 100644 meta-selftest/recipes-test/cpp/cmake-example.bb
 create mode 100644 meta-selftest/recipes-test/cpp/cmake-example/run-ptest
 create mode 100644 meta-selftest/recipes-test/cpp/cpp-example.inc
 create mode 100644 meta-selftest/recipes-test/cpp/files/CMakeLists.txt
 create mode 100644 meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp
 create mode 100644 meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
 create mode 100644 meta-selftest/recipes-test/cpp/files/cpp-example.cpp
 create mode 100644 meta-selftest/recipes-test/cpp/files/meson.build
 create mode 100644 meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp
 create mode 100644 meta-selftest/recipes-test/cpp/meson-example.bb
 create mode 100644 meta-selftest/recipes-test/cpp/meson-example/run-ptest

diff --git a/meta-selftest/recipes-test/cpp/.gitignore 
b/meta-selftest/recipes-test/cpp/.gitignore
new file mode 100644
index 000..30d388a12b7
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/.gitignore
@@ -0,0 +1 @@
+build*
\ No newline at end of file
diff --git a/meta-selftest/recipes-test/cpp/cmake-example.bb 
b/meta-selftest/recipes-test/cpp/cmake-example.bb
new file mode 100644
index 000..96d543180b4
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cmake-example.bb
@@ -0,0 +1,17 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+SUMMARY = "A C++ example compiled with cmake."
+
+inherit cmake
+
+require cpp-example.inc
+
+SRC_URI += "\
+file://CMakeLists.txt \
+"
+
+FILES:${PN}-ptest += "${bindir}/test-cmake-example"
diff --git a/meta-selftest/recipes-test/cpp/cmake-example/run-ptest 
b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest
new file mode 100644
index 000..94b620a1984
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+test-cmake-example
+
+# Note: run-ptests exits with exit value from test-cmake-example
diff --git a/meta-selftest/recipes-test/cpp/cpp-example.inc 
b/meta-selftest/recipes-test/cpp/cpp-example.inc
new file mode 100644
index 000..39c61cf4ceb
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cpp-example.inc
@@ -0,0 +1,24 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit ptest
+
+DEPENDS += "json-c"
+
+PV = "1.0"
+
+S = "${WORKDIR}"
+
+SRC_URI = "\
+file://cpp-example.cpp \
+file://cpp-example-lib.hpp \
+file://cpp-example-lib.cpp \
+file://test-cpp-example.cpp \
+file://run-ptest \
+"
diff --git a/meta-selftest/recipes-test/cpp/files/CMakeLists.txt 
b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt
new file mode 100644
index 000..839aa59b5e3
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt
@@ -0,0 +1,60 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+cmake_minimum_required(VERSION 3.22)
+
+project(cmake-example
+  VERSION 1.0.0
+  LANGUAGES CXX
+)
+
+option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
+
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED On)
+set(CMAKE_CXX_EXTENSIONS Off)
+
+include(GNUInstallDirs)
+
+# Find json-c
+# find_package(PkgConfig REQUIRED)
+# pkg_check_modules(JSONC REQUIRED json-c)
+find_package(json-c)
+
+# A simple library linking json-c library found by pkgconfig
+add_library(cmake-example-lib cpp-example-lib.cpp cpp-example-lib.hpp)
+set_target_properties(cmake-example-lib PROPERTIES 
+VERSION ${PROJECT_VERSION}
+SOVERSION ${PROJECT_VERSION_MAJOR}
+)
+target_link_libraries(cmake-example-lib PRIVATE json-c::json-c)
+# target_link_libraries(cmake-example-lib ${JSONC_LIBRARIES})
+# target_include_directories(cmake-example-lib PUBLIC ${JSONC_INCLUDE_DIRS})
+# target_compile_options(cmake-example-lib PUBLIC ${

[OE-core] [PATCH 06/14] devtool: new ide plugin

2023-08-21 Thread Adrian Freihofer
Signed-off-by: Adrian Freihofer 
---
 scripts/lib/devtool/ide.py | 1190 
 1 file changed, 1190 insertions(+)
 create mode 100755 scripts/lib/devtool/ide.py

diff --git a/scripts/lib/devtool/ide.py b/scripts/lib/devtool/ide.py
new file mode 100755
index 000..7c7040232c4
--- /dev/null
+++ b/scripts/lib/devtool/ide.py
@@ -0,0 +1,1190 @@
+#! /usr/bin/env python3
+#
+# Copyright (C) 2023 Siemens AG
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+"""Devtool ide plugin"""
+
+import os
+import stat
+import logging
+import json
+import re
+import shutil
+from argparse import RawTextHelpFormatter
+from enum import IntEnum, auto
+
+import bb
+from devtool import exec_build_env_command, setup_tinfoil, 
check_workspace_recipe, DevtoolError, parse_recipe
+from devtool.standard import get_real_srctree
+
+SHARED_SYSROOT_RECIPES = ['none', 'meta-ide-support', 'build-sysroots']
+SUPPORTED_IDES = ['code', 'none']
+
+logger = logging.getLogger('devtool')
+
+
+class TargetDevice:
+"""SSH remote login parameters"""
+
+def __init__(self, args):
+self.extraoptions = ''
+if args.no_host_check:
+self.extraoptions += '-o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no'
+self.ssh_sshexec = 'ssh'
+if args.ssh_exec:
+self.ssh_sshexec = args.ssh_exec
+self.ssh_port = ''
+if args.port:
+self.ssh_port = "-p %s" % args.port
+if args.key:
+self.extraoptions += ' -i %s' % args.key
+
+self.target = args.target
+target_sp = args.target.split('@')
+if len(target_sp) == 1:
+self.login = ""
+self.host = target_sp[0]
+elif len(target_sp) == 2:
+self.login = target_sp[0]
+self.host = target_sp[1]
+else:
+logger.error("Invalid target argument: %s" % args.target)
+
+
+class RecipeNative:
+def __init__(self, name, target_arch=None):
+self.name = name
+self.target_arch = target_arch
+self.bootstrap_tasks = [self.name + ':do_addto_recipe_sysroot']
+self.staging_bindir_native = None
+self.target_sys = None
+self.__native_bin = None
+
+def initialize(self, config, workspace, tinfoil):
+recipe_d = parse_recipe(
+config, tinfoil, self.name, appends=True, filter_workspace=False)
+if not recipe_d:
+raise DevtoolError("Parsing %s recipe failed" % self.name)
+self.staging_bindir_native = os.path.realpath(
+recipe_d.getVar('STAGING_BINDIR_NATIVE'))
+self.target_sys = recipe_d.getVar('TARGET_SYS')
+
+@property
+def native_bin(self):
+if not self.__native_bin:
+raise DevtoolError("native binary name is not defined.")
+return self.__native_bin
+
+
+class RecipeGdbCross(RecipeNative):
+def __init__(self, args, target_arch, target_device, gdbserver_multi=True):
+super().__init__('gdb-cross-' + target_arch, target_arch)
+self.target_device = target_device
+self.gdb = None
+self.gdbserver_port_next = int(args.gdbserver_port_start)
+self.gdbserver_multi = gdbserver_multi
+self.config_db = {}
+
+def initialize(self, config, workspace, tinfoil):
+super().initialize(config, workspace, tinfoil)
+gdb_bin = self.target_sys + '-gdb'
+gdb_path = os.path.join(
+self.staging_bindir_native, self.target_sys, gdb_bin)
+self.gdb = gdb_path
+
+@property
+def host(self):
+return self.target_device.host
+
+def __gdbserver_start_cmd(self, binary, port):
+if self.gdbserver_multi:
+gdbserver_cmd = "/usr/bin/gdbserver --multi :%s" % (
+port)
+else:
+gdbserver_cmd = "/usr/bin/gdbserver --once :%s %s" % (
+port, binary)
+return "%s %s %s %s 'sh -c \"%s\"'" % (
+self.target_device.ssh_sshexec, self.target_device.ssh_port, 
self.target_device.extraoptions, self.target_device.target, gdbserver_cmd)
+
+def setup_gdbserver_config(self, binary, script_dir):
+if binary in self.config_db:
+raise DevtoolError(
+"gdbserver config for binary %s is already generated" % binary)
+
+port = self.gdbserver_port_next
+self.gdbserver_port_next += 1
+config_entry = {
+"port": port,
+}
+if script_dir:
+cmd_lines = ['#!/bin/sh']
+cmd_lines.append(self.__gdbserver_start_cmd(binary, port))
+binary_name_pretty = binary.replace(os.sep, '-')
+start_script_name = 'gdbserver_start_%d_%s' % (
+port, binary_name_pretty)
+if self.gdbserver_multi:
+start_script_name += "_m"
+start_script_file = os.path.join(script_dir, start_script_name)
+config_entry['gdbserver_start_script'] = start_script_f

[OE-core] [PATCH 08/14] cmake-example: workaround for pseudo breakeage

2023-08-21 Thread Adrian Freihofer
---
 meta-selftest/recipes-test/cpp/cmake-example.bb | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta-selftest/recipes-test/cpp/cmake-example.bb 
b/meta-selftest/recipes-test/cpp/cmake-example.bb
index 96d543180b4..fbf1f266721 100644
--- a/meta-selftest/recipes-test/cpp/cmake-example.bb
+++ b/meta-selftest/recipes-test/cpp/cmake-example.bb
@@ -15,3 +15,9 @@ SRC_URI += "\
 "
 
 FILES:${PN}-ptest += "${bindir}/test-cmake-example"
+
+# This is a workaround for packages with sources in-tree
+# Without this bitbake ... does not work after running the install script.
+# newenv['PSEUDO_IGNORE_PATHS'] = newenv['PSEUDO_IGNORE_PATHS'] + ""
+# path mismatch [3 links]: ino 37529096 db 
'/home/adrian/projects/oss/meta-yocto-upstream/projects/poky-oe-glibc-sd/tmp/work/cortexa57-poky-linux/cmake-example/1.0-r0/package/usr/src/debug/cmake-example/1.0-r0/oe-local-files/cmake-example-lib.cpp'
 req 
'/home/adrian/projects/oss/meta-yocto-upstream/projects/poky-oe-glibc-sd/workspace/sources/cmake-example/oe-local-files/cmake-example-lib.cpp'.
+PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186471): 
https://lists.openembedded.org/g/openembedded-core/message/186471
Mute This Topic: https://lists.openembedded.org/mt/100876155/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 09/14] refactor: make multiprocess_launch callable without d

2023-08-21 Thread Adrian Freihofer
Signed-off-by: Adrian Freihofer 
---
 meta/lib/oe/package.py |  5 +++--
 meta/lib/oe/utils.py   | 12 +---
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 9d70925b9b7..ffca7559ba7 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -164,7 +164,8 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, 
d, qa_already_stripp
 # ...but is it ELF, and is it already stripped?
 checkelf.append(file)
 inodecache[file] = s.st_ino
-results = oe.utils.multiprocess_launch(is_elf, checkelf, d)
+max_process = int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1)
+results = oe.utils.multiprocess_launch_mp(is_elf, checkelf, max_process)
 for (file, elf_file) in results:
 #elf_file = is_elf(file)
 if elf_file & 1:
@@ -192,7 +193,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, 
d, qa_already_stripp
 elf_file = int(elffiles[file])
 sfiles.append((file, elf_file, strip_cmd))
 
-oe.utils.multiprocess_launch(runstrip, sfiles, d)
+oe.utils.multiprocess_launch_mp(runstrip, sfiles, max_process)
 
 
 def file_translate(file):
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 69ca8987f3d..430e874d90a 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -264,10 +264,17 @@ def execute_pre_post_process(d, cmds):
 bb.note("Executing %s ..." % cmd)
 bb.build.exec_func(cmd, d)
 
-# For each item in items, call the function 'target' with item as the first 
+def multiprocess_launch_max_process(d):
+return int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1)
+
+def multiprocess_launch(target, items, d, extraargs=None):
+max_process = multiprocess_launch_max_process(d)
+return multiprocess_launch_mp(target, items, max_process, extraargs)
+
+# For each item in items, call the function 'target' with item as the first
 # argument, extraargs as the other arguments and handle any exceptions in the
 # parent thread
-def multiprocess_launch(target, items, d, extraargs=None):
+def multiprocess_launch_mp(target, items, max_process, extraargs=None):
 
 class ProcessLaunch(multiprocessing.Process):
 def __init__(self, *args, **kwargs):
@@ -302,7 +309,6 @@ def multiprocess_launch(target, items, d, extraargs=None):
 self.update()
 return self._result
 
-max_process = int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1)
 launched = []
 errors = []
 results = []
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186472): 
https://lists.openembedded.org/g/openembedded-core/message/186472
Mute This Topic: https://lists.openembedded.org/mt/100876156/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 10/14] refactor: make strip_execs callable without d

2023-08-21 Thread Adrian Freihofer
Signed-off-by: Adrian Freihofer 
---
 meta/classes-global/staging.bbclass | 3 ++-
 meta/lib/oe/package.py  | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/classes-global/staging.bbclass 
b/meta/classes-global/staging.bbclass
index 3a300c32e7c..7f4075a5f6e 100644
--- a/meta/classes-global/staging.bbclass
+++ b/meta/classes-global/staging.bbclass
@@ -92,7 +92,8 @@ python sysroot_strip () {
 qa_already_stripped = 'already-stripped' in (d.getVar('INSANE_SKIP:' + pn) 
or "").split()
 strip_cmd = d.getVar("STRIP")
 
-oe.package.strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d,
+max_process = oe.utils.multiprocess_launch_max_process(d)
+oe.package.strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, 
max_process,
qa_already_stripped=qa_already_stripped)
 }
 
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index ffca7559ba7..1dd20f85ebd 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -114,7 +114,7 @@ def is_static_lib(path):
 return start == magic
 return False
 
-def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, 
qa_already_stripped=False):
+def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, max_process, 
qa_already_stripped=False):
 """
 Strip executable code (like executables, shared libraries) _in_place_
 - Based on sysroot_strip in staging.bbclass
@@ -122,6 +122,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, 
d, qa_already_stripp
 :param strip_cmd: Strip command (usually ${STRIP})
 :param libdir: ${libdir} - strip .so files in this directory
 :param base_libdir: ${base_libdir} - strip .so files in this directory
+:param max_process: number of stripping processes started in parallel
 :param qa_already_stripped: Set to True if already-stripped' in 
${INSANE_SKIP}
 This is for proper logging and messages only.
 """
@@ -164,7 +165,6 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, 
d, qa_already_stripp
 # ...but is it ELF, and is it already stripped?
 checkelf.append(file)
 inodecache[file] = s.st_ino
-max_process = int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1)
 results = oe.utils.multiprocess_launch_mp(is_elf, checkelf, max_process)
 for (file, elf_file) in results:
 #elf_file = is_elf(file)
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186473): 
https://lists.openembedded.org/g/openembedded-core/message/186473
Mute This Topic: https://lists.openembedded.org/mt/100876158/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 11/14] devtool: refactor deploy-target

2023-08-21 Thread Adrian Freihofer
Signed-off-by: Adrian Freihofer 
---
 scripts/lib/devtool/__init__.py |   5 +-
 scripts/lib/devtool/deploy.py   | 230 +---
 2 files changed, 124 insertions(+), 111 deletions(-)

diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 702db669de3..7d64547616e 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -78,12 +78,15 @@ def exec_fakeroot(d, cmd, **kwargs):
 """Run a command under fakeroot (pseudo, in fact) so that it picks up the 
appropriate file permissions"""
 # Grab the command and check it actually exists
 fakerootcmd = d.getVar('FAKEROOTCMD')
+fakerootenv = d.getVar('FAKEROOTENV')
+exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, kwargs)
+
+def exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, **kwargs):
 if not os.path.exists(fakerootcmd):
 logger.error('pseudo executable %s could not be found - have you run a 
build yet? pseudo-native should install this and if you have run any build then 
that should have been built')
 return 2
 # Set up the appropriate environment
 newenv = dict(os.environ)
-fakerootenv = d.getVar('FAKEROOTENV')
 for varvalue in fakerootenv.split():
 if '=' in varvalue:
 splitval = varvalue.split('=', 1)
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index e14a5874177..ea7e2cb1ae8 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -16,7 +16,7 @@ import bb.utils
 import argparse_oe
 import oe.types
 
-from devtool import exec_fakeroot, setup_tinfoil, check_workspace_recipe, 
DevtoolError
+from devtool import exec_fakeroot_no_d, setup_tinfoil, check_workspace_recipe, 
DevtoolError
 
 logger = logging.getLogger('devtool')
 
@@ -133,16 +133,11 @@ def _prepare_remote_script(deploy, verbose=False, 
dryrun=False, undeployall=Fals
 
 return '\n'.join(lines)
 
-
-
-def deploy(args, config, basepath, workspace):
-"""Entry point for the devtool 'deploy' subcommand"""
+def deploy_cached(srcdir, workdir, path, strip_cmd, libdir, base_libdir, 
max_process, fakerootcmd, fakerootenv, args):
 import math
 import oe.recipeutils
 import oe.package
 
-check_workspace_recipe(workspace, args.recipename, checksrc=False)
-
 try:
 host, destdir = args.target.split(':')
 except ValueError:
@@ -152,116 +147,131 @@ def deploy(args, config, basepath, workspace):
 if not destdir.endswith('/'):
 destdir += '/'
 
+recipe_outdir = srcdir
+if not os.path.exists(recipe_outdir) or not os.listdir(recipe_outdir):
+raise DevtoolError('No files to deploy - have you built the %s '
+'recipe? If so, the install step has not installed '
+'any files.' % args.recipename)
+
+if args.strip and not args.dry_run:
+# Fakeroot copy to new destination
+srcdir = recipe_outdir
+recipe_outdir = os.path.join(workdir, 'devtool-deploy-target-stripped')
+if os.path.isdir(recipe_outdir):
+exec_fakeroot_no_d(fakerootcmd, fakerootenv, "rm -rf %s" % 
recipe_outdir, shell=True)
+exec_fakeroot_no_d(fakerootcmd, fakerootenv, "cp -af %s %s" % 
(os.path.join(srcdir, '.'), recipe_outdir), shell=True)
+os.environ['PATH'] = ':'.join([os.environ['PATH'], path or ''])
+oe.package.strip_execs(args.recipename, recipe_outdir, strip_cmd, 
libdir, base_libdir, max_process)
+
+filelist = []
+inodes = set({})
+ftotalsize = 0
+for root, _, files in os.walk(recipe_outdir):
+for fn in files:
+fstat = os.lstat(os.path.join(root, fn))
+# Get the size in kiB (since we'll be comparing it to the output 
of du -k)
+# MUST use lstat() here not stat() or getfilesize() since we don't 
want to
+# dereference symlinks
+if fstat.st_ino in inodes:
+fsize = 0
+else:
+fsize = int(math.ceil(float(fstat.st_size)/1024))
+inodes.add(fstat.st_ino)
+ftotalsize += fsize
+# The path as it would appear on the target
+fpath = os.path.join(destdir, os.path.relpath(root, 
recipe_outdir), fn)
+filelist.append((fpath, fsize))
+
+if args.dry_run:
+print('Files to be deployed for %s on target %s:' % (args.recipename, 
args.target))
+for item, _ in filelist:
+print('  %s' % item)
+return 0
+
+extraoptions = ''
+if args.no_host_check:
+extraoptions += '-o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no'
+if not args.show_status:
+extraoptions += ' -q'
+
+scp_sshexec = ''
+ssh_sshexec = 'ssh'
+if args.ssh_exec:
+scp_sshexec = "-S %s" % args.ssh_exec
+ssh_sshexec = args.ssh_exec
+scp_port = ''
+ssh_port = ''
+if args.port:
+scp_port = "-P %s" % args.port
+ssh_port = "

[OE-core] [PATCH 13/14] oe-selftest devtool: ide tests

2023-08-21 Thread Adrian Freihofer
Signed-off-by: Adrian Freihofer 
---
 meta/lib/oeqa/selftest/cases/devtool.py | 133 
 1 file changed, 133 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 14a80d5ff4c..083ecd4acfb 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -11,6 +11,7 @@ import tempfile
 import glob
 import fnmatch
 import unittest
+import json
 
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
@@ -2192,3 +2193,135 @@ class DevtoolUpgradeTests(DevtoolBase):
 
 #Step 4.5
 runCmd("grep %s %s" % (modconfopt, codeconfigfile))
+
+
+class DevtoolIdeTests(DevtoolBase):
+
+def __devtool_ide_recipe(self):
+tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+self.track_for_cleanup(tempdir)
+self.track_for_cleanup(self.workspacedir)
+self.add_command_to_tearDown('bitbake -c clean %s' % self.recipe_name)
+self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+
+conf_lines = [
+'IMAGE_FEATURES += "ssh-server-openssh"',
+'IMAGE_CLASSES += "image-combined-dbg"',
+'IMAGE_GEN_DEBUGFS = "1"',
+'IMAGE_INSTALL += "gdbserver %s-ptest"' % self.recipe_name
+]
+self.write_config("\n".join(conf_lines))
+
+result = runCmd('devtool modify %s -x %s' % (self.recipe_name, 
tempdir))
+self.assertExists(os.path.join(tempdir, self.build_file),
+  'Extracted source could not be found')
+self.assertExists(os.path.join(self.workspacedir, 'conf',
+  'layer.conf'), 'Workspace directory not created')
+matches = glob.glob(os.path.join(self.workspacedir,
+'appends', self.recipe_name + '.bbappend'))
+self.assertTrue(matches, 'bbappend not created %s' % result.output)
+
+# Test devtool status
+result = runCmd('devtool status')
+self.assertIn(self.recipe_name, result.output)
+self.assertIn(tempdir, result.output)
+self._check_src_repo(tempdir)
+
+result = runCmd('devtool ide %s core-image-minimal -c' % 
self.recipe_name)
+return tempdir
+
+def __devtool_ide_qemu(self):
+# Verify do_install works
+with open(os.path.join(self.tempdir, '.vscode', 'tasks.json')) as 
tasks_j:
+tasks_d = json.load(tasks_j)
+tasks = tasks_d["tasks"]
+task_install = next((task for task in tasks if task["label"] == 
"install && deploy-target %s"  % self.recipe_name), None)
+self.assertIsNot(task_install, None)
+install_deploy_cmd = task_install["command"]
+# execute only the bb_run_do_install script since the deploy would 
require e.g. Qemu running.
+install_cmd = install_deploy_cmd.replace("install_and_deploy", 
"bb_run_do_install")
+runCmd(install_cmd, cwd=self.tempdir)
+
+# Verify if re-building the SDK still works and the deploy and install 
script gets generated
+runCmd('devtool ide %s core-image-minimal -c' % self.recipe_name)
+self.assertExists(install_deploy_cmd, 'install_and_deploy script not 
found')
+
+# Verify deployment to Qemu works
+with runqemu("core-image-minimal", runqemuparams = "nographic") as 
qemu:
+MAGIC_STRING_ORIG = "Magic: 123456789"
+MAGIC_STRING_NEW = "Magic: 987654321"
+
+# Verify the unmodified example prints the magic string
+status, output = qemu.run(self.example_exe)
+self.assertEqual(status, 0)
+self.assertIn(MAGIC_STRING_ORIG, output)
+
+# Verify the unmodified ptests work
+status, output = qemu.run("ptest-runner " + self.recipe_name)
+self.assertEqual(status, 0, msg=output)
+self.assertIn("PASS: cpp-example-lib", output)
+
+# Replace the Magic String in the code, compile and deploy to Qemu
+cpp_example_lib_hpp = os.path.join(self.tempdir, 
'cpp-example-lib.hpp')
+with open(cpp_example_lib_hpp, 'r') as file:
+cpp_code = file.read()
+cpp_code = cpp_code.replace(MAGIC_STRING_ORIG, 
MAGIC_STRING_NEW)
+with open(cpp_example_lib_hpp, 'w') as file:
+file.write(cpp_code)
+runCmd(install_deploy_cmd, cwd=self.tempdir)
+
+# Verify the modified example prints the modified magic string
+status, output = qemu.run(self.example_exe)
+self.assertEqual(status, 0)
+self.assertNotIn(MAGIC_STRING_ORIG, output)
+self.assertIn(MAGIC_STRING_NEW, output)
+
+# Verify the modified example ptests work
+status, output = qemu.run("ptest-runner " + self.recipe_name)
+self.assertEqual(status, 0, msg=output)
+

[OE-core] [PATCH 12/14] devtool: ide make deploy-target quicker

2023-08-21 Thread Adrian Freihofer
---
 scripts/lib/devtool/ide.py | 115 ++---
 1 file changed, 55 insertions(+), 60 deletions(-)

diff --git a/scripts/lib/devtool/ide.py b/scripts/lib/devtool/ide.py
index 7c7040232c4..9c724509d48 100755
--- a/scripts/lib/devtool/ide.py
+++ b/scripts/lib/devtool/ide.py
@@ -9,6 +9,7 @@
 
 import os
 import stat
+import sys
 import logging
 import json
 import re
@@ -360,15 +361,19 @@ class RecipeModified:
 self.bbappend = None
 # recipe variables from d.getVar
 self.b = None
+self.base_libdir = None
 self.bpn = None
 self.d = None
 self.fakerootcmd = None
 self.fakerootenv = None
+self.libdir = None
+self.max_process = None
 self.package_arch = None
 self.path = None
 self.recipe_sysroot = None
 self.recipe_sysroot_native = None
 self.staging_incdir = None
+self.strip_cmd = None
 self.target_arch = None
 self.workdir = None
 # replicate bitbake build environment
@@ -387,11 +392,6 @@ class RecipeModified:
 self.meson_cross_file = None
 # vscode
 self.dot_code_dir = None
-# TODO: remove calling devtool
-self.bb_env_passthrough_additions = None
-self.bbpath = None
-self.bitbakepath = None
-self.topdir = None
 
 def initialize(self, config, workspace, tinfoil):
 recipe_d = parse_recipe(
@@ -413,10 +413,14 @@ class RecipeModified:
 shutil.rmtree(self.temp_dir)
 
 self.b = recipe_d.getVar('B')
+self.base_libdir = recipe_d.getVar('base_libdir')
 self.bpn = recipe_d.getVar('BPN')
 self.d = recipe_d.getVar('D')
 self.fakerootcmd = recipe_d.getVar('FAKEROOTCMD')
 self.fakerootenv = recipe_d.getVar('FAKEROOTENV')
+self.libdir = recipe_d.getVar('libdir'),
+self.max_process = int(recipe_d.getVar(
+"BB_NUMBER_THREADS") or os.cpu_count() or 1)
 self.package_arch = recipe_d.getVar('PACKAGE_ARCH')
 self.path = recipe_d.getVar('PATH')
 self.recipe_sysroot = os.path.realpath(
@@ -425,15 +429,10 @@ class RecipeModified:
 recipe_d.getVar('RECIPE_SYSROOT_NATIVE'))
 self.staging_incdir = os.path.realpath(
 recipe_d.getVar('STAGING_INCDIR'))
+self.strip_cmd = recipe_d.getVar('STRIP')
 self.target_arch = recipe_d.getVar('TARGET_ARCH')
 self.workdir = os.path.realpath(recipe_d.getVar('WORKDIR'))
 
-self.bb_env_passthrough_additions = recipe_d.getVar(
-'BB_ENV_PASSTHROUGH_ADDITIONS')
-self.bbpath = recipe_d.getVar('BBPATH')
-self.bitbakepath = recipe_d.getVar('BITBAKEPATH')
-self.topdir = recipe_d.getVar('TOPDIR')
-
 self.__init_exported_variables(recipe_d)
 
 if bb.data.inherits_class('cmake', recipe_d):
@@ -971,6 +970,38 @@ class RecipeModified:
 cmd_lines.append(install_cmd)
 return self.write_script(cmd_lines, 'bb_run_do_install')
 
+def gen_deploy_target_script(self, args):
+"""Generate a quicker (works without tinfoil) variant of devtool 
target-deploy"""
+cmd_lines = ['#!/usr/bin/env python3']
+cmd_lines.append('import sys')
+cmd_lines.append('devtool_sys_path = %s' % str(sys.path))
+cmd_lines.append('devtool_sys_path.reverse()')
+cmd_lines.append('for p in devtool_sys_path:')
+cmd_lines.append('if p not in sys.path:')
+cmd_lines.append('sys.path.insert(0, p)')
+cmd_lines.append('from devtool.deploy import deploy_cached')
+args_filter = ['debug', 'dry_run', 'key', 'no_check_space', 
'no_host_check',
+   'no_preserve', 'port', 'recipename', 'show_status', 
'ssh_exec', 'strip', 'target']
+filtered_args_dict = {key: value for key, value in vars(
+args).items() if key in args_filter}
+cmd_lines.append('filtered_args_dict = %s' % str(filtered_args_dict))
+cmd_lines.append('class Dict2Class(object):')
+cmd_lines.append('def __init__(self, my_dict):')
+cmd_lines.append('for key in my_dict:')
+cmd_lines.append('setattr(self, key, my_dict[key])')
+cmd_lines.append('filtered_args = Dict2Class(filtered_args_dict)')
+cmd_lines.append('deploy_cached("%s", "%s", "%s", "%s", "%s", "%s", 
%d, "%s", "%s", filtered_args)' %
+ (self.d, self.workdir, self.path, self.strip_cmd,
+  self.libdir, self.base_libdir, self.max_process,
+  self.fakerootcmd, self.fakerootenv))
+return self.write_script(cmd_lines, 'deploy_target')
+
+def gen_install_deploy_script(self, args):
+cmd_lines = ['#!/bin/sh']
+cmd_lines.append(self.gen_fakeroot_install_script())
+cmd_lines.append(self.gen_deploy_target_script(args))
+return self.write_script(cmd

[OE-core] [PATCH 14/14] docs: cover devtool ide

2023-08-21 Thread Adrian Freihofer
Signed-off-by: Adrian Freihofer 
---
 documentation/sdk-manual/extensible.rst | 100 +++-
 1 file changed, 99 insertions(+), 1 deletion(-)

diff --git a/documentation/sdk-manual/extensible.rst 
b/documentation/sdk-manual/extensible.rst
index 9e08e57a4e7..81a46c4767f 100644
--- a/documentation/sdk-manual/extensible.rst
+++ b/documentation/sdk-manual/extensible.rst
@@ -237,7 +237,7 @@ all the commands.
devtool
quick reference.
 
-Three ``devtool`` subcommands provide entry-points into
+Four ``devtool`` subcommands provide entry-points into
 development:
 
 -  *devtool add*: Assists in adding new software to be built.
@@ -245,6 +245,8 @@ development:
 -  *devtool modify*: Sets up an environment to enable you to modify
the source of an existing component.
 
+-  *devtool ide*: Generates a configuration for an IDE.
+
 -  *devtool upgrade*: Updates an existing recipe so that you can
build it for an updated set of source files.
 
@@ -632,6 +634,102 @@ command:
   proceed with your work. If you do use this command, realize that
   the source tree is preserved.
 
+Use ``devtool ide`` to generate an configuration for the IDE
+
+
+``devtool ide`` automatically configures the IDE for cross-compiling and 
remote debugging.
+The IDE is configured to call for example cmake directly. This has several 
advantages.
+First of all it is much faster than using e.g. ``devtool build``. But it also 
allows to
+use the very good integration of build tools like cmake or gdb with VSCode 
directly.
+
+Two different use cases are supported:
+
+- Generate the IDE configuration for a workspace created by ``devtool modify``.
+
+- Generate the IDE configuration for using a cross-toolchain as provided by
+  ``bitbake meta-ide-support build-sysroots``.
+
+Assuming the development environment is set up correctly and a workspace has 
been created
+for the recipe using ``devtool modify recipe``, the following command can 
create the
+configuration for VSCode in the recipe workspace:
+
+   $ devtool ide recipe core-image-minimal --target root@192.168.7.2
+
+What this command does exactly depends on the recipe or the build tool used by 
the recipe.
+Currently, only CMake and Meson are supported natively.
+
+For a recipe which inherits cmake it does:
+
+- Prepare the SDK by calling bitbake core-image-minimal, gdb-cross, 
qemu-native...
+
+- Generate a cmake-preset with configures cmake to use exactly the same 
environent and
+  the same cmake-cache configuration as used by ``bitbake recipe``. The 
cmake-preset referres
+  to the per-recipe-sysroot of the recipe.
+
+  Currently Configure, Build and Test presets are supported. Test presets 
execute the test
+  binaries with Qemu.
+
+- Generates a helper script to handle the do_install with pseudo
+
+- Generates some helper scripts to start the gdbserver on the target device
+
+- Generates the ``.vscode`` folder containing the following files:
+
+  - c_ccp_properties.json: configure the code navigation
+
+  - extensions.json: Recommend the extensions which are used.
+
+  - launch.json: Provide a configuration for remote debugging with gdb-cross 
and gdbserver.
+The debug-symbols are searched in the build-folder, the per-recipe-sysroot 
and the rootfs-dbg
+folder which is provided by the image.
+
+  - settings.json: confgure the indexer to ignore the build folders
+
+  - tasks.json: Provide some helpers for running
+
+- do_install and ``devtool deploy-target``
+
+- start the gdbserver via ssh
+
+For a recipe which inherits meson a similar configuration is generated.
+Because there is nothing like a meson-preset a wrapper script for meson is 
generated.
+
+If there is no native support by ``devtool ide`` for the build tool used by 
the recipe a generic
+IDE configuration calling ``devtool build recipe`` is generated.
+
+For some special recipes and use cases a per-recipe-sysroot based SDK is not 
suitable.
+Therefore devtool ide also supports setting up the shared sysroots environment 
and generating
+a IDE configurations referring to the shared sysroots. Recipes leading to a 
shared sysroot
+are for example meta-ide-support or shared-sysroots. Also passing none as a 
recipe name leads
+to a shared sysroot SDK.
+
+   $ devtool ide none core-image-minimal
+
+In case of a shared sysroot SDK the configuration which gets generated for 
VSCode exposes the
+cross-tool-chain as a cmake-kit. If a cmake project is loaded into VSCode the 
cross-toolchain
+can be selected for compiling.
+
+The default IDE is VSCode. Some hints about using VSCode:
+
+- To work with cmake press ``Ctrl + Shift + p``, type cmake.
+  This will show some possible commands like selecting a cmake preset, 
compiling or running ctest.
+  A cmake kit might be activated by ``Ctrl + Shift + p``, type cmake quick 
start,
+  if not preset file is in the wokspace.
+
+- To work with meson press ``Ctrl + Shift + p``, type meson.
+

Re: [OE-core] [PATCH] llvm: remove libLTO.so.*

2023-08-21 Thread Khem Raj

On 8/20/23 7:36 PM, Kai Kang wrote:

From: Kai Kang 

Remove libLTO.so.* from llvm which should be provided by clang and
packaged to llvm-linker-tools. It could avoids the error:

ERROR: clang-16.0.6-r0 do_create_spdx: The recipe clang is trying to
install files into a shared area when those files already exist.
Those files and their manifest location are:
   /path_to/tmp/deploy/spdx/core2-64/packages/liblto16.spdx.json
 (matched in manifest-core2-64-llvm.create_spdx)
Please verify which recipe should provide the above files.

Signed-off-by: Kai Kang 
---
  meta/recipes-devtools/llvm/llvm_git.bb | 12 ++--
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb 
b/meta/recipes-devtools/llvm/llvm_git.bb
index f3d6f24bd2..ce9ebfa997 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -106,7 +106,7 @@ do_compile() {
  
  do_install() {

  if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; 
then
-   DESTDIR=${D} ninja -v install
+DESTDIR=${D} ninja -v install
  
  # llvm harcodes usr/lib as install path, so this corrects it to actual libdir

  mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
@@ -117,6 +117,10 @@ do_install() {
  
  # reproducibility

  sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
+
+# remove libLTO.so.* which should be provided by clang and packaged to
+# llvm-linker-tools
+rm -f ${D}/${libdir}/libLTO.so.*


is that the only problem ? I think there will be more conflicts unless 
we limit the scope of llvm to providing libllvm and whatever mesa needs

at minimal and remove everything else.

clang-native can provide llvm-native and when someone is using 
meta-clang, perhaps folks using meta-clang can use that to provide 
llvm-native see - 
https://github.com/kraj/meta-clang/blob/master/README.md#providing-llvm





  fi
  }
  
@@ -134,7 +138,7 @@ llvm_sysroot_preprocess() {

ln -sf llvm-config 
${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
  }
  
-PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto"

+PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm 
${PN}-liboptremarks"
  
  RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks"
  
@@ -146,10 +150,6 @@ FILES:${PN}-libllvm = "\

  ${libdir}/libLLVM-${MAJOR_VERSION}.so \
  "
  
-FILES:${PN}-liblto += "\

-${libdir}/libLTO.so.* \
-"
-
  FILES:${PN}-liboptremarks += "\
  ${libdir}/libRemarks.so.* \
  "







OpenPGP_0xBB053355919D3314.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186478): 
https://lists.openembedded.org/g/openembedded-core/message/186478
Mute This Topic: https://lists.openembedded.org/mt/100866486/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/2] python3-cython: upgrade 0.29.36 -> 3.0.0

2023-08-21 Thread Trevor Gamblin
Changelog: https://github.com/cython/cython/blob/master/CHANGES.rst

Signed-off-by: Trevor Gamblin 
---
 meta/recipes-devtools/python/python-cython.inc| 4 ++--
 .../{python3-cython_0.29.36.bb => python3-cython_3.0.0.bb}| 0
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-cython_0.29.36.bb => 
python3-cython_3.0.0.bb} (100%)

diff --git a/meta/recipes-devtools/python/python-cython.inc 
b/meta/recipes-devtools/python/python-cython.inc
index 6aec6b012f..01829b9f33 100644
--- a/meta/recipes-devtools/python/python-cython.inc
+++ b/meta/recipes-devtools/python/python-cython.inc
@@ -5,11 +5,11 @@ It's designed to bridge the gap between the nice, high-level, 
easy-to-use world
 and the messy, low-level world of C."
 SECTION = "devel/python"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
 PYPI_PACKAGE = "Cython"
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[sha256sum] = 
"41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f"
+SRC_URI[sha256sum] = 
"350b18f9673e63101dbbfcf774ee2f57c20ac4636d255741d76ca79016b1bd82"
 UPSTREAM_CHECK_REGEX = "Cython-(?P.*)\.tar"
 
 inherit pypi
diff --git a/meta/recipes-devtools/python/python3-cython_0.29.36.bb 
b/meta/recipes-devtools/python/python3-cython_3.0.0.bb
similarity index 100%
rename from meta/recipes-devtools/python/python3-cython_0.29.36.bb
rename to meta/recipes-devtools/python/python3-cython_3.0.0.bb
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186480): 
https://lists.openembedded.org/g/openembedded-core/message/186480
Mute This Topic: https://lists.openembedded.org/mt/100878016/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 0/2] Upgrading Cython to 3.0.0

2023-08-21 Thread Trevor Gamblin
The Cython 3.0.0 release contains many changes. Since there are a large
number of recipes that depend on it, there will potentially be build
issues with recipes in meta-python and elsewhere. I performed a world
build on poky alone with the python3-cython upgrade and the only recipe
to fail was python3-pyyaml, so that has been tweaked to work (via two
new patches for the recipe; thanks to Tim Orling for the heads-up).

Trevor Gamblin (2):
  python3-cython: upgrade 0.29.36 -> 3.0.0
  python3-pyyaml: Make compatible with Cython 3.0.0

 .../recipes-devtools/python/python-cython.inc |  4 +-
 ...hon_0.29.36.bb => python3-cython_3.0.0.bb} |  0
 .../0001-Fix-builds-with-Cython-3.patch   | 47 +++
 ...roject.toml-don-t-pin-Cython-version.patch | 26 ++
 .../python/python3-pyyaml_6.0.1.bb|  4 ++
 5 files changed, 79 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-cython_0.29.36.bb => 
python3-cython_3.0.0.bb} (100%)
 create mode 100644 
meta/recipes-devtools/python/python3-pyyaml/0001-Fix-builds-with-Cython-3.patch
 create mode 100644 
meta/recipes-devtools/python/python3-pyyaml/0001-pyproject.toml-don-t-pin-Cython-version.patch

-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186479): 
https://lists.openembedded.org/g/openembedded-core/message/186479
Mute This Topic: https://lists.openembedded.org/mt/100878015/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/2] python3-pyyaml: Make compatible with Cython 3.0.0

2023-08-21 Thread Trevor Gamblin
Backport a fix to avoid failures with get_source_files and build_ext
during do_compile when compiling with Cython > 3.0.0.

Signed-off-by: Trevor Gamblin 
---
 .../0001-Fix-builds-with-Cython-3.patch   | 47 +++
 ...roject.toml-don-t-pin-Cython-version.patch | 26 ++
 .../python/python3-pyyaml_6.0.1.bb|  4 ++
 3 files changed, 77 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3-pyyaml/0001-Fix-builds-with-Cython-3.patch
 create mode 100644 
meta/recipes-devtools/python/python3-pyyaml/0001-pyproject.toml-don-t-pin-Cython-version.patch

diff --git 
a/meta/recipes-devtools/python/python3-pyyaml/0001-Fix-builds-with-Cython-3.patch
 
b/meta/recipes-devtools/python/python3-pyyaml/0001-Fix-builds-with-Cython-3.patch
new file mode 100644
index 00..66de7dacb0
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3-pyyaml/0001-Fix-builds-with-Cython-3.patch
@@ -0,0 +1,47 @@
+From 90c32c1f301a5d43177c516bf76b58ee1d07a2fe Mon Sep 17 00:00:00 2001
+From: "Andrew J. Hesford" 
+Date: Fri, 21 Jul 2023 09:50:00 -0400
+Subject: [PATCH] Fix builds with Cython 3
+
+This is a *de minimis* fix for building with Cython 3. Recent Cython<3
+releases provided `Cython.Distutils.build_ext` as an alias to
+`Cython.Distutils.old_build_ext.old_build_ext`; Cython 3 drops this
+alias and instead uses a wholly new `Cython.Distutils.build_ext` that
+does not provide the `cython_sources` function used in `setup.py`.
+
+Explicitly importing `old_build_ext` preserves the existing behavior for
+recent Cython<3 and uses the correct behavior for Cython 3. Should the
+import fail (*e.g.*, because the version of Cython available predates
+the availability of `old_build_ext`), the import falls back to just
+`Cython.Distutils.build_ext`.
+
+Signed-off-by: Andrew J. Hesford 
+
+Upstream-Status: Backport
+(https://github.com/yaml/pyyaml/pull/731/commits/17dc5b6cd96dcfe64fd71789c771ca9b96d260e5)
+
+Signed-off-by: Trevor Gamblin 
+---
+ setup.py | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 944e7fa..462b1e9 100644
+--- a/setup.py
 b/setup.py
+@@ -82,7 +82,11 @@ if 'sdist' in sys.argv or 
os.environ.get('PYYAML_FORCE_CYTHON') == '1':
+ with_cython = True
+ try:
+ from Cython.Distutils.extension import Extension as _Extension
+-from Cython.Distutils import build_ext as _build_ext
++try:
++from Cython.Distutils.old_build_ext import old_build_ext as _build_ext
++except ImportError:
++from Cython.Distutils import build_ext as _build_ext
++
+ with_cython = True
+ except ImportError:
+ if with_cython:
+-- 
+2.41.0
+
diff --git 
a/meta/recipes-devtools/python/python3-pyyaml/0001-pyproject.toml-don-t-pin-Cython-version.patch
 
b/meta/recipes-devtools/python/python3-pyyaml/0001-pyproject.toml-don-t-pin-Cython-version.patch
new file mode 100644
index 00..3e62d9de39
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3-pyyaml/0001-pyproject.toml-don-t-pin-Cython-version.patch
@@ -0,0 +1,26 @@
+From 322651ce2b9b209d3328a6f7590853c2008e9c10 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin 
+Date: Mon, 21 Aug 2023 11:26:35 -0400
+Subject: [PATCH] pyproject.toml: don't pin Cython version
+
+Remove the pinned version for Cython so that pyyaml can build.
+
+Upstream-Status: Inappropriate (embedded-specific)
+
+Signed-off-by: Trevor Gamblin 
+---
+ pyproject.toml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 4bc04c0..2bf5ec8 100644
+--- a/pyproject.toml
 b/pyproject.toml
+@@ -1,3 +1,3 @@
+ [build-system]
+-requires = ["setuptools", "wheel", "Cython<3.0"]
++requires = ["setuptools", "wheel", "Cython"]
+ build-backend = "setuptools.build_meta"
+-- 
+2.41.0
+
diff --git a/meta/recipes-devtools/python/python3-pyyaml_6.0.1.bb 
b/meta/recipes-devtools/python/python3-pyyaml_6.0.1.bb
index 4ab8f038f4..4c71993e5c 100644
--- a/meta/recipes-devtools/python/python3-pyyaml_6.0.1.bb
+++ b/meta/recipes-devtools/python/python3-pyyaml_6.0.1.bb
@@ -7,6 +7,10 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=6d8242660a8371add5fe547adf083079"
 
 PYPI_PACKAGE = "PyYAML"
 
+SRC_URI += "file://0001-pyproject.toml-don-t-pin-Cython-version.patch \
+file://0001-Fix-builds-with-Cython-3.patch \
+"
+
 inherit pypi python_setuptools_build_meta
 
 SRC_URI[sha256sum] = 
"bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186481): 
https://lists.openembedded.org/g/openembedded-core/message/186481
Mute This Topic: https://lists.openembedded.org/mt/100878017/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 02/14] build: vscode configuration

2023-08-21 Thread Luca Ceresoli via lists.openembedded.org
Hello Adrian,

On Mon, 21 Aug 2023 18:07:05 +0200
"Adrian Freihofer"  wrote:

> This is just my setup. It's not supposed to be merged into poky.

If this not supposed to me merged, clarifying that on the subject line
would be nice (e.g. add " DO NOT MERGE ")  to not overlook that,
as well as moving this patch at the end of the series IMO.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186482): 
https://lists.openembedded.org/g/openembedded-core/message/186482
Mute This Topic: https://lists.openembedded.org/mt/100876148/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 12/14] devtool: ide make deploy-target quicker

2023-08-21 Thread Luca Ceresoli via lists.openembedded.org
Hello Adrian,

On Mon, 21 Aug 2023 18:07:15 +0200
"Adrian Freihofer"  wrote:

> ---

This patch is missing your Signed-off-by line, and also patch 8 does.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186483): 
https://lists.openembedded.org/g/openembedded-core/message/186483
Mute This Topic: https://lists.openembedded.org/mt/100876160/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH v3] sstatesig: Add ACL and XATTR data to outhash

2023-08-21 Thread Piotr Łobacz


W dniu 18.08.2023 o 18:29, Joshua Watt via lists.openembedded.org pisze:

Records the ACL and (some) extended attributes in the outhash


Reviewed-by: Piotr Łobacz 
Tested-by: Piotr Łobacz 

Signed-off-by: Joshua Watt 
---
NOTE: This requires ACL and XATTR support from bitbake

V2: Filter ACLs to not duplicate the stat mode (since that also does
extra filtering)

V3: Fix missing .items() when iterating XATTRS

  meta/lib/oe/sstatesig.py | 42 
  1 file changed, 42 insertions(+)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 633a0fd4502..fb39efa933e 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -478,6 +478,8 @@ def OEOuthashBasic(path, sigfile, task, d):
  import grp
  import re
  import fnmatch
+import bb.xattr
+import bb.acl
  
  def update_hash(s):

  s = s.encode('utf-8')
@@ -640,6 +642,46 @@ def OEOuthashBasic(path, sigfile, task, d):
  
  update_hash("\n")
  
+def filter_acl(entry):

+# Skip owner user, owner group, and other tags. These are
+# covered by the stat permissions above
+if entry.tag in (bb.acl.ACL_USER_OBJ, 
bb.acl.ACL_GROUP_OBJ, bb.acl.ACL_OTHER):
+return False
+return True
+
+def add_acl(path, typ, name):
+acl = bb.acl.ACL.from_path(path, typ)
+entries = [e for e in acl.entries() if filter_acl(e)]
+if entries:
+update_hash(name)
+update_hash(":\n")
+entries.sort(key=lambda x: (x.tag, x.qualifier, 
x.mode))
+for e in entries:
+update_hash(str(e))
+update_hash("\n")
+
+def filter_xattr(name):
+# ACLs are handled above
+if name == "system.posix_acl_access":
+return False
+if name == "system.posix_acl_default":
+return False
+return True
+
+# libacl always follows symlinks, so skip them
+if not stat.S_ISLNK(s.st_mode):
+add_acl(path, bb.acl.ACL_TYPE_ACCESS, "ACL")
+if stat.S_ISDIR(s.st_mode):
+add_acl(path, bb.acl.ACL_TYPE_DEFAULT, "Default ACL")
+
+attrs = bb.xattr.get_all_xattr(path, follow=False)
+# Ignore ACLs; those are covered above
+attrs = {k: v for k, v in attrs.items() if filter_xattr(k)}
+if attrs:
+update_hash("XATTR:\n")
+for k, v in attrs.items():
+update_hash("%s: %s\n" % (k, v))
+
  # Process this directory and all its child files
  if include_root or root != ".":
  process(root)




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186484): 
https://lists.openembedded.org/g/openembedded-core/message/186484
Mute This Topic: https://lists.openembedded.org/mt/100823926/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 02/14] build: vscode configuration

2023-08-21 Thread Adrian Freihofer via lists.openembedded.org
On Mon, 2023-08-21 at 21:56 +0200, Luca Ceresoli wrote:
> Hello Adrian,
> 
> On Mon, 21 Aug 2023 18:07:05 +0200
> "Adrian Freihofer"  wrote:
> 
> > This is just my setup. It's not supposed to be merged into poky.
> 
> If this not supposed to me merged, clarifying that on the subject
> line
> would be nice (e.g. add " DO NOT MERGE ")  to not overlook
> that,
> as well as moving this patch at the end of the series IMO.


Thank you for the hint. I will update it as soon as I get more
feedback.

But we should probably discuss this a bit more. When VSCode is used to
work on a meta layer (e.g. poky), some indexer plugins start indexing
the code. In the case of a meta-layer repository, the build folder can
be very large and it is very important to configure VSCode to ignore
it. Otherwise, the plugins will run with 100% CPU load until an OOM
exception occurs. In practice, this makes VSCode more or less unusable
for working with Yocto until a file like the one added by this patch is
deployed before VSCode starts. And from the user's point of view, it is
not obvious why the system runs at 100% CPU load and eventually
crashes. In other words: If you don't have this patch, you will hate
VSCode as a Yocto developer.

It is even more misleading that VSCode starts the indexers immediately,
but does not stop or reconfigure them when the ignore list is updated.
In practice, this means that every time the ignore list is changed,
VSCode immediately starts indexing the build folder until the OOM
exception stops it. Depending on the system's OOM handler, the entire
build machine may crash.

Particularly annoying is the Python plugin that ignores the general
ignore list and requires an extra ignore section.

However, putting a static file in poky doesn't look like a good
solution. Depending on the setup, the configuration here is not valid.
A better approach would be to handle this in the bitbake plugin. But
even that looks kind of wrong, because why should the bitbake plugin
configure other indexer plugins? Other ideas would be to have the
configuration file generated by the layer setup tool or simply cover
this topic in the documentation.

Regards,
Adrian

> 
> Luca
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186485): 
https://lists.openembedded.org/g/openembedded-core/message/186485
Mute This Topic: https://lists.openembedded.org/mt/100876148/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 00/14] devtool ide plugin

2023-08-21 Thread Adrian Freihofer via lists.openembedded.org
On more hint for those who are on kirkstone (or any newer branch): The
patches work on kirstone as well. Cherry-picking works 99.9% fast
forward.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186486): 
https://lists.openembedded.org/g/openembedded-core/message/186486
Mute This Topic: https://lists.openembedded.org/mt/100876145/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [mickledore][PATCH] ccache.bbclass: Add allowed list for native recipes

2023-08-21 Thread Steve Sakoman
On Mon, Aug 21, 2023 at 2:36 AM Angelo Ribeiro via
lists.openembedded.org
 wrote:
>
> From: Angelo Ribeiro 
>
> Native recipes are not able to use ccache currently, due to a circular
> dependency between ccache-native and cmake-native.
> This affects also other native recipes, but not all, imposing a
> limitation in build time optimizations.
>
> The introduction of CCACHE_NATIVE_RECIPES_ALLOWED allows the user to specify
> which native recipes should use ccache, keeping it disable by default for all
> native recipes.

Sorry, I can't take feature additions to the stable branches.

Steve

>
> Signed-off-by: Angelo Ribeiro 
> ---
>  meta/classes/ccache.bbclass  | 11 ---
>  meta/conf/documentation.conf |  1 +
>  2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
> index 34becb69d1..262db6672c 100644
> --- a/meta/classes/ccache.bbclass
> +++ b/meta/classes/ccache.bbclass
> @@ -28,6 +28,11 @@
>  # be shared between different builds.
>  CCACHE_TOP_DIR ?= "${TMPDIR}/ccache"
>
> +# ccache-native and cmake-native have a circular dependency
> +# that affects other native recipes, but not all.
> +# Allows to use ccache in specified native recipes.
> +CCACHE_NATIVE_RECIPES_ALLOWED ?= ""
> +
>  # ccahe removes CCACHE_BASEDIR from file path, so that hashes will be the 
> same
>  # in different builds.
>  export CCACHE_BASEDIR ?= "${TMPDIR}"
> @@ -54,9 +59,9 @@ python() {
>  Enable ccache for the recipe
>  """
>  pn = d.getVar('PN')
> -# quilt-native doesn't need ccache since no c files
> -if not (bb.data.inherits_class("native", d) or
> -bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
> +if (pn in d.getVar('CCACHE_NATIVE_RECIPES_ALLOWED') or
> +not (bb.data.inherits_class("native", d) or
> +bb.utils.to_boolean(d.getVar('CCACHE_DISABLE':
>  d.appendVar('DEPENDS', ' ccache-native')
>  d.setVar('CCACHE', 'ccache ')
>  }
> diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
> index a27d7a53c3..7279e89e63 100644
> --- a/meta/conf/documentation.conf
> +++ b/meta/conf/documentation.conf
> @@ -106,6 +106,7 @@ BUSYBOX_SPLIT_SUID[doc] = "For the BusyBox recipe, 
> specifies whether to split th
>  #C
>
>  CACHE[doc]  = "The directory holding the cache of the metadata."
> +CCACHE_NATIVE_RECIPES_ALLOWED[doc] = "A list of native recipes to use 
> Ccache, this variable is useful to bypass a circular dependency between 
> ccache-native and cmake-native that inhibits to use Ccache in other native 
> recipes."
>  CFLAGS[doc] = "Flags passed to the C compiler for the target system. This 
> variable evaluates to the same as TARGET_CFLAGS."
>  CLASSOVERRIDE[doc] = "An internal variable specifying the special class 
> override that should currently apply (e.g. "class-target", "class-native", 
> and so forth)."
>  CLEANBROKEN[doc] = "Specifies if 'make clean' does not work for a recipe 
> (and therefore the build system should not try to use it during do_configure)"
> --
> 2.34.1
>
> The information in this communication may contain confidential or legally 
> privileged information. It is intended solely for the use of the individual 
> or entity it addresses and others authorized to receive it. If you are not an 
> intended recipient, you are hereby notified that any disclosure, copying, 
> distribution or action in reliance on the contents of this information is 
> strictly prohibited and may be unlawful. If you have received this 
> communication by error, please notify us immediately by responding to this 
> e-mail and then delete it from your system. Critical TechWorks is not liable 
> for the proper and complete transmission of the information in this 
> communication nor for any delay in its receipt
>
> This e-mail is environmentally friendly, just like Critical TechWorks, which 
> lives in a paper-free atmosphere. Therefore, please consider the environment 
> before printing it!
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186487): 
https://lists.openembedded.org/g/openembedded-core/message/186487
Mute This Topic: https://lists.openembedded.org/mt/100871843/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][dunfell][PATCH] openssh: Fix CVE-2023-38408

2023-08-21 Thread virendra thakur
From: Virendra Thakur 

Add patch to fix CVE-2023-38408

Upstream-Status: Backport 
[https://launchpadlibrarian.net/680920377/openssh_8.2p1-4ubuntu0.9.debian.tar.xz]

Signed-off-by: Virendra Thakur 
---
 .../openssh/openssh/CVE-2023-38408-1.patch|  31 
 .../openssh/openssh/CVE-2023-38408-3.patch| 161 ++
 .../openssh/openssh_8.2p1.bb  |   2 +
 3 files changed, 194 insertions(+)
 create mode 100644 
meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-1.patch
 create mode 100644 
meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-3.patch

diff --git a/meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-1.patch 
b/meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-1.patch
new file mode 100644
index 00..3d7c7bd357
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-1.patch
@@ -0,0 +1,31 @@
+From 892506b13654301f69f9545f48213fc210e5c5cc Mon Sep 17 00:00:00 2001
+From: "d...@openbsd.org" 
+Date: Wed, 19 Jul 2023 13:55:53 +
+Subject: [PATCH] upstream: terminate process if requested to load a PKCS#11
+ provider
+
+that isn't a PKCS#11 provider; from / ok markus@
+
+OpenBSD-Commit-ID: 39532cf18b115881bb4cfaee32084497aadfa05c
+CVE: CVE-2023-38408
+Upstream-Status: Backport 
[https://launchpadlibrarian.net/680920377/openssh_8.2p1-4ubuntu0.9.debian.tar.xz]
+Signed-off-by: Virendra Thakur 
+---
+ ssh-pkcs11.c | 8 +++-
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+--- a/ssh-pkcs11.c
 b/ssh-pkcs11.c
+@@ -1504,10 +1504,8 @@ pkcs11_register_provider(char *provider_
+   error("dlopen %s failed: %s", provider_id, dlerror());
+   goto fail;
+   }
+-  if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL) {
+-  error("dlsym(C_GetFunctionList) failed: %s", dlerror());
+-  goto fail;
+-  }
++  if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL)
++  fatal("dlsym(C_GetFunctionList) failed: %s", dlerror());
+   p = xcalloc(1, sizeof(*p));
+   p->name = xstrdup(provider_id);
+   p->handle = handle;
diff --git a/meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-3.patch 
b/meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-3.patch
new file mode 100644
index 00..6a94b8715c
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/CVE-2023-38408-3.patch
@@ -0,0 +1,161 @@
+Backport of:
+
+From 29ef8a04866ca14688d5b7fed7b8b9deab851f77 Mon Sep 17 00:00:00 2001
+From: "d...@openbsd.org" 
+Date: Wed, 19 Jul 2023 14:02:27 +
+Subject: [PATCH] upstream: Ensure FIDO/PKCS11 libraries contain expected
+ symbols
+
+This checks via nlist(3) that candidate provider libraries contain one
+of the symbols that we will require prior to dlopen(), which can cause
+a number of side effects, including execution of constructors.
+
+Feedback deraadt; ok markus
+
+OpenBSD-Commit-ID: 1508a5fbd74e329e69a55b56c453c292029aefbe
+CVE: CVE-2023-38408
+Upstream-Status: Backport 
[https://launchpadlibrarian.net/680920377/openssh_8.2p1-4ubuntu0.9.debian.tar.xz]
+Signed-off-by: Virendra Thakur 
+---
+ misc.c   | 78 +++-
+ misc.h   |  3 +-
+ ssh-pkcs11.c |  6 +++-
+ ssh-sk.c |  8 --
+ 4 files changed, 89 insertions(+), 6 deletions(-)
+
+--- a/misc.c
 b/misc.c
+@@ -28,6 +28,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+@@ -41,6 +42,9 @@
+ #ifdef HAVE_POLL_H
+ #include 
+ #endif
++#ifdef HAVE_NLIST_H
++#include 
++#endif
+ #include 
+ #include 
+ #include 
+@@ -2314,3 +2318,75 @@ ssh_signal(int signum, sshsig_t handler)
+   }
+   return osa.sa_handler;
+ }
++
++/*
++ * Returns zero if the library at 'path' contains symbol 's', nonzero
++ * otherwise.
++ */
++int
++lib_contains_symbol(const char *path, const char *s)
++{
++#ifdef HAVE_NLIST_H
++  struct nlist nl[2];
++  int ret = -1, r;
++
++  memset(nl, 0, sizeof(nl));
++  nl[0].n_name = xstrdup(s);
++  nl[1].n_name = NULL;
++  if ((r = nlist(path, nl)) == -1) {
++  error("nlist failed for %s", path);
++  goto out;
++  }
++  if (r != 0 || nl[0].n_value == 0 || nl[0].n_type == 0) {
++  error("library %s does not contain symbol %s", path, s);
++  goto out;
++  }
++  /* success */
++  ret = 0;
++ out:
++  free(nl[0].n_name);
++  return ret;
++#else /* HAVE_NLIST_H */
++  int fd, ret = -1;
++  struct stat st;
++  void *m = NULL;
++  size_t sz = 0;
++
++  memset(&st, 0, sizeof(st));
++  if ((fd = open(path, O_RDONLY)) < 0) {
++  error("open %s: %s", path, strerror(errno));
++  return -1;
++  }
++  if (fstat(fd, &st) != 0) {
++  error("fstat %s: %s", path, strerror(errno));
++  goto out;
++  }
++  if (!S_ISREG(st.st_mode)) {
++  error("%s is not a regular file", path)

[OE-core][PATCH 2/2] cmake.bbclass: fix allarch override syntax

2023-08-21 Thread Chen Qi via lists.openembedded.org
From: Chen Qi 

The override syntax should be ":allarch" instead of "_allarch".

Signed-off-by: Chen Qi 
---
 meta/classes-recipe/cmake.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes-recipe/cmake.bbclass 
b/meta/classes-recipe/cmake.bbclass
index 0dda104a69..ea836d5c0d 100644
--- a/meta/classes-recipe/cmake.bbclass
+++ b/meta/classes-recipe/cmake.bbclass
@@ -51,10 +51,10 @@ OECMAKE_CXX_COMPILER ?= "${@oecmake_map_compiler('CXX', 
d)[0]}"
 OECMAKE_CXX_COMPILER_LAUNCHER ?= "${@oecmake_map_compiler('CXX', d)[1]}"
 
 # clear compiler vars for allarch to avoid sig hash difference
-OECMAKE_C_COMPILER_allarch = ""
-OECMAKE_C_COMPILER_LAUNCHER_allarch = ""
-OECMAKE_CXX_COMPILER_allarch = ""
-OECMAKE_CXX_COMPILER_LAUNCHER_allarch = ""
+OECMAKE_C_COMPILER:allarch = ""
+OECMAKE_C_COMPILER_LAUNCHER:allarch = ""
+OECMAKE_CXX_COMPILER:allarch = ""
+OECMAKE_CXX_COMPILER_LAUNCHER:allarch = ""
 
 OECMAKE_RPATH ?= ""
 OECMAKE_PERLNATIVE_DIR ??= ""
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186490): 
https://lists.openembedded.org/g/openembedded-core/message/186490
Mute This Topic: https://lists.openembedded.org/mt/100887367/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/2] cmake: drop OE specific environment variable support

2023-08-21 Thread Chen Qi via lists.openembedded.org
From: Chen Qi 

CMAKE_TOOLCHAIN_FILE is now also a supported environment
variable, we can export it directly. There's no need to
use a OE specific patch to add OE_CMAKE_TOOLCHAIN_FILE
support.

Signed-off-by: Chen Qi 
---
 .../cmake/cmake-native_3.26.4.bb  |  1 -
 ...stem-use-oe-environment-vars-to-load.patch | 44 ---
 .../cmake/cmake/environment.d-cmake.sh|  2 +-
 meta/recipes-devtools/cmake/cmake_3.26.4.bb   |  1 -
 4 files changed, 1 insertion(+), 47 deletions(-)
 delete mode 100644 
meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.26.4.bb 
b/meta/recipes-devtools/cmake/cmake-native_3.26.4.bb
index 2177aa81a4..26a3331cb0 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.26.4.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.26.4.bb
@@ -5,7 +5,6 @@ DEPENDS += "bzip2-replacement-native xz-native zlib-native 
ncurses-native zstd-n
 
 SRC_URI += "file://OEToolchainConfig.cmake \
 file://environment.d-cmake.sh \
-
file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
 
file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
 file://0001-CMakeLists.txt-disable-USE_NGHTTP2.patch \
 "
diff --git 
a/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
 
b/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
deleted file mode 100644
index d13c367e78..00
--- 
a/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 5acfcb2aba1a5641d390558fdf288373f5e39cb5 Mon Sep 17 00:00:00 2001
-From: Cody P Schafer 
-Date: Thu, 27 Apr 2017 11:35:05 -0400
-Subject: [PATCH] CMakeDetermineSystem: use oe environment vars to load default
- toolchain file in sdk
-
-Passing the toolchain by:
-
- - shell aliases does not work if cmake is called by a script
- - unconditionally by a wrapper script causes cmake to believe it is
-   configuring things when it is not (for example, `cmake --build` breaks).
-
-The OE_CMAKE_TOOLCHAIN_FILE variable is only used as a default if no
-toolchain is explicitly specified.
-
-Setting the CMAKE_TOOLCHAIN_FILE cmake variable is marked as cached
-because '-D' options are cache entries themselves.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Cody P Schafer 
-Signed-off-by: Otavio Salvador 
-

- Modules/CMakeDetermineSystem.cmake | 7 +++
- 1 file changed, 7 insertions(+)
-
-diff --git a/Modules/CMakeDetermineSystem.cmake 
b/Modules/CMakeDetermineSystem.cmake
-index 2c2c2ac3..fae4f97f 100644
 a/Modules/CMakeDetermineSystem.cmake
-+++ b/Modules/CMakeDetermineSystem.cmake
-@@ -112,6 +112,13 @@ else()
-   endif()
- endif()
- 
-+if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
-+  if(DEFINED ENV{OE_CMAKE_TOOLCHAIN_FILE})
-+set(CMAKE_TOOLCHAIN_FILE "$ENV{OE_CMAKE_TOOLCHAIN_FILE}" CACHE FILEPATH 
"toolchain file")
-+message(STATUS "Toolchain file defaulted to '${CMAKE_TOOLCHAIN_FILE}'")
-+  endif()
-+endif()
-+
- # if a toolchain file is used, the user wants to cross compile.
- # in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
- # variables around so they can be used in CMakeLists.txt.
diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh 
b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
index 7bdb19fb6c..c94b6bb3e3 100644
--- a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
+++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
@@ -1,2 +1,2 @@
-export 
OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
+export 
CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
 export OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo $OECORE_BASELIB | sed -e 
s/lib//`"
diff --git a/meta/recipes-devtools/cmake/cmake_3.26.4.bb 
b/meta/recipes-devtools/cmake/cmake_3.26.4.bb
index bb7ed83e30..ae29a3a945 100644
--- a/meta/recipes-devtools/cmake/cmake_3.26.4.bb
+++ b/meta/recipes-devtools/cmake/cmake_3.26.4.bb
@@ -9,7 +9,6 @@ SRC_URI:append:class-nativesdk = " \
 file://SDKToolchainConfig.cmake.template \
 file://cmake-setup.py \
 file://environment.d-cmake.sh \
-file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
 "
 
 LICENSE:append = " & BSD-1-Clause & MIT"
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186489): 
https://lists.openembedded.org/g/openembedded-core/message/186489
Mute This Topic: https://lists.openembedded.org/mt/100887366/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][kirkstone][PATCH] perf: fix argument list too long during compile

2023-08-21 Thread Bruce Ashfield
On Thu, Aug 17, 2023 at 11:30 PM Xiangyu Chen
 wrote:
>
> Hi Bruce,
>
>
> Sorry for being late, update some information I observed in my local setup;
>
>
> On 5/31/23 20:23, Bruce Ashfield wrote:
> > CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and 
> > know the content is safe.
> >
> > On Wed, May 31, 2023 at 1:14 AM Xiangyu Chen
> >  wrote:
> >> From: Xiangyu Chen 
> >>
> >> The perf would fail to build when BUILDDIR is longer than 190, The "O = 
> >> ${B}"
> >> makes it use absolute path which makes the argument list too long, remove
> >> "O = ${B}" will make it use relative path to build will fix the problem.
> >>
> > Can you elaborate on how the relative path use is happening when an
> > explicit output directory isn't passed ?
>
> When I using a long path/long folder name as below[1] , the perf package
> would
>
> report an error "| make[4]: /bin/sh: Argument list too long"
>
>
> >
> > I haven't checked the source, but I'd assume that it will simply build
> > directly in the source directory if we don't pass O to the build.
> >
> > Also, is this fixed in a different way in master ?
>
> Indeed, simply drop the "O" is a workaround solution, just put the
> compile object to source folder.

As you know, it isn't ideal to mix the source and objects, it is
obviously something that we don't do unless there really are
no other options.

In the past, we have converted the directories to relative paths
versus absolute by specifying B explicitly (and making sure it
is relative). Have you tried anything like that ?

>
> This behavior cannot find after mickledore branch, after comparing
> mickledore and kirkstone code,
>
> I found that it related to make.
>
> The kirkstone's make using 4.3, the mickledore using 4.4.1. There is a
> commit [2] already fix the issue,
>
> but this fix depends lots of other commits(and not sure those commit has
> alternative impaction), so looks
>
> upgrade package directly is lower risky than backport patches, but i am
> not sure bump the make package
>
> (4.3->4.4.x) is meet the policy, could you give some suggestion? Thanks.
>

Interesting. And yes, it is unlikely that a new version of Make
will appear in Mickledore.

It would be interesting to see the list of commits that are required
and then we could review and look for impacts.

One other question ... it can't just be perf that is being impacted
by this issue. How are other packages building in your directory
structure without failing on long paths ?

Bruce

>
> >
> > Bruce
>
>
> Ref:
>
> [1] e.g. build_test_logname_x
>
> xx
>
> xx
>
> _x
>
> xx
>
> _dir
>
>
> [2]
> https://git.savannah.gnu.org/cgit/make.git/commit/?id=dc2d963989b96161472b2cd38cef5d1f4851ea34
>
>
>
> Thanks,
>
> Xiangyu
>
> >> Signed-off-by: Xiangyu Chen 
> >> ---
> >>   meta/recipes-kernel/perf/perf.bb | 1 -
> >>   1 file changed, 1 deletion(-)
> >>
> >> diff --git a/meta/recipes-kernel/perf/perf.bb 
> >> b/meta/recipes-kernel/perf/perf.bb
> >> index a4ce3169d3..e213c3632e 100644
> >> --- a/meta/recipes-kernel/perf/perf.bb
> >> +++ b/meta/recipes-kernel/perf/perf.bb
> >> @@ -72,7 +72,6 @@ LDFLAGS="-ldl -lutil"
> >>   EXTRA_OEMAKE = '\
> >>   V=1 \
> >>   -C ${S}/tools/perf \
> >> -O=${B} \
> >>   CROSS_COMPILE=${TARGET_PREFIX} \
> >>   ARCH=${ARCH} \
> >>   CC="${CC}" \
> >> --
> >> 2.34.1
> >>
> >>
> >>
> >>
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await
> > thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II
>
> 
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186491): 
https://lists.openembedded.org/g/openembedded-core/message/186491
Mute This Topic: https://lists.openembedded.org/mt/99236216/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][kirkstone][PATCH] go: fix CVE-2023-29406 net/http insufficient sanitization of Host header

2023-08-21 Thread Robert Yang via lists.openembedded.org

Hello,

This patch caused docker failed to run on kirkstone branch:

$ docker run --rm -it ubuntu /bin/bash
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
3153aa388d02: Pull complete
Digest: sha256:0bced47fffa3361afa981854fcabcd4577cd43cebbb808cea2b1f33a3dd7f508
Status: Downloaded newer image for ubuntu:latest
http: invalid Host header

Maybe we need consider revert it atm since CVE-2023-29406 is a medium bug.

// Robert

On 7/26/23 12:37, vkumbhar wrote:

Signed-off-by: Vivek Kumbhar 
---
  meta/recipes-devtools/go/go-1.17.13.inc   |   1 +
  .../go/go-1.18/CVE-2023-29406.patch   | 210 ++
  2 files changed, 211 insertions(+)
  create mode 100644 meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch

diff --git a/meta/recipes-devtools/go/go-1.17.13.inc 
b/meta/recipes-devtools/go/go-1.17.13.inc
index 73921852fc..36904a92fb 100644
--- a/meta/recipes-devtools/go/go-1.17.13.inc
+++ b/meta/recipes-devtools/go/go-1.17.13.inc
@@ -36,6 +36,7 @@ SRC_URI += "\
  file://CVE-2023-29405.patch \
  file://CVE-2023-29402.patch \
  file://CVE-2023-29400.patch \
+file://CVE-2023-29406.patch \
  "
  SRC_URI[main.sha256sum] = 
"a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
  
diff --git a/meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch b/meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch

new file mode 100644
index 00..a326cda5c4
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch
@@ -0,0 +1,210 @@
+From 5fa6923b1ea891400153d04ddf1545e23b40041b Mon Sep 17 00:00:00 2001
+From: Damien Neil 
+Date: Wed, 28 Jun 2023 13:20:08 -0700
+Subject: [PATCH] [release-branch.go1.19] net/http: validate Host header before
+ sending
+
+Verify that the Host header we send is valid.
+Avoids surprising behavior such as a Host of "go.dev\r\nX-Evil:oops"
+adding an X-Evil header to HTTP/1 requests.
+
+Add a test, skip the test for HTTP/2. HTTP/2 is not vulnerable to
+header injection in the way HTTP/1 is, but x/net/http2 doesn't validate
+the header and will go into a retry loop when the server rejects it.
+CL 506995 adds the necessary validation to x/net/http2.
+
+Updates #60374
+Fixes #61075
+For CVE-2023-29406
+
+Change-Id: I05cb6866a9bead043101954dfded199258c6dd04
+Reviewed-on: https://go-review.googlesource.com/c/go/+/506996
+Reviewed-by: Tatiana Bradley 
+TryBot-Result: Gopher Robot 
+Run-TryBot: Damien Neil 
+(cherry picked from commit 499458f7ca04087958987a33c2703c3ef03e27e2)
+Reviewed-on: https://go-review.googlesource.com/c/go/+/507358
+Run-TryBot: Tatiana Bradley 
+Reviewed-by: Roland Shoemaker 
+
+Upstream-Status: Backport 
[https://github.com/golang/go/commit/5fa6923b1ea891400153d04ddf1545e23b40041b]
+CVE: CVE-2023-29406
+Signed-off-by: Vivek Kumbhar 
+---
+ src/net/http/http_test.go  | 29 --
+ src/net/http/request.go| 45 --
+ src/net/http/request_test.go   | 11 ++---
+ src/net/http/transport_test.go | 18 ++
+ 4 files changed, 30 insertions(+), 73 deletions(-)
+
+diff --git a/src/net/http/http_test.go b/src/net/http/http_test.go
+index 0d92fe5..f03272a 100644
+--- a/src/net/http/http_test.go
 b/src/net/http/http_test.go
+@@ -48,35 +48,6 @@ func TestForeachHeaderElement(t *testing.T) {
+   }
+ }
+
+-func TestCleanHost(t *testing.T) {
+-  tests := []struct {
+-  in, want string
+-  }{
+-  {"www.google.com", "www.google.com"},
+-  {"www.google.com foo", "www.google.com"},
+-  {"www.google.com/foo", "www.google.com"},
+-  {" first character is a space", ""},
+-  {"[1::6]:8080", "[1::6]:8080"},
+-
+-  // Punycode:
+-  {"гофер.рф/foo", "xn--c1ae0ajs.xn--p1ai"},
+-  {"bücher.de", "xn--bcher-kva.de"},
+-  {"bücher.de:8080", "xn--bcher-kva.de:8080"},
+-  // Verify we convert to lowercase before punycode:
+-  {"BÜCHER.de", "xn--bcher-kva.de"},
+-  {"BÜCHER.de:8080", "xn--bcher-kva.de:8080"},
+-  // Verify we normalize to NFC before punycode:
+-  {"gophér.nfc", "xn--gophr-esa.nfc"},// NFC input; 
no work needed
+-  {"goph\u0065\u0301r.nfd", "xn--gophr-esa.nfd"}, // NFD input
+-  }
+-  for _, tt := range tests {
+-  got := cleanHost(tt.in)
+-  if tt.want != got {
+-  t.Errorf("cleanHost(%q) = %q, want %q", tt.in, got, 
tt.want)
+-  }
+-  }
+-}
+-
+ // Test that cmd/go doesn't link in the HTTP server.
+ //
+ // This catches accidental dependencies between the HTTP transport and
+diff --git a/src/net/http/request.go b/src/net/http/request.go
+index 09cb0c7..2f4e740 100644
+--- a/src/net/http/request.go
 b/src/net/http/request.go
+@@ -17,7 +17,6 @@ import (
+   "io"
+   "mime"
+   "mime/multipart"
+-  "net"
+   "net/http/httptrace

Re: [OE-core][kirkstone][PATCH] go: fix CVE-2023-29406 net/http insufficient sanitization of Host header

2023-08-21 Thread vkumbhar
Okay, If that's the case, I'll revert this patch.

Thanks,
Vivek

On Tue, Aug 22, 2023 at 9:08 AM Robert Yang 
wrote:

> Hello,
>
> This patch caused docker failed to run on kirkstone branch:
>
> $ docker run --rm -it ubuntu /bin/bash
> Unable to find image 'ubuntu:latest' locally
> latest: Pulling from library/ubuntu
> 3153aa388d02: Pull complete
> Digest:
> sha256:0bced47fffa3361afa981854fcabcd4577cd43cebbb808cea2b1f33a3dd7f508
> Status: Downloaded newer image for ubuntu:latest
> http: invalid Host header
>
> Maybe we need consider revert it atm since CVE-2023-29406 is a medium bug.
>
> // Robert
>
> On 7/26/23 12:37, vkumbhar wrote:
> > Signed-off-by: Vivek Kumbhar 
> > ---
> >   meta/recipes-devtools/go/go-1.17.13.inc   |   1 +
> >   .../go/go-1.18/CVE-2023-29406.patch   | 210 ++
> >   2 files changed, 211 insertions(+)
> >   create mode 100644
> meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch
> >
> > diff --git a/meta/recipes-devtools/go/go-1.17.13.inc
> b/meta/recipes-devtools/go/go-1.17.13.inc
> > index 73921852fc..36904a92fb 100644
> > --- a/meta/recipes-devtools/go/go-1.17.13.inc
> > +++ b/meta/recipes-devtools/go/go-1.17.13.inc
> > @@ -36,6 +36,7 @@ SRC_URI += "\
> >   file://CVE-2023-29405.patch \
> >   file://CVE-2023-29402.patch \
> >   file://CVE-2023-29400.patch \
> > +file://CVE-2023-29406.patch \
> >   "
> >   SRC_URI[main.sha256sum] =
> "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
> >
> > diff --git a/meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch
> b/meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch
> > new file mode 100644
> > index 00..a326cda5c4
> > --- /dev/null
> > +++ b/meta/recipes-devtools/go/go-1.18/CVE-2023-29406.patch
> > @@ -0,0 +1,210 @@
> > +From 5fa6923b1ea891400153d04ddf1545e23b40041b Mon Sep 17 00:00:00 2001
> > +From: Damien Neil 
> > +Date: Wed, 28 Jun 2023 13:20:08 -0700
> > +Subject: [PATCH] [release-branch.go1.19] net/http: validate Host header
> before
> > + sending
> > +
> > +Verify that the Host header we send is valid.
> > +Avoids surprising behavior such as a Host of "go.dev\r\nX-Evil:oops"
> > +adding an X-Evil header to HTTP/1 requests.
> > +
> > +Add a test, skip the test for HTTP/2. HTTP/2 is not vulnerable to
> > +header injection in the way HTTP/1 is, but x/net/http2 doesn't validate
> > +the header and will go into a retry loop when the server rejects it.
> > +CL 506995 adds the necessary validation to x/net/http2.
> > +
> > +Updates #60374
> > +Fixes #61075
> > +For CVE-2023-29406
> > +
> > +Change-Id: I05cb6866a9bead043101954dfded199258c6dd04
> > +Reviewed-on: https://go-review.googlesource.com/c/go/+/506996
> > +Reviewed-by: Tatiana Bradley 
> > +TryBot-Result: Gopher Robot 
> > +Run-TryBot: Damien Neil 
> > +(cherry picked from commit 499458f7ca04087958987a33c2703c3ef03e27e2)
> > +Reviewed-on: https://go-review.googlesource.com/c/go/+/507358
> > +Run-TryBot: Tatiana Bradley 
> > +Reviewed-by: Roland Shoemaker 
> > +
> > +Upstream-Status: Backport [
> https://github.com/golang/go/commit/5fa6923b1ea891400153d04ddf1545e23b40041b
> ]
> > +CVE: CVE-2023-29406
> > +Signed-off-by: Vivek Kumbhar 
> > +---
> > + src/net/http/http_test.go  | 29 --
> > + src/net/http/request.go| 45 --
> > + src/net/http/request_test.go   | 11 ++---
> > + src/net/http/transport_test.go | 18 ++
> > + 4 files changed, 30 insertions(+), 73 deletions(-)
> > +
> > +diff --git a/src/net/http/http_test.go b/src/net/http/http_test.go
> > +index 0d92fe5..f03272a 100644
> > +--- a/src/net/http/http_test.go
> >  b/src/net/http/http_test.go
> > +@@ -48,35 +48,6 @@ func TestForeachHeaderElement(t *testing.T) {
> > + }
> > + }
> > +
> > +-func TestCleanHost(t *testing.T) {
> > +-tests := []struct {
> > +-in, want string
> > +-}{
> > +-{"www.google.com", "www.google.com"},
> > +-{"www.google.com foo", "www.google.com"},
> > +-{"www.google.com/foo", "www.google.com"},
> > +-{" first character is a space", ""},
> > +-{"[1::6]:8080", "[1::6]:8080"},
> > +-
> > +-// Punycode:
> > +-{"гофер.рф/foo", "xn--c1ae0ajs.xn--p1ai"},
> > +-{"bücher.de ", "xn--bcher-kva.de
> "},
> > +-{"bücher.de:8080 ", "
> xn--bcher-kva.de:8080"},
> > +-// Verify we convert to lowercase before punycode:
> > +-{"BÜCHER.de", "xn--bcher-kva.de"},
> > +-{"BÜCHER.de:8080", "xn--bcher-kva.de:8080"},
> > +-// Verify we normalize to NFC before punycode:
> > +-{"gophér.nfc", "xn--gophr-esa.nfc"},// NFC
> input; no work needed
> > +-{"goph\u0065\u0301r.nfd", "xn--gophr-esa.nfd"}, // NFD
> input
> > +-}
> > +-for _, tt := range tests {
> > +-got := cleanHost(tt.in)
> > +-