[OE-core] [PATCH] openssl: fix EVP_PKEY_CTX_get_rsa_pss_saltlen() not returning a value

2021-11-25 Thread Ross Burton
Backport a patch submitted upstream. Specifically, this fixes signature
validation in trusted-firmware-a with OpenSSL 3.

Signed-off-by: Ross Burton 
---
 ...-EVP_PKEY_CTX_get_rsa_pss_saltlen-no.patch | 89 +++
 .../openssl/openssl_3.0.0.bb  |  1 +
 2 files changed, 90 insertions(+)
 create mode 100644 
meta/recipes-connectivity/openssl/openssl/0001-Fix-EVP_PKEY_CTX_get_rsa_pss_saltlen-no.patch

diff --git 
a/meta/recipes-connectivity/openssl/openssl/0001-Fix-EVP_PKEY_CTX_get_rsa_pss_saltlen-no.patch
 
b/meta/recipes-connectivity/openssl/openssl/0001-Fix-EVP_PKEY_CTX_get_rsa_pss_saltlen-no.patch
new file mode 100644
index 00..5c76485b5f
--- /dev/null
+++ 
b/meta/recipes-connectivity/openssl/openssl/0001-Fix-EVP_PKEY_CTX_get_rsa_pss_saltlen-no.patch
@@ -0,0 +1,89 @@
+Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/17136]
+Signed-off-by: Ross Burton 
+
+From 425191c295ada8510b0ee87d292ef18b7a45d062 Mon Sep 17 00:00:00 2001
+From: Tom Cosgrove 
+Date: Thu, 25 Nov 2021 10:17:15 +
+Subject: [PATCH] Fix EVP_PKEY_CTX_get_rsa_pss_saltlen() not returning a value
+
+When an integer value was specified, it was not being passed back via
+the orig_p2 weirdness.
+
+Regression test included.
+---
+ crypto/evp/ctrl_params_translate.c | 10 +-
+ test/evp_extra_test.c  | 28 
+ 2 files changed, 33 insertions(+), 5 deletions(-)
+
+diff --git a/crypto/evp/ctrl_params_translate.c 
b/crypto/evp/ctrl_params_translate.c
+index d17017a78e81..99aaf6c09d8e 100644
+--- a/crypto/evp/ctrl_params_translate.c
 b/crypto/evp/ctrl_params_translate.c
+@@ -1384,16 +1384,16 @@ static int fix_rsa_pss_saltlen(enum state state,
+ if (strcmp(ctx->p2, str_value_map[i].ptr) == 0)
+ break;
+ }
+-if (i == OSSL_NELEM(str_value_map)) {
+-ctx->p1 = atoi(ctx->p2);
+-} else if (state == POST_CTRL_TO_PARAMS) {
++int val = (i == OSSL_NELEM(str_value_map)) ? atoi(ctx->p2) :
++ (int)str_value_map[i].id;
++if (state == POST_CTRL_TO_PARAMS) {
+ /*
+  * EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN weirdness explained further
+  * up
+  */
+-*(int *)ctx->orig_p2 = str_value_map[i].id;
++*(int *)ctx->orig_p2 = val;
+ } else {
+-ctx->p1 = (int)str_value_map[i].id;
++ctx->p1 = val;
+ }
+ ctx->p2 = NULL;
+ }
+diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
+index df97f448ab3a..27795b77c8c8 100644
+--- a/test/evp_extra_test.c
 b/test/evp_extra_test.c
+@@ -3186,6 +3186,33 @@ static int test_EVP_rsa_pss_with_keygen_bits(void)
+ return ret;
+ }
+ 
++static int test_EVP_rsa_pss_set_saltlen(void)
++{
++int ret = 0;
++EVP_PKEY *pkey = NULL;
++EVP_PKEY_CTX *pkey_ctx = NULL;
++EVP_MD *sha256 = NULL;
++EVP_MD_CTX *sha256_ctx = NULL;
++int saltlen = ; /* buggy EVP_PKEY_CTX_get_rsa_pss_saltlen() didn't 
update this */
++const int test_value = 32;
++
++ret = TEST_ptr(pkey = load_example_rsa_key())
++&& TEST_ptr(pkey_ctx = EVP_PKEY_CTX_new_from_pkey(testctx, pkey, 
NULL))
++&& TEST_ptr(sha256 = EVP_MD_fetch(testctx, "sha256", NULL))
++&& TEST_ptr(sha256_ctx = EVP_MD_CTX_new())
++&& TEST_true(EVP_DigestSignInit(sha256_ctx, _ctx, sha256, NULL, 
pkey))
++&& TEST_true(EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, 
RSA_PKCS1_PSS_PADDING))
++&& TEST_true(EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, test_value))
++&& TEST_true(EVP_PKEY_CTX_get_rsa_pss_saltlen(pkey_ctx, ))
++&& TEST_int_eq(saltlen, test_value);
++
++EVP_PKEY_CTX_free(pkey_ctx);
++EVP_PKEY_free(pkey);
++EVP_MD_free(sha256);
++
++return ret;
++}
++
+ static int success = 1;
+ static void md_names(const char *name, void *vctx)
+ {
+@@ -4245,6 +4272,7 @@ int setup_tests(void)
+ ADD_ALL_TESTS(test_evp_iv_des, 6);
+ #endif
+ ADD_TEST(test_EVP_rsa_pss_with_keygen_bits);
++ADD_TEST(test_EVP_rsa_pss_set_saltlen);
+ #ifndef OPENSSL_NO_EC
+ ADD_ALL_TESTS(test_ecpub, OSSL_NELEM(ecpub_nids));
+ #endif
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb 
b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
index 8852a51ca8..4b1ae71a85 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
@@ -13,6 +13,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz 
\
file://afalg.patch \
file://0001-Configure-do-not-tweak-mips-cflags.patch \
file://armv8-32bit.patch \
+   file://0001-Fix-EVP_PKEY_CTX_get_rsa_pss_saltlen-no.patch \
"
 
 SRC_URI:append:class-nativesdk = " \
-- 
2.25

[OE-core] [PATCH 2/3] sstate: explicitly name the checkhashes thread pool

2021-11-24 Thread Ross Burton
Give this thread pool a name for clarity.

Signed-off-by: Ross Burton 
---
 meta/classes/sstate.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0a78a2fb69..0326d27c74 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -1014,7 +1014,8 @@ def sstate_checkhashes(sq_data, d, siginfo=False, 
currentcount=0, summary=True,
 
 bb.event.enable_threadlock()
 pool = oe.utils.ThreadedPool(nproc, len(tasklist),
-worker_init=checkstatus_init, worker_end=checkstatus_end)
+worker_init=checkstatus_init, worker_end=checkstatus_end,
+name="sstate_checkhashes-")
 for t in tasklist:
 pool.add_task(checkstatus, t)
 pool.start()
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158730): 
https://lists.openembedded.org/g/openembedded-core/message/158730
Mute This Topic: https://lists.openembedded.org/mt/87285694/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] oe/utils: by default cap cpu_count() to 64 cores

2021-11-24 Thread Ross Burton
Larger systems may have large numbers of cores, but beyond a certain
point they can't all be used for compiling: whilst purely
compute-intensive jobs can be parallelised to hundreds of cores,
operations such as compressing (needs lots of RAM) or compiling (lots of
I/O) don't scale linearly.

For example, the Marvel ThunderX2 has 32 cores, each capable of
executing four threads, and can be configured with two sockets, making
256 CPUs according to Linux. Zstd using 256 threads has been seen to
fail to allocate memory during even small recipes such as iso-codes.

Add a default cap of 64 CPUs to the cpu_count() method so that extreme
parallisation is limited.  64 is high enough that meaningful gains
beyond it are unlikely, but high enough that most systems won't be
effected.

Signed-off-by: Ross Burton 
---
 meta/lib/oe/utils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 7982b2b511..136650e6f7 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -248,9 +248,9 @@ def trim_version(version, num_parts=2):
 trimmed = ".".join(parts[:num_parts])
 return trimmed
 
-def cpu_count(at_least=1):
+def cpu_count(at_least=1, at_most=64):
 cpus = len(os.sched_getaffinity(0))
-return max(cpus, at_least)
+return max(min(cpus, at_most), at_least)
 
 def execute_pre_post_process(d, cmds):
 if cmds is None:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158731): 
https://lists.openembedded.org/g/openembedded-core/message/158731
Mute This Topic: https://lists.openembedded.org/mt/87285695/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] oe/utils: allow naming threads in ThreadedPool

2021-11-24 Thread Ross Burton
When looking at logs involving thread pools it is useful if the threads
can be named.

Signed-off-by: Ross Burton 
---
 meta/lib/oe/utils.py | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index cf65639647..7982b2b511 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -483,8 +483,8 @@ from threading import Thread
 
 class ThreadedWorker(Thread):
 """Thread executing tasks from a given tasks queue"""
-def __init__(self, tasks, worker_init, worker_end):
-Thread.__init__(self)
+def __init__(self, tasks, worker_init, worker_end, name=None):
+Thread.__init__(self, name=name)
 self.tasks = tasks
 self.daemon = True
 
@@ -515,13 +515,12 @@ class ThreadedWorker(Thread):
 
 class ThreadedPool:
 """Pool of threads consuming tasks from a queue"""
-def __init__(self, num_workers, num_tasks, worker_init=None,
-worker_end=None):
+def __init__(self, num_workers, num_tasks, worker_init=None, 
worker_end=None, name="ThreadedPool-"):
 self.tasks = Queue(num_tasks)
 self.workers = []
 
-for _ in range(num_workers):
-worker = ThreadedWorker(self.tasks, worker_init, worker_end)
+for i in range(num_workers):
+worker = ThreadedWorker(self.tasks, worker_init, worker_end, 
name=name + str(i))
 self.workers.append(worker)
 
 def start(self):
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158729): 
https://lists.openembedded.org/g/openembedded-core/message/158729
Mute This Topic: https://lists.openembedded.org/mt/87285693/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/20] kernel/kernel-yocto: consolidated pull request

2021-11-24 Thread Ross Burton
On Tue, 23 Nov 2021 at 21:57, Bruce Ashfield  wrote:
> We weren't able to even run the validation at all, due to the kernel
> calling pkg-config directly to check for libyaml, which is the target
> pkgconfig and failing on missing dependencies. Rather than patching
> the kernel, I've finally given in and made the do_compile task set
> the PKG_CONFIG variables to point to our native-sysroot.

The correct fix here would be the kernel should use $PKG_CONFIG (or
ideally, BUILD_PKGCONFIG or similar for host lookups) and then you can
override it with export PKGCONFIG=pkgconfig-native.

I see that some bits of the kernel already set PKG_CONFIG ?=
$(CROSS_COMPILE)pkg-config, but others directly use pkg-config.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158694): 
https://lists.openembedded.org/g/openembedded-core/message/158694
Mute This Topic: https://lists.openembedded.org/mt/87269381/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] meson: drop redundant patch

2021-11-24 Thread Ross Burton
On Tue, 23 Nov 2021 at 22:36, Richard Purdie
 wrote:
> On Tue, 2021-11-23 at 19:38 +0000, Ross Burton wrote:
> > This patch disables the debian-detection to use the correct $libdir by
> > default on that platform.  However in cross builds this is always
> > overridden to be $prefix/lib, and all recipes that inherit meson pass
> > the correct libdir explicitly.
> >
> > Signed-off-by: Ross Burton 
> > ---
> >  meta/recipes-devtools/meson/meson.inc |  1 -
> >  ...01-is_debianlike-always-return-False.patch | 26 ---
> >  2 files changed, 27 deletions(-)
> >  delete mode 100644 
> > meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch
>
> We build native things which are meson based. Do we want native tool libdir
> paths depending on the existence of /etc/debian_version ? It was some reason
> like that this was added as we found it doing 'fun' changes depending on the
> host. Not sure I really want to debug that again...

Sure, and they pass --libdir.  I did a build of Sato and nothing
moved, so I'm struggling to find the actual problem here.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158684): 
https://lists.openembedded.org/g/openembedded-core/message/158684
Mute This Topic: https://lists.openembedded.org/mt/87266402/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] meson: drop redundant patch

2021-11-23 Thread Ross Burton
This patch disables the debian-detection to use the correct $libdir by
default on that platform.  However in cross builds this is always
overridden to be $prefix/lib, and all recipes that inherit meson pass
the correct libdir explicitly.

Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/meson/meson.inc |  1 -
 ...01-is_debianlike-always-return-False.patch | 26 ---
 2 files changed, 27 deletions(-)
 delete mode 100644 
meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch

diff --git a/meta/recipes-devtools/meson/meson.inc 
b/meta/recipes-devtools/meson/meson.inc
index f383ad9f74..757295a50a 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -13,7 +13,6 @@ SRC_URI = 
"https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
file://disable-rpath-handling.patch \
file://0001-Make-CPU-family-warnings-fatal.patch \
file://0002-Support-building-allarch-recipes-again.patch \
-   file://0001-is_debianlike-always-return-False.patch \
"
 SRC_URI[sha256sum] = 
"5add789c953d984b500858b2851ee3d7add0460cf1a6f852f0a721af17384e13"
 
diff --git 
a/meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch
 
b/meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch
deleted file mode 100644
index 83c4782a61..00
--- 
a/meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 667b9ede638677fb37911306937ea62f05897581 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin 
-Date: Mon, 18 Oct 2021 15:55:59 +0200
-Subject: [PATCH] is_debianlike(): always return False
-
-Otherwise, host contamination happens.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin 

- mesonbuild/mesonlib/universal.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/mesonlib/universal.py 
b/mesonbuild/mesonlib/universal.py
-index d670d04..47d1b52 100644
 a/mesonbuild/mesonlib/universal.py
-+++ b/mesonbuild/mesonlib/universal.py
-@@ -651,7 +651,7 @@ def is_cygwin() -> bool:
- 
- 
- def is_debianlike() -> bool:
--return os.path.isfile('/etc/debian_version')
-+return False
- 
- 
- def is_dragonflybsd() -> bool:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158616): 
https://lists.openembedded.org/g/openembedded-core/message/158616
Mute This Topic: https://lists.openembedded.org/mt/87266402/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][PATCH v2] gmp: Add security fix for CVE-2021-43618

2021-11-22 Thread Ross Burton
Hi Pavel,

Close but you also need Upstream-Status, Signed-off-by, and CVE tags
in the patch.  You can see my version of this fix on the list, a few
minutes before yours. :)

Ross

On Mon, 22 Nov 2021 at 11:54, Pavel Zhukov  wrote:
>
> From: Pavel Zhukov 
>
> Fix mpz/inp_raw.c integer overflow and resultant buffer overflow via crafted 
> input,
> leading to a segmentation fault on 32-bit platforms.
>
> References: https://gmplib.org/repo/gmp-6.2/rev/561a9c25298e
> References: 
> https://gmplib.org/list-archives/gmp-bugs/2021-September/005077.html
> References: https://bugs.debian.org/994405
>
> Signed-off-by: Pavel Zhukov 
> ---
>  .../gmp/gmp/CVE-2021-43618.patch  | 25 +++
>  meta/recipes-support/gmp/gmp_6.2.1.bb |  1 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
>
> diff --git a/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch 
> b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
> new file mode 100644
> index 00..f741972439
> --- /dev/null
> +++ b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
> @@ -0,0 +1,25 @@
> +
> +# HG changeset patch
> +# User Marco Bodrato 
> +# Date 1634836009 -7200
> +# Node ID 561a9c25298e17bb01896801ff353546c6923dbd
> +# Parent  e1fd9db13b475209a864577237ea4b9105b3e96e
> +mpz/inp_raw.c: Avoid bit size overflows
> +
> +diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
> +--- a/mpz/inp_raw.cTue Dec 22 23:49:51 2020 +0100
>  b/mpz/inp_raw.cThu Oct 21 19:06:49 2021 +0200
> +@@ -88,8 +88,11 @@
> +
> +   abs_csize = ABS (csize);
> +
> ++  if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
> ++return 0; /* Bit size overflows */
> ++
> +   /* round up to a multiple of limbs */
> +-  abs_xsize = BITS_TO_LIMBS (abs_csize*8);
> ++  abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
> +
> +   if (abs_xsize != 0)
> + {
> +
> diff --git a/meta/recipes-support/gmp/gmp_6.2.1.bb 
> b/meta/recipes-support/gmp/gmp_6.2.1.bb
> index d5996abd00..7c12a97228 100644
> --- a/meta/recipes-support/gmp/gmp_6.2.1.bb
> +++ b/meta/recipes-support/gmp/gmp_6.2.1.bb
> @@ -12,6 +12,7 @@ SRC_URI = 
> "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
> file://use-includedir.patch \
> 
> file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
> file://0001-confiure.ac-Believe-the-cflags-from-environment.patch 
> \
> +   file://CVE-2021-43618.patch \
> "
>  SRC_URI[md5sum] = "28971fc21cf028042d4897f02fd355ea"
>  SRC_URI[sha256sum] = 
> "eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c"
> --
> 2.32.0
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158566): 
https://lists.openembedded.org/g/openembedded-core/message/158566
Mute This Topic: https://lists.openembedded.org/mt/87233112/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] gmp: fix CVE-2021-43618

2021-11-22 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 .../gmp/gmp/cve-2021-43618.patch  | 27 +++
 meta/recipes-support/gmp/gmp_6.2.1.bb |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 meta/recipes-support/gmp/gmp/cve-2021-43618.patch

diff --git a/meta/recipes-support/gmp/gmp/cve-2021-43618.patch 
b/meta/recipes-support/gmp/gmp/cve-2021-43618.patch
new file mode 100644
index 00..095fb21eaa
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/cve-2021-43618.patch
@@ -0,0 +1,27 @@
+CVE: CVE-2021-43618
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+# HG changeset patch
+# User Marco Bodrato 
+# Date 1634836009 -7200
+# Node ID 561a9c25298e17bb01896801ff353546c6923dbd
+# Parent  e1fd9db13b475209a864577237ea4b9105b3e96e
+mpz/inp_raw.c: Avoid bit size overflows
+
+diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
+--- a/mpz/inp_raw.cTue Dec 22 23:49:51 2020 +0100
 b/mpz/inp_raw.cThu Oct 21 19:06:49 2021 +0200
+@@ -88,8 +88,11 @@
+ 
+   abs_csize = ABS (csize);
+ 
++  if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
++return 0; /* Bit size overflows */
++
+   /* round up to a multiple of limbs */
+-  abs_xsize = BITS_TO_LIMBS (abs_csize*8);
++  abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
+ 
+   if (abs_xsize != 0)
+ {
diff --git a/meta/recipes-support/gmp/gmp_6.2.1.bb 
b/meta/recipes-support/gmp/gmp_6.2.1.bb
index d5996abd00..e61582afdf 100644
--- a/meta/recipes-support/gmp/gmp_6.2.1.bb
+++ b/meta/recipes-support/gmp/gmp_6.2.1.bb
@@ -12,6 +12,7 @@ SRC_URI = 
"https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
file://use-includedir.patch \

file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
+   file://cve-2021-43618.patch \
"
 SRC_URI[md5sum] = "28971fc21cf028042d4897f02fd355ea"
 SRC_URI[sha256sum] = 
"eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158561): 
https://lists.openembedded.org/g/openembedded-core/message/158561
Mute This Topic: https://lists.openembedded.org/mt/87232952/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] scripts/lnr: remove

2021-11-19 Thread Ross Burton
On Wed, 17 Nov 2021 at 18:24, Quentin Schulz  wrote:
> We could have a simple wrapper instead which would be a simple shell script:
>
> #!/bin/sh
>
> ln --relative --symbolic $1 $2
>
> To not require a change in layers?
> Not sure it's that important considering that one could do a simple sed 
> across all layers? Anyway just thought about that so shared it.

The point was requiring the change in layers so we're using standard
tools and not pointless scripts.  I sent patches for some larger
layers already so the fallout shouldn't be *too* bad.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158501): 
https://lists.openembedded.org/g/openembedded-core/message/158501
Mute This Topic: https://lists.openembedded.org/mt/87124801/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] how to "prune" dead sstate-cache?

2021-11-18 Thread Ross Burton
If you can say that you've touched all the sstate you'll need then the
find trick is sufficient.  I use it on our CI to prune any sstate that
hasn't been touched in a month, for example.

The script is more powerful and can selectively save or destroy
things, but can potentially be more complicated than just nuking
anything old.

Ross

On Thu, 18 Nov 2021 at 10:38, Robert P. J. Day  wrote:
>
>
>   assuming my (correct) understanding of sstate-cache is that, as time
> goes by, it just gets larger and larger, it will increasingly contain
> content that is of little value anymore, what is the simplest way to
> purge or prune entries that are no longer involved in any desired
> builds?
>
>   i'm guessing a simple way to do that is to first delete tmp/, then
> build any current targets/images, immediately followed by something
> like:
>
>   $ find sstate-cache -type f -atime +1 -delete
>
> is there anything fancier than that?
>
> rday
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158474): 
https://lists.openembedded.org/g/openembedded-core/message/158474
Mute This Topic: https://lists.openembedded.org/mt/87140377/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] scripts/lnr: remove

2021-11-17 Thread Ross Burton
lnr is a script that implements the same behaviour as 'ln --relative
--symlink', as at the time of creation --relative was only available in
coreutils 8.16 onwards which was too new for the older supported distros.

Now, however, everyone has a new enough coreutils, so we can remove this
script.

All users of lnr should be replaced with ln --relative --symbolic.

Signed-off-by: Ross Burton 
---
 scripts/lnr | 24 
 1 file changed, 24 deletions(-)
 delete mode 100755 scripts/lnr

diff --git a/scripts/lnr b/scripts/lnr
deleted file mode 100755
index a2ac4fec0f..00
--- a/scripts/lnr
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /usr/bin/env python3
-#
-# SPDX-License-Identifier: GPL-2.0-only
-#
-
-# Create a *relative* symlink, just like ln --relative does but without needing
-# coreutils 8.16.
-
-import sys, os
-
-if len(sys.argv) != 3:
-   print("$ lnr TARGET LINK_NAME")
-   sys.exit(1)
-
-target = sys.argv[1]
-linkname = sys.argv[2]
-
-if os.path.isabs(target):
-   if not os.path.isabs(linkname):
-  linkname = os.path.abspath(linkname)
-   start = os.path.dirname(linkname)
-   target = os.path.relpath(target, start)
-
-os.symlink(target, linkname)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158437): 
https://lists.openembedded.org/g/openembedded-core/message/158437
Mute This Topic: https://lists.openembedded.org/mt/87124801/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] vim: fix CVE-2021-3927 and CVE-2021-3928

2021-11-15 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 ...1-reading-character-past-end-of-line.patch | 62 ++
 ...eading-uninitialized-memory-when-giv.patch | 63 +++
 meta/recipes-support/vim/vim.inc  |  2 +
 3 files changed, 127 insertions(+)
 create mode 100644 
meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch
 create mode 100644 
meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch

diff --git 
a/meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch
 
b/meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch
new file mode 100644
index 00..28c61cd782
--- /dev/null
+++ 
b/meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch
@@ -0,0 +1,62 @@
+CVE: CVE-2021-3927
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From 93b427c6e729260d0700c3b2804ec153bc8284fa Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar 
+Date: Thu, 4 Nov 2021 15:10:11 +
+Subject: [PATCH] patch 8.2.3581: reading character past end of line
+
+Problem:Reading character past end of line.
+Solution:   Correct the cursor column.
+---
+ src/ex_docmd.c   |  1 +
+ src/testdir/test_put.vim | 12 
+ src/version.c|  2 ++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/src/ex_docmd.c b/src/ex_docmd.c
+index fde726477..59e245bee 100644
+--- a/src/ex_docmd.c
 b/src/ex_docmd.c
+@@ -6905,6 +6905,7 @@ ex_put(exarg_T *eap)
+   eap->forceit = TRUE;
+ }
+ curwin->w_cursor.lnum = eap->line2;
++check_cursor_col();
+ do_put(eap->regname, eap->forceit ? BACKWARD : FORWARD, 1L,
+  PUT_LINE|PUT_CURSLINE);
+ }
+diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim
+index 225ebd1f3..922e5b269 100644
+--- a/src/testdir/test_put.vim
 b/src/testdir/test_put.vim
+@@ -113,3 +113,15 @@ func Test_put_p_indent_visual()
+   call assert_equal('select that text', getline(2))
+   bwipe!
+ endfunc
++
++func Test_put_above_first_line()
++  new
++  let @" = 'text'
++  silent! normal 0o00
++  0put
++  call assert_equal('text', getline(1))
++  bwipe!
++endfunc
++
++
++" vim: shiftwidth=2 sts=2 expandtab
+diff --git a/src/version.c b/src/version.c
+index a9e8be0e7..df4ec9a47 100644
+--- a/src/version.c
 b/src/version.c
+@@ -742,6 +742,8 @@ static char *(features[]) =
+ 
+ static int included_patches[] =
+ {   /* Add new patch number below this line */
++/**/
++3581,
+ /**/
+ 3564,
+ /**/
diff --git 
a/meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch
 
b/meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch
new file mode 100644
index 00..d117a98893
--- /dev/null
+++ 
b/meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch
@@ -0,0 +1,63 @@
+CVE: CVE-2021-3928
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From ade0f0481969f1453c60e7c8354b00dfe4238739 Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar 
+Date: Thu, 4 Nov 2021 15:46:05 +
+Subject: [PATCH] patch 8.2.3582: reading uninitialized memory when giving
+ spell suggestions
+
+Problem:Reading uninitialized memory when giving spell suggestions.
+Solution:   Check that preword is not empty.
+---
+ src/spellsuggest.c | 2 +-
+ src/testdir/test_spell.vim | 8 
+ src/version.c  | 2 ++
+ 3 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/spellsuggest.c b/src/spellsuggest.c
+index 9d6df7930..8615d5280 100644
+--- a/src/spellsuggest.c
 b/src/spellsuggest.c
+@@ -1600,7 +1600,7 @@ suggest_trie_walk(
+   // char, e.g., "thes," -> "these".
+   p = fword + sp->ts_fidx;
+   MB_PTR_BACK(fword, p);
+-  if (!spell_iswordp(p, curwin))
++  if (!spell_iswordp(p, curwin) && *preword != NUL)
+   {
+   p = preword + STRLEN(preword);
+   MB_PTR_BACK(preword, p);
+diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
+index 79fb8927c..e435e9172 100644
+--- a/src/testdir/test_spell.vim
 b/src/testdir/test_spell.vim
+@@ -498,6 +498,14 @@ func Test_spell_screendump()
+   call delete('XtestSpell')
+ endfunc
+ 
++func Test_spell_single_word()
++  new
++  silent! norm 0R00
++  spell! ßÂ
++  silent 0norm 0r$ Dvz=
++  bwipe!
++endfunc
++
+ let g:test_data_aff1 = [
+   \"SET ISO8859-1",
+   \"TRY 
esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ",
+diff --git a/src/version.c b/src/version.c
+index df4ec9a47..e1bc0d09b 100644
+--- a/src/version.c
 b/src/version.c
+@@ -742,6 +742,8 @@ static char *(f

[OE-core] [PATCH 3/6] dtc: add PACKAGECONFIGs for tools and yaml

2021-11-12 Thread Ross Burton
Leave yaml off by default.

Signed-off-by: Ross Burton 
---
 meta/recipes-kernel/dtc/dtc_1.6.1.bb | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/dtc/dtc_1.6.1.bb 
b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
index 44293cf4ff..6365f73e10 100644
--- a/meta/recipes-kernel/dtc/dtc_1.6.1.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
@@ -3,7 +3,6 @@ HOMEPAGE = "https://devicetree.org/;
 DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the 
Open-Firmware-like device tree used by PowerPC kernels."
 SECTION = "bootloader"
 LICENSE = "GPLv2 | BSD-2-Clause"
-DEPENDS = "flex-native bison-native"
 
 LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
@@ -19,9 +18,12 @@ inherit meson pkgconfig
 
 EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
 
+PACKAGECONFIG ??= "tools"
+PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native bison-native"
+PACKAGECONFIG[yaml] = "-Dyaml=enabled,-Dyaml=disabled,libyaml"
+
 PACKAGES =+ "${PN}-misc"
 FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
-
-RDEPENDS:${PN}-misc += "bash diffutils"
+RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash 
diffutils', '', d)}"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158224): 
https://lists.openembedded.org/g/openembedded-core/message/158224
Mute This Topic: https://lists.openembedded.org/mt/87006464/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/6] dtc: use Meson to build

2021-11-12 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 ...-Makefile-to-add-CFLAGS-not-override.patch | 36 ---
 .../recipes-kernel/dtc/dtc/make_install.patch | 26 --
 meta/recipes-kernel/dtc/dtc_1.6.1.bb  | 15 +++-
 3 files changed, 4 insertions(+), 73 deletions(-)
 delete mode 100644 
meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
 delete mode 100644 meta/recipes-kernel/dtc/dtc/make_install.patch

diff --git 
a/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
 
b/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
deleted file mode 100644
index a2deb12d4b..00
--- 
a/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From f0119060ef1b9bd80e2cae487df1e4aedffb0e9b Mon Sep 17 00:00:00 2001
-From: Oleksiy Obitotskyy 
-Date: Fri, 22 Jan 2021 09:12:48 +0200
-Subject: [PATCH] dtc: Fix Makefile to add CFLAGS not override
-
-Makefile override CFLAGS not extend them, so some of them
-missing. Sources builds out of kernel tree and probably not all
-options could be used (?). We need at least -fmacro-prefix-map/
-debug-prefix-map to eliminate absolute path in binaries.
-
-Upstream-Status: Pending
-Signed-off-by: Oleksiy Obitotskyy 

- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 35d936f..b5b13cf 100644
 a/Makefile
-+++ b/Makefile
-@@ -20,10 +20,10 @@ CONFIG_LOCALVERSION =
- # See libfdt_internal.h for details
- ASSUME_MASK ?= 0
- 
--CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
-+CPPFLAGS += -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
- WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
-   -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
--CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
-+CFLAGS += -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
- 
- BISON = bison
- LEX = flex
--- 
-2.25.1
-
diff --git a/meta/recipes-kernel/dtc/dtc/make_install.patch 
b/meta/recipes-kernel/dtc/dtc/make_install.patch
deleted file mode 100644
index ea9359e815..00
--- a/meta/recipes-kernel/dtc/dtc/make_install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001
-From: Saul Wold 
-Date: Thu, 3 Nov 2011 08:35:47 -0700
-Subject: [PATCH] dtc: Add patch to correctly install shared libraries and
-
-Upstream-Status: Inappropriate [configuration]
-

- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index d8ebc4f..f5e01be 100644
 a/Makefile
-+++ b/Makefile
-@@ -205,8 +205,8 @@ install-bin: all $(SCRIPTS)
- install-lib: all
-   @$(VECHO) INSTALL-LIB
-   $(INSTALL) -d $(DESTDIR)$(LIBDIR)
--  $(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
--  ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
-+  $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
-+  ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib))
-   ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
-   $(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
- 
diff --git a/meta/recipes-kernel/dtc/dtc_1.6.1.bb 
b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
index 979b610576..44293cf4ff 100644
--- a/meta/recipes-kernel/dtc/dtc_1.6.1.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
@@ -8,23 +8,16 @@ DEPENDS = "flex-native bison-native"
 LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
 
-SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
-   file://make_install.patch \
-   file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \
-   "
+SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master"
 SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81"
 
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)"
 
-EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
-
-inherit pkgconfig
-
 S = "${WORKDIR}/git"
 
-do_install () {
-   oe_runmake install
-}
+inherit meson pkgconfig
+
+EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
 
 PACKAGES =+ "${PN}-misc"
 FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158223): 
https://lists.openembedded.org/g/openembedded-core/message/158223
Mute This Topic: https://lists.openembedded.org/mt/87006461/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 6/6] ncurses: clean up pkgconfig install location

2021-11-12 Thread Ross Burton
These is now an option to set the pkg-config install location, instead of
injecting it into the install to override the detected location (which
is into the sysroot).

Signed-off-by: Ross Burton 
---
 meta/recipes-core/ncurses/ncurses.inc | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc 
b/meta/recipes-core/ncurses/ncurses.inc
index a0ecd8a80b..89642ea782 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -86,6 +86,7 @@ ncurses_configure() {
--with-termlib=${EX_TERMLIB} \
--enable-sigwinch \
--enable-pc-files \
+   --with-pkg-config-libdir=${libdir}/pkgconfig \
--disable-rpath-hack \
${EXCONFIG_ARGS} \
--with-manpage-format=normal \
@@ -156,10 +157,7 @@ do_test() {
 
 _install_opts = " install.libs install.man "
 
-_install_cfgs = "\
-  DESTDIR='${D}' \
-  PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
-"
+_install_cfgs = "DESTDIR='${D}'"
 
 do_install() {
 # Order of installation is important; widec installs a 'curses.h'
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158222): 
https://lists.openembedded.org/g/openembedded-core/message/158222
Mute This Topic: https://lists.openembedded.org/mt/87006458/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 5/6] ncurses: poll() works, but only on Linux

2021-11-12 Thread Ross Burton
ncurses does AC_TRY_RUN() to determine is poll() actually works. As that
doesn't work in cross-compiles, we seed it with 'yes'.

However, MinGW doesn't have a working poll(), so use a :linux override
so that this only applies to Linux builds.

The ncurses build now compiles but doesn't link in MinGW, which is a step
forwards at least.

Signed-off-by: Ross Burton 
---
 meta/recipes-core/ncurses/ncurses.inc | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc 
b/meta/recipes-core/ncurses/ncurses.inc
index e32a6d12f1..a0ecd8a80b 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -18,6 +18,7 @@ SRC_URI = 
"git://salsa.debian.org/debian/ncurses.git;protocol=https;branch=maste
 EXTRA_AUTORECONF = "-I m4"
 
 CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes"
+CACHED_CONFIGUREVARS:append:linux = " cf_cv_working_poll=yes"
 
 EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'"
 
@@ -98,10 +99,6 @@ ncurses_configure() {
 # patched autoconf213 to generate the configure script. This autoconf
 # is not available so that the shipped script will be used.
 do_configure() {
-# check does not work with cross-compiling and is generally
-# broken because it requires stdin to be pollable (which is
-# not the case for /dev/null redirections)
-export cf_cv_working_poll=yes
#Remove ${includedir} from CPPFLAGS, need for cross compile
sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158221): 
https://lists.openembedded.org/g/openembedded-core/message/158221
Mute This Topic: https://lists.openembedded.org/mt/87006457/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/6] dtc: merge .bb/.inc

2021-11-12 Thread Ross Burton
No reason for these to be split, so merge them.

Signed-off-by: Ross Burton 
---
 meta/recipes-kernel/dtc/dtc.inc  | 28 
 meta/recipes-kernel/dtc/dtc_1.6.1.bb | 28 ++--
 2 files changed, 26 insertions(+), 30 deletions(-)
 delete mode 100644 meta/recipes-kernel/dtc/dtc.inc

diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
deleted file mode 100644
index b8a6b34f0c..00
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Device Tree Compiler"
-HOMEPAGE = "https://devicetree.org/;
-DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the 
Open-Firmware-like device tree used by PowerPC kernels."
-SECTION = "bootloader"
-LICENSE = "GPLv2 | BSD-2-Clause"
-DEPENDS = "flex-native bison-native"
-
-SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
-   file://make_install.patch \
-   file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \
-   "
-
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)"
-
-EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
-
-inherit pkgconfig
-
-S = "${WORKDIR}/git"
-
-do_install () {
-   oe_runmake install
-}
-
-PACKAGES =+ "${PN}-misc"
-FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
-
-RDEPENDS:${PN}-misc += "bash diffutils"
diff --git a/meta/recipes-kernel/dtc/dtc_1.6.1.bb 
b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
index de9a46d3ef..979b610576 100644
--- a/meta/recipes-kernel/dtc/dtc_1.6.1.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
@@ -1,10 +1,34 @@
-require dtc.inc
+SUMMARY = "Device Tree Compiler"
+HOMEPAGE = "https://devicetree.org/;
+DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the 
Open-Firmware-like device tree used by PowerPC kernels."
+SECTION = "bootloader"
+LICENSE = "GPLv2 | BSD-2-Clause"
+DEPENDS = "flex-native bison-native"
 
 LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-   
file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
+
file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
 
+SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
+   file://make_install.patch \
+   file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \
+   "
 SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81"
 
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)"
+
+EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
+
+inherit pkgconfig
+
 S = "${WORKDIR}/git"
 
+do_install () {
+   oe_runmake install
+}
+
+PACKAGES =+ "${PN}-misc"
+FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
+
+RDEPENDS:${PN}-misc += "bash diffutils"
+
 BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158219): 
https://lists.openembedded.org/g/openembedded-core/message/158219
Mute This Topic: https://lists.openembedded.org/mt/87006455/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 4/6] dtc: fix mingw build

2021-11-12 Thread Ross Burton
Backport a patch to fix the build of fdtdump with mingw, which so the
tools now build successfully with mingw.

Signed-off-by: Ross Burton 
---
 ...tdump-fix-Werror-int-to-pointer-cast.patch | 40 +++
 meta/recipes-kernel/dtc/dtc_1.6.1.bb  |  3 +-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch

diff --git 
a/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch 
b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
new file mode 100644
index 00..4c3e34b1ff
--- /dev/null
+++ 
b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
@@ -0,0 +1,40 @@
+Fix the build of fdtdump with mingw.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 
+Date: Wed, 25 Aug 2021 16:13:50 +0400
+Subject: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With mingw64-gcc, the compiler complains with various warnings:
+error: cast from pointer to integer of different size 
[-Werror=pointer-to-int-cast]
+
+Signed-off-by: Marc-André Lureau 
+Message-Id: <20210825121350.213551-1-marcandre.lur...@redhat.com>
+Acked-by: Rob Herring 
+Signed-off-by: David Gibson 
+---
+ fdtdump.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fdtdump.c b/fdtdump.c
+index d9fb374..483f367 100644
+--- a/fdtdump.c
 b/fdtdump.c
+@@ -21,7 +21,7 @@
+ #define MAX_VERSION 17
+ 
+ #define ALIGN(x, a)   (((x) + ((a) - 1)) & ~((a) - 1))
+-#define PALIGN(p, a)  ((void *)(ALIGN((unsigned long)(p), (a
++#define PALIGN(p, a)  ((void *)(ALIGN((uintptr_t)(p), (a
+ #define GET_CELL(p)   (p += 4, *((const fdt32_t *)(p-4)))
+ 
+ static const char *tagname(uint32_t tag)
+-- 
+2.25.1
+
diff --git a/meta/recipes-kernel/dtc/dtc_1.6.1.bb 
b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
index 6365f73e10..2610b26a94 100644
--- a/meta/recipes-kernel/dtc/dtc_1.6.1.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
@@ -7,7 +7,8 @@ LICENSE = "GPLv2 | BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
 
-SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master"
+SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
+   file://0001-fdtdump-fix-Werror-int-to-pointer-cast.patch"
 SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81"
 
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158220): 
https://lists.openembedded.org/g/openembedded-core/message/158220
Mute This Topic: https://lists.openembedded.org/mt/87006456/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] insane: remove unrecognised option check for Meson

2021-11-12 Thread Ross Burton
Meson 0.60 onwards no longer simply warns when an unrecognised option is
passed, it errors out instead. This means we can remove the logic in
insane.bbclass to check for the warnings.

Signed-off-by: Ross Burton 
---
 meta/classes/insane.bbclass | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 1675adf6ac..27b1a00fb9 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1229,15 +1229,12 @@ Rerun configure task after fixing this."""
 ###
 # Check unrecognised configure options (with a white list)
 ###
-if bb.data.inherits_class("autotools", d) or 
bb.data.inherits_class("meson", d):
+if bb.data.inherits_class("autotools", d):
 bb.note("Checking configure output for unrecognised options")
 try:
 if bb.data.inherits_class("autotools", d):
 flag = "WARNING: unrecognized options:"
 log = os.path.join(d.getVar('B'), 'config.log')
-if bb.data.inherits_class("meson", d):
-flag = "WARNING: Unknown options:"
-log = os.path.join(d.getVar('T'), 'log.do_configure')
 output = subprocess.check_output(['grep', '-F', flag, 
log]).decode("utf-8").replace(', ', ' ').replace('"', '')
 options = set()
 for line in output.splitlines():
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158216): 
https://lists.openembedded.org/g/openembedded-core/message/158216
Mute This Topic: https://lists.openembedded.org/mt/87004466/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] [PATCHv2] recipe-graphics/waffle: Add depends on cmake-native

2021-11-11 Thread Ross Burton
> Maybe this?
> https://gitlab.freedesktop.org/mesa/waffle/-/blob/master/src/waffle/meson.build#L238

Well that's annoying that it needs cmake just to write a configuration file.

I suggest rewriting the commit message:

waffle: add explicit dependency to cmake-native

cmake-native can get pulled into the sysroot via dependencies, but it
is always needed:

| Program cmake found: NO
| ERROR: meson failed

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158198): 
https://lists.openembedded.org/g/openembedded-core/message/158198
Mute This Topic: https://lists.openembedded.org/mt/86987139/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] [PATCHv2] recipe-graphics/waffle: Add depends on cmake-native

2021-11-11 Thread Ross Burton
On Thu, 11 Nov 2021 at 17:07, Anibal Limon  wrote:
>
> Fixes,
>
>   ...
> File 
> "/home/builds/oe-rpb-master/build-410c/tmp-rpb-glibc/work/cortexa53-linaro-linux/waffle/1.7.0-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/mesonbuild/modules/cmake.py",
>  line 241, in detect_cmake
>   p, stdout, stderr = mesonlib.Popen_safe(cmakebin.get_command() + 
> ['--system-information', '-G', 'Ninja'])[0:3]
> File 
> "/home/builds/oe-rpb-master/build-410c/tmp-rpb-glibc/work/cortexa53-linaro-linux/waffle/1.7.0-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/mesonbuild/mesonlib/universal.py",
>  line 1397, in Popen_safe
>   p = subprocess.Popen(args, universal_newlines=True, close_fds=False,
> File 
> "/home/builds/oe-rpb-master/build-410c/tmp-rpb-glibc/work/cortexa53-linaro-linux/waffle/1.7.0-r0/recipe-sysroot-native/usr/lib/python3.10/subprocess.py",
>  line 966, in __init__
>   self._execute_child(args, executable, preexec_fn, close_fds,
> File 
> "/home/builds/oe-rpb-master/build-410c/tmp-rpb-glibc/work/cortexa53-linaro-linux/waffle/1.7.0-r0/recipe-sysroot-native/usr/lib/python3.10/subprocess.py",
>  line 1717, in _execute_child
>   and os.path.dirname(executable)
> File 
> "/home/builds/oe-rpb-master/build-410c/tmp-rpb-glibc/work/cortexa53-linaro-linux/waffle/1.7.0-r0/recipe-sysroot-native/usr/lib/python3.10/posixpath.py",
>  line 152, in dirname
>   p = os.fspath(p)
>   ...

But why does the Meson build want CMake?

> Not inherit cmake class because expects meson-log.txt,

Not inheriting the cmake class as then you're inheriting both cmake
and meson classes, and only one of those will be running the build.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158196): 
https://lists.openembedded.org/g/openembedded-core/message/158196
Mute This Topic: https://lists.openembedded.org/mt/86987139/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] dtc: use Meson to build

2021-11-11 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 meta/recipes-kernel/dtc/dtc.inc | 16 
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
index b8a6b34f0c..adee8d5b4a 100644
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ b/meta/recipes-kernel/dtc/dtc.inc
@@ -5,22 +5,14 @@ SECTION = "bootloader"
 LICENSE = "GPLv2 | BSD-2-Clause"
 DEPENDS = "flex-native bison-native"
 
-SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
-   file://make_install.patch \
-   file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \
-   "
-
+SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)"
 
-EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
-
-inherit pkgconfig
-
 S = "${WORKDIR}/git"
 
-do_install () {
-   oe_runmake install
-}
+inherit meson pkgconfig
+
+EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
 
 PACKAGES =+ "${PN}-misc"
 FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158174): 
https://lists.openembedded.org/g/openembedded-core/message/158174
Mute This Topic: https://lists.openembedded.org/mt/86980186/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] meta: use ln -rs instead of lnr

2021-11-10 Thread Ross Burton
lnr is a script in oe-core that creates relative symlinks, with the same
behaviour as `ln --relative --symlink`.  It was added back in 2014[1] as
not all of the supported host distributions at the time shipped
coreutils 8.16, the first release with --relative.

However the oldest coreutils release in the supported distributions is
now 8.22 in CentOS 7, so lnr can be deprecated and users switched to ln.

[1] 6ae3b85eaffd1b0b6914422e8de7c1230723157d

Signed-off-by: Ross Burton 
---
 meta/classes/image.bbclass | 10 +-
 meta/classes/populate_sdk_ext.bbclass  |  4 ++--
 meta/recipes-core/glibc/glibc-package.inc  |  4 ++--
 .../images/build-appliance-image_15.0.0.bb |  2 +-
 meta/recipes-core/musl/gcompat_git.bb  |  2 +-
 meta/recipes-core/musl/musl_git.bb |  2 +-
 meta/recipes-core/ncurses/ncurses.inc  |  4 ++--
 meta/recipes-core/os-release/os-release.bb |  2 +-
 meta/recipes-devtools/dnf/dnf_4.10.0.bb|  4 ++--
 meta/recipes-devtools/pkgconf/pkgconf_1.8.0.bb |  2 +-
 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb   |  2 +-
 meta/recipes-kernel/kmod/kmod_git.bb   |  4 ++--
 meta/recipes-kernel/linux/kernel-devsrc.bb |  2 +-
 13 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2fa69a40d1..6c759fdf70 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -622,20 +622,20 @@ deltask do_package_write_rpm
 create_merged_usr_symlinks() {
 root="$1"
 install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
-lnr $root${base_bindir} $root/bin
-lnr $root${base_sbindir} $root/sbin
-lnr $root${base_libdir} $root/${baselib}
+ln -rs $root${base_bindir} $root/bin
+ln -rs $root${base_sbindir} $root/sbin
+ln -rs $root${base_libdir} $root/${baselib}
 
 if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
install -d $root${nonarch_base_libdir}
-   lnr $root${nonarch_base_libdir} $root/lib
+   ln -rs $root${nonarch_base_libdir} $root/lib
 fi
 
 # create base links for multilibs
 multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
 for d in $multi_libdirs; do
 install -d $root${exec_prefix}/$d
-lnr $root${exec_prefix}/$d $root/$d
+ln -rs $root${exec_prefix}/$d $root/$d
 done
 }
 
diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index 9187f53f13..ef93b6a826 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -626,7 +626,7 @@ install_tools() {
for script in $scripts; do
for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} 
-maxdepth 1 -executable -name "$script"`; do

targetscriptfn="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/$(basename 
$scriptfn)"
-   test -e ${targetscriptfn} || lnr ${scriptfn} 
${targetscriptfn}
+   test -e ${targetscriptfn} || ln -rs ${scriptfn} 
${targetscriptfn}
done
done
# We can't use the same method as above because files in the sysroot 
won't exist at this point
@@ -634,7 +634,7 @@ install_tools() {
unfsd_path="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd"
if [ "${SDK_INCLUDE_TOOLCHAIN}" = "1" -a ! -e $unfsd_path ] ; then

binrelpath=${@os.path.relpath(d.getVar('STAGING_BINDIR_NATIVE'), 
d.getVar('TMPDIR'))}
-   lnr ${SDK_OUTPUT}/${SDKPATH}/tmp/$binrelpath/unfsd $unfsd_path
+   ln -rs ${SDK_OUTPUT}/${SDKPATH}/tmp/$binrelpath/unfsd 
$unfsd_path
fi
touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
 
diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 571ae7ae09..54e2a08906 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -119,8 +119,8 @@ do_install() {
ln -s ${@oe.path.relative('${root_prefix}/lib', 
'${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \
${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}
fi
-lnr ${D}${base_libdir}/libpthread.so.0 ${D}${libdir}/libpthread.so
-lnr ${D}${base_libdir}/librt.so.1 ${D}${libdir}/librt.so
+ln -rs ${D}${base_libdir}/libpthread.so.0 ${D}${libdir}/libpthread.so
+ln -rs ${D}${base_libdir}/librt.so.1 ${D}${libdir}/librt.so
 }
 
 def get_libc_fpu_setting(bb, d):
diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb 
b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 94cafdbbe4..8cac636581 100644
--- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb

[OE-core] [PATCH] vim: add patch number to CVE-2021-3778 patch

2021-11-10 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 .../vim/files/CVE-2021-3778.patch | 37 +--
 1 file changed, 26 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-support/vim/files/CVE-2021-3778.patch 
b/meta/recipes-support/vim/files/CVE-2021-3778.patch
index 769a7a07ac..544af04458 100644
--- a/meta/recipes-support/vim/files/CVE-2021-3778.patch
+++ b/meta/recipes-support/vim/files/CVE-2021-3778.patch
@@ -1,4 +1,4 @@
-From eb41373c8c88b0789e5cf04669d6116f9a199264 Mon Sep 17 00:00:00 2001
+From 6d351cec5b97cb72b226d03bd727e453a235ed8d Mon Sep 17 00:00:00 2001
 From: Minjae Kim 
 Date: Sun, 26 Sep 2021 23:48:00 +
 Subject: [PATCH] patch 8.2.3409: reading beyond end of line with invalid utf-8
@@ -10,16 +10,18 @@ Solution: Check for NUL when advancing.
 Upstream-Status: Accepted 
[https://github.com/vim/vim/commit/65b605665997fad54ef39a93199e305af2fe4d7f]
 CVE: CVE-2021-3778
 Signed-off-by: Minjae Kim 
+
 ---
  src/regexp_nfa.c | 3 ++-
  src/testdir/test_regexp_utf8.vim | 7 +++
- 2 files changed, 9 insertions(+), 1 deletion(-)
+ src/version.c| 2 ++
+ 3 files changed, 11 insertions(+), 1 deletion(-)
 
-Index: git/src/regexp_nfa.c
-===
 git.orig/src/regexp_nfa.c
-+++ git/src/regexp_nfa.c
-@@ -5455,7 +5455,8 @@ find_match_text(colnr_T startcol, int re
+diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
+index fb512f961..ace83a1a3 100644
+--- a/src/regexp_nfa.c
 b/src/regexp_nfa.c
+@@ -5455,7 +5455,8 @@ find_match_text(colnr_T startcol, int regstart, char_u 
*match_text)
match = FALSE;
break;
}
@@ -29,10 +31,10 @@ Index: git/src/regexp_nfa.c
}
if (match
// check that no composing char follows
-Index: git/src/testdir/test_regexp_utf8.vim
-===
 git.orig/src/testdir/test_regexp_utf8.vim
-+++ git/src/testdir/test_regexp_utf8.vim
+diff --git a/src/testdir/test_regexp_utf8.vim 
b/src/testdir/test_regexp_utf8.vim
+index 19ff882be..e0665818b 100644
+--- a/src/testdir/test_regexp_utf8.vim
 b/src/testdir/test_regexp_utf8.vim
 @@ -215,3 +215,10 @@ func Test_optmatch_toolong()
set re=0
  endfunc
@@ -44,3 +46,16 @@ Index: git/src/testdir/test_regexp_utf8.vim
 +  bwipe!
 +  call delete('Xinvalid')
 +endfunc
+diff --git a/src/version.c b/src/version.c
+index 8912f6215..85bdfc601 100644
+--- a/src/version.c
 b/src/version.c
+@@ -742,6 +742,8 @@ static char *(features[]) =
+ 
+ static int included_patches[] =
+ {   /* Add new patch number below this line */
++/**/
++3409,
+ /**/
+ 3402,
+ /**/
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158062): 
https://lists.openembedded.org/g/openembedded-core/message/158062
Mute This Topic: https://lists.openembedded.org/mt/86954113/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] vim: fix CVE-2021-3796, CVE-2021-3872, and CVE-2021-3875

2021-11-09 Thread Ross Burton
Backport patches from upstream to fix these CVEs.

Signed-off-by: Ross Burton 
---
 ...28-using-freed-memory-when-replacing.patch | 83 
 ...llegal-memory-access-if-buffer-name-.patch | 86 
 ...ml_get-error-after-search-with-range.patch | 72 ++
 ...nvalid-memory-access-when-scrolling-.patch | 97 +++
 meta/recipes-support/vim/vim.inc  |  8 +-
 5 files changed, 344 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-support/vim/files/0002-patch-8.2.3428-using-freed-memory-when-replacing.patch
 create mode 100644 
meta/recipes-support/vim/files/0003-patch-8.2.3487-illegal-memory-access-if-buffer-name-.patch
 create mode 100644 
meta/recipes-support/vim/files/0004-patch-8.2.3489-ml_get-error-after-search-with-range.patch
 create mode 100644 
meta/recipes-support/vim/files/0005-patch-8.2.3564-invalid-memory-access-when-scrolling-.patch

diff --git 
a/meta/recipes-support/vim/files/0002-patch-8.2.3428-using-freed-memory-when-replacing.patch
 
b/meta/recipes-support/vim/files/0002-patch-8.2.3428-using-freed-memory-when-replacing.patch
new file mode 100644
index 00..ecfae0301e
--- /dev/null
+++ 
b/meta/recipes-support/vim/files/0002-patch-8.2.3428-using-freed-memory-when-replacing.patch
@@ -0,0 +1,83 @@
+CVE: CVE-2021-3796
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From 1160e5f74b229336502fc376416f21108d36cfc2 Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar 
+Date: Sat, 11 Sep 2021 21:14:20 +0200
+Subject: [PATCH] patch 8.2.3428: using freed memory when replacing
+
+Problem:Using freed memory when replacing. (Dhiraj Mishra)
+Solution:   Get the line pointer after calling ins_copychar().
+---
+ src/normal.c  | 10 +++---
+ src/testdir/test_edit.vim | 14 ++
+ src/version.c |  2 ++
+ 3 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/src/normal.c b/src/normal.c
+index c4963e621..d6333b948 100644
+--- a/src/normal.c
 b/src/normal.c
+@@ -5009,19 +5009,23 @@ nv_replace(cmdarg_T *cap)
+   {
+   /*
+* Get ptr again, because u_save and/or showmatch() will have
+-   * released the line.  At the same time we let know that the
+-   * line will be changed.
++   * released the line.  This may also happen in ins_copychar().
++   * At the same time we let know that the line will be changed.
+*/
+-  ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
+   if (cap->nchar == Ctrl_E || cap->nchar == Ctrl_Y)
+   {
+ int c = ins_copychar(curwin->w_cursor.lnum
+  + (cap->nchar == Ctrl_Y ? -1 : 1));
++
++ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
+ if (c != NUL)
+   ptr[curwin->w_cursor.col] = c;
+   }
+   else
++  {
++  ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
+   ptr[curwin->w_cursor.col] = cap->nchar;
++  }
+   if (p_sm && msg_silent == 0)
+   showmatch(cap->nchar);
+   ++curwin->w_cursor.col;
+diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
+index 4e29e7fe1..f94e6c181 100644
+--- a/src/testdir/test_edit.vim
 b/src/testdir/test_edit.vim
+@@ -1519,3 +1519,17 @@ func Test_edit_noesckeys()
+   bwipe!
+   set esckeys
+ endfunc
++
++" Test for getting the character of the line below after "p"
++func Test_edit_put_CTRL_E()
++  set encoding=latin1
++  new
++  let @" = ''
++  sil! norm orggRx
++  sil! norm pr
++  call assert_equal(['r', 'r'], getline(1, 2))
++  bwipe!
++  set encoding=utf-8
++endfunc
++
++" vim: shiftwidth=2 sts=2 expandtab
+diff --git a/src/version.c b/src/version.c
+index 85bdfc601..1046993d6 100644
+--- a/src/version.c
 b/src/version.c
+@@ -742,6 +742,8 @@ static char *(features[]) =
+ 
+ static int included_patches[] =
+ {   /* Add new patch number below this line */
++/**/
++3428,
+ /**/
+ 3409,
+ /**/
diff --git 
a/meta/recipes-support/vim/files/0003-patch-8.2.3487-illegal-memory-access-if-buffer-name-.patch
 
b/meta/recipes-support/vim/files/0003-patch-8.2.3487-illegal-memory-access-if-buffer-name-.patch
new file mode 100644
index 00..576664f436
--- /dev/null
+++ 
b/meta/recipes-support/vim/files/0003-patch-8.2.3487-illegal-memory-access-if-buffer-name-.patch
@@ -0,0 +1,86 @@
+CVE: CVE-2021-3872
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From 61629ea24a2fff1f89c37479d3fb52f17c3480fc Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar 
+Date: Fri, 8 Oct 2021 18:39:28 +0100
+Subject: [PATCH] patch 8.2.3487: illegal memory access if buffer name is very
+ long
+
+Problem:Illegal memory access if buffer name is very long.
+Solution:   Ma

[OE-core] [PATCH] scons: support out-of-tree builds

2021-11-05 Thread Ross Burton
SCons has a slightly unusual implementation of out-of-tree builds where
there is no standard way of doing it. However, if a recipe sets B to
the idiomatic ${WORKDIR}/build and passes the right arguments so that this
is used then scons will fail as it is trying to find the SConstruct file
in ${B} not ${S}.

Always pass --directory=${S} to scons so that the SConstruct file can be
found, and don't call --clean if out-of-tree builds are being used as
we would have just deleted the entire build tree already.

Signed-off-by: Ross Burton 
---
 meta/classes/scons.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/scons.bbclass b/meta/classes/scons.bbclass
index 4f3ae502ef..80f8382107 100644
--- a/meta/classes/scons.bbclass
+++ b/meta/classes/scons.bbclass
@@ -5,9 +5,9 @@ DEPENDS += "python3-scons-native"
 EXTRA_OESCONS ?= ""
 
 do_configure() {
-   if [ -n "${CONFIGURESTAMPFILE}" ]; then
+   if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
if [ -e "${CONFIGURESTAMPFILE}" -a "`cat 
${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
-   ${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} 
prefix=${prefix} ${EXTRA_OESCONS}
+   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean 
PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
fi
 
mkdir -p `dirname ${CONFIGURESTAMPFILE}`
@@ -16,12 +16,12 @@ do_configure() {
 }
 
 scons_do_compile() {
-   ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} 
prefix=${prefix} ${EXTRA_OESCONS} || \
+   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} 
PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
die "scons build execution failed."
 }
 
 scons_do_install() {
-   ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} 
PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
+   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} 
install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} 
install || \
die "scons install execution failed."
 }
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157912): 
https://lists.openembedded.org/g/openembedded-core/message/157912
Mute This Topic: https://lists.openembedded.org/mt/86845618/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] meson: set objcopy in the cross and native toolchain files

2021-11-04 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 meta/classes/meson.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index da58cb4bec..4ba70de3dc 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -48,6 +48,7 @@ ar = ${@meson_array('AR', d)}
 nm = ${@meson_array('NM', d)}
 strip = ${@meson_array('STRIP', d)}
 readelf = ${@meson_array('READELF', d)}
+objcopy = ${@meson_array('OBJCOPY', d)}
 pkgconfig = 'pkg-config'
 llvm-config = 'llvm-config${LLVMVERSION}'
 cups-config = 'cups-config'
@@ -85,6 +86,7 @@ ar = ${@meson_array('BUILD_AR', d)}
 nm = ${@meson_array('BUILD_NM', d)}
 strip = ${@meson_array('BUILD_STRIP', d)}
 readelf = ${@meson_array('BUILD_READELF', d)}
+objcopy = ${@meson_array('BUILD_OBJCOPY', d)}
 pkgconfig = 'pkg-config-native'
 
 [built-in options]
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157843): 
https://lists.openembedded.org/g/openembedded-core/message/157843
Mute This Topic: https://lists.openembedded.org/mt/86815859/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 11/14] libx11-compose-data: set precise BSD license

2021-11-04 Thread Ross Burton
Sorry, missed this email.

I copied the license from libx11, as it is the same tarball.  It was
Joshua Watt who introduced the expanded licenses in
44fd2aa731956fe0a0f74d36959c88b0b87adab5.

Ross

On Thu, 4 Nov 2021 at 11:19, Peter Kjellerstedt
 wrote:
>
> Ross: any comment to my question below?
>
> > -Original Message-
> > From: openembedded-core@lists.openembedded.org  > c...@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > Sent: den 28 oktober 2021 17:44
> > To: Ross Burton 
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH 11/14] libx11-compose-data: set precise BSD
> > license
> >
> > > -Original Message-
> > > From: openembedded-core@lists.openembedded.org  > > c...@lists.openembedded.org> On Behalf Of Ross Burton
> > > Sent: den 2 september 2021 18:25
> > > To: openembedded-core@lists.openembedded.org
> > > Subject: [OE-core] [PATCH 11/14] libx11-compose-data: set precise BSD
> > > license
> > >
> > > "BSD" is ambiguous, use the precise licenses BSD-2-Clause BSD-4-Clause.
> > >
> > > Signed-off-by: Ross Burton 
> > > ---
> > >  meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb
> > > b/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb
> > > index 7519b4c018d..e53ccc6aea8 100644
> > > --- a/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb
> > > +++ b/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb
> > > @@ -8,7 +8,7 @@ python () {
> > >
> > >  require xorg-lib-common.inc
> > >
> > > -LICENSE = "MIT & MIT-style & BSD"
> > > +LICENSE = "MIT & MIT-style & BSD-4-Clause & BSD-2-Clause"
> >
> > Why is this marked as BSD-4-Clause? Looking at the COPYING file and
> > searching the code I can find no trace of any license text with the
> > advertising clause from BSD-4-Clause. What am I missing?
> >
> > >  LIC_FILES_CHKSUM =
> > "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7"
> > >
> > >  SRC_URI[md5sum] = "c5fa5a86a20e3591bed6c046498d4b8f"
> > > --
> > > 2.25.1
> >
> > //Peter
>
> //Peter
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157842): 
https://lists.openembedded.org/g/openembedded-core/message/157842
Mute This Topic: https://lists.openembedded.org/mt/85331681/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] python3: silence DeprecationWarnings in python3-config

2021-11-02 Thread Ross Burton
On Tue, 2 Nov 2021 at 18:06, Khem Raj  wrote:
> So shouldn’t we fix python3-config to not use distutils and switch to setup 
> tools instead ?
>
> I am afraid that masking the warning will come biting soon when this is 
> turned into a hard error

That is a much bigger question that needs to be done, but most likely
involves rewriting large chunks of the cross integration as from what
I can tell, setuptools doesn't expose sysconfig (and we patch
distutils.sysconfig).

We can continue hacking the hack, until we solve this properly.  This
may happen as part of the pyo3 rust/python problem.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157814): 
https://lists.openembedded.org/g/openembedded-core/message/157814
Mute This Topic: https://lists.openembedded.org/mt/86772899/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] python3: silence DeprecationWarnings in python3-config

2021-11-02 Thread Ross Burton
Our patched python3-config uses distutils, but that will emit a
DeprecationWarning when imported.  This isn't useful when using the
output of python3-config to find include paths.

This isn't a huge problem typically as the warning goes to stderr, but
some build systems read both stdout and stderr.

Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/python/python3/python-config.patch | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python3/python-config.patch 
b/meta/recipes-devtools/python/python3/python-config.patch
index d0ddbbc7fd..c53f646af3 100644
--- a/meta/recipes-devtools/python/python3/python-config.patch
+++ b/meta/recipes-devtools/python/python3/python-config.patch
@@ -14,7 +14,6 @@ as appropriate.
 Upstream-Status: Inappropriate [Embedded Specific]
 
 Signed-off-by: Tyler Hall 
-:
 
 ---
  Misc/python-config.in | 10 +-
@@ -24,11 +23,13 @@ diff --git a/Misc/python-config.in b/Misc/python-config.in
 index ebd99da..13e57ae 100644
 --- a/Misc/python-config.in
 +++ b/Misc/python-config.in
-@@ -6,7 +6,7 @@
+@@ -6,7 +6,9 @@
  import getopt
  import os
  import sys
 -import sysconfig
++import warnings
++warnings.filterwarnings("ignore", category=DeprecationWarning)
 +from distutils import sysconfig
  
  valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157806): 
https://lists.openembedded.org/g/openembedded-core/message/157806
Mute This Topic: https://lists.openembedded.org/mt/86772899/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] openssl: fix builds on ARMv8 targets without Aarch64

2021-11-02 Thread Ross Burton
ARMv8 doesn't imply Aarch64, so correct a check that was making that
assumption.  This fixes the build on 32-bit ARMv8 targets such as
Cortex-A32.

Signed-off-by: Ross Burton 
---
 .../openssl/openssl/armv8-32bit.patch | 29 +++
 .../openssl/openssl_3.0.0.bb  |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/armv8-32bit.patch

diff --git a/meta/recipes-connectivity/openssl/openssl/armv8-32bit.patch 
b/meta/recipes-connectivity/openssl/openssl/armv8-32bit.patch
new file mode 100644
index 00..1935651be0
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/armv8-32bit.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/16951]
+Signed-off-by: Ross Burton 
+
+From 5118e96a3dbedde2523e7726fa34af30923a9add Mon Sep 17 00:00:00 2001
+From: Tom Cosgrove 
+Date: Tue, 2 Nov 2021 15:26:21 +
+Subject: [PATCH] Fix builds on Armv8 systems without AArch64
+
+This fixes "undefined reference to `aes_gcm_dec_128_kernel' in function
+`armv8_aes_gcm_decrypt'" and similar
+
+Fixes #16949
+---
+ include/crypto/aes_platform.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h
+index 015c3bd4ab91..e95ad5aa5de6 100644
+--- a/include/crypto/aes_platform.h
 b/include/crypto/aes_platform.h
+@@ -100,7 +100,7 @@ void AES_xts_decrypt(const unsigned char *inp, unsigned 
char *out, size_t len,
+ #define AES_PMULL_CAPABLE ((OPENSSL_armcap_P & ARMV8_PMULL) && 
(OPENSSL_armcap_P & ARMV8_AES))
+ #define AES_GCM_ENC_BYTES 512
+ #define AES_GCM_DEC_BYTES 512
+-#if __ARM_MAX_ARCH__>=8
++#if __ARM_MAX_ARCH__>=8 && defined(__aarch64__)
+ # define AES_gcm_encrypt armv8_aes_gcm_encrypt
+ # define AES_gcm_decrypt armv8_aes_gcm_decrypt
+ # define AES_GCM_ASM(gctx) ((gctx)->ctr==aes_v8_ctr32_encrypt_blocks && \
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb 
b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
index 67343bedcc..8852a51ca8 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
@@ -12,6 +12,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz 
\

file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
file://afalg.patch \
file://0001-Configure-do-not-tweak-mips-cflags.patch \
+   file://armv8-32bit.patch \
"
 
 SRC_URI:append:class-nativesdk = " \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157804): 
https://lists.openembedded.org/g/openembedded-core/message/157804
Mute This Topic: https://lists.openembedded.org/mt/86771073/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] patch.bbclass: don't repr() the exception, use str()

2021-11-02 Thread Ross Burton
repr() results in formatting characters such as extra quotation marks
which are pointless.

Signed-off-by: Ross Burton 
---
 meta/classes/patch.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 8de7025491..079ee33e3c 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -155,7 +155,7 @@ python patch_do_patch() {
 resolver.Resolve()
 except bb.BBHandledException as e:
 bb.utils.remove(process_tmpdir, True)
-bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % 
(parm['patchname'], patchdir, repr(e).replace("\\n", "\n")))
+bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % 
(parm['patchname'], patchdir, str(e).replace("\\n", "\n")))
 
 bb.utils.remove(process_tmpdir, True)
 del os.environ['TMPDIR']
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157775): 
https://lists.openembedded.org/g/openembedded-core/message/157775
Mute This Topic: https://lists.openembedded.org/mt/86764324/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 1/2] meta: Add explict branch to git SRC_URIs

2021-11-01 Thread Ross Burton
On Fri, 29 Oct 2021 at 13:58, Richard Purdie
 wrote:
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -657,7 +657,7 @@ APACHE_MIRROR = "https://archive.apache.org/dist;
> -GNOME_GIT = "git://gitlab.gnome.org/GNOME"
> +GNOME_GIT = "git://gitlab.gnome.org/GNOME;branch=master"

Late, as usual.  I think this should be dropped, people may well
(they're not, but they could) be using this as
${GNOME_GIT}/modulename, which this breaks.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157726): 
https://lists.openembedded.org/g/openembedded-core/message/157726
Mute This Topic: https://lists.openembedded.org/mt/86675726/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] strace: show test suite log on failure

2021-10-22 Thread Ross Burton
If the tests fail, dump the log so we can see the failures.

Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/strace/strace/run-ptest | 9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-devtools/strace/strace/run-ptest 
b/meta/recipes-devtools/strace/strace/run-ptest
index 3a51fb0be9..02bb91e07f 100755
--- a/meta/recipes-devtools/strace/strace/run-ptest
+++ b/meta/recipes-devtools/strace/strace/run-ptest
@@ -1,6 +1,15 @@
 #!/bin/sh
+
+set -u
+
 export TIMEOUT_DURATION=240
 chown nobody tests
 chown nobody tests/*
 chown nobody ../ptest
+
 su nobody -c "make -B -C tests -k test-suite.log"
+res=$?
+if [ $res -ne 0 ]; then
+cat tests/test-suite.log
+fi
+exit $res
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157295): 
https://lists.openembedded.org/g/openembedded-core/message/157295
Mute This Topic: https://lists.openembedded.org/mt/86510029/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] strace: show test suite log on failure

2021-10-22 Thread Ross Burton
You're right, it will.

I'm on a roll this week. :/

Ross

On Thu, 21 Oct 2021 at 22:53, Christopher Larson  wrote:
>
> I'm not familiar enough with the ptest-runner to say, but does the exit code 
> of run-ptest get used at all, or only the output in the expected format? Just 
> noticed this will suppress the non-zero exit code of run-ptest.
>
> On Thu, Oct 21, 2021 at 7:30 AM Ross Burton  wrote:
>>
>> If the tests fail, dump the log so we can see the failures.
>>
>> Signed-off-by: Ross Burton 
>> ---
>>  meta/recipes-devtools/strace/strace/run-ptest | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-devtools/strace/strace/run-ptest 
>> b/meta/recipes-devtools/strace/strace/run-ptest
>> index 3a51fb0be9..42ececdc4f 100755
>> --- a/meta/recipes-devtools/strace/strace/run-ptest
>> +++ b/meta/recipes-devtools/strace/strace/run-ptest
>> @@ -3,4 +3,4 @@ export TIMEOUT_DURATION=240
>>  chown nobody tests
>>  chown nobody tests/*
>>  chown nobody ../ptest
>> -su nobody -c "make -B -C tests -k test-suite.log"
>> +su nobody -c "make -B -C tests -k test-suite.log" || cat 
>> tests/test-suite.log
>> --
>> 2.25.1
>>
>>
>> 
>>
>
>
> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157294): 
https://lists.openembedded.org/g/openembedded-core/message/157294
Mute This Topic: https://lists.openembedded.org/mt/86490861/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 2/3] strace: handle loaded test systems

2021-10-21 Thread Ross Burton
Ha, idiot me.  I didn't see that bit of the regex and the test suite
takes so long I didn't actually test it...

Other opinions on whether to we skip the test or relax the bounds?

Ross

On Thu, 21 Oct 2021 at 16:10, Alexandre Belloni
 wrote:
>
> On 21/10/2021 15:20:04+0100, Ross Burton wrote:
> > Sigh.  I'll just remove the test entirely then.
>
> Actually, I think your regex is not correct because it also failed on
> qemux86. I believe you are missing a digit in the case it takes more
> than one second, before you had '1.[01]' then 5 digits, you changed it to
> '1.' and 5 digits, this should be 6
>
> >
> > Ross
> >
> > On Thu, 21 Oct 2021 at 14:48, Alexandre Belloni
> >  wrote:
> > >
> > > Hi Ross,
> > >
> > > On 19/10/2021 20:26:13+0100, Ross Burton wrote:
> > > > If the host is loaded when running the tests there is a good chance
> > > > that strace-T.test will fail, as it does a sleep(1) and checks that
> > > > the nanosleep() call lasted for 0.9-1.1 seconds.
> > > >
> > > > Relax the test so that the test passes if the call takes less than two
> > > > seconds.
> > > >
> > > > [ YOCTO #14596 ]
> > > >
> > > > Signed-off-by: Ross Burton 
> > > > ---
> > > >  meta/recipes-devtools/strace/strace/ptest-sleep.patch | 7 +++
> > > >  meta/recipes-devtools/strace/strace_5.14.bb   | 1 +
> > > >  2 files changed, 8 insertions(+)
> > > >  create mode 100644 
> > > > meta/recipes-devtools/strace/strace/ptest-sleep.patch
> > > >
> > > > diff --git a/meta/recipes-devtools/strace/strace/ptest-sleep.patch 
> > > > b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
> > > > new file mode 100644
> > > > index 00..5629dec319
> > > > --- /dev/null
> > > > +++ b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
> > > > @@ -0,0 +1,7 @@
> > > > +diff --git a/tests/strace-T.expected b/tests/strace-T.expected
> > > > +index 1ea020465..f78d3e2c8 100644
> > > > +--- a/tests/strace-T.expected
> > > >  b/tests/strace-T.expected
> > > > +@@ -1 +1 @@
> > > > +-nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 
> > > > <(1\.[01]|0\.9)[[:digit:]]{5}>
> > > > ++nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 
> > > > <(1\.|0\.9)[[:digit:]]{5}>
> > >
> > > Those two builds have the patch and reliably failed:
> > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/2425/steps/12/logs/stdio
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/2428/steps/12/logs/stdio
> > >
> > > > diff --git a/meta/recipes-devtools/strace/strace_5.14.bb 
> > > > b/meta/recipes-devtools/strace/strace_5.14.bb
> > > > index a81bda04ba..9ae1367337 100644
> > > > --- a/meta/recipes-devtools/strace/strace_5.14.bb
> > > > +++ b/meta/recipes-devtools/strace/strace_5.14.bb
> > > > @@ -13,6 +13,7 @@ SRC_URI = 
> > > > "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
> > > > file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
> > > > file://ptest-spacesave.patch \
> > > > file://0001-strace-fix-reproducibilty-issues.patch \
> > > > +   file://ptest-sleep.patch \
> > > > "
> > > >  SRC_URI[sha256sum] = 
> > > > "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73"
> > > >
> > > > --
> > > > 2.25.1
> > > >
> > >
> > > >
> > > > 
> > > >
> > >
> > >
> > > --
> > > Alexandre Belloni, co-owner and COO, Bootlin
> > > Embedded Linux and Kernel engineering
> > > https://bootlin.com
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157287): 
https://lists.openembedded.org/g/openembedded-core/message/157287
Mute This Topic: https://lists.openembedded.org/mt/86448553/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] strace: show test suite log on failure

2021-10-21 Thread Ross Burton
If the tests fail, dump the log so we can see the failures.

Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/strace/strace/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/strace/strace/run-ptest 
b/meta/recipes-devtools/strace/strace/run-ptest
index 3a51fb0be9..42ececdc4f 100755
--- a/meta/recipes-devtools/strace/strace/run-ptest
+++ b/meta/recipes-devtools/strace/strace/run-ptest
@@ -3,4 +3,4 @@ export TIMEOUT_DURATION=240
 chown nobody tests
 chown nobody tests/*
 chown nobody ../ptest
-su nobody -c "make -B -C tests -k test-suite.log"
+su nobody -c "make -B -C tests -k test-suite.log" || cat tests/test-suite.log
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157284): 
https://lists.openembedded.org/g/openembedded-core/message/157284
Mute This Topic: https://lists.openembedded.org/mt/86490861/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] strace: handle loaded test systems

2021-10-21 Thread Ross Burton
If the host is loaded when running the tests there is a good chance
that strace-T.test will fail, as it does a sleep(1) and checks that
the nanosleep() call lasted for 0.9-1.1 seconds.

As this isn't reliable when the host is loaded, disable the test.

[ YOCTO #14596 ]

Signed-off-by: Ross Burton 
---
 .../strace/strace/ptest-sleep.patch   | 20 +++
 meta/recipes-devtools/strace/strace_5.14.bb   |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta/recipes-devtools/strace/strace/ptest-sleep.patch

diff --git a/meta/recipes-devtools/strace/strace/ptest-sleep.patch 
b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
new file mode 100644
index 00..310e7140b6
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
@@ -0,0 +1,20 @@
+The strace-T test executes sleep(1) and verifies that the nanosleep() syscall
+lasted between 0.9 and 1.2 seconds, which is too unreliable when the system is
+under load.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton 
+
+diff --git a/tests/strace-T.test b/tests/strace-T.test
+index adca3e872..d4acfe9a2 100755
+--- a/tests/strace-T.test
 b/tests/strace-T.test
+@@ -9,6 +9,8 @@
+ 
+ . "${srcdir=.}/init.sh"
+ 
++skip_ "Test not reliable under load"
++
+ T_opt="${1:--T}"
+ 
+ run_prog ../sleep 0
diff --git a/meta/recipes-devtools/strace/strace_5.14.bb 
b/meta/recipes-devtools/strace/strace_5.14.bb
index a81bda04ba..9ae1367337 100644
--- a/meta/recipes-devtools/strace/strace_5.14.bb
+++ b/meta/recipes-devtools/strace/strace_5.14.bb
@@ -13,6 +13,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
file://ptest-spacesave.patch \
file://0001-strace-fix-reproducibilty-issues.patch \
+   file://ptest-sleep.patch \
"
 SRC_URI[sha256sum] = 
"901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157283): 
https://lists.openembedded.org/g/openembedded-core/message/157283
Mute This Topic: https://lists.openembedded.org/mt/86490860/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 2/3] strace: handle loaded test systems

2021-10-21 Thread Ross Burton
Sigh.  I'll just remove the test entirely then.

Ross

On Thu, 21 Oct 2021 at 14:48, Alexandre Belloni
 wrote:
>
> Hi Ross,
>
> On 19/10/2021 20:26:13+0100, Ross Burton wrote:
> > If the host is loaded when running the tests there is a good chance
> > that strace-T.test will fail, as it does a sleep(1) and checks that
> > the nanosleep() call lasted for 0.9-1.1 seconds.
> >
> > Relax the test so that the test passes if the call takes less than two
> > seconds.
> >
> > [ YOCTO #14596 ]
> >
> > Signed-off-by: Ross Burton 
> > ---
> >  meta/recipes-devtools/strace/strace/ptest-sleep.patch | 7 +++
> >  meta/recipes-devtools/strace/strace_5.14.bb   | 1 +
> >  2 files changed, 8 insertions(+)
> >  create mode 100644 meta/recipes-devtools/strace/strace/ptest-sleep.patch
> >
> > diff --git a/meta/recipes-devtools/strace/strace/ptest-sleep.patch 
> > b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
> > new file mode 100644
> > index 00..5629dec319
> > --- /dev/null
> > +++ b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
> > @@ -0,0 +1,7 @@
> > +diff --git a/tests/strace-T.expected b/tests/strace-T.expected
> > +index 1ea020465..f78d3e2c8 100644
> > +--- a/tests/strace-T.expected
> >  b/tests/strace-T.expected
> > +@@ -1 +1 @@
> > +-nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 
> > <(1\.[01]|0\.9)[[:digit:]]{5}>
> > ++nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 <(1\.|0\.9)[[:digit:]]{5}>
>
> Those two builds have the patch and reliably failed:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/2425/steps/12/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/2428/steps/12/logs/stdio
>
> > diff --git a/meta/recipes-devtools/strace/strace_5.14.bb 
> > b/meta/recipes-devtools/strace/strace_5.14.bb
> > index a81bda04ba..9ae1367337 100644
> > --- a/meta/recipes-devtools/strace/strace_5.14.bb
> > +++ b/meta/recipes-devtools/strace/strace_5.14.bb
> > @@ -13,6 +13,7 @@ SRC_URI = 
> > "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
> > file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
> > file://ptest-spacesave.patch \
> > file://0001-strace-fix-reproducibilty-issues.patch \
> > +   file://ptest-sleep.patch \
> > "
> >  SRC_URI[sha256sum] = 
> > "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73"
> >
> > --
> > 2.25.1
> >
>
> >
> > 
> >
>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157282): 
https://lists.openembedded.org/g/openembedded-core/message/157282
Mute This Topic: https://lists.openembedded.org/mt/86448553/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] oeqa/runtime: load modules using importlib

2021-10-20 Thread Ross Burton
Instead of using __import__() which is low-level and discouraged, use
importlib.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/runtime/context.py | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 3826f27642..7908ce1fd4 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -175,16 +175,12 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 # Search for and return a controller or None from given module name
 @staticmethod
 def _loadControllerFromModule(target, modulename):
-obj = None
-# import module, allowing it to raise import exception
-module = __import__(modulename, globals(), locals(), [target])
-# look for target class in the module, catching any exceptions as it
-# is valid that a module may not have the target class.
 try:
-obj = getattr(module, target)
-except:
-obj = None
-return obj
+import importlib
+module = importlib.import_module(modulename)
+return getattr(module, target)
+except AttributeError:
+return None
 
 @staticmethod
 def readPackagesManifest(manifest):
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157264): 
https://lists.openembedded.org/g/openembedded-core/message/157264
Mute This Topic: https://lists.openembedded.org/mt/86470866/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] oeqa/runtime: search sys.path explicitly for modules

2021-10-20 Thread Ross Burton
The controller module loading code needs to be told what directories
to search for modules via the target_modules_path keyword argument, which
is set to BBPATH.

However, as the actual module loading is done via importlib this relies
on the paths being on sys.path, which it is as base.bbclass puts each
layer's lib/ in sys.path.

Simplify the code by removing this indirection, and simply search
sys.path directly.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/runtime/context.py | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 7908ce1fd4..d707ab263a 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -5,6 +5,7 @@
 #
 
 import os
+import sys
 
 from oeqa.core.context import OETestContext, OETestContextExecutor
 from oeqa.core.target.ssh import OESSHTarget
@@ -119,8 +120,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 # XXX: Don't base your targets on this code it will be refactored
 # in the near future.
 # Custom target module loading
-target_modules_path = kwargs.get('target_modules_path', '')
-controller = 
OERuntimeTestContextExecutor.getControllerModule(target_type, 
target_modules_path)
+controller = 
OERuntimeTestContextExecutor.getControllerModule(target_type)
 target = controller(logger, target_ip, server_ip, **kwargs)
 
 return target
@@ -130,15 +130,15 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 # AttributeError raised if not found.
 # ImportError raised if a provided module can not be imported.
 @staticmethod
-def getControllerModule(target, target_modules_path):
-controllerslist = 
OERuntimeTestContextExecutor._getControllerModulenames(target_modules_path)
+def getControllerModule(target):
+controllerslist = 
OERuntimeTestContextExecutor._getControllerModulenames()
 controller = 
OERuntimeTestContextExecutor._loadControllerFromName(target, controllerslist)
 return controller
 
 # Return a list of all python modules in lib/oeqa/controllers for each
 # layer in bbpath
 @staticmethod
-def _getControllerModulenames(target_modules_path):
+def _getControllerModulenames():
 
 controllerslist = []
 
@@ -153,9 +153,8 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 else:
 raise RuntimeError("Duplicate controller module found for 
%s. Layers should create unique controller module names" % module)
 
-extpath = target_modules_path.split(':')
-for p in extpath:
-controllerpath = os.path.join(p, 'lib', 'oeqa', 'controllers')
+for p in sys.path:
+controllerpath = os.path.join(p, 'oeqa', 'controllers')
 if os.path.exists(controllerpath):
 add_controller_list(controllerpath)
 return controllerslist
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157265): 
https://lists.openembedded.org/g/openembedded-core/message/157265
Mute This Topic: https://lists.openembedded.org/mt/86470867/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] testimage: remove target_modules_path

2021-10-20 Thread Ross Burton
There is no need to pass target_modules_path anymore, so remove it.

Signed-off-by: Ross Burton 
---
 meta/classes/testimage.bbclass | 4 
 1 file changed, 4 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index a76e773853..bfd689865d 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -316,10 +316,6 @@ def testimage_main(d):
 if d.getVar("TESTIMAGE_BOOT_PATTERNS"):
 target_kwargs['boot_patterns'] = get_testimage_boot_patterns(d)
 
-# TODO: Currently BBPATH is needed for custom loading of targets.
-# It would be better to find these modules using instrospection.
-target_kwargs['target_modules_path'] = d.getVar('BBPATH')
-
 # hardware controlled targets might need further access
 target_kwargs['powercontrol_cmd'] = d.getVar("TEST_POWERCONTROL_CMD") or 
None
 target_kwargs['powercontrol_extra_args'] = 
d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or ""
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157266): 
https://lists.openembedded.org/g/openembedded-core/message/157266
Mute This Topic: https://lists.openembedded.org/mt/86470868/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] strace: remove obsolete patch

2021-10-19 Thread Ross Burton
This patch isn't needed with strace 5.14, which includes stdint.h
centrally.

Signed-off-by: Ross Burton 
---
 .../strace/strace/uintptr_t.patch | 27 ---
 meta/recipes-devtools/strace/strace_5.14.bb   |  1 -
 2 files changed, 28 deletions(-)
 delete mode 100644 meta/recipes-devtools/strace/strace/uintptr_t.patch

diff --git a/meta/recipes-devtools/strace/strace/uintptr_t.patch 
b/meta/recipes-devtools/strace/strace/uintptr_t.patch
deleted file mode 100644
index 088d685af0..00
--- a/meta/recipes-devtools/strace/strace/uintptr_t.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From a6c9366bfbcef6f3f4bb068b1f1a5623935b5013 Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Tue, 5 Nov 2019 20:05:08 -0800
-Subject: [PATCH] include stdint.h for getting uintptr_t definition
-
-fixes do_compile_ptest_base
-tests/fanotify_mark.c:191:23: error: 'uintptr_t' undeclared (first use in this 
function); did you mean 'intptr_t'?
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj 
-

- tests/fanotify_mark.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tests/fanotify_mark.c b/tests/fanotify_mark.c
-index aade643..de579f3 100644
 a/tests/fanotify_mark.c
-+++ b/tests/fanotify_mark.c
-@@ -18,6 +18,7 @@
- 
- # include 
- # include 
-+# include 
- # include 
- # include 
- 
diff --git a/meta/recipes-devtools/strace/strace_5.14.bb 
b/meta/recipes-devtools/strace/strace_5.14.bb
index 02a4843edf..a81bda04ba 100644
--- a/meta/recipes-devtools/strace/strace_5.14.bb
+++ b/meta/recipes-devtools/strace/strace_5.14.bb
@@ -12,7 +12,6 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://mips-SIGEMT.patch \
file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
file://ptest-spacesave.patch \
-   file://uintptr_t.patch \
file://0001-strace-fix-reproducibilty-issues.patch \
"
 SRC_URI[sha256sum] = 
"901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157203): 
https://lists.openembedded.org/g/openembedded-core/message/157203
Mute This Topic: https://lists.openembedded.org/mt/86448554/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] strace: handle loaded test systems

2021-10-19 Thread Ross Burton
If the host is loaded when running the tests there is a good chance
that strace-T.test will fail, as it does a sleep(1) and checks that
the nanosleep() call lasted for 0.9-1.1 seconds.

Relax the test so that the test passes if the call takes less than two
seconds.

[ YOCTO #14596 ]

Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/strace/strace/ptest-sleep.patch | 7 +++
 meta/recipes-devtools/strace/strace_5.14.bb   | 1 +
 2 files changed, 8 insertions(+)
 create mode 100644 meta/recipes-devtools/strace/strace/ptest-sleep.patch

diff --git a/meta/recipes-devtools/strace/strace/ptest-sleep.patch 
b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
new file mode 100644
index 00..5629dec319
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
@@ -0,0 +1,7 @@
+diff --git a/tests/strace-T.expected b/tests/strace-T.expected
+index 1ea020465..f78d3e2c8 100644
+--- a/tests/strace-T.expected
 b/tests/strace-T.expected
+@@ -1 +1 @@
+-nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}>
++nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 <(1\.|0\.9)[[:digit:]]{5}>
diff --git a/meta/recipes-devtools/strace/strace_5.14.bb 
b/meta/recipes-devtools/strace/strace_5.14.bb
index a81bda04ba..9ae1367337 100644
--- a/meta/recipes-devtools/strace/strace_5.14.bb
+++ b/meta/recipes-devtools/strace/strace_5.14.bb
@@ -13,6 +13,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
file://ptest-spacesave.patch \
file://0001-strace-fix-reproducibilty-issues.patch \
+   file://ptest-sleep.patch \
"
 SRC_URI[sha256sum] = 
"901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157202): 
https://lists.openembedded.org/g/openembedded-core/message/157202
Mute This Topic: https://lists.openembedded.org/mt/86448553/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] strace: remove TOOLCHAIN assignment

2021-10-19 Thread Ross Burton
Back in 2016 strace failed to link when using clang, but this isn't the
case anymore.

Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/strace/strace_5.14.bb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-devtools/strace/strace_5.14.bb 
b/meta/recipes-devtools/strace/strace_5.14.bb
index 9ae1367337..5e02df9145 100644
--- a/meta/recipes-devtools/strace/strace_5.14.bb
+++ b/meta/recipes-devtools/strace/strace_5.14.bb
@@ -53,4 +53,3 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\
 "
 
 BBCLASSEXTEND = "native"
-TOOLCHAIN = "gcc"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157201): 
https://lists.openembedded.org/g/openembedded-core/message/157201
Mute This Topic: https://lists.openembedded.org/mt/86448551/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 2/2] gawk: reduce strictness of the time test

2021-10-19 Thread Ross Burton
On Tue, 19 Oct 2021 at 13:04, Jacob Kroon  wrote:
> I would have removed the test. These load-sensitive tests are gonna fail
> occasionally, whatever limit you put there.

I'm split on this.

Removing the test obviously means that it can never fail, whereas a
timeout will fail given potentially huge load.  But the bounds on a
timeout could be sufficiently large (say, up to 10 seconds instead of
1) to be fairly sure that the underlying code is in fact still
working, which is better than not testing at all.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157189): 
https://lists.openembedded.org/g/openembedded-core/message/157189
Mute This Topic: https://lists.openembedded.org/mt/86437428/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] gawk: replace AR patch with upstreamed patch

2021-10-19 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 .../0001-Use-cross-AR-during-compile.patch| 47 +--
 1 file changed, 21 insertions(+), 26 deletions(-)

diff --git 
a/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch 
b/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch
index ca0d668ce9..be6dbe1e57 100644
--- a/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch
+++ b/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch
@@ -1,35 +1,30 @@
-From 207b94e37c84007b294e57878c913271aad544ef Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Wed, 11 Nov 2020 23:13:23 -0800
-Subject: [PATCH] Use cross AR during compile
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
 
-If AR is specifcied then it should be used instead of defaulting to 'ar'
-from host
+From 47dce6a7002a8d7b818c19d574d81327b769871b Mon Sep 17 00:00:00 2001
+From: "Arnold D. Robbins" 
+Date: Fri, 5 Jun 2020 13:14:54 +0300
+Subject: Allow for cross-compile version of ar.
 
-Upstream-Status: Pending
-Signed-off-by: Khem Raj 
 ---
- configure.ac | 7 +++
- 1 file changed, 7 insertions(+)
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+(limited to 'configure.ac')
 
 diff --git a/configure.ac b/configure.ac
-index 31364ab..4804f7b 100644
+index 31364ab8..8c256f21 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -92,6 +92,13 @@ GAWK_CANONICAL_HOST
- AC_USE_SYSTEM_EXTENSIONS
+@@ -105,6 +105,9 @@ AC_EXEEXT
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
  
- dnl checks for programs
-+m4_ifndef([AC_PROG_AR],[dnl
-+  AN_MAKEVAR([AR], [AC_PROG_AR])
-+  AN_PROGRAM([ar], [AC_PROG_AR])
-+  AC_DEFUN([AC_PROG_AR],
-+  [AC_CHECK_TOOL(AR, ar, :)])
-+])
-+AC_PROG_AR
- AC_PROG_EGREP
- AC_PROG_YACC
- AC_PROG_LN_S
++# support/ builds libsupport.a, allow for cross version of ar
++AM_PROG_AR
++
+ # This is mainly for my use during testing and development.
+ # Yes, it's a bit of a hack.
+ AC_MSG_CHECKING([for special development options])
 -- 
-2.29.2
-
+cgit v1.2.1
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157110): 
https://lists.openembedded.org/g/openembedded-core/message/157110
Mute This Topic: https://lists.openembedded.org/mt/86437429/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] gawk: reduce strictness of the time test

2021-10-19 Thread Ross Burton
The time.awk test does a sleep() and verifies that the actual delay is
close to the requested time. However on a loaded system the range of
acceptable durations is quite tight and will occasionally fail.

Solve this by increasing the range of acceptable delays slightly to
between 50% and 200% of the requested delay.

[ YOCTO #14371 ]

Signed-off-by: Ross Burton 
---
 .../gawk/gawk/test-time.patch | 22 +++
 meta/recipes-extended/gawk/gawk_5.1.0.bb  |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-extended/gawk/gawk/test-time.patch

diff --git a/meta/recipes-extended/gawk/gawk/test-time.patch 
b/meta/recipes-extended/gawk/gawk/test-time.patch
new file mode 100644
index 00..05a68c5faf
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/test-time.patch
@@ -0,0 +1,22 @@
+The test time.awk does a sleep() and checks that the real sleep duration is
+close to the expected duration.
+
+As currently our tests can run on a heavily loaded system, increase the range 
of
+a passing duration.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton 
+
+diff --git a/test/time.awk b/test/time.awk
+index 517377e2..ca81d92d 100644
+--- a/test/time.awk
 b/test/time.awk
+@@ -16,7 +16,7 @@ BEGIN {
+printf "sleep(%s) = %s\n",delta,sleep(delta)
+t1 = timecheck()
+slept = t1-t0
+-   if ((slept < 0.9*delta) || (slept > 1.3*delta))
++   if ((slept < 0.5*delta) || (slept > 2*delta))
+   printf "Warning: tried to sleep %.2f secs, but slept for %.2f secs\n",
+delta,slept
+ }
diff --git a/meta/recipes-extended/gawk/gawk_5.1.0.bb 
b/meta/recipes-extended/gawk/gawk_5.1.0.bb
index 3c801e8bcc..0961efa897 100644
--- a/meta/recipes-extended/gawk/gawk_5.1.0.bb
+++ b/meta/recipes-extended/gawk/gawk_5.1.0.bb
@@ -18,6 +18,7 @@ PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
 SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
file://run-ptest \
file://0001-Use-cross-AR-during-compile.patch \
+   file://test-time.patch \
 "
 
 SRC_URI[md5sum] = "f719bc9966df28e67fc6ebc405e7ea03"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157109): 
https://lists.openembedded.org/g/openembedded-core/message/157109
Mute This Topic: https://lists.openembedded.org/mt/86437428/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] testimage: fix unclosed testdata file

2021-10-15 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 meta/classes/testimage.bbclass | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index a76e773853..4db05a4af4 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -235,9 +235,10 @@ def testimage_main(d):
 
 tdname = "%s.testdata.json" % image_name
 try:
-td = json.load(open(tdname, "r"))
-except (FileNotFoundError) as err:
- bb.fatal('File %s Not Found. Have you built the image with 
INHERIT+="testimage" in the conf/local.conf?' % tdname)
+with open(tdname, "r") as f:
+td = json.load(f)
+except FileNotFoundError as err:
+bb.fatal('File %s not found (%s).\nHave you built the image with 
INHERIT += "testimage" in the conf/local.conf?' % (tdname, err))
 
 # Some variables need to be updates (mostly paths) with the
 # ones of the current environment because some tests require them.
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157006): 
https://lists.openembedded.org/g/openembedded-core/message/157006
Mute This Topic: https://lists.openembedded.org/mt/86354851/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] oe/utils: log exceptions in ThreadedWorker functions

2021-10-14 Thread Ross Burton
If the function a ThreadedWorker is executing raises an exception, don't
use print() as that mostly disappears.  Instead, output it to the logger.

This is done using bb.mainlogger.debug directly instead of bb.debug() as
this allows us to pass the exception instance directly, which is then
incorporated into the log stream.

Signed-off-by: Ross Burton 
---
 meta/lib/oe/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 238af314d1..cf65639647 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -508,7 +508,8 @@ class ThreadedWorker(Thread):
 try:
 func(self, *args, **kargs)
 except Exception as e:
-print(e)
+# Eat all exceptions
+bb.mainlogger.debug("Worker task raised %s" % e, exc_info=e)
 finally:
 self.tasks.task_done()
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156962): 
https://lists.openembedded.org/g/openembedded-core/message/156962
Mute This Topic: https://lists.openembedded.org/mt/86318529/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] sstate: don't silently handle all exceptions in sstate_checkhashes

2021-10-14 Thread Ross Burton
If checkstatus returns an exception we should silently handle
FetchError, as this means the fetch failed for 'normal' reasons such as
file not found.  However, other exceptions may be raised, and these
should be made visible.

Signed-off-by: Ross Burton 
---
 meta/classes/sstate.bbclass | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 701a19bc61..143819b898 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -983,10 +983,11 @@ def sstate_checkhashes(sq_data, d, siginfo=False, 
currentcount=0, summary=True,
 foundNet.add(tid)
 if tid in missed:
 missed.remove(tid)
-except:
+except bb.fetch2.FetchError as e:
 missed.add(tid)
-bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
-pass
+bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)" % 
(srcuri, e))
+except Exception as e:
+bb.error("SState: cannot test %s: %s" % (srcuri, e))
 if len(tasklist) >= min_tasks:
 bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - 
thread_worker.tasks.qsize()), d)
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156963): 
https://lists.openembedded.org/g/openembedded-core/message/156963
Mute This Topic: https://lists.openembedded.org/mt/86318531/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] linux-yocto: add libmpc-native to DEPENDS

2021-10-14 Thread Ross Burton
On Thu, 14 Oct 2021 at 10:21, Andrey Zhizhikin  wrote:
> It seems that GCC plugins are somehow disabled in SDK GCC, but Kernel
> build system checks them on the host, which does provide them. This
> leads to a false identification that plugins are enabled and leads to
> further build failures.
>
> This behavior came with commit 1e860048c53e ("gcc-plugins: simplify
> GCC plugin-dev capability test"), where previously build system ran an
> internal script to verify if plugins are present by running compile
> tests, but after this commit - it checks only if the folder containing
> plugins is there. This leads to the issue that when host GCC has the
> folder - plugins are enabled, but when later the compile pass is taken
> - it fails since the .so is not present in the SDK sysroot.

Urgh.

Can you provide a minimal reproducer for this?

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156960): 
https://lists.openembedded.org/g/openembedded-core/message/156960
Mute This Topic: https://lists.openembedded.org/mt/86092630/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] license.bbclass: implement ast.NodeVisitor.visit_Constant

2021-10-13 Thread Ross Burton
Since Python 3.8 visit_Num(), visit_Str() and so on are all deprecated
and replaced with visit_Constant.  We can't yet remove the deprecated
functions until we require 3.8, but we can implement visit_Constant to
silence the deprecation warnings.

Signed-off-by: Ross Burton 
---
 meta/classes/license.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 45d912741d..7a34e185c7 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -145,6 +145,10 @@ def find_license_files(d):
 find_license(node.s.replace("+", "").replace("*", ""))
 self.generic_visit(node)
 
+def visit_Constant(self, node):
+find_license(node.value.replace("+", "").replace("*", ""))
+self.generic_visit(node)
+
 def find_license(license_type):
 try:
 bb.utils.mkdirhier(gen_lic_dest)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156916): 
https://lists.openembedded.org/g/openembedded-core/message/156916
Mute This Topic: https://lists.openembedded.org/mt/86290215/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] oe/license: implement ast.NodeVisitor.visit_Constant

2021-10-13 Thread Ross Burton
Since Python 3.8 visit_Num(), visit_Str() and so on are all deprecated
and replaced with visit_Constant.  We can't yet remove the deprecated
functions until we require 3.8, but we can implement visit_Constant to
silence the deprecation warnings.

Signed-off-by: Ross Burton 
---
 meta/lib/oe/license.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 665d32ecbb..b5d378a549 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -74,6 +74,9 @@ class FlattenVisitor(LicenseVisitor):
 def visit_Str(self, node):
 self.licenses.append(node.s)
 
+def visit_Constant(self, node):
+self.licenses.append(node.value)
+
 def visit_BinOp(self, node):
 if isinstance(node.op, ast.BitOr):
 left = FlattenVisitor(self.choose_licenses)
@@ -227,6 +230,9 @@ class ListVisitor(LicenseVisitor):
 def visit_Str(self, node):
 self.licenses.add(node.s)
 
+def visit_Constant(self, node):
+self.licenses.add(node.value)
+
 def list_licenses(licensestr):
 """Simply get a list of all licenses mentioned in a license string.
Binary operators are not applied or taken into account in any way"""
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156917): 
https://lists.openembedded.org/g/openembedded-core/message/156917
Mute This Topic: https://lists.openembedded.org/mt/86290216/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][honister][master] curl: fix CVE-2021-22945 through -22947

2021-10-13 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 .../curl/curl/cve-2021-22945.patch|  34 ++
 .../curl/curl/cve-2021-22946.patch| 332 
 .../curl/curl/cve-2021-22947.patch| 355 ++
 meta/recipes-support/curl/curl_7.78.0.bb  |   3 +
 4 files changed, 724 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/cve-2021-22945.patch
 create mode 100644 meta/recipes-support/curl/curl/cve-2021-22946.patch
 create mode 100644 meta/recipes-support/curl/curl/cve-2021-22947.patch

diff --git a/meta/recipes-support/curl/curl/cve-2021-22945.patch 
b/meta/recipes-support/curl/curl/cve-2021-22945.patch
new file mode 100644
index 00..2cbe110332
--- /dev/null
+++ b/meta/recipes-support/curl/curl/cve-2021-22945.patch
@@ -0,0 +1,34 @@
+CVE: CVE-2021-22945
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From 92cb3059dab2f9ef3e6ea614dad5c86917d19807 Mon Sep 17 00:00:00 2001
+From: z2_ on hackerone <>
+Date: Tue, 24 Aug 2021 09:50:33 +0200
+Subject: [PATCH 1/3] mqtt: clear the leftovers pointer when sending succeeds
+
+CVE-2021-22945
+
+Bug: https://curl.se/docs/CVE-2021-22945.html
+---
+ lib/mqtt.c | 4 
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/mqtt.c b/lib/mqtt.c
+index f077e6c3d..fcd40b41e 100644
+--- a/lib/mqtt.c
 b/lib/mqtt.c
+@@ -128,6 +128,10 @@ static CURLcode mqtt_send(struct Curl_easy *data,
+ mq->sendleftovers = sendleftovers;
+ mq->nsend = nsend;
+   }
++  else {
++mq->sendleftovers = NULL;
++mq->nsend = 0;
++  }
+   return result;
+ }
+ 
+-- 
+2.25.1
+
diff --git a/meta/recipes-support/curl/curl/cve-2021-22946.patch 
b/meta/recipes-support/curl/curl/cve-2021-22946.patch
new file mode 100644
index 00..1a4b3e1144
--- /dev/null
+++ b/meta/recipes-support/curl/curl/cve-2021-22946.patch
@@ -0,0 +1,332 @@
+CVE: CVE-2021-22946
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From 089e18aefcee9b5093a96e9e1aa92751dde1f991 Mon Sep 17 00:00:00 2001
+From: Patrick Monnerat 
+Date: Wed, 8 Sep 2021 11:56:22 +0200
+Subject: [PATCH 2/3] ftp,imap,pop3: do not ignore --ssl-reqd
+
+In imap and pop3, check if TLS is required even when capabilities
+request has failed.
+
+In ftp, ignore preauthentication (230 status of server greeting) if TLS
+is required.
+
+Bug: https://curl.se/docs/CVE-2021-22946.html
+
+CVE-2021-22946
+---
+ lib/ftp.c   |  9 ---
+ lib/imap.c  | 24 --
+ lib/pop3.c  | 33 +++-
+ tests/data/Makefile.inc |  2 ++
+ tests/data/test984  | 56 +
+ tests/data/test985  | 54 +++
+ tests/data/test986  | 53 ++
+ 7 files changed, 195 insertions(+), 36 deletions(-)
+ create mode 100644 tests/data/test984
+ create mode 100644 tests/data/test985
+ create mode 100644 tests/data/test986
+
+diff --git a/lib/ftp.c b/lib/ftp.c
+index 1a699de59..08d18ca74 100644
+--- a/lib/ftp.c
 b/lib/ftp.c
+@@ -2681,9 +2681,12 @@ static CURLcode ftp_statemachine(struct Curl_easy *data,
+ /* we have now received a full FTP server response */
+ switch(ftpc->state) {
+ case FTP_WAIT220:
+-  if(ftpcode == 230)
+-/* 230 User logged in - already! */
+-return ftp_state_user_resp(data, ftpcode, ftpc->state);
++  if(ftpcode == 230) {
++/* 230 User logged in - already! Take as 220 if TLS required. */
++if(data->set.use_ssl <= CURLUSESSL_TRY ||
++   conn->bits.ftp_use_control_ssl)
++  return ftp_state_user_resp(data, ftpcode, ftpc->state);
++  }
+   else if(ftpcode != 220) {
+ failf(data, "Got a %03d ftp-server response when 220 was expected",
+   ftpcode);
+diff --git a/lib/imap.c b/lib/imap.c
+index ab4d412ee..efc0420ce 100644
+--- a/lib/imap.c
 b/lib/imap.c
+@@ -935,22 +935,18 @@ static CURLcode imap_state_capability_resp(struct 
Curl_easy *data,
+   line += wordlen;
+ }
+   }
+-  else if(imapcode == IMAP_RESP_OK) {
+-if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
+-  /* We don't have a SSL/TLS connection yet, but SSL is requested */
+-  if(imapc->tls_supported)
+-/* Switch to TLS connection now */
+-result = imap_perform_starttls(data, conn);
+-  else if(data->set.use_ssl == CURLUSESSL_TRY)
+-/* Fallback and carry on with authentication */
+-result = imap_perform_authentication(data, conn);
+-  else {
+-failf(data, "STARTTLS not supported.");
+-result = CURLE_USE_SSL_FAILED;
+-  }
++  else if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
++/* PREAUTH is not compatible with STARTTLS. */
++if(imapcode == IMAP_RESP_OK && imapc->tls_supported && !imapc->preauth) {
++  /* Switch to TLS connection now */
++  

Re: [OE-core] [PATCH 21/25] libsoup: add a 3.x recipe

2021-10-12 Thread Ross Burton
On Mon, 11 Oct 2021 at 10:41, Alexander Kanavin  wrote:
> +DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl nghttp2"

libxml2 was removed as a build dependency.

> +PROVIDES = "libsoup-3.0"

As they appear to be continuing the parallel installable theme, should
we just name the recipe libsoup-3.0 as we did with the 2.4 series?
Otherwise when a hypothetical 4.0 comes out, what is that called?

> +S = "${WORKDIR}/libsoup-${PV}"

Redundant if you keep PN as libsoup.

> +# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. 
> Disable by default.

Redundant comment, libsoup-gnome is entirely gone now.

> +EXTRA_OEMESON:append = " -Dvapi=disabled -Dtls_check=false"

Might be worth adding -Dtests=false to make that explicit.

> +# When built without gnome support, libsoup will contain only one shared lib
> +# and will therefore become subject to renaming by debian.bbclass. Prevent
> +# renaming in order to keep the package name consistent regardless of whether
> +# gnome support is enabled or disabled.
> +DEBIAN_NOAUTONAME:${PN} = "1"

Redundant, as above.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156863): 
https://lists.openembedded.org/g/openembedded-core/message/156863
Mute This Topic: https://lists.openembedded.org/mt/86232782/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] linux-yocto: add libmpc-native to DEPENDS

2021-10-07 Thread Ross Burton
On Wed, 6 Oct 2021 at 18:59, Khem Raj  wrote:
> Does it have to be native or target dependency ?

Native, as it builds compiler plugins for the host.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156708): 
https://lists.openembedded.org/g/openembedded-core/message/156708
Mute This Topic: https://lists.openembedded.org/mt/86092630/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] linux-yocto: add libmpc-native to DEPENDS

2021-10-06 Thread Ross Burton
I should have put this in the commit message, but here's the failure
when using an external toolchain:

2021-10-05 12:52:14 - INFO - | HOSTCXX
scripts/gcc-plugins/arm_ssp_per_task_plugin.so
2021-10-05 12:52:14 - INFO - | In file included from
/builds/engineering/yocto/meta-arm/work/build/tmp/work-shared/fvp-base-arm32/kernel-source/scripts/gcc-plugins/gcc-common.h:103,
2021-10-05 12:52:14 - INFO - | from
/builds/engineering/yocto/meta-arm/work/build/tmp/work-shared/fvp-base-arm32/kernel-source/scripts/gcc-plugins/arm_ssp_per_task_plugin.c:3:
02021-10-05 12:52:14 - INFO - |
/builds/persist/toolchains/gcc-arm-10.3-2021.07-aarch64-arm-none-linux-gnueabihf/bin/../lib/gcc/arm-none-linux-gnueabihf/10.3.1/plugin/include/builtins.h:23:10:
fatal error: mpc.h: No such file or directory
2021-10-05 12:52:14 - INFO - | #include 
2021-10-05 12:52:14 - INFO - | ^~~
2021-10-05 12:52:14 - INFO - | compilation terminated.

On Wed, 6 Oct 2021 at 11:12, Ross Burton  wrote:
>
> On Wed, 6 Oct 2021 at 11:10, Ross Burton  wrote:
> > This depends on CONFIG_GCC_PLUGINS which I don't believe is enabled in
> > any of the default configurations.  meta-arm builds a few kernels with
> > defconfig, which does.
>
> Sorry, brain still not warmed up yet.
>
> CONFIG_GCC_PLUGINS needs to be enabled, but the real difference is
> that using the normal GCC pulls libmpc into the sysroot via implicit
> dependencies.  If you use an external toolchain (like
> meta-arm-toolchain) this doesn't happen, and the dependency needs to
> be explicit.
>
> Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156687): 
https://lists.openembedded.org/g/openembedded-core/message/156687
Mute This Topic: https://lists.openembedded.org/mt/86092630/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] linux-yocto: add libmpc-native to DEPENDS

2021-10-06 Thread Ross Burton
On Wed, 6 Oct 2021 at 11:10, Ross Burton  wrote:
> This depends on CONFIG_GCC_PLUGINS which I don't believe is enabled in
> any of the default configurations.  meta-arm builds a few kernels with
> defconfig, which does.

Sorry, brain still not warmed up yet.

CONFIG_GCC_PLUGINS needs to be enabled, but the real difference is
that using the normal GCC pulls libmpc into the sysroot via implicit
dependencies.  If you use an external toolchain (like
meta-arm-toolchain) this doesn't happen, and the dependency needs to
be explicit.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156686): 
https://lists.openembedded.org/g/openembedded-core/message/156686
Mute This Topic: https://lists.openembedded.org/mt/86092630/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] linux-yocto: add libmpc-native to DEPENDS

2021-10-06 Thread Ross Burton
On Wed, 6 Oct 2021 at 01:17, Bruce Ashfield  wrote:
> What's the symptom when the native dependency isn't around ? I'm just
> wondering why none of my tests have picked this up. Is it only showing
> on ARM hosts ? Something else ?
>
> linux-yocto-dev can use this as well,  I can take care of that, if you
> don't have the cycles.
>
> I'm also factoring some of these things into kernel.bbclass, but this
> makes sense in the recipe for now.

This depends on CONFIG_GCC_PLUGINS which I don't believe is enabled in
any of the default configurations.  meta-arm builds a few kernels with
defconfig, which does.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156685): 
https://lists.openembedded.org/g/openembedded-core/message/156685
Mute This Topic: https://lists.openembedded.org/mt/86092630/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 1/7] linux-yocto/5.14: scripts/gcc-plugins: consistently use HOSTCC

2021-10-06 Thread Ross Burton
Can you drop this.  Turns out in fixing it, I broke it more!

Ross

On Wed, 6 Oct 2021 at 01:12, Bruce Ashfield  wrote:
>
> From: Bruce Ashfield 
>
> Integrating the following commit(s) to linux-yocto/5.14:
>
> 724df5812165 scripts/gcc-plugins: consistently use HOSTCC
>
> Signed-off-by: Bruce Ashfield 
> ---
>  .../linux/linux-yocto-rt_5.14.bb  |  4 ++--
>  .../linux/linux-yocto-tiny_5.14.bb|  6 ++---
>  meta/recipes-kernel/linux/linux-yocto_5.14.bb | 22 +--
>  3 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb 
> b/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb
> index a147e632e4..06064706e0 100644
> --- a/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb
> @@ -11,8 +11,8 @@ python () {
>  raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
> linux-yocto-rt to enable it")
>  }
>
> -SRCREV_machine ?= "7630ebb9fd510cf7aa31b6f1dd472f3b0442afb3"
> -SRCREV_meta ?= "42d2cf670ed06f42a035611a519ea68e2d26"
> +SRCREV_machine ?= "87e920626b63515458e304527509289993be2796"
> +SRCREV_meta ?= "a1e3f40a0f4c5d05d1a6110a42d53eb3c3947ec8"
>
>  SRC_URI = 
> "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
> 
> git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.14;destsuffix=${KMETA}"
> diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb 
> b/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb
> index 20ff40d267..699c8c7da0 100644
> --- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb
> @@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
>  KMETA = "kernel-meta"
>  KCONF_BSP_AUDIT_LEVEL = "2"
>
> -SRCREV_machine:qemuarm ?= "ee2ccc84e65ade5ba0f8e1a700fba29a755746a1"
> -SRCREV_machine ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_meta ?= "42d2cf670ed06f42a035611a519ea68e2d26"
> +SRCREV_machine:qemuarm ?= "f956536237159b85f94d70bb9e74b5894e6bf07d"
> +SRCREV_machine ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_meta ?= "a1e3f40a0f4c5d05d1a6110a42d53eb3c3947ec8"
>
>  PV = "${LINUX_VERSION}+git${SRCPV}"
>
> diff --git a/meta/recipes-kernel/linux/linux-yocto_5.14.bb 
> b/meta/recipes-kernel/linux/linux-yocto_5.14.bb
> index 0c6fbff75e..809b6fa066 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_5.14.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_5.14.bb
> @@ -13,17 +13,17 @@ KBRANCH:qemux86  ?= "v5.14/standard/base"
>  KBRANCH:qemux86-64 ?= "v5.14/standard/base"
>  KBRANCH:qemumips64 ?= "v5.14/standard/mti-malta64"
>
> -SRCREV_machine:qemuarm ?= "8226a3a65df2dbae0fe71e9ff54cba70a9ba85e5"
> -SRCREV_machine:qemuarm64 ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_machine:qemumips ?= "b5389debd85300e24b877f25c2e90381f1df7678"
> -SRCREV_machine:qemuppc ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_machine:qemuriscv64 ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_machine:qemuriscv32 ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_machine:qemux86 ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_machine:qemux86-64 ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_machine:qemumips64 ?= "56cc67b699194944809832f4c8f58b9828f02bf9"
> -SRCREV_machine ?= "7ae156be3bdbf033839f7f3ec2e9a0b18818"
> -SRCREV_meta ?= "42d2cf670ed06f42a035611a519ea68e2d26"
> +SRCREV_machine:qemuarm ?= "139cd4a6ac01e83002011680d9fbb14048c1bc3a"
> +SRCREV_machine:qemuarm64 ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_machine:qemumips ?= "f5a73ebec6f028075220c690bbb121284313ebd3"
> +SRCREV_machine:qemuppc ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_machine:qemuriscv64 ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_machine:qemuriscv32 ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_machine:qemux86 ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_machine:qemux86-64 ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_machine:qemumips64 ?= "912fc3d0cf57239e6fe5030b82165b2d6f0632e3"
> +SRCREV_machine ?= "724df5812165b61d20e93866be8f3e7e1e5e6b5c"
> +SRCREV_meta ?= "a1e3f40a0f4c5d05d1a6110a42d53eb3c3947ec8"
>
>  # 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.19.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156684): 
https://lists.openembedded.org/g/openembedded-core/message/156684
Mute This Topic: https://lists.openembedded.org/mt/86108488/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] linux-yocto: add libmpc-native to DEPENDS

2021-10-05 Thread Ross Burton
5.14 changed how the GCC plugins are built, which means they now
depend on both GMP and MPC to be built. We already depend on gmp-native,
so add libmpc-native aswell.

Signed-off-by: Ross Burton 
---
 meta/recipes-kernel/linux/linux-yocto_5.14.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto_5.14.bb 
b/meta/recipes-kernel/linux/linux-yocto_5.14.bb
index 0c6fbff75e..8c44c294bd 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.14.bb
@@ -46,7 +46,7 @@ LINUX_VERSION ?= "5.14.6"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
 DEPENDS += "openssl-native util-linux-native"
-DEPENDS += "gmp-native"
+DEPENDS += "gmp-native libmpc-native"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156645): 
https://lists.openembedded.org/g/openembedded-core/message/156645
Mute This Topic: https://lists.openembedded.org/mt/86092630/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] riscv: Add configure cache entries for libidl

2021-09-21 Thread Ross Burton
libidl was removed long ago, along with ORBit.  Can we just drop these entirely?

Ross

On Tue, 21 Sept 2021 at 18:02, Khem Raj  wrote:
>
> These were hidden in meta-networking
>
> Signed-off-by: Khem Raj 
> ---
>  meta/site/riscv32-linux | 3 +++
>  meta/site/riscv64-linux | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/meta/site/riscv32-linux b/meta/site/riscv32-linux
> index 97de628e22..acc32fd03c 100644
> --- a/meta/site/riscv32-linux
> +++ b/meta/site/riscv32-linux
> @@ -9,3 +9,6 @@ glib_cv_uscore=${glib_cv_uscore=no}
>
>  # startup-notification
>  lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
> +
> +# libidl
> +libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
> diff --git a/meta/site/riscv64-linux b/meta/site/riscv64-linux
> index 38bc5f044d..cf78133ee0 100644
> --- a/meta/site/riscv64-linux
> +++ b/meta/site/riscv64-linux
> @@ -9,3 +9,6 @@ glib_cv_uscore=${glib_cv_uscore=no}
>
>  # startup-notification
>  lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
> +
> +# libidl
> +libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
> --
> 2.33.0
>
>
> 
>

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



[OE-core] eudev retirement/rebooting

2021-09-21 Thread Ross Burton
Because this doesn't appear to be that well known, it appears that
Gentoo is stopping development of eudev:

https://www.gentoo.org/support/news-items/2021-08-24-eudev-retirement.html

Interestingly the reason they're no longer using eudev is that systemd
can be built with musl "using patches from OpenEmbedded".  These are
the patches we guard with the warning "Using systemd with musl is not
recommended since it is not supported upstream and some patches are
known to be problematic" so I was initially quite worried, but it now
appears that Alpine/Devuan/some Gentoo developers are rebooting eudev:

https://github.com/eudev-project/

We should keep an eye out on this and be prepared to switch when they
start making new releases.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156212): 
https://lists.openembedded.org/g/openembedded-core/message/156212
Mute This Topic: https://lists.openembedded.org/mt/85765345/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] oeqa/target/ssh: don't assume target_dumper is set

2021-09-21 Thread Ross Burton
The target_dumper property is only set by the QemuTarget subclass, so
assign a default value and check it isn't None before calling it.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/target/ssh.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 923a223b25..f956a7744f 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -44,6 +44,7 @@ class OESSHTarget(OETarget):
 self.ssh = self.ssh + [ '-p', port ]
 self.scp = self.scp + [ '-P', port ]
 self._monitor_dumper = None
+self.target_dumper = None
 
 def start(self, **kwargs):
 pass
@@ -102,7 +103,8 @@ class OESSHTarget(OETarget):
 if self.monitor_dumper:
 self.monitor_dumper.dump_monitor()
 if status == 255:
-self.target_dumper.dump_target()
+if self.target_dumper:
+self.target_dumper.dump_target()
 if self.monitor_dumper:
 self.monitor_dumper.dump_monitor()
 return (status, output)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156208): 
https://lists.openembedded.org/g/openembedded-core/message/156208
Mute This Topic: https://lists.openembedded.org/mt/85762752/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] libsoup-2.4: remove obsolete intltool dependency

2021-09-21 Thread Ross Burton
This hasn't been needed since libsoup 2.65.2.

Signed-off-by: Ross Burton 
---
 meta/recipes-support/libsoup/libsoup-2.4_2.72.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.72.0.bb 
b/meta/recipes-support/libsoup/libsoup-2.4_2.72.0.bb
index 3149896466..e888202b77 100644
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.72.0.bb
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.72.0.bb
@@ -7,7 +7,7 @@ SECTION = "x11/gnome/libs"
 LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
 
-DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native libpsl"
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl"
 
 SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156203): 
https://lists.openembedded.org/g/openembedded-core/message/156203
Mute This Topic: https://lists.openembedded.org/mt/85761965/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] shared-mime-info: use a more concise description

2021-09-21 Thread Ross Burton
For example we don't need to talk about historic build dependencies.

Signed-off-by: Ross Burton 
---
 meta/recipes-support/shared-mime-info/shared-mime-info_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb 
b/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb
index 714aca62f0..b2b830cc1f 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb
@@ -1,5 +1,5 @@
 SUMMARY = "Shared MIME type database and specification"
-DESCRIPTION = "The shared-mime-info package contains the core database of 
common types and the update-mime-database command used to extend it. It 
requires glib2 to be installed for building the update command. Additionally, 
it uses intltool for translations, though this is only a dependency for the 
maintainers."
+DESCRIPTION = "The shared-mime-info package contains the core database of 
common types."
 HOMEPAGE = "http://freedesktop.org/wiki/Software/shared-mime-info;
 SECTION = "base"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156202): 
https://lists.openembedded.org/g/openembedded-core/message/156202
Mute This Topic: https://lists.openembedded.org/mt/85761964/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] avahi: remove obsolete intltool-native dependency

2021-09-20 Thread Ross Burton
intltool was replaced with gettext in the 0.8 release.

Signed-off-by: Ross Burton 
---
 meta/recipes-connectivity/avahi/avahi_0.8.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb 
b/meta/recipes-connectivity/avahi/avahi_0.8.bb
index cd0489e846..4b15d11b61 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.8.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb
@@ -35,7 +35,7 @@ SRC_URI[sha256sum] = 
"060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de79
 # Issue only affects Debian/SUSE, not us
 CVE_CHECK_WHITELIST += "CVE-2021-26720"
 
-DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
+DEPENDS = "expat libcap libdaemon glib-2.0"
 
 # For gtk related PACKAGECONFIGs: gtk, gtk3
 AVAHI_GTK ?= ""
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156195): 
https://lists.openembedded.org/g/openembedded-core/message/156195
Mute This Topic: https://lists.openembedded.org/mt/85746053/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] ffmpeg: fix LICENSE

2021-09-16 Thread Ross Burton
Expat isn't a license name we have, use MIT instead.

Signed-off-by: Ross Burton 
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index f822ba9ab78..fc1834c00b2 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -5,7 +5,7 @@ DESCRIPTION = "FFmpeg is the leading multimedia framework, able 
to decode, encod
 HOMEPAGE = "https://www.ffmpeg.org/;
 SECTION = "libs"
 
-LICENSE = "GPLv2+ & LGPLv2.1+ & ISC & Expat & BSD-2-Clause & BSD-3-Clause & 
IJG"
+LICENSE = "GPLv2+ & LGPLv2.1+ & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG"
 LICENSE:${PN} = "GPLv2+"
 LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 
'LGPLv2.1+', d)}"
 LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 
'LGPLv2.1+', d)}"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156112): 
https://lists.openembedded.org/g/openembedded-core/message/156112
Mute This Topic: https://lists.openembedded.org/mt/85648760/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] Missing Expat license (was: [PATCH 12/14] ffmpeg: update LICENSE)

2021-09-16 Thread Ross Burton
On Wed, 15 Sept 2021 at 23:26, Peter Kjellerstedt
 wrote:
> > > -LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
> > > +LICENSE = "GPLv2+ & LGPLv2.1+ & ISC & Expat & BSD-2-Clause & 
> > > BSD-3-Clause & IJG"
> >
> > There is no "Expat" license in neither meta/files/common-licenses nor
> > in meta/conf/licenses.conf.
>
> Ross, since you added the reference to the Expat license, did you plan on
> actually adding it as well? It being missing breaks at least our license
> handling. After writing this, I went digging in ffmpeg, and it seems that the
> Expat license (only mentioned by name, there is no actual license text) is
> only used for a test image (reference.pnm), which does not end up in any
> package. So to me it seems as this does not need to be included in LICENSE.

Whoops, sorry.  Not sure how I didn't notice this.  It should be MIT.

The other license issues are "interesting", yes.  I think the recipe
needs an overhaul...

Ross

>
> Also, given the long list of licenses that are now in LICENSE, what packages
> are actually expected to use those licenses? AFAICT, all packages that are
> explicitly listed in the recipe either use GPLv2+ or LGPLv2.1+. The default
> licenses only seem to be used for, e.g., ffmpeg-dev, ffmpeg-dbg and
> ffmpeg-doc, which seems weird.
>
> More weirdness, LIC_FILES_CHKSUM lists GPLv2, GPLv3, LGPLv2 and LGPLv3, but
> neither GPLv3 nor LGPLv3 are used in LICENSE. And there are no references for
> any of the newly added licenses.
>
> > >  LICENSE:${PN} = "GPLv2+"
> > >  LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 
> > > 'GPLv2+', 'LGPLv2.1+', d)}"
> > >  LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 
> > > 'GPLv2+', 'LGPLv2.1+', d)}"
> > > --
> > > 2.25.1
> >
> > //Peter
>
> //Peter
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156111): 
https://lists.openembedded.org/g/openembedded-core/message/156111
Mute This Topic: https://lists.openembedded.org/mt/85640034/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] [yocto-security] OE-core CVE metrics for hardknott on Sun 12 Sep 2021 05:00:01 AM HST

2021-09-15 Thread Ross Burton
On Mon, 13 Sept 2021 at 18:26, Steve Sakoman  wrote:

> Taking a quick look at the code in cve-update-db-native.bb I see that
> database updates can fail with a warning message printed.  So it could
> well be that the update failed for some reason, printed the warning,
> and then used the old database for the scan. That would explain what
> we are seeing.
>
> Perhaps someone who knows the code better can comment (Ross? I see
> you've mucked about in this section of the code!)
>
> Unfortunately I didn't enable cron logging on the machine that does
> the reports, but I will enable that now so that I can examine the cron
> output if this happens in the future.

That's indeed a good hypothesis, and having the log to hand would be
useful.  If you don't delete the tmpdir after the event then the
console logs will be available in there still.

A hunch is that if you have all three jobs running at once, they might
be rejecting some of your connections.  Maybe stagger the runs by ten
minutes?

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156055): 
https://lists.openembedded.org/g/openembedded-core/message/156055
Mute This Topic: https://lists.openembedded.org/mt/85554291/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 1/7] testimage: TEST_SERVER_IP isn't mandatory

2021-09-10 Thread Ross Burton
Hold off on this, it breaks some potential use-cases.

Ross

On Fri, 10 Sept 2021 at 11:20, Ross Burton via lists.openembedded.org
 wrote:
>
> When using the simpleremote test target, TEST_SERVER_IP doesn't have to
> be configured as the code will detect the host's IP if it isn't set.
>
> Signed-off-by: Ross Burton 
> ---
>  meta/classes/testimage.bbclass | 7 ++-
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
> index 3c689aec913..8bf6b17af8a 100644
> --- a/meta/classes/testimage.bbclass
> +++ b/meta/classes/testimage.bbclass
> @@ -143,11 +143,8 @@ do_testimage[depends] += "${TESTIMAGEDEPENDS}"
>  do_testimage[lockfiles] += "${TESTIMAGELOCK}"
>
>  def testimage_sanity(d):
> -if (d.getVar('TEST_TARGET') == 'simpleremote'
> -and (not d.getVar('TEST_TARGET_IP')
> - or not d.getVar('TEST_SERVER_IP'))):
> -bb.fatal('When TEST_TARGET is set to "simpleremote" '
> - 'TEST_TARGET_IP and TEST_SERVER_IP are needed too.')
> +if d.getVar('TEST_TARGET') == 'simpleremote' and not 
> d.getVar('TEST_TARGET_IP'):
> +bb.fatal('When TEST_TARGET is set to "simpleremote" TEST_TARGET_IP 
> must be set.')
>
>  def get_testimage_configuration(d, test_type, machine):
>  import platform
> --
> 2.25.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155912): 
https://lists.openembedded.org/g/openembedded-core/message/155912
Mute This Topic: https://lists.openembedded.org/mt/85506110/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 5/7] oeqa/core/target: remove server port parameter

2021-09-10 Thread Ross Burton
Specifying a port that the test host can open sockets on isn't that
useful as the package management tests will open multiple ports, so the
specified port won't be used anyway.  The value was never set so used
the default of value, which meant the kernel picked the port.

Remove the server port parameter entirely, and let the kernel pick a
free port.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/target/qemu.py   | 1 -
 meta/lib/oeqa/core/target/ssh.py| 3 +--
 meta/lib/oeqa/runtime/cases/apt.py  | 4 +---
 meta/lib/oeqa/runtime/cases/dnf.py  | 3 +--
 meta/lib/oeqa/runtime/cases/opkg.py | 4 +---
 meta/lib/oeqa/runtime/context.py| 6 --
 6 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/meta/lib/oeqa/core/target/qemu.py 
b/meta/lib/oeqa/core/target/qemu.py
index 7c6e353edf2..66551607fb9 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -28,7 +28,6 @@ class OEQemuTarget(OESSHTarget):
 
 super().__init__(logger, None, server_ip, timeout, user, port)
 
-self.server_port = 0
 self.machine = machine
 self.rootfs = rootfs
 self.kernel = kernel
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 4da1e4c2b2d..bbf621c8e38 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -15,7 +15,7 @@ from . import OETarget
 
 class OESSHTarget(OETarget):
 def __init__(self, logger, ip, server_ip, timeout=300, user='root',
- port=None, server_port=0, **kwargs):
+ port=None, **kwargs):
 if not logger:
 logger = logging.getLogger('target')
 logger.setLevel(logging.INFO)
@@ -29,7 +29,6 @@ class OESSHTarget(OETarget):
 
 super().__init__(logger, server_ip)
 self.ip = ip
-self.server_port = server_port
 self.timeout = timeout
 self.user = user
 ssh_options = [
diff --git a/meta/lib/oeqa/runtime/cases/apt.py 
b/meta/lib/oeqa/runtime/cases/apt.py
index 53745df93f9..ed531a619aa 100644
--- a/meta/lib/oeqa/runtime/cases/apt.py
+++ b/meta/lib/oeqa/runtime/cases/apt.py
@@ -22,9 +22,7 @@ class AptRepoTest(AptTest):
 @classmethod
 def setUpClass(cls):
 service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_DEB'], 'all')
-cls.repo_server = HTTPService(service_repo,
-  '0.0.0.0', 
port=cls.tc.target.server_port,
-  logger=cls.tc.logger)
+cls.repo_server = HTTPService(service_repo, '0.0.0.0', 
logger=cls.tc.logger)
 cls.repo_server.start()
 
 @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py 
b/meta/lib/oeqa/runtime/cases/dnf.py
index f40c63026e5..937acaab597 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -53,8 +53,7 @@ class DnfRepoTest(DnfTest):
 @classmethod
 def setUpClass(cls):
 cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 
'oe-testimage-repo'),
-  '0.0.0.0', 
port=cls.tc.target.server_port,
-  logger=cls.tc.logger)
+  '0.0.0.0', logger=cls.tc.logger)
 cls.repo_server.start()
 
 @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/opkg.py 
b/meta/lib/oeqa/runtime/cases/opkg.py
index 9cfee1cd886..581ddf58749 100644
--- a/meta/lib/oeqa/runtime/cases/opkg.py
+++ b/meta/lib/oeqa/runtime/cases/opkg.py
@@ -25,9 +25,7 @@ class OpkgRepoTest(OpkgTest):
 if cls.tc.td["MULTILIB_VARIANTS"]:
 allarchfeed = cls.tc.td["TUNE_PKGARCH"]
 service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_IPK'], allarchfeed)
-cls.repo_server = HTTPService(service_repo,
-  '0.0.0.0', 
port=cls.tc.target.server_port,
-  logger=cls.tc.logger)
+cls.repo_server = HTTPService(service_repo, '0.0.0.0', 
logger=cls.tc.logger)
 cls.repo_server.start()
 
 @classmethod
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 3826f276421..8552aa782bc 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -99,12 +99,6 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 target_ip = target_ip_port[0]
 kwargs['port'] = target_ip_port[1]
 
-if server_ip:
-server_ip_port = server_ip.split(':')
-if len(server_ip_port) == 2:
-server_ip = server_ip_port[0]
-kwargs['server_port'] = int(server_ip_port[1])
-
 if target_type == 'simpleremote':
 target = OESSHTarget(logger, target_ip, server_ip, **kwargs)
 elif target_type == 'qemu':
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Onli

[OE-core] [PATCH 2/7] testimage: pass the base image name to the target class

2021-09-10 Thread Ross Burton
Also pass the the base image name to the target class. This is the full
path to the deploy directory and the image name without any extensions,
so makes it easier to find ancillary files.

Signed-off-by: Ross Burton 
---
 meta/classes/testimage.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 8bf6b17af8a..d139df9925f 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -309,6 +309,7 @@ def testimage_main(d):
   'serial_ports': len(d.getVar("SERIAL_CONSOLES").split()),
   'ovmf': ovmf,
   'tmpfsdir': d.getVar("RUNQEMU_TMPFS_DIR"),
+  'image_name'  : image_name
 }
 
 if d.getVar("TESTIMAGE_BOOT_PATTERNS"):
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155905): 
https://lists.openembedded.org/g/openembedded-core/message/155905
Mute This Topic: https://lists.openembedded.org/mt/85506109/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 4/7] oeqa/core/target: move server_ip to superclass

2021-09-10 Thread Ross Burton
Move towards a consistent interface across OETarget subclasses by
moving server_ip to the superclass.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/target/__init__.py | 3 ++-
 meta/lib/oeqa/core/target/qemu.py | 4 +---
 meta/lib/oeqa/core/target/ssh.py  | 3 +--
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oeqa/core/target/__init__.py 
b/meta/lib/oeqa/core/target/__init__.py
index 3da66038342..aff02ecc439 100644
--- a/meta/lib/oeqa/core/target/__init__.py
+++ b/meta/lib/oeqa/core/target/__init__.py
@@ -7,7 +7,8 @@
 
 class OETarget:
 
-def __init__(self, logger, *args, **kwargs):
+def __init__(self, logger, server_ip):
+self.server_ip = server_ip
 self.logger = logger
 
 def start(self):
diff --git a/meta/lib/oeqa/core/target/qemu.py 
b/meta/lib/oeqa/core/target/qemu.py
index 79fd724f7d4..7c6e353edf2 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -26,10 +26,8 @@ class OEQemuTarget(OESSHTarget):
 tmpdir='', dir_image='', boottime=60, serial_ports=2,
 boot_patterns = defaultdict(str), ovmf=False, tmpfsdir=None, 
**kwargs):
 
-super(OEQemuTarget, self).__init__(logger, None, server_ip, timeout,
-user, port)
+super().__init__(logger, None, server_ip, timeout, user, port)
 
-self.server_ip = server_ip
 self.server_port = 0
 self.machine = machine
 self.rootfs = rootfs
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 923a223b25b..4da1e4c2b2d 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -27,9 +27,8 @@ class OESSHTarget(OETarget):
 fileHandler.setFormatter(formatter)
 logger.addHandler(fileHandler)
 
-super(OESSHTarget, self).__init__(logger)
+super().__init__(logger, server_ip)
 self.ip = ip
-self.server_ip = server_ip
 self.server_port = server_port
 self.timeout = timeout
 self.user = user
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155907): 
https://lists.openembedded.org/g/openembedded-core/message/155907
Mute This Topic: https://lists.openembedded.org/mt/85506111/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 7/7] oeqa/target/ssh: don't assume target_dumper is set

2021-09-10 Thread Ross Burton
The target_dumper property is only set by the QemuTarget subclass, so
assign a default value and check it isn't None before calling it.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/target/ssh.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index b61c7d141d9..8cd2966fa38 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -41,6 +41,7 @@ class OESSHTarget(OETarget):
 self.ssh = self.ssh + [ '-p', port ]
 self.scp = self.scp + [ '-P', port ]
 self._monitor_dumper = None
+self.target_dumper = None
 
 def start(self, **kwargs):
 pass
@@ -99,7 +100,8 @@ class OESSHTarget(OETarget):
 if self.monitor_dumper:
 self.monitor_dumper.dump_monitor()
 if status == 255:
-self.target_dumper.dump_target()
+if self.target_dumper:
+self.target_dumper.dump_target()
 if self.monitor_dumper:
 self.monitor_dumper.dump_monitor()
 return (status, output)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155910): 
https://lists.openembedded.org/g/openembedded-core/message/155910
Mute This Topic: https://lists.openembedded.org/mt/85506115/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 6/7] oeqa/core/target: add target_ip to superclass

2021-09-10 Thread Ross Burton
Move towards a consistent interface across OETarget subclasses by
moving target_ip to the superclass.

QemuTarget automatically determines the target IP on startup, so default
that to None.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/target/__init__.py | 3 ++-
 meta/lib/oeqa/core/target/qemu.py | 4 ++--
 meta/lib/oeqa/core/target/ssh.py  | 5 ++---
 meta/lib/oeqa/runtime/context.py  | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/meta/lib/oeqa/core/target/__init__.py 
b/meta/lib/oeqa/core/target/__init__.py
index aff02ecc439..45ed3e54b40 100644
--- a/meta/lib/oeqa/core/target/__init__.py
+++ b/meta/lib/oeqa/core/target/__init__.py
@@ -7,8 +7,9 @@
 
 class OETarget:
 
-def __init__(self, logger, server_ip):
+def __init__(self, logger, server_ip, target_ip):
 self.server_ip = server_ip
+self.ip = target_ip
 self.logger = logger
 
 def start(self):
diff --git a/meta/lib/oeqa/core/target/qemu.py 
b/meta/lib/oeqa/core/target/qemu.py
index 66551607fb9..ef567939ad8 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -20,13 +20,13 @@ from oeqa.utils.dump import TargetDumper
 supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
 
 class OEQemuTarget(OESSHTarget):
-def __init__(self, logger, server_ip, timeout=300, user='root',
+def __init__(self, logger, server_ip, target_ip=None, timeout=300, 
user='root',
 port=None, machine='', rootfs='', kernel='', kvm=False, 
slirp=False,
 dump_dir='', dump_host_cmds='', display='', bootlog='',
 tmpdir='', dir_image='', boottime=60, serial_ports=2,
 boot_patterns = defaultdict(str), ovmf=False, tmpfsdir=None, 
**kwargs):
 
-super().__init__(logger, None, server_ip, timeout, user, port)
+super().__init__(logger, server_ip, target_ip, timeout, user, port)
 
 self.machine = machine
 self.rootfs = rootfs
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index bbf621c8e38..b61c7d141d9 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -14,7 +14,7 @@ import codecs
 from . import OETarget
 
 class OESSHTarget(OETarget):
-def __init__(self, logger, ip, server_ip, timeout=300, user='root',
+def __init__(self, logger, server_ip, target_ip, timeout=300, user='root',
  port=None, **kwargs):
 if not logger:
 logger = logging.getLogger('target')
@@ -27,8 +27,7 @@ class OESSHTarget(OETarget):
 fileHandler.setFormatter(formatter)
 logger.addHandler(fileHandler)
 
-super().__init__(logger, server_ip)
-self.ip = ip
+super().__init__(logger, server_ip, target_ip)
 self.timeout = timeout
 self.user = user
 ssh_options = [
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 8552aa782bc..76cae4ee789 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -100,7 +100,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 kwargs['port'] = target_ip_port[1]
 
 if target_type == 'simpleremote':
-target = OESSHTarget(logger, target_ip, server_ip, **kwargs)
+target = OESSHTarget(logger, server_ip, target_ip, **kwargs)
 elif target_type == 'qemu':
 target = OEQemuTarget(logger, server_ip, **kwargs)
 else:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155909): 
https://lists.openembedded.org/g/openembedded-core/message/155909
Mute This Topic: https://lists.openembedded.org/mt/85506114/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/7] oeqa/core/target: remove abstract decorations

2021-09-10 Thread Ross Burton
There's no need to inherit from object in Python 3, and marking the
methods as abstract is overkill considering the type hierarchy.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/target/__init__.py | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/core/target/__init__.py 
b/meta/lib/oeqa/core/target/__init__.py
index 1382aa9b523..3da66038342 100644
--- a/meta/lib/oeqa/core/target/__init__.py
+++ b/meta/lib/oeqa/core/target/__init__.py
@@ -4,33 +4,26 @@
 # SPDX-License-Identifier: MIT
 #
 
-from abc import abstractmethod
 
-class OETarget(object):
+class OETarget:
 
 def __init__(self, logger, *args, **kwargs):
 self.logger = logger
 
-@abstractmethod
 def start(self):
 pass
 
-@abstractmethod
 def stop(self):
 pass
 
-@abstractmethod
 def run(self, cmd, timeout=None):
 pass
 
-@abstractmethod
 def copyTo(self, localSrc, remoteDst):
 pass
 
-@abstractmethod
 def copyFrom(self, remoteSrc, localDst):
 pass
 
-@abstractmethod
 def copyDirTo(self, localSrc, remoteDst):
 pass
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155904): 
https://lists.openembedded.org/g/openembedded-core/message/155904
Mute This Topic: https://lists.openembedded.org/mt/85506108/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/7] testimage: TEST_SERVER_IP isn't mandatory

2021-09-10 Thread Ross Burton
When using the simpleremote test target, TEST_SERVER_IP doesn't have to
be configured as the code will detect the host's IP if it isn't set.

Signed-off-by: Ross Burton 
---
 meta/classes/testimage.bbclass | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 3c689aec913..8bf6b17af8a 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -143,11 +143,8 @@ do_testimage[depends] += "${TESTIMAGEDEPENDS}"
 do_testimage[lockfiles] += "${TESTIMAGELOCK}"
 
 def testimage_sanity(d):
-if (d.getVar('TEST_TARGET') == 'simpleremote'
-and (not d.getVar('TEST_TARGET_IP')
- or not d.getVar('TEST_SERVER_IP'))):
-bb.fatal('When TEST_TARGET is set to "simpleremote" '
- 'TEST_TARGET_IP and TEST_SERVER_IP are needed too.')
+if d.getVar('TEST_TARGET') == 'simpleremote' and not 
d.getVar('TEST_TARGET_IP'):
+bb.fatal('When TEST_TARGET is set to "simpleremote" TEST_TARGET_IP 
must be set.')
 
 def get_testimage_configuration(d, test_type, machine):
 import platform
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155906): 
https://lists.openembedded.org/g/openembedded-core/message/155906
Mute This Topic: https://lists.openembedded.org/mt/85506110/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 1/1] oeqa/sdk: assimp.py -> cmake.py

2021-09-10 Thread Ross Burton
On Fri, 10 Sept 2021 at 09:08, Robert Yang  wrote:
> -self._run("cd {build} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON 
> {source}".format(**dirs))
> +self._run("cd {build} && cmake {source}".format(**dirs))

Verbose makefiles were turned on for a reason: when it breaks, we want
to see the full log.

>  self._run("cmake --build {build} -- -j".format(**dirs))
>  self._run("cmake --build {build} --target install -- 
> DESTDIR={install}".format(**dirs))
> -self.check_elf(os.path.join(dirs["install"], "usr", "local", 
> "lib", "libassimp.so.4.1.0"))
> +self.check_elf(os.path.join(dirs["install"], 
> "usr/local/lib/libexpat.so.1.8.1"))

Using join() but passing a hardcoded path string seems suboptimal.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155903): 
https://lists.openembedded.org/g/openembedded-core/message/155903
Mute This Topic: https://lists.openembedded.org/mt/85504678/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 1/1] assimp: Remove it

2021-09-08 Thread Ross Burton
On Tue, 7 Sept 2021 at 13:50, Alexander Kanavin  wrote:
> I'm not sure why layerindex says otherewise, but neither vulkan nor anything 
> in meta-qt5 actually depend on assimp.
> qt5/6 has an option, off by default, to use external assimp, vulkan has no 
> dependency at all.
>
> This leaves basically meta-ros, so carrying assimp for the benefit of a 
> single layer is dubious at best.

I thought Vulkan needed assimp so dug into the history.  vulkan-demos
used to need it, but that was replaced with vulkan-samples which does
not.

So, I say we drop assimp from core and move it to meta-oe.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155787): 
https://lists.openembedded.org/g/openembedded-core/message/155787
Mute This Topic: https://lists.openembedded.org/mt/85431030/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 1/1] assimp: Remove it

2021-09-07 Thread Ross Burton
On Tue, 7 Sept 2021 at 13:04, Randy MacLeod  wrote:
> I'll look at the sections that you have pointed out later today.

Debian is always worth looking at when there's license issues.

https://salsa.debian.org/debian/assimp/-/blob/master/debian/README.source

Specifically:

https://salsa.debian.org/debian/assimp/-/blob/master/debian/README.source#L81

They strip non-free components from the tarball before importing into
their git repository.  We can delete the same files during the build
so they don't get redistributed.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155757): 
https://lists.openembedded.org/g/openembedded-core/message/155757
Mute This Topic: https://lists.openembedded.org/mt/85431030/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] create-spdx: handle CLOSED license

2021-09-06 Thread Ross Burton
The special CLOSED license means that this is closed source code with
no other licensing assertions.  It's not a generic license in oe-core,
and not a SPDX license, so transform it to NONE explicitly.

Signed-off-by: Ross Burton 
---
 meta/classes/create-spdx.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index 1e0b3605587..f9d5a13a2f9 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -105,6 +105,9 @@ def convert_license_to_spdx(lic, document, d, existing={}):
 if l == "|":
 return "OR"
 
+if l == "CLOSED":
+return "NONE"
+
 spdx_license = d.getVarFlag("SPDXLICENSEMAP", l) or l
 if spdx_license in license_data["licenses"]:
 return spdx_license
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155720): 
https://lists.openembedded.org/g/openembedded-core/message/155720
Mute This Topic: https://lists.openembedded.org/mt/85413540/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 3/4] create-spdx: embed unknown license texts

2021-09-03 Thread Ross Burton
For licenses which are not known to SPDX, find and embed the actual
license text in an ExtractedLicesingInfo block.

Signed-off-by: Ross Burton 
---
 meta/classes/create-spdx.bbclass | 51 +++-
 1 file changed, 37 insertions(+), 14 deletions(-)

diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index 529dee22918..cbb9239991c 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -51,21 +51,49 @@ python() {
 }
 
 def convert_license_to_spdx(lic, document, d):
+from pathlib import Path
 import oe.spdx
 
+available_licenses = d.getVar("AVAILABLE_LICENSES").split()
 license_data = d.getVar("SPDX_LICENSE_DATA")
+extracted = {}
 
-def add_extracted_license(ident, name, text):
+def add_extracted_license(ident, name):
 nonlocal document
 
-spdx_lic = oe.spdx.SPDXExtractedLicensingInfo()
-spdx_lic.name = name
-spdx_lic.licenseId = ident
-spdx_lic.extractedText = text
-
-document.hasExtractedLicensingInfos.append(spdx_lic)
+if name in extracted:
+return
+
+extracted_info = oe.spdx.SPDXExtractedLicensingInfo()
+extracted_info.name = name
+extracted_info.licenseId = ident
+
+if name == "PD":
+# Special-case this.
+extracted_info.extractedText = "Software released to the public 
domain"
+elif name in available_licenses:
+# This license can be found in COMMON_LICENSE_DIR or LICENSE_PATH
+for directory in [d.getVar('COMMON_LICENSE_DIR')] + 
d.getVar('LICENSE_PATH').split():
+try:
+with (Path(directory) / name).open(errors="replace") as f:
+extracted_info.extractedText = f.read()
+break
+except Exception as e:
+# Error out, as the license was in available_licenses so
+# should be on disk somewhere.
+bb.error(f"Cannot find text for license {name}: {e}")
+else:
+# If it's not SPDX, or PD, or in available licenses, then 
NO_GENERIC_LICENSE must be set
+filename = d.getVarFlag('NO_GENERIC_LICENSE', name)
+if filename:
+filename = d.expand("${S}/" + filename)
+with open(filename, errors="replace") as f:
+extracted_info.extractedText = f.read()
+else:
+bb.error(f"Cannot find any text for license {name}")
 
-return True
+extracted[name] = extracted_info
+document.hasExtractedLicensingInfos.append(extracted_info)
 
 def convert(l):
 if l == "(" or l == ")":
@@ -82,12 +110,7 @@ def convert_license_to_spdx(lic, document, d):
 return spdx_license
 
 spdx_license = "LicenseRef-" + l
-
-if l == "PD":
-add_extracted_license(spdx_license, l, "Software released to the 
public domain")
-elif add_extracted_license(spdx_license, l, "This software is licensed 
under the %s license" % l):
-pass
-#bb.warn("No SPDX License found for %s. Creating a place holder" % 
l)
+add_extracted_license(spdx_license, l)
 
 return spdx_license
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155680): 
https://lists.openembedded.org/g/openembedded-core/message/155680
Mute This Topic: https://lists.openembedded.org/mt/85355093/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 1/4] create-spdx: transform license list into a dict for faster lookups

2021-09-03 Thread Ross Burton
spdx-licenses.json contains an array of licenses objects. As we'll be
searching it often, convert that to a dictionary when we parse it.

Signed-off-by: Ross Burton 
---
 meta/classes/create-spdx.bbclass | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index a590ab596ac..73ccb3c990f 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -44,7 +44,10 @@ python() {
 return
 
 with open(d.getVar("SPDX_LICENSES"), "r") as f:
-d.setVar("SPDX_LICENSE_DATA", json.load(f))
+data = json.load(f)
+# Transform the license array to a dictionary
+data["licenses"] = {l["licenseId"]: l for l in data["licenses"]}
+d.setVar("SPDX_LICENSE_DATA", data)
 }
 
 def convert_license_to_spdx(lic, document, d):
@@ -55,9 +58,8 @@ def convert_license_to_spdx(lic, document, d):
 def add_extracted_license(ident, name, text):
 nonlocal document
 
-for lic_data in license_data["licenses"]:
-if lic_data["licenseId"] == ident:
-return False
+if ident in license_data["licenses"]:
+return False
 
 spdx_lic = oe.spdx.SPDXExtractedLicensingInfo()
 spdx_lic.name = name
@@ -79,9 +81,8 @@ def convert_license_to_spdx(lic, document, d):
 return "OR"
 
 spdx_license = d.getVarFlag("SPDXLICENSEMAP", l) or l
-for lic_data in license_data["licenses"]:
-if lic_data["licenseId"] == spdx_license:
-return spdx_license
+if spdx_license in license_data["licenses"]:
+return spdx_license
 
 spdx_license = "LicenseRef-" + l
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155679): 
https://lists.openembedded.org/g/openembedded-core/message/155679
Mute This Topic: https://lists.openembedded.org/mt/85355092/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 4/4] create-spex: don't duplicate license texts in each package

2021-09-03 Thread Ross Burton
Instead of putting the full license text for non-SPDX licenses into the
recipe and every package, use links to the recipe from the packages if
possible.

Signed-off-by: Ross Burton 
---
 meta/classes/create-spdx.bbclass | 25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index cbb9239991c..1e0b3605587 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -50,7 +50,7 @@ python() {
 d.setVar("SPDX_LICENSE_DATA", data)
 }
 
-def convert_license_to_spdx(lic, document, d):
+def convert_license_to_spdx(lic, document, d, existing={}):
 from pathlib import Path
 import oe.spdx
 
@@ -109,8 +109,11 @@ def convert_license_to_spdx(lic, document, d):
 if spdx_license in license_data["licenses"]:
 return spdx_license
 
-spdx_license = "LicenseRef-" + l
-add_extracted_license(spdx_license, l)
+try:
+spdx_license = existing[l]
+except KeyError:
+spdx_license = "LicenseRef-" + l
+add_extracted_license(spdx_license, l)
 
 return spdx_license
 
@@ -462,7 +465,14 @@ python do_create_spdx() {
 doc_sha1 = oe.sbom.write_doc(d, doc, "recipes")
 dep_recipes.append(oe.sbom.DepRecipe(doc, doc_sha1, recipe))
 
+recipe_ref = oe.spdx.SPDXExternalDocumentRef()
+recipe_ref.externalDocumentId = "DocumentRef-recipe-" + recipe.name
+recipe_ref.spdxDocument = doc.documentNamespace
+recipe_ref.checksum.algorithm = "SHA1"
+recipe_ref.checksum.checksumValue = doc_sha1
+
 sources = collect_dep_sources(d, dep_recipes)
+found_licenses = {license.name:recipe_ref.externalDocumentId + ":" + 
license.licenseId for license in doc.hasExtractedLicensingInfos}
 
 if not is_native:
 bb.build.exec_func("read_subpackage_metadata", d)
@@ -482,13 +492,6 @@ python do_create_spdx() {
 package_doc.creationInfo.creators.append("Tool: OpenEmbedded Core 
create-spdx.bbclass")
 package_doc.creationInfo.creators.append("Organization: 
OpenEmbedded ()")
 package_doc.creationInfo.creators.append("Person: N/A ()")
-
-recipe_ref = oe.spdx.SPDXExternalDocumentRef()
-recipe_ref.externalDocumentId = "DocumentRef-recipe-" + recipe.name
-recipe_ref.spdxDocument = doc.documentNamespace
-recipe_ref.checksum.algorithm = "SHA1"
-recipe_ref.checksum.checksumValue = doc_sha1
-
 package_doc.externalDocumentRefs.append(recipe_ref)
 
 package_license = d.getVar("LICENSE:%s" % package) or 
d.getVar("LICENSE")
@@ -498,7 +501,7 @@ python do_create_spdx() {
 spdx_package.SPDXID = oe.sbom.get_package_spdxid(pkg_name)
 spdx_package.name = pkg_name
 spdx_package.versionInfo = d.getVar("PV")
-spdx_package.licenseDeclared = 
convert_license_to_spdx(package_license, package_doc, d)
+spdx_package.licenseDeclared = 
convert_license_to_spdx(package_license, package_doc, d, found_licenses)
 
 package_doc.packages.append(spdx_package)
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155681): 
https://lists.openembedded.org/g/openembedded-core/message/155681
Mute This Topic: https://lists.openembedded.org/mt/85355094/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/4] create-spdx: remove redundant test

2021-09-03 Thread Ross Burton
add_extracted_document() is only called if the license isn't known to
SPDX, so there's no need to check again.

Signed-off-by: Ross Burton 
---
 meta/classes/create-spdx.bbclass | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index 73ccb3c990f..529dee22918 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -58,9 +58,6 @@ def convert_license_to_spdx(lic, document, d):
 def add_extracted_license(ident, name, text):
 nonlocal document
 
-if ident in license_data["licenses"]:
-return False
-
 spdx_lic = oe.spdx.SPDXExtractedLicensingInfo()
 spdx_lic.name = name
 spdx_lic.licenseId = ident
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155678): 
https://lists.openembedded.org/g/openembedded-core/message/155678
Mute This Topic: https://lists.openembedded.org/mt/85355091/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] create-spex: don't duplicate license texts in each package

2021-09-03 Thread Ross Burton
Instead of putting the full license text for non-SPDX licenses into the
recipe and every package, use links to the recipe from the packages if
possible.

Signed-off-by: Ross Burton 
---
 meta/classes/create-spdx.bbclass | 25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index cbb9239991c..1e0b3605587 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -50,7 +50,7 @@ python() {
 d.setVar("SPDX_LICENSE_DATA", data)
 }
 
-def convert_license_to_spdx(lic, document, d):
+def convert_license_to_spdx(lic, document, d, existing={}):
 from pathlib import Path
 import oe.spdx
 
@@ -109,8 +109,11 @@ def convert_license_to_spdx(lic, document, d):
 if spdx_license in license_data["licenses"]:
 return spdx_license
 
-spdx_license = "LicenseRef-" + l
-add_extracted_license(spdx_license, l)
+try:
+spdx_license = existing[l]
+except KeyError:
+spdx_license = "LicenseRef-" + l
+add_extracted_license(spdx_license, l)
 
 return spdx_license
 
@@ -462,7 +465,14 @@ python do_create_spdx() {
 doc_sha1 = oe.sbom.write_doc(d, doc, "recipes")
 dep_recipes.append(oe.sbom.DepRecipe(doc, doc_sha1, recipe))
 
+recipe_ref = oe.spdx.SPDXExternalDocumentRef()
+recipe_ref.externalDocumentId = "DocumentRef-recipe-" + recipe.name
+recipe_ref.spdxDocument = doc.documentNamespace
+recipe_ref.checksum.algorithm = "SHA1"
+recipe_ref.checksum.checksumValue = doc_sha1
+
 sources = collect_dep_sources(d, dep_recipes)
+found_licenses = {license.name:recipe_ref.externalDocumentId + ":" + 
license.licenseId for license in doc.hasExtractedLicensingInfos}
 
 if not is_native:
 bb.build.exec_func("read_subpackage_metadata", d)
@@ -482,13 +492,6 @@ python do_create_spdx() {
 package_doc.creationInfo.creators.append("Tool: OpenEmbedded Core 
create-spdx.bbclass")
 package_doc.creationInfo.creators.append("Organization: 
OpenEmbedded ()")
 package_doc.creationInfo.creators.append("Person: N/A ()")
-
-recipe_ref = oe.spdx.SPDXExternalDocumentRef()
-recipe_ref.externalDocumentId = "DocumentRef-recipe-" + recipe.name
-recipe_ref.spdxDocument = doc.documentNamespace
-recipe_ref.checksum.algorithm = "SHA1"
-recipe_ref.checksum.checksumValue = doc_sha1
-
 package_doc.externalDocumentRefs.append(recipe_ref)
 
 package_license = d.getVar("LICENSE:%s" % package) or 
d.getVar("LICENSE")
@@ -498,7 +501,7 @@ python do_create_spdx() {
 spdx_package.SPDXID = oe.sbom.get_package_spdxid(pkg_name)
 spdx_package.name = pkg_name
 spdx_package.versionInfo = d.getVar("PV")
-spdx_package.licenseDeclared = 
convert_license_to_spdx(package_license, package_doc, d)
+spdx_package.licenseDeclared = 
convert_license_to_spdx(package_license, package_doc, d, found_licenses)
 
 package_doc.packages.append(spdx_package)
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155677): 
https://lists.openembedded.org/g/openembedded-core/message/155677
Mute This Topic: https://lists.openembedded.org/mt/85354189/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] oeqa/selftest/recipetool: update for license changes

2021-09-03 Thread Ross Burton
Now that recipetool writes BSD-3-Clause, update the test appropriately.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/recipetool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py 
b/meta/lib/oeqa/selftest/cases/recipetool.py
index 6f531dfa364..c2a53815d0e 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -481,7 +481,7 @@ class RecipetoolTests(RecipetoolBase):
 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
 self.assertTrue(os.path.isfile(recipefile))
 checkvars = {}
-checkvars['LICENSE'] = set(['PSF', '&', 'BSD', 'GPL'])
+checkvars['LICENSE'] = set(['PSF', '&', 'BSD-3-Clause', 'GPL'])
 checkvars['LIC_FILES_CHKSUM'] = 
'file://COPYING.txt;md5=35a23d42b615470583563132872c97d6'
 checkvars['SRC_URI'] = 
'https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-${PV}.tar.gz'
 checkvars['SRC_URI[md5sum]'] = 'c53768d63db3873b7d452833553469de'
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155676): 
https://lists.openembedded.org/g/openembedded-core/message/155676
Mute This Topic: https://lists.openembedded.org/mt/85354188/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] xinetd: correct LICENSE

2021-09-03 Thread Ross Burton
The xinetd license is superficially BSD-like, but it isn't BSD. Now that
we have the full SPDX license set in oe-core, use the specific xinetd
license.

Signed-off-by: Ross Burton 
---
 meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb 
b/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb
index e6ef5cf8b9a..ec90de830d0 100644
--- a/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb
@@ -2,9 +2,7 @@ SUMMARY = "Socket-based service activation daemon"
 HOMEPAGE = "https://github.com/xinetd-org/xinetd;
 DESCRIPTION = "xinetd is a powerful replacement for inetd, xinetd has access 
control mechanisms, extensive logging capabilities, the ability to make 
services available based on time, can place limits on the number of servers 
that can be started, and has deployable defence mechanisms to protect against 
port scanners, among other things."
 
-# xinetd is a BSD-like license
-# Apple and Gentoo say BSD here.
-LICENSE = "BSD"
+LICENSE = "xinetd"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=55c5fdf02cfcca3fc9621b6f2ceae10f"
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155675): 
https://lists.openembedded.org/g/openembedded-core/message/155675
Mute This Topic: https://lists.openembedded.org/mt/85352871/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 14/14] recipetool/create_buildsys_python: treat BSD as BSD-3-Clause

2021-09-03 Thread Ross Burton
The PyPI license classifiers include "OSI Approved: BSD", which does not
specify which of the many variations of BSD license it actually means.

The generic "BSD" license in the oe-core set is actually BSD-3-Clause.
>From a random sample of ten PyPI modules that use "BSD", they are all
BSD-3-Clause.  As we expect the recipe maintainer to verify the license
anyway, and this matches the previous license text, explicitly set the
license to BSD-3-Clause.

Signed-off-by: Ross Burton 
---
 scripts/lib/recipetool/create_buildsys_python.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/recipetool/create_buildsys_python.py 
b/scripts/lib/recipetool/create_buildsys_python.py
index 8aa44650d33..0b6b042ed17 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -101,7 +101,7 @@ class PythonRecipeHandler(RecipeHandler):
 'License :: OSI Approved :: Apple Public Source License': 'APSL',
 'License :: OSI Approved :: Artistic License': 'Artistic',
 'License :: OSI Approved :: Attribution Assurance License': 'AAL',
-'License :: OSI Approved :: BSD License': 'BSD',
+'License :: OSI Approved :: BSD License': 'BSD-3-Clause',
 'License :: OSI Approved :: Common Public License': 'CPL',
 'License :: OSI Approved :: Eiffel Forum License': 'EFL',
 'License :: OSI Approved :: European Union Public Licence 1.0 (EUPL 
1.0)': 'EUPL-1.0',
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155665): 
https://lists.openembedded.org/g/openembedded-core/message/155665
Mute This Topic: https://lists.openembedded.org/mt/85351460/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 13/14] hdparm: set correct license

2021-09-03 Thread Ross Burton
The bulk of hdparm is under a unique license. Set the correct BSD
version, and specify that the hdparm license is also used.

Signed-off-by: Ross Burton 
---
 meta/recipes-extended/hdparm/hdparm_9.62.bb | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/hdparm/hdparm_9.62.bb 
b/meta/recipes-extended/hdparm/hdparm_9.62.bb
index 3d4081c2b3d..61bb44ff389 100644
--- a/meta/recipes-extended/hdparm/hdparm_9.62.bb
+++ b/meta/recipes-extended/hdparm/hdparm_9.62.bb
@@ -4,10 +4,11 @@ DESCRIPTION = "hdparm is a Linux shell utility for viewing \
 and manipulating various IDE drive and driver parameters."
 SECTION = "console/utils"
 
-LICENSE = "BSD & GPLv2"
-LICENSE:${PN} = "BSD"
-LICENSE:${PN}-dbg = "BSD"
+LICENSE = "BSD-2-Clause & GPLv2 & hdparm"
+LICENSE:${PN} = "BSD-2-Clause & hdparm"
+LICENSE:${PN}-dbg = "BSD-2-Clause & hdparm"
 LICENSE:wiper = "GPLv2"
+NO_GENERIC_LICENSE[hdparm] = "LICENSE.TXT"
 
 LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=495d03e50dc6c89d6a30107ab0df5b03 \
 
file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155664): 
https://lists.openembedded.org/g/openembedded-core/message/155664
Mute This Topic: https://lists.openembedded.org/mt/85351459/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 12/14] ffmpeg: update LICENSE

2021-09-03 Thread Ross Burton
"BSD" is ambiguous, ffmpeg comprises of several licenses which are
BSD-like.

Signed-off-by: Ross Burton 
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index e19077541ec..f822ba9ab78 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -5,7 +5,7 @@ DESCRIPTION = "FFmpeg is the leading multimedia framework, able 
to decode, encod
 HOMEPAGE = "https://www.ffmpeg.org/;
 SECTION = "libs"
 
-LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
+LICENSE = "GPLv2+ & LGPLv2.1+ & ISC & Expat & BSD-2-Clause & BSD-3-Clause & 
IJG"
 LICENSE:${PN} = "GPLv2+"
 LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 
'LGPLv2.1+', d)}"
 LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 
'LGPLv2.1+', d)}"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155663): 
https://lists.openembedded.org/g/openembedded-core/message/155663
Mute This Topic: https://lists.openembedded.org/mt/85351458/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] ppp: set precise BSD license

2021-09-03 Thread Ross Burton
"BSD" is ambiguous, use the precise licenses BSD-3-Clause-Attribution
and BSD-3-Clause.

Signed-off-by: Ross Burton 
---
 meta/recipes-connectivity/ppp/ppp_2.4.9.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.9.bb 
b/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
index 6e5cfc8f912..023d0feca99 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
@@ -5,7 +5,7 @@ SECTION = "console/network"
 HOMEPAGE = "http://samba.org/ppp/;
 BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs;
 DEPENDS = "libpcap openssl virtual/crypt"
-LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD"
+LICENSE = "BSD-3-Clause & BSD-3-Clause-Attribution & GPLv2+ & LGPLv2+ & PD"
 LIC_FILES_CHKSUM = 
"file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
 
file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8
 \
 
file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155662): 
https://lists.openembedded.org/g/openembedded-core/message/155662
Mute This Topic: https://lists.openembedded.org/mt/85351457/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] shadow-sysroot: sync license with shadow

2021-09-03 Thread Ross Burton
This recipe is just a single data file from shadow, but as we can't
easily tell what license that specific file is under just copy the full
license statement.

Signed-off-by: Ross Burton 
---
 meta/recipes-extended/shadow/shadow-sysroot_4.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb 
b/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb
index 1f6232e43c4..e05fa237a24 100644
--- a/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb
@@ -2,7 +2,7 @@ SUMMARY = "Shadow utils requirements for useradd.bbclass"
 HOMEPAGE = "http://github.com/shadow-maint/shadow;
 BUGTRACKER = "http://github.com/shadow-maint/shadow/issues;
 SECTION = "base utils"
-LICENSE = "BSD | Artistic-1.0"
+LICENSE = "BSD-3-Clause | Artistic-1.0"
 LIC_FILES_CHKSUM = 
"file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
 
 DEPENDS = "base-passwd"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155660): 
https://lists.openembedded.org/g/openembedded-core/message/155660
Mute This Topic: https://lists.openembedded.org/mt/85351455/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] ovmf: set precise BSD license

2021-09-03 Thread Ross Burton
"BSD" is ambiguous, use the precise license BSD-2-Clause-Patent.

Signed-off-by: Ross Burton 
---
 meta/recipes-core/ovmf/ovmf_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/ovmf/ovmf_git.bb 
b/meta/recipes-core/ovmf/ovmf_git.bb
index 145240e77e8..4caf258e39f 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -2,8 +2,8 @@ SUMMARY = "OVMF - UEFI firmware for Qemu and KVM"
 DESCRIPTION = "OVMF is an EDK II based project to enable UEFI support for \
 Virtual Machines. OVMF contains sample UEFI firmware for QEMU and KVM"
 HOMEPAGE = "https://github.com/tianocore/tianocore.github.io/wiki/OVMF;
-LICENSE = "BSD-2-Clause"
-LICENSE:class-target = "${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 
'BSD & OpenSSL', 'BSD', d)}"
+LICENSE = "BSD-2-Clause-Patent"
+LICENSE:class-target = "${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 
'BSD-2-Clause-Patent & OpenSSL', 'BSD-2-Clause-Patent', d)}"
 LIC_FILES_CHKSUM = 
"file://OvmfPkg/License.txt;md5=06357ddc23f46577c2aeaeaf7b776d65"
 
 # Enabling Secure Boot adds a dependency on OpenSSL and implies
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155661): 
https://lists.openembedded.org/g/openembedded-core/message/155661
Mute This Topic: https://lists.openembedded.org/mt/85351456/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 08/14] valgrind: set precise BSD license

2021-09-03 Thread Ross Burton
"BSD" is ambiguous, use the precise license BSD-3-Clause.

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

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb 
b/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
index 2805ad0eb31..3fa483d8bc0 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
@@ -2,7 +2,7 @@ SUMMARY = "Valgrind memory debugger and instrumentation 
framework"
 HOMEPAGE = "http://valgrind.org/;
 DESCRIPTION = "Valgrind is an instrumentation framework for building dynamic 
analysis tools. There are Valgrind tools that can automatically detect many 
memory management and threading bugs, and profile your programs in detail."
 BUGTRACKER = "http://valgrind.org/support/bug_reports.html;
-LICENSE = "GPLv2 & GPLv2+ & BSD"
+LICENSE = "GPLv2 & GPLv2+ & BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
file://include/pub_tool_basics.h;beginline=6;endline=29;md5=41c410e8d3f305aee7aaa666b2e4f366
 \
 
file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df
 \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155659): 
https://lists.openembedded.org/g/openembedded-core/message/155659
Mute This Topic: https://lists.openembedded.org/mt/85351454/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] libxfont: set precise BSD license

2021-09-03 Thread Ross Burton
"BSD" is ambiguous, use the precise license BSD-3-Clause.

Note that the actual license text is BSD 4-Clause with clause 3 rescinded:

https://gitlab.freedesktop.org/xorg/lib/libxfont/-/blob/master/COPYING#L157

Signed-off-by: Ross Burton 
---
 meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb 
b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
index 94c6c66e878..f04780cf046 100644
--- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
+++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
@@ -6,7 +6,7 @@ such as freetype)."
 
 require xorg-lib-common.inc
 
-LICENSE = "MIT & MIT-style & BSD"
+LICENSE = "MIT & MIT-style & BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
 
 DEPENDS += "freetype xtrans xorgproto libfontenc zlib"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155658): 
https://lists.openembedded.org/g/openembedded-core/message/155658
Mute This Topic: https://lists.openembedded.org/mt/85351453/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 06/14] dev-manual/common-tasks: sync libxpm fragment with the recipe

2021-09-03 Thread Ross Burton
Specifically, the actual recipe now has LICENSE=MIT.

Signed-off-by: Ross Burton 
---
 documentation/dev-manual/common-tasks.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/documentation/dev-manual/common-tasks.rst 
b/documentation/dev-manual/common-tasks.rst
index 4a5011ea749..dba0885110d 100644
--- a/documentation/dev-manual/common-tasks.rst
+++ b/documentation/dev-manual/common-tasks.rst
@@ -2361,7 +2361,7 @@ into separate packages::
require xorg-lib-common.inc
 
SUMMARY = "Xpm: X Pixmap extension library"
-   LICENSE = "BSD"
+   LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=51f4270b012ecd4ab1a164f5f4ed6cf7"
DEPENDS += "libxext libsm libxt"
PE = "1"
-- 
2.25.1


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



  1   2   3   4   5   6   7   8   9   10   >