[OE-core] [PATCH] quilt: Fix merge.test race condition

2023-04-24 Thread Khem Raj
This is consistently seen with musl and grep from busybox
Therefore backport a patch from upstream to fix it

Signed-off-by: Khem Raj 
---
 meta/recipes-devtools/quilt/quilt.inc |  1 +
 ...t-Fix-a-race-condition-in-merge.test.patch | 48 +++
 2 files changed, 49 insertions(+)
 create mode 100644 
meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch

diff --git a/meta/recipes-devtools/quilt/quilt.inc 
b/meta/recipes-devtools/quilt/quilt.inc
index c93c38b83c..3374f4dfbf 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -13,6 +13,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
 file://0001-tests-Allow-different-output-from-mv.patch \
 file://fix-grep-3.8.patch \
 file://faildiff-order.patch \
+file://0001-test-Fix-a-race-condition-in-merge.test.patch \
 "
 
 SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch"
diff --git 
a/meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch
 
b/meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch
new file mode 100644
index 00..01d4c8befc
--- /dev/null
+++ 
b/meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch
@@ -0,0 +1,48 @@
+From c1ce964f3e9312100a60f03c1e1fdd601e1911f2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
+ 
+Date: Tue, 28 Feb 2023 18:45:15 +0100
+Subject: [PATCH] test: Fix a race condition in merge.test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Just like commit 4dfe7f9, (test: Fix a race condition, 2023-01-20),
+this fix a test race when stdout and stderr in any order.
+
+Upstream-Status: Backport 
[https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=c1ce964f3e9312100a60f03c1e1fdd601e1911f2]
+Signed-off-by: Đoàn Trần Công Danh 
+Signed-off-by: Jean Delvare 
+---
+ test/merge.test | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/test/merge.test b/test/merge.test
+index c64b33d..2e67d4f 100644
+--- a/test/merge.test
 b/test/merge.test
+@@ -39,8 +39,9 @@ Test the patch merging functionality of `quilt diff'.
+   > Applying patch %{P}c.diff
+   > Now at patch %{P}c.diff
+ 
+-  $ quilt diff -P b.diff | grep -v "^\\(---\\|+++\\)"
++  $ quilt diff -P b.diff >/dev/null
+   > Warning: more recent patches modify files in patch %{P}b.diff
++  $ quilt diff -P b.diff 2>/dev/null | grep -v "^\\(---\\|+++\\)"
+   >~ Index: [^/]+/abc\.txt
+   > ===
+   > @@ -1,3 +1,3 @@
+@@ -49,8 +50,9 @@ Test the patch merging functionality of `quilt diff'.
+   > +b+
+   >  c
+ 
+-  $ quilt diff --combine a.diff -P b.diff | grep -v "^\\(---\\|+++\\)"
++  $ quilt diff --combine a.diff -P b.diff >/dev/null
+   > Warning: more recent patches modify files in patch %{P}b.diff
++  $ quilt diff --combine a.diff -P b.diff 2>/dev/null | grep -v 
"^\\(---\\|+++\\)"
+   >~ Index: [^/]+/abc\.txt
+   > ===
+   > @@ -1,3 +1,3 @@
+-- 
+2.40.0
+
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180371): 
https://lists.openembedded.org/g/openembedded-core/message/180371
Mute This Topic: https://lists.openembedded.org/mt/98487502/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] unfs3: fix symlink time setting issue

2023-04-24 Thread Chen Qi via lists.openembedded.org
Add back the dropped 0001-attr-fix-utime-for-symlink.patch
to fix symlink time setting issue on NFS.

The problem could be reproduced by runing the following command
on nfs booted qemu:

  ln -s dest src && touch -h src

Apart from the rpm operations mentioned in the original patch,
'docker pull' also fails with a 'stale file' error. The common
pattern here is extracting files from a bundle and setting times
for them.

Signed-off-by: Chen Qi 
---
 .../0001-attr-fix-utime-for-symlink.patch | 88 +++
 meta/recipes-devtools/unfs3/unfs3_git.bb  |  1 +
 2 files changed, 89 insertions(+)
 create mode 100644 
meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch

diff --git 
a/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch 
b/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch
new file mode 100644
index 00..a0f3740d6a
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch
@@ -0,0 +1,88 @@
+From 7e789895919d57d573ebb8faa147d1286104cd01 Mon Sep 17 00:00:00 2001
+From: Rui Wang 
+Date: Mon, 24 Apr 2023 02:57:57 -0700
+Subject: [PATCH] attr: fix utime for symlink
+
+unfs3 has an old defect that it can not change the timestamps of a
+symlink file because it only uses utime(), which will follow the
+symlink. This will not cause an error if the symlink points to an
+existent file. But under some special situation, such as installing
+a rpm package, rpm tool will create the symlink first and try to
+modify the timestamps of it, when the target file is non-existent.
+This will cause an ESTALE error. Making rpm tool ignore this error
+is a solution, but not the best one. An acceptable approach is
+Making unfs3 support lutimes(), which can modify the symlink file
+itself. Considering not every system support this function, so a
+function checking is necessary.
+
+Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/35]
+
+Signed-off-by: Chen Qi 
+---
+ attr.c | 15 +++
+ backend_unix.h |  2 ++
+ configure.ac   |  1 +
+ 3 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/attr.c b/attr.c
+index 0ce9375..930ce6e 100644
+--- a/attr.c
 b/attr.c
+@@ -285,7 +285,7 @@ post_op_attr get_post_cached(struct svc_req * req)
+ static nfsstat3 set_time(const char *path, backend_statstruct buf, sattr3 new)
+ {
+ time_t new_atime, new_mtime;
+-struct utimbuf utim;
++struct timeval stamps[2];
+ int res;
+ 
+ /* set atime and mtime */
+@@ -307,10 +307,17 @@ static nfsstat3 set_time(const char *path, 
backend_statstruct buf, sattr3 new)
+   else   /* DONT_CHANGE */
+   new_mtime = buf.st_mtime;
+ 
+-  utim.actime = new_atime;
+-  utim.modtime = new_mtime;
++  stamps[0].tv_sec = new_atime;
++  stamps[0].tv_usec = 0;
++  stamps[1].tv_sec = new_mtime;
++  stamps[1].tv_usec = 0;
++
++#if HAVE_LUTIMES
++  res = backend_lutimes(path, stamps);
++#else
++  res = backend_utimes(path, stamps);
++#endif
+ 
+-  res = backend_utime(path, );
+   if (res == -1)
+   return setattr_err();
+ }
+diff --git a/backend_unix.h b/backend_unix.h
+index 4db72ae..9cce9ab 100644
+--- a/backend_unix.h
 b/backend_unix.h
+@@ -61,6 +61,8 @@
+ #define backend_symlink symlink
+ #define backend_truncate truncate
+ #define backend_utime utime
++#define backend_utimes utimes
++#define backend_lutimes lutimes
+ #define backend_statstruct struct stat
+ #define backend_dirstream DIR
+ #define backend_statvfsstruct struct statvfs
+diff --git a/configure.ac b/configure.ac
+index d46c905..c21afe3 100644
+--- a/configure.ac
 b/configure.ac
+@@ -32,6 +32,7 @@ AC_CHECK_FUNCS(setresuid setresgid)
+ AC_CHECK_FUNCS(vsyslog)
+ AC_CHECK_FUNCS(lchown)
+ AC_CHECK_FUNCS(setgroups)
++AC_CHECK_FUNCS(lutimes)
+ UNFS3_COMPILE_WARNINGS
+ 
+ PKG_CHECK_MODULES([TIRPC], [libtirpc])
+-- 
+2.40.0
+
diff --git a/meta/recipes-devtools/unfs3/unfs3_git.bb 
b/meta/recipes-devtools/unfs3/unfs3_git.bb
index 9913a503e8..c5b7898b3c 100644
--- a/meta/recipes-devtools/unfs3/unfs3_git.bb
+++ b/meta/recipes-devtools/unfs3/unfs3_git.bb
@@ -17,6 +17,7 @@ SRC_URI = 
"git://github.com/unfs3/unfs3.git;protocol=https;branch=master \
file://0001-Alias-off64_t-to-off_t-on-linux-if-not-defined.patch \
file://0001-locate.c-Include-attr.h.patch \
file://0001-fix-building-on-macOS.patch \
+   file://0001-attr-fix-utime-for-symlink.patch \
"
 SRCREV = "c8f2d2cd4529955419bad0e163f88d47ff176b8d"
 UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P\d+(\.\d+)+)"
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180370): 
https://lists.openembedded.org/g/openembedded-core/message/180370
Mute This Topic: https://lists.openembedded.org/mt/98487332/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: 

[kirkstone][oe-core][PATCH 1/1] ghostscript: fix CVE-2023-29979

2023-04-24 Thread Joe Slater via lists.openembedded.org
From: Joe Slater 

Backport from 10.02.0 (unreleased).

Signed-off-by: Joe Slater 
---
 .../ghostscript/cve-2023-28879.patch  | 60 +++
 .../ghostscript/ghostscript_9.55.0.bb |  1 +
 2 files changed, 61 insertions(+)
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch

diff --git a/meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch 
b/meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch
new file mode 100644
index 00..9b057d609a
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch
@@ -0,0 +1,60 @@
+From 37ed5022cecd584de868933b5b60da2e995b3179 Mon Sep 17 00:00:00 2001
+From: Ken Sharp 
+Date: Fri, 24 Mar 2023 13:19:57 +
+Subject: [PATCH] Graphics library - prevent buffer overrun in (T)BCP encoding
+
+Bug #706494 "Buffer Overflow in s_xBCPE_process"
+
+As described in detail in the bug report, if the write buffer is filled
+to one byte less than full, and we then try to write an escaped
+character, we overrun the buffer because we don't check before
+writing two bytes to it.
+
+This just checks if we have two bytes before starting to write an
+escaped character and exits if we don't (replacing the consumed byte
+of the input).
+
+Up for further discussion; why do we even permit a BCP encoding filter
+anyway ? I think we should remove this, at least when SAFER is true.
+---
+CVE: CVE-2023-28879
+
+Upstream-Status: Backport [see text]
+
+git://git.ghostscript.com/ghostpdl
+cherry-pick
+
+Signed-off-by: Joe Slater 
+
+---
+ base/sbcp.c | 10 +-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/base/sbcp.c b/base/sbcp.c
+index 979ae0992..47fc233ec 100644
+--- a/base/sbcp.c
 b/base/sbcp.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2001-2021 Artifex Software, Inc.
++/* Copyright (C) 2001-2023 Artifex Software, Inc.
+All Rights Reserved.
+ 
+This software is provided AS-IS with no warranty, either express or
+@@ -50,6 +50,14 @@ s_xBCPE_process(stream_state * st, stream_cursor_read * pr,
+ byte ch = *++p;
+ 
+ if (ch <= 31 && escaped[ch]) {
++/* Make sure we have space to store two characters in the write 
buffer,
++ * if we don't then exit without consuming the input character, 
we'll process
++ * that on the next time round.
++ */
++if (pw->limit - q < 2) {
++p--;
++break;
++}
+ if (p == rlimit) {
+ p--;
+ break;
+-- 
+2.25.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb
index 365420fb64..f29c57beea 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb
@@ -34,6 +34,7 @@ SRC_URI_BASE = 
"https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
 file://avoid-host-contamination.patch \
 file://mkdir-p.patch \
 file://CVE-2022-2085.patch \
+file://cve-2023-28879.patch \
 "
 
 SRC_URI = "${SRC_URI_BASE} \
-- 
2.25.1


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



Re: [v2][oe-core][PATCH 1/1] ghostscript: fix CVE-2023-28879

2023-04-24 Thread Joe Slater via lists.openembedded.org
Thanks for fixing the sender address.  I modified my git config, but this has 
never happened before and I think might be because the Signed-off-by in the 
original patch is malformed -- it's missing the terminating ">".

Joe

> -Original Message-
> From: Luca Ceresoli 
> Sent: Monday, April 24, 2023 11:36 AM
> To: Joe Slater via lists.openembedded.org
> 
> Cc: Slater, Joseph ; openembedded-
> c...@lists.openembedded.org; MacLeod, Randy
> 
> Subject: Re: [v2][oe-core][PATCH 1/1] ghostscript: fix CVE-2023-28879
> 
> On Mon, 24 Apr 2023 10:34:32 -0700
> "Joe Slater via lists.openembedded.org"
>  wrote:
>  ^^^
> 
> As you can see your sender address has been mangled, and as a result the patch
> is rejected by the the openembedded git server. This is not your fault, but we
> need you to modify your git configuration to prevent this from happening in 
> the
> future. Have a look at the wiki for more info and how to solve that:
> 
> https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbe
> dded#Fixing_your_From_identity
> 
> I'm taking your patch for testing on the autobuilders, fixing it manually so 
> you
> don't need to resend your patch this time.
> 
> Best regards,
> Luca
> 
> --
> Luca Ceresoli, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

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



[OE-core] Current high bug count owners for Yocto Project 4.2

2023-04-24 Thread Stephen Jolley
All,

Below is the list as of top 37 bug owners as of the end of WW16 of who have
open medium or higher bugs and enhancements against YP 4.2. There are 3
possible work days left until the final release candidates for YP 4.2 needs
to be released.


Who

Count


michael.opdenac...@bootlin.com

36


ross.bur...@arm.com

36


richard.pur...@linuxfoundation.org

32


david.re...@windriver.com

26


randy.macl...@windriver.com

25


bruce.ashfi...@gmail.com

25


jpewhac...@gmail.com

21


pa...@zhukoff.net

11


sakib.sa...@windriver.com

7


p.lob...@welotec.com

6


pi...@pidge.org

4


tim.orl...@konsulko.com

4


sundeep.kokko...@gmail.com

4


jon.ma...@arm.com

3


alexis.loth...@bootlin.com

2


rybczyn...@gmail.com

2


sundeep.kokko...@windriver.com

2


thr...@amazon.de

2


frederic.martins...@gmail.com

2


wen.yan@intel.com

1


fawzi.kha...@smile.fr

1


martin.ja...@gmail.com

1


geissona...@yahoo.com

1


alexandre.bell...@bootlin.com

1


mark.asselst...@windriver.com

1


yashinde...@gmail.com

1


tvgamb...@gmail.com

1


mathew.pro...@gmail.com

1


frank.wo...@smile.fr

1


fathi.bou...@linaro.org

1


thomas.per...@bootlin.com

1


louis.ran...@syslinbit.com

1


johannes.schri...@blueye.no

1


yash.shi...@windriver.com

1


jens.ge...@desy.de

1


Grand Total

1


Total Result

401

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

*Cell:(208) 244-4460

* Email:  sjolley.yp...@gmail.com
 

 


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



[OE-core] [meta-oe][PATCH 2/2] lcov: Upgrade 1.14 -> 1.16

2023-04-24 Thread alexyao1 via lists.openembedded.org
From: Alex Yao 

This upgrades lcov to 1.16 and removes backported patches which are
now included since 1.15. This also removes dependencies added from
backported patches since the new version removes the need for these
dependencies.

Signed-off-by: Alex Yao 
---
 ...Add-intermediate-text-format-support.patch | 898 --
 ...Add-intermediate-JSON-format-support.patch | 247 -
 .../lcov/{lcov_1.14.bb => lcov_1.16.bb}   |  14 +-
 3 files changed, 3 insertions(+), 1156 deletions(-)
 delete mode 100644 
meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 delete mode 100644 
meta-oe/recipes-support/lcov/files/0002-geninfo-Add-intermediate-JSON-format-support.patch
 rename meta-oe/recipes-support/lcov/{lcov_1.14.bb => lcov_1.16.bb} (79%)

diff --git 
a/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 
b/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
deleted file mode 100644
index 9ac0770f9..0
--- 
a/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
+++ /dev/null
@@ -1,898 +0,0 @@
-From ec3e1f411c332cbc2f2bc7ab7e2175ebf918b37a Mon Sep 17 00:00:00 2001
-From: Peter Oberparleiter 
-Date: Fri, 24 May 2019 16:56:52 +0200
-Subject: [PATCH 1/2] geninfo: Add intermediate text format support
-
-This change adds support for parsing the output of gcov's intermediate
-text file format as implemented by GCC versions 5 to 8.  The use of the
-gcov intermediate format should increase processing speed. It also
-provides branch coverage data when using the --initial command line
-option.
-
-Users can control whether geninfo uses the intermediate format via the
-geninfo_intermediate configuration file option. Valid values are:
-
- 0: Use normal text format
- 1: Use intermediate format
-  auto: Use intermediate format if available. This is the default.
-
-Signed-off-by: Peter Oberparleiter 

- bin/geninfo  | 567 ---
- lcovrc   |   3 +
- man/lcovrc.5 |  24 +++
- 3 files changed, 521 insertions(+), 73 deletions(-)
-
-Upstream-Status: Backport
-Download URL: 
https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7
-
-diff --git a/bin/geninfo b/bin/geninfo
-index f41eaec..027 100755
 a/bin/geninfo
-+++ b/bin/geninfo
-@@ -54,6 +54,8 @@ use warnings;
- use File::Basename;
- use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir
- splitpath catpath/;
-+use File::Temp qw(tempfile tempdir);
-+use File::Copy qw(copy);
- use Getopt::Long;
- use Digest::MD5 qw(md5_base64);
- use Cwd qw/abs_path/;
-@@ -163,13 +165,13 @@ sub solve_relative_path($$);
- sub read_gcov_header($);
- sub read_gcov_file($);
- sub info(@);
-+sub process_intermediate($$$);
- sub map_llvm_version($);
- sub version_to_str($);
- sub get_gcov_version();
- sub system_no_output($@);
- sub read_config($);
- sub apply_config($);
--sub get_exclusion_data($);
- sub apply_exclusion_data($$);
- sub process_graphfile($$);
- sub filter_fn_name($);
-@@ -264,6 +266,8 @@ our $gcno_split_crc;
- our $func_coverage = 1;
- our $br_coverage = 0;
- our $rc_auto_base = 1;
-+our $rc_intermediate = "auto";
-+our $intermediate;
- our $excl_line = "LCOV_EXCL_LINE";
- our $excl_br_line = "LCOV_EXCL_BR_LINE";
-
-@@ -331,6 +335,7 @@ if ($config || %opt_rc)
-   "geninfo_compat"=> \$opt_compat,
-   "geninfo_adjust_src_path"   => \$rc_adjust_src_path,
-   "geninfo_auto_base" => \$rc_auto_base,
-+  "geninfo_intermediate"  => \$rc_intermediate,
-   "lcov_function_coverage"=> \$func_coverage,
-   "lcov_branch_coverage"  => \$br_coverage,
-   "lcov_excl_line"=> \$excl_line,
-@@ -460,15 +465,38 @@ if (system_no_output(3, $gcov_tool, "--help") == -1)
- }
-
- ($gcov_version, $gcov_version_string) = get_gcov_version();
-+$gcov_caps = get_gcov_capabilities();
-+
-+# Determine intermediate mode
-+if ($rc_intermediate eq "0") {
-+  $intermediate = 0;
-+} elsif ($rc_intermediate eq "1") {
-+  $intermediate = 1;
-+} elsif (lc($rc_intermediate) eq "auto") {
-+  # Use intermediate format if supported by gcov
-+  $intermediate = $gcov_caps->{'intermediate-format'} ? 1 : 0;
-+} else {
-+  die("ERROR: invalid value for geninfo_intermediate: ".
-+  "'$rc_intermediate'\n");
-+}
-+
-+if ($intermediate) {
-+  info("Using intermediate gcov format\n");
-+  if ($opt_derive_func_data) {
-+  warn("WARNING: --derive-func-data is not compatible with ".
-+   "intermediate format - ignoring\n");
-+  $opt_derive_func_data = 0;
-+  }
-+}
-
- # Determine gcov options
--$gcov_caps = get_gcov_capabilities();
- push(@gcov_options, "-b") if 

[OE-core] [meta-oe][PATCH 1/2] lcov: Fix Perl Path

2023-04-24 Thread alexyao1 via lists.openembedded.org
From: Alex Yao 

Fixes an issue where lcov is using the system Perl rather than the yocto
provided Perl. This causes packages to not be found during runtime such
as PerlIO::gzip.

Signed-off-by: Alex Yao 
---
 meta-oe/recipes-support/lcov/lcov_1.14.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/lcov/lcov_1.14.bb 
b/meta-oe/recipes-support/lcov/lcov_1.14.bb
index 47062cca5..f18c7b18e 100755
--- a/meta-oe/recipes-support/lcov/lcov_1.14.bb
+++ b/meta-oe/recipes-support/lcov/lcov_1.14.bb
@@ -59,7 +59,7 @@ SRC_URI[md5sum] = "0220d01753469f83921f8f41ae5054c1"
 SRC_URI[sha256sum] = 
"14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a"

 do_install() {
-oe_runmake install PREFIX=${D}${prefix} CFG_DIR=${D}${sysconfdir}
+oe_runmake install PREFIX=${D}${prefix} CFG_DIR=${D}${sysconfdir} 
LCOV_PERL_PATH="/usr/bin/env perl"
 }

 BBCLASSEXTEND = "native nativesdk"
--
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180365): 
https://lists.openembedded.org/g/openembedded-core/message/180365
Mute This Topic: https://lists.openembedded.org/mt/98479656/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] make-mod-scripts: preserve libraries when rm_work is used

2023-04-24 Thread Bruce Ashfield
On Mon, Apr 24, 2023 at 6:30 AM Jose Quaresma  wrote:
>
>
>
> Bruce Ashfield  escreveu no dia domingo, 23/04/2023 
> à(s) 20:55:
>>
>> On Sat, Apr 22, 2023 at 9:06 AM Christoph Lauer
>>  wrote:
>> >
>> > Am 21.04.23 um 22:28 schrieb Bruce Ashfield:
>> > > On Wed, Apr 19, 2023 at 11:03 PM Bruce Ashfield via
>> > > lists.openembedded.org
>> > >  wrote:
>> > >>
>> > >> On Wed, Apr 19, 2023 at 6:54 PM Richard Purdie
>> > >>  wrote:
>> > >>>
>> > >>> On Wed, 2023-04-19 at 23:34 +0100, Jose Quaresma wrote:
>> >  Hi,
>> > 
>> >  Not related with the previous discussion but just for
>> >  your information.
>> >  The rm_work.bbclass has an exception for the kernel recipes [1].
>> >  So I don't understand why we can't do the same for the make-mod-
>> >  scripts
>> >  who is the twin brother of all these kernel recipes.
>> > 
>> >  [1]
>> >  https://git.openembedded.org/openembedded-core/tree/meta/classes/rm_work.bbclass#n168
>> > >>>
>> > >>> Ideally we wouldn't be doing this for the kernel recipes.
>> > >>>
>> > >>> There is also a big difference to that and the proposed patch. The
>> > >>> proposed patch was preserving a specific directory rather than an
>> > >>> entire recipe. Removing the task stamps but leaving a small piece of
>> > >>> WORKDIR is quite different to preserving WORKDIR and STAMPS for a
>> > >>> specific recipe. The former is not tested and will break things. The
>> > >>> latter is better tolerated by bitbake.
>> > >>
>> > >> Agreed.
>> > >>
>> > >> Plus, I am working on this now.
>> > >>
>> > >> I have static linking of the scripts/tools working, but what I haven't
>> > >> figured out is how to do that without patching the Makefiles.
>> > >>
>> > >
>> > > It turned out to be quite the battle to get older kernels what was
>> > > required for static linking of the tools.
>> > >
>> > > Attached is my WIP patch. I'm out of the office early next week, but
>> > > will revisit it once I'm back.
>> > >
>> > > Bruce
>> > >
>> > >> Next up will be some rpath trickery.
>> > >>
>> > >> Bruce
>> > >>
>> > >>>
>> > >>> So yes, we could do the same. I'm sure there will be other recipes
>> > >>> people want to preserve for other reasons. Where do we draw the line?
>> > >>> We could preserve everything and drop rm_work, then we wouldn't have
>> > >>> these problems? :)
>> > >>>
>> > >>> Cheers,
>> > >>>
>> > >>> Richard
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> - Thou shalt not follow the NULL pointer, for chaos and madness await
>> > >> thee at its end
>> > >> - "Use the force Harry" - Gandalf, Star Trek II
>> > >>
>> > >> 
>> > >>
>> > >
>> > >
>> >
>> > Thank you for your work, I see you put some time and effort into it.
>> > HOSTPKG_CONFIG is, as you mentioned, available since kernel version 5.19
>>
>> Yes, I realize that and documented it in the patch ... but I also
>> tested on pre-5.19 kernels and what I have in the patch works. Did it
>> not work in your testing ?
>
>
> I will test the patch on a couple of kernel versions with some of them 
> pre-5.19
> but all in 5 major versions.
> I will say something about my results later this week.

5.15-stable also has the pkg-config changes

Bruce

>
> Thanks for working on this one.
>
> Jose
>
>>
>>
>> > (see kernel patch [1]), so we need a way to call 'pkg-config --static'
>> > with pre-5.19 kernels. A way without modifying the Makefile would be to
>> > modify openssls pkg-config in recipe-sysroot-native of make-mod-script,
>> > so 'pkg-config --libs' actually shows the dependencies of 'pkg-config
>> > --static --libs', but it's a bit hacky.
>>
>> Already considered, and discarded. That's not going to fly.
>>
>> >
>> > Also fully-static executables still need the same glibc during runtime
>> > that they were built with, which makes them error-prone and is generally
>> > discouraged. As an alternative, we could build dynamic executables that
>> > use the static libcrypto library. The linker links by default against
>> > the shared library, so we could remove them from recipe-sysroot-native
>> > to force linking against the static library (again, somewhat hacky).
>>
>> Also considered and discarded.
>>
>> As do the dynamically linked ones for the c runtime. We aren't talking
>> about using these outside of a single build and they are generated on
>> the fly, so again, there's very little concern about runtimes changing
>> after linking.. There's less risk in static than in the alternatives.
>>
>> Bruce
>>
>>
>> >
>> > [1]
>> > https://github.com/torvalds/linux/commit/d5ea4fece4508bf8e72b659cd22fa4840d8d61e5
>>
>>
>>
>> --
>> - Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end
>> - "Use the force Harry" - Gandalf, Star Trek II
>
>
>
> --
> Best regards,
>
> José Quaresma



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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this 

[OE-core] Yocto Project Newcomer & Unassigned Bugs - Help Needed

2023-04-24 Thread Stephen Jolley
All,

 

The triage team is starting to try and collect up and classify bugs which a
newcomer to the project would be able to work on in a way which means people
can find them. They're being listed on the triage page under the appropriate
heading:

https://wiki.yoctoproject.org/wiki/Bug_Triage#Newcomer_Bugs  Also please
review:
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded and
how to create a bugzilla account at:

https://bugzilla.yoctoproject.org/createaccount.cgi

The idea is these bugs should be straight forward for a person to help work
on who doesn't have deep experience with the project.  If anyone can help,
please take ownership of the bug and send patches!  If anyone needs
help/advice there are people on irc who can likely do so, or some of the
more experienced contributors will likely be happy to help too.

 

Also, the triage team meets weekly and does its best to handle the bugs
reported into the Bugzilla. The number of people attending that meeting has
fallen, as have the number of people available to help fix bugs. One of the
things we hear users report is they don't know how to help. We (the triage
team) are therefore going to start reporting out the currently 429
unassigned or newcomer bugs.

 

We're hoping people may be able to spare some time now and again to help out
with these.  Bugs are split into two types, "true bugs" where things don't
work as they should and "enhancements" which are features we'd want to add
to the system.  There are also roughly four different "priority" classes
right now,  "4.2", "4.3", "4.99" and "Future", the more pressing/urgent
issues being in "4.2" and then "4.3".

 

Please review this link and if a bug is something you would be able to help
with either take ownership of the bug, or send me (sjolley.yp...@gmail.com
 ) an e-mail with the bug number you would
like and I will assign it to you (please make sure you have a Bugzilla
account).  The list is at:
https://wiki.yoctoproject.org/wiki/Bug_Triage_Archive#Unassigned_or_Newcomer
_Bugs

 

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

*Cell:(208) 244-4460

* Email:  sjolley.yp...@gmail.com
 

 


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



Re: [v2][oe-core][PATCH 1/1] ghostscript: fix CVE-2023-28879

2023-04-24 Thread Luca Ceresoli via lists.openembedded.org
On Mon, 24 Apr 2023 10:34:32 -0700
"Joe Slater via lists.openembedded.org"
 wrote:
 ^^^

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

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

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

Best regards,
Luca

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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180362): 
https://lists.openembedded.org/g/openembedded-core/message/180362
Mute This Topic: https://lists.openembedded.org/mt/98476248/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][dunfell][PATCH] go: Security fix for CVE-2023-24538

2023-04-24 Thread Steve Sakoman
Unfortunately the dunfell version of this patch does not apply
(kirkstone seems fine):

Applying: go: Security fix for CVE-2023-24538
error: corrupt patch at line 594
error: could not build fake ancestor
Patch failed at 0001 go: Security fix for CVE-2023-24538
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Steve

On Sun, Apr 23, 2023 at 7:43 PM Shubham Kulkarni  wrote:
>
> From: Shubham Kulkarni 
>
> html/template: disallow actions in JS template literals
>
> Backport from 
> https://github.com/golang/go/commit/b1e3ecfa06b67014429a197ec5e134ce4303ad9b
>
> Signed-off-by: Shubham Kulkarni 
> ---
>  meta/recipes-devtools/go/go-1.14.inc   |   2 +
>  .../go/go-1.14/CVE-2023-24538-1.patch  | 633 
> +
>  .../go/go-1.14/CVE-2023-24538-2.patch  | 371 
>  3 files changed, 1006 insertions(+)
>  create mode 100644 meta/recipes-devtools/go/go-1.14/CVE-2023-24538-1.patch
>  create mode 100644 meta/recipes-devtools/go/go-1.14/CVE-2023-24538-2.patch
>
> diff --git a/meta/recipes-devtools/go/go-1.14.inc 
> b/meta/recipes-devtools/go/go-1.14.inc
> index 56f4f12..01f9f1e 100644
> --- a/meta/recipes-devtools/go/go-1.14.inc
> +++ b/meta/recipes-devtools/go/go-1.14.inc
> @@ -57,6 +57,8 @@ SRC_URI += "\
>  file://CVE-2022-41722-2.patch \
>  file://CVE-2020-29510.patch \
>  file://CVE-2023-24537.patch \
> +file://CVE-2023-24538-1.patch \
> +file://CVE-2023-24538-2.patch \
>  "
>
>  SRC_URI_append_libc-musl = " 
> file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
> diff --git a/meta/recipes-devtools/go/go-1.14/CVE-2023-24538-1.patch 
> b/meta/recipes-devtools/go/go-1.14/CVE-2023-24538-1.patch
> new file mode 100644
> index 000..4b0d200
> --- /dev/null
> +++ b/meta/recipes-devtools/go/go-1.14/CVE-2023-24538-1.patch
> @@ -0,0 +1,633 @@
> +From 64779a6dfb11631133ff3cfba7ae7e449c191a88 Mon Sep 17 00:00:00 2001
> +From: empijei 
> +Date: Fri, 27 Mar 2020 19:27:55 +0100
> +Subject: [PATCH 1/2] html/template,text/template: switch to Unicode escapes
> + for JSON compatibility
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +The existing implementation is not compatible with JSON
> +escape as it uses hex escaping.
> +Unicode escape, instead, is valid for both JSON and JS.
> +This fix avoids creating a separate escaping context for
> +scripts of type "application/ld+json" and it is more
> +future-proof in case more JSON+JS contexts get added
> +to the platform (e.g. import maps).
> +
> +Fixes #33671
> +Fixes #37634
> +
> +Change-Id: Id6f6524b4abc52e81d9d744d46bbe5bf2e081543
> +Reviewed-on: https://go-review.googlesource.com/c/go/+/226097
> +Reviewed-by: Carl Johnson 
> +Reviewed-by: Daniel Martí 
> +Run-TryBot: Daniel Martí 
> +TryBot-Result: Gobot Gobot 
> +
> +Upstream-Status: Backport from 
> https://github.com/golang/go/commit/d4d298040d072ddacea0e0d6b55fb148fff18070
> +CVE: CVE-2023-24538
> +Signed-off-by: Shubham Kulkarni 
> +---
> + src/html/template/content_test.go  | 70 
> +++---
> + src/html/template/escape_test.go   |  6 ++--
> + src/html/template/example_test.go  |  6 ++--
> + src/html/template/js.go| 70 
> +++---
> + src/html/template/js_test.go   | 68 ++--
> + src/html/template/template_test.go | 39 +
> + src/text/template/exec_test.go |  6 ++--
> + src/text/template/funcs.go |  8 ++---
> + 8 files changed, 163 insertions(+), 110 deletions(-)
> +
> +diff --git a/src/html/template/content_test.go 
> b/src/html/template/content_test.go
> +index 72d56f5..bd86527 100644
> +--- a/src/html/template/content_test.go
>  b/src/html/template/content_test.go
> +@@ -18,7 +18,7 @@ func TestTypedContent(t *testing.T) {
> +   HTML(`Hello, World tc!`),
> +   HTMLAttr(` dir="ltr"`),
> +   JS(`c && alert("Hello, World!");`),
> +-  JSStr(`Hello, World & O'Reilly\x21`),
> ++  JSStr(`Hello, World & O'Reilly\u0021`),
> +   URL(`greeting=H%69,=(World)`),
> +   Srcset(`greeting=H%69,=(World) 2x, 
> https://golang.org/favicon.ico 500.5w`),
> +   URL(`,foo/,`),
> +@@ -70,7 +70,7 @@ func TestTypedContent(t *testing.T) {
> +   `Hello, World tc!`,
> +   ` dir=ltr`,
> +   `c  alert(Hello, 
> World!);`,
> +-  `Hello, World  OReilly\x21`,
> ++  `Hello, World  OReilly\u0021`,
> +   `greeting=H%69,addressee=(World)`,
> +   `greeting=H%69,addressee=(World) 

[v2][oe-core][PATCH 1/1] ghostscript: fix CVE-2023-28879

2023-04-24 Thread Joe Slater via lists.openembedded.org
Backport from tag ghostpdl-10.01.1-gse-10174 which is
after 10.01.1.

Signed-off-by: Joe Slater 
---
 .../ghostscript/cve-2023-28879.patch  | 60 +++
 .../ghostscript/ghostscript_10.0.0.bb |  1 +
 2 files changed, 61 insertions(+)
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch

diff --git a/meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch 
b/meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch
new file mode 100644
index 00..604b927521
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/cve-2023-28879.patch
@@ -0,0 +1,60 @@
+From 37ed5022cecd584de868933b5b60da2e995b3179 Mon Sep 17 00:00:00 2001
+From: Ken Sharp 
+Date: Fri, 24 Mar 2023 13:19:57 +
+Subject: [PATCH] Graphics library - prevent buffer overrun in (T)BCP encoding
+
+Bug #706494 "Buffer Overflow in s_xBCPE_process"
+
+As described in detail in the bug report, if the write buffer is filled
+to one byte less than full, and we then try to write an escaped
+character, we overrun the buffer because we don't check before
+writing two bytes to it.
+
+This just checks if we have two bytes before starting to write an
+escaped character and exits if we don't (replacing the consumed byte
+of the input).
+
+Up for further discussion; why do we even permit a BCP encoding filter
+anyway ? I think we should remove this, at least when SAFER is true.
+---
+CVE: CVE-2023-28879
+
+Upstream-Status: Backport [see text]
+
+git://git.ghostscript.com/ghostpdl
+cherry-pick
+
+Signed-off-by: Joe Slater limit - q < 2) {
++p--;
++break;
++}
+ if (p == rlimit) {
+ p--;
+ break;
+-- 
+2.25.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb 
b/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb
index 56a93632e2..86ecdbe24a 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb
@@ -34,6 +34,7 @@ SRC_URI_BASE = 
"https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
 file://avoid-host-contamination.patch \
 file://mkdir-p.patch \
 file://cross-compile.patch \
+file://cve-2023-28879.patch \
 "
 
 SRC_URI = "${SRC_URI_BASE} \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180360): 
https://lists.openembedded.org/g/openembedded-core/message/180360
Mute This Topic: https://lists.openembedded.org/mt/98476248/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/1] ghostscript: fix CVE-2023-28879

2023-04-24 Thread Joe Slater via lists.openembedded.org
Backport from tag ghostpdl-10.01.1-gse-10174 which is
after 10.01.1.

Signed-off-by: Joe Slater 
---
 meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb 
b/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb
index 56a93632e2..86ecdbe24a 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb
@@ -34,6 +34,7 @@ SRC_URI_BASE = 
"https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
 file://avoid-host-contamination.patch \
 file://mkdir-p.patch \
 file://cross-compile.patch \
+file://cve-2023-28879.patch \
 "
 
 SRC_URI = "${SRC_URI_BASE} \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180359): 
https://lists.openembedded.org/g/openembedded-core/message/180359
Mute This Topic: https://lists.openembedded.org/mt/98476159/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 v2] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-04-24 Thread Randolph Sapp via lists.openembedded.org

On 4/24/23 03:48, Luca Ceresoli wrote:

Hello Randolph,

On Fri, 21 Apr 2023 16:26:13 -0500
"Randolph Sapp via lists.openembedded.org"
 wrote:
  

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


Ah! Thanks for the heads up. I've just adjust my configs.


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

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

Best regards,
Luca


Cool, thanks!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180358): 
https://lists.openembedded.org/g/openembedded-core/message/180358
Mute This Topic: https://lists.openembedded.org/mt/98420230/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 v2 3/9] barebox: set default BAREBOX_CONFIG for qemu machines

2023-04-24 Thread Enrico Jörns
Am Dienstag, dem 11.04.2023 um 16:16 +0200 schrieb Alexander Kanavin:
> On Mon, 3 Apr 2023 at 13:42, Enrico Jörns  wrote:
> > > > +# set defaults for oe-core MACHINEs to allow building barebox
> > > > +BAREBOX_CONFIG:qemuarm = "vexpress_defconfig"
> > > > +BAREBOX_CONFIG:qemuarm64 = "qemu_virt64_defconfig"
> > > > +BAREBOX_CONFIG:qemux86-64 = "efi_defconfig"
> > > 
> > > As all three are different perhaps there could be commentary in the
> > > recipe explaining why that and how they differ? Note that there's also
> > > a qemuall override if there's a single configuration that works for
> > > all qemu targets.
> > 
> > as these three are different archs/machines, I do not find it surprising 
> > that they require
> > different
> > configs. I assumed that this was self-explaining.
> 
> Not at all. What is this 'vexpress' thingy? What does 'express' mean?
> Why does it apply to arm, but not arm64? Why arm64 is using
> 'qemu_virt64', but not any other targets, if that config does not seem
> arm-specific? Why is x86 using 'efi' but not the arm targets?
> 
> The choices you made here should be explained.

Vexpress is "Versatile Express" which once was the ARMv7 reference platform and 
is one of the
platforms emulated in QEMU (when using "-machine vexpress-a9" or "-machine 
vexpress-a15").

virt, or virt64 are the generic QEMU ARM platform. For historical reasons, 
there is only a dedicated
vexpress defconfig in barebox.

EFI is used for x86 only, since on ARM barebox is normally used as the primary 
loader only.


However, since barebox builds are multi-platform builds by default, it should 
be possible to use the
standard multi_v7_defconfig and multi_v8_defconfig instead (for arm). I'll give 
it a try.

Regards, Enrico

> 
> Alex
> 

-- 
Pengutronix e.K.   | Enrico Jörns|
Embedded Linux Consulting & Support| https://www.pengutronix.de/ |
Steuerwalder Str. 21   | Phone: +49-5121-206917-180  |
31137 Hildesheim, Germany  | Fax:   +49-5121-206917-9|


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180357): 
https://lists.openembedded.org/g/openembedded-core/message/180357
Mute This Topic: https://lists.openembedded.org/mt/97970650/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][mickledore] connman: backport fix for CVE-2023-28488

2023-04-24 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 ...ify-and-sanitize-packet-length-first.patch | 63 +++
 .../connman/connman_1.41.bb   |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 
meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch

diff --git 
a/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch
 
b/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch
new file mode 100644
index 000..8e2f47a1d55
--- /dev/null
+++ 
b/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch
@@ -0,0 +1,63 @@
+From 99e2c16ea1cced34a5dc450d76287a1c3e762138 Mon Sep 17 00:00:00 2001
+From: Daniel Wagner 
+Date: Tue, 11 Apr 2023 08:12:56 +0200
+Subject: [PATCH] gdhcp: Verify and sanitize packet length first
+
+Avoid overwriting the read packet length after the initial test. Thus
+move all the length checks which depends on the total length first
+and do not use the total lenght from the IP packet afterwards.
+
+Fixes CVE-2023-28488
+
+Reported by Polina Smirnova 
+
+CVE: CVE-2023-28488
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+---
+ gdhcp/client.c | 16 +---
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/gdhcp/client.c b/gdhcp/client.c
+index 7efa7e45..82017692 100644
+--- a/gdhcp/client.c
 b/gdhcp/client.c
+@@ -1319,9 +1319,9 @@ static bool sanity_check(struct ip_udp_dhcp_packet 
*packet, int bytes)
+ static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
+   struct sockaddr_in *dst_addr)
+ {
+-  int bytes;
+   struct ip_udp_dhcp_packet packet;
+   uint16_t check;
++  int bytes, tot_len;
+ 
+   memset(, 0, sizeof(packet));
+ 
+@@ -1329,15 +1329,17 @@ static int dhcp_recv_l2_packet(struct dhcp_packet 
*dhcp_pkt, int fd,
+   if (bytes < 0)
+   return -1;
+ 
+-  if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
+-  return -1;
+-
+-  if (bytes < ntohs(packet.ip.tot_len))
++  tot_len = ntohs(packet.ip.tot_len);
++  if (bytes > tot_len) {
++  /* ignore any extra garbage bytes */
++  bytes = tot_len;
++  } else if (bytes < tot_len) {
+   /* packet is bigger than sizeof(packet), we did partial read */
+   return -1;
++  }
+ 
+-  /* ignore any extra garbage bytes */
+-  bytes = ntohs(packet.ip.tot_len);
++  if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
++  return -1;
+ 
+   if (!sanity_check(, bytes))
+   return -1;
+-- 
+2.34.1
+
diff --git a/meta/recipes-connectivity/connman/connman_1.41.bb 
b/meta/recipes-connectivity/connman/connman_1.41.bb
index 79542b2175d..3f2e29820f8 100644
--- a/meta/recipes-connectivity/connman/connman_1.41.bb
+++ b/meta/recipes-connectivity/connman/connman_1.41.bb
@@ -8,6 +8,7 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
file://CVE-2022-32293_p1.patch \
file://CVE-2022-32293_p2.patch \
file://CVE-2022-32292.patch \
+   file://0001-gdhcp-Verify-and-sanitize-packet-length-first.patch \
"
 
 SRC_URI:append:libc-musl = " 
file://0002-resolve-musl-does-not-implement-res_ninit.patch"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180356): 
https://lists.openembedded.org/g/openembedded-core/message/180356
Mute This Topic: https://lists.openembedded.org/mt/98470746/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] connman: backport fix for CVE-2023-28488

2023-04-24 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 ...ify-and-sanitize-packet-length-first.patch | 63 +++
 .../connman/connman_1.41.bb   |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 
meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch

diff --git 
a/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch
 
b/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch
new file mode 100644
index 000..8e2f47a1d55
--- /dev/null
+++ 
b/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch
@@ -0,0 +1,63 @@
+From 99e2c16ea1cced34a5dc450d76287a1c3e762138 Mon Sep 17 00:00:00 2001
+From: Daniel Wagner 
+Date: Tue, 11 Apr 2023 08:12:56 +0200
+Subject: [PATCH] gdhcp: Verify and sanitize packet length first
+
+Avoid overwriting the read packet length after the initial test. Thus
+move all the length checks which depends on the total length first
+and do not use the total lenght from the IP packet afterwards.
+
+Fixes CVE-2023-28488
+
+Reported by Polina Smirnova 
+
+CVE: CVE-2023-28488
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+---
+ gdhcp/client.c | 16 +---
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/gdhcp/client.c b/gdhcp/client.c
+index 7efa7e45..82017692 100644
+--- a/gdhcp/client.c
 b/gdhcp/client.c
+@@ -1319,9 +1319,9 @@ static bool sanity_check(struct ip_udp_dhcp_packet 
*packet, int bytes)
+ static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
+   struct sockaddr_in *dst_addr)
+ {
+-  int bytes;
+   struct ip_udp_dhcp_packet packet;
+   uint16_t check;
++  int bytes, tot_len;
+ 
+   memset(, 0, sizeof(packet));
+ 
+@@ -1329,15 +1329,17 @@ static int dhcp_recv_l2_packet(struct dhcp_packet 
*dhcp_pkt, int fd,
+   if (bytes < 0)
+   return -1;
+ 
+-  if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
+-  return -1;
+-
+-  if (bytes < ntohs(packet.ip.tot_len))
++  tot_len = ntohs(packet.ip.tot_len);
++  if (bytes > tot_len) {
++  /* ignore any extra garbage bytes */
++  bytes = tot_len;
++  } else if (bytes < tot_len) {
+   /* packet is bigger than sizeof(packet), we did partial read */
+   return -1;
++  }
+ 
+-  /* ignore any extra garbage bytes */
+-  bytes = ntohs(packet.ip.tot_len);
++  if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
++  return -1;
+ 
+   if (!sanity_check(, bytes))
+   return -1;
+-- 
+2.34.1
+
diff --git a/meta/recipes-connectivity/connman/connman_1.41.bb 
b/meta/recipes-connectivity/connman/connman_1.41.bb
index 79542b2175d..3f2e29820f8 100644
--- a/meta/recipes-connectivity/connman/connman_1.41.bb
+++ b/meta/recipes-connectivity/connman/connman_1.41.bb
@@ -8,6 +8,7 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
file://CVE-2022-32293_p1.patch \
file://CVE-2022-32293_p2.patch \
file://CVE-2022-32292.patch \
+   file://0001-gdhcp-Verify-and-sanitize-packet-length-first.patch \
"
 
 SRC_URI:append:libc-musl = " 
file://0002-resolve-musl-does-not-implement-res_ninit.patch"
-- 
2.34.1


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



[OE-core] [PATCHV2 0/3] Create class for building and installing rust tests

2023-04-24 Thread Frederic Martinsons
From: Frederic Martinsons 

This brings the possibility to use this class to build and ship
unit tests of rust projects, the class also create (or modified)
standard run-ptest script to run the generated rust test suite.

It has been tested successfully with core-image-sato under qemu
for zvariant-ptest and python3-bcrypt-ptest (though the last one
didn't define any unit tests).

Note that I tried to do the same with python3-cryptography but fail
to build the test suite and I don't know how to do it with the rust
extension module build by python setuptools. There must be some kind
of way for doing that so maybe someone will put some work in it (
because python3-cryptography rust extension do have unit tests).

Moreover, in the class, I didn't manage to share data between
do_compile_ptest_base and do_install_ptest_base cleanly (I tried
to d.setVar in compile and d.getVar in install but it seems that
the data store doens't recognize my new variable) so I used a file
for that. I'm sure there is a clever way for doing that, so feel
free to tell me.

The following changes since commit 45a8bb6e4676899d40525e7d5ad1c1ddefee3185:

  apt-util: Fix ptest on musl (2023-04-20 11:56:03 +0100)

are available in the Git repository at:

  https://gitlab.com/fmartinsons/openembedded-core cargo-add-ptest

Frederic Martinsons (3):
  ptest-cargo.bbclass: create class
  python3-bcrypt: enable build of unit tests
  zvariant: add ptest feature for zvariant test suite

 .../zvariant/zvariant_3.12.0.bb   |   9 +-
 meta/classes-recipe/ptest-cargo.bbclass   | 129 ++
 .../python/python3-bcrypt_4.0.1.bb|   4 +-
 3 files changed, 140 insertions(+), 2 deletions(-)
 create mode 100644 meta/classes-recipe/ptest-cargo.bbclass

-- 
2.34.1


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



[OE-core] [PATCHV2 3/3] zvariant: add ptest feature for zvariant test suite

2023-04-24 Thread Frederic Martinsons
From: Frederic Martinsons 

Below is the output of run-ptest script under qemu

root@qemux86-64:~# /usr/lib/zvariant/ptest/run-ptest

running 37 tests
test framing_offset_size::tests::framing_offset_size_bump ... ok$<2>
test owned_value::tests::from_value ... ok$<2>
test object_path::unit::owned_from_reader ... ok$<2>
test str::tests::from_string ... ok$<2>
test signature::tests::signature_slicing ... ok$<2>
test str::tests::test_ordering ... ok$<2>
test owned_value::tests::map_conversion ... ok$<2>
test owned_value::tests::serde ... ok$<2>
test tests::enums ... ok$<2>
test tests::derive ... ok$<2>
test tests::f64_value ... ok$<2>
test tests::i16_value ... ok$<2>
test tests::fd_value ... ok$<2>
test tests::i32_value ... ok$<2>
test tests::i8_value ... ok$<2>
test tests::i64_value ... ok$<2>
test tests::ip_addr ... ok$<2>
test tests::issue_59 ... ok$<2>
test tests::issue_99 ... ok$<2>
test tests::array_value ... ok$<2>
test tests::object_path_value ... ok$<2>
test tests::dict_value ... ok$<2>
test tests::signature_value ... ok$<2>
test tests::serialized_size ... ok$<2>
test tests::struct_byte_array ... ok$<2>
test tests::struct_ref ... ok$<2>
test tests::str_value ... ok$<2>
test tests::option_value ... ok$<2>
test tests::struct_value ... ok$<2>
test tests::struct_with_hashmap ... ok$<2>
test tests::u16_value ... ok$<2>
test tests::u32_value ... ok$<2>
test tests::unit ... ok$<2>
test tests::u8_value ... ok$<2>
test tests::unit_fds ... ok$<2>
test tests::value_value ... ok$<2>
test tests::recursion_limits ... ok$<2>

test result: ok$<2>. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered 
out; finished in 0.21s

root@qemux86-64:~#

Signed-off-by: Frederic Martinsons 
---
 .../recipes-extended/zvariant/zvariant_3.12.0.bb | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb 
b/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb
index 4285d11b72..36f2a07ecf 100644
--- a/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb
+++ b/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb
@@ -7,6 +7,8 @@ HOMEPAGE = "https://gitlab.freedesktop.org/dbus/zbus/;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b377b220f43d747efdec40d69fcaa69d"
 
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'glib-2.0', '', 
d)}"
+
 SRC_URI = " \
 
git://gitlab.freedesktop.org/dbus/zbus;protocol=https;branch=main;subpath=zvariant
 \
 file://0001-Tweak-zvariant-crate-config.patch;striplevel=2 \
@@ -21,10 +23,15 @@ python do_clean_lic_file_symlink() {
 
 addtask clean_lic_file_symlink after do_unpack before do_patch
 
-inherit cargo cargo-update-recipe-crates
+inherit ptest-cargo pkgconfig cargo-update-recipe-crates
 
 # Remove this when the recipe is reproducible
 EXCLUDE_FROM_WORLD = "1"
 
 require ${BPN}-crates.inc
 require ${BPN}-git-crates.inc
+
+# zvariant is an indermediate product for the zbus project
+# and so, it provided only a static lib (rlib) which fall only
+# in -dev package
+ALLOW_EMPTY:${PN} = "1"
-- 
2.34.1


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



[OE-core] [PATCHV2 2/3] python3-bcrypt: enable build of unit tests

2023-04-24 Thread Frederic Martinsons
From: Frederic Martinsons 

The source code of bcrypt extension doesn't define any tests
but it is to show the ptest-cargo usage

Below is the updated test suite output for the recipe (cut):

PASS: 
tests/test_bcrypt.py:test_invalid_params[password-$2b$04$cVWp4XaNU8a4v1uMRum2SO-513-10-ValueError]
PASS: 
tests/test_bcrypt.py:test_invalid_params[password-$2b$04$cVWp4XaNU8a4v1uMRum2SO-20-0-ValueError]
PASS: tests/test_bcrypt.py:test_2a_wraparound_bug

Testsuite summary

running 0 tests

test result: ok$<2>. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; 
finished in 0.01s

root@qemux86-64:/usr/lib/python3-bcrypt/ptest#

Signed-off-by: Frederic Martinsons 
---
 meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb 
b/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb
index 21f2eb6ba4..b4f245530d 100644
--- a/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb
+++ b/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb
@@ -7,12 +7,14 @@ DEPENDS += "${PYTHON_PN}-cffi-native"
 
 SRC_URI[sha256sum] = 
"27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd"
 
-inherit pypi python_setuptools3_rust ptest cargo-update-recipe-crates
+inherit pypi python_setuptools3_rust ptest-cargo cargo-update-recipe-crates
 
 SRC_URI += " \
file://run-ptest \
 "
 
+CARGO_SRC_DIR = "src/_bcrypt"
+
 require ${BPN}-crates.inc
 
 RDEPENDS:${PN}-ptest += " \
-- 
2.34.1


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



[OE-core] [PATCHV2 1/3] ptest-cargo.bbclass: create class

2023-04-24 Thread Frederic Martinsons
From: Frederic Martinsons 

This new class offer the capbility to build rust tests and
find them correctly.
Due to non deterministic name of generated binaries, a custom
parsing of build result must be performed.
See https://github.com/rust-lang/cargo/issues/1924

All rust project will generate a test binary even if there are
not test defined in source code (the binary will just output
that it ran 0 tests)

Signed-off-by: Frederic Martinsons 
---
 meta/classes-recipe/ptest-cargo.bbclass | 129 
 1 file changed, 129 insertions(+)
 create mode 100644 meta/classes-recipe/ptest-cargo.bbclass

diff --git a/meta/classes-recipe/ptest-cargo.bbclass 
b/meta/classes-recipe/ptest-cargo.bbclass
new file mode 100644
index 00..f26d4225d3
--- /dev/null
+++ b/meta/classes-recipe/ptest-cargo.bbclass
@@ -0,0 +1,129 @@
+inherit cargo ptest
+
+CARGO_TEST_BINARIES_FILES ?= "${B}/test_binaries_list"
+
+# sadly generated test binary have no deterministic names 
(https://github.com/rust-lang/cargo/issues/1924)
+# which force us to parse the cargo output in json format to find those test 
binaries
+python do_compile_ptest_cargo() {
+import subprocess
+import json
+
+cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True))
+cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True)
+rust_flags = d.getVar("RUSTFLAGS", True)
+manifest_path = d.getVar("MANIFEST_PATH", True)
+
+env = os.environ.copy()
+env['RUSTFLAGS'] = rust_flags
+cmd = f"{cargo} build --tests --message-format json {cargo_build_flags}"
+bb.note(f"Building tests with cargo ({cmd})")
+
+try:
+proc = subprocess.Popen(cmd, shell=True, env=env, 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+except subprocess.CalledProcessError as e:
+bb.fatal(f"Cannot build test with cargo: {e}")
+
+lines = []
+for line in proc.stdout:
+data = line.decode('utf-8').strip('\n')
+lines.append(data)
+bb.note(data)
+proc.communicate()
+if proc.returncode != 0:
+bb.fatal(f"Unable to compile test with cargo, '{cmd}' failed")
+
+# Definition of the format: 
https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages
+test_bins = []
+for line in lines:
+try:
+data = json.loads(line)
+except json.JSONDecodeError:
+# skip lines that are not a json
+pass
+else:
+try:
+# Filter the test packages coming from the current manifest
+current_manifest_path = os.path.normpath(data['manifest_path'])
+project_manifest_path = os.path.normpath(manifest_path)
+if current_manifest_path == project_manifest_path:
+if data['target']['test'] or data['target']['doctest'] and 
data['executable']:
+test_bins.append(data['executable'])
+except KeyError as e:
+# skip lines that do not meet the requirements
+pass
+
+# All rust project will genrate at least one unit test binary
+# It will just run a test suite with 0 tests if the project didn't define 
some
+# So it is not expected to have an empty list here
+if not test_bins:
+bb.fatal("Unable to find any test binaries")
+
+cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
+bb.note(f"Found {len(test_bins)} tests, write their path into 
{cargo_test_binaries_file}")
+with open(cargo_test_binaries_file, "w") as f:
+for test_bin in test_bins:
+f.write(f"{test_bin}\n")
+
+}
+
+python do_install_ptest_cargo() {
+import shutil
+
+dest_dir = d.getVar("D", True)
+pn = d.getVar("PN", True)
+ptest_path = d.getVar("PTEST_PATH", True)
+cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
+
+ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/'))
+os.makedirs(ptest_dir, exist_ok=True)
+
+test_bins = []
+with open(cargo_test_binaries_file, "r") as f:
+for line in f.readlines():
+test_bins.append(line.strip('\n'))
+
+test_paths = []
+for test_bin in test_bins:
+shutil.copy2(test_bin, ptest_dir)
+test_paths.append(os.path.join(ptest_path, os.path.basename(test_bin)))
+
+ptest_script = os.path.join(ptest_dir, "run-ptest")
+if os.path.exists(ptest_script):
+with open(ptest_script, "a") as f:
+f.write(f"\necho \"\"\n")
+f.write(f"echo \"## starting to run rust tests ##\"\n")
+for test_path in test_paths:
+f.write(f"{test_path}\n")
+else:
+with open(ptest_script, "a") as f:
+f.write("#!/bin/sh\n")
+for test_path in test_paths:
+f.write(f"{test_path}\n")
+os.chmod(ptest_script, 0o755)
+
+# this is chown -R root:root ${D}${PTEST_PATH}
+for root, dirs, files in os.walk(ptest_dir):
+

[OE-core] [PATCH] dmidecode: upgrade to 3.5

2023-04-24 Thread Ross Burton
This includes a fix for CVE-2023-30630.

Remove the patch changing prefix and instead pass the paths to the make
install command.

Passing -e to make is no longer needed, the Makefile respects variables
now.

Signed-off-by: Ross Burton 
---
 ...mitting-changes-from-do_unpack_extra.patch | 25 ---
 .../{dmidecode_3.4.bb => dmidecode_3.5.bb}| 21 +++-
 2 files changed, 9 insertions(+), 37 deletions(-)
 delete mode 100644 
meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch
 rename meta/recipes-devtools/dmidecode/{dmidecode_3.4.bb => dmidecode_3.5.bb} 
(50%)

diff --git 
a/meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch
 
b/meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch
deleted file mode 100644
index d082459ca94..000
--- 
a/meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 2c0437f47eaaf565aaccf0c0d150d5fc0fc734f5 Mon Sep 17 00:00:00 2001
-From: OpenEmbedded 
-Date: Thu, 22 Nov 2018 12:05:04 +
-Subject: [PATCH] Do not install to /usr/local
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin 
-

- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 7aa729d..e079b18 100644
 a/Makefile
-+++ b/Makefile
-@@ -31,7 +31,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64
- LDFLAGS ?=
- 
- DESTDIR =
--prefix  = /usr/local
-+prefix  = /usr
- sbindir = $(prefix)/sbin
- mandir  = $(prefix)/share/man
- man8dir = $(mandir)/man8
diff --git a/meta/recipes-devtools/dmidecode/dmidecode_3.4.bb 
b/meta/recipes-devtools/dmidecode/dmidecode_3.5.bb
similarity index 50%
rename from meta/recipes-devtools/dmidecode/dmidecode_3.4.bb
rename to meta/recipes-devtools/dmidecode/dmidecode_3.5.bb
index bc741046dd0..3e2bb6e30bc 100644
--- a/meta/recipes-devtools/dmidecode/dmidecode_3.4.bb
+++ b/meta/recipes-devtools/dmidecode/dmidecode_3.5.bb
@@ -4,21 +4,18 @@ DESCRIPTION = "Dmidecode reports information about your 
system's hardware as des
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz \
-   file://0001-Committing-changes-from-do_unpack_extra.patch \
-   "
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz"
 
 COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
 
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-# The upstream buildsystem uses 'docdir' as the path where it puts AUTHORS,
-# README, etc, but we don't want those in the root of our docdir.
-docdir .= "/${BPN}"
-
 do_install() {
-   oe_runmake DESTDIR="${D}" install
+oe_runmake \
+DESTDIR="${D}" \
+prefix="${prefix}" \
+sbindir="${sbindir}" \
+docdir="${docdir}/${BPN}" \
+mandir="${mandir}" \
+install
 }
 
-SRC_URI[sha256sum] = 
"43cba851d8467c9979ccdbeab192eb6638c7d3a697eba5ddb779da8837542212"
-
+SRC_URI[sha256sum] = 
"79d76735ee8e25196e2a722964cf9683f5a09581503537884b256b01389cc073"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180350): 
https://lists.openembedded.org/g/openembedded-core/message/180350
Mute This Topic: https://lists.openembedded.org/mt/98469448/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] make-mod-scripts: preserve libraries when rm_work is used

2023-04-24 Thread Jose Quaresma
Bruce Ashfield  escreveu no dia domingo,
23/04/2023 à(s) 20:55:

> On Sat, Apr 22, 2023 at 9:06 AM Christoph Lauer
>  wrote:
> >
> > Am 21.04.23 um 22:28 schrieb Bruce Ashfield:
> > > On Wed, Apr 19, 2023 at 11:03 PM Bruce Ashfield via
> > > lists.openembedded.org
> > >  wrote:
> > >>
> > >> On Wed, Apr 19, 2023 at 6:54 PM Richard Purdie
> > >>  wrote:
> > >>>
> > >>> On Wed, 2023-04-19 at 23:34 +0100, Jose Quaresma wrote:
> >  Hi,
> > 
> >  Not related with the previous discussion but just for
> >  your information.
> >  The rm_work.bbclass has an exception for the kernel recipes [1].
> >  So I don't understand why we can't do the same for the make-mod-
> >  scripts
> >  who is the twin brother of all these kernel recipes.
> > 
> >  [1]
> > 
> https://git.openembedded.org/openembedded-core/tree/meta/classes/rm_work.bbclass#n168
> > >>>
> > >>> Ideally we wouldn't be doing this for the kernel recipes.
> > >>>
> > >>> There is also a big difference to that and the proposed patch. The
> > >>> proposed patch was preserving a specific directory rather than an
> > >>> entire recipe. Removing the task stamps but leaving a small piece of
> > >>> WORKDIR is quite different to preserving WORKDIR and STAMPS for a
> > >>> specific recipe. The former is not tested and will break things. The
> > >>> latter is better tolerated by bitbake.
> > >>
> > >> Agreed.
> > >>
> > >> Plus, I am working on this now.
> > >>
> > >> I have static linking of the scripts/tools working, but what I haven't
> > >> figured out is how to do that without patching the Makefiles.
> > >>
> > >
> > > It turned out to be quite the battle to get older kernels what was
> > > required for static linking of the tools.
> > >
> > > Attached is my WIP patch. I'm out of the office early next week, but
> > > will revisit it once I'm back.
> > >
> > > Bruce
> > >
> > >> Next up will be some rpath trickery.
> > >>
> > >> Bruce
> > >>
> > >>>
> > >>> So yes, we could do the same. I'm sure there will be other recipes
> > >>> people want to preserve for other reasons. Where do we draw the line?
> > >>> We could preserve everything and drop rm_work, then we wouldn't have
> > >>> these problems? :)
> > >>>
> > >>> Cheers,
> > >>>
> > >>> Richard
> > >>
> > >>
> > >>
> > >> --
> > >> - Thou shalt not follow the NULL pointer, for chaos and madness await
> > >> thee at its end
> > >> - "Use the force Harry" - Gandalf, Star Trek II
> > >>
> > >> 
> > >>
> > >
> > >
> >
> > Thank you for your work, I see you put some time and effort into it.
> > HOSTPKG_CONFIG is, as you mentioned, available since kernel version 5.19
>
> Yes, I realize that and documented it in the patch ... but I also
> tested on pre-5.19 kernels and what I have in the patch works. Did it
> not work in your testing ?
>

I will test the patch on a couple of kernel versions with some of them
pre-5.19
but all in 5 major versions.
I will say something about my results later this week.

Thanks for working on this one.

Jose


>
> > (see kernel patch [1]), so we need a way to call 'pkg-config --static'
> > with pre-5.19 kernels. A way without modifying the Makefile would be to
> > modify openssls pkg-config in recipe-sysroot-native of make-mod-script,
> > so 'pkg-config --libs' actually shows the dependencies of 'pkg-config
> > --static --libs', but it's a bit hacky.
>
> Already considered, and discarded. That's not going to fly.
>
> >
> > Also fully-static executables still need the same glibc during runtime
> > that they were built with, which makes them error-prone and is generally
> > discouraged. As an alternative, we could build dynamic executables that
> > use the static libcrypto library. The linker links by default against
> > the shared library, so we could remove them from recipe-sysroot-native
> > to force linking against the static library (again, somewhat hacky).
>
> Also considered and discarded.
>
> As do the dynamically linked ones for the c runtime. We aren't talking
> about using these outside of a single build and they are generated on
> the fly, so again, there's very little concern about runtimes changing
> after linking.. There's less risk in static than in the alternatives.
>
> Bruce
>
>
> >
> > [1]
> >
> https://github.com/torvalds/linux/commit/d5ea4fece4508bf8e72b659cd22fa4840d8d61e5
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>


-- 
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180349): 
https://lists.openembedded.org/g/openembedded-core/message/180349
Mute This Topic: https://lists.openembedded.org/mt/98296212/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 0/3] Create class for building rust unit test

2023-04-24 Thread Frederic Martinsons
Le lun. 24 avr. 2023, 11:53, Alexander Kanavin  a
écrit :

> On Mon, 24 Apr 2023 at 11:44, Frédéric Martinsons
>  wrote:
> > I looked again and python3-bcrypt is already in PTESTS_FAST , for
> zvariant , the recipe is in meta-selftest
> > so this layer is not always included, is this will be a problem to add
> zvariant into PTESTS_FAST ?
>
> zvariant could be skipped for now then. Are the newly expanded bcrypt
> tests still quick (under kvm)?
>
> Alex
>

Really quick since there are 0 test in the rust code ;)
But a test binary is guaranteed to be generated anyway.
I'll take another look to see if why python3-bcrypt was already in the test
suite and if I didn't overwrite something there.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180348): 
https://lists.openembedded.org/g/openembedded-core/message/180348
Mute This Topic: https://lists.openembedded.org/mt/98436057/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 0/3] Create class for building rust unit test

2023-04-24 Thread Alexander Kanavin
On Mon, 24 Apr 2023 at 11:44, Frédéric Martinsons
 wrote:
> I looked again and python3-bcrypt is already in PTESTS_FAST , for zvariant , 
> the recipe is in meta-selftest
> so this layer is not always included, is this will be a problem to add 
> zvariant into PTESTS_FAST ?

zvariant could be skipped for now then. Are the newly expanded bcrypt
tests still quick (under kvm)?

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180347): 
https://lists.openembedded.org/g/openembedded-core/message/180347
Mute This Topic: https://lists.openembedded.org/mt/98436057/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 0/3] Create class for building rust unit test

2023-04-24 Thread Frederic Martinsons
On Mon, 24 Apr 2023 at 10:20, Frederic Martinsons via lists.openembedded.org
 wrote:

>
> On Mon, 24 Apr 2023 at 09:51, Alexander Kanavin 
> wrote:
>
>> If you add ptests, please also add them to appropriate lists in
>> meta/conf/distro/include/ptest-packagelists.inc, so they will be
>> actually built and executed in yocto CI.
>>
>> Can you include a sample output of the tests you added into commit
>> messages?
>>
>> Alex
>>
>
> Ok I will issue a V2 with the modifications asked.
>
>
I looked again and python3-bcrypt is already in PTESTS_FAST , for zvariant
, the recipe is in meta-selftest
so this layer is not always included, is this will be a problem to add
zvariant into PTESTS_FAST ?

On Sat, 22 Apr 2023 at 17:59, Frederic Martinsons
>>  wrote:
>> >
>> > From: Frederic Martinsons 
>> >
>> > This brings the possibility to use this class to build and ship
>> > unit tests of rust projects, the class also create (or modified)
>> > standard run-ptest script to run the generated rust test suite.
>> >
>> > It has been tested successfully with core-image-sato under qemu
>> > for zvariant-ptest and python3-bcrypt-ptest (though the last one
>> > didn't define any unit tests).
>> >
>> > Note that I tried to do the same with python3-cryptography but fail
>> > to build the test suite and I don't know how to do it with the rust
>> > extension module build by python setuptools. There must be some kind
>> > of way for doing that so maybe someone will put some work in it (
>> > because python3-cryptography rust extension do have unit tests).
>> >
>> > Moreover, in the class, I didn't manage to share data between
>> > do_compile_ptest_base and do_install_ptest_base cleanly (I tried
>> > to d.setVar in compile and d.getVar in install but it seems that
>> > the data store doens't recognize my new variable) so I used a file
>> > for that. I'm sure there is a clever way for doing that, so feel
>> > free to tell me.
>> >
>> > The following changes since commit
>> 45a8bb6e4676899d40525e7d5ad1c1ddefee3185:
>> >
>> >   apt-util: Fix ptest on musl (2023-04-20 11:56:03 +0100)
>> >
>> > are available in the Git repository at:
>> >
>> >   https://gitlab.com/fmartinsons/openembedded-core cargo-add-ptest
>> >
>> > Frederic Martinsons (3):
>> >   ptest-cargo.bbclass: create class
>> >   python3-bcrypt: enable build of unit tests
>> >   zvariant: add ptest feature for zvariant test suite
>> >
>> >  .../zvariant/zvariant_3.12.0.bb   |  11 +-
>> >  meta/classes-recipe/ptest-cargo.bbclass   | 108 ++
>> >  .../python/python3-bcrypt_4.0.1.bb|   4 +-
>> >  3 files changed, 121 insertions(+), 2 deletions(-)
>> >  create mode 100644 meta/classes-recipe/ptest-cargo.bbclass
>> >
>> > --
>> > 2.34.1
>> >
>> >
>> >
>> >
>>
>
> 
>
>

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



[OE-core] [kirkstone][PATCH] ruby: Fix CVE-2023-28755

2023-04-24 Thread Yu, Mingli
From: Mingli Yu 

Backport patch [1] to fix CVE-2023-28755.

[1] https://github.com/ruby/ruby/commit/8ce4ab146498879b65e22f1be951b25eebb79300

Signed-off-by: Mingli Yu 
---
 .../ruby/ruby/CVE-2023-28755.patch| 68 +++
 meta/recipes-devtools/ruby/ruby_3.1.3.bb  |  1 +
 2 files changed, 69 insertions(+)
 create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2023-28755.patch

diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2023-28755.patch 
b/meta/recipes-devtools/ruby/ruby/CVE-2023-28755.patch
new file mode 100644
index 00..d611c41dcc
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/CVE-2023-28755.patch
@@ -0,0 +1,68 @@
+From db4bb57d4af6d097a0c29490536793d95f1d8983 Mon Sep 17 00:00:00 2001
+From: Hiroshi SHIBATA 
+Date: Mon, 24 Apr 2023 08:27:24 +
+Subject: [PATCH] Merge URI-0.12.1
+
+CVE: CVE-2023-28755
+
+Upstream-Status: Backport 
[https://github.com/ruby/ruby/commit/8ce4ab146498879b65e22f1be951b25eebb79300]
+
+Signed-off-by: Mingli Yu 
+---
+ lib/uri/rfc3986_parser.rb |  4 ++--
+ lib/uri/version.rb|  2 +-
+ test/uri/test_common.rb   | 11 +++
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb
+index 3e07de4..3c89311 100644
+--- a/lib/uri/rfc3986_parser.rb
 b/lib/uri/rfc3986_parser.rb
+@@ -3,8 +3,8 @@ module URI
+   class RFC3986_Parser # :nodoc:
+ # URI defined in RFC3986
+ # this regexp is modified not to host is not empty string
+-RFC3986_URI = 
/\A(?(?[A-Za-z][+\-.0-9A-Za-z]*):(?\/\/(?(?:(?(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?(?\[(?:(?(?:\h{1,4}:){6}(?\h{1,4}:\h{1,4}|(?(?[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g\.\g\.\g))|::(?:\h{1,4}:){5}\g|\h{1,4}?::(?:\h{1,4}:){4}\g|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?v\h+\.[!$&-.0-;=A-Z_a-z~]+))\])|\g|(?(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?\d*))?)(?(?:\/(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?\/(?:(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g)*)?)|(?\g(?:\/\g)*)|(?))(?:\?(?[^#]*))?(?:\#(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/
+-RFC3986_relative_ref = 
/\A(?(?\/\/(?(?:(?(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?(?\[(?(?:\h{1,4}:){6}(?\h{1,4}:\h{1,4}|(?(?[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g\.\g\.\g))|::(?:\h{1,4}:){5}\g|\h{1,4}?::(?:\h{1,4}:){4}\g|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?v\h+\.[!$&-.0-;=A-Z_a-z~]+)\])|\g|(?(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?\d*))?)(?(?:\/(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?\/(?:(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g)*)?)|(?(?(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])+)(?:\/\g)*)|(?))(?:\?(?[^#]*))?(?:\#(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/
++RFC3986_URI = 
/\A(?(?[A-Za-z][+\-.0-9A-Za-z]*+):(?\/\/(?(?:(?(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?(?\[(?:(?(?:\h{1,4}:){6}(?\h{1,4}:\h{1,4}|(?(?[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g\.\g\.\g))|::(?:\h{1,4}:){5}\g|\h{1,4}?::(?:\h{1,4}:){4}\g|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g|(?(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+))(?::(?\d*+))?)(?(?:\/(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?\/(?:(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g)*+)?)|(?\g(?:\/\g)*+)|(?))(?:\?(?[^#]*+))?(?:\#(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
++RFC3986_relative_ref = 
/\A(?(?\/\/(?(?:(?(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?(?\[(?:(?(?:\h{1,4}:){6}(?\h{1,4}:\h{1,4}|(?(?[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g\.\g\.\g))|::(?:\h{1,4}:){5}\g|\h{1,4}?::(?:\h{1,4}:){4}\g|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g|(?(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])++))?(?::(?\d*+))?)(?(?:\/(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?\/(?:(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g)*+)?)|(?(?(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])++)(?:\/\g)*+)|(?))(?:\?(?[^#]*+))?(?:\#(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
+ attr_reader :regexp
+ 
+ def initialize
+diff --git a/lib/uri/version.rb b/lib/uri/version.rb
+index 82188e2..7497a7d 100644
+--- a/lib/uri/version.rb
 b/lib/uri/version.rb
+@@ -1,6 +1,6 @@
+ module URI
+   # :stopdoc:
+-  VERSION_CODE = '001100'.freeze
++  VERSION_CODE = '001201'.freeze
+   VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
+   # :startdoc:
+ end
+diff --git a/test/uri/test_common.rb 

Re: [OE-core][PATCH v3] devicetree.bbclass: Allow selection of dts files to build

2023-04-24 Thread Petr Kubizňák
Hi Denys,

> Any examples of this being used? Not really clear from the description what's
> this really used for...

I'm not sure what is unclear to you - just the commit message, or the patch 
itself?

An example could be beaglebone-yocto.conf. If someone decides to move the 
device tree files from kernel to a standalone repository, then it is enough 
(e.g.) to rename KERNEL_DEVICETREE to EXTERNAL_DEVICETREE in the machine conf, 
and make an assignment DT_FILES = "${EXTERNAL_DEVICETREE}" in the devicetree 
recipe.

So how about to replace the unclear sentence by:
To make DT_FILES consistent with KERNEL_DEVICETREE, the list works with both 
dts and dtb files.

Would that make more sense to you? Or do you think the example should be part 
of that commit message, too?

Cheers,
Petr


From: Denys Dmytriyenko 
Sent: Sunday, April 23, 2023 12:07 AM
To: Petr Kubizňák - 2N
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH v3] devicetree.bbclass: Allow selection of dts 
files to build

On Fri, Apr 21, 2023 at 05:23:25PM +0200, Petr Kubizňák wrote:
> Add DT_FILES variable to allow the user of the class to select specific
> dts files to build. This is useful for packages featuring dts files
> for multiple machines.
>
> Since many machine configs contain a list of dtb files
> (e.g. KERNEL_DEVICETREE), DT_FILES works with both dts and dtb files.

Any examples of this being used? Not really clear from the description what's
this really used for...


> Signed-off-by: Petr Kubizňák 
> ---
>  meta/classes-recipe/devicetree.bbclass | 9 +++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes-recipe/devicetree.bbclass 
> b/meta/classes-recipe/devicetree.bbclass
> index ed2a92e447..bd50d7fa1d 100644
> --- a/meta/classes-recipe/devicetree.bbclass
> +++ b/meta/classes-recipe/devicetree.bbclass
> @@ -53,8 +53,10 @@ KERNEL_INCLUDE ??= " \
>
>  DT_INCLUDE[doc] = "Search paths to be made available to both the device tree 
> compiler and preprocessor for inclusion."
>  DT_INCLUDE ?= "${DT_FILES_PATH} ${KERNEL_INCLUDE}"
> -DT_FILES_PATH[doc] = "Defaults to source directory, can be used to select 
> dts files that are not in source (e.g. generated)."
> +DT_FILES_PATH[doc] = "Path to the directory containing dts files to build. 
> Defaults to source directory."
>  DT_FILES_PATH ?= "${S}"
> +DT_FILES[doc] = "Space-separated list of dts or dtb files (relative to 
> DT_FILES_PATH) to build. If empty, all dts files are built."
> +DT_FILES ?= ""
>
>  DT_PADDING_SIZE[doc] = "Size of padding on the device tree blob, used as 
> extra space typically for additional properties during boot."
>  DT_PADDING_SIZE ??= "0x3000"
> @@ -125,9 +127,12 @@ def devicetree_compile(dtspath, includes, d):
>  subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, 
> stderr=subprocess.STDOUT)
>
>  python devicetree_do_compile() {
> +import re
>  includes = expand_includes("DT_INCLUDE", d)
> +dtfiles = d.getVar("DT_FILES").split()
> +dtfiles = [ re.sub(r"\.dtbo?$", ".dts", dtfile) for dtfile in dtfiles ]
>  listpath = d.getVar("DT_FILES_PATH")
> -for dts in os.listdir(listpath):
> +for dts in dtfiles or os.listdir(listpath):
>  dtspath = os.path.join(listpath, dts)
>  try:
>  if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or 
> devicetree_source_is_overlay(dtspath)):
> --
> 2.30.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180344): 
https://lists.openembedded.org/g/openembedded-core/message/180344
Mute This Topic: https://lists.openembedded.org/mt/98413143/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 v2] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-04-24 Thread Luca Ceresoli via lists.openembedded.org
Hello Randolph,

On Fri, 21 Apr 2023 16:26:13 -0500
"Randolph Sapp via lists.openembedded.org"
 wrote:
 

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

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

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

Best regards,
Luca

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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180343): 
https://lists.openembedded.org/g/openembedded-core/message/180343
Mute This Topic: https://lists.openembedded.org/mt/98420230/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 3/3] zvariant: add ptest feature for zvariant test suite

2023-04-24 Thread Frederic Martinsons
On Mon, 24 Apr 2023 at 09:47, Alexander Kanavin 
wrote:

> On Sat, 22 Apr 2023 at 18:00, Frederic Martinsons
>  wrote:
>
> > +# zvariant is an indermediate product for the zbus project
> > +# and so, it provided only a static lib (rlib) which fall only
> > +# in -dev package
> > +ALLOW_EMPTY:${PN} = "1"
> > +RDEPENDS:${PN}-ptest:remove = "${PN}"
>
> Only the first should be enough, why also the second? We generally try
> to avoid :remove, as issues can be usually solved in better ways.
>
> Alex
>

Ok will remove it in a V2. It seems that I had a wrong state if I must had
add this line, but I did
a "bitbake -c cleanall zvariant && bitbake core-image-sato" and I didn't
have any rootfs
issue.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180342): 
https://lists.openembedded.org/g/openembedded-core/message/180342
Mute This Topic: https://lists.openembedded.org/mt/98436061/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 0/3] Create class for building rust unit test

2023-04-24 Thread Frederic Martinsons
On Mon, 24 Apr 2023 at 09:51, Alexander Kanavin 
wrote:

> If you add ptests, please also add them to appropriate lists in
> meta/conf/distro/include/ptest-packagelists.inc, so they will be
> actually built and executed in yocto CI.
>
> Can you include a sample output of the tests you added into commit
> messages?
>
> Alex
>

Ok I will issue a V2 with the modifications asked.


> On Sat, 22 Apr 2023 at 17:59, Frederic Martinsons
>  wrote:
> >
> > From: Frederic Martinsons 
> >
> > This brings the possibility to use this class to build and ship
> > unit tests of rust projects, the class also create (or modified)
> > standard run-ptest script to run the generated rust test suite.
> >
> > It has been tested successfully with core-image-sato under qemu
> > for zvariant-ptest and python3-bcrypt-ptest (though the last one
> > didn't define any unit tests).
> >
> > Note that I tried to do the same with python3-cryptography but fail
> > to build the test suite and I don't know how to do it with the rust
> > extension module build by python setuptools. There must be some kind
> > of way for doing that so maybe someone will put some work in it (
> > because python3-cryptography rust extension do have unit tests).
> >
> > Moreover, in the class, I didn't manage to share data between
> > do_compile_ptest_base and do_install_ptest_base cleanly (I tried
> > to d.setVar in compile and d.getVar in install but it seems that
> > the data store doens't recognize my new variable) so I used a file
> > for that. I'm sure there is a clever way for doing that, so feel
> > free to tell me.
> >
> > The following changes since commit
> 45a8bb6e4676899d40525e7d5ad1c1ddefee3185:
> >
> >   apt-util: Fix ptest on musl (2023-04-20 11:56:03 +0100)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/fmartinsons/openembedded-core cargo-add-ptest
> >
> > Frederic Martinsons (3):
> >   ptest-cargo.bbclass: create class
> >   python3-bcrypt: enable build of unit tests
> >   zvariant: add ptest feature for zvariant test suite
> >
> >  .../zvariant/zvariant_3.12.0.bb   |  11 +-
> >  meta/classes-recipe/ptest-cargo.bbclass   | 108 ++
> >  .../python/python3-bcrypt_4.0.1.bb|   4 +-
> >  3 files changed, 121 insertions(+), 2 deletions(-)
> >  create mode 100644 meta/classes-recipe/ptest-cargo.bbclass
> >
> > --
> > 2.34.1
> >
> >
> > 
> >
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180341): 
https://lists.openembedded.org/g/openembedded-core/message/180341
Mute This Topic: https://lists.openembedded.org/mt/98436057/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 0/3] Create class for building rust unit test

2023-04-24 Thread Alexander Kanavin
If you add ptests, please also add them to appropriate lists in
meta/conf/distro/include/ptest-packagelists.inc, so they will be
actually built and executed in yocto CI.

Can you include a sample output of the tests you added into commit messages?

Alex

On Sat, 22 Apr 2023 at 17:59, Frederic Martinsons
 wrote:
>
> From: Frederic Martinsons 
>
> This brings the possibility to use this class to build and ship
> unit tests of rust projects, the class also create (or modified)
> standard run-ptest script to run the generated rust test suite.
>
> It has been tested successfully with core-image-sato under qemu
> for zvariant-ptest and python3-bcrypt-ptest (though the last one
> didn't define any unit tests).
>
> Note that I tried to do the same with python3-cryptography but fail
> to build the test suite and I don't know how to do it with the rust
> extension module build by python setuptools. There must be some kind
> of way for doing that so maybe someone will put some work in it (
> because python3-cryptography rust extension do have unit tests).
>
> Moreover, in the class, I didn't manage to share data between
> do_compile_ptest_base and do_install_ptest_base cleanly (I tried
> to d.setVar in compile and d.getVar in install but it seems that
> the data store doens't recognize my new variable) so I used a file
> for that. I'm sure there is a clever way for doing that, so feel
> free to tell me.
>
> The following changes since commit 45a8bb6e4676899d40525e7d5ad1c1ddefee3185:
>
>   apt-util: Fix ptest on musl (2023-04-20 11:56:03 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/fmartinsons/openembedded-core cargo-add-ptest
>
> Frederic Martinsons (3):
>   ptest-cargo.bbclass: create class
>   python3-bcrypt: enable build of unit tests
>   zvariant: add ptest feature for zvariant test suite
>
>  .../zvariant/zvariant_3.12.0.bb   |  11 +-
>  meta/classes-recipe/ptest-cargo.bbclass   | 108 ++
>  .../python/python3-bcrypt_4.0.1.bb|   4 +-
>  3 files changed, 121 insertions(+), 2 deletions(-)
>  create mode 100644 meta/classes-recipe/ptest-cargo.bbclass
>
> --
> 2.34.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180340): 
https://lists.openembedded.org/g/openembedded-core/message/180340
Mute This Topic: https://lists.openembedded.org/mt/98436057/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 3/3] zvariant: add ptest feature for zvariant test suite

2023-04-24 Thread Alexander Kanavin
On Sat, 22 Apr 2023 at 18:00, Frederic Martinsons
 wrote:

> +# zvariant is an indermediate product for the zbus project
> +# and so, it provided only a static lib (rlib) which fall only
> +# in -dev package
> +ALLOW_EMPTY:${PN} = "1"
> +RDEPENDS:${PN}-ptest:remove = "${PN}"

Only the first should be enough, why also the second? We generally try
to avoid :remove, as issues can be usually solved in better ways.

Alex

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